PlayerAuthInputPacket¶
文档版本:r/21_u4
协议版本:748
PlayerAuthInputPacket数据包,数字ID是144
。该数据包用于protocol.packet.playerauthinputpacket.description
结构¶
字段¶
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]
- 无数据
- 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]
- 无数据
- Client Request Id:TypedClientNetId<struct ItemStackRequestIdTag,int,0>
- 特殊类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.client_request_id.description
- 数组大小:unsigned varint
- 基本类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.actions.array_size.description
- 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
- 数组大小:unsigned varint
- 基本类型。protocol.packet.playerauthinputpacket.dependency_on_itemstackrequest_and_performitemstackrequest_bit_set.if_1.strings_to_filter.array_size.description
- 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]
- 无数据
- 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]
- 无数据
- 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.