跳转至

PlayerAuthInputPacket

文档版本:r/21_u4
协议版本:748

PlayerAuthInputPacket数据包,数字ID144。该数据包用于protocol.packet.playerauthinputpacket.description

结构



PlayerAuthInputPacket




0

PlayerAuthInputPacket




1

Player Rotation



0->1






3

Position



0->3






5

Move Vector



0->5






7

Player's Head Rotation



0->7






9

Input Data



0->9






11

Input Mode



0->11






13

Play Mode



0->13






15

New Interaction Model



0->15






17

Interact Rotation



0->17






19

Client tick



0->19






21

Pos Delta



0->21






23



Dependency on 'ItemUseTransaction and PerformItemInteraction bit set'



0->23






77



Dependency on 'ItemStackRequest and PerformItemStackRequest bit set'



0->77






113



Dependency on 'PerformBlockActions bit set'



0->113






160



Dependency on 'IsInClientPredictedVehicle bit set'



0->160






168

Analog MoveVector



0->168






170

Camera Orientation



0->170






2

Vec2



1->2






4

Vec3



3->4






6

Vec2



5->6






8

float



7->8






10

unsigned varint64



9->10






12

unsigned varint



11->12






14

unsigned varint



13->14






16

unsigned varint



15->16






18

Vec2



17->18






20

PlayerInputTick



19->20






22

Vec3



21->22






24

if (0)



23->24






26

if (1)



23->26






25

[No Data]



24->25






27

Item Use Transaction



26->27






76

PackedItemUseLegacyInventoryTransaction



27->76






78

if (0)



77->78






80

if (1)



77->80






79

[No Data]



78->79






81

Client Request Id



80->81






86

Actions



80->86






105

Strings To Filter



80->105






111

StringsToFilterOrigin



80->111






85

TypedClientNetId<struct ItemStackRequestIdTag,int,0>



81->85






87

Array Size



86->87






89

example element



86->89






88

unsigned varint



87->88






90

Action type



89->90






92

Amount



89->92






94

Source



89->94






103

Destination



89->103






91

byte



90->91






93

byte



92->93






102

ItemStackRequestSlotInfo



94->102






104

ItemStackRequestSlotInfo



103->104






106

Array Size



105->106






108

example element



105->108






107

unsigned varint



106->107






109

String To Filter



108->109






110

string



109->110






112

int



111->112






114

if (0)



113->114






116

if (1)



113->116






115

[No Data]



114->115






117

Player Block Actions



116->117






159

PlayerBlockActions



117->159






161

if (0)



160->161






163

if (1)



160->163






162

[No Data]



161->162






164

Vehicle Rotation



163->164






166

Client Predicted Vehicle



163->166






165

Vec2



164->165






167

ActorUniqueID



166->167






169

Vec2



168->169






171

Vec3



170->171




字段

PlayerAuthInputPacket
[player_rotation][position][move_vector][players_head_rotation][input_data][input_mode][play_mode][new_interaction_model][interact_rotation][client_tick][pos_delta][dependency_on_itemusetransaction_and_performiteminteraction_bit_set][dependency_on_itemstackrequest_and_performitemstackrequest_bit_set][dependency_on_performblockactions_bit_set][dependency_on_isinclientpredictedvehicle_bit_set][analog_movevector][camera_orientation]
Player Rotation:Vec2
特殊类型。protocol.packet.playerauthinputpacket.player_rotation.descriptionOrientation of the player at the start of the tick.
Position:Vec3
特殊类型。protocol.packet.playerauthinputpacket.position.descriptionClient predicted position at the end of the tick. Referring to the player unless they are controlling a client predicted vehicle in which case it's the vehicle position.
Move Vector:Vec2
特殊类型。protocol.packet.playerauthinputpacket.move_vector.descriptionThe desired local space move direction of the player in the vehicle. Convert this to world space by rotating by Player Rotation along the Y (up) axis.
Player's Head Rotation:float
基本类型。protocol.packet.playerauthinputpacket.players_head_rotation.descriptionEffectively the same as the Y component of Player Rotation
Input Data:unsigned varint64
基本类型。protocol.packet.playerauthinputpacket.input_data.descriptionBitset where the bits are indexed by PlayerAuthInputPacket::InputData, see enum table for details.
Input Mode:unsigned varint
基本类型枚举。protocol.packet.playerauthinputpacket.input_mode.description枚举值如下:
描述
Undefined 0 protocol.enum.undefined
Mouse 1 protocol.enum.mouse
Touch 2 protocol.enum.touch
GamePad 3 protocol.enum.gamepad
MotionController 4 protocol.enum.motioncontroller
Count 5 protocol.enum.count
Play Mode:unsigned varint
基本类型枚举。protocol.packet.playerauthinputpacket.play_mode.description枚举值如下:
描述
Normal 0 protocol.enum.normal
Teaser 1 protocol.enum.teaser
Screen 2 protocol.enum.screen
Viewer 3 protocol.enum.viewer
Reality 4 protocol.enum.reality
Placement 5 protocol.enum.placement
LivingRoom 6 protocol.enum.livingroom
ExitLevel 7 protocol.enum.exitlevel
ExitLevelLivingRoom 8 protocol.enum.exitlevellivingroom
NumModes 9 protocol.enum.nummodes
New Interaction Model:unsigned varint
基本类型枚举。protocol.packet.playerauthinputpacket.new_interaction_model.description枚举值如下:
描述
Touch 0 protocol.enum.touch
Crosshair 1 protocol.enum.crosshair
Classic 2 protocol.enum.classic
Count 3 protocol.enum.count
Interact Rotation:Vec2
特殊类型。protocol.packet.playerauthinputpacket.interact_rotation.descriptionThe rotation the player is looking that they intend to use for interactions. In default modes this is the same as Player Rotation. For creator cameras and VR it may not.
Client tick:PlayerInputTick
特殊类型。protocol.packet.playerauthinputpacket.client_tick.descriptionWhich simulation frame client is on. The server should send back the most recently processed PlayerInputTick in any client-bound packets referring to player data that have a PlayerInputTick.
Pos Delta:Vec3
特殊类型。protocol.packet.playerauthinputpacket.pos_delta.descriptionClient predicted velocity at the end of the tick. This is referring to the player unless they're in control of a client predicted vehicle in which case it's the vehicle.

依赖于ItemUseTransaction and PerformItemInteraction bit set

if (0):[No Data]
无数据
if (1)
[item_use_transaction]
Item Use Transaction:PackedItemUseLegacyInventoryTransaction
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemusetransaction_and_performiteminteraction_bit_set.if_1.item_use_transaction.description

依赖于ItemStackRequest and PerformItemStackRequest bit set

if (0):[No Data]
无数据
if (1)
[client_request_id][actions][strings_to_filter][stringstofilterorigin]
Client Request Id:TypedClientNetId<struct ItemStackRequestIdTag,int,0>
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.client_request_id.description
Actions
[array_size][[example_element]..]
数组大小:unsigned varint
基本类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.array_size.description
示例元素
[action_type][amount][source][destination]
Action type:byte
基本类型枚举。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.example_element.action_type.description枚举值如下:
描述
Take 0 protocol.enum.take
Place 1 protocol.enum.place
Swap 2 protocol.enum.swap
Drop 3 protocol.enum.drop
Destroy 4 protocol.enum.destroy
Consume 5 protocol.enum.consume
Create 6 protocol.enum.create
PlaceInItemContainer_DEPRECATED 7 protocol.enum.placeinitemcontainer_deprecated
TakeFromItemContainer_DEPRECATED 8 protocol.enum.takefromitemcontainer_deprecated
ScreenLabTableCombine 9 protocol.enum.screenlabtablecombine
ScreenBeaconPayment 10 protocol.enum.screenbeaconpayment
ScreenHUDMineBlock 11 protocol.enum.screenhudmineblock
CraftRecipe 12 protocol.enum.craftrecipe
CraftRecipeAuto 13 protocol.enum.craftrecipeauto
CraftCreative 14 protocol.enum.craftcreative
CraftRecipeOptional 15 protocol.enum.craftrecipeoptional
CraftRepairAndDisenchant 16 protocol.enum.craftrepairanddisenchant
CraftLoom 17 protocol.enum.craftloom
CraftNonImplemented_DEPRECATEDASKTYLAING 18 protocol.enum.craftnonimplemented_deprecatedasktylaing
CraftResults_DEPRECATEDASKTYLAING 19 protocol.enum.craftresults_deprecatedasktylaing
ifdef 20 protocol.enum.ifdef
TEST_INFRASTRUCTURE_ENABLED 21 protocol.enum.test_infrastructure_enabled
Test 22 protocol.enum.test
endif 23 protocol.enum.endif
Amount:byte
基本类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.example_element.amount.description
Source:ItemStackRequestSlotInfo
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.example_element.source.description
Destination:ItemStackRequestSlotInfo
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.example_element.destination.description
Strings To Filter
[array_size][[example_element]..]
数组大小:unsigned varint
基本类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.strings_to_filter.array_size.description
示例元素
[string_to_filter]
String To Filter:string
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.strings_to_filter.example_element.string_to_filter.descriptionIndivdiual string that needs checking
StringsToFilterOrigin:int
基本类型枚举。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.stringstofilterorigin.description枚举值如下:
描述
unknown -1 protocol.enum.unknown
ServerChatPublic 0 protocol.enum.serverchatpublic
ServerChatWhisper 1 protocol.enum.serverchatwhisper
SignText 2 protocol.enum.signtext
AnvilText 3 protocol.enum.anviltext
BookAndQuillText 4 protocol.enum.bookandquilltext
CommandBlockText 5 protocol.enum.commandblocktext
BlockActorDataText 6 protocol.enum.blockactordatatext
JoinEventText 7 protocol.enum.joineventtext
LeaveEventText 8 protocol.enum.leaveeventtext
SlashCommandChat 9 protocol.enum.slashcommandchat
CartographyText 10 protocol.enum.cartographytext
KickCommand 11 protocol.enum.kickcommand
TitleCommand 12 protocol.enum.titlecommand
SummonCommand 13 protocol.enum.summoncommand
ServerForm 14 protocol.enum.serverform
COUNT 15 protocol.enum.count

依赖于PerformBlockActions bit set

if (0):[No Data]
无数据
if (1)
[player_block_actions]
Player Block Actions:PlayerBlockActions
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_performblockactions_bit_set.if_1.player_block_actions.description

依赖于IsInClientPredictedVehicle bit set

if (0):[No Data]
无数据
if (1)
[vehicle_rotation][client_predicted_vehicle]
Vehicle Rotation:Vec2
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_isinclientpredictedvehicle_bit_set.if_1.vehicle_rotation.descriptionThe client predicted rotation of a client predicted vehicle at the end of the tick if the player is in control of one.
Client Predicted Vehicle:ActorUniqueID
特殊类型。protocol.packet.playerauthinputpacket.dependency_on_isinclientpredictedvehicle_bit_set.if_1.client_predicted_vehicle.descriptionThe ID of the vehicle the client thinks they are in control of. Relevant for the server to disambiguate client predictions when switching between two vehicles.
Analog MoveVector:Vec2
特殊类型。protocol.packet.playerauthinputpacket.analog_movevector.descriptionSame 'id'ea as move vector
Camera Orientation:Vec3
特殊类型。protocol.packet.playerauthinputpacket.camera_orientation.descriptionThe world space unit vector that represents the camera's forward direction. This is used to transform movement to be camera relative.