UpdateTradePacket¶
文档版本:r/21_u4
协议版本:748
UpdateTradePacket数据包,数字ID是80。该数据包用于protocol.packet.updatetradepacket.description
结构¶
digraph "UpdateTradePacket" {
rankdir = LR
0
0 -> 1
1 -> 2
0 -> 3
3 -> 4
0 -> 5
5 -> 6
0 -> 7
7 -> 8
0 -> 9
9 -> 10
0 -> 11
11 -> 12
0 -> 13
13 -> 14
0 -> 15
15 -> 16
0 -> 17
17 -> 18
0 -> 19
19 -> 20
0 [label="UpdateTradePacket",comment="name: \"UpdateTradePacket\", typeName: \"\", id: 0, branchId: 80, recurseId: -1, attributes: 0, notes: \"\""];
1 [label="Container Id",comment="name: \"Container Id\", typeName: \"\", id: 1, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
2 [label="byte",comment="name: \"byte\", typeName: \"\", id: 2, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
3 [label="Container Type",comment="name: \"Container Type\", typeName: \"\", id: 3, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
4 [label="byte",comment="name: \"byte\", typeName: \"\", id: 4, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
5 [label="Size",comment="name: \"Size\", typeName: \"\", id: 5, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
6 [label="varint",comment="name: \"varint\", typeName: \"\", id: 6, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
7 [label="Trade Tier",comment="name: \"Trade Tier\", typeName: \"\", id: 7, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
8 [label="varint",comment="name: \"varint\", typeName: \"\", id: 8, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
9 [label="Target Actor ID",comment="name: \"Target Actor ID\", typeName: \"ActorUniqueID\", id: 9, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
10 [label="ActorUniqueID",comment="name: \"ActorUniqueID\", typeName: \"\", id: 10, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
11 [label="Last Trading Player ID",comment="name: \"Last Trading Player ID\", typeName: \"ActorUniqueID\", id: 11, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
12 [label="ActorUniqueID",comment="name: \"ActorUniqueID\", typeName: \"\", id: 12, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
13 [label="Display Name",comment="name: \"Display Name\", typeName: \"\", id: 13, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
14 [label="string",comment="name: \"string\", typeName: \"\", id: 14, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
15 [label="Use New Trade UI",comment="name: \"Use New Trade UI\", typeName: \"\", id: 15, branchId: 0, recurseId: -1, attributes: 0, notes: \"\""];
16 [label="bool",comment="name: \"bool\", typeName: \"\", id: 16, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
17 [label="Using Economy Trade",comment="name: \"Using Economy Trade\", typeName: \"\", id: 17, branchId: 0, recurseId: -1, attributes: 0, notes: \"When set to false, it means the packet comes from the old Trade Component.\""];
18 [label="bool",comment="name: \"bool\", typeName: \"\", id: 18, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
19 [label="Data Tags",comment="name: \"Data Tags\", typeName: \"CompoundTag\", id: 19, branchId: 0, recurseId: -1, attributes: 256, notes: \"\""];
20 [label="CompoundTag",comment="name: \"CompoundTag\", typeName: \"\", id: 20, branchId: 0, recurseId: -1, attributes: 512, notes: \"\""];
{ rank = max;2;4;6;8;10;12;14;16;18;20}
}
字段¶
UpdateTradePacket
[container_id][container_type][size][trade_tier][target_actor_id][last_trading_player_id][display_name][use_new_trade_ui][using_economy_trade][data_tags]
- Container Id:byte
- 基本类型枚举。protocol.packet.updatetradepacket.container_id.description枚举值如下:
-
键 值 描述 CONTAINER_ID_NONE-1protocol.enum.container_id_none CONTAINER_ID_INVENTORY0protocol.enum.container_id_inventory CONTAINER_ID_FIRST1protocol.enum.container_id_first CONTAINER_ID_LAST100protocol.enum.container_id_last CONTAINER_ID_OFFHAND119protocol.enum.container_id_offhand CONTAINER_ID_ARMOR120protocol.enum.container_id_armor CONTAINER_ID_SELECTION_SLOTS122protocol.enum.container_id_selection_slots CONTAINER_ID_PLAYER_ONLY_UI124protocol.enum.container_id_player_only_ui CONTAINER_ID_REGISTRY125protocol.enum.container_id_registry
- Container Type:byte
- 基本类型枚举。protocol.packet.updatetradepacket.container_type.description枚举值如下:
-
键 值 描述 NONE-9无 INVENTORY-1protocol.enum.inventory CONTAINER0protocol.enum.container WORKBENCH1protocol.enum.workbench FURNACE2protocol.enum.furnace ENCHANTMENT3protocol.enum.enchantment BREWING_STAND4protocol.enum.brewing_stand ANVIL5protocol.enum.anvil DISPENSER6protocol.enum.dispenser DROPPER7protocol.enum.dropper HOPPER8protocol.enum.hopper CAULDRON9protocol.enum.cauldron MINECART_CHEST10protocol.enum.minecart_chest MINECART_HOPPER11protocol.enum.minecart_hopper HORSE12protocol.enum.horse BEACON13protocol.enum.beacon STRUCTURE_EDITOR14protocol.enum.structure_editor TRADE15protocol.enum.trade COMMAND_BLOCK16protocol.enum.command_block JUKEBOX17protocol.enum.jukebox ARMOR18protocol.enum.armor HAND19protocol.enum.hand COMPOUND_CREATOR20protocol.enum.compound_creator ELEMENT_CONSTRUCTOR21protocol.enum.element_constructor MATERIAL_REDUCER22protocol.enum.material_reducer LAB_TABLE23protocol.enum.lab_table LOOM24protocol.enum.loom LECTERN25protocol.enum.lectern GRINDSTONE26protocol.enum.grindstone BLAST_FURNACE27protocol.enum.blast_furnace SMOKER28protocol.enum.smoker STONECUTTER29protocol.enum.stonecutter CARTOGRAPHY30protocol.enum.cartography HUD31protocol.enum.hud JIGSAW_EDITOR32protocol.enum.jigsaw_editor SMITHING_TABLE33protocol.enum.smithing_table CHEST_BOAT34protocol.enum.chest_boat DECORATED_POT35protocol.enum.decorated_pot CRAFTER36protocol.enum.crafter
- Size:varint
- 基本类型。protocol.packet.updatetradepacket.size.description
- Trade Tier:varint
- 基本类型。protocol.packet.updatetradepacket.trade_tier.description
- Target Actor ID:ActorUniqueID
- 特殊类型。protocol.packet.updatetradepacket.target_actor_id.description
- Last Trading Player ID:ActorUniqueID
- 特殊类型。protocol.packet.updatetradepacket.last_trading_player_id.description
- Display Name:string
- 特殊类型。protocol.packet.updatetradepacket.display_name.description
- Use New Trade UI:bool
- 基本类型。protocol.packet.updatetradepacket.use_new_trade_ui.description
- Using Economy Trade:bool
- 基本类型。protocol.packet.updatetradepacket.using_economy_trade.descriptionWhen set to false, it means the packet comes from the old Trade Component.
- Data Tags:CompoundTag
- 特殊类型。protocol.packet.updatetradepacket.data_tags.description