fix: empty entity data

This commit is contained in:
Alexander Medvedev 2026-08-22 22:56:55 +02:00
parent df28c321ac
commit 1abbc7bfec
169 changed files with 2406 additions and 1438 deletions

View File

@ -67641,7 +67641,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const APPLE : Self = Self { id : 878 , registry_key : "minecraft:apple" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x0Fstacked_by_data\0\x03\ruse_animation\x02\x03\x0Cuse_duration@\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x80\x01\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x05apple\0\0\x03\x06damage\0\x05\x0Cmining_speed\0\0\x80?\x01\x04foil\0\x01\rhand_equipped\0\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\x03\x11creative_category\x04\x08\x0Ecreative_group\0\0\n\x0Eminecraft:food\n\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\tnutrition\x08\0\t\titem_tags\x08\x02\x11minecraft:is_food\n\x17minecraft:use_animation\x08\x05value\x03eat\0\n\x16minecraft:display_name\x08\x05value\x0Fitem.apple.name\0\n\x0Eminecraft:tags\t\x04tags\x08\x02\x11minecraft:is_food\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\x01\x05\x11movement_modifier33\xB3>\x05\x0Cuse_duration\xCD\xCC\xCC?\x08\x0Bstart_using\x06always\0\0\0" } ;
pub const APPLE : Self = Self { id : 878 , registry_key : "minecraft:apple" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x03\x06damage\0\x03\ruse_animation\x02\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x04\x03\x0Emax_stack_size\x80\x01\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x03\x0Bframe_count\x02\x01\rhand_equipped\0\x03\x0Cuse_duration@\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x05apple\0\0\x05\x0Cmining_speed\0\0\x80?\0\t\titem_tags\x08\x02\x11minecraft:is_food\n\x0Eminecraft:tags\t\x04tags\x08\x02\x11minecraft:is_food\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\x01\x05\x11movement_modifier33\xB3>\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\xCD\xCC\xCC?\0\n\x17minecraft:use_animation\x08\x05value\x03eat\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\tnutrition\x08\x05\x13saturation_modifier\x9A\x99\x99>\n\x11using_converts_to\0\0\n\x16minecraft:display_name\x08\x05value\x0Fitem.apple.name\0\0\0" } ;
pub const ARCHER_POTTERY_SHERD: Self = Self {
id: 671,
registry_key: "minecraft:archer_pottery_sherd",
@ -67726,7 +67726,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BAKED_POTATO : Self = Self { id : 281 , registry_key : "minecraft:baked_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x03\tnutrition\n\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0\0" } ;
pub const BAKED_POTATO : Self = Self { id : 281 , registry_key : "minecraft:baked_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x19?\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\n\x03\ron_use_action\x01\0\0\0" } ;
pub const BALLOON: Self = Self {
id: 612,
registry_key: "minecraft:balloon",
@ -67979,7 +67979,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BEEF : Self = Self { id : 273 , registry_key : "minecraft:beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\tnutrition\x06\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const BEEF : Self = Self { id : 273 , registry_key : "minecraft:beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\tnutrition\x06\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const BEEHIVE: Self = Self {
id: -219,
registry_key: "minecraft:beehive",
@ -67987,9 +67987,9 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BEETROOT : Self = Self { id : 285 , registry_key : "minecraft:beetroot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x03\rcooldown_time\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x03\tnutrition\x02\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const BEETROOT_SEEDS : Self = Self { id : 295 , registry_key : "minecraft:beetroot_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\x0Bcrop_result\x12minecraft:beetroot\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0\0" } ;
pub const BEETROOT_SOUP : Self = Self { id : 286 , registry_key : "minecraft:beetroot_soup" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x0C\x05\x13saturation_modifier\x9A\x99\x19?\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\x04bowl\0\x03\x16minecraft:use_duration@\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const BEETROOT : Self = Self { id : 285 , registry_key : "minecraft:beetroot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\x03\tnutrition\x02\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0\0" } ;
pub const BEETROOT_SEEDS : Self = Self { id : 295 , registry_key : "minecraft:beetroot_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x12minecraft:beetroot\0\0\0" } ;
pub const BEETROOT_SOUP : Self = Self { id : 286 , registry_key : "minecraft:beetroot_soup" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x0C\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\x08\x11using_converts_to\x04bowl\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\0\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const BELL: Self = Self {
id: -206,
registry_key: "minecraft:bell",
@ -68151,7 +68151,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BLACK_BUNDLE : Self = Self { id : 857 , registry_key : "minecraft:black_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\0\x03\x0Cuse_duration\0\x08\x0Ecreative_group\0\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x03\x06damage\0\x01\x12hidden_in_commands\x02\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_black\x08\x10bundle_open_back\x16bundle_black_open_back\x08\x11bundle_open_front\x17bundle_black_open_front\0\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x03\x11creative_category\x06\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x03\ruse_animation\0\x01\x0Eshould_despawn\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\0\0" } ;
pub const BLACK_BUNDLE : Self = Self { id : 857 , registry_key : "minecraft:black_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x01\x04foil\0\x08\x10enchantable_slot\x04none\x03\x11creative_category\x06\x03\x06damage\0\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x16bundle_black_open_back\x08\x11bundle_open_front\x17bundle_black_open_front\x08\x07default\x0Cbundle_black\0\0\x03\x0Bframe_count\x02\x03\x0Cuse_duration\0\x03\x0Emax_stack_size\x02\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const BLACK_CANDLE: Self = Self {
id: -428,
registry_key: "minecraft:black_candle",
@ -68327,7 +68327,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BLUE_BUNDLE : Self = Self { id : 858 , registry_key : "minecraft:blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x0Fstacked_by_data\0\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x01\x04foil\0\x03\x06damage\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bbundle_blue\x08\x10bundle_open_back\x15bundle_blue_open_back\x08\x11bundle_open_front\x16bundle_blue_open_front\0\0\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Cuse_duration\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const BLUE_BUNDLE : Self = Self { id : 858 , registry_key : "minecraft:blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_blue_open_back\x08\x11bundle_open_front\x16bundle_blue_open_front\x08\x07default\x0Bbundle_blue\0\0\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\0\x03\x06damage\0\x01\x0Eallow_off_hand\0\x03\x0Bframe_count\x02\x01\x04foil\0\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x01\x0Eliquid_clipped\0\x03\x11creative_category\x06\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\0\0" } ;
pub const BLUE_CANDLE: Self = Self {
id: -424,
registry_key: "minecraft:blue_candle",
@ -68566,8 +68566,8 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BREAD : Self = Self { id : 261 , registry_key : "minecraft:bread" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x19?\x03\tnutrition\n\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const BREEZE_ROD : Self = Self { id : 874 , registry_key : "minecraft:breeze_rod" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:display_name\x08\x05value\x14item.breeze_rod.name\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x03\x0Bframe_count\x02\x01\x04foil\0\x03\ruse_animation\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nbreeze_rod\0\0\x03\x06damage\0\x08\x10enchantable_slot\x04none\x03\x0Cuse_duration\0\x05\x0Cmining_speed\0\0\x80?\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x80\x01\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x03\x11creative_category\x08\x01\rhand_equipped\x01\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\0\t\titem_tags\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\0\0" } ;
pub const BREAD : Self = Self { id : 261 , registry_key : "minecraft:bread" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x03\tnutrition\n\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const BREEZE_ROD : Self = Self { id : 874 , registry_key : "minecraft:breeze_rod" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x16minecraft:display_name\x08\x05value\x14item.breeze_rod.name\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x03\x11creative_category\x08\x03\x06damage\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nbreeze_rod\0\0\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x03\ruse_animation\0\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x80\x01\x01\x0Eallow_off_hand\0\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\x01\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\0\0\0" } ;
pub const BREEZE_SPAWN_EGG: Self = Self {
id: 506,
registry_key: "minecraft:breeze_spawn_egg",
@ -68631,7 +68631,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BROWN_BUNDLE : Self = Self { id : 859 , registry_key : "minecraft:brown_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x0Emax_stack_size\x02\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x16bundle_brown_open_back\x08\x11bundle_open_front\x17bundle_brown_open_front\x08\x07default\x0Cbundle_brown\0\0\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x03\x06damage\0\x03\x0Bframe_count\x02\x03\x0Cuse_duration\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x01\x0Eshould_despawn\x01\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x01\x0Fstacked_by_data\0\x03\x11enchantable_value\0\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\0\0" } ;
pub const BROWN_BUNDLE : Self = Self { id : 859 , registry_key : "minecraft:brown_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x01\x04foil\0\x03\x0Bframe_count\x02\x03\x06damage\0\x01\x0Eliquid_clipped\0\x01\rhand_equipped\0\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x03\ruse_animation\0\x01\x17can_destroy_in_creative\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_brown\x08\x10bundle_open_back\x16bundle_brown_open_back\x08\x11bundle_open_front\x17bundle_brown_open_front\0\0\x05\x0Cmining_speed\0\0\x80?\x08\x10enchantable_slot\x04none\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\0\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x03\x11creative_category\x06\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0\0" } ;
pub const BROWN_CANDLE: Self = Self {
id: -425,
registry_key: "minecraft:brown_candle",
@ -68807,7 +68807,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const BUNDLE : Self = Self { id : 860 , registry_key : "minecraft:bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x03\ruse_animation\0\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x01\x0Eallow_off_hand\0\x03\x0Cuse_duration\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x05\x0Cmining_speed\0\0\x80?\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x11bundle_open_front\x08\x07default\x06bundle\x08\x10bundle_open_back\x10bundle_open_back\0\0\x01\x0Eshould_despawn\x01\x01\rhand_equipped\0\x03\x06damage\0\x08\x10enchantable_slot\x04none\x01\x12hidden_in_commands\x02\x01\x0Fstacked_by_data\0\x01\x04foil\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\0\0" } ;
pub const BUNDLE : Self = Self { id : 860 , registry_key : "minecraft:bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\x03\x11creative_category\x06\x01\x04foil\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x06bundle\x08\x11bundle_open_front\x11bundle_open_front\x08\x10bundle_open_back\x10bundle_open_back\0\0\x08\x10enchantable_slot\x04none\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\x03\x06damage\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const BURN_POTTERY_SHERD: Self = Self {
id: 675,
registry_key: "minecraft:burn_pottery_sherd",
@ -68871,7 +68871,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const CAMERA : Self = Self { id : 607 , registry_key : "minecraft:camera" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x08\x0Fminecraft:block\x10minecraft:camera\x03\x16minecraft:use_duration\xC0\x9A\x0C\n\x10minecraft:camera\x05\x17black_bars_screen_ratio\n\xD7\xA3=\x05\x13slide_away_duration\xCD\xCCL>\x05\x10picture_duration\0\0\x80?\x05\x14shutter_screen_ratio\0\0\0?\x05\x13black_bars_duration\xCD\xCCL>\x05\x10shutter_duration\xCD\xCCL>\0\0\0" } ;
pub const CAMERA : Self = Self { id : 607 , registry_key : "minecraft:camera" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x08\x0Fminecraft:block\x10minecraft:camera\n\x10minecraft:camera\x05\x17black_bars_screen_ratio\n\xD7\xA3=\x05\x10shutter_duration\xCD\xCCL>\x05\x14shutter_screen_ratio\0\0\0?\x05\x13slide_away_duration\xCD\xCCL>\x05\x10picture_duration\0\0\x80?\x05\x13black_bars_duration\xCD\xCCL>\0\x03\x16minecraft:use_duration\xC0\x9A\x0C\0\0" } ;
pub const CAMPFIRE: Self = Self {
id: 601,
registry_key: "minecraft:campfire",
@ -68900,7 +68900,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const CARROT : Self = Self { id : 279 , registry_key : "minecraft:carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x11minecraft:carrots\x08\rplant_at_face\x02up\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x06\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\0\0\0" } ;
pub const CARROT : Self = Self { id : 279 , registry_key : "minecraft:carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\x11using_converts_to\0\x03\tnutrition\x06\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\0\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x11minecraft:carrots\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const CARROT_ON_A_STICK: Self = Self {
id: 527,
registry_key: "minecraft:carrot_on_a_stick",
@ -69202,7 +69202,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const CHICKEN : Self = Self { id : 275 , registry_key : "minecraft:chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x04\x01\x0Ecan_always_eat\0\t\x07effects\n\x02\x03\tamplifier\0\x08\rdescriptionId\rpotion.hunger\x05\x06chance\x9A\x99\x99>\x08\x04name\x06hunger\x03\x08duration<\x03\x02id\"\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\rcooldown_time\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\0\0\0" } ;
pub const CHICKEN : Self = Self { id : 275 , registry_key : "minecraft:chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\x08\rcooldown_type\0\t\x07effects\n\x02\x05\x06chance\x9A\x99\x99>\x08\rdescriptionId\rpotion.hunger\x03\x08duration<\x03\tamplifier\0\x03\x02id\"\x08\x04name\x06hunger\0\x03\ron_use_action\x01\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const CHICKEN_SPAWN_EGG: Self = Self {
id: 439,
registry_key: "minecraft:chicken_spawn_egg",
@ -69322,7 +69322,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const CHORUS_FRUIT : Self = Self { id : 568 , registry_key : "minecraft:chorus_fruit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\x0Bchorusfruit\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\x01\x03\ron_use_action\0\x03\rcooldown_time(\x08\x11using_converts_to\0\x03\tnutrition\x08\0\0\0" } ;
pub const CHORUS_FRUIT : Self = Self { id : 568 , registry_key : "minecraft:chorus_fruit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x08\x03\rcooldown_time(\x01\x0Ecan_always_eat\x01\x08\rcooldown_type\x0Bchorusfruit\x03\ron_use_action\0\0\0\0" } ;
pub const CHORUS_PLANT: Self = Self {
id: 240,
registry_key: "minecraft:chorus_plant",
@ -69547,7 +69547,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const COD : Self = Self { id : 264 , registry_key : "minecraft:cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0\0" } ;
pub const COD : Self = Self { id : 264 , registry_key : "minecraft:cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\n\x0Eminecraft:food\x03\tnutrition\x04\x05\x13saturation_modifier\xCD\xCC\xCC=\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COD_BUCKET: Self = Self {
id: 367,
registry_key: "minecraft:cod_bucket",
@ -69674,14 +69674,14 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const COOKED_BEEF : Self = Self { id : 274 , registry_key : "minecraft:cooked_beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCCL?\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x10\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_CHICKEN : Self = Self { id : 276 , registry_key : "minecraft:cooked_chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\tnutrition\x0C\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0\0" } ;
pub const COOKED_COD : Self = Self { id : 268 , registry_key : "minecraft:cooked_cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\x03\tnutrition\n\x03\rcooldown_time\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_MUTTON : Self = Self { id : 561 , registry_key : "minecraft:cooked_mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x0C\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCCL?\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_PORKCHOP : Self = Self { id : 263 , registry_key : "minecraft:cooked_porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x03\tnutrition\x10\x03\rcooldown_time\0\x08\rcooldown_type\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCCL?\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_RABBIT : Self = Self { id : 289 , registry_key : "minecraft:cooked_rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\tnutrition\n\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\0\0\0" } ;
pub const COOKED_SALMON : Self = Self { id : 269 , registry_key : "minecraft:cooked_salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x0C\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCCL?\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKIE : Self = Self { id : 271 , registry_key : "minecraft:cookie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x03\tnutrition\x04\x08\rcooldown_type\0\x03\ron_use_action\x01\0\0\0" } ;
pub const COOKED_BEEF : Self = Self { id : 274 , registry_key : "minecraft:cooked_beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\xCD\xCCL?\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\tnutrition\x10\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_CHICKEN : Self = Self { id : 276 , registry_key : "minecraft:cooked_chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x19?\x03\rcooldown_time\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\tnutrition\x0C\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_COD : Self = Self { id : 268 , registry_key : "minecraft:cooked_cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\tnutrition\n\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_MUTTON : Self = Self { id : 561 , registry_key : "minecraft:cooked_mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x0C\x03\ron_use_action\x01\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\xCD\xCCL?\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_PORKCHOP : Self = Self { id : 263 , registry_key : "minecraft:cooked_porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x10\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\xCD\xCCL?\x08\x11using_converts_to\0\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKED_RABBIT : Self = Self { id : 289 , registry_key : "minecraft:cooked_rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\n\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\0\0\0" } ;
pub const COOKED_SALMON : Self = Self { id : 269 , registry_key : "minecraft:cooked_salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\tnutrition\x0C\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCCL?\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const COOKIE : Self = Self { id : 271 , registry_key : "minecraft:cookie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x05\x13saturation_modifier\xCD\xCC\xCC=\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x03\tnutrition\x04\x08\rcooldown_type\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const COPPER_AXE: Self = Self {
id: 750,
registry_key: "minecraft:copper_axe",
@ -69843,7 +69843,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const COPPER_SPEAR : Self = Self { id : 850 , registry_key : "minecraft:copper_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:copper_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04name\x16minecraft:copper_ingot\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\0\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x15item.copper_spear.use\x08\x0Bstart_using\x06always\0\n\x16minecraft:display_name\x08\x05value\x16item.copper_spear.name\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\n\x18minecraft:swing_duration\x05\x05value\x9A\x99Y?\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.copper_spear.attack_hit\x08\x0Battack_miss\x1Ditem.copper_spear.attack_miss\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x0Fdamage_modifier\0\0\0\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0@A\x02\x0Cmax_durationP\0\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xA5\0\0\x05\x11damage_multiplier\x85\xEBQ?\x02\x05delay\r\0\x05\rhitbox_margin\0\0\x80>\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\xFA\0\x05\tmin_speed\0\0\0\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\0\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\r\0\t\titem_tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\0\n\x12minecraft:cooldown\x08\x04type\x06attack\x08\x08category\x05spear\x05\x08duration\x9A\x99Y?\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xFC\x02\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x06damage\x04\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x0Bmelee_spear\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ccopper_spear\0\0\x01\x0Eallow_off_hand\0\x03\x11creative_category\x06\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\x1A\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\x01\x01\x04foil\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\0\0\0" } ;
pub const COPPER_SPEAR : Self = Self { id : 850 , registry_key : "minecraft:copper_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xFC\x02\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration\x9A\x99Y?\x08\x04type\x06attack\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x15item.copper_spear.use\x01\x0Femit_vibrations\0\x08\x0Bstart_using\x06always\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\x0Fdamage_modifier\0\0\0\0\x02\x05delay\r\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\xFA\0\0\x05\x11damage_multiplier\x85\xEBQ?\n\x13dismount_conditions\x02\x0Cmax_durationP\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0@A\0\x05\rhitbox_margin\0\0\x80>\n\x14knockback_conditions\x02\x0Cmax_duration\xA5\0\x05\tmin_speed33\xA3@\x05\x12min_relative_speed\0\0\0\0\0\0\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\x08\rrepair_amount)context.other->query.remaining_durability\t\x05items\n\x02\x08\x04name\x16minecraft:copper_spear\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:copper_ingot\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.copper_spear.attack_hit\x08\x0Battack_miss\x1Ditem.copper_spear.attack_miss\0\n\x15minecraft:enchantable\x01\x05value\r\x08\x04slot\x0Bmelee_spear\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\0\n\x18minecraft:swing_duration\x05\x05value\x9A\x99Y?\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x0Bmelee_spear\x01\x04foil\0\x03\x11enchantable_value\x1A\x03\x06damage\x04\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ccopper_spear\0\0\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x01\rhand_equipped\x01\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x03\x11creative_category\x06\x03\x0Emax_stack_size\x02\x03\x0Bframe_count\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\t\titem_tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\0\n\x16minecraft:display_name\x08\x05value\x16item.copper_spear.name\0\0\0" } ;
pub const COPPER_SWORD: Self = Self {
id: 747,
registry_key: "minecraft:copper_sword",
@ -70208,7 +70208,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const CYAN_BUNDLE : Self = Self { id : 861 , registry_key : "minecraft:cyan_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x03\x06damage\0\x03\ruse_animation\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x03\x0Cuse_duration\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_cyan_open_front\x08\x07default\x0Bbundle_cyan\x08\x10bundle_open_back\x15bundle_cyan_open_back\0\0\x01\x0Eshould_despawn\x01\x01\x04foil\0\x03\x11enchantable_value\0\x08\x10enchantable_slot\x04none\x03\x0Bframe_count\x02\x01\x0Eallow_off_hand\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0\0" } ;
pub const CYAN_BUNDLE : Self = Self { id : 861 , registry_key : "minecraft:cyan_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x03\x11enchantable_value\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bbundle_cyan\x08\x10bundle_open_back\x15bundle_cyan_open_back\x08\x11bundle_open_front\x16bundle_cyan_open_front\0\0\x03\x06damage\0\x03\x0Emax_stack_size\x02\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x03\x0Cuse_duration\0\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\x03\x0Bframe_count\x02\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const CYAN_CANDLE: Self = Self {
id: -422,
registry_key: "minecraft:cyan_candle",
@ -70930,7 +70930,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const DIAMOND_SPEAR : Self = Self { id : 851 , registry_key : "minecraft:diamond_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x17minecraft:diamond_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x11minecraft:diamond\0\0\0\n\x16minecraft:display_name\x08\x05value\x17item.diamond_spear.name\0\n\x15minecraft:enchantable\x01\x05value\n\x08\x04slot\x0Bmelee_spear\0\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x16item.diamond_spear.use\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x12hidden_in_commands\x02\x08\x10enchantable_slot\x0Bmelee_spear\x08\x0Ecreative_group\0\x03\x06damage\x08\x03\x0Bframe_count\x02\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rdiamond_spear\0\0\x03\x11enchantable_value\x14\x03\x0Emax_stack_size\x02\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x04foil\0\x01\rhand_equipped\x01\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\n\x18minecraft:swing_duration\x05\x05valueff\x86?\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xB0\x18\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x10minecraft:damage\x02\x05value\x04\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Eitem.diamond_spear.attack_miss\x08\nattack_hit\x1Ditem.diamond_spear.attack_hit\0\t\titem_tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08durationff\x86?\x08\x04type\x06attack\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\x11damage_multiplier\x9A\x99\x89?\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x11damage_conditions\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\xC8\0\x05\x12min_relative_speed33\x93@\0\x05\x0Fdamage_modifier\0\0\0\0\n\x14knockback_conditions\x02\x0Cmax_duration\x82\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x02\x05delay\n\0\n\x13dismount_conditions\x05\tmin_speed\0\0 A\x02\x0Cmax_duration<\0\x05\x12min_relative_speed\0\0\0\0\0\x05\rhitbox_margin\0\0\x80>\0\0\0\0" } ;
pub const DIAMOND_SPEAR : Self = Self { id : 851 , registry_key : "minecraft:diamond_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:swing_duration\x05\x05valueff\x86?\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x10minecraft:damage\x02\x05value\x04\0\0\t\titem_tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Ditem.diamond_spear.attack_hit\x08\x0Battack_miss\x1Eitem.diamond_spear.attack_miss\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\xB0\x18\0\n\x16minecraft:display_name\x08\x05value\x17item.diamond_spear.name\0\n\x0Eminecraft:tags\t\x04tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\0\n\x15minecraft:enchantable\x01\x05value\n\x08\x04slot\x0Bmelee_spear\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\n\x12minecraft:cooldown\x05\x08durationff\x86?\x08\x04type\x06attack\x08\x08category\x05spear\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x17minecraft:diamond_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x11minecraft:diamond\0\0\0\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x16item.diamond_spear.use\0\n\x0Fitem_properties\x01\x04foil\0\x03\x11enchantable_value\x14\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rdiamond_spear\0\0\x03\x06damage\x08\x03\x0Emax_stack_size\x02\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x08\x10enchantable_slot\x0Bmelee_spear\x03\x0Bframe_count\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x01\rhand_equipped\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\rhitbox_margin\0\0\x80>\x05\x0Fdamage_modifier\0\0\0\0\x02\x05delay\n\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x11damage_multiplier\x9A\x99\x89?\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\x82\0\x05\tmin_speed33\xA3@\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0 A\x02\x0Cmax_duration<\0\0\n\x11damage_conditions\x02\x0Cmax_duration\xC8\0\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\0\0\0\0" } ;
pub const DIAMOND_SWORD: Self = Self {
id: 318,
registry_key: "minecraft:diamond_sword",
@ -71085,7 +71085,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const DRIED_KELP : Self = Self { id : 270 , registry_key : "minecraft:dried_kelp" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration \0\0" } ;
pub const DRIED_KELP : Self = Self { id : 270 , registry_key : "minecraft:dried_kelp" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\0\x03\x16minecraft:use_duration \0\0" } ;
pub const DRIED_KELP_BLOCK: Self = Self {
id: -139,
registry_key: "minecraft:dried_kelp_block",
@ -72031,7 +72031,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const ENCHANTED_GOLDEN_APPLE : Self = Self { id : 259 , registry_key : "minecraft:enchanted_golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\x01\x0Eminecraft:foil\x01\n\x0Eminecraft:food\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\x01\x03\ron_use_action\x01\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99?\x08\x11using_converts_to\0\t\x07effects\n\x08\x05\x06chance\0\0\x80?\x03\x08duration<\x03\tamplifier\x02\x08\rdescriptionId\x13potion.regeneration\x03\x02id\x14\x08\x04name\x0Cregeneration\0\x03\x02id,\x03\x08duration\xF0\x01\x08\rdescriptionId\x11potion.absorption\x08\x04name\nabsorption\x05\x06chance\0\0\x80?\x03\tamplifier\x06\0\x03\x02id\x16\x03\x08duration\xD8\x04\x05\x06chance\0\0\x80?\x08\rdescriptionId\x11potion.resistance\x03\tamplifier\0\x08\x04name\nresistance\0\x03\tamplifier\0\x08\rdescriptionId\x15potion.fireResistance\x08\x04name\x0Ffire_resistance\x03\x02id\x18\x03\x08duration\xD8\x04\x05\x06chance\0\0\x80?\0\x03\tnutrition\x08\0\0\0" } ;
pub const ENCHANTED_GOLDEN_APPLE : Self = Self { id : 259 , registry_key : "minecraft:enchanted_golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x0Eminecraft:foil\x01\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99?\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x07effects\n\x08\x03\x02id\x14\x08\x04name\x0Cregeneration\x08\rdescriptionId\x13potion.regeneration\x03\tamplifier\x02\x05\x06chance\0\0\x80?\x03\x08duration<\0\x03\tamplifier\x06\x08\rdescriptionId\x11potion.absorption\x03\x02id,\x08\x04name\nabsorption\x03\x08duration\xF0\x01\x05\x06chance\0\0\x80?\0\x03\x08duration\xD8\x04\x03\x02id\x16\x03\tamplifier\0\x05\x06chance\0\0\x80?\x08\x04name\nresistance\x08\rdescriptionId\x11potion.resistance\0\x03\x02id\x18\x08\x04name\x0Ffire_resistance\x03\tamplifier\0\x05\x06chance\0\0\x80?\x03\x08duration\xD8\x04\x08\rdescriptionId\x15potion.fireResistance\0\x01\x0Ecan_always_eat\x01\x03\ron_use_action\x01\x03\tnutrition\x08\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0\0" } ;
pub const ENCHANTING_TABLE: Self = Self {
id: 116,
registry_key: "minecraft:enchanting_table",
@ -72606,7 +72606,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GLOW_BERRIES : Self = Self { id : 879 , registry_key : "minecraft:glow_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\0\n\x0Eminecraft:seed\x08\rplant_at_face\x04down\t\x08plant_at\x08\x04\ncave_vines\x1Ccave_vines_head_with_berries\x08\x0Bcrop_result\x14minecraft:cave_vines\x01\x1Aplant_at_any_solid_surface\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const GLOW_BERRIES : Self = Self { id : 879 , registry_key : "minecraft:glow_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\x01\x08\x0Bcrop_result\x14minecraft:cave_vines\t\x08plant_at\x08\x04\ncave_vines\x1Ccave_vines_head_with_berries\x08\rplant_at_face\x04down\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x03\tnutrition\x04\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const GLOW_FRAME: Self = Self {
id: 636,
registry_key: "minecraft:glow_frame",
@ -72705,7 +72705,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GOLDEN_APPLE : Self = Self { id : 258 , registry_key : "minecraft:golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\tnutrition\x08\t\x07effects\n\x04\x03\tamplifier\x02\x03\x02id\x14\x05\x06chance\0\0\x80?\x08\x04name\x0Cregeneration\x08\rdescriptionId\x13potion.regeneration\x03\x08duration\n\0\x05\x06chance\0\0\x80?\x08\x04name\nabsorption\x08\rdescriptionId\x11potion.absorption\x03\x02id,\x03\tamplifier\0\x03\x08duration\xF0\x01\0\x01\x0Ecan_always_eat\x01\x03\ron_use_action\x01\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99?\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const GOLDEN_APPLE : Self = Self { id : 258 , registry_key : "minecraft:golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x99?\x03\tnutrition\x08\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\x01\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x07effects\n\x04\x05\x06chance\0\0\x80?\x08\rdescriptionId\x13potion.regeneration\x03\x02id\x14\x03\tamplifier\x02\x08\x04name\x0Cregeneration\x03\x08duration\n\0\x08\rdescriptionId\x11potion.absorption\x03\tamplifier\0\x05\x06chance\0\0\x80?\x03\x02id,\x08\x04name\nabsorption\x03\x08duration\xF0\x01\0\x03\rcooldown_time\0\0\0\0" } ;
pub const GOLDEN_AXE: Self = Self {
id: 328,
registry_key: "minecraft:golden_axe",
@ -72720,7 +72720,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GOLDEN_CARROT : Self = Self { id : 283 , registry_key : "minecraft:golden_carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x0C\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99?\0\0\0" } ;
pub const GOLDEN_CARROT : Self = Self { id : 283 , registry_key : "minecraft:golden_carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99?\x08\x11using_converts_to\0\x03\tnutrition\x0C\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const GOLDEN_CHESTPLATE: Self = Self {
id: 355,
registry_key: "minecraft:golden_chestplate",
@ -72791,7 +72791,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GOLDEN_SPEAR : Self = Self { id : 852 , registry_key : "minecraft:golden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.golden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.golden_spear.attack_miss\0\n\x16minecraft:display_name\x08\x05value\x16item.golden_spear.name\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\x11damage_multiplier333?\x05\x0Fdamage_modifier\0\0\0\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\xAA\0\x05\tmin_speed33\xA3@\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\x13\x01\x05\tmin_speed\0\0\0\0\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x13dismount_conditions\x02\x0Cmax_durationF\0\x05\tmin_speed\0\0PA\x05\x12min_relative_speed\0\0\0\0\0\x02\x05delay\x0E\0\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability<\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ngold_spear\0\0\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x01\rhand_equipped\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x0Bmelee_spear\x03\x06damage\x02\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x08\x0Ecreative_group\0\x03\x11enchantable_value,\x01\x0Eshould_despawn\x01\x03\x11creative_category\x06\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\0\n\x15minecraft:enchantable\x01\x05value\x16\x08\x04slot\x0Bmelee_spear\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\x08\rrepair_amount)context.other->query.remaining_durability\t\x05items\n\x02\x08\x04name\x16minecraft:golden_spear\0\0\t\x05items\n\x02\x08\x04name\x14minecraft:gold_ingot\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\0\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x12minecraft:cooldown\x08\x04type\x06attack\x08\x08category\x05spear\x05\x08duration33s?\0\t\titem_tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x15item.golden_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\0\0" } ;
pub const GOLDEN_SPEAR : Self = Self { id : 852 , registry_key : "minecraft:golden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x14minecraft:durability\x03\x0Emax_durability<\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\0\n\x15minecraft:enchantable\x01\x05value\x16\x08\x04slot\x0Bmelee_spear\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x16minecraft:display_name\x08\x05value\x16item.golden_spear.name\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x03\x11enchantable_value,\x03\x0Emax_stack_size\x02\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ngold_spear\0\0\x03\x0Bframe_count\x02\x03\x11creative_category\x06\x05\x0Cmining_speed\0\0\x80?\x03\x06damage\x02\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x12hidden_in_commands\x02\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\x01\x04foil\0\x08\x10enchantable_slot\x0Bmelee_spear\x01\rhand_equipped\x01\x01\x0Eliquid_clipped\0\x01\x0Eallow_off_hand\0\0\n\x17minecraft:use_modifiers\x08\x0Bstart_sound\x15item.golden_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\0\t\titem_tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:golden_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x14minecraft:gold_ingot\0\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.golden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.golden_spear.attack_miss\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration33s?\x08\x04type\x06attack\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\x13\x01\x05\tmin_speed\0\0\0\0\0\x05\x11damage_multiplier333?\x02\x05delay\x0E\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x05\tmin_speed\0\0PA\x02\x0Cmax_durationF\0\x05\x12min_relative_speed\0\0\0\0\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x14knockback_conditions\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xAA\0\x05\x12min_relative_speed\0\0\0\0\0\x05\x0Fdamage_modifier\0\0\0\0\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\0\0" } ;
pub const GOLDEN_SWORD: Self = Self {
id: 325,
registry_key: "minecraft:golden_sword",
@ -72855,7 +72855,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GRAY_BUNDLE : Self = Self { id : 862 , registry_key : "minecraft:gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x03\x06damage\0\x01\x04foil\0\x01\rhand_equipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_gray_open_front\x08\x07default\x0Bbundle_gray\x08\x10bundle_open_back\x15bundle_gray_open_back\0\0\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x05\x0Cmining_speed\0\0\x80?\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0\0" } ;
pub const GRAY_BUNDLE : Self = Self { id : 862 , registry_key : "minecraft:gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x03\ruse_animation\0\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x05\x0Cmining_speed\0\0\x80?\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_gray_open_back\x08\x11bundle_open_front\x16bundle_gray_open_front\x08\x07default\x0Bbundle_gray\0\0\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x03\x06damage\0\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x03\x11creative_category\x06\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const GRAY_CANDLE: Self = Self {
id: -420,
registry_key: "minecraft:gray_candle",
@ -72954,7 +72954,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const GREEN_BUNDLE : Self = Self { id : 863 , registry_key : "minecraft:green_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_green\x08\x10bundle_open_back\x16bundle_green_open_back\x08\x11bundle_open_front\x17bundle_green_open_front\0\0\x08\x0Ecreative_group\0\x03\x11creative_category\x06\x03\x0Cuse_duration\0\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x03\x06damage\0\x03\ruse_animation\0\x01\rhand_equipped\0\x01\x04foil\0\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Emax_stack_size\x02\x03\x0Bframe_count\x02\x08\x10enchantable_slot\x04none\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0\0" } ;
pub const GREEN_BUNDLE : Self = Self { id : 863 , registry_key : "minecraft:green_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x01\rhand_equipped\0\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x16bundle_green_open_back\x08\x07default\x0Cbundle_green\x08\x11bundle_open_front\x17bundle_green_open_front\0\0\x08\x0Ecreative_group\0\x03\x0Cuse_duration\0\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\x01\x04foil\0\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x03\x0Bframe_count\x02\x03\x11enchantable_value\0\x03\x06damage\0\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const GREEN_CANDLE: Self = Self {
id: -426,
registry_key: "minecraft:green_candle",
@ -73417,7 +73417,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const HONEY_BOTTLE : Self = Self { id : 604 , registry_key : "minecraft:honey_bottle" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x18minecraft:max_stack_size \n\x0Eminecraft:food\x01\x0Ecan_always_eat\x01\x08\x11using_converts_to\x0Cglass_bottle\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x0C\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x0Eremove_effects\x03\x02&\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_durationP\0\0" } ;
pub const HONEY_BOTTLE : Self = Self { id : 604 , registry_key : "minecraft:honey_bottle" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x18minecraft:max_stack_size \x03\x16minecraft:use_durationP\n\x0Eminecraft:food\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x0Eremove_effects\x03\x02&\x03\rcooldown_time\0\x08\x11using_converts_to\x0Cglass_bottle\x08\rcooldown_type\0\x03\tnutrition\x0C\x03\ron_use_action\x01\x01\x0Ecan_always_eat\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0\0" } ;
pub const HONEYCOMB: Self = Self {
id: 603,
registry_key: "minecraft:honeycomb",
@ -73719,7 +73719,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const IRON_SPEAR : Self = Self { id : 853 , registry_key : "minecraft:iron_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\0\n\x15minecraft:enchantable\x01\x05value\x0E\x08\x04slot\x0Bmelee_spear\0\n\x0Fitem_properties\x03\x0Emax_stack_size\x02\x01\x0Fstacked_by_data\0\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\niron_spear\0\0\x03\x11creative_category\x06\x03\x06damage\x06\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\x08\x10enchantable_slot\x0Bmelee_spear\x05\x0Cmining_speed\0\0\x80?\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\x1C\x03\ruse_animation\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\rhand_equipped\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x14minecraft:iron_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x14minecraft:iron_ingot\0\0\0\t\titem_tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x13item.iron_spear.use\x05\x11movement_modifier\0\0\x80?\x05\x0Cuse_duration\0\xA0\x8CG\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\0\n\x12minecraft:cooldown\x05\x08duration33s?\x08\x04type\x06attack\x08\x08category\x05spear\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Aitem.iron_spear.attack_hit\x08\x0Battack_miss\x1Bitem.iron_spear.attack_miss\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\xF4\x03\0\n\x16minecraft:display_name\x08\x05value\x14item.iron_spear.name\0\n\x10minecraft:damage\x02\x05value\x03\0\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\x0Fdamage_modifier\0\0\0\0\x05\x11damage_multiplier33s?\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\x87\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x13dismount_conditions\x02\x0Cmax_duration2\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\x000A\0\x02\x05delay\x0C\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x11damage_conditions\x02\x0Cmax_duration\xE1\0\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\0\0\0\0\0" } ;
pub const IRON_SPEAR : Self = Self { id : 853 , registry_key : "minecraft:iron_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x10minecraft:damage\x02\x05value\x03\0\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x13dismount_conditions\x02\x0Cmax_duration2\0\x05\tmin_speed\0\x000A\x05\x12min_relative_speed\0\0\0\0\0\x02\x05delay\x0C\0\x05\rhitbox_margin\0\0\x80>\x05\x0Fdamage_modifier\0\0\0\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\x87\0\x05\tmin_speed33\xA3@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x11damage_multiplier33s?\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x11damage_conditions\x02\x0Cmax_duration\xE1\0\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\0\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Aitem.iron_spear.attack_hit\x08\x0Battack_miss\x1Bitem.iron_spear.attack_miss\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration33s?\x08\x04type\x06attack\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\niron_spear\0\0\x08\x0Ecreative_group\0\x01\x04foil\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x01\rhand_equipped\x01\x03\x0Emax_stack_size\x02\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\x1C\x08\x10enchantable_slot\x0Bmelee_spear\x01\x17can_destroy_in_creative\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x03\x06damage\x06\x03\x0Bframe_count\x02\0\n\x16minecraft:display_name\x08\x05value\x14item.iron_spear.name\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\x08\rrepair_amount)context.other->query.remaining_durability\t\x05items\n\x02\x08\x04name\x14minecraft:iron_spear\0\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x14minecraft:iron_ingot\0\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:durability\x03\x0Emax_durability\xF4\x03\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0E\0\t\titem_tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x13item.iron_spear.use\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\0\0" } ;
pub const IRON_SWORD: Self = Self {
id: 309,
registry_key: "minecraft:iron_sword",
@ -74301,7 +74301,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const LIGHT_BLUE_BUNDLE : Self = Self { id : 864 , registry_key : "minecraft:light_blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x05\x0Cmining_speed\0\0\x80?\x03\x0Emax_stack_size\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\x01\rhand_equipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11bundle_light_blue\x08\x10bundle_open_back\x1Bbundle_light_blue_open_back\x08\x11bundle_open_front\x1Cbundle_light_blue_open_front\0\0\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x01\x04foil\0\x08\x10enchantable_slot\x04none\x03\x11creative_category\x06\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x03\x06damage\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\0\0\0" } ;
pub const LIGHT_BLUE_BUNDLE : Self = Self { id : 864 , registry_key : "minecraft:light_blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x03\ruse_animation\0\x08\x10enchantable_slot\x04none\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x01\rhand_equipped\0\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x1Bbundle_light_blue_open_back\x08\x07default\x11bundle_light_blue\x08\x11bundle_open_front\x1Cbundle_light_blue_open_front\0\0\x03\x0Emax_stack_size\x02\x01\x0Fstacked_by_data\0\x03\x0Cuse_duration\0\x03\x0Bframe_count\x02\x03\x06damage\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\0\0\0" } ;
pub const LIGHT_BLUE_CANDLE: Self = Self {
id: -416,
registry_key: "minecraft:light_blue_candle",
@ -74400,7 +74400,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const LIGHT_GRAY_BUNDLE : Self = Self { id : 865 , registry_key : "minecraft:light_gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x03\x06damage\0\x03\x11enchantable_value\0\x03\x11creative_category\x06\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x1Bbundle_light_gray_open_back\x08\x11bundle_open_front\x1Cbundle_light_gray_open_front\x08\x07default\x11bundle_light_gray\0\0\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x01\x04foil\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const LIGHT_GRAY_BUNDLE : Self = Self { id : 865 , registry_key : "minecraft:light_gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x1Cbundle_light_gray_open_front\x08\x07default\x11bundle_light_gray\x08\x10bundle_open_back\x1Bbundle_light_gray_open_back\0\0\x03\x06damage\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x03\x0Bframe_count\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const LIGHT_GRAY_CANDLE: Self = Self {
id: -421,
registry_key: "minecraft:light_gray_candle",
@ -74520,7 +74520,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const LIME_BUNDLE : Self = Self { id : 866 , registry_key : "minecraft:lime_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x03\x06damage\0\x01\rhand_equipped\0\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x03\ruse_animation\0\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x03\x0Cuse_duration\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bbundle_lime\x08\x11bundle_open_front\x16bundle_lime_open_front\x08\x10bundle_open_back\x15bundle_lime_open_back\0\0\x01\x12hidden_in_commands\x02\x01\x0Fstacked_by_data\0\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const LIME_BUNDLE : Self = Self { id : 866 , registry_key : "minecraft:lime_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_lime_open_front\x08\x10bundle_open_back\x15bundle_lime_open_back\x08\x07default\x0Bbundle_lime\0\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\x03\x06damage\0\x03\x0Bframe_count\x02\x01\x04foil\0\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0\0" } ;
pub const LIME_CANDLE: Self = Self {
id: -418,
registry_key: "minecraft:lime_candle",
@ -74724,7 +74724,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const MAGENTA_BUNDLE : Self = Self { id : 867 , registry_key : "minecraft:magenta_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x01\x04foil\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x18bundle_magenta_open_back\x08\x07default\x0Ebundle_magenta\x08\x11bundle_open_front\x19bundle_magenta_open_front\0\0\x08\x10enchantable_slot\x04none\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x03\x11enchantable_value\0\x03\x06damage\0\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x08\x0Ecreative_group\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0\0" } ;
pub const MAGENTA_BUNDLE : Self = Self { id : 867 , registry_key : "minecraft:magenta_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\x01\x04foil\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x03\x06damage\0\x03\ruse_animation\0\x01\rhand_equipped\0\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ebundle_magenta\x08\x11bundle_open_front\x19bundle_magenta_open_front\x08\x10bundle_open_back\x18bundle_magenta_open_back\0\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Cuse_duration\0\x03\x0Emax_stack_size\x02\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\0\x01\x0Eshould_despawn\x01\x01\x12hidden_in_commands\x02\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const MAGENTA_CANDLE: Self = Self {
id: -415,
registry_key: "minecraft:magenta_candle",
@ -75026,8 +75026,8 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const MELON_SEEDS : Self = Self { id : 293 , registry_key : "minecraft:melon_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x14minecraft:melon_stem\0\0\0" } ;
pub const MELON_SLICE : Self = Self { id : 272 , registry_key : "minecraft:melon_slice" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x04\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\x08\rcooldown_type\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const MELON_SEEDS : Self = Self { id : 293 , registry_key : "minecraft:melon_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x14minecraft:melon_stem\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0\0" } ;
pub const MELON_SLICE : Self = Self { id : 272 , registry_key : "minecraft:melon_slice" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\tnutrition\x04\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const MELON_STEM: Self = Self {
id: 105,
registry_key: "minecraft:melon_stem",
@ -75245,7 +75245,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const MUSHROOM_STEW : Self = Self { id : 260 , registry_key : "minecraft:mushroom_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x03\ron_use_action\x01\x03\tnutrition\x0C\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\x04bowl\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\0\0\0" } ;
pub const MUSHROOM_STEW : Self = Self { id : 260 , registry_key : "minecraft:mushroom_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\x04bowl\x03\tnutrition\x0C\x05\x13saturation_modifier\x9A\x99\x19?\0\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const MUSIC_DISC_11: Self = Self {
id: 554,
registry_key: "minecraft:music_disc_11",
@ -75400,7 +75400,7 @@ impl BedrockItem {
component_based: true,
definition_components: b"\n\0\0",
};
pub const MUTTON : Self = Self { id : 560 , registry_key : "minecraft:mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\x03\rcooldown_time\0\0\0\0" } ;
pub const MUTTON : Self = Self { id : 560 , registry_key : "minecraft:mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const MYCELIUM: Self = Self {
id: 110,
registry_key: "minecraft:mycelium",
@ -75492,7 +75492,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const NETHER_WART : Self = Self { id : 294 , registry_key : "minecraft:nether_wart" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\x0Bcrop_result\x15minecraft:nether_wart\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\tsoul_sand\0\0\0" } ;
pub const NETHER_WART : Self = Self { id : 294 , registry_key : "minecraft:nether_wart" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\x0Bcrop_result\x15minecraft:nether_wart\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\tsoul_sand\x01\x1Aplant_at_any_solid_surface\0\0\0\0" } ;
pub const NETHER_WART_BLOCK: Self = Self {
id: 214,
registry_key: "minecraft:nether_wart_block",
@ -75598,7 +75598,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const NETHERITE_SPEAR : Self = Self { id : 854 , registry_key : "minecraft:netherite_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\n\x0Eminecraft:tags\t\x04tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\0\n\x12minecraft:cooldown\x05\x08duration33\x93?\x08\x08category\x05spear\x08\x04type\x06attack\0\n\x18minecraft:fire_resistant\x01\x05value\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:swing_duration\x05\x05value33\x93?\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x18item.netherite_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\0\n\x10minecraft:damage\x02\x05value\x05\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Fitem.netherite_spear.attack_hit\x08\x0Battack_miss item.netherite_spear.attack_miss\0\n\x0Fitem_properties\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\rhand_equipped\x01\x03\x11enchantable_value\x1E\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Fnetherite_spear\0\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x08\x10enchantable_slot\x0Bmelee_spear\x01\x0Eshould_despawn\x01\x03\x11creative_category\x06\x03\x0Bframe_count\x02\x03\ruse_animation\0\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x03\x06damage\n\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\0\n\x16minecraft:display_name\x08\x05value\x19item.netherite_spear.name\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\x08\rrepair_amount)context.other->query.remaining_durability\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_spear\0\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_ingot\0\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\xDC\x1F\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x02\x05delay\x08\0\n\x13dismount_conditions\x02\x0Cmax_duration2\0\x05\tmin_speed\0\0\x10A\x05\x12min_relative_speed\0\0\0\0\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_durationn\0\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\xAF\0\0\x05\x11damage_multiplier\x9A\x99\x99?\x05\rhitbox_margin\0\0\x80>\x05\x0Fdamage_modifier\0\0\0\0\0\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\0\0" } ;
pub const NETHERITE_SPEAR : Self = Self { id : 854 , registry_key : "minecraft:netherite_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:tags\t\x04tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x17minecraft:use_modifiers\x08\x0Bstart_sound\x18item.netherite_spear.use\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xDC\x1F\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0\x10A\x02\x0Cmax_duration2\0\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x02\x05delay\x08\0\n\x14knockback_conditions\x02\x0Cmax_durationn\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x11damage_conditions\x02\x0Cmax_duration\xAF\0\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\0\x05\x11damage_multiplier\x9A\x99\x99?\x05\x0Fdamage_modifier\0\0\0\0\0\0\n\x18minecraft:swing_duration\x05\x05value33\x93?\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss item.netherite_spear.attack_miss\x08\nattack_hit\x1Fitem.netherite_spear.attack_hit\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_ingot\0\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x03\x06damage\n\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x03\x11creative_category\x06\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Fnetherite_spear\0\0\x01\rhand_equipped\x01\x08\x10enchantable_slot\x0Bmelee_spear\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\x1E\x08\x0Ecreative_group\0\x01\x04foil\0\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\0\n\x16minecraft:display_name\x08\x05value\x19item.netherite_spear.name\0\n\x18minecraft:fire_resistant\x01\x05value\x01\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration33\x93?\x08\x04type\x06attack\0\n\x10minecraft:damage\x02\x05value\x05\0\0\t\titem_tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\n\x17minecraft:hand_equipped\x01\x05value\x01\0\0\0" } ;
pub const NETHERITE_SWORD: Self = Self {
id: 617,
registry_key: "minecraft:netherite_sword",
@ -75795,7 +75795,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const OMINOUS_TRIAL_KEY : Self = Self { id : 875 , registry_key : "minecraft:ominous_trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x16minecraft:display_name\x08\x05value\x1Bitem.ominous_trial_key.name\0\n\x0Fitem_properties\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x01\x0Fstacked_by_data\0\x03\x11creative_category\x08\x03\ruse_animation\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x03\x0Cuse_duration\0\x01\x04foil\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x03\x11enchantable_value\0\x01\x0Eshould_despawn\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11ominous_trial_key\0\0\x01\x12hidden_in_commands\x02\x03\x06damage\0\x03\x0Emax_stack_size\x80\x01\0\0\0" } ;
pub const OMINOUS_TRIAL_KEY : Self = Self { id : 875 , registry_key : "minecraft:ominous_trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11ominous_trial_key\0\0\x03\x11creative_category\x08\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x03\x06damage\0\x03\x0Bframe_count\x02\x01\rhand_equipped\0\x03\x0Emax_stack_size\x80\x01\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\x08\x0Ecreative_group\0\0\t\titem_tags\0\0\n\x16minecraft:display_name\x08\x05value\x1Bitem.ominous_trial_key.name\0\0\0" } ;
pub const OPEN_EYEBLOSSOM: Self = Self {
id: -1018,
registry_key: "minecraft:open_eyeblossom",
@ -75803,7 +75803,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const ORANGE_BUNDLE : Self = Self { id : 868 , registry_key : "minecraft:orange_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x08\x0Ecreative_group\0\x03\x11creative_category\x06\x01\x04foil\0\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_orange_open_back\x08\x11bundle_open_front\x18bundle_orange_open_front\x08\x07default\rbundle_orange\0\0\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x03\x06damage\0\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x01\x17can_destroy_in_creative\x01\x03\x0Cuse_duration\0\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0\0" } ;
pub const ORANGE_BUNDLE : Self = Self { id : 868 , registry_key : "minecraft:orange_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x03\x06damage\0\x03\x11enchantable_value\0\x03\x0Cuse_duration\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x01\rhand_equipped\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x03\x11creative_category\x06\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_orange_open_back\x08\x07default\rbundle_orange\x08\x11bundle_open_front\x18bundle_orange_open_front\0\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\0\0" } ;
pub const ORANGE_CANDLE: Self = Self {
id: -414,
registry_key: "minecraft:orange_candle",
@ -76336,7 +76336,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PINK_BUNDLE : Self = Self { id : 869 , registry_key : "minecraft:pink_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x03\x06damage\0\x03\x0Cuse_duration\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x03\x11creative_category\x06\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x01\x04foil\0\x08\x10enchantable_slot\x04none\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_pink_open_back\x08\x11bundle_open_front\x16bundle_pink_open_front\x08\x07default\x0Bbundle_pink\0\0\x05\x0Cmining_speed\0\0\x80?\0\0\0" } ;
pub const PINK_BUNDLE : Self = Self { id : 869 , registry_key : "minecraft:pink_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x01\x04foil\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x0Emax_stack_size\x02\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\x03\x0Bframe_count\x02\x03\x06damage\0\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_pink_open_back\x08\x11bundle_open_front\x16bundle_pink_open_front\x08\x07default\x0Bbundle_pink\0\0\x08\x10enchantable_slot\x04none\x01\x0Fstacked_by_data\0\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0\0" } ;
pub const PINK_CANDLE: Self = Self {
id: -419,
registry_key: "minecraft:pink_candle",
@ -76477,7 +76477,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PITCHER_POD : Self = Self { id : 297 , registry_key : "minecraft:pitcher_pod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x16minecraft:pitcher_crop\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0\0" } ;
pub const PITCHER_POD : Self = Self { id : 297 , registry_key : "minecraft:pitcher_pod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x16minecraft:pitcher_crop\x01\x1Aplant_at_any_solid_surface\0\0\0\0" } ;
pub const PLANKS: Self = Self {
id: 814,
registry_key: "minecraft:planks",
@ -76513,7 +76513,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const POISONOUS_POTATO : Self = Self { id : 282 , registry_key : "minecraft:poisonous_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x04\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x07effects\n\x02\x03\x02id&\x05\x06chance\x9A\x99\x19?\x03\x08duration\n\x08\x04name\x06poison\x03\tamplifier\0\x08\rdescriptionId\rpotion.poison\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const POISONOUS_POTATO : Self = Self { id : 282 , registry_key : "minecraft:poisonous_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x07effects\n\x02\x05\x06chance\x9A\x99\x19?\x03\tamplifier\0\x03\x08duration\n\x03\x02id&\x08\x04name\x06poison\x08\rdescriptionId\rpotion.poison\0\x03\tnutrition\x04\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const POLAR_BEAR_SPAWN_EGG: Self = Self {
id: 477,
registry_key: "minecraft:polar_bear_spawn_egg",
@ -76990,7 +76990,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PORKCHOP : Self = Self { id : 262 , registry_key : "minecraft:porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\x03\rcooldown_time\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x06\x08\rcooldown_type\0\x03\ron_use_action\x01\0\0\0" } ;
pub const PORKCHOP : Self = Self { id : 262 , registry_key : "minecraft:porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\x03\tnutrition\x06\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x08\x11using_converts_to\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\0\0\0" } ;
pub const PORTAL: Self = Self {
id: 90,
registry_key: "minecraft:portal",
@ -76998,7 +76998,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const POTATO : Self = Self { id : 280 , registry_key : "minecraft:potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x12minecraft:potatoes\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\0\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\tnutrition\x02\0\0\0" } ;
pub const POTATO : Self = Self { id : 280 , registry_key : "minecraft:potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x12minecraft:potatoes\x08\rplant_at_face\x02up\0\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\x08\x11using_converts_to\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const POTATOES: Self = Self {
id: 142,
registry_key: "minecraft:potatoes",
@ -77132,7 +77132,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PUFFERFISH : Self = Self { id : 267 , registry_key : "minecraft:pufferfish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x03\tnutrition\x02\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x07effects\n\x06\x03\tamplifier\x02\x05\x06chance\0\0\x80?\x08\rdescriptionId\rpotion.poison\x03\x02id&\x08\x04name\x06poison\x03\x08durationx\0\x05\x06chance\0\0\x80?\x08\rdescriptionId\x10potion.confusion\x03\x02id\x12\x03\tamplifier\0\x08\x04name\x06nausea\x03\x08duration\x1E\0\x03\x02id\"\x03\x08duration\x1E\x03\tamplifier\x04\x08\x04name\x06hunger\x08\rdescriptionId\rpotion.hunger\x05\x06chance\0\0\x80?\0\x05\x13saturation_modifier\xCD\xCC\xCC=\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const PUFFERFISH : Self = Self { id : 267 , registry_key : "minecraft:pufferfish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\t\x07effects\n\x06\x03\tamplifier\x02\x08\rdescriptionId\rpotion.poison\x03\x08durationx\x03\x02id&\x08\x04name\x06poison\x05\x06chance\0\0\x80?\0\x03\x08duration\x1E\x08\rdescriptionId\x10potion.confusion\x08\x04name\x06nausea\x05\x06chance\0\0\x80?\x03\tamplifier\0\x03\x02id\x12\0\x03\tamplifier\x04\x03\x08duration\x1E\x05\x06chance\0\0\x80?\x03\x02id\"\x08\x04name\x06hunger\x08\rdescriptionId\rpotion.hunger\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\0\x01\x19minecraft:stacked_by_data\x01\0\0" } ;
pub const PUFFERFISH_BUCKET: Self = Self {
id: 370,
registry_key: "minecraft:pufferfish_bucket",
@ -77154,8 +77154,8 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PUMPKIN_PIE : Self = Self { id : 284 , registry_key : "minecraft:pumpkin_pie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\tnutrition\x10\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\0\0\0" } ;
pub const PUMPKIN_SEEDS : Self = Self { id : 292 , registry_key : "minecraft:pumpkin_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\x0Bcrop_result\x16minecraft:pumpkin_stem\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\0\0\0" } ;
pub const PUMPKIN_PIE : Self = Self { id : 284 , registry_key : "minecraft:pumpkin_pie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x10\x03\ron_use_action\x01\x08\x11using_converts_to\0\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\0\0\0" } ;
pub const PUMPKIN_SEEDS : Self = Self { id : 292 , registry_key : "minecraft:pumpkin_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x16minecraft:pumpkin_stem\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0\0" } ;
pub const PUMPKIN_STEM: Self = Self {
id: 104,
registry_key: "minecraft:pumpkin_stem",
@ -77163,7 +77163,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const PURPLE_BUNDLE : Self = Self { id : 870 , registry_key : "minecraft:purple_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\x05\x0Cmining_speed\0\0\x80?\x01\x12hidden_in_commands\x02\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x18bundle_purple_open_front\x08\x07default\rbundle_purple\x08\x10bundle_open_back\x17bundle_purple_open_back\0\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x03\x06damage\0\x03\x11enchantable_value\0\x01\x0Eshould_despawn\x01\x08\x0Ecreative_group\0\x03\x11creative_category\x06\x01\rhand_equipped\0\x01\x0Fstacked_by_data\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0\0" } ;
pub const PURPLE_BUNDLE : Self = Self { id : 870 , registry_key : "minecraft:purple_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\0\n\x0Fitem_properties\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x03\x06damage\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_purple_open_back\x08\x11bundle_open_front\x18bundle_purple_open_front\x08\x07default\rbundle_purple\0\0\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\x01\x04foil\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x08\x10enchantable_slot\x04none\x01\x0Eallow_off_hand\0\x03\x0Bframe_count\x02\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const PURPLE_CANDLE: Self = Self {
id: -423,
registry_key: "minecraft:purple_candle",
@ -77353,7 +77353,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const RABBIT : Self = Self { id : 288 , registry_key : "minecraft:rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x03\tnutrition\x06\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const RABBIT : Self = Self { id : 288 , registry_key : "minecraft:rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\rcooldown_type\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\x03\tnutrition\x06\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const RABBIT_FOOT: Self = Self {
id: 538,
registry_key: "minecraft:rabbit_foot",
@ -77375,7 +77375,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const RABBIT_STEW : Self = Self { id : 290 , registry_key : "minecraft:rabbit_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x14\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x03\ron_use_action\x01\x08\x11using_converts_to\x04bowl\0\x03\x16minecraft:use_duration@\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const RABBIT_STEW : Self = Self { id : 290 , registry_key : "minecraft:rabbit_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x14\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x08\x11using_converts_to\x04bowl\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const RAIL: Self = Self {
id: 66,
registry_key: "minecraft:rail",
@ -77453,7 +77453,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const RED_BUNDLE : Self = Self { id : 871 , registry_key : "minecraft:red_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x14bundle_red_open_back\x08\x11bundle_open_front\x15bundle_red_open_front\x08\x07default\nbundle_red\0\0\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x03\x11creative_category\x06\x03\x0Bframe_count\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\x01\x0Eliquid_clipped\0\x03\x06damage\0\x01\x0Fstacked_by_data\0\x05\x0Cmining_speed\0\0\x80?\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const RED_BUNDLE : Self = Self { id : 871 , registry_key : "minecraft:red_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nbundle_red\x08\x11bundle_open_front\x15bundle_red_open_front\x08\x10bundle_open_back\x14bundle_red_open_back\0\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x01\x04foil\0\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x03\x0Bframe_count\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eliquid_clipped\0\x03\x06damage\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\0\0" } ;
pub const RED_CANDLE: Self = Self {
id: -427,
registry_key: "minecraft:red_candle",
@ -77811,7 +77811,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const ROTTEN_FLESH : Self = Self { id : 277 , registry_key : "minecraft:rotten_flesh" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x08\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x07effects\n\x02\x08\x04name\x06hunger\x05\x06chance\xCD\xCCL?\x03\x08duration<\x03\x02id\"\x03\tamplifier\0\x08\rdescriptionId\rpotion.hunger\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\0\x03\rcooldown_time\0\0\0\0" } ;
pub const ROTTEN_FLESH : Self = Self { id : 277 , registry_key : "minecraft:rotten_flesh" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\t\x07effects\n\x02\x05\x06chance\xCD\xCCL?\x03\x02id\"\x03\x08duration<\x08\rdescriptionId\rpotion.hunger\x08\x04name\x06hunger\x03\tamplifier\0\0\x03\rcooldown_time\0\x03\tnutrition\x08\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\rcooldown_type\0\0\0\0" } ;
pub const SADDLE: Self = Self {
id: 374,
registry_key: "minecraft:saddle",
@ -77819,7 +77819,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const SALMON : Self = Self { id : 265 , registry_key : "minecraft:salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x08\x11using_converts_to\0\0\0\0" } ;
pub const SALMON : Self = Self { id : 265 , registry_key : "minecraft:salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\x11using_converts_to\0\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCC\xCC=\0\0\0" } ;
pub const SALMON_BUCKET: Self = Self {
id: 368,
registry_key: "minecraft:salmon_bucket",
@ -78380,7 +78380,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const SPIDER_EYE : Self = Self { id : 278 , registry_key : "minecraft:spider_eye" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\t\x07effects\n\x02\x03\tamplifier\0\x03\x08duration\n\x03\x02id&\x08\rdescriptionId\rpotion.poison\x08\x04name\x06poison\x05\x06chance\0\0\x80?\0\x05\x13saturation_modifier\xCD\xCCL?\x01\x0Ecan_always_eat\0\x03\tnutrition\x04\x08\x11using_converts_to\0\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const SPIDER_EYE : Self = Self { id : 278 , registry_key : "minecraft:spider_eye" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\xCD\xCCL?\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x04\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\ron_use_action\x01\t\x07effects\n\x02\x08\x04name\x06poison\x05\x06chance\0\0\x80?\x03\tamplifier\0\x08\rdescriptionId\rpotion.poison\x03\x08duration\n\x03\x02id&\0\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const SPIDER_SPAWN_EGG: Self = Self {
id: 450,
registry_key: "minecraft:spider_spawn_egg",
@ -78745,7 +78745,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const STONE_SPEAR : Self = Self { id : 855 , registry_key : "minecraft:stone_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x16minecraft:display_name\x08\x05value\x15item.stone_spear.name\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x08\x04type\x06attack\x05\x08duration\0\0@?\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\x13\x01\x05\tmin_speed\0\0\0\0\0\x05\x0Fdamage_modifier\0\0\0\0\x05\rhitbox_margin\0\0\x80>\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xB4\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_durationZ\0\x05\tmin_speed\0\0PA\0\x02\x05delay\x0E\0\x05\x11damage_multiplier\x85\xEBQ?\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\t\titem_tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\x84\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x15minecraft:stone_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04tags,q.all_tags('minecraft:stone_tool_materials')\0\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x18minecraft:swing_duration\x05\x05value\0\0@?\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Bitem.stone_spear.attack_hit\x08\x0Battack_miss\x1Citem.stone_spear.attack_miss\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x05\0\n\x0Fitem_properties\x03\x11enchantable_value\n\x01\x04foil\0\x03\x0Bframe_count\x02\x08\x10enchantable_slot\x0Bmelee_spear\x01\rhand_equipped\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eshould_despawn\x01\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x01\x0Eliquid_clipped\0\x03\x06damage\x04\x03\x11creative_category\x06\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bstone_spear\0\0\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x14item.stone_spear.use\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\0\0\0" } ;
pub const STONE_SPEAR : Self = Self { id : 855 , registry_key : "minecraft:stone_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Citem.stone_spear.attack_miss\x08\nattack_hit\x1Bitem.stone_spear.attack_hit\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration\0\0@?\x08\x04type\x06attack\0\n\x16minecraft:display_name\x08\x05value\x15item.stone_spear.name\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:swing_duration\x05\x05value\0\0@?\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\0\t\titem_tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x14knockback_conditions\x02\x0Cmax_duration\xB4\0\x05\tmin_speed33\xA3@\x05\x12min_relative_speed\0\0\0\0\0\x02\x05delay\x0E\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x0Fdamage_modifier\0\0\0\0\x05\x11damage_multiplier\x85\xEBQ?\n\x13dismount_conditions\x02\x0Cmax_durationZ\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0PA\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\x13\x01\x05\tmin_speed\0\0\0\0\0\0\0\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x14item.stone_spear.use\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\n\x03\x0Emax_stack_size\x02\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bstone_spear\0\0\x03\x11creative_category\x06\x01\x04foil\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\rhand_equipped\x01\x03\x06damage\x04\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x0Bmelee_spear\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\0\n\x15minecraft:enchantable\x01\x05value\x05\x08\x04slot\x0Bmelee_spear\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x15minecraft:stone_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04tags,q.all_tags('minecraft:stone_tool_materials')\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\x84\x02\0\0\0" } ;
pub const STONE_STAIRS: Self = Self {
id: 67,
registry_key: "minecraft:stone_stairs",
@ -79124,8 +79124,8 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const SUSPICIOUS_STEW : Self = Self { id : 602 , registry_key : "minecraft:suspicious_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x0C\x08\x11using_converts_to\x04bowl\x08\rcooldown_type\0\x03\ron_use_action\x02\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\x01\0\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const SWEET_BERRIES : Self = Self { id : 287 , registry_key : "minecraft:sweet_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\0\n\x0Eminecraft:seed\x08\x0Bcrop_result\x1Aminecraft:sweet_berry_bush\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x14\x08farmland\x05grass\x04dirt\x0Bcoarse_dirt\x06podzol\nmoss_block\x08mycelium\x03mud\x14muddy_mangrove_roots\x0Fdirt_with_roots\x08\rplant_at_face\x02up\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const SUSPICIOUS_STEW : Self = Self { id : 602 , registry_key : "minecraft:suspicious_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\tnutrition\x0C\x01\x0Ecan_always_eat\x01\x08\x11using_converts_to\x04bowl\x05\x13saturation_modifier\x9A\x99\x19?\x03\ron_use_action\x02\0\x03\x18minecraft:max_stack_size\x02\0\0" } ;
pub const SWEET_BERRIES : Self = Self { id : 287 , registry_key : "minecraft:sweet_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x14\x08farmland\x05grass\x04dirt\x0Bcoarse_dirt\x06podzol\nmoss_block\x08mycelium\x03mud\x14muddy_mangrove_roots\x0Fdirt_with_roots\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x1Aminecraft:sweet_berry_bush\x08\rplant_at_face\x02up\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x03\tnutrition\x04\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const SWEET_BERRY_BUSH: Self = Self {
id: -207,
registry_key: "minecraft:sweet_berry_bush",
@ -79224,7 +79224,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const TORCHFLOWER_SEEDS : Self = Self { id : 296 , registry_key : "minecraft:torchflower_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\x0Bcrop_result\x1Aminecraft:torchflower_crop\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\0\0\0" } ;
pub const TORCHFLOWER_SEEDS : Self = Self { id : 296 , registry_key : "minecraft:torchflower_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x1Aminecraft:torchflower_crop\0\0\0" } ;
pub const TOTEM_OF_UNDYING: Self = Self {
id: 578,
registry_key: "minecraft:totem_of_undying",
@ -79253,7 +79253,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const TRIAL_KEY : Self = Self { id : 876 , registry_key : "minecraft:trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x03\x0Cuse_duration\0\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ttrial_key\0\0\x03\x0Bframe_count\x02\x01\x0Eallow_off_hand\0\x01\x04foil\0\x03\ruse_animation\0\x01\x0Eshould_despawn\x01\x03\x0Emax_stack_size\x80\x01\x03\x11creative_category\x08\x08\x0Ecreative_group\0\x03\x06damage\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x05\x0Cmining_speed\0\0\x80?\0\n\x16minecraft:display_name\x08\x05value\x13item.trial_key.name\0\t\titem_tags\0\0\0\0" } ;
pub const TRIAL_KEY : Self = Self { id : 876 , registry_key : "minecraft:trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x01\rhand_equipped\0\x03\x0Cuse_duration\0\x03\x0Emax_stack_size\x80\x01\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ttrial_key\0\0\x03\x11creative_category\x08\x01\x12hidden_in_commands\x02\x01\x0Fstacked_by_data\0\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x03\x06damage\0\0\n\x16minecraft:display_name\x08\x05value\x13item.trial_key.name\0\t\titem_tags\0\0\0\0" } ;
pub const TRIAL_SPAWNER: Self = Self {
id: -315,
registry_key: "minecraft:trial_spawner",
@ -79282,7 +79282,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const TROPICAL_FISH : Self = Self { id : 266 , registry_key : "minecraft:tropical_fish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:food\x03\tnutrition\x02\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0\0" } ;
pub const TROPICAL_FISH : Self = Self { id : 266 , registry_key : "minecraft:tropical_fish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\x01\x19minecraft:stacked_by_data\x01\n\x0Eminecraft:food\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x02\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0\0" } ;
pub const TROPICAL_FISH_BUCKET: Self = Self {
id: 369,
registry_key: "minecraft:tropical_fish_bucket",
@ -80333,8 +80333,8 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const WHEAT_SEEDS : Self = Self { id : 291 , registry_key : "minecraft:wheat_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x0Fminecraft:wheat\0\0\0" } ;
pub const WHITE_BUNDLE : Self = Self { id : 872 , registry_key : "minecraft:white_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x17bundle_white_open_front\x08\x10bundle_open_back\x16bundle_white_open_back\x08\x07default\x0Cbundle_white\0\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x06damage\0\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x03\x11creative_category\x06\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x03\x11enchantable_value\0\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0\0" } ;
pub const WHEAT_SEEDS : Self = Self { id : 291 , registry_key : "minecraft:wheat_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\ncomponents\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x0Fminecraft:wheat\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\0\0\0" } ;
pub const WHITE_BUNDLE : Self = Self { id : 872 , registry_key : "minecraft:white_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\0\x03\x11enchantable_value\0\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_white\x08\x11bundle_open_front\x17bundle_white_open_front\x08\x10bundle_open_back\x16bundle_white_open_back\0\0\x01\x04foil\0\x03\x0Cuse_duration\0\x03\x0Emax_stack_size\x02\x03\x06damage\0\x01\x0Eshould_despawn\x01\x01\x12hidden_in_commands\x02\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\0\0" } ;
pub const WHITE_CANDLE: Self = Self {
id: -413,
registry_key: "minecraft:white_candle",
@ -80454,7 +80454,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const WIND_CHARGE : Self = Self { id : 877 , registry_key : "minecraft:wind_charge" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x16minecraft:display_name\x08\x05value\x15item.wind_charge.name\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x03\x06damage\0\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x80\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bwind_charge\0\0\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x03\x0Cuse_duration\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\x01\x12hidden_in_commands\x02\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x01\x04foil\0\0\n\x12minecraft:cooldown\x08\x08category\x0Bwind_charge\x05\x08duration\0\0\0?\x08\x04type\x03use\0\n\x14minecraft:projectile\x05\x16minimum_critical_power\0\0\0\0\x08\x11projectile_entity\"minecraft:wind_charge_projectile<>\0\n\x13minecraft:throwable\x01\x1Cscale_power_by_draw_duration\0\x01\x12do_swing_animation\x01\x05\x12launch_power_scale\0\0\xC0?\x05\x11min_draw_duration\0\0\0\0\x05\x11max_draw_duration\0\0\0\0\x05\x10max_launch_power\0\0\xC0?\0\0\0" } ;
pub const WIND_CHARGE : Self = Self { id : 877 , registry_key : "minecraft:wind_charge" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\t\titem_tags\0\0\n\x13minecraft:throwable\x05\x12launch_power_scale\0\0\xC0?\x01\x12do_swing_animation\x01\x05\x11max_draw_duration\0\0\0\0\x05\x10max_launch_power\0\0\xC0?\x05\x11min_draw_duration\0\0\0\0\x01\x1Cscale_power_by_draw_duration\0\0\n\x14minecraft:projectile\x08\x11projectile_entity\"minecraft:wind_charge_projectile<>\x05\x16minimum_critical_power\0\0\0\0\0\n\x16minecraft:display_name\x08\x05value\x15item.wind_charge.name\0\n\x12minecraft:cooldown\x08\x04type\x03use\x08\x08category\x0Bwind_charge\x05\x08duration\0\0\0?\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x03\x11creative_category\x06\x03\x0Emax_stack_size\x80\x01\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x08\x0Ecreative_group\0\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x03\x06damage\0\x01\x04foil\0\x03\ruse_animation\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bwind_charge\0\0\x01\rhand_equipped\0\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\0\0\0" } ;
pub const WITCH_SPAWN_EGG: Self = Self {
id: 456,
registry_key: "minecraft:witch_spawn_egg",
@ -80567,7 +80567,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const WOODEN_SPEAR : Self = Self { id : 856 , registry_key : "minecraft:wooden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x12minecraft:cooldown\x08\x04type\x06attack\x08\x08category\x05spear\x05\x08durationff&?\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x15item.wooden_spear.use\0\n\x0Eminecraft:fuel\x05\x08duration\0\0 A\0\t\titem_tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\n\x18minecraft:swing_duration\x05\x05valueff&?\0\n\x0Fitem_properties\x05\x0Cmining_speed\0\0\x80?\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x08\x10enchantable_slot\x0Bmelee_spear\x03\x11creative_category\x06\x03\x0Emax_stack_size\x02\x01\rhand_equipped\x01\x08\x0Ecreative_group\0\x03\x06damage\x02\x03\x11enchantable_value\x1E\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nwood_spear\0\0\x01\x04foil\0\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x16minecraft:display_name\x08\x05value\x16item.wooden_spear.name\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:wooden_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\t\x05items\n\x02\x08\x04tags\x1Eq.all_tags('minecraft:planks')\0\0\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durabilityx\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\x11damage_multiplier333?\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\xC8\0\x05\tmin_speed33\xA3@\0\x02\x05delay\x0F\0\n\x13dismount_conditions\x05\tmin_speed\0\0`A\x02\x0Cmax_durationd\0\x05\x12min_relative_speed\0\0\0\0\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration,\x01\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x0Fdamage_modifier\0\0\0\0\0\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Ditem.wooden_spear.attack_miss\x08\nattack_hit\x1Citem.wooden_spear.attack_hit\0\0\0" } ;
pub const WOODEN_SPEAR : Self = Self { id : 856 , registry_key : "minecraft:wooden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x15minecraft:enchantable\x01\x05value\x0F\x08\x04slot\x0Bmelee_spear\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:wooden_spear\0\x08\rrepair_amount)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04tags\x1Eq.all_tags('minecraft:planks')\0\x08\rrepair_amount\x1Bquery.max_durability * 0.25\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.wooden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.wooden_spear.attack_miss\0\n\x16minecraft:display_name\x08\x05value\x16item.wooden_spear.name\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x08\x04type\x06attack\x05\x08durationff&?\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x02\x05delay\x0F\0\x05\x0Fdamage_modifier\0\0\0\0\x05\x11damage_multiplier333?\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x14knockback_conditions\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xC8\0\x05\x12min_relative_speed\0\0\0\0\0\x05\rhitbox_margin\0\0\x80>\n\x13dismount_conditions\x05\tmin_speed\0\0`A\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_durationd\0\0\n\x11damage_conditions\x02\x0Cmax_duration,\x01\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\0\t\titem_tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x0Eminecraft:fuel\x05\x08duration\0\0 A\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x15item.wooden_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durabilityx\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\0\n\x0Fitem_properties\x01\x12hidden_in_commands\x02\x03\x06damage\x02\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Eliquid_clipped\0\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x01\x04foil\0\x03\ruse_animation\0\x08\x10enchantable_slot\x0Bmelee_spear\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x03\x11enchantable_value\x1E\x01\rhand_equipped\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nwood_spear\0\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\0\n\x18minecraft:swing_duration\x05\x05valueff&?\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\0\0\0" } ;
pub const WOODEN_SWORD: Self = Self {
id: 310,
registry_key: "minecraft:wooden_sword",
@ -80596,7 +80596,7 @@ impl BedrockItem {
component_based: false,
definition_components: b"\n\0\0",
};
pub const YELLOW_BUNDLE : Self = Self { id : 873 , registry_key : "minecraft:yellow_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x03\x0Cuse_duration\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\x0Fstacked_by_data\0\x03\x11enchantable_value\0\x03\x0Bframe_count\x02\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_yellow_open_back\x08\x11bundle_open_front\x18bundle_yellow_open_front\x08\x07default\rbundle_yellow\0\0\x03\x06damage\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\x01\x0Eallow_off_hand\0\0\t\titem_tags\0\0\0\0" } ;
pub const YELLOW_BUNDLE : Self = Self { id : 873 , registry_key : "minecraft:yellow_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\ncomponents\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x03\ruse_animation\0\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x01\x0Fstacked_by_data\0\x01\x0Eallow_off_hand\0\x03\x06damage\0\x03\x0Bframe_count\x02\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rbundle_yellow\x08\x11bundle_open_front\x18bundle_yellow_open_front\x08\x10bundle_open_back\x17bundle_yellow_open_back\0\0\x08\x10enchantable_slot\x04none\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\0\0\0" } ;
pub const YELLOW_CANDLE: Self = Self {
id: -417,
registry_key: "minecraft:yellow_candle",

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,44 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::DEBUG_BLOCK_VALUE;
use pumpkin_macros::java_packet;
use pumpkin_util::{math::position::BlockPos, version::JavaMinecraftVersion};
#[java_packet(DEBUG_BLOCK_VALUE)]
pub struct CDebugBlockValue<'a> {
pub pos: BlockPos,
pub name: &'a str,
pub value: &'a str,
}
impl<'a> CDebugBlockValue<'a> {
#[must_use]
pub const fn new(pos: BlockPos, name: &'a str, value: &'a str) -> Self {
Self { pos, name, value }
}
}
impl ClientPacket for CDebugBlockValue<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_block_pos(&self.pos, version)?;
write.write_string(self.name)?;
write.write_string(self.value)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CDebugBlockValue<'a> {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
pos: bytebuf.get_block_pos(version)?,
name: bytebuf.get_str_borrowed()?,
value: bytebuf.get_str_borrowed()?,
})
}
}

View File

@ -0,0 +1,49 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::DEBUG_CHUNK_VALUE;
use pumpkin_macros::java_packet;
use pumpkin_util::{math::vector2::Vector2, version::JavaMinecraftVersion};
#[java_packet(DEBUG_CHUNK_VALUE)]
pub struct CDebugChunkValue<'a> {
pub chunk_pos: Vector2<i32>,
pub name: &'a str,
pub value: &'a str,
}
impl<'a> CDebugChunkValue<'a> {
#[must_use]
pub const fn new(chunk_pos: Vector2<i32>, name: &'a str, value: &'a str) -> Self {
Self {
chunk_pos,
name,
value,
}
}
}
impl ClientPacket for CDebugChunkValue<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_i32_be(self.chunk_pos.x)?;
write.write_i32_be(self.chunk_pos.y)?;
write.write_string(self.name)?;
write.write_string(self.value)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CDebugChunkValue<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
chunk_pos: Vector2::new(bytebuf.get_i32_be()?, bytebuf.get_i32_be()?),
name: bytebuf.get_str_borrowed()?,
value: bytebuf.get_str_borrowed()?,
})
}
}

View File

@ -0,0 +1,48 @@
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::DEBUG_ENTITY_VALUE;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(DEBUG_ENTITY_VALUE)]
pub struct CDebugEntityValue<'a> {
pub entity_id: VarInt,
pub name: &'a str,
pub value: &'a str,
}
impl<'a> CDebugEntityValue<'a> {
#[must_use]
pub const fn new(entity_id: VarInt, name: &'a str, value: &'a str) -> Self {
Self {
entity_id,
name,
value,
}
}
}
impl ClientPacket for CDebugEntityValue<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_var_int(&self.entity_id)?;
write.write_string(self.name)?;
write.write_string(self.value)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CDebugEntityValue<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
entity_id: bytebuf.get_var_int()?,
name: bytebuf.get_str_borrowed()?,
value: bytebuf.get_str_borrowed()?,
})
}
}

View File

@ -0,0 +1,40 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::DEBUG_EVENT;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(DEBUG_EVENT)]
pub struct CDebugEvent<'a> {
pub name: &'a str,
pub data: &'a [u8],
}
impl<'a> CDebugEvent<'a> {
#[must_use]
pub const fn new(name: &'a str, data: &'a [u8]) -> Self {
Self { name, data }
}
}
impl ClientPacket for CDebugEvent<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_string(self.name)?;
write.write_slice(self.data)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CDebugEvent<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
let name = bytebuf.get_str_borrowed()?;
let data = bytebuf.read_remaining_slice_borrowed(usize::MAX)?;
Ok(Self { name, data })
}
}

View File

@ -0,0 +1,52 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::GAME_TEST_HIGHLIGHT_POS;
use pumpkin_macros::java_packet;
use pumpkin_util::{math::position::BlockPos, version::JavaMinecraftVersion};
#[java_packet(GAME_TEST_HIGHLIGHT_POS)]
pub struct CGameTestHighlightPos<'a> {
pub pos: BlockPos,
pub color: i32,
pub label: &'a str,
pub duration_ms: i32,
}
impl<'a> CGameTestHighlightPos<'a> {
#[must_use]
pub const fn new(pos: BlockPos, color: i32, label: &'a str, duration_ms: i32) -> Self {
Self {
pos,
color,
label,
duration_ms,
}
}
}
impl ClientPacket for CGameTestHighlightPos<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_block_pos(&self.pos, version)?;
write.write_i32_be(self.color)?;
write.write_string(self.label)?;
write.write_i32_be(self.duration_ms)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CGameTestHighlightPos<'a> {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
pos: bytebuf.get_block_pos(version)?,
color: bytebuf.get_i32_be()?,
label: bytebuf.get_str_borrowed()?,
duration_ms: bytebuf.get_i32_be()?,
})
}
}

View File

@ -293,3 +293,36 @@ pub use tag_query::*;
mod update_tags;
pub use update_tags::*;
mod set_chunk_cache_radius;
pub use set_chunk_cache_radius::*;
mod set_simulation_distance;
pub use set_simulation_distance::*;
mod move_vehicle;
pub use move_vehicle::*;
mod recipe_book_remove;
pub use recipe_book_remove::*;
mod update_recipes;
pub use update_recipes::*;
mod debug_block_value;
pub use debug_block_value::*;
mod debug_chunk_value;
pub use debug_chunk_value::*;
mod debug_entity_value;
pub use debug_entity_value::*;
mod debug_event;
pub use debug_event::*;
mod game_test_highlight_pos;
pub use game_test_highlight_pos::*;
mod test_instance_block_status;
pub use test_instance_block_status::*;

View File

@ -0,0 +1,56 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::MOVE_VEHICLE;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(MOVE_VEHICLE)]
pub struct CMoveVehicle {
pub x: f64,
pub y: f64,
pub z: f64,
pub yaw: f32,
pub pitch: f32,
}
impl CMoveVehicle {
#[must_use]
pub const fn new(x: f64, y: f64, z: f64, yaw: f32, pitch: f32) -> Self {
Self {
x,
y,
z,
yaw,
pitch,
}
}
}
impl ClientPacket for CMoveVehicle {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_f64_be(self.x)?;
write.write_f64_be(self.y)?;
write.write_f64_be(self.z)?;
write.write_f32_be(self.yaw)?;
write.write_f32_be(self.pitch)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CMoveVehicle {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
x: bytebuf.get_f64_be()?,
y: bytebuf.get_f64_be()?,
z: bytebuf.get_f64_be()?,
yaw: bytebuf.get_f32_be()?,
pitch: bytebuf.get_f32_be()?,
})
}
}

View File

@ -0,0 +1,46 @@
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::RECIPE_BOOK_REMOVE;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(RECIPE_BOOK_REMOVE)]
pub struct CRecipeBookRemove<'a> {
pub recipes: &'a [VarInt],
}
impl<'a> CRecipeBookRemove<'a> {
#[must_use]
pub const fn new(recipes: &'a [VarInt]) -> Self {
Self { recipes }
}
}
impl ClientPacket for CRecipeBookRemove<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_var_int(&VarInt(self.recipes.len() as i32))?;
for recipe in self.recipes {
write.write_var_int(recipe)?;
}
Ok(())
}
}
impl<'a> ServerPacket<'a> for CRecipeBookRemove<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
let count = bytebuf.get_var_int()?.0 as usize;
let mut recipes = Vec::with_capacity(count);
for _ in 0..count {
recipes.push(bytebuf.get_var_int()?);
}
Ok(Self {
recipes: Box::leak(recipes.into_boxed_slice()),
})
}
}

View File

@ -0,0 +1,38 @@
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::SET_CHUNK_CACHE_RADIUS;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(SET_CHUNK_CACHE_RADIUS)]
pub struct CSetChunkCacheRadius {
pub radius: VarInt,
}
impl CSetChunkCacheRadius {
#[must_use]
pub const fn new(radius: VarInt) -> Self {
Self { radius }
}
}
impl ClientPacket for CSetChunkCacheRadius {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_var_int(&self.radius)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CSetChunkCacheRadius {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
radius: bytebuf.get_var_int()?,
})
}
}

View File

@ -0,0 +1,40 @@
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::SET_SIMULATION_DISTANCE;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(SET_SIMULATION_DISTANCE)]
pub struct CSetSimulationDistance {
pub simulation_distance: VarInt,
}
impl CSetSimulationDistance {
#[must_use]
pub const fn new(simulation_distance: VarInt) -> Self {
Self {
simulation_distance,
}
}
}
impl ClientPacket for CSetSimulationDistance {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_var_int(&self.simulation_distance)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CSetSimulationDistance {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
simulation_distance: bytebuf.get_var_int()?,
})
}
}

View File

@ -0,0 +1,48 @@
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::TEST_INSTANCE_BLOCK_STATUS;
use pumpkin_macros::java_packet;
use pumpkin_util::{math::position::BlockPos, version::JavaMinecraftVersion};
#[java_packet(TEST_INSTANCE_BLOCK_STATUS)]
pub struct CTestInstanceBlockStatus<'a> {
pub pos: BlockPos,
pub status: VarInt,
pub message: Option<&'a str>,
}
impl<'a> CTestInstanceBlockStatus<'a> {
#[must_use]
pub const fn new(pos: BlockPos, status: VarInt, message: Option<&'a str>) -> Self {
Self {
pos,
status,
message,
}
}
}
impl ClientPacket for CTestInstanceBlockStatus<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_block_pos(&self.pos, version)?;
write.write_var_int(&self.status)?;
write.write_option(&self.message, |p, v| p.write_string(v))?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CTestInstanceBlockStatus<'a> {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
pos: bytebuf.get_block_pos(version)?,
status: bytebuf.get_var_int()?,
message: bytebuf.get_option(NetworkReadSliceExt::get_str_borrowed)?,
})
}
}

View File

@ -0,0 +1,37 @@
use crate::{
ClientPacket, ServerPacket,
ser::{NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
use pumpkin_data::packet::clientbound::play::UPDATE_RECIPES;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
#[java_packet(UPDATE_RECIPES)]
pub struct CUpdateRecipes<'a> {
pub raw_data: &'a [u8],
}
impl<'a> CUpdateRecipes<'a> {
#[must_use]
pub const fn new(raw_data: &'a [u8]) -> Self {
Self { raw_data }
}
}
impl ClientPacket for CUpdateRecipes<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
_version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_slice(self.raw_data)?;
Ok(())
}
}
impl<'a> ServerPacket<'a> for CUpdateRecipes<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
let raw_data = bytebuf.read_remaining_slice_borrowed(usize::MAX)?;
Ok(Self { raw_data })
}
}

View File

@ -0,0 +1,57 @@
use pumpkin_data::packet::serverbound::play::CHANGE_DIFFICULTY;
use pumpkin_macros::java_packet;
use pumpkin_util::{difficulty::Difficulty, version::JavaMinecraftVersion};
use crate::{
ClientPacket, ServerPacket, VarInt,
ser::{NetworkReadExt, NetworkWriteExt, ReadingError, WritingError},
};
#[java_packet(CHANGE_DIFFICULTY)]
pub struct SChangeDifficulty {
pub difficulty: Difficulty,
}
impl SChangeDifficulty {
#[must_use]
pub const fn new(difficulty: Difficulty) -> Self {
Self { difficulty }
}
}
impl<'a> ServerPacket<'a> for SChangeDifficulty {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
let id = if *version >= JavaMinecraftVersion::V_1_21_6 {
bytebuf.get_var_int()?.0 as u8
} else {
bytebuf.get_u8()?
};
let difficulty = match id {
0 => Difficulty::Peaceful,
1 => Difficulty::Easy,
2 => Difficulty::Normal,
3 => Difficulty::Hard,
_ => {
return Err(ReadingError::Message(format!(
"Invalid difficulty id: {id}"
)));
}
};
Ok(Self { difficulty })
}
}
impl ClientPacket for SChangeDifficulty {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
if *version >= JavaMinecraftVersion::V_1_21_6 {
write.write_var_int(&VarInt(self.difficulty as i32))?;
} else {
write.write_u8(self.difficulty as u8)?;
}
Ok(())
}
}

View File

@ -0,0 +1,80 @@
use pumpkin_data::packet::serverbound::play::CHAT_COMMAND_SIGNED;
use pumpkin_macros::java_packet;
use pumpkin_util::version::JavaMinecraftVersion;
use crate::{
ClientPacket, ServerPacket,
codec::var_int::VarInt,
ser::{NetworkReadExt, NetworkReadSliceExt, NetworkWriteExt, ReadingError, WritingError},
};
pub struct ArgumentSignature<'a> {
pub name: &'a str,
pub signature: &'a [u8],
}
#[java_packet(CHAT_COMMAND_SIGNED)]
pub struct SChatCommandSigned<'a> {
pub command: &'a str,
pub timestamp: i64,
pub salt: i64,
pub argument_signatures: Vec<ArgumentSignature<'a>>,
pub message_count: VarInt,
pub acknowledged: &'a [u8],
pub checksum: u8,
}
impl<'a> ServerPacket<'a> for SChatCommandSigned<'a> {
fn read(read: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
let command = read.get_str_bounded_borrowed(256)?;
let timestamp = read.get_i64_be()?;
let salt = read.get_i64_be()?;
let arg_count = read.get_var_int()?.0 as usize;
let mut argument_signatures = Vec::with_capacity(arg_count);
for _ in 0..arg_count {
let name = read.get_str_bounded_borrowed(16)?;
let signature = read.read_slice_borrowed(256)?;
argument_signatures.push(ArgumentSignature { name, signature });
}
let message_count = read.get_var_int()?;
let acknowledged = read.read_slice_borrowed(3)?;
let checksum = if *version >= JavaMinecraftVersion::V_1_21_5 {
read.get_u8()?
} else {
0
};
Ok(Self {
command,
timestamp,
salt,
argument_signatures,
message_count,
acknowledged,
checksum,
})
}
}
impl ClientPacket for SChatCommandSigned<'_> {
fn write_packet_data(
&self,
mut write: impl std::io::Write,
version: &JavaMinecraftVersion,
) -> Result<(), WritingError> {
write.write_string(self.command)?;
write.write_i64_be(self.timestamp)?;
write.write_i64_be(self.salt)?;
write.write_var_int(&VarInt(self.argument_signatures.len() as i32))?;
for arg in &self.argument_signatures {
write.write_string(arg.name)?;
write.write_slice(arg.signature)?;
}
write.write_var_int(&self.message_count)?;
write.write_slice(self.acknowledged)?;
if *version >= JavaMinecraftVersion::V_1_21_5 {
write.write_u8(self.checksum)?;
}
Ok(())
}
}

View File

@ -22,6 +22,15 @@ pub struct SClickSlot {
pub carried_item: OptionalItemStackHash,
}
impl SClickSlot {
pub const BUTTON_LEFT: i8 = 0;
pub const BUTTON_RIGHT: i8 = 1;
pub const BUTTON_MIDDLE: i8 = 2;
pub const BUTTON_DROP_SINGLE: i8 = 0;
pub const BUTTON_DROP_STACK: i8 = 1;
pub const BUTTON_OFFHAND_SWAP: i8 = 40;
}
impl<'a> ServerPacket<'a> for SClickSlot {
fn read(
mut bytebuf: &mut &'a [u8],

View File

@ -11,6 +11,10 @@ pub struct SDebugSampleSubscription {
pub sample_type: VarInt,
}
impl SDebugSampleSubscription {
pub const TICK_TIME: i32 = 0;
}
impl<'a> ServerPacket<'a> for SDebugSampleSubscription {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {

View File

@ -11,6 +11,10 @@ pub struct SDebugSubscriptionRequest {
pub sample_type: VarInt,
}
impl SDebugSubscriptionRequest {
pub const TICK_TIME: i32 = 0;
}
impl<'a> ServerPacket<'a> for SDebugSubscriptionRequest {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {

View File

@ -148,3 +148,9 @@ pub use set_structure_block::*;
mod spectate_entity;
pub use spectate_entity::*;
mod change_difficulty;
pub use change_difficulty::*;
mod chat_command_signed;
pub use chat_command_signed::*;

View File

@ -22,6 +22,27 @@ pub struct SSetCommandBlock<'a> {
pub flags: i8,
}
impl SSetCommandBlock<'_> {
pub const FLAG_TRACK_OUTPUT: i8 = 0x01;
pub const FLAG_CONDITIONAL: i8 = 0x02;
pub const FLAG_AUTOMATIC: i8 = 0x04;
#[must_use]
pub const fn track_output(&self) -> bool {
(self.flags & Self::FLAG_TRACK_OUTPUT) != 0
}
#[must_use]
pub const fn is_conditional(&self) -> bool {
(self.flags & Self::FLAG_CONDITIONAL) != 0
}
#[must_use]
pub const fn is_automatic(&self) -> bool {
(self.flags & Self::FLAG_AUTOMATIC) != 0
}
}
impl<'a> ServerPacket<'a> for SSetCommandBlock<'a> {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {

View File

@ -3,22 +3,34 @@ use pumpkin_macros::java_packet;
use crate::{
ServerPacket,
ser::{NetworkReadSliceExt, ReadingError},
codec::var_int::VarInt,
ser::{NetworkReadExt, NetworkReadSliceExt, ReadingError},
};
use pumpkin_util::version::JavaMinecraftVersion;
pub struct GameRuleEntry<'a> {
pub game_rule_key: &'a str,
pub value: &'a str,
}
#[java_packet(SET_GAME_RULE)]
pub struct SSetGameRule<'a> {
pub rule: &'a str,
pub value: &'a str,
pub entries: Vec<GameRuleEntry<'a>>,
}
impl<'a> ServerPacket<'a> for SSetGameRule<'a> {
fn read(bytebuf: &mut &'a [u8], _version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {
rule: bytebuf.get_str_borrowed()?,
value: bytebuf.get_str_borrowed()?,
})
let count = bytebuf.get_var_int()?.0 as usize;
let mut entries = Vec::with_capacity(count);
for _ in 0..count {
let game_rule_key = bytebuf.get_str_borrowed()?;
let value = bytebuf.get_str_borrowed()?;
entries.push(GameRuleEntry {
game_rule_key,
value,
});
}
Ok(Self { entries })
}
}
@ -29,8 +41,11 @@ impl crate::ClientPacket for SSetGameRule<'_> {
_version: &JavaMinecraftVersion,
) -> Result<(), crate::ser::WritingError> {
use crate::ser::NetworkWriteExt;
write.write_string(self.rule)?;
write.write_string(self.value)?;
write.write_var_int(&VarInt(self.entries.len() as i32))?;
for entry in &self.entries {
write.write_string(entry.game_rule_key)?;
write.write_string(entry.value)?;
}
Ok(())
}
}

View File

@ -28,6 +28,37 @@ pub struct SSetStructureBlock<'a> {
pub flags: u8,
}
impl SSetStructureBlock<'_> {
pub const ACTION_UPDATE_DATA: i32 = 0;
pub const ACTION_SAVE_AREA: i32 = 1;
pub const ACTION_LOAD_AREA: i32 = 2;
pub const ACTION_SCAN_AREA: i32 = 3;
pub const MODE_SAVE: i32 = 0;
pub const MODE_LOAD: i32 = 1;
pub const MODE_CORNER: i32 = 2;
pub const MODE_DATA: i32 = 3;
pub const FLAG_IGNORE_ENTITIES: u8 = 0x01;
pub const FLAG_SHOW_AIR: u8 = 0x02;
pub const FLAG_SHOW_BOUNDING_BOX: u8 = 0x04;
#[must_use]
pub const fn ignore_entities(&self) -> bool {
(self.flags & Self::FLAG_IGNORE_ENTITIES) != 0
}
#[must_use]
pub const fn show_air(&self) -> bool {
(self.flags & Self::FLAG_SHOW_AIR) != 0
}
#[must_use]
pub const fn show_bounding_box(&self) -> bool {
(self.flags & Self::FLAG_SHOW_BOUNDING_BOX) != 0
}
}
impl<'a> ServerPacket<'a> for SSetStructureBlock<'a> {
fn read(bytebuf: &mut &'a [u8], version: &JavaMinecraftVersion) -> Result<Self, ReadingError> {
Ok(Self {

View File

@ -75,6 +75,51 @@ impl BeaconBlockEntity {
self.mark_dirty();
}
#[must_use]
pub const fn is_valid_primary_effect(effect_id: i32, levels: i32) -> bool {
match effect_id {
// Speed (1), Haste (3)
1 | 3 => levels >= 1,
// Resistance (11), Jump Boost (8)
11 | 8 => levels >= 2,
// Strength (5)
5 => levels >= 3,
_ => false,
}
}
#[must_use]
pub const fn is_valid_secondary_effect(
primary_id: i32,
secondary_id: i32,
levels: i32,
) -> bool {
if secondary_id <= 0 {
return true;
}
if levels < 4 {
return false;
}
// Regeneration (10) or tier II upgrade matching primary
secondary_id == 10 || secondary_id == primary_id
}
#[must_use]
pub fn validate_effects(primary: Option<i32>, secondary: Option<i32>, levels: i32) -> bool {
let primary_id = primary.unwrap_or(0);
let secondary_id = secondary.unwrap_or(0);
if primary_id > 0 && !Self::is_valid_primary_effect(primary_id, levels) {
return false;
}
if secondary_id > 0 && !Self::is_valid_secondary_effect(primary_id, secondary_id, levels) {
return false;
}
true
}
/// Replicates Java's `updateBase` logic
fn update_base(&self, world: &Arc<World>) -> i32 {
let mut levels = 0;

View File

@ -6,7 +6,7 @@ use crate::command::{
args::{Arg, ConsumedArgs},
tree::{CommandTree, builder::argument},
};
use crate::entity::NBTStorage;
use crate::entity::EntityBase;
use CommandError::InvalidConsumption;
use pumpkin_data::translation;
use pumpkin_nbt::compound::NbtCompound;
@ -32,12 +32,7 @@ impl CommandExecutor for GetEntityDataExecutor {
let Some(Arg::Entity(entity)) = args.get(&ARG_ENTITY) else {
return Err(InvalidConsumption(Some(ARG_ENTITY.into())));
};
display_data(
entity.as_nbt_storage(),
entity.get_display_name().await,
sender,
)
.await
display_data(entity.as_ref(), entity.get_display_name().await, sender).await
})
}
}
@ -222,12 +217,12 @@ pub fn snbt_colorful_display(tag: &NbtTag, depth: usize) -> Result<TextComponent
}
async fn display_data(
storage: &dyn NBTStorage,
entity: &dyn EntityBase,
target_name: TextComponent,
sender: &CommandSender,
) -> Result<i32, CommandError> {
let mut nbt = NbtCompound::new();
storage.write_nbt(&mut nbt).await;
entity.write_nbt(&mut nbt).await;
let tag = NbtTag::Compound(nbt);
let result = get_i32_result(&tag)?;

View File

@ -98,7 +98,10 @@ pub trait AgeableMob: Mob {
}
#[must_use]
fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32 {
fn get_speed_up_seconds_when_feeding(ticks_until_adult: i32) -> i32
where
Self: Sized,
{
(ticks_until_adult as f32 / 20.0 * 0.1) as i32
}

View File

@ -2,7 +2,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use crate::{
entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage},
entity::{Entity, EntityBase, EntityBaseFuture},
server::Server,
};
use pumpkin_data::effect::StatusEffect;
@ -106,13 +106,7 @@ impl AreaEffectCloudEntity {
}
}
impl NBTStorage for AreaEffectCloudEntity {}
impl EntityBase for AreaEffectCloudEntity {
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn init_data_tracker(&self) -> EntityBaseFuture<'_, ()> {
Box::pin(async move {
// Send initial radius and particle (color) so clients render correctly

View File

@ -9,7 +9,7 @@ use std::sync::atomic::Ordering;
use tokio::sync::Mutex;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage,
Entity, EntityBase, EntityBaseFuture,
living::LivingEntity,
mob::{Mob, MobEntity},
player::Player,
@ -156,8 +156,6 @@ impl EnderDragonPart {
}
}
impl NBTStorage for EnderDragonPart {}
impl EntityBase for EnderDragonPart {
fn get_entity(&self) -> &Entity {
&self.entity
@ -190,11 +188,6 @@ impl EntityBase for EnderDragonPart {
fn get_living_entity(&self) -> Option<&LivingEntity> {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn can_hit(&self) -> bool {
true
}
@ -782,8 +775,6 @@ impl EnderDragonEntity {
}
}
impl NBTStorage for EnderDragonEntity {}
impl Mob for EnderDragonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -2,7 +2,7 @@ use pumpkin_data::entity::EntityType;
use std::sync::{Arc, Weak};
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal},
mob::{Mob, MobEntity},
};
@ -40,8 +40,6 @@ impl WitherEntity {
}
}
impl NBTStorage for WitherEntity {}
impl Mob for WitherEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -1,8 +1,6 @@
use std::sync::atomic::{AtomicI32, AtomicI64, AtomicU8, Ordering};
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity,
};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity};
use crossbeam::atomic::AtomicCell;
use pumpkin_data::item_stack::ItemStack;
use pumpkin_data::{
@ -232,10 +230,9 @@ impl ArmorStandEntity {
}
}
impl NBTStorage for ArmorStandEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for ArmorStandEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.living_entity.write_nbt(nbt).await;
let disabled_slots = self.disabled_slots.load(Ordering::Relaxed);
// ...
@ -252,9 +249,8 @@ impl NBTStorage for ArmorStandEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.living_entity.read_nbt_non_mut(nbt).await;
let mut flags = 0u8;
// ...
@ -302,9 +298,7 @@ impl NBTStorage for ArmorStandEntity {
}
})
}
}
impl EntityBase for ArmorStandEntity {
fn get_entity(&self) -> &Entity {
&self.living_entity.entity
}
@ -313,10 +307,6 @@ impl EntityBase for ArmorStandEntity {
Some(&self.living_entity)
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn kill<'a>(&'a self, _caller: &'a dyn EntityBase) -> EntityBaseFuture<'a, ()> {
Box::pin(async move {
self.get_entity().remove().await;

View File

@ -14,7 +14,7 @@ use pumpkin_protocol::{
use pumpkin_util::{math::vector3::Vector3, text::TextComponent};
use crate::{
entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity},
entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity},
server::Server,
};
@ -458,7 +458,6 @@ impl DisplayEntity {
}
pub async fn write_display_nbt(&self, nbt: &mut NbtCompound) {
self.entity.write_nbt(nbt).await;
nbt.put_int(
"interpolation_duration",
self.interpolation_duration.load(Ordering::Relaxed),
@ -524,8 +523,6 @@ impl DisplayEntity {
}
pub async fn read_display_nbt(&self, nbt: &NbtCompound) {
self.entity.read_nbt_non_mut(nbt).await;
if let Some(dur) = nbt.get_int("interpolation_duration") {
self.interpolation_duration.store(dur, Ordering::Relaxed);
}
@ -629,21 +626,15 @@ impl BlockDisplayEntity {
}
}
impl NBTStorage for BlockDisplayEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for BlockDisplayEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.write_display_nbt(nbt).await;
nbt.put_int("block_state", self.block_state.load(Ordering::Relaxed));
})
}
fn read_nbt<'a>(&'a mut self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.read_nbt_non_mut(nbt).await;
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.read_display_nbt(nbt).await;
if let Some(state) = nbt.get_int("block_state") {
@ -651,9 +642,7 @@ impl NBTStorage for BlockDisplayEntity {
}
})
}
}
impl EntityBase for BlockDisplayEntity {
fn tick<'a>(
&'a self,
_caller: &'a Arc<dyn EntityBase>,
@ -683,10 +672,6 @@ impl EntityBase for BlockDisplayEntity {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}
@ -766,8 +751,8 @@ impl ItemDisplayEntity {
}
}
impl NBTStorage for ItemDisplayEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for ItemDisplayEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.write_display_nbt(nbt).await;
let display_mode_str = match self.item_display.load(Ordering::Relaxed) {
@ -785,13 +770,7 @@ impl NBTStorage for ItemDisplayEntity {
})
}
fn read_nbt<'a>(&'a mut self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.read_nbt_non_mut(nbt).await;
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.read_display_nbt(nbt).await;
if let Some(mode_str) = nbt.get_string("item_display") {
@ -810,9 +789,7 @@ impl NBTStorage for ItemDisplayEntity {
}
})
}
}
impl EntityBase for ItemDisplayEntity {
fn tick<'a>(
&'a self,
_caller: &'a Arc<dyn EntityBase>,
@ -849,10 +826,6 @@ impl EntityBase for ItemDisplayEntity {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}
@ -1059,8 +1032,8 @@ impl TextDisplayEntity {
}
}
impl NBTStorage for TextDisplayEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for TextDisplayEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.write_display_nbt(nbt).await;
let text_json_res = pumpkin_util::serde_json::to_string(&*self.text.lock().await);
@ -1086,13 +1059,7 @@ impl NBTStorage for TextDisplayEntity {
})
}
fn read_nbt<'a>(&'a mut self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.read_nbt_non_mut(nbt).await;
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.display.read_display_nbt(nbt).await;
if let Some(text_json) = nbt.get_string("text")
@ -1130,9 +1097,7 @@ impl NBTStorage for TextDisplayEntity {
self.flags.store(flags, Ordering::Relaxed);
})
}
}
impl EntityBase for TextDisplayEntity {
fn tick<'a>(
&'a self,
_caller: &'a Arc<dyn EntityBase>,
@ -1191,10 +1156,6 @@ impl EntityBase for TextDisplayEntity {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -1,6 +1,6 @@
use core::f32;
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, living::LivingEntity};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, living::LivingEntity};
use pumpkin_data::{
damage::DamageType,
tag::{self, Taggable},
@ -30,8 +30,6 @@ impl EndCrystalEntity {
}
}
impl NBTStorage for EndCrystalEntity {}
impl EntityBase for EndCrystalEntity {
fn get_entity(&self) -> &Entity {
&self.entity
@ -68,11 +66,6 @@ impl EntityBase for EndCrystalEntity {
true
})
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -2,9 +2,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering};
use crate::entity::player::Player;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity,
};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity};
use crossbeam::atomic::AtomicCell;
use pumpkin_data::BlockDirection;
use pumpkin_data::damage::DamageType;
@ -264,11 +262,9 @@ impl ItemFrameEntity {
}
}
impl NBTStorage for ItemFrameEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for ItemFrameEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.write_nbt(nbt).await;
let item = self.item_stack.lock().await;
if !item.is_empty() {
let mut item_compound = NbtCompound::new();
@ -283,10 +279,8 @@ impl NBTStorage for ItemFrameEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.entity.read_nbt_non_mut(nbt).await;
if let Some(item_compound) = nbt.get_compound("Item")
&& let Some(stack) = ItemStack::read_item_stack(item_compound)
{
@ -310,9 +304,7 @@ impl NBTStorage for ItemFrameEntity {
.store(nbt.get_bool("Fixed").unwrap_or(false), Ordering::Relaxed);
})
}
}
impl EntityBase for ItemFrameEntity {
fn get_entity(&self) -> &Entity {
&self.entity
}
@ -458,10 +450,6 @@ impl EntityBase for ItemFrameEntity {
})
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -1,5 +1,5 @@
use crate::entity::player::Player;
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, living::LivingEntity};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, living::LivingEntity};
use crate::world::World;
use pumpkin_data::entity::EntityType;
use pumpkin_data::item_stack::ItemStack;
@ -84,8 +84,6 @@ impl LeashKnotEntity {
}
}
impl NBTStorage for LeashKnotEntity {}
impl EntityBase for LeashKnotEntity {
fn get_entity(&self) -> &Entity {
&self.entity
@ -205,11 +203,6 @@ impl EntityBase for LeashKnotEntity {
}
})
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -1,9 +1,7 @@
use core::f32;
use std::sync::atomic::Ordering;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity,
};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity};
use pumpkin_data::damage::DamageType;
use pumpkin_nbt::compound::NbtCompound;
use pumpkin_util::math::vector3::Vector3;
@ -18,24 +16,20 @@ impl PaintingEntity {
}
}
impl NBTStorage for PaintingEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for PaintingEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.entity.write_nbt(nbt).await;
nbt.put_byte("facing", self.entity.data.load(Ordering::Relaxed) as i8);
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.entity.read_nbt_non_mut(nbt).await;
let facing = nbt.get_byte("facing").unwrap_or(3);
self.entity.data.store(facing as i32, Ordering::Relaxed);
})
}
}
impl EntityBase for PaintingEntity {
fn get_entity(&self) -> &Entity {
&self.entity
}
@ -60,10 +54,6 @@ impl EntityBase for PaintingEntity {
})
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -9,7 +9,7 @@ use pumpkin_util::math::vector3::Vector3;
use crate::{entity::EntityBaseFuture, server::Server, world::World};
use super::{Entity, EntityBase, NBTStorage, living::LivingEntity, player::Player};
use super::{Entity, EntityBase, living::LivingEntity, player::Player};
pub struct ExperienceOrbEntity {
entity: Entity,
@ -65,8 +65,6 @@ impl ExperienceOrbEntity {
}
}
impl NBTStorage for ExperienceOrbEntity {}
impl EntityBase for ExperienceOrbEntity {
fn tick<'a>(
&'a self,
@ -130,11 +128,6 @@ impl EntityBase for ExperienceOrbEntity {
fn get_living_entity(&self) -> Option<&LivingEntity> {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn get_gravity(&self) -> f64 {
0.03
}

View File

@ -8,7 +8,7 @@ use pumpkin_world::world::BlockFlags;
use std::sync::{Arc, atomic::Ordering};
use crate::{
entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, living::LivingEntity},
entity::{Entity, EntityBase, EntityBaseFuture, living::LivingEntity},
server::Server,
world::World,
};
@ -47,8 +47,6 @@ impl FallingEntity {
}
}
impl NBTStorage for FallingEntity {}
impl EntityBase for FallingEntity {
fn tick<'a>(
&'a self,
@ -109,11 +107,6 @@ impl EntityBase for FallingEntity {
fn get_living_entity(&self) -> Option<&LivingEntity> {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn damage<'a>(
&'a self,
_caller: &'a dyn EntityBase,

View File

@ -15,8 +15,7 @@ use pumpkin_util::math::{
use crate::{
entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity,
player::Player,
Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity, player::Player,
},
server::Server,
};
@ -138,10 +137,9 @@ impl InteractionEntity {
}
}
impl NBTStorage for InteractionEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for InteractionEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.write_nbt(nbt).await;
nbt.put_float("width", *self.width.lock().await);
nbt.put_float("height", *self.height.lock().await);
nbt.put_bool("response", self.response.load(Ordering::Relaxed));
@ -158,16 +156,8 @@ impl NBTStorage for InteractionEntity {
})
}
fn read_nbt<'a>(&'a mut self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.read_nbt_non_mut(nbt).await;
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.read_nbt_non_mut(nbt).await;
let width = nbt.get_float("width").unwrap_or(1.0);
let height = nbt.get_float("height").unwrap_or(1.0);
let response = nbt.get_bool("response").unwrap_or(false);
@ -190,9 +180,7 @@ impl NBTStorage for InteractionEntity {
}
})
}
}
impl EntityBase for InteractionEntity {
fn tick<'a>(
&'a self,
_caller: &'a Arc<dyn EntityBase>,
@ -239,10 +227,6 @@ impl EntityBase for InteractionEntity {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -26,7 +26,7 @@ use std::sync::{
};
use tokio::sync::Mutex;
use super::{Entity, EntityBase, NBTStorage, NbtFuture, living::LivingEntity, player::Player};
use super::{Entity, EntityBase, NbtFuture, living::LivingEntity, player::Player};
pub struct ItemEntity {
entity: Entity,
@ -424,53 +424,6 @@ impl ItemEntity {
}
}
impl NBTStorage for ItemEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.write_nbt(nbt).await;
let item = self.item_stack.lock().await;
let mut item_compound = NbtCompound::new();
item.write_item_stack(&mut item_compound);
nbt.put_compound("Item", item_compound);
nbt.put_short("Age", self.item_age.load(Ordering::Relaxed) as i16);
nbt.put_short(
"PickupDelay",
self.pickup_delay.load(Ordering::Relaxed) as i16,
);
nbt.put_short("Health", self.health.load(Relaxed) as i16);
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.entity.read_nbt_non_mut(nbt).await;
// Restore the item stack from the "Item" compound
if let Some(item_compound) = nbt.get_compound("Item")
&& let Some(stack) = ItemStack::read_item_stack(item_compound)
{
*self.item_stack.lock().await = stack;
}
// Vanilla stores Age as a short
self.item_age
.store(nbt.get_short("Age").unwrap_or(0) as u32, Ordering::Relaxed);
// Vanilla stores PickupDelay as a short
if let Some(delay) = nbt.get_short("PickupDelay") {
self.pickup_delay.store(delay as u8, Ordering::Relaxed);
}
// Vanilla stores Health as a short
if let Some(health) = nbt.get_short("Health") {
self.health.store(health as f32, Relaxed);
}
})
}
}
impl EntityBase for ItemEntity {
fn tick<'a>(
&'a self,
@ -631,8 +584,45 @@ impl EntityBase for ItemEntity {
0.04
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
let item = self.item_stack.lock().await;
let mut item_compound = NbtCompound::new();
item.write_item_stack(&mut item_compound);
nbt.put_compound("Item", item_compound);
nbt.put_short("Age", self.item_age.load(Ordering::Relaxed) as i16);
nbt.put_short(
"PickupDelay",
self.pickup_delay.load(Ordering::Relaxed) as i16,
);
nbt.put_short("Health", self.health.load(Relaxed) as i16);
})
}
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
// Restore the item stack from the "Item" compound
if let Some(item_compound) = nbt.get_compound("Item")
&& let Some(stack) = ItemStack::read_item_stack(item_compound)
{
*self.item_stack.lock().await = stack;
}
// Vanilla stores Age as a short
self.item_age
.store(nbt.get_short("Age").unwrap_or(0) as u32, Ordering::Relaxed);
// Vanilla stores PickupDelay as a short
if let Some(delay) = nbt.get_short("PickupDelay") {
self.pickup_delay.store(delay as u8, Ordering::Relaxed);
}
// Vanilla stores Health as a short
if let Some(health) = nbt.get_short("Health") {
self.health.store(health as f32, Relaxed);
}
})
}
fn cast_any(&self) -> &dyn std::any::Any {

View File

@ -15,7 +15,7 @@ use rand::RngExt;
use crate::block::blocks::fire::FireBlockBase;
use crate::entity::player::Player;
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage};
use crate::entity::{Entity, EntityBase, EntityBaseFuture};
use crate::server::Server;
use crate::world::World;
@ -200,8 +200,6 @@ impl LightningBoltEntity {
}
}
impl NBTStorage for LightningBoltEntity {}
impl EntityBase for LightningBoltEntity {
fn tick<'a>(
&'a self,
@ -297,11 +295,6 @@ impl EntityBase for LightningBoltEntity {
fn get_living_entity(&self) -> Option<&crate::entity::living::LivingEntity> {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -22,7 +22,7 @@ use std::{collections::HashMap, sync::atomic::AtomicI32};
use tracing::warn;
use super::experience_orb::ExperienceOrbEntity;
use super::{Entity, EntityBase, NBTStorage, NBTStorageInit};
use super::{Entity, EntityBase, NBTStorageInit};
use crate::block::OnLandedUponArgs;
use crate::entity::attributes::AttributeInstance;
use crate::entity::attributes::Modifier;
@ -31,7 +31,7 @@ use crate::entity::combat::knockback_after_resistance;
use crate::entity::mob::equipment::DEFAULT_EQUIPMENT_DROP_CHANCE;
use crate::entity::mob::slime::SlimeEntity;
use crate::entity::player::statistics::{CustomStatistic, StatisticCategory};
use crate::entity::{EntityBaseFuture, NbtFuture};
use crate::entity::{EntityBaseFuture, NBTStorage, NbtFuture};
use crate::server::Server;
use crate::world::loot::{LootContextParameters, LootTableExt};
use crossbeam::atomic::AtomicCell;
@ -2221,10 +2221,9 @@ impl LivingEntity {
}
}
impl NBTStorage for LivingEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl LivingEntity {
pub fn write_living_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.write_nbt(nbt).await;
nbt.put("Health", NbtTag::Float(self.health.load()));
// Avoid persisting a lethal fall distance when the entity is dead to prevent death loops
let fall_distance = if self.dead.load(Relaxed) {
@ -2253,9 +2252,8 @@ impl NBTStorage for LivingEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
pub fn read_living_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.entity.read_nbt_non_mut(nbt).await;
self.health.store(nbt.get_float("Health").unwrap_or(0.0));
// Clamp any persisted absorption to the entity's configured max
@ -3049,10 +3047,6 @@ impl EntityBase for LivingEntity {
fn cast_any(&self) -> &dyn std::any::Any {
self
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
}
impl LivingEntity {

View File

@ -2,7 +2,7 @@ use std::sync::{Arc, atomic::Ordering};
use tokio::sync::Mutex;
use crate::{
entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture, living::LivingEntity},
entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture, living::LivingEntity},
net::{bedrock::BedrockClient, java::JavaClient},
server::Server,
};
@ -25,10 +25,9 @@ impl MarkerEntity {
}
}
impl NBTStorage for MarkerEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl EntityBase for MarkerEntity {
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.write_nbt(nbt).await;
let data = self.data.lock().await;
if !data.is_empty() {
nbt.put("data", NbtTag::Compound(data.clone()));
@ -36,26 +35,14 @@ impl NBTStorage for MarkerEntity {
})
}
fn read_nbt<'a>(&'a mut self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.read_nbt(nbt).await;
if let Some(data) = nbt.get_compound("data") {
*self.data.lock().await = data.clone();
}
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.read_nbt_non_mut(nbt).await;
if let Some(data) = nbt.get_compound("data") {
*self.data.lock().await = data.clone();
}
})
}
}
impl EntityBase for MarkerEntity {
fn tick<'a>(
&'a self,
_caller: &'a Arc<dyn EntityBase>,
@ -76,10 +63,6 @@ impl EntityBase for MarkerEntity {
None
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
}
fn cast_any(&self) -> &dyn std::any::Any {
self
}

View File

@ -12,7 +12,7 @@ use rand::RngExt;
use tokio::sync::Mutex;
use crate::entity::mob::{Mob, MobEntity};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture};
use crate::world::World;
const ROOSTING_FLAG: u8 = 1;
@ -33,14 +33,10 @@ impl BatEntity {
let bat = Self {
mob_entity,
hanging_position: Mutex::new(None),
roosting: AtomicBool::new(true),
roosting: AtomicBool::new(false),
ambient_sound_chance: AtomicI32::new(MIN_AMBIENT_SOUND_DELAY),
};
let mob_arc = Arc::new(bat);
Self::set_roosting_metadata(true);
mob_arc
Arc::new(bat)
}
pub fn check_bat_spawn_rules(world: &World, pos: &BlockPos) -> bool {
@ -64,18 +60,14 @@ impl BatEntity {
true
}
fn is_roosting(&self) -> bool {
pub fn is_roosting(&self) -> bool {
self.roosting.load(Relaxed)
}
fn set_roosting(&self, roosting: bool) {
pub fn set_roosting(&self, roosting: bool) {
self.roosting.store(roosting, Relaxed);
Self::set_roosting_metadata(roosting);
}
const fn set_roosting_metadata(_roosting: bool) {
// TODO
// let flags: u8 = if roosting { ROOSTING_FLAG } else { 0 };
// TODO:
// let flags = if roosting { ROOSTING_FLAG } else { 0 };
// self.mob_entity
// .living_entity
// .entity
@ -88,26 +80,22 @@ impl BatEntity {
}
}
impl NBTStorage for BatEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for BatEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
let flags: u8 = if self.is_roosting() { ROOSTING_FLAG } else { 0 };
nbt.put_byte("BatFlags", flags as i8);
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
let flags = nbt.get_byte("BatFlags").unwrap_or(0) as u8;
let roosting = (flags & ROOSTING_FLAG) != 0;
self.set_roosting(roosting);
})
}
}
impl Mob for BatEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -84,8 +84,6 @@ impl BlazeEntity {
}
}
impl NBTStorage for BlazeEntity {}
impl Mob for BlazeEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -55,8 +55,6 @@ impl BreezeEntity {
}
}
impl NBTStorage for BreezeEntity {}
impl Mob for BreezeEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, spider::SpiderEntity},
};
@ -16,8 +16,6 @@ impl CaveSpiderEntity {
}
}
impl NBTStorage for CaveSpiderEntity {}
impl Mob for CaveSpiderEntity {
fn get_mob_entity(&self) -> &MobEntity {
self.spider.get_mob_entity()

View File

@ -18,7 +18,7 @@ use pumpkin_util::math::vector3::Vector3;
use crate::block::entities::creaking_heart::CreakingHeartBlockEntity;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -396,10 +396,9 @@ impl CreakingEntity {
}
}
impl NBTStorage for CreakingEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for CreakingEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
if let Some(pos) = self.get_home_pos() {
let mut sub = NbtCompound::new();
sub.put_int("x", pos.0.x);
@ -410,9 +409,8 @@ impl NBTStorage for CreakingEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
if let Some(sub) = nbt.get_compound("home_pos")
&& let (Some(x), Some(y), Some(z)) =
(sub.get_int("x"), sub.get_int("y"), sub.get_int("z"))
@ -422,9 +420,7 @@ impl NBTStorage for CreakingEntity {
}
})
}
}
impl Mob for CreakingEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -13,7 +13,7 @@ use pumpkin_nbt::compound::NbtCompound;
use pumpkin_protocol::{codec::var_int::VarInt, java::client::play::Metadata};
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ai::goal::{
active_target::ActiveTargetGoal, creeper_ignite::CreeperIgniteGoal,
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal,
@ -127,10 +127,9 @@ impl CreeperEntity {
}
}
impl NBTStorage for CreeperEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for CreeperEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.write_nbt(nbt).await;
nbt.put_bool("powered", self.charged.load(Ordering::Relaxed));
nbt.put_short("Fuse", self.fuse_time.load(Ordering::Relaxed) as i16);
nbt.put_byte(
@ -141,9 +140,8 @@ impl NBTStorage for CreeperEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
if let Some(powered) = nbt.get_bool("powered") {
self.charged.store(powered, Ordering::Relaxed);
}
@ -159,9 +157,7 @@ impl NBTStorage for CreeperEntity {
}
})
}
}
impl Mob for CreeperEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -55,8 +55,6 @@ impl ElderGuardianEntity {
}
}
impl NBTStorage for ElderGuardianEntity {}
impl Mob for ElderGuardianEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -27,7 +27,7 @@ use pumpkin_util::math::{boundingbox::BoundingBox, position::BlockPos, vector3::
use rand::RngExt;
use crate::entity::{
Entity, EntityBase, NBTStorage, NbtFuture,
Entity, EntityBase, NbtFuture,
ai::{
goal::{
GoalFuture, active_target::ActiveTargetGoal, chase_player::ChasePlayerGoal,
@ -412,27 +412,23 @@ impl EndermanEntity {
}
}
impl NBTStorage for EndermanEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for EndermanEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.write_nbt(nbt).await;
if let Some(block_state) = self.carried_block.load() {
nbt.put_int("carriedBlockState", block_state.as_u16() as i32);
}
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
if let Some(block_state) = nbt.get_int("carriedBlockState") {
self.set_carried_block(BlockStateId::new(block_state as u16));
}
})
}
}
impl Mob for EndermanEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl EndermiteEntity {
}
}
impl NBTStorage for EndermiteEntity {}
impl Mob for EndermiteEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -10,7 +10,7 @@ use pumpkin_protocol::java::client::play::Metadata;
use pumpkin_util::math::vector3::Vector3;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ai::goal::{
Controls, Goal, GoalFuture, active_target::ActiveTargetGoal,
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
@ -140,29 +140,21 @@ impl EvokerEntity {
}
}
impl NBTStorage for EvokerEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for EvokerEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.entity.write_nbt(nbt).await;
nbt.put_int("SpellTicks", self.get_spell_casting_time());
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity
.living_entity
.entity
.read_nbt_non_mut(nbt)
.await;
if let Some(ticks) = nbt.get_int("SpellTicks") {
self.set_spell_casting_time(ticks);
}
})
}
}
impl Mob for EvokerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -2,7 +2,7 @@ use std::sync::atomic::{AtomicBool, AtomicU8, Ordering};
use std::sync::{Arc, Weak};
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{Controls, Goal, GoalFuture},
mob::{Mob, MobEntity},
};
@ -51,8 +51,6 @@ impl GhastEntity {
}
}
impl NBTStorage for GhastEntity {}
impl Mob for GhastEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::Arc;
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
melee_attack::MeleeAttackGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl GiantEntity {
}
}
impl NBTStorage for GiantEntity {}
impl Mob for GiantEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -67,8 +67,6 @@ impl GuardianEntity {
}
}
impl NBTStorage for GuardianEntity {}
impl Mob for GuardianEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl HoglinEntity {
}
}
impl NBTStorage for HoglinEntity {}
impl Mob for HoglinEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -63,8 +63,6 @@ impl IllusionerEntity {
}
}
impl NBTStorage for IllusionerEntity {}
impl Mob for IllusionerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, slime::SlimeEntity},
};
@ -16,8 +16,6 @@ impl MagmaCubeEntity {
}
}
impl NBTStorage for MagmaCubeEntity {}
impl Mob for MagmaCubeEntity {
fn get_mob_entity(&self) -> &MobEntity {
self.slime.get_mob_entity()

View File

@ -1,4 +1,4 @@
use super::{Entity, EntityBase, NBTStorage, ai::pathfinder::Navigator, living::LivingEntity};
use super::{Entity, EntityBase, NbtFuture, ai::pathfinder::Navigator, living::LivingEntity};
use crate::entity::EntityBaseFuture;
use crate::entity::ai::control::MoveControlTrait;
use crate::entity::ai::control::look_control::LookControl;
@ -13,6 +13,7 @@ use pumpkin_data::damage::DamageType;
use pumpkin_data::item_stack::ItemStack;
use pumpkin_data::tag::{self, Taggable};
use pumpkin_data::tracked_data;
use pumpkin_nbt::compound::NbtCompound;
use pumpkin_protocol::java::client::play::{CHeadRot, CUpdateEntityRot, Metadata};
use pumpkin_util::Difficulty;
use pumpkin_util::math::boundingbox::BoundingBox;
@ -187,6 +188,30 @@ impl MobEntity {
}
}
pub fn write_mob_nbt(&self, nbt: &mut NbtCompound) {
if self.is_no_ai() {
nbt.put_bool("NoAI", true);
}
if self.is_left_handed() {
nbt.put_bool("LeftHanded", true);
}
if self.can_pick_up_loot() {
nbt.put_bool("CanPickUpLoot", true);
}
}
pub fn read_mob_nbt(&self, nbt: &NbtCompound) {
if let Some(no_ai) = nbt.get_bool("NoAI") {
self.set_no_ai(no_ai);
}
if let Some(left_handed) = nbt.get_bool("LeftHanded") {
self.set_left_handed(left_handed);
}
if let Some(can_pick_up_loot) = nbt.get_bool("CanPickUpLoot") {
self.set_can_pick_up_loot(can_pick_up_loot);
}
}
pub fn add_goal<G: crate::entity::ai::goal::Goal + 'static>(&self, priority: u8, goal: G) {
self.goals_selector
.lock()
@ -599,6 +624,26 @@ pub trait Mob: EntityBase + Send + Sync {
None
}
fn as_ageable(&self) -> Option<&dyn crate::entity::ageable::AgeableMob> {
None
}
fn as_animal(&self) -> Option<&dyn crate::entity::passive::animal::Animal> {
None
}
fn as_tamable(&self) -> Option<&dyn crate::entity::passive::tamable::TamableAnimal> {
None
}
fn mob_write_nbt<'a>(&'a self, _nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {})
}
fn mob_read_nbt<'a>(&'a self, _nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {})
}
/// Set or clear the mob's target. Override to add side effects when targeting changes.
fn set_mob_target(&self, target: Option<Arc<dyn EntityBase>>) -> EntityBaseFuture<'_, ()> {
Box::pin(async move {
@ -765,11 +810,13 @@ pub trait Mob: EntityBase + Send + Sync {
}
fn get_owner_uuid(&self) -> Option<Uuid> {
None
self.as_tamable()
.and_then(crate::entity::passive::tamable::TamableAnimal::get_owner)
}
fn is_sitting(&self) -> bool {
false
self.as_tamable()
.is_some_and(crate::entity::passive::tamable::TamableAnimal::is_in_sitting_pose)
}
fn get_base_experience_reward(&self) -> u32 {
@ -1093,8 +1140,36 @@ impl<T: Mob + Send + 'static> EntityBase for T {
<T as Mob>::get_home(self)
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
fn write_custom_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.get_mob_entity().write_mob_nbt(nbt);
if let Some(ageable) = self.as_ageable() {
ageable.write_ageable_nbt(nbt);
}
if let Some(animal) = self.as_animal() {
animal.write_animal_nbt(nbt);
}
if let Some(tamable) = self.as_tamable() {
tamable.write_tamable_nbt(nbt);
}
self.mob_write_nbt(nbt).await;
})
}
fn read_custom_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.get_mob_entity().read_mob_nbt(nbt);
if let Some(ageable) = self.as_ageable() {
ageable.read_ageable_nbt(nbt);
}
if let Some(animal) = self.as_animal() {
animal.read_animal_nbt(nbt);
}
if let Some(tamable) = self.as_tamable() {
tamable.read_tamable_nbt(nbt);
}
self.mob_read_nbt(nbt).await;
})
}
fn get_gravity(&self) -> f64 {

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal},
mob::{Mob, MobEntity},
};
@ -41,8 +41,6 @@ impl PhantomEntity {
}
}
impl NBTStorage for PhantomEntity {}
impl Mob for PhantomEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -70,8 +70,6 @@ impl PiglinEntity {
}
}
impl NBTStorage for PiglinEntity {}
impl Mob for PiglinEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -69,8 +69,6 @@ impl PiglinBruteEntity {
}
}
impl NBTStorage for PiglinBruteEntity {}
impl Mob for PiglinBruteEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -66,8 +66,6 @@ impl PillagerEntity {
}
}
impl NBTStorage for PillagerEntity {}
impl Mob for PillagerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -65,8 +65,6 @@ impl RavagerEntity {
}
}
impl NBTStorage for RavagerEntity {}
impl Mob for RavagerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -21,7 +21,7 @@ use crate::entity::ai::goal::revenge::RevengeGoal;
use crate::entity::ai::goal::{Controls, Goal, GoalFuture};
use crate::entity::mob::{Mob, MobEntity};
use crate::entity::projectile::shulker_bullet::ShulkerBulletEntity;
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture};
use crate::entity::{Entity, EntityBase, EntityBaseFuture, NbtFuture};
const DEFAULT_ATTACH_FACE: BlockDirection = BlockDirection::Down;
const NO_COLOR: u8 = 16;
@ -321,19 +321,17 @@ impl ShulkerEntity {
}
}
impl NBTStorage for ShulkerEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for ShulkerEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
nbt.put_byte("AttachFace", self.attach_face.load(Ordering::Relaxed) as i8);
nbt.put_byte("PeekAmount", self.peek_amount.load(Ordering::Relaxed) as i8);
nbt.put_byte("Color", self.color.load(Ordering::Relaxed) as i8);
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
if let Some(face) = nbt.get_byte("AttachFace") {
self.attach_face.store(face as u8, Ordering::Relaxed);
}
@ -345,9 +343,7 @@ impl NBTStorage for ShulkerEntity {
}
})
}
}
impl Mob for ShulkerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl SilverfishEntity {
}
}
impl NBTStorage for SilverfishEntity {}
impl Mob for SilverfishEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity

View File

@ -1,5 +1,5 @@
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, skeleton::SkeletonEntityBase},
};
use std::sync::Arc;
@ -16,8 +16,6 @@ impl BoggedSkeletonEntity {
}
}
impl NBTStorage for BoggedSkeletonEntity {}
impl Mob for BoggedSkeletonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage, NbtFuture,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, bow_attack::BowAttackGoal,
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal,
@ -12,7 +12,6 @@ use crate::entity::{
},
mob::{Mob, MobEntity},
};
use pumpkin_nbt::compound::NbtCompound;
pub mod bogged;
pub mod parched;
@ -67,16 +66,6 @@ impl SkeletonEntityBase {
}
}
impl NBTStorage for SkeletonEntityBase {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
self.mob_entity.living_entity.write_nbt(nbt)
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
self.mob_entity.living_entity.read_nbt_non_mut(nbt)
}
}
impl Mob for SkeletonEntityBase {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, skeleton::SkeletonEntityBase},
};
@ -17,8 +17,6 @@ impl ParchedSkeletonEntity {
}
}
impl NBTStorage for ParchedSkeletonEntity {}
impl Mob for ParchedSkeletonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, skeleton::SkeletonEntityBase},
};
@ -17,8 +17,6 @@ impl SkeletonEntity {
}
}
impl NBTStorage for SkeletonEntity {}
impl Mob for SkeletonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, skeleton::SkeletonEntityBase},
};
@ -17,8 +17,6 @@ impl StraySkeletonEntity {
}
}
impl NBTStorage for StraySkeletonEntity {}
impl Mob for StraySkeletonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity, skeleton::SkeletonEntityBase},
};
@ -17,8 +17,6 @@ impl WitherSkeletonEntity {
}
}
impl NBTStorage for WitherSkeletonEntity {}
impl Mob for WitherSkeletonEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -12,7 +12,7 @@ use pumpkin_util::math::position::BlockPos;
use pumpkin_util::math::vector3::Vector3;
use crate::entity::{
Entity, EntityBase, NBTStorage, NbtFuture,
Entity, EntityBase, NbtFuture,
ai::control::{Control, MoveControlTrait},
ai::goal::{Goal, GoalFuture, active_target::ActiveTargetGoal},
mob::{Mob, MobEntity},
@ -264,18 +264,16 @@ impl SlimeEntity {
}
}
impl NBTStorage for SlimeEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for SlimeEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.living_entity.write_nbt(nbt).await;
nbt.put_int("Size", self.get_size() - 1);
nbt.put_bool("wasOnGround", self.was_on_ground.load(Ordering::Relaxed));
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.entity.living_entity.read_nbt_non_mut(nbt).await;
self.set_size(nbt.get_int("Size").unwrap_or(0) + 1, false);
self.was_on_ground.store(
nbt.get_bool("wasOnGround").unwrap_or(false),
@ -283,9 +281,7 @@ impl NBTStorage for SlimeEntity {
);
})
}
}
impl Mob for SlimeEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, revenge::RevengeGoal,
@ -63,8 +63,6 @@ impl SpiderEntity {
}
}
impl NBTStorage for SpiderEntity {}
impl Mob for SpiderEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl VexEntity {
}
}
impl NBTStorage for VexEntity {}
impl Mob for VexEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -65,8 +65,6 @@ impl VindicatorEntity {
}
}
impl NBTStorage for VindicatorEntity {}
impl Mob for VindicatorEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl WardenEntity {
}
}
impl NBTStorage for WardenEntity {}
impl Mob for WardenEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, revenge::RevengeGoal, swim::SwimGoal,
@ -58,8 +58,6 @@ impl WitchEntity {
}
}
impl NBTStorage for WitchEntity {}
impl Mob for WitchEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
active_target::ActiveTargetGoal, look_around::RandomLookAroundGoal,
look_at_entity::LookAtEntityGoal, melee_attack::MeleeAttackGoal, swim::SwimGoal,
@ -57,8 +57,6 @@ impl ZoglinEntity {
}
}
impl NBTStorage for ZoglinEntity {}
impl Mob for ZoglinEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use crate::entity::mob::zombie::ZombieEntityBase;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity},
};
@ -34,8 +34,6 @@ impl DrownedEntity {
}
}
impl NBTStorage for DrownedEntity {}
impl Mob for DrownedEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -2,7 +2,7 @@ use std::sync::Arc;
use crate::entity::mob::zombie::ZombieEntityBase;
use crate::entity::{
Entity, NBTStorage,
Entity,
mob::{Mob, MobEntity},
};
@ -18,8 +18,6 @@ impl HuskEntity {
}
}
impl NBTStorage for HuskEntity {}
impl Mob for HuskEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -6,11 +6,10 @@ use crate::entity::ai::goal::swim::SwimGoal;
use crate::entity::ai::goal::wander_around::WanderAroundGoal;
use crate::entity::ai::goal::zombie_attack::ZombieAttackGoal;
use crate::entity::{
Entity, NBTStorage, NbtFuture,
Entity,
ai::goal::{active_target::ActiveTargetGoal, look_at_entity::LookAtEntityGoal},
};
use pumpkin_data::entity::EntityType;
use pumpkin_nbt::compound::NbtCompound;
use std::sync::{Arc, Weak};
pub mod drowned;
@ -78,16 +77,6 @@ impl ZombieEntityBase {
}
}
impl NBTStorage for ZombieEntityBase {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
self.mob_entity.living_entity.write_nbt(nbt)
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
self.mob_entity.living_entity.read_nbt_non_mut(nbt)
}
}
impl Mob for ZombieEntityBase {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -1,6 +1,6 @@
use crate::entity::Entity;
use crate::entity::mob::zombie::ZombieEntityBase;
use crate::entity::mob::{Mob, MobEntity};
use crate::entity::{Entity, NBTStorage};
use std::sync::Arc;
pub struct ZombieEntity {
@ -15,8 +15,6 @@ impl ZombieEntity {
}
}
impl NBTStorage for ZombieEntity {}
impl Mob for ZombieEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.entity.mob_entity

View File

@ -1,6 +1,6 @@
use crate::entity::Entity;
use crate::entity::mob::zombie::ZombieEntityBase;
use crate::entity::mob::{Mob, MobEntity};
use crate::entity::{Entity, NBTStorage};
use std::sync::Arc;
pub struct ZombieVillagerEntity {
@ -15,8 +15,6 @@ impl ZombieVillagerEntity {
}
}
impl NBTStorage for ZombieVillagerEntity {}
impl Mob for ZombieVillagerEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal,
melee_attack::MeleeAttackGoal, swim::SwimGoal, wander_around::WanderAroundGoal,
@ -56,8 +56,6 @@ impl ZombifiedPiglinEntity {
}
}
impl NBTStorage for ZombifiedPiglinEntity {}
impl Mob for ZombifiedPiglinEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -136,7 +136,34 @@ pub type EntityBaseFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
pub type TeleportFuture = Pin<Box<dyn Future<Output = ()> + Send>>;
pub trait EntityBase: Send + Sync + NBTStorage + std::any::Any {
pub trait EntityBase: Send + Sync + std::any::Any {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.get_entity().write_nbt(nbt).await;
if let Some(living) = self.get_living_entity() {
living.write_living_nbt(nbt).await;
}
self.write_custom_nbt(nbt).await;
})
}
fn write_custom_nbt<'a>(&'a self, _nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.get_entity().read_nbt_non_mut(nbt).await;
if let Some(living) = self.get_living_entity() {
living.read_living_nbt_non_mut(nbt).await;
}
self.read_custom_nbt(nbt).await;
})
}
fn read_custom_nbt<'a>(&'a self, _nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {})
}
/// Called every tick for this entity.
///
/// The `caller` parameter is a reference to the entity that initiated the tick.
@ -761,9 +788,6 @@ pub trait EntityBase: Send + Sync + NBTStorage + std::any::Any {
})
}
/// Returns itself as the nbt storage for saving and loading data.
fn as_nbt_storage(&self) -> &dyn NBTStorage;
fn get_experience_reward(&self, _killer: Option<&dyn EntityBase>) -> u32 {
0
}
@ -3804,8 +3828,8 @@ impl Entity {
}
}
impl NBTStorage for Entity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Entity {
pub fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
let position = self.pos.load();
nbt.put_string(
@ -3870,7 +3894,7 @@ impl NBTStorage for Entity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
pub fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
if let Some(position) = nbt.get_list("Pos")
&& position.len() >= 3
@ -4028,9 +4052,15 @@ impl EntityBase for Entity {
fn cast_any(&self) -> &dyn std::any::Any {
self
}
}
fn as_nbt_storage(&self) -> &dyn NBTStorage {
self
impl<T: EntityBase + ?Sized> NBTStorage for T {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
EntityBase::write_nbt(self, nbt)
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
EntityBase::read_nbt_non_mut(self, nbt)
}
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl AllayEntity {
}
}
impl NBTStorage for AllayEntity {}
impl Mob for AllayEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -14,7 +14,7 @@ use pumpkin_protocol::codec::var_int::VarInt;
use pumpkin_protocol::java::client::play::Metadata;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ageable::{AgeableData, AgeableMob},
ai::goal::{
breed::BreedGoal, escape_danger::EscapeDangerGoal, follow_parent::FollowParentGoal,
@ -291,34 +291,6 @@ impl AgeableMob for ArmadilloEntity {
}
}
impl NBTStorage for ArmadilloEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_ageable_nbt(nbt);
self.write_animal_nbt(nbt);
nbt.put_string("state", self.get_state().name().to_string());
nbt.put_int("scute_time", self.scute_time.load(Ordering::Relaxed));
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_ageable_nbt(nbt);
self.read_animal_nbt(nbt);
if let Some(state_name) = nbt.get_string("state") {
self.switch_to_state(ArmadilloState::from_name(state_name));
} else if let Some(state_id) = nbt.get_int("state") {
self.switch_to_state(ArmadilloState::from_id(state_id));
}
if let Some(scute_time) = nbt.get_int("scute_time") {
self.scute_time.store(scute_time, Ordering::Relaxed);
}
})
}
}
impl Animal for ArmadilloEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
item_stack
@ -329,6 +301,34 @@ impl Animal for ArmadilloEntity {
}
impl Mob for ArmadilloEntity {
fn as_ageable(&self) -> Option<&dyn AgeableMob> {
Some(self)
}
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
nbt.put_string("state", self.get_state().name().to_string());
nbt.put_int("scute_time", self.scute_time.load(Ordering::Relaxed));
})
}
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
if let Some(state_name) = nbt.get_string("state") {
self.switch_to_state(ArmadilloState::from_name(state_name));
} else if let Some(state_id) = nbt.get_int("state") {
self.switch_to_state(ArmadilloState::from_id(state_id));
}
if let Some(scute_time) = nbt.get_int("scute_time") {
self.scute_time.store(scute_time, Ordering::Relaxed);
}
})
}
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl AxolotlEntity {
}
}
impl NBTStorage for AxolotlEntity {}
impl Mob for AxolotlEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl BeeEntity {
}
}
impl NBTStorage for BeeEntity {}
impl Mob for BeeEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl CamelEntity {
}
}
impl NBTStorage for CamelEntity {}
impl Mob for CamelEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,6 @@ use std::sync::{
atomic::{AtomicBool, AtomicU8, Ordering},
};
use crossbeam::atomic::AtomicCell;
use pumpkin_data::entity::{EntityStatus, EntityType};
use pumpkin_data::item::Item;
use pumpkin_data::item_stack::ItemStack;
@ -16,7 +15,7 @@ use rand::RngExt;
use uuid::Uuid;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ai::goal::{
active_target::ActiveTargetGoal, avoid_entity::AvoidEntityGoal, breed::BreedGoal,
escape_danger::EscapeDangerGoal, follow_owner::FollowOwnerGoal,
@ -25,7 +24,10 @@ use crate::entity::{
wander_around::WanderAroundGoal,
},
mob::{Mob, MobEntity},
passive::animal::Animal,
passive::{
animal::Animal,
tamable::{TamableAnimal, TamableData},
},
player::Player,
};
@ -75,11 +77,9 @@ pub struct CatEntity {
pub variant: AtomicU8,
pub sound_variant: AtomicU8,
pub collar_color: AtomicU8,
pub is_tame: AtomicBool,
pub is_sitting: AtomicBool,
pub tamable_data: TamableData,
pub is_lying: AtomicBool,
pub relax_state_one: AtomicBool,
pub owner: AtomicCell<Option<Uuid>>,
}
impl CatEntity {
@ -90,11 +90,9 @@ impl CatEntity {
variant: AtomicU8::new(1), // Default to black
sound_variant: AtomicU8::new(0), // Default to classic
collar_color: AtomicU8::new(14), // Default to red
is_tame: AtomicBool::new(false),
is_sitting: AtomicBool::new(false),
tamable_data: TamableData::default(),
is_lying: AtomicBool::new(false),
relax_state_one: AtomicBool::new(false),
owner: AtomicCell::new(None),
};
let mob_arc = Arc::new(cat);
let mob_weak: Weak<dyn Mob> = {
@ -160,7 +158,7 @@ impl CatEntity {
pub fn get_tame_flags(&self) -> u8 {
let mut flags = 0u8;
if self.is_sitting() {
if self.is_in_sitting_pose() {
flags |= 0x01;
}
if self.is_tame() {
@ -169,12 +167,8 @@ impl CatEntity {
flags
}
pub fn is_tame(&self) -> bool {
self.is_tame.load(Ordering::Relaxed)
}
pub fn is_sitting(&self) -> bool {
self.is_sitting.load(Ordering::Relaxed)
self.is_in_sitting_pose()
}
pub fn is_lying(&self) -> bool {
@ -202,7 +196,7 @@ impl CatEntity {
}
pub fn set_sitting(&self, sitting: bool) {
self.is_sitting.store(sitting, Ordering::Relaxed);
self.set_in_sitting_pose(sitting);
let entity = self.get_entity();
entity.send_meta_data(
&[Metadata::new(
@ -214,8 +208,8 @@ impl CatEntity {
}
pub fn set_tame(&self, tame: bool, owner: Option<Uuid>) {
self.is_tame.store(tame, Ordering::Relaxed);
self.owner.store(owner);
self.tamable_data.is_tame.store(tame, Ordering::Relaxed);
self.set_owner(owner);
let entity = self.get_entity();
entity.send_meta_data(
&[Metadata::new(
@ -233,6 +227,18 @@ impl CatEntity {
);
}
pub fn set_variant(&self, variant: u8) {
self.variant.store(variant, Ordering::Relaxed);
let entity = self.get_entity();
entity.send_meta_data(
&[Metadata::new(
pumpkin_data::tracked_data::cat::CAT_VARIANT,
VarInt(variant as i32),
)],
None,
);
}
pub fn set_lying(&self, lying: bool) {
self.is_lying.store(lying, Ordering::Relaxed);
let entity = self.get_entity();
@ -269,11 +275,30 @@ impl CatEntity {
}
}
impl NBTStorage for CatEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Animal for CatEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
let item = item_stack.get_item();
item.has_tag(&tag::Item::MINECRAFT_CAT_FOOD) || item == &Item::COD || item == &Item::SALMON
}
}
impl TamableAnimal for CatEntity {
fn get_tamable_data(&self) -> &TamableData {
&self.tamable_data
}
}
impl Mob for CatEntity {
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn as_tamable(&self) -> Option<&dyn TamableAnimal> {
Some(self)
}
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_animal_nbt(nbt);
let variant_str = match self.variant.load(Ordering::Relaxed) {
0 => "minecraft:all_black",
1 => "minecraft:black",
@ -293,18 +318,11 @@ impl NBTStorage for CatEntity {
"CollarColor",
self.collar_color.load(Ordering::Relaxed) as i8,
);
nbt.put_bool("IsTame", self.is_tame.load(Ordering::Relaxed));
nbt.put_bool("Sitting", self.is_sitting.load(Ordering::Relaxed));
if let Some(owner) = self.owner.load() {
nbt.put_uuid("Owner", owner);
}
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_animal_nbt(nbt);
if let Some(variant_str) = nbt.get_string("variant") {
let variant = match variant_str
.strip_prefix("minecraft:")
@ -329,39 +347,13 @@ impl NBTStorage for CatEntity {
} else if let Some(collar_int) = nbt.get_int("CollarColor") {
self.collar_color.store(collar_int as u8, Ordering::Relaxed);
}
if let Some(sitting) = nbt.get_bool("Sitting") {
self.is_sitting.store(sitting, Ordering::Relaxed);
}
if let Some(owner) = nbt.get_uuid("Owner") {
self.owner.store(Some(owner));
self.is_tame.store(true, Ordering::Relaxed);
} else if let Some(is_tame) = nbt.get_bool("IsTame") {
self.is_tame.store(is_tame, Ordering::Relaxed);
}
})
}
}
impl Animal for CatEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
let item = item_stack.get_item();
item.has_tag(&tag::Item::MINECRAFT_CAT_FOOD) || item == &Item::COD || item == &Item::SALMON
}
}
impl Mob for CatEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}
fn get_owner_uuid(&self) -> Option<Uuid> {
self.owner.load()
}
fn is_sitting(&self) -> bool {
self.is_sitting.load(Ordering::Relaxed)
}
fn mob_set_variant_name(&self, name: &str) {
let variant = match name.strip_prefix("minecraft:").unwrap_or(name) {
"all_black" => 0,
@ -402,7 +394,7 @@ impl Mob for CatEntity {
entity.send_meta_data(
&[Metadata::new(
pumpkin_data::tracked_data::cat::OWNER_UUID,
self.owner.load(),
self.get_owner(),
)],
None,
);

View File

@ -10,7 +10,7 @@ use pumpkin_protocol::codec::var_int::VarInt;
use rand::RngExt;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ageable::AgeableMob,
ai::goal::{
breed::BreedGoal, escape_danger::EscapeDangerGoal, follow_parent::FollowParentGoal,
@ -82,18 +82,33 @@ impl ChickenEntity {
}
}
impl crate::entity::ageable::AgeableMob for ChickenEntity {
impl AgeableMob for ChickenEntity {
fn get_ageable_data(&self) -> &crate::entity::ageable::AgeableData {
&self.ageable_data
}
}
impl NBTStorage for ChickenEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Animal for ChickenEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
use pumpkin_data::tag::Taggable;
item_stack
.item
.has_tag(&pumpkin_data::tag::Item::MINECRAFT_CHICKEN_FOOD)
|| TEMPT_ITEMS.iter().any(|i| i.id == item_stack.item.id)
}
}
impl Mob for ChickenEntity {
fn as_ageable(&self) -> Option<&dyn AgeableMob> {
Some(self)
}
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_ageable_nbt(nbt);
self.write_animal_nbt(nbt);
nbt.put_int("EggLayTime", self.egg_lay_time.load(Ordering::Relaxed));
let variant_str = match self.variant.load(Ordering::Relaxed) {
0 => "minecraft:cold",
@ -104,11 +119,8 @@ impl NBTStorage for ChickenEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_ageable_nbt(nbt);
self.read_animal_nbt(nbt);
self.egg_lay_time
.store(nbt.get_int("EggLayTime").unwrap_or(6000), Ordering::Relaxed);
if let Some(variant_str) = nbt.get_string("variant") {
@ -124,19 +136,7 @@ impl NBTStorage for ChickenEntity {
}
})
}
}
impl super::animal::Animal for ChickenEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
use pumpkin_data::tag::Taggable;
item_stack
.item
.has_tag(&pumpkin_data::tag::Item::MINECRAFT_CHICKEN_FOOD)
|| TEMPT_ITEMS.iter().any(|i| i.id == item_stack.item.id)
}
}
impl Mob for ChickenEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl CodEntity {
}
}
impl NBTStorage for CodEntity {}
impl Mob for CodEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -13,7 +13,7 @@ use pumpkin_protocol::codec::var_int::VarInt;
use pumpkin_protocol::java::client::play::Metadata;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -202,10 +202,9 @@ impl CopperGolemEntity {
}
}
impl NBTStorage for CopperGolemEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for CopperGolemEntity {
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
nbt.put_long(
"next_weather_age",
self.next_weathering_tick.load(Ordering::Relaxed),
@ -214,9 +213,8 @@ impl NBTStorage for CopperGolemEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
if let Some(next) = nbt.get_long("next_weather_age") {
self.next_weathering_tick.store(next, Ordering::Relaxed);
}
@ -225,9 +223,7 @@ impl NBTStorage for CopperGolemEntity {
}
})
}
}
impl Mob for CopperGolemEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -5,7 +5,7 @@ use pumpkin_data::sound::Sound;
use pumpkin_data::{entity::EntityType, item::Item};
use crate::entity::{
Entity, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBaseFuture,
ageable::AgeableMob,
ai::goal::{
breed::BreedGoal, escape_danger::EscapeDangerGoal, follow_parent::FollowParentGoal,
@ -16,7 +16,6 @@ use crate::entity::{
passive::animal::Animal,
player::Player,
};
use pumpkin_nbt::compound::NbtCompound;
const TEMPT_ITEMS: &[&Item] = &[&Item::WHEAT];
@ -65,31 +64,13 @@ impl CowEntity {
}
}
impl crate::entity::ageable::AgeableMob for CowEntity {
impl AgeableMob for CowEntity {
fn get_ageable_data(&self) -> &crate::entity::ageable::AgeableData {
&self.ageable_data
}
}
impl NBTStorage for CowEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_ageable_nbt(nbt);
self.write_animal_nbt(nbt);
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_ageable_nbt(nbt);
self.read_animal_nbt(nbt);
})
}
}
impl super::animal::Animal for CowEntity {
impl Animal for CowEntity {
fn is_food(&self, item_stack: &ItemStack) -> bool {
use pumpkin_data::tag::Taggable;
item_stack
@ -100,6 +81,14 @@ impl super::animal::Animal for CowEntity {
}
impl Mob for CowEntity {
fn as_ageable(&self) -> Option<&dyn AgeableMob> {
Some(self)
}
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}
@ -109,7 +98,6 @@ impl Mob for CowEntity {
player: &'a Arc<Player>,
item_stack: &'a mut ItemStack,
) -> EntityBaseFuture<'a, bool> {
use super::animal::Animal;
self.animal_interact(player, item_stack, Sound::EntityCowAmbient)
}
}

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl DolphinEntity {
}
}
impl NBTStorage for DolphinEntity {}
impl Mob for DolphinEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -3,7 +3,7 @@ use std::sync::{Arc, Weak};
use pumpkin_data::entity::EntityType;
use crate::entity::{
Entity, NBTStorage,
Entity,
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
wander_around::WanderAroundGoal,
@ -48,8 +48,6 @@ impl DonkeyEntity {
}
}
impl NBTStorage for DonkeyEntity {}
impl Mob for DonkeyEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity

View File

@ -13,7 +13,7 @@ use pumpkin_protocol::codec::var_int::VarInt;
use pumpkin_protocol::java::client::play::Metadata;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ageable::{AgeableData, AgeableMob},
ai::goal::{
breed::BreedGoal, escape_danger::EscapeDangerGoal, follow_parent::FollowParentGoal,
@ -239,12 +239,17 @@ impl Animal for FoxEntity {
}
}
impl NBTStorage for FoxEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for FoxEntity {
fn as_ageable(&self) -> Option<&dyn AgeableMob> {
Some(self)
}
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_ageable_nbt(nbt);
self.write_animal_nbt(nbt);
nbt.put_string("Type", self.get_variant().as_str().to_string());
nbt.put_bool("Sleeping", self.is_sleeping());
nbt.put_bool("Sitting", self.is_sitting());
@ -252,11 +257,8 @@ impl NBTStorage for FoxEntity {
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_ageable_nbt(nbt);
self.read_animal_nbt(nbt);
if let Some(variant_str) = nbt.get_string("Type") {
self.set_variant(FoxVariant::from_name(variant_str));
}
@ -271,9 +273,7 @@ impl NBTStorage for FoxEntity {
}
})
}
}
impl Mob for FoxEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

View File

@ -13,7 +13,7 @@ use pumpkin_protocol::codec::var_int::VarInt;
use pumpkin_protocol::java::client::play::Metadata;
use crate::entity::{
Entity, EntityBase, EntityBaseFuture, NBTStorage, NbtFuture,
Entity, EntityBase, EntityBaseFuture, NbtFuture,
ageable::{AgeableData, AgeableMob},
ai::goal::{
look_around::RandomLookAroundGoal, look_at_entity::LookAtEntityGoal, swim::SwimGoal,
@ -145,29 +145,29 @@ impl Animal for FrogEntity {
}
}
impl NBTStorage for FrogEntity {
fn write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
impl Mob for FrogEntity {
fn as_ageable(&self) -> Option<&dyn AgeableMob> {
Some(self)
}
fn as_animal(&self) -> Option<&dyn Animal> {
Some(self)
}
fn mob_write_nbt<'a>(&'a self, nbt: &'a mut NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.write_nbt(nbt).await;
self.write_ageable_nbt(nbt);
self.write_animal_nbt(nbt);
nbt.put_string("variant", self.get_variant().as_str().to_string());
})
}
fn read_nbt_non_mut<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
fn mob_read_nbt<'a>(&'a self, nbt: &'a NbtCompound) -> NbtFuture<'a, ()> {
Box::pin(async move {
self.mob_entity.living_entity.read_nbt_non_mut(nbt).await;
self.read_ageable_nbt(nbt);
self.read_animal_nbt(nbt);
if let Some(variant_str) = nbt.get_string("variant") {
self.set_variant(FrogVariant::from_name(variant_str));
}
})
}
}
impl Mob for FrogEntity {
fn get_mob_entity(&self) -> &MobEntity {
&self.mob_entity
}

Some files were not shown because too many files have changed in this diff Show More