diff --git a/data/pc/1.21.11/proto.yml b/data/pc/1.21.11/proto.yml index b2f0dafc5..692624ccf 100644 --- a/data/pc/1.21.11/proto.yml +++ b/data/pc/1.21.11/proto.yml @@ -247,7 +247,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 diff --git a/data/pc/1.21.11/protocol.json b/data/pc/1.21.11/protocol.json index ede0c3840..5a9f24eb8 100644 --- a/data/pc/1.21.11/protocol.json +++ b/data/pc/1.21.11/protocol.json @@ -614,7 +614,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ diff --git a/data/pc/1.21.5/proto.yml b/data/pc/1.21.5/proto.yml index 6a1fdf8ee..b5a4ab6b9 100644 --- a/data/pc/1.21.5/proto.yml +++ b/data/pc/1.21.5/proto.yml @@ -220,7 +220,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 diff --git a/data/pc/1.21.5/protocol.json b/data/pc/1.21.5/protocol.json index e4c3ad905..b6ba4e048 100644 --- a/data/pc/1.21.5/protocol.json +++ b/data/pc/1.21.5/protocol.json @@ -487,7 +487,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ diff --git a/data/pc/1.21.6/proto.yml b/data/pc/1.21.6/proto.yml index 38dd0b9ac..ba9028e04 100644 --- a/data/pc/1.21.6/proto.yml +++ b/data/pc/1.21.6/proto.yml @@ -227,7 +227,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 diff --git a/data/pc/1.21.6/protocol.json b/data/pc/1.21.6/protocol.json index 54c1ec1e8..f1f92d40a 100644 --- a/data/pc/1.21.6/protocol.json +++ b/data/pc/1.21.6/protocol.json @@ -548,7 +548,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ diff --git a/data/pc/1.21.8/proto.yml b/data/pc/1.21.8/proto.yml index 88582d8fe..4b2011337 100644 --- a/data/pc/1.21.8/proto.yml +++ b/data/pc/1.21.8/proto.yml @@ -227,7 +227,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 diff --git a/data/pc/1.21.8/protocol.json b/data/pc/1.21.8/protocol.json index 17fd75d0d..7b3f69850 100644 --- a/data/pc/1.21.8/protocol.json +++ b/data/pc/1.21.8/protocol.json @@ -548,7 +548,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ diff --git a/data/pc/1.21.9/proto.yml b/data/pc/1.21.9/proto.yml index 1494e764d..8b44bfb0c 100644 --- a/data/pc/1.21.9/proto.yml +++ b/data/pc/1.21.9/proto.yml @@ -228,7 +228,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 diff --git a/data/pc/1.21.9/protocol.json b/data/pc/1.21.9/protocol.json index 7d3e9f747..fc6aca2db 100644 --- a/data/pc/1.21.9/protocol.json +++ b/data/pc/1.21.9/protocol.json @@ -549,7 +549,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ diff --git a/data/pc/26.1/protocol.json b/data/pc/26.1/protocol.json index f4f9f4757..1cb096d91 100644 --- a/data/pc/26.1/protocol.json +++ b/data/pc/26.1/protocol.json @@ -612,7 +612,7 @@ "repair_cost": "varint", "creative_slot_lock": "void", "enchantment_glint_override": "bool", - "intangible_projectile": "void", + "intangible_projectile": "anonymousNbt", "blocks_attacks": [ "container", [ @@ -766,7 +766,7 @@ } ] ], - "use_remainder": "Slot", + "use_remainder": "ItemStackTemplate", "use_cooldown": [ "container", [ @@ -1098,7 +1098,7 @@ "array", { "countType": "varint", - "type": "Slot" + "type": "ItemStackTemplate" } ] } @@ -1113,7 +1113,7 @@ "array", { "countType": "varint", - "type": "Slot" + "type": "ItemStackTemplate" } ] } @@ -1468,7 +1468,10 @@ "array", { "countType": "varint", - "type": "Slot" + "type": [ + "option", + "ItemStackTemplate" + ] } ] } @@ -2325,6 +2328,55 @@ } ] ], + "ItemStackTemplate": [ + "container", + [ + { + "name": "itemId", + "type": "varint" + }, + { + "name": "itemCount", + "type": "varint" + }, + { + "name": "addedComponentCount", + "type": "varint" + }, + { + "name": "removedComponentCount", + "type": "varint" + }, + { + "name": "components", + "type": [ + "array", + { + "count": "addedComponentCount", + "type": "SlotComponent" + } + ] + }, + { + "name": "removeComponents", + "type": [ + "array", + { + "count": "removedComponentCount", + "type": [ + "container", + [ + { + "name": "type", + "type": "SlotComponentType" + } + ] + ] + } + ] + } + ] + ], "HashedSlot": [ "container", [ @@ -3467,7 +3519,7 @@ ] ], "entity_effect": "i32", - "item": "Slot", + "item": "ItemStackTemplate", "sculk_charge": "f32", "shriek": "varint", "vibration": [ @@ -5831,7 +5883,7 @@ ] ], "item": "varint", - "item_stack": "Slot", + "item_stack": "ItemStackTemplate", "tag": "string", "dyed_slot_demo": [ "container", @@ -9593,7 +9645,7 @@ }, { "name": "icon", - "type": "Slot" + "type": "ItemStackTemplate" }, { "name": "frameType", diff --git a/data/pc/latest/proto.yml b/data/pc/latest/proto.yml index 120c8f683..039bfd7db 100644 --- a/data/pc/latest/proto.yml +++ b/data/pc/latest/proto.yml @@ -252,7 +252,7 @@ if repair_cost: varint if creative_slot_lock: void if enchantment_glint_override: bool - if intangible_projectile: void + if intangible_projectile: anonymousNbt if blocks_attacks: blockDelaySeconds: f32 disableCooldownScale: f32 @@ -291,7 +291,7 @@ sound: ItemSoundHolder makes_particles: bool effects: ItemConsumeEffect[]varint - if use_remainder: Slot + if use_remainder: ItemStackTemplate if use_cooldown: seconds: f32 cooldownGroup?: string @@ -375,9 +375,9 @@ if map_post_processing: varint if potion_duration_scale: f32 if charged_projectiles: - projectiles: Slot[]varint + projectiles: ItemStackTemplate[]varint if bundle_contents: - contents: Slot[]varint + contents: ItemStackTemplate[]varint if potion_contents: # True if this potion has an ID in the potion registry--it has the default effects associated with the potion type. potionId?: varint @@ -445,7 +445,7 @@ # The ID of the items in the item registry. decorations: varint[]varint if container: - contents: Slot[]varint + contents: ["array", { "countType": "varint", "type": ["option", "ItemStackTemplate"] }] if block_state: properties: []varint name: string @@ -686,6 +686,16 @@ removeComponents: []$removedComponentCount type: SlotComponentType + # Intentionally id-first, unlike the count-first Slot above — vanilla has both codecs. + ItemStackTemplate: + itemId: varint + itemCount: varint + addedComponentCount: varint + removedComponentCount: varint + components: SlotComponent[]$addedComponentCount + removeComponents: []$removedComponentCount + type: SlotComponentType + HashedSlot: itemId: varint itemCount: varint @@ -1048,7 +1058,7 @@ toGreen: f32 toBlue: f32 if entity_effect: i32 - if item: Slot + if item: ItemStackTemplate if sculk_charge: f32 if shriek: varint if vibration: @@ -1976,7 +1986,7 @@ source: SlotDisplay component: SlotComponentType if item: varint - if item_stack: Slot + if item_stack: ItemStackTemplate if tag: string if dyed_slot_demo: dye: SlotDisplay @@ -2980,7 +2990,7 @@ displayData?: title: anonymousNbt description: anonymousNbt - icon: Slot + icon: ItemStackTemplate frameType: varint flags: ["bitfield", [ { "name": "unused", "size": 29, "signed": false },