Skip to main content

steel_registry/generated/
vanilla_entity_data.rs

1use crate :: entity_data :: { ArmadilloState , BlockPos , DataValue , Direction , EntityData , EntityPose , ColorParticleOption , GlobalPos , HumanoidArm , ParticleData , ParticleList , Quaternionf , ResolvableProfile , Rotations , SnifferState , SyncedValue , Vector3f , VillagerData , } ; use crate :: item_stack :: ItemStack ; use steel_utils :: { ArgbColor , BlockStateId , random :: Random } ; use text_components :: TextComponent ; use uuid :: Uuid ; use crate :: { RegistryEntry , RegistryExt , RegistryReference } ; # [doc = r" Common access to the vanilla synchronized entity data root layer."] pub trait VanillaEntityData { # [doc = r" Returns the shared vanilla base entity-data layer."] fn base (& self) -> & BaseEntityData ; # [doc = r" Returns the mutable shared vanilla base entity-data layer."] fn base_mut (& mut self) -> & mut BaseEntityData ; # [doc = r" Packs dirty values for network sync, clearing dirty flags."] fn pack_dirty (& mut self) -> Option < Vec < DataValue >> ; # [doc = r" Packs all non-default values for initial entity spawn."] fn pack_all (& self) -> Vec < DataValue > ; # [doc = r" Returns `true` if any field has been modified."] fn is_dirty (& self) -> bool ; } # [doc = r" Common access to vanilla synchronized data declared by `LivingEntity`."] pub trait VanillaLivingEntityData : VanillaEntityData { # [doc = r" Returns the vanilla living entity-data layer."] fn living_entity (& self) -> & LivingEntityData ; # [doc = r" Returns the mutable vanilla living entity-data layer."] fn living_entity_mut (& mut self) -> & mut LivingEntityData ; } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BaseEntityData { pub shared_flags : SyncedValue < i8 > , pub air_supply : SyncedValue < i32 > , pub custom_name : SyncedValue < Option < Box < TextComponent >> > , pub custom_name_visible : SyncedValue < bool > , pub silent : SyncedValue < bool > , pub no_gravity : SyncedValue < bool > , pub pose : SyncedValue < EntityPose > , pub ticks_frozen : SyncedValue < i32 > } impl BaseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { shared_flags : SyncedValue :: new (0i8) , air_supply : SyncedValue :: new (300i32) , custom_name : SyncedValue :: new (None) , custom_name_visible : SyncedValue :: new (false) , silent : SyncedValue :: new (false) , no_gravity : SyncedValue :: new (false) , pose : SyncedValue :: new (EntityPose :: Standing) , ticks_frozen : SyncedValue :: new (0i32) } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { self } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { self } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { if self . shared_flags . is_dirty () { values . push (DataValue { index : 0u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . shared_flags . get ()) , }) ; self . shared_flags . clear_dirty () ; } if self . air_supply . is_dirty () { values . push (DataValue { index : 1u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . air_supply . get ()) , }) ; self . air_supply . clear_dirty () ; } if self . custom_name . is_dirty () { values . push (DataValue { index : 2u8 , serializer_id : 6i32 , value : EntityData :: OptionalComponent (self . custom_name . get () . clone ()) , }) ; self . custom_name . clear_dirty () ; } if self . custom_name_visible . is_dirty () { values . push (DataValue { index : 3u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . custom_name_visible . get ()) , }) ; self . custom_name_visible . clear_dirty () ; } if self . silent . is_dirty () { values . push (DataValue { index : 4u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . silent . get ()) , }) ; self . silent . clear_dirty () ; } if self . no_gravity . is_dirty () { values . push (DataValue { index : 5u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . no_gravity . get ()) , }) ; self . no_gravity . clear_dirty () ; } if self . pose . is_dirty () { values . push (DataValue { index : 6u8 , serializer_id : 20i32 , value : EntityData :: Pose (* self . pose . get ()) , }) ; self . pose . clear_dirty () ; } if self . ticks_frozen . is_dirty () { values . push (DataValue { index : 7u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . ticks_frozen . get ()) , }) ; self . ticks_frozen . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { if ! self . shared_flags . is_default () { values . push (DataValue { index : 0u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . shared_flags . get ()) , }) ; } if ! self . air_supply . is_default () { values . push (DataValue { index : 1u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . air_supply . get ()) , }) ; } if ! self . custom_name . is_default () { values . push (DataValue { index : 2u8 , serializer_id : 6i32 , value : EntityData :: OptionalComponent (self . custom_name . get () . clone ()) , }) ; } if ! self . custom_name_visible . is_default () { values . push (DataValue { index : 3u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . custom_name_visible . get ()) , }) ; } if ! self . silent . is_default () { values . push (DataValue { index : 4u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . silent . get ()) , }) ; } if ! self . no_gravity . is_default () { values . push (DataValue { index : 5u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . no_gravity . get ()) , }) ; } if ! self . pose . is_default () { values . push (DataValue { index : 6u8 , serializer_id : 20i32 , value : EntityData :: Pose (* self . pose . get ()) , }) ; } if ! self . ticks_frozen . is_default () { values . push (DataValue { index : 7u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . ticks_frozen . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . shared_flags . is_dirty () || self . air_supply . is_dirty () || self . custom_name . is_dirty () || self . custom_name_visible . is_dirty () || self . silent . is_dirty () || self . no_gravity . is_dirty () || self . pose . is_dirty () || self . ticks_frozen . is_dirty () } } impl Default for BaseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BaseEntityData { fn base (& self) -> & BaseEntityData { BaseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BaseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BaseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BaseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BaseEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct VehicleEntityData { pub base : BaseEntityData , pub id_hurt : SyncedValue < i32 > , pub id_hurtdir : SyncedValue < i32 > , pub id_damage : SyncedValue < f32 > } impl VehicleEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , id_hurt : SyncedValue :: new (0i32) , id_hurtdir : SyncedValue :: new (1i32) , id_damage : SyncedValue :: new (0f32) } } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { self } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . id_hurt . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_hurt . get ()) , }) ; self . id_hurt . clear_dirty () ; } if self . id_hurtdir . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_hurtdir . get ()) , }) ; self . id_hurtdir . clear_dirty () ; } if self . id_damage . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . id_damage . get ()) , }) ; self . id_damage . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . id_hurt . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_hurt . get ()) , }) ; } if ! self . id_hurtdir . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_hurtdir . get ()) , }) ; } if ! self . id_damage . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . id_damage . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . id_hurt . is_dirty () || self . id_hurtdir . is_dirty () || self . id_damage . is_dirty () } } impl Default for VehicleEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for VehicleEntityData { fn base (& self) -> & BaseEntityData { VehicleEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { VehicleEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { VehicleEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { VehicleEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { VehicleEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractBoatEntityData { pub vehicle_entity : VehicleEntityData , pub id_paddle_left : SyncedValue < bool > , pub id_paddle_right : SyncedValue < bool > , pub id_bubble_time : SyncedValue < i32 > } impl AbstractBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { vehicle_entity : VehicleEntityData :: new () , id_paddle_left : SyncedValue :: new (false) , id_paddle_right : SyncedValue :: new (false) , id_bubble_time : SyncedValue :: new (0i32) } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { self } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { self } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . vehicle_entity . pack_dirty_into (values) ; if self . id_paddle_left . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_paddle_left . get ()) , }) ; self . id_paddle_left . clear_dirty () ; } if self . id_paddle_right . is_dirty () { values . push (DataValue { index : 12u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_paddle_right . get ()) , }) ; self . id_paddle_right . clear_dirty () ; } if self . id_bubble_time . is_dirty () { values . push (DataValue { index : 13u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_bubble_time . get ()) , }) ; self . id_bubble_time . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . vehicle_entity . pack_all_into (values) ; if ! self . id_paddle_left . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_paddle_left . get ()) , }) ; } if ! self . id_paddle_right . is_default () { values . push (DataValue { index : 12u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_paddle_right . get ()) , }) ; } if ! self . id_bubble_time . is_default () { values . push (DataValue { index : 13u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_bubble_time . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . vehicle_entity . is_dirty () || self . id_paddle_left . is_dirty () || self . id_paddle_right . is_dirty () || self . id_bubble_time . is_dirty () } } impl Default for AbstractBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractBoatEntityData { fn base (& self) -> & BaseEntityData { AbstractBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractBoatEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct LivingEntityData { pub base : BaseEntityData , pub living_entity_flags : SyncedValue < i8 > , pub health : SyncedValue < f32 > , pub effect_particles : SyncedValue < ParticleList > , pub effect_ambience : SyncedValue < bool > , pub arrow_count : SyncedValue < i32 > , pub stinger_count : SyncedValue < i32 > , pub sleeping_pos : SyncedValue < Option < BlockPos > > } impl LivingEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , living_entity_flags : SyncedValue :: new (0i8) , health : SyncedValue :: new (1f32) , effect_particles : SyncedValue :: new (ParticleList :: default ()) , effect_ambience : SyncedValue :: new (false) , arrow_count : SyncedValue :: new (0i32) , stinger_count : SyncedValue :: new (0i32) , sleeping_pos : SyncedValue :: new (None) } } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { self } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . living_entity_flags . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . living_entity_flags . get ()) , }) ; self . living_entity_flags . clear_dirty () ; } if self . health . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . health . get ()) , }) ; self . health . clear_dirty () ; } if self . effect_particles . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 17i32 , value : EntityData :: Particles (self . effect_particles . get () . clone ()) , }) ; self . effect_particles . clear_dirty () ; } if self . effect_ambience . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . effect_ambience . get ()) , }) ; self . effect_ambience . clear_dirty () ; } if self . arrow_count . is_dirty () { values . push (DataValue { index : 12u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . arrow_count . get ()) , }) ; self . arrow_count . clear_dirty () ; } if self . stinger_count . is_dirty () { values . push (DataValue { index : 13u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . stinger_count . get ()) , }) ; self . stinger_count . clear_dirty () ; } if self . sleeping_pos . is_dirty () { values . push (DataValue { index : 14u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . sleeping_pos . get () . clone ()) , }) ; self . sleeping_pos . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . living_entity_flags . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . living_entity_flags . get ()) , }) ; } if ! self . health . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . health . get ()) , }) ; } if ! self . effect_particles . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 17i32 , value : EntityData :: Particles (self . effect_particles . get () . clone ()) , }) ; } if ! self . effect_ambience . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . effect_ambience . get ()) , }) ; } if ! self . arrow_count . is_default () { values . push (DataValue { index : 12u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . arrow_count . get ()) , }) ; } if ! self . stinger_count . is_default () { values . push (DataValue { index : 13u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . stinger_count . get ()) , }) ; } if ! self . sleeping_pos . is_default () { values . push (DataValue { index : 14u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . sleeping_pos . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . living_entity_flags . is_dirty () || self . health . is_dirty () || self . effect_particles . is_dirty () || self . effect_ambience . is_dirty () || self . arrow_count . is_dirty () || self . stinger_count . is_dirty () || self . sleeping_pos . is_dirty () } } impl Default for LivingEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LivingEntityData { fn base (& self) -> & BaseEntityData { LivingEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LivingEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LivingEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LivingEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LivingEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for LivingEntityData { fn living_entity (& self) -> & LivingEntityData { LivingEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { LivingEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct MobEntityData { pub living_entity : LivingEntityData , pub mob_flags : SyncedValue < i8 > } impl MobEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { living_entity : LivingEntityData :: new () , mob_flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { self } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { self } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . living_entity . pack_dirty_into (values) ; if self . mob_flags . is_dirty () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . mob_flags . get ()) , }) ; self . mob_flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . living_entity . pack_all_into (values) ; if ! self . mob_flags . is_default () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . mob_flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . living_entity . is_dirty () || self . mob_flags . is_dirty () } } impl Default for MobEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MobEntityData { fn base (& self) -> & BaseEntityData { MobEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MobEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MobEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MobEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MobEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MobEntityData { fn living_entity (& self) -> & LivingEntityData { MobEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MobEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AllayEntityData { pub mob : MobEntityData , pub dancing : SyncedValue < bool > , pub can_duplicate : SyncedValue < bool > } impl AllayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , dancing : SyncedValue :: new (false) , can_duplicate : SyncedValue :: new (true) } } # [doc = "Returns the `AllayEntityData` layer."] pub fn allay (& self) -> & AllayEntityData { self } # [doc = "Returns the mutable `AllayEntityData` layer."] pub fn allay_mut (& mut self) -> & mut AllayEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . dancing . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dancing . get ()) , }) ; self . dancing . clear_dirty () ; } if self . can_duplicate . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . can_duplicate . get ()) , }) ; self . can_duplicate . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . dancing . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dancing . get ()) , }) ; } if ! self . can_duplicate . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . can_duplicate . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . dancing . is_dirty () || self . can_duplicate . is_dirty () } } impl Default for AllayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AllayEntityData { fn base (& self) -> & BaseEntityData { AllayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AllayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AllayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AllayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AllayEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AllayEntityData { fn living_entity (& self) -> & LivingEntityData { AllayEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AllayEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AreaEffectCloudEntityData { pub base : BaseEntityData , pub radius : SyncedValue < f32 > , pub waiting : SyncedValue < bool > , pub particle : SyncedValue < ParticleData > } impl AreaEffectCloudEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , radius : SyncedValue :: new (3f32) , waiting : SyncedValue :: new (false) , particle : SyncedValue :: new (ParticleData :: new (& crate :: vanilla_particle_types :: ENTITY_EFFECT , ColorParticleOption :: new (ArgbColor :: new (- 1i32)) ,)) } } # [doc = "Returns the `AreaEffectCloudEntityData` layer."] pub fn area_effect_cloud (& self) -> & AreaEffectCloudEntityData { self } # [doc = "Returns the mutable `AreaEffectCloudEntityData` layer."] pub fn area_effect_cloud_mut (& mut self) -> & mut AreaEffectCloudEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . radius . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . radius . get ()) , }) ; self . radius . clear_dirty () ; } if self . waiting . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . waiting . get ()) , }) ; self . waiting . clear_dirty () ; } if self . particle . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 16i32 , value : EntityData :: Particle (self . particle . get () . clone ()) , }) ; self . particle . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . radius . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . radius . get ()) , }) ; } if ! self . waiting . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . waiting . get ()) , }) ; } if ! self . particle . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 16i32 , value : EntityData :: Particle (self . particle . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . radius . is_dirty () || self . waiting . is_dirty () || self . particle . is_dirty () } } impl Default for AreaEffectCloudEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AreaEffectCloudEntityData { fn base (& self) -> & BaseEntityData { AreaEffectCloudEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AreaEffectCloudEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AreaEffectCloudEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AreaEffectCloudEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AreaEffectCloudEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AgeableMobEntityData { pub mob : MobEntityData , pub baby : SyncedValue < bool > , pub age_locked : SyncedValue < bool > } impl AgeableMobEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , baby : SyncedValue :: new (false) , age_locked : SyncedValue :: new (false) } } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { self } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . baby . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; self . baby . clear_dirty () ; } if self . age_locked . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . age_locked . get ()) , }) ; self . age_locked . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . baby . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; } if ! self . age_locked . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . age_locked . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . baby . is_dirty () || self . age_locked . is_dirty () } } impl Default for AgeableMobEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AgeableMobEntityData { fn base (& self) -> & BaseEntityData { AgeableMobEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AgeableMobEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AgeableMobEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AgeableMobEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AgeableMobEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AgeableMobEntityData { fn living_entity (& self) -> & LivingEntityData { AgeableMobEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AgeableMobEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ArmadilloEntityData { pub ageable_mob : AgeableMobEntityData , pub armadillo_state : SyncedValue < ArmadilloState > } impl ArmadilloEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , armadillo_state : SyncedValue :: new (ArmadilloState :: Idle) } } # [doc = "Returns the `ArmadilloEntityData` layer."] pub fn armadillo (& self) -> & ArmadilloEntityData { self } # [doc = "Returns the mutable `ArmadilloEntityData` layer."] pub fn armadillo_mut (& mut self) -> & mut ArmadilloEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . armadillo_state . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 36i32 , value : EntityData :: ArmadilloState (* self . armadillo_state . get ()) , }) ; self . armadillo_state . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . armadillo_state . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 36i32 , value : EntityData :: ArmadilloState (* self . armadillo_state . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . armadillo_state . is_dirty () } } impl Default for ArmadilloEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ArmadilloEntityData { fn base (& self) -> & BaseEntityData { ArmadilloEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ArmadilloEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ArmadilloEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ArmadilloEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ArmadilloEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ArmadilloEntityData { fn living_entity (& self) -> & LivingEntityData { ArmadilloEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ArmadilloEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ArmorStandEntityData { pub living_entity : LivingEntityData , pub client_flags : SyncedValue < i8 > , pub head_pose : SyncedValue < Rotations > , pub body_pose : SyncedValue < Rotations > , pub left_arm_pose : SyncedValue < Rotations > , pub right_arm_pose : SyncedValue < Rotations > , pub left_leg_pose : SyncedValue < Rotations > , pub right_leg_pose : SyncedValue < Rotations > } impl ArmorStandEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { living_entity : LivingEntityData :: new () , client_flags : SyncedValue :: new (0i8) , head_pose : SyncedValue :: new (Rotations :: new (0f32 , 0f32 , 0f32)) , body_pose : SyncedValue :: new (Rotations :: new (0f32 , 0f32 , 0f32)) , left_arm_pose : SyncedValue :: new (Rotations :: new (- 10f32 , 0f32 , - 10f32)) , right_arm_pose : SyncedValue :: new (Rotations :: new (- 15f32 , 0f32 , 10f32)) , left_leg_pose : SyncedValue :: new (Rotations :: new (- 1f32 , 0f32 , - 1f32)) , right_leg_pose : SyncedValue :: new (Rotations :: new (1f32 , 0f32 , 1f32)) } } # [doc = "Returns the `ArmorStandEntityData` layer."] pub fn armor_stand (& self) -> & ArmorStandEntityData { self } # [doc = "Returns the mutable `ArmorStandEntityData` layer."] pub fn armor_stand_mut (& mut self) -> & mut ArmorStandEntityData { self } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . living_entity . pack_dirty_into (values) ; if self . client_flags . is_dirty () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . client_flags . get ()) , }) ; self . client_flags . clear_dirty () ; } if self . head_pose . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . head_pose . get ()) , }) ; self . head_pose . clear_dirty () ; } if self . body_pose . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . body_pose . get ()) , }) ; self . body_pose . clear_dirty () ; } if self . left_arm_pose . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . left_arm_pose . get ()) , }) ; self . left_arm_pose . clear_dirty () ; } if self . right_arm_pose . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . right_arm_pose . get ()) , }) ; self . right_arm_pose . clear_dirty () ; } if self . left_leg_pose . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . left_leg_pose . get ()) , }) ; self . left_leg_pose . clear_dirty () ; } if self . right_leg_pose . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . right_leg_pose . get ()) , }) ; self . right_leg_pose . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . living_entity . pack_all_into (values) ; if ! self . client_flags . is_default () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . client_flags . get ()) , }) ; } if ! self . head_pose . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . head_pose . get ()) , }) ; } if ! self . body_pose . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . body_pose . get ()) , }) ; } if ! self . left_arm_pose . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . left_arm_pose . get ()) , }) ; } if ! self . right_arm_pose . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . right_arm_pose . get ()) , }) ; } if ! self . left_leg_pose . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . left_leg_pose . get ()) , }) ; } if ! self . right_leg_pose . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 9i32 , value : EntityData :: Rotations (* self . right_leg_pose . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . living_entity . is_dirty () || self . client_flags . is_dirty () || self . head_pose . is_dirty () || self . body_pose . is_dirty () || self . left_arm_pose . is_dirty () || self . right_arm_pose . is_dirty () || self . left_leg_pose . is_dirty () || self . right_leg_pose . is_dirty () } } impl Default for ArmorStandEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ArmorStandEntityData { fn base (& self) -> & BaseEntityData { ArmorStandEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ArmorStandEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ArmorStandEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ArmorStandEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ArmorStandEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ArmorStandEntityData { fn living_entity (& self) -> & LivingEntityData { ArmorStandEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ArmorStandEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractArrowEntityData { pub base : BaseEntityData , pub id_flags : SyncedValue < i8 > , pub pierce_level : SyncedValue < i8 > , pub in_ground : SyncedValue < bool > } impl AbstractArrowEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , id_flags : SyncedValue :: new (0i8) , pierce_level : SyncedValue :: new (0i8) , in_ground : SyncedValue :: new (false) } } # [doc = "Returns the `AbstractArrowEntityData` layer."] pub fn abstract_arrow (& self) -> & AbstractArrowEntityData { self } # [doc = "Returns the mutable `AbstractArrowEntityData` layer."] pub fn abstract_arrow_mut (& mut self) -> & mut AbstractArrowEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . id_flags . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; self . id_flags . clear_dirty () ; } if self . pierce_level . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . pierce_level . get ()) , }) ; self . pierce_level . clear_dirty () ; } if self . in_ground . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . in_ground . get ()) , }) ; self . in_ground . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . id_flags . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; } if ! self . pierce_level . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . pierce_level . get ()) , }) ; } if ! self . in_ground . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . in_ground . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . id_flags . is_dirty () || self . pierce_level . is_dirty () || self . in_ground . is_dirty () } } impl Default for AbstractArrowEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractArrowEntityData { fn base (& self) -> & BaseEntityData { AbstractArrowEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractArrowEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractArrowEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractArrowEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractArrowEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ArrowEntityData { pub abstract_arrow : AbstractArrowEntityData , pub id_effect_color : SyncedValue < i32 > } impl ArrowEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_arrow : AbstractArrowEntityData :: new () , id_effect_color : SyncedValue :: new (- 1i32) } } # [doc = "Returns the `ArrowEntityData` layer."] pub fn arrow (& self) -> & ArrowEntityData { self } # [doc = "Returns the mutable `ArrowEntityData` layer."] pub fn arrow_mut (& mut self) -> & mut ArrowEntityData { self } # [doc = "Returns the `AbstractArrowEntityData` layer."] pub fn abstract_arrow (& self) -> & AbstractArrowEntityData { & self . abstract_arrow } # [doc = "Returns the mutable `AbstractArrowEntityData` layer."] pub fn abstract_arrow_mut (& mut self) -> & mut AbstractArrowEntityData { & mut self . abstract_arrow } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_arrow . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_arrow . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_arrow . pack_dirty_into (values) ; if self . id_effect_color . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_effect_color . get ()) , }) ; self . id_effect_color . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_arrow . pack_all_into (values) ; if ! self . id_effect_color . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_effect_color . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_arrow . is_dirty () || self . id_effect_color . is_dirty () } } impl Default for ArrowEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ArrowEntityData { fn base (& self) -> & BaseEntityData { ArrowEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ArrowEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ArrowEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ArrowEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ArrowEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AxolotlEntityData { pub ageable_mob : AgeableMobEntityData , pub variant : SyncedValue < i32 > , pub playing_dead : SyncedValue < bool > , pub from_bucket : SyncedValue < bool > } impl AxolotlEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = Self { ageable_mob : AgeableMobEntityData :: new () , variant : SyncedValue :: new (0i32) , playing_dead : SyncedValue :: new (false) , from_bucket : SyncedValue :: new (false) } ; data . ageable_mob . mob . living_entity . base . air_supply = SyncedValue :: new (6000i32) ; data } # [doc = "Returns the `AxolotlEntityData` layer."] pub fn axolotl (& self) -> & AxolotlEntityData { self } # [doc = "Returns the mutable `AxolotlEntityData` layer."] pub fn axolotl_mut (& mut self) -> & mut AxolotlEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . playing_dead . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . playing_dead . get ()) , }) ; self . playing_dead . clear_dirty () ; } if self . from_bucket . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; self . from_bucket . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; } if ! self . playing_dead . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . playing_dead . get ()) , }) ; } if ! self . from_bucket . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant . is_dirty () || self . playing_dead . is_dirty () || self . from_bucket . is_dirty () } } impl Default for AxolotlEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AxolotlEntityData { fn base (& self) -> & BaseEntityData { AxolotlEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AxolotlEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AxolotlEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AxolotlEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AxolotlEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AxolotlEntityData { fn living_entity (& self) -> & LivingEntityData { AxolotlEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AxolotlEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BatEntityData { pub mob : MobEntityData , pub id_flags : SyncedValue < i8 > } impl BatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , id_flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `BatEntityData` layer."] pub fn bat (& self) -> & BatEntityData { self } # [doc = "Returns the mutable `BatEntityData` layer."] pub fn bat_mut (& mut self) -> & mut BatEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . id_flags . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; self . id_flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . id_flags . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . id_flags . is_dirty () } } impl Default for BatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BatEntityData { fn base (& self) -> & BaseEntityData { BatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BatEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for BatEntityData { fn living_entity (& self) -> & LivingEntityData { BatEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { BatEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BeeEntityData { pub ageable_mob : AgeableMobEntityData , pub flags : SyncedValue < i8 > , pub anger_end_time : SyncedValue < i64 > } impl BeeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , flags : SyncedValue :: new (0i8) , anger_end_time : SyncedValue :: new (- 1i64) } } # [doc = "Returns the `BeeEntityData` layer."] pub fn bee (& self) -> & BeeEntityData { self } # [doc = "Returns the mutable `BeeEntityData` layer."] pub fn bee_mut (& mut self) -> & mut BeeEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } if self . anger_end_time . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . anger_end_time . get ()) , }) ; self . anger_end_time . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } if ! self . anger_end_time . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . anger_end_time . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . flags . is_dirty () || self . anger_end_time . is_dirty () } } impl Default for BeeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BeeEntityData { fn base (& self) -> & BaseEntityData { BeeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BeeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BeeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BeeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BeeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for BeeEntityData { fn living_entity (& self) -> & LivingEntityData { BeeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { BeeEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BlazeEntityData { pub mob : MobEntityData , pub flags : SyncedValue < i8 > } impl BlazeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `BlazeEntityData` layer."] pub fn blaze (& self) -> & BlazeEntityData { self } # [doc = "Returns the mutable `BlazeEntityData` layer."] pub fn blaze_mut (& mut self) -> & mut BlazeEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . flags . is_dirty () } } impl Default for BlazeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BlazeEntityData { fn base (& self) -> & BaseEntityData { BlazeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BlazeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BlazeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BlazeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BlazeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for BlazeEntityData { fn living_entity (& self) -> & LivingEntityData { BlazeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { BlazeEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct DisplayEntityData { pub base : BaseEntityData , pub transformation_interpolation_start_delta_ticks : SyncedValue < i32 > , pub transformation_interpolation_duration : SyncedValue < i32 > , pub pos_rot_interpolation_duration : SyncedValue < i32 > , pub translation : SyncedValue < Vector3f > , pub scale : SyncedValue < Vector3f > , pub left_rotation : SyncedValue < Quaternionf > , pub right_rotation : SyncedValue < Quaternionf > , pub billboard_render_constraints : SyncedValue < i8 > , pub brightness_override : SyncedValue < i32 > , pub view_range : SyncedValue < f32 > , pub shadow_radius : SyncedValue < f32 > , pub shadow_strength : SyncedValue < f32 > , pub width : SyncedValue < f32 > , pub height : SyncedValue < f32 > , pub glow_color_override : SyncedValue < i32 > } impl DisplayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , transformation_interpolation_start_delta_ticks : SyncedValue :: new (0i32) , transformation_interpolation_duration : SyncedValue :: new (0i32) , pos_rot_interpolation_duration : SyncedValue :: new (0i32) , translation : SyncedValue :: new (Vector3f :: new (0f32 , 0f32 , 0f32)) , scale : SyncedValue :: new (Vector3f :: new (1f32 , 1f32 , 1f32)) , left_rotation : SyncedValue :: new (Quaternionf :: new (0f32 , 0f32 , 0f32 , 1f32)) , right_rotation : SyncedValue :: new (Quaternionf :: new (0f32 , 0f32 , 0f32 , 1f32)) , billboard_render_constraints : SyncedValue :: new (0i8) , brightness_override : SyncedValue :: new (- 1i32) , view_range : SyncedValue :: new (1f32) , shadow_radius : SyncedValue :: new (0f32) , shadow_strength : SyncedValue :: new (1f32) , width : SyncedValue :: new (0f32) , height : SyncedValue :: new (0f32) , glow_color_override : SyncedValue :: new (- 1i32) } } # [doc = "Returns the `DisplayEntityData` layer."] pub fn display (& self) -> & DisplayEntityData { self } # [doc = "Returns the mutable `DisplayEntityData` layer."] pub fn display_mut (& mut self) -> & mut DisplayEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . transformation_interpolation_start_delta_ticks . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . transformation_interpolation_start_delta_ticks . get ()) , }) ; self . transformation_interpolation_start_delta_ticks . clear_dirty () ; } if self . transformation_interpolation_duration . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . transformation_interpolation_duration . get ()) , }) ; self . transformation_interpolation_duration . clear_dirty () ; } if self . pos_rot_interpolation_duration . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . pos_rot_interpolation_duration . get ()) , }) ; self . pos_rot_interpolation_duration . clear_dirty () ; } if self . translation . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 39i32 , value : EntityData :: Vector3 (* self . translation . get ()) , }) ; self . translation . clear_dirty () ; } if self . scale . is_dirty () { values . push (DataValue { index : 12u8 , serializer_id : 39i32 , value : EntityData :: Vector3 (* self . scale . get ()) , }) ; self . scale . clear_dirty () ; } if self . left_rotation . is_dirty () { values . push (DataValue { index : 13u8 , serializer_id : 40i32 , value : EntityData :: Quaternion (* self . left_rotation . get ()) , }) ; self . left_rotation . clear_dirty () ; } if self . right_rotation . is_dirty () { values . push (DataValue { index : 14u8 , serializer_id : 40i32 , value : EntityData :: Quaternion (* self . right_rotation . get ()) , }) ; self . right_rotation . clear_dirty () ; } if self . billboard_render_constraints . is_dirty () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . billboard_render_constraints . get ()) , }) ; self . billboard_render_constraints . clear_dirty () ; } if self . brightness_override . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . brightness_override . get ()) , }) ; self . brightness_override . clear_dirty () ; } if self . view_range . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . view_range . get ()) , }) ; self . view_range . clear_dirty () ; } if self . shadow_radius . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . shadow_radius . get ()) , }) ; self . shadow_radius . clear_dirty () ; } if self . shadow_strength . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . shadow_strength . get ()) , }) ; self . shadow_strength . clear_dirty () ; } if self . width . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . width . get ()) , }) ; self . width . clear_dirty () ; } if self . height . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . height . get ()) , }) ; self . height . clear_dirty () ; } if self . glow_color_override . is_dirty () { values . push (DataValue { index : 22u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . glow_color_override . get ()) , }) ; self . glow_color_override . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . transformation_interpolation_start_delta_ticks . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . transformation_interpolation_start_delta_ticks . get ()) , }) ; } if ! self . transformation_interpolation_duration . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . transformation_interpolation_duration . get ()) , }) ; } if ! self . pos_rot_interpolation_duration . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . pos_rot_interpolation_duration . get ()) , }) ; } if ! self . translation . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 39i32 , value : EntityData :: Vector3 (* self . translation . get ()) , }) ; } if ! self . scale . is_default () { values . push (DataValue { index : 12u8 , serializer_id : 39i32 , value : EntityData :: Vector3 (* self . scale . get ()) , }) ; } if ! self . left_rotation . is_default () { values . push (DataValue { index : 13u8 , serializer_id : 40i32 , value : EntityData :: Quaternion (* self . left_rotation . get ()) , }) ; } if ! self . right_rotation . is_default () { values . push (DataValue { index : 14u8 , serializer_id : 40i32 , value : EntityData :: Quaternion (* self . right_rotation . get ()) , }) ; } if ! self . billboard_render_constraints . is_default () { values . push (DataValue { index : 15u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . billboard_render_constraints . get ()) , }) ; } if ! self . brightness_override . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . brightness_override . get ()) , }) ; } if ! self . view_range . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . view_range . get ()) , }) ; } if ! self . shadow_radius . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . shadow_radius . get ()) , }) ; } if ! self . shadow_strength . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . shadow_strength . get ()) , }) ; } if ! self . width . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . width . get ()) , }) ; } if ! self . height . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . height . get ()) , }) ; } if ! self . glow_color_override . is_default () { values . push (DataValue { index : 22u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . glow_color_override . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . transformation_interpolation_start_delta_ticks . is_dirty () || self . transformation_interpolation_duration . is_dirty () || self . pos_rot_interpolation_duration . is_dirty () || self . translation . is_dirty () || self . scale . is_dirty () || self . left_rotation . is_dirty () || self . right_rotation . is_dirty () || self . billboard_render_constraints . is_dirty () || self . brightness_override . is_dirty () || self . view_range . is_dirty () || self . shadow_radius . is_dirty () || self . shadow_strength . is_dirty () || self . width . is_dirty () || self . height . is_dirty () || self . glow_color_override . is_dirty () } } impl Default for DisplayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DisplayEntityData { fn base (& self) -> & BaseEntityData { DisplayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DisplayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DisplayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DisplayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DisplayEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BlockDisplayEntityData { pub display : DisplayEntityData , pub block_state : SyncedValue < BlockStateId > } impl BlockDisplayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { display : DisplayEntityData :: new () , block_state : SyncedValue :: new (crate :: vanilla_blocks :: AIR . default_state ()) } } # [doc = "Returns the `BlockDisplayEntityData` layer."] pub fn block_display (& self) -> & BlockDisplayEntityData { self } # [doc = "Returns the mutable `BlockDisplayEntityData` layer."] pub fn block_display_mut (& mut self) -> & mut BlockDisplayEntityData { self } # [doc = "Returns the `DisplayEntityData` layer."] pub fn display (& self) -> & DisplayEntityData { & self . display } # [doc = "Returns the mutable `DisplayEntityData` layer."] pub fn display_mut (& mut self) -> & mut DisplayEntityData { & mut self . display } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . display . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . display . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . display . pack_dirty_into (values) ; if self . block_state . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 14i32 , value : EntityData :: BlockState (* self . block_state . get ()) , }) ; self . block_state . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . display . pack_all_into (values) ; if ! self . block_state . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 14i32 , value : EntityData :: BlockState (* self . block_state . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . display . is_dirty () || self . block_state . is_dirty () } } impl Default for BlockDisplayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BlockDisplayEntityData { fn base (& self) -> & BaseEntityData { BlockDisplayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BlockDisplayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BlockDisplayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BlockDisplayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BlockDisplayEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct BoggedEntityData { pub mob : MobEntityData , pub sheared : SyncedValue < bool > } impl BoggedEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , sheared : SyncedValue :: new (false) } } # [doc = "Returns the `BoggedEntityData` layer."] pub fn bogged (& self) -> & BoggedEntityData { self } # [doc = "Returns the mutable `BoggedEntityData` layer."] pub fn bogged_mut (& mut self) -> & mut BoggedEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . sheared . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . sheared . get ()) , }) ; self . sheared . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . sheared . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . sheared . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . sheared . is_dirty () } } impl Default for BoggedEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BoggedEntityData { fn base (& self) -> & BaseEntityData { BoggedEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BoggedEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BoggedEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BoggedEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BoggedEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for BoggedEntityData { fn living_entity (& self) -> & LivingEntityData { BoggedEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { BoggedEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractHorseEntityData { pub ageable_mob : AgeableMobEntityData , pub id_flags : SyncedValue < i8 > } impl AbstractHorseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , id_flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { self } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . id_flags . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; self . id_flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . id_flags . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . id_flags . is_dirty () } } impl Default for AbstractHorseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractHorseEntityData { fn base (& self) -> & BaseEntityData { AbstractHorseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractHorseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractHorseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractHorseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractHorseEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractHorseEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractHorseEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractHorseEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CamelEntityData { pub abstract_horse : AbstractHorseEntityData , pub dash : SyncedValue < bool > , pub last_pose_change_tick : SyncedValue < i64 > } impl CamelEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_horse : AbstractHorseEntityData :: new () , dash : SyncedValue :: new (false) , last_pose_change_tick : SyncedValue :: new (0i64) } } # [doc = "Returns the `CamelEntityData` layer."] pub fn camel (& self) -> & CamelEntityData { self } # [doc = "Returns the mutable `CamelEntityData` layer."] pub fn camel_mut (& mut self) -> & mut CamelEntityData { self } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_dirty_into (values) ; if self . dash . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dash . get ()) , }) ; self . dash . clear_dirty () ; } if self . last_pose_change_tick . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . last_pose_change_tick . get ()) , }) ; self . last_pose_change_tick . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_all_into (values) ; if ! self . dash . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dash . get ()) , }) ; } if ! self . last_pose_change_tick . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . last_pose_change_tick . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_horse . is_dirty () || self . dash . is_dirty () || self . last_pose_change_tick . is_dirty () } } impl Default for CamelEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CamelEntityData { fn base (& self) -> & BaseEntityData { CamelEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CamelEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CamelEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CamelEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CamelEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CamelEntityData { fn living_entity (& self) -> & LivingEntityData { CamelEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CamelEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct TamableAnimalEntityData { pub ageable_mob : AgeableMobEntityData , pub flags : SyncedValue < i8 > , pub owneruuid : SyncedValue < Option < Uuid > > } impl TamableAnimalEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , flags : SyncedValue :: new (0i8) , owneruuid : SyncedValue :: new (None) } } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { self } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } if self . owneruuid . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . owneruuid . get () . clone ()) , }) ; self . owneruuid . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } if ! self . owneruuid . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . owneruuid . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . flags . is_dirty () || self . owneruuid . is_dirty () } } impl Default for TamableAnimalEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TamableAnimalEntityData { fn base (& self) -> & BaseEntityData { TamableAnimalEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TamableAnimalEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TamableAnimalEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TamableAnimalEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TamableAnimalEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for TamableAnimalEntityData { fn living_entity (& self) -> & LivingEntityData { TamableAnimalEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { TamableAnimalEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CatEntityData { pub tamable_animal : TamableAnimalEntityData , pub variant : SyncedValue < RegistryReference < crate :: cat_variant :: CatVariant > > , pub is_lying : SyncedValue < bool > , pub relax_state_one : SyncedValue < bool > , pub collar_color : SyncedValue < i32 > , pub sound_variant : SyncedValue < RegistryReference < crate :: cat_sound_variant :: CatSoundVariant > > } impl CatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { tamable_animal : TamableAnimalEntityData :: new () , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_cat_variants :: BLACK)) , is_lying : SyncedValue :: new (false) , relax_state_one : SyncedValue :: new (false) , collar_color : SyncedValue :: new (14i32) , sound_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_cat_sound_variants :: CLASSIC)) } } # [doc = "Returns the `CatEntityData` layer."] pub fn cat (& self) -> & CatEntityData { self } # [doc = "Returns the mutable `CatEntityData` layer."] pub fn cat_mut (& mut self) -> & mut CatEntityData { self } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 21i32 , value : EntityData :: CatVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . is_lying . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_lying . get ()) , }) ; self . is_lying . clear_dirty () ; } if self . relax_state_one . is_dirty () { values . push (DataValue { index : 22u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . relax_state_one . get ()) , }) ; self . relax_state_one . clear_dirty () ; } if self . collar_color . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . collar_color . get ()) , }) ; self . collar_color . clear_dirty () ; } if self . sound_variant . is_dirty () { values . push (DataValue { index : 24u8 , serializer_id : 22i32 , value : EntityData :: CatSoundVariant (* self . sound_variant . get ()) , }) ; self . sound_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 21i32 , value : EntityData :: CatVariant (* self . variant . get ()) , }) ; } if ! self . is_lying . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_lying . get ()) , }) ; } if ! self . relax_state_one . is_default () { values . push (DataValue { index : 22u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . relax_state_one . get ()) , }) ; } if ! self . collar_color . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . collar_color . get ()) , }) ; } if ! self . sound_variant . is_default () { values . push (DataValue { index : 24u8 , serializer_id : 22i32 , value : EntityData :: CatSoundVariant (* self . sound_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . tamable_animal . is_dirty () || self . variant . is_dirty () || self . is_lying . is_dirty () || self . relax_state_one . is_dirty () || self . collar_color . is_dirty () || self . sound_variant . is_dirty () } } impl Default for CatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CatEntityData { fn base (& self) -> & BaseEntityData { CatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CatEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CatEntityData { fn living_entity (& self) -> & LivingEntityData { CatEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CatEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SpiderEntityData { pub mob : MobEntityData , pub flags : SyncedValue < i8 > } impl SpiderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `SpiderEntityData` layer."] pub fn spider (& self) -> & SpiderEntityData { self } # [doc = "Returns the mutable `SpiderEntityData` layer."] pub fn spider_mut (& mut self) -> & mut SpiderEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . flags . is_dirty () } } impl Default for SpiderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpiderEntityData { fn base (& self) -> & BaseEntityData { SpiderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpiderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpiderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpiderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpiderEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SpiderEntityData { fn living_entity (& self) -> & LivingEntityData { SpiderEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SpiderEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractMinecartEntityData { pub vehicle_entity : VehicleEntityData , pub id_custom_display_block : SyncedValue < Option < BlockStateId > > , pub id_display_offset : SyncedValue < i32 > } impl AbstractMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { vehicle_entity : VehicleEntityData :: new () , id_custom_display_block : SyncedValue :: new (None) , id_display_offset : SyncedValue :: new (8i32) } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { self } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { self } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . vehicle_entity . pack_dirty_into (values) ; if self . id_custom_display_block . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 15i32 , value : EntityData :: OptionalBlockState (self . id_custom_display_block . get () . clone ()) , }) ; self . id_custom_display_block . clear_dirty () ; } if self . id_display_offset . is_dirty () { values . push (DataValue { index : 12u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_display_offset . get ()) , }) ; self . id_display_offset . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . vehicle_entity . pack_all_into (values) ; if ! self . id_custom_display_block . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 15i32 , value : EntityData :: OptionalBlockState (self . id_custom_display_block . get () . clone ()) , }) ; } if ! self . id_display_offset . is_default () { values . push (DataValue { index : 12u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_display_offset . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . vehicle_entity . is_dirty () || self . id_custom_display_block . is_dirty () || self . id_display_offset . is_dirty () } } impl Default for AbstractMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractMinecartEntityData { fn base (& self) -> & BaseEntityData { AbstractMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractMinecartEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ChickenEntityData { pub ageable_mob : AgeableMobEntityData , pub variant : SyncedValue < RegistryReference < crate :: chicken_variant :: ChickenVariant > > , pub sound_variant : SyncedValue < RegistryReference < crate :: chicken_sound_variant :: ChickenSoundVariant > > } impl ChickenEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_chicken_variants :: TEMPERATE)) , sound_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_chicken_sound_variants :: CLASSIC)) } } # [doc = "Returns the `ChickenEntityData` layer."] pub fn chicken (& self) -> & ChickenEntityData { self } # [doc = "Returns the mutable `ChickenEntityData` layer."] pub fn chicken_mut (& mut self) -> & mut ChickenEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 30i32 , value : EntityData :: ChickenVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . sound_variant . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 31i32 , value : EntityData :: ChickenSoundVariant (* self . sound_variant . get ()) , }) ; self . sound_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 30i32 , value : EntityData :: ChickenVariant (* self . variant . get ()) , }) ; } if ! self . sound_variant . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 31i32 , value : EntityData :: ChickenSoundVariant (* self . sound_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant . is_dirty () || self . sound_variant . is_dirty () } } impl Default for ChickenEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ChickenEntityData { fn base (& self) -> & BaseEntityData { ChickenEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ChickenEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ChickenEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ChickenEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ChickenEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ChickenEntityData { fn living_entity (& self) -> & LivingEntityData { ChickenEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ChickenEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractFishEntityData { pub mob : MobEntityData , pub from_bucket : SyncedValue < bool > } impl AbstractFishEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , from_bucket : SyncedValue :: new (false) } } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { self } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . from_bucket . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; self . from_bucket . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . from_bucket . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . from_bucket . is_dirty () } } impl Default for AbstractFishEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractFishEntityData { fn base (& self) -> & BaseEntityData { AbstractFishEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractFishEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractFishEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractFishEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractFishEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractFishEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractFishEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractFishEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CopperGolemEntityData { pub mob : MobEntityData , pub weather_state : SyncedValue < i32 > , pub copper_golem_state : SyncedValue < i32 > } impl CopperGolemEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , weather_state : SyncedValue :: new (0i32) , copper_golem_state : SyncedValue :: new (0i32) } } # [doc = "Returns the `CopperGolemEntityData` layer."] pub fn copper_golem (& self) -> & CopperGolemEntityData { self } # [doc = "Returns the mutable `CopperGolemEntityData` layer."] pub fn copper_golem_mut (& mut self) -> & mut CopperGolemEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . weather_state . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 38i32 , value : EntityData :: WeatheringCopperState (* self . weather_state . get ()) , }) ; self . weather_state . clear_dirty () ; } if self . copper_golem_state . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 37i32 , value : EntityData :: CopperGolemState (* self . copper_golem_state . get ()) , }) ; self . copper_golem_state . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . weather_state . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 38i32 , value : EntityData :: WeatheringCopperState (* self . weather_state . get ()) , }) ; } if ! self . copper_golem_state . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 37i32 , value : EntityData :: CopperGolemState (* self . copper_golem_state . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . weather_state . is_dirty () || self . copper_golem_state . is_dirty () } } impl Default for CopperGolemEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CopperGolemEntityData { fn base (& self) -> & BaseEntityData { CopperGolemEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CopperGolemEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CopperGolemEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CopperGolemEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CopperGolemEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CopperGolemEntityData { fn living_entity (& self) -> & LivingEntityData { CopperGolemEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CopperGolemEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct MinecartCommandBlockEntityData { pub abstract_minecart : AbstractMinecartEntityData , pub id_command_name : SyncedValue < String > , pub id_last_output : SyncedValue < Box < TextComponent > > } impl MinecartCommandBlockEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_minecart : AbstractMinecartEntityData :: new () , id_command_name : SyncedValue :: new ("" . to_string ()) , id_last_output : SyncedValue :: new (Box :: new (TextComponent :: default ())) } } # [doc = "Returns the `MinecartCommandBlockEntityData` layer."] pub fn minecart_command_block (& self) -> & MinecartCommandBlockEntityData { self } # [doc = "Returns the mutable `MinecartCommandBlockEntityData` layer."] pub fn minecart_command_block_mut (& mut self) -> & mut MinecartCommandBlockEntityData { self } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_minecart . pack_dirty_into (values) ; if self . id_command_name . is_dirty () { values . push (DataValue { index : 13u8 , serializer_id : 4i32 , value : EntityData :: String (self . id_command_name . get () . clone ()) , }) ; self . id_command_name . clear_dirty () ; } if self . id_last_output . is_dirty () { values . push (DataValue { index : 14u8 , serializer_id : 5i32 , value : EntityData :: Component (self . id_last_output . get () . clone ()) , }) ; self . id_last_output . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_minecart . pack_all_into (values) ; if ! self . id_command_name . is_default () { values . push (DataValue { index : 13u8 , serializer_id : 4i32 , value : EntityData :: String (self . id_command_name . get () . clone ()) , }) ; } if ! self . id_last_output . is_default () { values . push (DataValue { index : 14u8 , serializer_id : 5i32 , value : EntityData :: Component (self . id_last_output . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () || self . id_command_name . is_dirty () || self . id_last_output . is_dirty () } } impl Default for MinecartCommandBlockEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MinecartCommandBlockEntityData { fn base (& self) -> & BaseEntityData { MinecartCommandBlockEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MinecartCommandBlockEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MinecartCommandBlockEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MinecartCommandBlockEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MinecartCommandBlockEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CowEntityData { pub ageable_mob : AgeableMobEntityData , pub variant : SyncedValue < RegistryReference < crate :: cow_variant :: CowVariant > > , pub sound_variant : SyncedValue < RegistryReference < crate :: cow_sound_variant :: CowSoundVariant > > } impl CowEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_cow_variants :: TEMPERATE)) , sound_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_cow_sound_variants :: CLASSIC)) } } # [doc = "Returns the `CowEntityData` layer."] pub fn cow (& self) -> & CowEntityData { self } # [doc = "Returns the mutable `CowEntityData` layer."] pub fn cow_mut (& mut self) -> & mut CowEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 23i32 , value : EntityData :: CowVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . sound_variant . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 24i32 , value : EntityData :: CowSoundVariant (* self . sound_variant . get ()) , }) ; self . sound_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 23i32 , value : EntityData :: CowVariant (* self . variant . get ()) , }) ; } if ! self . sound_variant . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 24i32 , value : EntityData :: CowSoundVariant (* self . sound_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant . is_dirty () || self . sound_variant . is_dirty () } } impl Default for CowEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CowEntityData { fn base (& self) -> & BaseEntityData { CowEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CowEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CowEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CowEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CowEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CowEntityData { fn living_entity (& self) -> & LivingEntityData { CowEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CowEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CreakingEntityData { pub mob : MobEntityData , pub can_move : SyncedValue < bool > , pub is_active : SyncedValue < bool > , pub is_tearing_down : SyncedValue < bool > , pub home_pos : SyncedValue < Option < BlockPos > > } impl CreakingEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , can_move : SyncedValue :: new (true) , is_active : SyncedValue :: new (false) , is_tearing_down : SyncedValue :: new (false) , home_pos : SyncedValue :: new (None) } } # [doc = "Returns the `CreakingEntityData` layer."] pub fn creaking (& self) -> & CreakingEntityData { self } # [doc = "Returns the mutable `CreakingEntityData` layer."] pub fn creaking_mut (& mut self) -> & mut CreakingEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . can_move . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . can_move . get ()) , }) ; self . can_move . clear_dirty () ; } if self . is_active . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_active . get ()) , }) ; self . is_active . clear_dirty () ; } if self . is_tearing_down . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_tearing_down . get ()) , }) ; self . is_tearing_down . clear_dirty () ; } if self . home_pos . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . home_pos . get () . clone ()) , }) ; self . home_pos . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . can_move . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . can_move . get ()) , }) ; } if ! self . is_active . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_active . get ()) , }) ; } if ! self . is_tearing_down . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_tearing_down . get ()) , }) ; } if ! self . home_pos . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . home_pos . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . can_move . is_dirty () || self . is_active . is_dirty () || self . is_tearing_down . is_dirty () || self . home_pos . is_dirty () } } impl Default for CreakingEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CreakingEntityData { fn base (& self) -> & BaseEntityData { CreakingEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CreakingEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CreakingEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CreakingEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CreakingEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CreakingEntityData { fn living_entity (& self) -> & LivingEntityData { CreakingEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CreakingEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct CreeperEntityData { pub mob : MobEntityData , pub swell_dir : SyncedValue < i32 > , pub is_powered : SyncedValue < bool > , pub is_ignited : SyncedValue < bool > } impl CreeperEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , swell_dir : SyncedValue :: new (- 1i32) , is_powered : SyncedValue :: new (false) , is_ignited : SyncedValue :: new (false) } } # [doc = "Returns the `CreeperEntityData` layer."] pub fn creeper (& self) -> & CreeperEntityData { self } # [doc = "Returns the mutable `CreeperEntityData` layer."] pub fn creeper_mut (& mut self) -> & mut CreeperEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . swell_dir . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . swell_dir . get ()) , }) ; self . swell_dir . clear_dirty () ; } if self . is_powered . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_powered . get ()) , }) ; self . is_powered . clear_dirty () ; } if self . is_ignited . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_ignited . get ()) , }) ; self . is_ignited . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . swell_dir . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . swell_dir . get ()) , }) ; } if ! self . is_powered . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_powered . get ()) , }) ; } if ! self . is_ignited . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_ignited . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . swell_dir . is_dirty () || self . is_powered . is_dirty () || self . is_ignited . is_dirty () } } impl Default for CreeperEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CreeperEntityData { fn base (& self) -> & BaseEntityData { CreeperEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CreeperEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CreeperEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CreeperEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CreeperEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CreeperEntityData { fn living_entity (& self) -> & LivingEntityData { CreeperEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CreeperEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct DolphinEntityData { pub ageable_mob : AgeableMobEntityData , pub got_fish : SyncedValue < bool > , pub moistness_level : SyncedValue < i32 > } impl DolphinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = Self { ageable_mob : AgeableMobEntityData :: new () , got_fish : SyncedValue :: new (false) , moistness_level : SyncedValue :: new (2400i32) } ; data . ageable_mob . mob . living_entity . base . air_supply = SyncedValue :: new (4800i32) ; data } # [doc = "Returns the `DolphinEntityData` layer."] pub fn dolphin (& self) -> & DolphinEntityData { self } # [doc = "Returns the mutable `DolphinEntityData` layer."] pub fn dolphin_mut (& mut self) -> & mut DolphinEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . got_fish . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . got_fish . get ()) , }) ; self . got_fish . clear_dirty () ; } if self . moistness_level . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . moistness_level . get ()) , }) ; self . moistness_level . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . got_fish . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . got_fish . get ()) , }) ; } if ! self . moistness_level . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . moistness_level . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . got_fish . is_dirty () || self . moistness_level . is_dirty () } } impl Default for DolphinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DolphinEntityData { fn base (& self) -> & BaseEntityData { DolphinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DolphinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DolphinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DolphinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DolphinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for DolphinEntityData { fn living_entity (& self) -> & LivingEntityData { DolphinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { DolphinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractChestedHorseEntityData { pub abstract_horse : AbstractHorseEntityData , pub id_chest : SyncedValue < bool > } impl AbstractChestedHorseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_horse : AbstractHorseEntityData :: new () , id_chest : SyncedValue :: new (false) } } # [doc = "Returns the `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse (& self) -> & AbstractChestedHorseEntityData { self } # [doc = "Returns the mutable `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse_mut (& mut self) -> & mut AbstractChestedHorseEntityData { self } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_dirty_into (values) ; if self . id_chest . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_chest . get ()) , }) ; self . id_chest . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_all_into (values) ; if ! self . id_chest . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_chest . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_horse . is_dirty () || self . id_chest . is_dirty () } } impl Default for AbstractChestedHorseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractChestedHorseEntityData { fn base (& self) -> & BaseEntityData { AbstractChestedHorseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractChestedHorseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractChestedHorseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractChestedHorseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractChestedHorseEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractChestedHorseEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractChestedHorseEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractChestedHorseEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ZombieEntityData { pub mob : MobEntityData , pub baby : SyncedValue < bool > , pub special_type : SyncedValue < i32 > , pub drowned_conversion : SyncedValue < bool > } impl ZombieEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , baby : SyncedValue :: new (false) , special_type : SyncedValue :: new (0i32) , drowned_conversion : SyncedValue :: new (false) } } # [doc = "Returns the `ZombieEntityData` layer."] pub fn zombie (& self) -> & ZombieEntityData { self } # [doc = "Returns the mutable `ZombieEntityData` layer."] pub fn zombie_mut (& mut self) -> & mut ZombieEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . baby . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; self . baby . clear_dirty () ; } if self . special_type . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . special_type . get ()) , }) ; self . special_type . clear_dirty () ; } if self . drowned_conversion . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . drowned_conversion . get ()) , }) ; self . drowned_conversion . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . baby . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; } if ! self . special_type . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . special_type . get ()) , }) ; } if ! self . drowned_conversion . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . drowned_conversion . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . baby . is_dirty () || self . special_type . is_dirty () || self . drowned_conversion . is_dirty () } } impl Default for ZombieEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ZombieEntityData { fn base (& self) -> & BaseEntityData { ZombieEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZombieEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZombieEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZombieEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZombieEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZombieEntityData { fn living_entity (& self) -> & LivingEntityData { ZombieEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZombieEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ThrowableItemProjectileEntityData { pub base : BaseEntityData , pub item_stack : SyncedValue < ItemStack > } impl ThrowableItemProjectileEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , item_stack : SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: EGG , 1i32)) } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { self } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . item_stack . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; self . item_stack . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . item_stack . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . item_stack . is_dirty () } } impl Default for ThrowableItemProjectileEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ThrowableItemProjectileEntityData { fn base (& self) -> & BaseEntityData { ThrowableItemProjectileEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ThrowableItemProjectileEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ThrowableItemProjectileEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ThrowableItemProjectileEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ThrowableItemProjectileEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct GuardianEntityData { pub mob : MobEntityData , pub id_moving : SyncedValue < bool > , pub id_attack_target : SyncedValue < i32 > } impl GuardianEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , id_moving : SyncedValue :: new (false) , id_attack_target : SyncedValue :: new (0i32) } } # [doc = "Returns the `GuardianEntityData` layer."] pub fn guardian (& self) -> & GuardianEntityData { self } # [doc = "Returns the mutable `GuardianEntityData` layer."] pub fn guardian_mut (& mut self) -> & mut GuardianEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . id_moving . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_moving . get ()) , }) ; self . id_moving . clear_dirty () ; } if self . id_attack_target . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_attack_target . get ()) , }) ; self . id_attack_target . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . id_moving . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_moving . get ()) , }) ; } if ! self . id_attack_target . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_attack_target . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . id_moving . is_dirty () || self . id_attack_target . is_dirty () } } impl Default for GuardianEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GuardianEntityData { fn base (& self) -> & BaseEntityData { GuardianEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GuardianEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GuardianEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GuardianEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GuardianEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for GuardianEntityData { fn living_entity (& self) -> & LivingEntityData { GuardianEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { GuardianEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct EnderManEntityData { pub mob : MobEntityData , pub carry_state : SyncedValue < Option < BlockStateId > > , pub creepy : SyncedValue < bool > , pub stared_at : SyncedValue < bool > } impl EnderManEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , carry_state : SyncedValue :: new (None) , creepy : SyncedValue :: new (false) , stared_at : SyncedValue :: new (false) } } # [doc = "Returns the `EnderManEntityData` layer."] pub fn ender_man (& self) -> & EnderManEntityData { self } # [doc = "Returns the mutable `EnderManEntityData` layer."] pub fn ender_man_mut (& mut self) -> & mut EnderManEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . carry_state . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 15i32 , value : EntityData :: OptionalBlockState (self . carry_state . get () . clone ()) , }) ; self . carry_state . clear_dirty () ; } if self . creepy . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . creepy . get ()) , }) ; self . creepy . clear_dirty () ; } if self . stared_at . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stared_at . get ()) , }) ; self . stared_at . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . carry_state . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 15i32 , value : EntityData :: OptionalBlockState (self . carry_state . get () . clone ()) , }) ; } if ! self . creepy . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . creepy . get ()) , }) ; } if ! self . stared_at . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stared_at . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . carry_state . is_dirty () || self . creepy . is_dirty () || self . stared_at . is_dirty () } } impl Default for EnderManEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EnderManEntityData { fn base (& self) -> & BaseEntityData { EnderManEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EnderManEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EnderManEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EnderManEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EnderManEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for EnderManEntityData { fn living_entity (& self) -> & LivingEntityData { EnderManEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { EnderManEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct EnderDragonEntityData { pub mob : MobEntityData , pub phase : SyncedValue < i32 > } impl EnderDragonEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , phase : SyncedValue :: new (10i32) } } # [doc = "Returns the `EnderDragonEntityData` layer."] pub fn ender_dragon (& self) -> & EnderDragonEntityData { self } # [doc = "Returns the mutable `EnderDragonEntityData` layer."] pub fn ender_dragon_mut (& mut self) -> & mut EnderDragonEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . phase . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . phase . get ()) , }) ; self . phase . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . phase . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . phase . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . phase . is_dirty () } } impl Default for EnderDragonEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EnderDragonEntityData { fn base (& self) -> & BaseEntityData { EnderDragonEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EnderDragonEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EnderDragonEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EnderDragonEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EnderDragonEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for EnderDragonEntityData { fn living_entity (& self) -> & LivingEntityData { EnderDragonEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { EnderDragonEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct EndCrystalEntityData { pub base : BaseEntityData , pub beam_target : SyncedValue < Option < BlockPos > > , pub show_bottom : SyncedValue < bool > } impl EndCrystalEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , beam_target : SyncedValue :: new (None) , show_bottom : SyncedValue :: new (true) } } # [doc = "Returns the `EndCrystalEntityData` layer."] pub fn end_crystal (& self) -> & EndCrystalEntityData { self } # [doc = "Returns the mutable `EndCrystalEntityData` layer."] pub fn end_crystal_mut (& mut self) -> & mut EndCrystalEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . beam_target . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . beam_target . get () . clone ()) , }) ; self . beam_target . clear_dirty () ; } if self . show_bottom . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . show_bottom . get ()) , }) ; self . show_bottom . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . beam_target . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 11i32 , value : EntityData :: OptionalBlockPos (self . beam_target . get () . clone ()) , }) ; } if ! self . show_bottom . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . show_bottom . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . beam_target . is_dirty () || self . show_bottom . is_dirty () } } impl Default for EndCrystalEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EndCrystalEntityData { fn base (& self) -> & BaseEntityData { EndCrystalEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EndCrystalEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EndCrystalEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EndCrystalEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EndCrystalEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct RaiderEntityData { pub mob : MobEntityData , pub is_celebrating : SyncedValue < bool > } impl RaiderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , is_celebrating : SyncedValue :: new (false) } } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { self } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . is_celebrating . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_celebrating . get ()) , }) ; self . is_celebrating . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . is_celebrating . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_celebrating . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . is_celebrating . is_dirty () } } impl Default for RaiderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for RaiderEntityData { fn base (& self) -> & BaseEntityData { RaiderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { RaiderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { RaiderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { RaiderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { RaiderEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for RaiderEntityData { fn living_entity (& self) -> & LivingEntityData { RaiderEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { RaiderEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SpellcasterIllagerEntityData { pub raider : RaiderEntityData , pub spell_casting : SyncedValue < i8 > } impl SpellcasterIllagerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { raider : RaiderEntityData :: new () , spell_casting : SyncedValue :: new (0i8) } } # [doc = "Returns the `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager (& self) -> & SpellcasterIllagerEntityData { self } # [doc = "Returns the mutable `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager_mut (& mut self) -> & mut SpellcasterIllagerEntityData { self } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . raider . pack_dirty_into (values) ; if self . spell_casting . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . spell_casting . get ()) , }) ; self . spell_casting . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . raider . pack_all_into (values) ; if ! self . spell_casting . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . spell_casting . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . raider . is_dirty () || self . spell_casting . is_dirty () } } impl Default for SpellcasterIllagerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpellcasterIllagerEntityData { fn base (& self) -> & BaseEntityData { SpellcasterIllagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpellcasterIllagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpellcasterIllagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpellcasterIllagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpellcasterIllagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SpellcasterIllagerEntityData { fn living_entity (& self) -> & LivingEntityData { SpellcasterIllagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SpellcasterIllagerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ExperienceOrbEntityData { pub base : BaseEntityData , pub value : SyncedValue < i32 > } impl ExperienceOrbEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , value : SyncedValue :: new (0i32) } } # [doc = "Returns the `ExperienceOrbEntityData` layer."] pub fn experience_orb (& self) -> & ExperienceOrbEntityData { self } # [doc = "Returns the mutable `ExperienceOrbEntityData` layer."] pub fn experience_orb_mut (& mut self) -> & mut ExperienceOrbEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . value . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . value . get ()) , }) ; self . value . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . value . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . value . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . value . is_dirty () } } impl Default for ExperienceOrbEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ExperienceOrbEntityData { fn base (& self) -> & BaseEntityData { ExperienceOrbEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ExperienceOrbEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ExperienceOrbEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ExperienceOrbEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ExperienceOrbEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct EyeOfEnderEntityData { pub base : BaseEntityData , pub item_stack : SyncedValue < ItemStack > } impl EyeOfEnderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , item_stack : SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: ENDER_EYE , 1i32)) } } # [doc = "Returns the `EyeOfEnderEntityData` layer."] pub fn eye_of_ender (& self) -> & EyeOfEnderEntityData { self } # [doc = "Returns the mutable `EyeOfEnderEntityData` layer."] pub fn eye_of_ender_mut (& mut self) -> & mut EyeOfEnderEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . item_stack . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; self . item_stack . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . item_stack . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . item_stack . is_dirty () } } impl Default for EyeOfEnderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EyeOfEnderEntityData { fn base (& self) -> & BaseEntityData { EyeOfEnderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EyeOfEnderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EyeOfEnderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EyeOfEnderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EyeOfEnderEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FallingBlockEntityData { pub base : BaseEntityData , pub start_pos : SyncedValue < BlockPos > } impl FallingBlockEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , start_pos : SyncedValue :: new (BlockPos :: new (0i32 , 0i32 , 0i32)) } } # [doc = "Returns the `FallingBlockEntityData` layer."] pub fn falling_block_entity (& self) -> & FallingBlockEntityData { self } # [doc = "Returns the mutable `FallingBlockEntityData` layer."] pub fn falling_block_entity_mut (& mut self) -> & mut FallingBlockEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . start_pos . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 10i32 , value : EntityData :: BlockPos (* self . start_pos . get ()) , }) ; self . start_pos . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . start_pos . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 10i32 , value : EntityData :: BlockPos (* self . start_pos . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . start_pos . is_dirty () } } impl Default for FallingBlockEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FallingBlockEntityData { fn base (& self) -> & BaseEntityData { FallingBlockEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FallingBlockEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FallingBlockEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FallingBlockEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FallingBlockEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FireballEntityData { pub base : BaseEntityData , pub item_stack : SyncedValue < ItemStack > } impl FireballEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , item_stack : SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: FIRE_CHARGE , 1i32)) } } # [doc = "Returns the `FireballEntityData` layer."] pub fn fireball (& self) -> & FireballEntityData { self } # [doc = "Returns the mutable `FireballEntityData` layer."] pub fn fireball_mut (& mut self) -> & mut FireballEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . item_stack . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; self . item_stack . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . item_stack . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . item_stack . is_dirty () } } impl Default for FireballEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FireballEntityData { fn base (& self) -> & BaseEntityData { FireballEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FireballEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FireballEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FireballEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FireballEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FireworkRocketEntityData { pub base : BaseEntityData , pub id_fireworks_item : SyncedValue < ItemStack > , pub attached_to_target : SyncedValue < Option < u32 > > , pub shot_at_angle : SyncedValue < bool > } impl FireworkRocketEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , id_fireworks_item : SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: FIREWORK_ROCKET , 1i32)) , attached_to_target : SyncedValue :: new (None) , shot_at_angle : SyncedValue :: new (false) } } # [doc = "Returns the `FireworkRocketEntityData` layer."] pub fn firework_rocket_entity (& self) -> & FireworkRocketEntityData { self } # [doc = "Returns the mutable `FireworkRocketEntityData` layer."] pub fn firework_rocket_entity_mut (& mut self) -> & mut FireworkRocketEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . id_fireworks_item . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . id_fireworks_item . get () . clone ()) , }) ; self . id_fireworks_item . clear_dirty () ; } if self . attached_to_target . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . attached_to_target . get () . clone ()) , }) ; self . attached_to_target . clear_dirty () ; } if self . shot_at_angle . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . shot_at_angle . get ()) , }) ; self . shot_at_angle . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . id_fireworks_item . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . id_fireworks_item . get () . clone ()) , }) ; } if ! self . attached_to_target . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . attached_to_target . get () . clone ()) , }) ; } if ! self . shot_at_angle . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . shot_at_angle . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . id_fireworks_item . is_dirty () || self . attached_to_target . is_dirty () || self . shot_at_angle . is_dirty () } } impl Default for FireworkRocketEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FireworkRocketEntityData { fn base (& self) -> & BaseEntityData { FireworkRocketEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FireworkRocketEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FireworkRocketEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FireworkRocketEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FireworkRocketEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FoxEntityData { pub ageable_mob : AgeableMobEntityData , pub variant_type : SyncedValue < i32 > , pub flags : SyncedValue < i8 > , pub trusted_id_0 : SyncedValue < Option < Uuid > > , pub trusted_id_1 : SyncedValue < Option < Uuid > > } impl FoxEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant_type : SyncedValue :: new (0i32) , flags : SyncedValue :: new (0i8) , trusted_id_0 : SyncedValue :: new (None) , trusted_id_1 : SyncedValue :: new (None) } } # [doc = "Returns the `FoxEntityData` layer."] pub fn fox (& self) -> & FoxEntityData { self } # [doc = "Returns the mutable `FoxEntityData` layer."] pub fn fox_mut (& mut self) -> & mut FoxEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant_type . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; self . variant_type . clear_dirty () ; } if self . flags . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } if self . trusted_id_0 . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . trusted_id_0 . get () . clone ()) , }) ; self . trusted_id_0 . clear_dirty () ; } if self . trusted_id_1 . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . trusted_id_1 . get () . clone ()) , }) ; self . trusted_id_1 . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant_type . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; } if ! self . flags . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } if ! self . trusted_id_0 . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . trusted_id_0 . get () . clone ()) , }) ; } if ! self . trusted_id_1 . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 13i32 , value : EntityData :: OptionalLivingEntityRef (self . trusted_id_1 . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant_type . is_dirty () || self . flags . is_dirty () || self . trusted_id_0 . is_dirty () || self . trusted_id_1 . is_dirty () } } impl Default for FoxEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FoxEntityData { fn base (& self) -> & BaseEntityData { FoxEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FoxEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FoxEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FoxEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FoxEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for FoxEntityData { fn living_entity (& self) -> & LivingEntityData { FoxEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { FoxEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FrogEntityData { pub ageable_mob : AgeableMobEntityData , pub variant : SyncedValue < RegistryReference < crate :: frog_variant :: FrogVariant > > , pub tongue_target : SyncedValue < Option < u32 > > } impl FrogEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_frog_variants :: TEMPERATE)) , tongue_target : SyncedValue :: new (None) } } # [doc = "Returns the `FrogEntityData` layer."] pub fn frog (& self) -> & FrogEntityData { self } # [doc = "Returns the mutable `FrogEntityData` layer."] pub fn frog_mut (& mut self) -> & mut FrogEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 27i32 , value : EntityData :: FrogVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . tongue_target . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . tongue_target . get () . clone ()) , }) ; self . tongue_target . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 27i32 , value : EntityData :: FrogVariant (* self . variant . get ()) , }) ; } if ! self . tongue_target . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . tongue_target . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant . is_dirty () || self . tongue_target . is_dirty () } } impl Default for FrogEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FrogEntityData { fn base (& self) -> & BaseEntityData { FrogEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FrogEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FrogEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FrogEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FrogEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for FrogEntityData { fn living_entity (& self) -> & LivingEntityData { FrogEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { FrogEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct MinecartFurnaceEntityData { pub abstract_minecart : AbstractMinecartEntityData , pub id_fuel : SyncedValue < bool > } impl MinecartFurnaceEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_minecart : AbstractMinecartEntityData :: new () , id_fuel : SyncedValue :: new (false) } } # [doc = "Returns the `MinecartFurnaceEntityData` layer."] pub fn minecart_furnace (& self) -> & MinecartFurnaceEntityData { self } # [doc = "Returns the mutable `MinecartFurnaceEntityData` layer."] pub fn minecart_furnace_mut (& mut self) -> & mut MinecartFurnaceEntityData { self } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_minecart . pack_dirty_into (values) ; if self . id_fuel . is_dirty () { values . push (DataValue { index : 13u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_fuel . get ()) , }) ; self . id_fuel . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_minecart . pack_all_into (values) ; if ! self . id_fuel . is_default () { values . push (DataValue { index : 13u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_fuel . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () || self . id_fuel . is_dirty () } } impl Default for MinecartFurnaceEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MinecartFurnaceEntityData { fn base (& self) -> & BaseEntityData { MinecartFurnaceEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MinecartFurnaceEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MinecartFurnaceEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MinecartFurnaceEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MinecartFurnaceEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct GhastEntityData { pub mob : MobEntityData , pub is_charging : SyncedValue < bool > } impl GhastEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , is_charging : SyncedValue :: new (false) } } # [doc = "Returns the `GhastEntityData` layer."] pub fn ghast (& self) -> & GhastEntityData { self } # [doc = "Returns the mutable `GhastEntityData` layer."] pub fn ghast_mut (& mut self) -> & mut GhastEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . is_charging . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging . get ()) , }) ; self . is_charging . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . is_charging . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . is_charging . is_dirty () } } impl Default for GhastEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GhastEntityData { fn base (& self) -> & BaseEntityData { GhastEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GhastEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GhastEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GhastEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GhastEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for GhastEntityData { fn living_entity (& self) -> & LivingEntityData { GhastEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { GhastEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct HappyGhastEntityData { pub ageable_mob : AgeableMobEntityData , pub is_leash_holder : SyncedValue < bool > , pub stays_still : SyncedValue < bool > } impl HappyGhastEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , is_leash_holder : SyncedValue :: new (false) , stays_still : SyncedValue :: new (false) } } # [doc = "Returns the `HappyGhastEntityData` layer."] pub fn happy_ghast (& self) -> & HappyGhastEntityData { self } # [doc = "Returns the mutable `HappyGhastEntityData` layer."] pub fn happy_ghast_mut (& mut self) -> & mut HappyGhastEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . is_leash_holder . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_leash_holder . get ()) , }) ; self . is_leash_holder . clear_dirty () ; } if self . stays_still . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stays_still . get ()) , }) ; self . stays_still . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . is_leash_holder . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_leash_holder . get ()) , }) ; } if ! self . stays_still . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stays_still . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . is_leash_holder . is_dirty () || self . stays_still . is_dirty () } } impl Default for HappyGhastEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HappyGhastEntityData { fn base (& self) -> & BaseEntityData { HappyGhastEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HappyGhastEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HappyGhastEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HappyGhastEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HappyGhastEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for HappyGhastEntityData { fn living_entity (& self) -> & LivingEntityData { HappyGhastEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { HappyGhastEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct HangingEntityData { pub base : BaseEntityData , pub direction : SyncedValue < Direction > } impl HangingEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , direction : SyncedValue :: new (Direction :: South) } } # [doc = "Returns the `HangingEntityData` layer."] pub fn hanging_entity (& self) -> & HangingEntityData { self } # [doc = "Returns the mutable `HangingEntityData` layer."] pub fn hanging_entity_mut (& mut self) -> & mut HangingEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . direction . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 12i32 , value : EntityData :: Direction (* self . direction . get ()) , }) ; self . direction . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . direction . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 12i32 , value : EntityData :: Direction (* self . direction . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . direction . is_dirty () } } impl Default for HangingEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HangingEntityData { fn base (& self) -> & BaseEntityData { HangingEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HangingEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HangingEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HangingEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HangingEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ItemFrameEntityData { pub hanging_entity : HangingEntityData , pub item : SyncedValue < ItemStack > , pub rotation : SyncedValue < i32 > } impl ItemFrameEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { hanging_entity : HangingEntityData :: new () , item : SyncedValue :: new (ItemStack :: empty ()) , rotation : SyncedValue :: new (0i32) } } # [doc = "Returns the `ItemFrameEntityData` layer."] pub fn item_frame (& self) -> & ItemFrameEntityData { self } # [doc = "Returns the mutable `ItemFrameEntityData` layer."] pub fn item_frame_mut (& mut self) -> & mut ItemFrameEntityData { self } # [doc = "Returns the `HangingEntityData` layer."] pub fn hanging_entity (& self) -> & HangingEntityData { & self . hanging_entity } # [doc = "Returns the mutable `HangingEntityData` layer."] pub fn hanging_entity_mut (& mut self) -> & mut HangingEntityData { & mut self . hanging_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . hanging_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . hanging_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . hanging_entity . pack_dirty_into (values) ; if self . item . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; self . item . clear_dirty () ; } if self . rotation . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . rotation . get ()) , }) ; self . rotation . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . hanging_entity . pack_all_into (values) ; if ! self . item . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; } if ! self . rotation . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . rotation . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . hanging_entity . is_dirty () || self . item . is_dirty () || self . rotation . is_dirty () } } impl Default for ItemFrameEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ItemFrameEntityData { fn base (& self) -> & BaseEntityData { ItemFrameEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ItemFrameEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ItemFrameEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ItemFrameEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ItemFrameEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct GlowSquidEntityData { pub ageable_mob : AgeableMobEntityData , pub dark_ticks_remaining : SyncedValue < i32 > } impl GlowSquidEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , dark_ticks_remaining : SyncedValue :: new (0i32) } } # [doc = "Returns the `GlowSquidEntityData` layer."] pub fn glow_squid (& self) -> & GlowSquidEntityData { self } # [doc = "Returns the mutable `GlowSquidEntityData` layer."] pub fn glow_squid_mut (& mut self) -> & mut GlowSquidEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . dark_ticks_remaining . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . dark_ticks_remaining . get ()) , }) ; self . dark_ticks_remaining . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . dark_ticks_remaining . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . dark_ticks_remaining . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . dark_ticks_remaining . is_dirty () } } impl Default for GlowSquidEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GlowSquidEntityData { fn base (& self) -> & BaseEntityData { GlowSquidEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GlowSquidEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GlowSquidEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GlowSquidEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GlowSquidEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for GlowSquidEntityData { fn living_entity (& self) -> & LivingEntityData { GlowSquidEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { GlowSquidEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct GoatEntityData { pub ageable_mob : AgeableMobEntityData , pub is_screaming_goat : SyncedValue < bool > , pub has_left_horn : SyncedValue < bool > , pub has_right_horn : SyncedValue < bool > } impl GoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , is_screaming_goat : SyncedValue :: new (false) , has_left_horn : SyncedValue :: new (true) , has_right_horn : SyncedValue :: new (true) } } # [doc = "Returns the `GoatEntityData` layer."] pub fn goat (& self) -> & GoatEntityData { self } # [doc = "Returns the mutable `GoatEntityData` layer."] pub fn goat_mut (& mut self) -> & mut GoatEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . is_screaming_goat . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_screaming_goat . get ()) , }) ; self . is_screaming_goat . clear_dirty () ; } if self . has_left_horn . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_left_horn . get ()) , }) ; self . has_left_horn . clear_dirty () ; } if self . has_right_horn . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_right_horn . get ()) , }) ; self . has_right_horn . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . is_screaming_goat . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_screaming_goat . get ()) , }) ; } if ! self . has_left_horn . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_left_horn . get ()) , }) ; } if ! self . has_right_horn . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_right_horn . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . is_screaming_goat . is_dirty () || self . has_left_horn . is_dirty () || self . has_right_horn . is_dirty () } } impl Default for GoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GoatEntityData { fn base (& self) -> & BaseEntityData { GoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GoatEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for GoatEntityData { fn living_entity (& self) -> & LivingEntityData { GoatEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { GoatEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct HoglinEntityData { pub ageable_mob : AgeableMobEntityData , pub immune_to_zombification : SyncedValue < bool > } impl HoglinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , immune_to_zombification : SyncedValue :: new (false) } } # [doc = "Returns the `HoglinEntityData` layer."] pub fn hoglin (& self) -> & HoglinEntityData { self } # [doc = "Returns the mutable `HoglinEntityData` layer."] pub fn hoglin_mut (& mut self) -> & mut HoglinEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . immune_to_zombification . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immune_to_zombification . get ()) , }) ; self . immune_to_zombification . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . immune_to_zombification . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immune_to_zombification . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . immune_to_zombification . is_dirty () } } impl Default for HoglinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HoglinEntityData { fn base (& self) -> & BaseEntityData { HoglinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HoglinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HoglinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HoglinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HoglinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for HoglinEntityData { fn living_entity (& self) -> & LivingEntityData { HoglinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { HoglinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct HorseEntityData { pub abstract_horse : AbstractHorseEntityData , pub id_type_variant : SyncedValue < i32 > } impl HorseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_horse : AbstractHorseEntityData :: new () , id_type_variant : SyncedValue :: new (0i32) } } # [doc = "Returns the `HorseEntityData` layer."] pub fn horse (& self) -> & HorseEntityData { self } # [doc = "Returns the mutable `HorseEntityData` layer."] pub fn horse_mut (& mut self) -> & mut HorseEntityData { self } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_dirty_into (values) ; if self . id_type_variant . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_type_variant . get ()) , }) ; self . id_type_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_horse . pack_all_into (values) ; if ! self . id_type_variant . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_type_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_horse . is_dirty () || self . id_type_variant . is_dirty () } } impl Default for HorseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HorseEntityData { fn base (& self) -> & BaseEntityData { HorseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HorseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HorseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HorseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HorseEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for HorseEntityData { fn living_entity (& self) -> & LivingEntityData { HorseEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { HorseEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct InteractionEntityData { pub base : BaseEntityData , pub width : SyncedValue < f32 > , pub height : SyncedValue < f32 > , pub response : SyncedValue < bool > } impl InteractionEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , width : SyncedValue :: new (1f32) , height : SyncedValue :: new (1f32) , response : SyncedValue :: new (false) } } # [doc = "Returns the `InteractionEntityData` layer."] pub fn interaction (& self) -> & InteractionEntityData { self } # [doc = "Returns the mutable `InteractionEntityData` layer."] pub fn interaction_mut (& mut self) -> & mut InteractionEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . width . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . width . get ()) , }) ; self . width . clear_dirty () ; } if self . height . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . height . get ()) , }) ; self . height . clear_dirty () ; } if self . response . is_dirty () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . response . get ()) , }) ; self . response . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . width . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . width . get ()) , }) ; } if ! self . height . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . height . get ()) , }) ; } if ! self . response . is_default () { values . push (DataValue { index : 10u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . response . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . width . is_dirty () || self . height . is_dirty () || self . response . is_dirty () } } impl Default for InteractionEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for InteractionEntityData { fn base (& self) -> & BaseEntityData { InteractionEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { InteractionEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { InteractionEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { InteractionEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { InteractionEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct IronGolemEntityData { pub mob : MobEntityData , pub flags : SyncedValue < i8 > } impl IronGolemEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `IronGolemEntityData` layer."] pub fn iron_golem (& self) -> & IronGolemEntityData { self } # [doc = "Returns the mutable `IronGolemEntityData` layer."] pub fn iron_golem_mut (& mut self) -> & mut IronGolemEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . flags . is_dirty () } } impl Default for IronGolemEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for IronGolemEntityData { fn base (& self) -> & BaseEntityData { IronGolemEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { IronGolemEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { IronGolemEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { IronGolemEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { IronGolemEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for IronGolemEntityData { fn living_entity (& self) -> & LivingEntityData { IronGolemEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { IronGolemEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ItemEntityData { pub base : BaseEntityData , pub item : SyncedValue < ItemStack > } impl ItemEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , item : SyncedValue :: new (ItemStack :: empty ()) } } # [doc = "Returns the `ItemEntityData` layer."] pub fn item_entity (& self) -> & ItemEntityData { self } # [doc = "Returns the mutable `ItemEntityData` layer."] pub fn item_entity_mut (& mut self) -> & mut ItemEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . item . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; self . item . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . item . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . item . is_dirty () } } impl Default for ItemEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ItemEntityData { fn base (& self) -> & BaseEntityData { ItemEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ItemEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ItemEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ItemEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ItemEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ItemDisplayEntityData { pub display : DisplayEntityData , pub item_stack : SyncedValue < ItemStack > , pub item_display : SyncedValue < i8 > } impl ItemDisplayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { display : DisplayEntityData :: new () , item_stack : SyncedValue :: new (ItemStack :: empty ()) , item_display : SyncedValue :: new (0i8) } } # [doc = "Returns the `ItemDisplayEntityData` layer."] pub fn item_display (& self) -> & ItemDisplayEntityData { self } # [doc = "Returns the mutable `ItemDisplayEntityData` layer."] pub fn item_display_mut (& mut self) -> & mut ItemDisplayEntityData { self } # [doc = "Returns the `DisplayEntityData` layer."] pub fn display (& self) -> & DisplayEntityData { & self . display } # [doc = "Returns the mutable `DisplayEntityData` layer."] pub fn display_mut (& mut self) -> & mut DisplayEntityData { & mut self . display } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . display . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . display . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . display . pack_dirty_into (values) ; if self . item_stack . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; self . item_stack . clear_dirty () ; } if self . item_display . is_dirty () { values . push (DataValue { index : 24u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . item_display . get ()) , }) ; self . item_display . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . display . pack_all_into (values) ; if ! self . item_stack . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item_stack . get () . clone ()) , }) ; } if ! self . item_display . is_default () { values . push (DataValue { index : 24u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . item_display . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . display . is_dirty () || self . item_stack . is_dirty () || self . item_display . is_dirty () } } impl Default for ItemDisplayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ItemDisplayEntityData { fn base (& self) -> & BaseEntityData { ItemDisplayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ItemDisplayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ItemDisplayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ItemDisplayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ItemDisplayEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct LlamaEntityData { pub abstract_chested_horse : AbstractChestedHorseEntityData , pub strength : SyncedValue < i32 > , pub variant : SyncedValue < i32 > } impl LlamaEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_chested_horse : AbstractChestedHorseEntityData :: new () , strength : SyncedValue :: new (0i32) , variant : SyncedValue :: new (0i32) } } # [doc = "Returns the `LlamaEntityData` layer."] pub fn llama (& self) -> & LlamaEntityData { self } # [doc = "Returns the mutable `LlamaEntityData` layer."] pub fn llama_mut (& mut self) -> & mut LlamaEntityData { self } # [doc = "Returns the `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse (& self) -> & AbstractChestedHorseEntityData { & self . abstract_chested_horse } # [doc = "Returns the mutable `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse_mut (& mut self) -> & mut AbstractChestedHorseEntityData { & mut self . abstract_chested_horse } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_chested_horse . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_chested_horse . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_chested_horse . pack_dirty_into (values) ; if self . strength . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . strength . get ()) , }) ; self . strength . clear_dirty () ; } if self . variant . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_chested_horse . pack_all_into (values) ; if ! self . strength . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . strength . get ()) , }) ; } if ! self . variant . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_chested_horse . is_dirty () || self . strength . is_dirty () || self . variant . is_dirty () } } impl Default for LlamaEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LlamaEntityData { fn base (& self) -> & BaseEntityData { LlamaEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LlamaEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LlamaEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LlamaEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LlamaEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for LlamaEntityData { fn living_entity (& self) -> & LivingEntityData { LlamaEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { LlamaEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractCubeMobEntityData { pub ageable_mob : AgeableMobEntityData , pub id_size : SyncedValue < i32 > } impl AbstractCubeMobEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , id_size : SyncedValue :: new (1i32) } } # [doc = "Returns the `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob (& self) -> & AbstractCubeMobEntityData { self } # [doc = "Returns the mutable `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob_mut (& mut self) -> & mut AbstractCubeMobEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . id_size . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_size . get ()) , }) ; self . id_size . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . id_size . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_size . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . id_size . is_dirty () } } impl Default for AbstractCubeMobEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractCubeMobEntityData { fn base (& self) -> & BaseEntityData { AbstractCubeMobEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractCubeMobEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractCubeMobEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractCubeMobEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractCubeMobEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractCubeMobEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractCubeMobEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractCubeMobEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AvatarEntityData { pub living_entity : LivingEntityData , pub player_main_hand : SyncedValue < HumanoidArm > , pub player_mode_customization : SyncedValue < i8 > } impl AvatarEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { living_entity : LivingEntityData :: new () , player_main_hand : SyncedValue :: new (HumanoidArm :: Right) , player_mode_customization : SyncedValue :: new (0i8) } } # [doc = "Returns the `AvatarEntityData` layer."] pub fn avatar (& self) -> & AvatarEntityData { self } # [doc = "Returns the mutable `AvatarEntityData` layer."] pub fn avatar_mut (& mut self) -> & mut AvatarEntityData { self } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . living_entity . pack_dirty_into (values) ; if self . player_main_hand . is_dirty () { values . push (DataValue { index : 15u8 , serializer_id : 42i32 , value : EntityData :: HumanoidArm (* self . player_main_hand . get ()) , }) ; self . player_main_hand . clear_dirty () ; } if self . player_mode_customization . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . player_mode_customization . get ()) , }) ; self . player_mode_customization . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . living_entity . pack_all_into (values) ; if ! self . player_main_hand . is_default () { values . push (DataValue { index : 15u8 , serializer_id : 42i32 , value : EntityData :: HumanoidArm (* self . player_main_hand . get ()) , }) ; } if ! self . player_mode_customization . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . player_mode_customization . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . living_entity . is_dirty () || self . player_main_hand . is_dirty () || self . player_mode_customization . is_dirty () } } impl Default for AvatarEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AvatarEntityData { fn base (& self) -> & BaseEntityData { AvatarEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AvatarEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AvatarEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AvatarEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AvatarEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AvatarEntityData { fn living_entity (& self) -> & LivingEntityData { AvatarEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AvatarEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct MannequinEntityData { pub avatar : AvatarEntityData , pub profile : SyncedValue < ResolvableProfile > , pub immovable : SyncedValue < bool > , pub description : SyncedValue < Option < Box < TextComponent >> > } impl MannequinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { avatar : AvatarEntityData :: new () , profile : SyncedValue :: new (ResolvableProfile :: default ()) , immovable : SyncedValue :: new (false) , description : SyncedValue :: new (Some (Box :: new (TextComponent :: plain ("NPC")))) } } # [doc = "Returns the `MannequinEntityData` layer."] pub fn mannequin (& self) -> & MannequinEntityData { self } # [doc = "Returns the mutable `MannequinEntityData` layer."] pub fn mannequin_mut (& mut self) -> & mut MannequinEntityData { self } # [doc = "Returns the `AvatarEntityData` layer."] pub fn avatar (& self) -> & AvatarEntityData { & self . avatar } # [doc = "Returns the mutable `AvatarEntityData` layer."] pub fn avatar_mut (& mut self) -> & mut AvatarEntityData { & mut self . avatar } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . avatar . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . avatar . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . avatar . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . avatar . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . avatar . pack_dirty_into (values) ; if self . profile . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 41i32 , value : EntityData :: ResolvableProfile (self . profile . get () . clone ()) , }) ; self . profile . clear_dirty () ; } if self . immovable . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immovable . get ()) , }) ; self . immovable . clear_dirty () ; } if self . description . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 6i32 , value : EntityData :: OptionalComponent (self . description . get () . clone ()) , }) ; self . description . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . avatar . pack_all_into (values) ; if ! self . profile . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 41i32 , value : EntityData :: ResolvableProfile (self . profile . get () . clone ()) , }) ; } if ! self . immovable . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immovable . get ()) , }) ; } if ! self . description . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 6i32 , value : EntityData :: OptionalComponent (self . description . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . avatar . is_dirty () || self . profile . is_dirty () || self . immovable . is_dirty () || self . description . is_dirty () } } impl Default for MannequinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MannequinEntityData { fn base (& self) -> & BaseEntityData { MannequinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MannequinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MannequinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MannequinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MannequinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MannequinEntityData { fn living_entity (& self) -> & LivingEntityData { MannequinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MannequinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct MushroomCowEntityData { pub ageable_mob : AgeableMobEntityData , pub variant_type : SyncedValue < i32 > } impl MushroomCowEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant_type : SyncedValue :: new (0i32) } } # [doc = "Returns the `MushroomCowEntityData` layer."] pub fn mushroom_cow (& self) -> & MushroomCowEntityData { self } # [doc = "Returns the mutable `MushroomCowEntityData` layer."] pub fn mushroom_cow_mut (& mut self) -> & mut MushroomCowEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant_type . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; self . variant_type . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant_type . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant_type . is_dirty () } } impl Default for MushroomCowEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MushroomCowEntityData { fn base (& self) -> & BaseEntityData { MushroomCowEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MushroomCowEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MushroomCowEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MushroomCowEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MushroomCowEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MushroomCowEntityData { fn living_entity (& self) -> & LivingEntityData { MushroomCowEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MushroomCowEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractNautilusEntityData { pub tamable_animal : TamableAnimalEntityData , pub dash : SyncedValue < bool > } impl AbstractNautilusEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { tamable_animal : TamableAnimalEntityData :: new () , dash : SyncedValue :: new (false) } } # [doc = "Returns the `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus (& self) -> & AbstractNautilusEntityData { self } # [doc = "Returns the mutable `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus_mut (& mut self) -> & mut AbstractNautilusEntityData { self } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_dirty_into (values) ; if self . dash . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dash . get ()) , }) ; self . dash . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_all_into (values) ; if ! self . dash . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dash . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . tamable_animal . is_dirty () || self . dash . is_dirty () } } impl Default for AbstractNautilusEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractNautilusEntityData { fn base (& self) -> & BaseEntityData { AbstractNautilusEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractNautilusEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractNautilusEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractNautilusEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractNautilusEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractNautilusEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractNautilusEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractNautilusEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct OcelotEntityData { pub ageable_mob : AgeableMobEntityData , pub trusting : SyncedValue < bool > } impl OcelotEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , trusting : SyncedValue :: new (false) } } # [doc = "Returns the `OcelotEntityData` layer."] pub fn ocelot (& self) -> & OcelotEntityData { self } # [doc = "Returns the mutable `OcelotEntityData` layer."] pub fn ocelot_mut (& mut self) -> & mut OcelotEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . trusting . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . trusting . get ()) , }) ; self . trusting . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . trusting . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . trusting . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . trusting . is_dirty () } } impl Default for OcelotEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for OcelotEntityData { fn base (& self) -> & BaseEntityData { OcelotEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { OcelotEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { OcelotEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { OcelotEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { OcelotEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for OcelotEntityData { fn living_entity (& self) -> & LivingEntityData { OcelotEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { OcelotEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct OminousItemSpawnerEntityData { pub base : BaseEntityData , pub item : SyncedValue < ItemStack > } impl OminousItemSpawnerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , item : SyncedValue :: new (ItemStack :: empty ()) } } # [doc = "Returns the `OminousItemSpawnerEntityData` layer."] pub fn ominous_item_spawner (& self) -> & OminousItemSpawnerEntityData { self } # [doc = "Returns the mutable `OminousItemSpawnerEntityData` layer."] pub fn ominous_item_spawner_mut (& mut self) -> & mut OminousItemSpawnerEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . item . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; self . item . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . item . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 7i32 , value : EntityData :: ItemStack (self . item . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . item . is_dirty () } } impl Default for OminousItemSpawnerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for OminousItemSpawnerEntityData { fn base (& self) -> & BaseEntityData { OminousItemSpawnerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { OminousItemSpawnerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { OminousItemSpawnerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { OminousItemSpawnerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { OminousItemSpawnerEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PaintingEntityData { pub hanging_entity : HangingEntityData , pub painting_variant : SyncedValue < RegistryReference < crate :: painting_variant :: PaintingVariant > > } impl PaintingEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { hanging_entity : HangingEntityData :: new () , painting_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_painting_variants :: ALBAN)) } } # [doc = "Returns the `PaintingEntityData` layer."] pub fn painting (& self) -> & PaintingEntityData { self } # [doc = "Returns the mutable `PaintingEntityData` layer."] pub fn painting_mut (& mut self) -> & mut PaintingEntityData { self } # [doc = "Returns the `HangingEntityData` layer."] pub fn hanging_entity (& self) -> & HangingEntityData { & self . hanging_entity } # [doc = "Returns the mutable `HangingEntityData` layer."] pub fn hanging_entity_mut (& mut self) -> & mut HangingEntityData { & mut self . hanging_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . hanging_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . hanging_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . hanging_entity . pack_dirty_into (values) ; if self . painting_variant . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 34i32 , value : EntityData :: PaintingVariant (* self . painting_variant . get ()) , }) ; self . painting_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . hanging_entity . pack_all_into (values) ; if ! self . painting_variant . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 34i32 , value : EntityData :: PaintingVariant (* self . painting_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . hanging_entity . is_dirty () || self . painting_variant . is_dirty () } } impl Default for PaintingEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PaintingEntityData { fn base (& self) -> & BaseEntityData { PaintingEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PaintingEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PaintingEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PaintingEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PaintingEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PandaEntityData { pub ageable_mob : AgeableMobEntityData , pub unhappy_counter : SyncedValue < i32 > , pub sneeze_counter : SyncedValue < i32 > , pub eat_counter : SyncedValue < i32 > , pub main_gene : SyncedValue < i8 > , pub hidden_gene : SyncedValue < i8 > , pub id_flags : SyncedValue < i8 > } impl PandaEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , unhappy_counter : SyncedValue :: new (0i32) , sneeze_counter : SyncedValue :: new (0i32) , eat_counter : SyncedValue :: new (0i32) , main_gene : SyncedValue :: new (0i8) , hidden_gene : SyncedValue :: new (0i8) , id_flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `PandaEntityData` layer."] pub fn panda (& self) -> & PandaEntityData { self } # [doc = "Returns the mutable `PandaEntityData` layer."] pub fn panda_mut (& mut self) -> & mut PandaEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . unhappy_counter . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . unhappy_counter . get ()) , }) ; self . unhappy_counter . clear_dirty () ; } if self . sneeze_counter . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . sneeze_counter . get ()) , }) ; self . sneeze_counter . clear_dirty () ; } if self . eat_counter . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . eat_counter . get ()) , }) ; self . eat_counter . clear_dirty () ; } if self . main_gene . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . main_gene . get ()) , }) ; self . main_gene . clear_dirty () ; } if self . hidden_gene . is_dirty () { values . push (DataValue { index : 22u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . hidden_gene . get ()) , }) ; self . hidden_gene . clear_dirty () ; } if self . id_flags . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; self . id_flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . unhappy_counter . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . unhappy_counter . get ()) , }) ; } if ! self . sneeze_counter . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . sneeze_counter . get ()) , }) ; } if ! self . eat_counter . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . eat_counter . get ()) , }) ; } if ! self . main_gene . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . main_gene . get ()) , }) ; } if ! self . hidden_gene . is_default () { values . push (DataValue { index : 22u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . hidden_gene . get ()) , }) ; } if ! self . id_flags . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . unhappy_counter . is_dirty () || self . sneeze_counter . is_dirty () || self . eat_counter . is_dirty () || self . main_gene . is_dirty () || self . hidden_gene . is_dirty () || self . id_flags . is_dirty () } } impl Default for PandaEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PandaEntityData { fn base (& self) -> & BaseEntityData { PandaEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PandaEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PandaEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PandaEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PandaEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PandaEntityData { fn living_entity (& self) -> & LivingEntityData { PandaEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PandaEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ParrotEntityData { pub tamable_animal : TamableAnimalEntityData , pub variant : SyncedValue < i32 > } impl ParrotEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { tamable_animal : TamableAnimalEntityData :: new () , variant : SyncedValue :: new (0i32) } } # [doc = "Returns the `ParrotEntityData` layer."] pub fn parrot (& self) -> & ParrotEntityData { self } # [doc = "Returns the mutable `ParrotEntityData` layer."] pub fn parrot_mut (& mut self) -> & mut ParrotEntityData { self } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . tamable_animal . is_dirty () || self . variant . is_dirty () } } impl Default for ParrotEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ParrotEntityData { fn base (& self) -> & BaseEntityData { ParrotEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ParrotEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ParrotEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ParrotEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ParrotEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ParrotEntityData { fn living_entity (& self) -> & LivingEntityData { ParrotEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ParrotEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PhantomEntityData { pub mob : MobEntityData , pub id_size : SyncedValue < i32 > } impl PhantomEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , id_size : SyncedValue :: new (0i32) } } # [doc = "Returns the `PhantomEntityData` layer."] pub fn phantom (& self) -> & PhantomEntityData { self } # [doc = "Returns the mutable `PhantomEntityData` layer."] pub fn phantom_mut (& mut self) -> & mut PhantomEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . id_size . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_size . get ()) , }) ; self . id_size . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . id_size . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_size . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . id_size . is_dirty () } } impl Default for PhantomEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PhantomEntityData { fn base (& self) -> & BaseEntityData { PhantomEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PhantomEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PhantomEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PhantomEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PhantomEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PhantomEntityData { fn living_entity (& self) -> & LivingEntityData { PhantomEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PhantomEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PigEntityData { pub ageable_mob : AgeableMobEntityData , pub boost_time : SyncedValue < i32 > , pub variant : SyncedValue < RegistryReference < crate :: pig_variant :: PigVariant > > , pub sound_variant : SyncedValue < RegistryReference < crate :: pig_sound_variant :: PigSoundVariant > > } impl PigEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , boost_time : SyncedValue :: new (0i32) , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_pig_variants :: TEMPERATE)) , sound_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_pig_sound_variants :: CLASSIC)) } } # [doc = "Returns the `PigEntityData` layer."] pub fn pig (& self) -> & PigEntityData { self } # [doc = "Returns the mutable `PigEntityData` layer."] pub fn pig_mut (& mut self) -> & mut PigEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . boost_time . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . boost_time . get ()) , }) ; self . boost_time . clear_dirty () ; } if self . variant . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 28i32 , value : EntityData :: PigVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . sound_variant . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 29i32 , value : EntityData :: PigSoundVariant (* self . sound_variant . get ()) , }) ; self . sound_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . boost_time . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . boost_time . get ()) , }) ; } if ! self . variant . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 28i32 , value : EntityData :: PigVariant (* self . variant . get ()) , }) ; } if ! self . sound_variant . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 29i32 , value : EntityData :: PigSoundVariant (* self . sound_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . boost_time . is_dirty () || self . variant . is_dirty () || self . sound_variant . is_dirty () } } impl Default for PigEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PigEntityData { fn base (& self) -> & BaseEntityData { PigEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PigEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PigEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PigEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PigEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PigEntityData { fn living_entity (& self) -> & LivingEntityData { PigEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PigEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractPiglinEntityData { pub mob : MobEntityData , pub immune_to_zombification : SyncedValue < bool > } impl AbstractPiglinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , immune_to_zombification : SyncedValue :: new (false) } } # [doc = "Returns the `AbstractPiglinEntityData` layer."] pub fn abstract_piglin (& self) -> & AbstractPiglinEntityData { self } # [doc = "Returns the mutable `AbstractPiglinEntityData` layer."] pub fn abstract_piglin_mut (& mut self) -> & mut AbstractPiglinEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . immune_to_zombification . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immune_to_zombification . get ()) , }) ; self . immune_to_zombification . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . immune_to_zombification . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . immune_to_zombification . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . immune_to_zombification . is_dirty () } } impl Default for AbstractPiglinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractPiglinEntityData { fn base (& self) -> & BaseEntityData { AbstractPiglinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractPiglinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractPiglinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractPiglinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractPiglinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractPiglinEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractPiglinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractPiglinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PiglinEntityData { pub abstract_piglin : AbstractPiglinEntityData , pub baby : SyncedValue < bool > , pub is_charging_crossbow : SyncedValue < bool > , pub is_dancing : SyncedValue < bool > } impl PiglinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_piglin : AbstractPiglinEntityData :: new () , baby : SyncedValue :: new (false) , is_charging_crossbow : SyncedValue :: new (false) , is_dancing : SyncedValue :: new (false) } } # [doc = "Returns the `PiglinEntityData` layer."] pub fn piglin (& self) -> & PiglinEntityData { self } # [doc = "Returns the mutable `PiglinEntityData` layer."] pub fn piglin_mut (& mut self) -> & mut PiglinEntityData { self } # [doc = "Returns the `AbstractPiglinEntityData` layer."] pub fn abstract_piglin (& self) -> & AbstractPiglinEntityData { & self . abstract_piglin } # [doc = "Returns the mutable `AbstractPiglinEntityData` layer."] pub fn abstract_piglin_mut (& mut self) -> & mut AbstractPiglinEntityData { & mut self . abstract_piglin } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_piglin . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_piglin . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_piglin . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_piglin . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_piglin . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_piglin . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_piglin . pack_dirty_into (values) ; if self . baby . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; self . baby . clear_dirty () ; } if self . is_charging_crossbow . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging_crossbow . get ()) , }) ; self . is_charging_crossbow . clear_dirty () ; } if self . is_dancing . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_dancing . get ()) , }) ; self . is_dancing . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_piglin . pack_all_into (values) ; if ! self . baby . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; } if ! self . is_charging_crossbow . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging_crossbow . get ()) , }) ; } if ! self . is_dancing . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_dancing . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_piglin . is_dirty () || self . baby . is_dirty () || self . is_charging_crossbow . is_dirty () || self . is_dancing . is_dirty () } } impl Default for PiglinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PiglinEntityData { fn base (& self) -> & BaseEntityData { PiglinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PiglinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PiglinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PiglinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PiglinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PiglinEntityData { fn living_entity (& self) -> & LivingEntityData { PiglinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PiglinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PillagerEntityData { pub raider : RaiderEntityData , pub is_charging_crossbow : SyncedValue < bool > } impl PillagerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { raider : RaiderEntityData :: new () , is_charging_crossbow : SyncedValue :: new (false) } } # [doc = "Returns the `PillagerEntityData` layer."] pub fn pillager (& self) -> & PillagerEntityData { self } # [doc = "Returns the mutable `PillagerEntityData` layer."] pub fn pillager_mut (& mut self) -> & mut PillagerEntityData { self } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . raider . pack_dirty_into (values) ; if self . is_charging_crossbow . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging_crossbow . get ()) , }) ; self . is_charging_crossbow . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . raider . pack_all_into (values) ; if ! self . is_charging_crossbow . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . is_charging_crossbow . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . raider . is_dirty () || self . is_charging_crossbow . is_dirty () } } impl Default for PillagerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PillagerEntityData { fn base (& self) -> & BaseEntityData { PillagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PillagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PillagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PillagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PillagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PillagerEntityData { fn living_entity (& self) -> & LivingEntityData { PillagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PillagerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PolarBearEntityData { pub ageable_mob : AgeableMobEntityData , pub standing : SyncedValue < bool > } impl PolarBearEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , standing : SyncedValue :: new (false) } } # [doc = "Returns the `PolarBearEntityData` layer."] pub fn polar_bear (& self) -> & PolarBearEntityData { self } # [doc = "Returns the mutable `PolarBearEntityData` layer."] pub fn polar_bear_mut (& mut self) -> & mut PolarBearEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . standing . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . standing . get ()) , }) ; self . standing . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . standing . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . standing . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . standing . is_dirty () } } impl Default for PolarBearEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PolarBearEntityData { fn base (& self) -> & BaseEntityData { PolarBearEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PolarBearEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PolarBearEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PolarBearEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PolarBearEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PolarBearEntityData { fn living_entity (& self) -> & LivingEntityData { PolarBearEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PolarBearEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PufferfishEntityData { pub abstract_fish : AbstractFishEntityData , pub puff_state : SyncedValue < i32 > } impl PufferfishEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_fish : AbstractFishEntityData :: new () , puff_state : SyncedValue :: new (0i32) } } # [doc = "Returns the `PufferfishEntityData` layer."] pub fn pufferfish (& self) -> & PufferfishEntityData { self } # [doc = "Returns the mutable `PufferfishEntityData` layer."] pub fn pufferfish_mut (& mut self) -> & mut PufferfishEntityData { self } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { & self . abstract_fish } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { & mut self . abstract_fish } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_fish . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_fish . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_fish . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_fish . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_fish . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_fish . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_dirty_into (values) ; if self . puff_state . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . puff_state . get ()) , }) ; self . puff_state . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_all_into (values) ; if ! self . puff_state . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . puff_state . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_fish . is_dirty () || self . puff_state . is_dirty () } } impl Default for PufferfishEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PufferfishEntityData { fn base (& self) -> & BaseEntityData { PufferfishEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PufferfishEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PufferfishEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PufferfishEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PufferfishEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PufferfishEntityData { fn living_entity (& self) -> & LivingEntityData { PufferfishEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PufferfishEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct RabbitEntityData { pub ageable_mob : AgeableMobEntityData , pub variant_type : SyncedValue < i32 > } impl RabbitEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , variant_type : SyncedValue :: new (0i32) } } # [doc = "Returns the `RabbitEntityData` layer."] pub fn rabbit (& self) -> & RabbitEntityData { self } # [doc = "Returns the mutable `RabbitEntityData` layer."] pub fn rabbit_mut (& mut self) -> & mut RabbitEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . variant_type . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; self . variant_type . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . variant_type . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . variant_type . is_dirty () } } impl Default for RabbitEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for RabbitEntityData { fn base (& self) -> & BaseEntityData { RabbitEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { RabbitEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { RabbitEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { RabbitEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { RabbitEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for RabbitEntityData { fn living_entity (& self) -> & LivingEntityData { RabbitEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { RabbitEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SalmonEntityData { pub abstract_fish : AbstractFishEntityData , pub variant_type : SyncedValue < i32 > } impl SalmonEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_fish : AbstractFishEntityData :: new () , variant_type : SyncedValue :: new (1i32) } } # [doc = "Returns the `SalmonEntityData` layer."] pub fn salmon (& self) -> & SalmonEntityData { self } # [doc = "Returns the mutable `SalmonEntityData` layer."] pub fn salmon_mut (& mut self) -> & mut SalmonEntityData { self } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { & self . abstract_fish } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { & mut self . abstract_fish } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_fish . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_fish . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_fish . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_fish . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_fish . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_fish . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_dirty_into (values) ; if self . variant_type . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; self . variant_type . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_all_into (values) ; if ! self . variant_type . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . variant_type . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_fish . is_dirty () || self . variant_type . is_dirty () } } impl Default for SalmonEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SalmonEntityData { fn base (& self) -> & BaseEntityData { SalmonEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SalmonEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SalmonEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SalmonEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SalmonEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SalmonEntityData { fn living_entity (& self) -> & LivingEntityData { SalmonEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SalmonEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SheepEntityData { pub ageable_mob : AgeableMobEntityData , pub wool : SyncedValue < i8 > } impl SheepEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , wool : SyncedValue :: new (0i8) } } # [doc = "Returns the `SheepEntityData` layer."] pub fn sheep (& self) -> & SheepEntityData { self } # [doc = "Returns the mutable `SheepEntityData` layer."] pub fn sheep_mut (& mut self) -> & mut SheepEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . wool . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . wool . get ()) , }) ; self . wool . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . wool . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . wool . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . wool . is_dirty () } } impl Default for SheepEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SheepEntityData { fn base (& self) -> & BaseEntityData { SheepEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SheepEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SheepEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SheepEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SheepEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SheepEntityData { fn living_entity (& self) -> & LivingEntityData { SheepEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SheepEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ShulkerEntityData { pub mob : MobEntityData , pub attach_face : SyncedValue < Direction > , pub peek : SyncedValue < i8 > , pub color : SyncedValue < i8 > } impl ShulkerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , attach_face : SyncedValue :: new (Direction :: Down) , peek : SyncedValue :: new (0i8) , color : SyncedValue :: new (16i8) } } # [doc = "Returns the `ShulkerEntityData` layer."] pub fn shulker (& self) -> & ShulkerEntityData { self } # [doc = "Returns the mutable `ShulkerEntityData` layer."] pub fn shulker_mut (& mut self) -> & mut ShulkerEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . attach_face . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 12i32 , value : EntityData :: Direction (* self . attach_face . get ()) , }) ; self . attach_face . clear_dirty () ; } if self . peek . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . peek . get ()) , }) ; self . peek . clear_dirty () ; } if self . color . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . color . get ()) , }) ; self . color . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . attach_face . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 12i32 , value : EntityData :: Direction (* self . attach_face . get ()) , }) ; } if ! self . peek . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . peek . get ()) , }) ; } if ! self . color . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . color . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . attach_face . is_dirty () || self . peek . is_dirty () || self . color . is_dirty () } } impl Default for ShulkerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ShulkerEntityData { fn base (& self) -> & BaseEntityData { ShulkerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ShulkerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ShulkerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ShulkerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ShulkerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ShulkerEntityData { fn living_entity (& self) -> & LivingEntityData { ShulkerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ShulkerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SkeletonEntityData { pub mob : MobEntityData , pub stray_conversion : SyncedValue < bool > } impl SkeletonEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , stray_conversion : SyncedValue :: new (false) } } # [doc = "Returns the `SkeletonEntityData` layer."] pub fn skeleton (& self) -> & SkeletonEntityData { self } # [doc = "Returns the mutable `SkeletonEntityData` layer."] pub fn skeleton_mut (& mut self) -> & mut SkeletonEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . stray_conversion . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stray_conversion . get ()) , }) ; self . stray_conversion . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . stray_conversion . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . stray_conversion . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . stray_conversion . is_dirty () } } impl Default for SkeletonEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SkeletonEntityData { fn base (& self) -> & BaseEntityData { SkeletonEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SkeletonEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SkeletonEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SkeletonEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SkeletonEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SkeletonEntityData { fn living_entity (& self) -> & LivingEntityData { SkeletonEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SkeletonEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SnifferEntityData { pub ageable_mob : AgeableMobEntityData , pub state : SyncedValue < SnifferState > , pub drop_seed_at_tick : SyncedValue < i32 > } impl SnifferEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , state : SyncedValue :: new (SnifferState :: Idling) , drop_seed_at_tick : SyncedValue :: new (0i32) } } # [doc = "Returns the `SnifferEntityData` layer."] pub fn sniffer (& self) -> & SnifferEntityData { self } # [doc = "Returns the mutable `SnifferEntityData` layer."] pub fn sniffer_mut (& mut self) -> & mut SnifferEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . state . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 35i32 , value : EntityData :: SnifferState (* self . state . get ()) , }) ; self . state . clear_dirty () ; } if self . drop_seed_at_tick . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . drop_seed_at_tick . get ()) , }) ; self . drop_seed_at_tick . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . state . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 35i32 , value : EntityData :: SnifferState (* self . state . get ()) , }) ; } if ! self . drop_seed_at_tick . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . drop_seed_at_tick . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . state . is_dirty () || self . drop_seed_at_tick . is_dirty () } } impl Default for SnifferEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SnifferEntityData { fn base (& self) -> & BaseEntityData { SnifferEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SnifferEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SnifferEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SnifferEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SnifferEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SnifferEntityData { fn living_entity (& self) -> & LivingEntityData { SnifferEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SnifferEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SnowGolemEntityData { pub mob : MobEntityData , pub pumpkin : SyncedValue < i8 > } impl SnowGolemEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , pumpkin : SyncedValue :: new (16i8) } } # [doc = "Returns the `SnowGolemEntityData` layer."] pub fn snow_golem (& self) -> & SnowGolemEntityData { self } # [doc = "Returns the mutable `SnowGolemEntityData` layer."] pub fn snow_golem_mut (& mut self) -> & mut SnowGolemEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . pumpkin . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . pumpkin . get ()) , }) ; self . pumpkin . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . pumpkin . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . pumpkin . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . pumpkin . is_dirty () } } impl Default for SnowGolemEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SnowGolemEntityData { fn base (& self) -> & BaseEntityData { SnowGolemEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SnowGolemEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SnowGolemEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SnowGolemEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SnowGolemEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SnowGolemEntityData { fn living_entity (& self) -> & LivingEntityData { SnowGolemEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SnowGolemEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct StriderEntityData { pub ageable_mob : AgeableMobEntityData , pub boost_time : SyncedValue < i32 > , pub suffocating : SyncedValue < bool > } impl StriderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , boost_time : SyncedValue :: new (0i32) , suffocating : SyncedValue :: new (false) } } # [doc = "Returns the `StriderEntityData` layer."] pub fn strider (& self) -> & StriderEntityData { self } # [doc = "Returns the mutable `StriderEntityData` layer."] pub fn strider_mut (& mut self) -> & mut StriderEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . boost_time . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . boost_time . get ()) , }) ; self . boost_time . clear_dirty () ; } if self . suffocating . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . suffocating . get ()) , }) ; self . suffocating . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . boost_time . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . boost_time . get ()) , }) ; } if ! self . suffocating . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . suffocating . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . boost_time . is_dirty () || self . suffocating . is_dirty () } } impl Default for StriderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for StriderEntityData { fn base (& self) -> & BaseEntityData { StriderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { StriderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { StriderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { StriderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { StriderEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for StriderEntityData { fn living_entity (& self) -> & LivingEntityData { StriderEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { StriderEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct SulfurCubeEntityData { pub abstract_cube_mob : AbstractCubeMobEntityData , pub max_fuse : SyncedValue < i32 > , pub from_bucket : SyncedValue < bool > } impl SulfurCubeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_cube_mob : AbstractCubeMobEntityData :: new () , max_fuse : SyncedValue :: new (- 1i32) , from_bucket : SyncedValue :: new (false) } } # [doc = "Returns the `SulfurCubeEntityData` layer."] pub fn sulfur_cube (& self) -> & SulfurCubeEntityData { self } # [doc = "Returns the mutable `SulfurCubeEntityData` layer."] pub fn sulfur_cube_mut (& mut self) -> & mut SulfurCubeEntityData { self } # [doc = "Returns the `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob (& self) -> & AbstractCubeMobEntityData { & self . abstract_cube_mob } # [doc = "Returns the mutable `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob_mut (& mut self) -> & mut AbstractCubeMobEntityData { & mut self . abstract_cube_mob } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_cube_mob . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_cube_mob . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_cube_mob . pack_dirty_into (values) ; if self . max_fuse . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . max_fuse . get ()) , }) ; self . max_fuse . clear_dirty () ; } if self . from_bucket . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; self . from_bucket . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_cube_mob . pack_all_into (values) ; if ! self . max_fuse . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . max_fuse . get ()) , }) ; } if ! self . from_bucket . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . from_bucket . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_cube_mob . is_dirty () || self . max_fuse . is_dirty () || self . from_bucket . is_dirty () } } impl Default for SulfurCubeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SulfurCubeEntityData { fn base (& self) -> & BaseEntityData { SulfurCubeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SulfurCubeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SulfurCubeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SulfurCubeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SulfurCubeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SulfurCubeEntityData { fn living_entity (& self) -> & LivingEntityData { SulfurCubeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SulfurCubeEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct TadpoleEntityData { pub abstract_fish : AbstractFishEntityData , pub age_locked : SyncedValue < bool > } impl TadpoleEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_fish : AbstractFishEntityData :: new () , age_locked : SyncedValue :: new (false) } } # [doc = "Returns the `TadpoleEntityData` layer."] pub fn tadpole (& self) -> & TadpoleEntityData { self } # [doc = "Returns the mutable `TadpoleEntityData` layer."] pub fn tadpole_mut (& mut self) -> & mut TadpoleEntityData { self } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { & self . abstract_fish } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { & mut self . abstract_fish } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_fish . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_fish . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_fish . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_fish . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_fish . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_fish . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_dirty_into (values) ; if self . age_locked . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . age_locked . get ()) , }) ; self . age_locked . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_all_into (values) ; if ! self . age_locked . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . age_locked . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_fish . is_dirty () || self . age_locked . is_dirty () } } impl Default for TadpoleEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TadpoleEntityData { fn base (& self) -> & BaseEntityData { TadpoleEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TadpoleEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TadpoleEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TadpoleEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TadpoleEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for TadpoleEntityData { fn living_entity (& self) -> & LivingEntityData { TadpoleEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { TadpoleEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct TextDisplayEntityData { pub display : DisplayEntityData , pub text : SyncedValue < Box < TextComponent > > , pub line_width : SyncedValue < i32 > , pub background_color : SyncedValue < i32 > , pub text_opacity : SyncedValue < i8 > , pub style_flags : SyncedValue < i8 > } impl TextDisplayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { display : DisplayEntityData :: new () , text : SyncedValue :: new (Box :: new (TextComponent :: default ())) , line_width : SyncedValue :: new (200i32) , background_color : SyncedValue :: new (1073741824i32) , text_opacity : SyncedValue :: new (- 1i8) , style_flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `TextDisplayEntityData` layer."] pub fn text_display (& self) -> & TextDisplayEntityData { self } # [doc = "Returns the mutable `TextDisplayEntityData` layer."] pub fn text_display_mut (& mut self) -> & mut TextDisplayEntityData { self } # [doc = "Returns the `DisplayEntityData` layer."] pub fn display (& self) -> & DisplayEntityData { & self . display } # [doc = "Returns the mutable `DisplayEntityData` layer."] pub fn display_mut (& mut self) -> & mut DisplayEntityData { & mut self . display } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . display . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . display . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . display . pack_dirty_into (values) ; if self . text . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 5i32 , value : EntityData :: Component (self . text . get () . clone ()) , }) ; self . text . clear_dirty () ; } if self . line_width . is_dirty () { values . push (DataValue { index : 24u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . line_width . get ()) , }) ; self . line_width . clear_dirty () ; } if self . background_color . is_dirty () { values . push (DataValue { index : 25u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . background_color . get ()) , }) ; self . background_color . clear_dirty () ; } if self . text_opacity . is_dirty () { values . push (DataValue { index : 26u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . text_opacity . get ()) , }) ; self . text_opacity . clear_dirty () ; } if self . style_flags . is_dirty () { values . push (DataValue { index : 27u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . style_flags . get ()) , }) ; self . style_flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . display . pack_all_into (values) ; if ! self . text . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 5i32 , value : EntityData :: Component (self . text . get () . clone ()) , }) ; } if ! self . line_width . is_default () { values . push (DataValue { index : 24u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . line_width . get ()) , }) ; } if ! self . background_color . is_default () { values . push (DataValue { index : 25u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . background_color . get ()) , }) ; } if ! self . text_opacity . is_default () { values . push (DataValue { index : 26u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . text_opacity . get ()) , }) ; } if ! self . style_flags . is_default () { values . push (DataValue { index : 27u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . style_flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . display . is_dirty () || self . text . is_dirty () || self . line_width . is_dirty () || self . background_color . is_dirty () || self . text_opacity . is_dirty () || self . style_flags . is_dirty () } } impl Default for TextDisplayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TextDisplayEntityData { fn base (& self) -> & BaseEntityData { TextDisplayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TextDisplayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TextDisplayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TextDisplayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TextDisplayEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PrimedTntEntityData { pub base : BaseEntityData , pub fuse : SyncedValue < i32 > , pub block_state : SyncedValue < BlockStateId > } impl PrimedTntEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , fuse : SyncedValue :: new (80i32) , block_state : SyncedValue :: new (crate :: vanilla_blocks :: TNT . default_state ()) } } # [doc = "Returns the `PrimedTntEntityData` layer."] pub fn primed_tnt (& self) -> & PrimedTntEntityData { self } # [doc = "Returns the mutable `PrimedTntEntityData` layer."] pub fn primed_tnt_mut (& mut self) -> & mut PrimedTntEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . fuse . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . fuse . get ()) , }) ; self . fuse . clear_dirty () ; } if self . block_state . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 14i32 , value : EntityData :: BlockState (* self . block_state . get ()) , }) ; self . block_state . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . fuse . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . fuse . get ()) , }) ; } if ! self . block_state . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 14i32 , value : EntityData :: BlockState (* self . block_state . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . fuse . is_dirty () || self . block_state . is_dirty () } } impl Default for PrimedTntEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PrimedTntEntityData { fn base (& self) -> & BaseEntityData { PrimedTntEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PrimedTntEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PrimedTntEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PrimedTntEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PrimedTntEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ThrownTridentEntityData { pub abstract_arrow : AbstractArrowEntityData , pub id_loyalty : SyncedValue < i8 > , pub id_foil : SyncedValue < bool > } impl ThrownTridentEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_arrow : AbstractArrowEntityData :: new () , id_loyalty : SyncedValue :: new (0i8) , id_foil : SyncedValue :: new (false) } } # [doc = "Returns the `ThrownTridentEntityData` layer."] pub fn thrown_trident (& self) -> & ThrownTridentEntityData { self } # [doc = "Returns the mutable `ThrownTridentEntityData` layer."] pub fn thrown_trident_mut (& mut self) -> & mut ThrownTridentEntityData { self } # [doc = "Returns the `AbstractArrowEntityData` layer."] pub fn abstract_arrow (& self) -> & AbstractArrowEntityData { & self . abstract_arrow } # [doc = "Returns the mutable `AbstractArrowEntityData` layer."] pub fn abstract_arrow_mut (& mut self) -> & mut AbstractArrowEntityData { & mut self . abstract_arrow } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_arrow . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_arrow . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_arrow . pack_dirty_into (values) ; if self . id_loyalty . is_dirty () { values . push (DataValue { index : 11u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_loyalty . get ()) , }) ; self . id_loyalty . clear_dirty () ; } if self . id_foil . is_dirty () { values . push (DataValue { index : 12u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_foil . get ()) , }) ; self . id_foil . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_arrow . pack_all_into (values) ; if ! self . id_loyalty . is_default () { values . push (DataValue { index : 11u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . id_loyalty . get ()) , }) ; } if ! self . id_foil . is_default () { values . push (DataValue { index : 12u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . id_foil . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_arrow . is_dirty () || self . id_loyalty . is_dirty () || self . id_foil . is_dirty () } } impl Default for ThrownTridentEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ThrownTridentEntityData { fn base (& self) -> & BaseEntityData { ThrownTridentEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ThrownTridentEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ThrownTridentEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ThrownTridentEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ThrownTridentEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct TropicalFishEntityData { pub abstract_fish : AbstractFishEntityData , pub id_type_variant : SyncedValue < i32 > } impl TropicalFishEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_fish : AbstractFishEntityData :: new () , id_type_variant : SyncedValue :: new (0i32) } } # [doc = "Returns the `TropicalFishEntityData` layer."] pub fn tropical_fish (& self) -> & TropicalFishEntityData { self } # [doc = "Returns the mutable `TropicalFishEntityData` layer."] pub fn tropical_fish_mut (& mut self) -> & mut TropicalFishEntityData { self } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { & self . abstract_fish } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { & mut self . abstract_fish } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_fish . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_fish . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_fish . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_fish . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_fish . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_fish . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_dirty_into (values) ; if self . id_type_variant . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_type_variant . get ()) , }) ; self . id_type_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_fish . pack_all_into (values) ; if ! self . id_type_variant . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_type_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_fish . is_dirty () || self . id_type_variant . is_dirty () } } impl Default for TropicalFishEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TropicalFishEntityData { fn base (& self) -> & BaseEntityData { TropicalFishEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TropicalFishEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TropicalFishEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TropicalFishEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TropicalFishEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for TropicalFishEntityData { fn living_entity (& self) -> & LivingEntityData { TropicalFishEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { TropicalFishEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct TurtleEntityData { pub ageable_mob : AgeableMobEntityData , pub has_egg : SyncedValue < bool > , pub laying_egg : SyncedValue < bool > } impl TurtleEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , has_egg : SyncedValue :: new (false) , laying_egg : SyncedValue :: new (false) } } # [doc = "Returns the `TurtleEntityData` layer."] pub fn turtle (& self) -> & TurtleEntityData { self } # [doc = "Returns the mutable `TurtleEntityData` layer."] pub fn turtle_mut (& mut self) -> & mut TurtleEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . has_egg . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_egg . get ()) , }) ; self . has_egg . clear_dirty () ; } if self . laying_egg . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . laying_egg . get ()) , }) ; self . laying_egg . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . has_egg . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . has_egg . get ()) , }) ; } if ! self . laying_egg . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . laying_egg . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . has_egg . is_dirty () || self . laying_egg . is_dirty () } } impl Default for TurtleEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TurtleEntityData { fn base (& self) -> & BaseEntityData { TurtleEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TurtleEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TurtleEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TurtleEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TurtleEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for TurtleEntityData { fn living_entity (& self) -> & LivingEntityData { TurtleEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { TurtleEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct VexEntityData { pub mob : MobEntityData , pub flags : SyncedValue < i8 > } impl VexEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , flags : SyncedValue :: new (0i8) } } # [doc = "Returns the `VexEntityData` layer."] pub fn vex (& self) -> & VexEntityData { self } # [doc = "Returns the mutable `VexEntityData` layer."] pub fn vex_mut (& mut self) -> & mut VexEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . flags . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; self . flags . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . flags . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 0i32 , value : EntityData :: Byte (* self . flags . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . flags . is_dirty () } } impl Default for VexEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for VexEntityData { fn base (& self) -> & BaseEntityData { VexEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { VexEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { VexEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { VexEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { VexEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for VexEntityData { fn living_entity (& self) -> & LivingEntityData { VexEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { VexEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct AbstractVillagerEntityData { pub ageable_mob : AgeableMobEntityData , pub unhappy_counter : SyncedValue < i32 > } impl AbstractVillagerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () , unhappy_counter : SyncedValue :: new (0i32) } } # [doc = "Returns the `AbstractVillagerEntityData` layer."] pub fn abstract_villager (& self) -> & AbstractVillagerEntityData { self } # [doc = "Returns the mutable `AbstractVillagerEntityData` layer."] pub fn abstract_villager_mut (& mut self) -> & mut AbstractVillagerEntityData { self } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_dirty_into (values) ; if self . unhappy_counter . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . unhappy_counter . get ()) , }) ; self . unhappy_counter . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . ageable_mob . pack_all_into (values) ; if ! self . unhappy_counter . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . unhappy_counter . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () || self . unhappy_counter . is_dirty () } } impl Default for AbstractVillagerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AbstractVillagerEntityData { fn base (& self) -> & BaseEntityData { AbstractVillagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AbstractVillagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AbstractVillagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AbstractVillagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AbstractVillagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for AbstractVillagerEntityData { fn living_entity (& self) -> & LivingEntityData { AbstractVillagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { AbstractVillagerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct VillagerEntityData { pub abstract_villager : AbstractVillagerEntityData , pub villager_data : SyncedValue < VillagerData > , pub villager_data_finalized : SyncedValue < bool > } impl VillagerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_villager : AbstractVillagerEntityData :: new () , villager_data : SyncedValue :: new (VillagerData :: new (2 , 0 , 1i32)) , villager_data_finalized : SyncedValue :: new (false) } } # [doc = "Returns the `VillagerEntityData` layer."] pub fn villager (& self) -> & VillagerEntityData { self } # [doc = "Returns the mutable `VillagerEntityData` layer."] pub fn villager_mut (& mut self) -> & mut VillagerEntityData { self } # [doc = "Returns the `AbstractVillagerEntityData` layer."] pub fn abstract_villager (& self) -> & AbstractVillagerEntityData { & self . abstract_villager } # [doc = "Returns the mutable `AbstractVillagerEntityData` layer."] pub fn abstract_villager_mut (& mut self) -> & mut AbstractVillagerEntityData { & mut self . abstract_villager } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_villager . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_villager . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_villager . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_villager . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_villager . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_villager . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_villager . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_villager . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_villager . pack_dirty_into (values) ; if self . villager_data . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 18i32 , value : EntityData :: VillagerData (self . villager_data . get () . clone ()) , }) ; self . villager_data . clear_dirty () ; } if self . villager_data_finalized . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . villager_data_finalized . get ()) , }) ; self . villager_data_finalized . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_villager . pack_all_into (values) ; if ! self . villager_data . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 18i32 , value : EntityData :: VillagerData (self . villager_data . get () . clone ()) , }) ; } if ! self . villager_data_finalized . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . villager_data_finalized . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_villager . is_dirty () || self . villager_data . is_dirty () || self . villager_data_finalized . is_dirty () } } impl Default for VillagerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for VillagerEntityData { fn base (& self) -> & BaseEntityData { VillagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { VillagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { VillagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { VillagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { VillagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for VillagerEntityData { fn living_entity (& self) -> & LivingEntityData { VillagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { VillagerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct WardenEntityData { pub mob : MobEntityData , pub client_anger_level : SyncedValue < i32 > } impl WardenEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , client_anger_level : SyncedValue :: new (0i32) } } # [doc = "Returns the `WardenEntityData` layer."] pub fn warden (& self) -> & WardenEntityData { self } # [doc = "Returns the mutable `WardenEntityData` layer."] pub fn warden_mut (& mut self) -> & mut WardenEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . client_anger_level . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . client_anger_level . get ()) , }) ; self . client_anger_level . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . client_anger_level . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . client_anger_level . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . client_anger_level . is_dirty () } } impl Default for WardenEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WardenEntityData { fn base (& self) -> & BaseEntityData { WardenEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WardenEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WardenEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WardenEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WardenEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WardenEntityData { fn living_entity (& self) -> & LivingEntityData { WardenEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WardenEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct WitchEntityData { pub raider : RaiderEntityData , pub using_item : SyncedValue < bool > } impl WitchEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { raider : RaiderEntityData :: new () , using_item : SyncedValue :: new (false) } } # [doc = "Returns the `WitchEntityData` layer."] pub fn witch (& self) -> & WitchEntityData { self } # [doc = "Returns the mutable `WitchEntityData` layer."] pub fn witch_mut (& mut self) -> & mut WitchEntityData { self } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . raider . pack_dirty_into (values) ; if self . using_item . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . using_item . get ()) , }) ; self . using_item . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . raider . pack_all_into (values) ; if ! self . using_item . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . using_item . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . raider . is_dirty () || self . using_item . is_dirty () } } impl Default for WitchEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WitchEntityData { fn base (& self) -> & BaseEntityData { WitchEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WitchEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WitchEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WitchEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WitchEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WitchEntityData { fn living_entity (& self) -> & LivingEntityData { WitchEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WitchEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct WitherBossEntityData { pub mob : MobEntityData , pub target_a : SyncedValue < i32 > , pub target_b : SyncedValue < i32 > , pub target_c : SyncedValue < i32 > , pub id_inv : SyncedValue < i32 > } impl WitherBossEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , target_a : SyncedValue :: new (0i32) , target_b : SyncedValue :: new (0i32) , target_c : SyncedValue :: new (0i32) , id_inv : SyncedValue :: new (0i32) } } # [doc = "Returns the `WitherBossEntityData` layer."] pub fn wither_boss (& self) -> & WitherBossEntityData { self } # [doc = "Returns the mutable `WitherBossEntityData` layer."] pub fn wither_boss_mut (& mut self) -> & mut WitherBossEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . target_a . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_a . get ()) , }) ; self . target_a . clear_dirty () ; } if self . target_b . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_b . get ()) , }) ; self . target_b . clear_dirty () ; } if self . target_c . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_c . get ()) , }) ; self . target_c . clear_dirty () ; } if self . id_inv . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_inv . get ()) , }) ; self . id_inv . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . target_a . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_a . get ()) , }) ; } if ! self . target_b . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_b . get ()) , }) ; } if ! self . target_c . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . target_c . get ()) , }) ; } if ! self . id_inv . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . id_inv . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . target_a . is_dirty () || self . target_b . is_dirty () || self . target_c . is_dirty () || self . id_inv . is_dirty () } } impl Default for WitherBossEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WitherBossEntityData { fn base (& self) -> & BaseEntityData { WitherBossEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WitherBossEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WitherBossEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WitherBossEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WitherBossEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WitherBossEntityData { fn living_entity (& self) -> & LivingEntityData { WitherBossEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WitherBossEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct WitherSkullEntityData { pub base : BaseEntityData , pub dangerous : SyncedValue < bool > } impl WitherSkullEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , dangerous : SyncedValue :: new (false) } } # [doc = "Returns the `WitherSkullEntityData` layer."] pub fn wither_skull (& self) -> & WitherSkullEntityData { self } # [doc = "Returns the mutable `WitherSkullEntityData` layer."] pub fn wither_skull_mut (& mut self) -> & mut WitherSkullEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . dangerous . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dangerous . get ()) , }) ; self . dangerous . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . dangerous . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . dangerous . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . dangerous . is_dirty () } } impl Default for WitherSkullEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WitherSkullEntityData { fn base (& self) -> & BaseEntityData { WitherSkullEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WitherSkullEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WitherSkullEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WitherSkullEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WitherSkullEntityData :: is_dirty (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct WolfEntityData { pub tamable_animal : TamableAnimalEntityData , pub interested : SyncedValue < bool > , pub collar_color : SyncedValue < i32 > , pub anger_end_time : SyncedValue < i64 > , pub variant : SyncedValue < RegistryReference < crate :: wolf_variant :: WolfVariant > > , pub sound_variant : SyncedValue < RegistryReference < crate :: wolf_sound_variant :: WolfSoundVariant > > } impl WolfEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { tamable_animal : TamableAnimalEntityData :: new () , interested : SyncedValue :: new (false) , collar_color : SyncedValue :: new (14i32) , anger_end_time : SyncedValue :: new (- 1i64) , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_wolf_variants :: PALE)) , sound_variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_wolf_sound_variants :: CLASSIC)) } } # [doc = "Returns the `WolfEntityData` layer."] pub fn wolf (& self) -> & WolfEntityData { self } # [doc = "Returns the mutable `WolfEntityData` layer."] pub fn wolf_mut (& mut self) -> & mut WolfEntityData { self } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_dirty_into (values) ; if self . interested . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . interested . get ()) , }) ; self . interested . clear_dirty () ; } if self . collar_color . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . collar_color . get ()) , }) ; self . collar_color . clear_dirty () ; } if self . anger_end_time . is_dirty () { values . push (DataValue { index : 22u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . anger_end_time . get ()) , }) ; self . anger_end_time . clear_dirty () ; } if self . variant . is_dirty () { values . push (DataValue { index : 23u8 , serializer_id : 25i32 , value : EntityData :: WolfVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } if self . sound_variant . is_dirty () { values . push (DataValue { index : 24u8 , serializer_id : 26i32 , value : EntityData :: WolfSoundVariant (* self . sound_variant . get ()) , }) ; self . sound_variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . tamable_animal . pack_all_into (values) ; if ! self . interested . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . interested . get ()) , }) ; } if ! self . collar_color . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . collar_color . get ()) , }) ; } if ! self . anger_end_time . is_default () { values . push (DataValue { index : 22u8 , serializer_id : 2i32 , value : EntityData :: Long (* self . anger_end_time . get ()) , }) ; } if ! self . variant . is_default () { values . push (DataValue { index : 23u8 , serializer_id : 25i32 , value : EntityData :: WolfVariant (* self . variant . get ()) , }) ; } if ! self . sound_variant . is_default () { values . push (DataValue { index : 24u8 , serializer_id : 26i32 , value : EntityData :: WolfSoundVariant (* self . sound_variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . tamable_animal . is_dirty () || self . interested . is_dirty () || self . collar_color . is_dirty () || self . anger_end_time . is_dirty () || self . variant . is_dirty () || self . sound_variant . is_dirty () } } impl Default for WolfEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WolfEntityData { fn base (& self) -> & BaseEntityData { WolfEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WolfEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WolfEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WolfEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WolfEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WolfEntityData { fn living_entity (& self) -> & LivingEntityData { WolfEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WolfEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ZoglinEntityData { pub mob : MobEntityData , pub baby : SyncedValue < bool > } impl ZoglinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () , baby : SyncedValue :: new (false) } } # [doc = "Returns the `ZoglinEntityData` layer."] pub fn zoglin (& self) -> & ZoglinEntityData { self } # [doc = "Returns the mutable `ZoglinEntityData` layer."] pub fn zoglin_mut (& mut self) -> & mut ZoglinEntityData { self } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . mob . pack_dirty_into (values) ; if self . baby . is_dirty () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; self . baby . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . mob . pack_all_into (values) ; if ! self . baby . is_default () { values . push (DataValue { index : 16u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . baby . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () || self . baby . is_dirty () } } impl Default for ZoglinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ZoglinEntityData { fn base (& self) -> & BaseEntityData { ZoglinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZoglinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZoglinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZoglinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZoglinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZoglinEntityData { fn living_entity (& self) -> & LivingEntityData { ZoglinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZoglinEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ZombieNautilusEntityData { pub abstract_nautilus : AbstractNautilusEntityData , pub variant : SyncedValue < RegistryReference < crate :: zombie_nautilus_variant :: ZombieNautilusVariant > > } impl ZombieNautilusEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_nautilus : AbstractNautilusEntityData :: new () , variant : SyncedValue :: new (RegistryReference :: new (& crate :: vanilla_zombie_nautilus_variants :: TEMPERATE)) } } # [doc = "Returns the `ZombieNautilusEntityData` layer."] pub fn zombie_nautilus (& self) -> & ZombieNautilusEntityData { self } # [doc = "Returns the mutable `ZombieNautilusEntityData` layer."] pub fn zombie_nautilus_mut (& mut self) -> & mut ZombieNautilusEntityData { self } # [doc = "Returns the `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus (& self) -> & AbstractNautilusEntityData { & self . abstract_nautilus } # [doc = "Returns the mutable `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus_mut (& mut self) -> & mut AbstractNautilusEntityData { & mut self . abstract_nautilus } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . abstract_nautilus . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . abstract_nautilus . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . abstract_nautilus . pack_dirty_into (values) ; if self . variant . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 32i32 , value : EntityData :: ZombieNautilusVariant (* self . variant . get ()) , }) ; self . variant . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . abstract_nautilus . pack_all_into (values) ; if ! self . variant . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 32i32 , value : EntityData :: ZombieNautilusVariant (* self . variant . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_nautilus . is_dirty () || self . variant . is_dirty () } } impl Default for ZombieNautilusEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ZombieNautilusEntityData { fn base (& self) -> & BaseEntityData { ZombieNautilusEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZombieNautilusEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZombieNautilusEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZombieNautilusEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZombieNautilusEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZombieNautilusEntityData { fn living_entity (& self) -> & LivingEntityData { ZombieNautilusEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZombieNautilusEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct ZombieVillagerEntityData { pub zombie : ZombieEntityData , pub converting : SyncedValue < bool > , pub villager_data : SyncedValue < VillagerData > , pub villager_data_finalized : SyncedValue < bool > } impl ZombieVillagerEntityData { # [doc = r" Create new entity data with Vanilla's runtime-random defaults."] pub fn new (random : & mut impl Random) -> Self { Self { zombie : ZombieEntityData :: new () , converting : SyncedValue :: new (false) , villager_data : SyncedValue :: new ({ let mut data = VillagerData :: new (2 , 0 , 1i32) ; data . profession = crate :: entity_data :: random_villager_profession_id (random , crate :: REGISTRY . villager_professions . len () , data . profession ,) ; data }) , villager_data_finalized : SyncedValue :: new (false) } } # [doc = "Returns the `ZombieVillagerEntityData` layer."] pub fn zombie_villager (& self) -> & ZombieVillagerEntityData { self } # [doc = "Returns the mutable `ZombieVillagerEntityData` layer."] pub fn zombie_villager_mut (& mut self) -> & mut ZombieVillagerEntityData { self } # [doc = "Returns the `ZombieEntityData` layer."] pub fn zombie (& self) -> & ZombieEntityData { & self . zombie } # [doc = "Returns the mutable `ZombieEntityData` layer."] pub fn zombie_mut (& mut self) -> & mut ZombieEntityData { & mut self . zombie } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . zombie . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . zombie . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . zombie . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . zombie . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . zombie . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . zombie . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . zombie . pack_dirty_into (values) ; if self . converting . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . converting . get ()) , }) ; self . converting . clear_dirty () ; } if self . villager_data . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 18i32 , value : EntityData :: VillagerData (self . villager_data . get () . clone ()) , }) ; self . villager_data . clear_dirty () ; } if self . villager_data_finalized . is_dirty () { values . push (DataValue { index : 21u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . villager_data_finalized . get ()) , }) ; self . villager_data_finalized . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . zombie . pack_all_into (values) ; if ! self . converting . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . converting . get ()) , }) ; } if ! self . villager_data . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 18i32 , value : EntityData :: VillagerData (self . villager_data . get () . clone ()) , }) ; } if ! self . villager_data_finalized . is_default () { values . push (DataValue { index : 21u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . villager_data_finalized . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . zombie . is_dirty () || self . converting . is_dirty () || self . villager_data . is_dirty () || self . villager_data_finalized . is_dirty () } } impl VanillaEntityData for ZombieVillagerEntityData { fn base (& self) -> & BaseEntityData { ZombieVillagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZombieVillagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZombieVillagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZombieVillagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZombieVillagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZombieVillagerEntityData { fn living_entity (& self) -> & LivingEntityData { ZombieVillagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZombieVillagerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct PlayerEntityData { pub avatar : AvatarEntityData , pub player_absorption : SyncedValue < f32 > , pub score : SyncedValue < i32 > , pub shoulder_parrot_left : SyncedValue < Option < u32 > > , pub shoulder_parrot_right : SyncedValue < Option < u32 > > } impl PlayerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { avatar : AvatarEntityData :: new () , player_absorption : SyncedValue :: new (0f32) , score : SyncedValue :: new (0i32) , shoulder_parrot_left : SyncedValue :: new (None) , shoulder_parrot_right : SyncedValue :: new (None) } } # [doc = "Returns the `PlayerEntityData` layer."] pub fn player (& self) -> & PlayerEntityData { self } # [doc = "Returns the mutable `PlayerEntityData` layer."] pub fn player_mut (& mut self) -> & mut PlayerEntityData { self } # [doc = "Returns the `AvatarEntityData` layer."] pub fn avatar (& self) -> & AvatarEntityData { & self . avatar } # [doc = "Returns the mutable `AvatarEntityData` layer."] pub fn avatar_mut (& mut self) -> & mut AvatarEntityData { & mut self . avatar } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . avatar . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . avatar . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . avatar . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . avatar . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . avatar . pack_dirty_into (values) ; if self . player_absorption . is_dirty () { values . push (DataValue { index : 17u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . player_absorption . get ()) , }) ; self . player_absorption . clear_dirty () ; } if self . score . is_dirty () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . score . get ()) , }) ; self . score . clear_dirty () ; } if self . shoulder_parrot_left . is_dirty () { values . push (DataValue { index : 19u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . shoulder_parrot_left . get () . clone ()) , }) ; self . shoulder_parrot_left . clear_dirty () ; } if self . shoulder_parrot_right . is_dirty () { values . push (DataValue { index : 20u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . shoulder_parrot_right . get () . clone ()) , }) ; self . shoulder_parrot_right . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . avatar . pack_all_into (values) ; if ! self . player_absorption . is_default () { values . push (DataValue { index : 17u8 , serializer_id : 3i32 , value : EntityData :: Float (* self . player_absorption . get ()) , }) ; } if ! self . score . is_default () { values . push (DataValue { index : 18u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . score . get ()) , }) ; } if ! self . shoulder_parrot_left . is_default () { values . push (DataValue { index : 19u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . shoulder_parrot_left . get () . clone ()) , }) ; } if ! self . shoulder_parrot_right . is_default () { values . push (DataValue { index : 20u8 , serializer_id : 19i32 , value : EntityData :: OptionalUnsignedInt (self . shoulder_parrot_right . get () . clone ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . avatar . is_dirty () || self . player_absorption . is_dirty () || self . score . is_dirty () || self . shoulder_parrot_left . is_dirty () || self . shoulder_parrot_right . is_dirty () } } impl Default for PlayerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PlayerEntityData { fn base (& self) -> & BaseEntityData { PlayerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PlayerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PlayerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PlayerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PlayerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PlayerEntityData { fn living_entity (& self) -> & LivingEntityData { PlayerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PlayerEntityData :: living_entity_mut (self) } } # [doc = r" Synchronized entity data declared by the vanilla `#struct_name` layer."] # [derive (Debug , Clone)] pub struct FishingHookEntityData { pub base : BaseEntityData , pub hooked_entity : SyncedValue < i32 > , pub biting : SyncedValue < bool > } impl FishingHookEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () , hooked_entity : SyncedValue :: new (0i32) , biting : SyncedValue :: new (false) } } # [doc = "Returns the `FishingHookEntityData` layer."] pub fn fishing_hook (& self) -> & FishingHookEntityData { self } # [doc = "Returns the mutable `FishingHookEntityData` layer."] pub fn fishing_hook_mut (& mut self) -> & mut FishingHookEntityData { self } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { let mut values = Vec :: new () ; self . pack_dirty_into (& mut values) ; if values . is_empty () { None } else { Some (values) } } fn pack_dirty_into (& mut self , values : & mut Vec < DataValue >) { self . base . pack_dirty_into (values) ; if self . hooked_entity . is_dirty () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . hooked_entity . get ()) , }) ; self . hooked_entity . clear_dirty () ; } if self . biting . is_dirty () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . biting . get ()) , }) ; self . biting . clear_dirty () ; } } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { let mut values = Vec :: new () ; self . pack_all_into (& mut values) ; values } fn pack_all_into (& self , values : & mut Vec < DataValue >) { self . base . pack_all_into (values) ; if ! self . hooked_entity . is_default () { values . push (DataValue { index : 8u8 , serializer_id : 1i32 , value : EntityData :: Int (* self . hooked_entity . get ()) , }) ; } if ! self . biting . is_default () { values . push (DataValue { index : 9u8 , serializer_id : 8i32 , value : EntityData :: Boolean (* self . biting . get ()) , }) ; } } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () || self . hooked_entity . is_dirty () || self . biting . is_dirty () } } impl Default for FishingHookEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FishingHookEntityData { fn base (& self) -> & BaseEntityData { FishingHookEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FishingHookEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FishingHookEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FishingHookEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FishingHookEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `acacia_boat`."] # [derive (Debug , Clone)] pub struct AcaciaBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl AcaciaBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for AcaciaBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AcaciaBoatEntityData { fn base (& self) -> & BaseEntityData { AcaciaBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AcaciaBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AcaciaBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AcaciaBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AcaciaBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `acacia_chest_boat`."] # [derive (Debug , Clone)] pub struct AcaciaChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl AcaciaChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for AcaciaChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for AcaciaChestBoatEntityData { fn base (& self) -> & BaseEntityData { AcaciaChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { AcaciaChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { AcaciaChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { AcaciaChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { AcaciaChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `bamboo_chest_raft`."] # [derive (Debug , Clone)] pub struct BambooChestRaftEntityData { pub abstract_boat : AbstractBoatEntityData } impl BambooChestRaftEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for BambooChestRaftEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BambooChestRaftEntityData { fn base (& self) -> & BaseEntityData { BambooChestRaftEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BambooChestRaftEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BambooChestRaftEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BambooChestRaftEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BambooChestRaftEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `bamboo_raft`."] # [derive (Debug , Clone)] pub struct BambooRaftEntityData { pub abstract_boat : AbstractBoatEntityData } impl BambooRaftEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for BambooRaftEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BambooRaftEntityData { fn base (& self) -> & BaseEntityData { BambooRaftEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BambooRaftEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BambooRaftEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BambooRaftEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BambooRaftEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `birch_boat`."] # [derive (Debug , Clone)] pub struct BirchBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl BirchBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for BirchBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BirchBoatEntityData { fn base (& self) -> & BaseEntityData { BirchBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BirchBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BirchBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BirchBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BirchBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `birch_chest_boat`."] # [derive (Debug , Clone)] pub struct BirchChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl BirchChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for BirchChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BirchChestBoatEntityData { fn base (& self) -> & BaseEntityData { BirchChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BirchChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BirchChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BirchChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BirchChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `breeze`."] # [derive (Debug , Clone)] pub struct BreezeEntityData { pub mob : MobEntityData } impl BreezeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for BreezeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BreezeEntityData { fn base (& self) -> & BaseEntityData { BreezeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BreezeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BreezeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BreezeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BreezeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for BreezeEntityData { fn living_entity (& self) -> & LivingEntityData { BreezeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { BreezeEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `breeze_wind_charge`."] # [derive (Debug , Clone)] pub struct BreezeWindChargeEntityData { pub base : BaseEntityData } impl BreezeWindChargeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for BreezeWindChargeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for BreezeWindChargeEntityData { fn base (& self) -> & BaseEntityData { BreezeWindChargeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { BreezeWindChargeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { BreezeWindChargeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { BreezeWindChargeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { BreezeWindChargeEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `camel_husk`."] # [derive (Debug , Clone)] pub struct CamelHuskEntityData { pub camel : CamelEntityData } impl CamelHuskEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { camel : CamelEntityData :: new () } } # [doc = "Returns the `CamelEntityData` layer."] pub fn camel (& self) -> & CamelEntityData { & self . camel } # [doc = "Returns the mutable `CamelEntityData` layer."] pub fn camel_mut (& mut self) -> & mut CamelEntityData { & mut self . camel } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . camel . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . camel . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . camel . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . camel . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . camel . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . camel . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . camel . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . camel . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . camel . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . camel . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . camel . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . camel . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . camel . is_dirty () } } impl Default for CamelHuskEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CamelHuskEntityData { fn base (& self) -> & BaseEntityData { CamelHuskEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CamelHuskEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CamelHuskEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CamelHuskEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CamelHuskEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CamelHuskEntityData { fn living_entity (& self) -> & LivingEntityData { CamelHuskEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CamelHuskEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `cave_spider`."] # [derive (Debug , Clone)] pub struct CaveSpiderEntityData { pub spider : SpiderEntityData } impl CaveSpiderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { spider : SpiderEntityData :: new () } } # [doc = "Returns the `SpiderEntityData` layer."] pub fn spider (& self) -> & SpiderEntityData { & self . spider } # [doc = "Returns the mutable `SpiderEntityData` layer."] pub fn spider_mut (& mut self) -> & mut SpiderEntityData { & mut self . spider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . spider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . spider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . spider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . spider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . spider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . spider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . spider . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . spider . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . spider . is_dirty () } } impl Default for CaveSpiderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CaveSpiderEntityData { fn base (& self) -> & BaseEntityData { CaveSpiderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CaveSpiderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CaveSpiderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CaveSpiderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CaveSpiderEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CaveSpiderEntityData { fn living_entity (& self) -> & LivingEntityData { CaveSpiderEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CaveSpiderEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `cherry_boat`."] # [derive (Debug , Clone)] pub struct CherryBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl CherryBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for CherryBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CherryBoatEntityData { fn base (& self) -> & BaseEntityData { CherryBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CherryBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CherryBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CherryBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CherryBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `cherry_chest_boat`."] # [derive (Debug , Clone)] pub struct CherryChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl CherryChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for CherryChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CherryChestBoatEntityData { fn base (& self) -> & BaseEntityData { CherryChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CherryChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CherryChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CherryChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CherryChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `chest_minecart`."] # [derive (Debug , Clone)] pub struct ChestMinecartEntityData { pub abstract_minecart : AbstractMinecartEntityData } impl ChestMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_minecart : AbstractMinecartEntityData :: new () } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_minecart . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_minecart . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () } } impl Default for ChestMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ChestMinecartEntityData { fn base (& self) -> & BaseEntityData { ChestMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ChestMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ChestMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ChestMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ChestMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `cod`."] # [derive (Debug , Clone)] pub struct CodEntityData { pub abstract_fish : AbstractFishEntityData } impl CodEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_fish : AbstractFishEntityData :: new () } } # [doc = "Returns the `AbstractFishEntityData` layer."] pub fn abstract_fish (& self) -> & AbstractFishEntityData { & self . abstract_fish } # [doc = "Returns the mutable `AbstractFishEntityData` layer."] pub fn abstract_fish_mut (& mut self) -> & mut AbstractFishEntityData { & mut self . abstract_fish } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_fish . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_fish . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_fish . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_fish . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_fish . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_fish . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_fish . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_fish . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_fish . is_dirty () } } impl Default for CodEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CodEntityData { fn base (& self) -> & BaseEntityData { CodEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CodEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CodEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CodEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CodEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for CodEntityData { fn living_entity (& self) -> & LivingEntityData { CodEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { CodEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `command_block_minecart`."] # [derive (Debug , Clone)] pub struct CommandBlockMinecartEntityData { pub minecart_command_block : MinecartCommandBlockEntityData } impl CommandBlockMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = MinecartCommandBlockEntityData :: new () ; data . abstract_minecart . id_display_offset = SyncedValue :: new (6i32) ; Self { minecart_command_block : data } } # [doc = "Returns the `MinecartCommandBlockEntityData` layer."] pub fn minecart_command_block (& self) -> & MinecartCommandBlockEntityData { & self . minecart_command_block } # [doc = "Returns the mutable `MinecartCommandBlockEntityData` layer."] pub fn minecart_command_block_mut (& mut self) -> & mut MinecartCommandBlockEntityData { & mut self . minecart_command_block } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . minecart_command_block . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . minecart_command_block . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . minecart_command_block . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . minecart_command_block . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . minecart_command_block . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . minecart_command_block . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . minecart_command_block . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . minecart_command_block . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . minecart_command_block . is_dirty () } } impl Default for CommandBlockMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for CommandBlockMinecartEntityData { fn base (& self) -> & BaseEntityData { CommandBlockMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { CommandBlockMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { CommandBlockMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { CommandBlockMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { CommandBlockMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `dark_oak_boat`."] # [derive (Debug , Clone)] pub struct DarkOakBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl DarkOakBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for DarkOakBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DarkOakBoatEntityData { fn base (& self) -> & BaseEntityData { DarkOakBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DarkOakBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DarkOakBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DarkOakBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DarkOakBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `dark_oak_chest_boat`."] # [derive (Debug , Clone)] pub struct DarkOakChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl DarkOakChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for DarkOakChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DarkOakChestBoatEntityData { fn base (& self) -> & BaseEntityData { DarkOakChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DarkOakChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DarkOakChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DarkOakChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DarkOakChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `donkey`."] # [derive (Debug , Clone)] pub struct DonkeyEntityData { pub abstract_chested_horse : AbstractChestedHorseEntityData } impl DonkeyEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_chested_horse : AbstractChestedHorseEntityData :: new () } } # [doc = "Returns the `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse (& self) -> & AbstractChestedHorseEntityData { & self . abstract_chested_horse } # [doc = "Returns the mutable `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse_mut (& mut self) -> & mut AbstractChestedHorseEntityData { & mut self . abstract_chested_horse } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_chested_horse . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_chested_horse . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_chested_horse . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_chested_horse . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_chested_horse . is_dirty () } } impl Default for DonkeyEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DonkeyEntityData { fn base (& self) -> & BaseEntityData { DonkeyEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DonkeyEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DonkeyEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DonkeyEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DonkeyEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for DonkeyEntityData { fn living_entity (& self) -> & LivingEntityData { DonkeyEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { DonkeyEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `dragon_fireball`."] # [derive (Debug , Clone)] pub struct DragonFireballEntityData { pub base : BaseEntityData } impl DragonFireballEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for DragonFireballEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DragonFireballEntityData { fn base (& self) -> & BaseEntityData { DragonFireballEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DragonFireballEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DragonFireballEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DragonFireballEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DragonFireballEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `drowned`."] # [derive (Debug , Clone)] pub struct DrownedEntityData { pub zombie : ZombieEntityData } impl DrownedEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { zombie : ZombieEntityData :: new () } } # [doc = "Returns the `ZombieEntityData` layer."] pub fn zombie (& self) -> & ZombieEntityData { & self . zombie } # [doc = "Returns the mutable `ZombieEntityData` layer."] pub fn zombie_mut (& mut self) -> & mut ZombieEntityData { & mut self . zombie } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . zombie . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . zombie . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . zombie . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . zombie . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . zombie . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . zombie . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . zombie . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . zombie . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . zombie . is_dirty () } } impl Default for DrownedEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for DrownedEntityData { fn base (& self) -> & BaseEntityData { DrownedEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { DrownedEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { DrownedEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { DrownedEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { DrownedEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for DrownedEntityData { fn living_entity (& self) -> & LivingEntityData { DrownedEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { DrownedEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `egg`."] # [derive (Debug , Clone)] pub struct EggEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl EggEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { throwable_item_projectile : ThrowableItemProjectileEntityData :: new () } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for EggEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EggEntityData { fn base (& self) -> & BaseEntityData { EggEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EggEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EggEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EggEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EggEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `elder_guardian`."] # [derive (Debug , Clone)] pub struct ElderGuardianEntityData { pub guardian : GuardianEntityData } impl ElderGuardianEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { guardian : GuardianEntityData :: new () } } # [doc = "Returns the `GuardianEntityData` layer."] pub fn guardian (& self) -> & GuardianEntityData { & self . guardian } # [doc = "Returns the mutable `GuardianEntityData` layer."] pub fn guardian_mut (& mut self) -> & mut GuardianEntityData { & mut self . guardian } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . guardian . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . guardian . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . guardian . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . guardian . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . guardian . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . guardian . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . guardian . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . guardian . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . guardian . is_dirty () } } impl Default for ElderGuardianEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ElderGuardianEntityData { fn base (& self) -> & BaseEntityData { ElderGuardianEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ElderGuardianEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ElderGuardianEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ElderGuardianEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ElderGuardianEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ElderGuardianEntityData { fn living_entity (& self) -> & LivingEntityData { ElderGuardianEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ElderGuardianEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `enderman`."] # [derive (Debug , Clone)] pub struct EndermanEntityData { pub ender_man : EnderManEntityData } impl EndermanEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ender_man : EnderManEntityData :: new () } } # [doc = "Returns the `EnderManEntityData` layer."] pub fn ender_man (& self) -> & EnderManEntityData { & self . ender_man } # [doc = "Returns the mutable `EnderManEntityData` layer."] pub fn ender_man_mut (& mut self) -> & mut EnderManEntityData { & mut self . ender_man } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ender_man . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ender_man . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ender_man . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ender_man . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ender_man . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ender_man . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . ender_man . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . ender_man . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ender_man . is_dirty () } } impl Default for EndermanEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EndermanEntityData { fn base (& self) -> & BaseEntityData { EndermanEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EndermanEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EndermanEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EndermanEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EndermanEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for EndermanEntityData { fn living_entity (& self) -> & LivingEntityData { EndermanEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { EndermanEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `endermite`."] # [derive (Debug , Clone)] pub struct EndermiteEntityData { pub mob : MobEntityData } impl EndermiteEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for EndermiteEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EndermiteEntityData { fn base (& self) -> & BaseEntityData { EndermiteEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EndermiteEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EndermiteEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EndermiteEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EndermiteEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for EndermiteEntityData { fn living_entity (& self) -> & LivingEntityData { EndermiteEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { EndermiteEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `ender_pearl`."] # [derive (Debug , Clone)] pub struct EnderPearlEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl EnderPearlEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = ThrowableItemProjectileEntityData :: new () ; data . item_stack = SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: ENDER_PEARL , 1i32)) ; Self { throwable_item_projectile : data } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for EnderPearlEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EnderPearlEntityData { fn base (& self) -> & BaseEntityData { EnderPearlEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EnderPearlEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EnderPearlEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EnderPearlEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EnderPearlEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `evoker`."] # [derive (Debug , Clone)] pub struct EvokerEntityData { pub spellcaster_illager : SpellcasterIllagerEntityData } impl EvokerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { spellcaster_illager : SpellcasterIllagerEntityData :: new () } } # [doc = "Returns the `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager (& self) -> & SpellcasterIllagerEntityData { & self . spellcaster_illager } # [doc = "Returns the mutable `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager_mut (& mut self) -> & mut SpellcasterIllagerEntityData { & mut self . spellcaster_illager } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . spellcaster_illager . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . spellcaster_illager . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . spellcaster_illager . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . spellcaster_illager . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . spellcaster_illager . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . spellcaster_illager . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . spellcaster_illager . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . spellcaster_illager . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . spellcaster_illager . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . spellcaster_illager . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . spellcaster_illager . is_dirty () } } impl Default for EvokerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EvokerEntityData { fn base (& self) -> & BaseEntityData { EvokerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EvokerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EvokerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EvokerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EvokerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for EvokerEntityData { fn living_entity (& self) -> & LivingEntityData { EvokerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { EvokerEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `evoker_fangs`."] # [derive (Debug , Clone)] pub struct EvokerFangsEntityData { pub base : BaseEntityData } impl EvokerFangsEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for EvokerFangsEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for EvokerFangsEntityData { fn base (& self) -> & BaseEntityData { EvokerFangsEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { EvokerFangsEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { EvokerFangsEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { EvokerFangsEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { EvokerFangsEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `experience_bottle`."] # [derive (Debug , Clone)] pub struct ExperienceBottleEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl ExperienceBottleEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = ThrowableItemProjectileEntityData :: new () ; data . item_stack = SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: EXPERIENCE_BOTTLE , 1i32)) ; Self { throwable_item_projectile : data } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for ExperienceBottleEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ExperienceBottleEntityData { fn base (& self) -> & BaseEntityData { ExperienceBottleEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ExperienceBottleEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ExperienceBottleEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ExperienceBottleEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ExperienceBottleEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `furnace_minecart`."] # [derive (Debug , Clone)] pub struct FurnaceMinecartEntityData { pub minecart_furnace : MinecartFurnaceEntityData } impl FurnaceMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = MinecartFurnaceEntityData :: new () ; data . abstract_minecart . id_display_offset = SyncedValue :: new (6i32) ; Self { minecart_furnace : data } } # [doc = "Returns the `MinecartFurnaceEntityData` layer."] pub fn minecart_furnace (& self) -> & MinecartFurnaceEntityData { & self . minecart_furnace } # [doc = "Returns the mutable `MinecartFurnaceEntityData` layer."] pub fn minecart_furnace_mut (& mut self) -> & mut MinecartFurnaceEntityData { & mut self . minecart_furnace } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . minecart_furnace . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . minecart_furnace . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . minecart_furnace . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . minecart_furnace . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . minecart_furnace . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . minecart_furnace . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . minecart_furnace . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . minecart_furnace . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . minecart_furnace . is_dirty () } } impl Default for FurnaceMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FurnaceMinecartEntityData { fn base (& self) -> & BaseEntityData { FurnaceMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FurnaceMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FurnaceMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FurnaceMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FurnaceMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `giant`."] # [derive (Debug , Clone)] pub struct GiantEntityData { pub mob : MobEntityData } impl GiantEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for GiantEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GiantEntityData { fn base (& self) -> & BaseEntityData { GiantEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GiantEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GiantEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GiantEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GiantEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for GiantEntityData { fn living_entity (& self) -> & LivingEntityData { GiantEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { GiantEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `glow_item_frame`."] # [derive (Debug , Clone)] pub struct GlowItemFrameEntityData { pub item_frame : ItemFrameEntityData } impl GlowItemFrameEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { item_frame : ItemFrameEntityData :: new () } } # [doc = "Returns the `ItemFrameEntityData` layer."] pub fn item_frame (& self) -> & ItemFrameEntityData { & self . item_frame } # [doc = "Returns the mutable `ItemFrameEntityData` layer."] pub fn item_frame_mut (& mut self) -> & mut ItemFrameEntityData { & mut self . item_frame } # [doc = "Returns the `HangingEntityData` layer."] pub fn hanging_entity (& self) -> & HangingEntityData { & self . item_frame . hanging_entity } # [doc = "Returns the mutable `HangingEntityData` layer."] pub fn hanging_entity_mut (& mut self) -> & mut HangingEntityData { & mut self . item_frame . hanging_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . item_frame . hanging_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . item_frame . hanging_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . item_frame . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . item_frame . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . item_frame . is_dirty () } } impl Default for GlowItemFrameEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for GlowItemFrameEntityData { fn base (& self) -> & BaseEntityData { GlowItemFrameEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { GlowItemFrameEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { GlowItemFrameEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { GlowItemFrameEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { GlowItemFrameEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `hopper_minecart`."] # [derive (Debug , Clone)] pub struct HopperMinecartEntityData { pub abstract_minecart : AbstractMinecartEntityData } impl HopperMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = AbstractMinecartEntityData :: new () ; data . id_display_offset = SyncedValue :: new (1i32) ; Self { abstract_minecart : data } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_minecart . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_minecart . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () } } impl Default for HopperMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HopperMinecartEntityData { fn base (& self) -> & BaseEntityData { HopperMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HopperMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HopperMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HopperMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HopperMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `husk`."] # [derive (Debug , Clone)] pub struct HuskEntityData { pub zombie : ZombieEntityData } impl HuskEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { zombie : ZombieEntityData :: new () } } # [doc = "Returns the `ZombieEntityData` layer."] pub fn zombie (& self) -> & ZombieEntityData { & self . zombie } # [doc = "Returns the mutable `ZombieEntityData` layer."] pub fn zombie_mut (& mut self) -> & mut ZombieEntityData { & mut self . zombie } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . zombie . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . zombie . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . zombie . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . zombie . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . zombie . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . zombie . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . zombie . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . zombie . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . zombie . is_dirty () } } impl Default for HuskEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for HuskEntityData { fn base (& self) -> & BaseEntityData { HuskEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { HuskEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { HuskEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { HuskEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { HuskEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for HuskEntityData { fn living_entity (& self) -> & LivingEntityData { HuskEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { HuskEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `illusioner`."] # [derive (Debug , Clone)] pub struct IllusionerEntityData { pub spellcaster_illager : SpellcasterIllagerEntityData } impl IllusionerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { spellcaster_illager : SpellcasterIllagerEntityData :: new () } } # [doc = "Returns the `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager (& self) -> & SpellcasterIllagerEntityData { & self . spellcaster_illager } # [doc = "Returns the mutable `SpellcasterIllagerEntityData` layer."] pub fn spellcaster_illager_mut (& mut self) -> & mut SpellcasterIllagerEntityData { & mut self . spellcaster_illager } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . spellcaster_illager . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . spellcaster_illager . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . spellcaster_illager . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . spellcaster_illager . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . spellcaster_illager . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . spellcaster_illager . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . spellcaster_illager . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . spellcaster_illager . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . spellcaster_illager . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . spellcaster_illager . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . spellcaster_illager . is_dirty () } } impl Default for IllusionerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for IllusionerEntityData { fn base (& self) -> & BaseEntityData { IllusionerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { IllusionerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { IllusionerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { IllusionerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { IllusionerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for IllusionerEntityData { fn living_entity (& self) -> & LivingEntityData { IllusionerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { IllusionerEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `jungle_boat`."] # [derive (Debug , Clone)] pub struct JungleBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl JungleBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for JungleBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for JungleBoatEntityData { fn base (& self) -> & BaseEntityData { JungleBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { JungleBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { JungleBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { JungleBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { JungleBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `jungle_chest_boat`."] # [derive (Debug , Clone)] pub struct JungleChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl JungleChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for JungleChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for JungleChestBoatEntityData { fn base (& self) -> & BaseEntityData { JungleChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { JungleChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { JungleChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { JungleChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { JungleChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `leash_knot`."] # [derive (Debug , Clone)] pub struct LeashKnotEntityData { pub base : BaseEntityData } impl LeashKnotEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for LeashKnotEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LeashKnotEntityData { fn base (& self) -> & BaseEntityData { LeashKnotEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LeashKnotEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LeashKnotEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LeashKnotEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LeashKnotEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `lightning_bolt`."] # [derive (Debug , Clone)] pub struct LightningBoltEntityData { pub base : BaseEntityData } impl LightningBoltEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for LightningBoltEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LightningBoltEntityData { fn base (& self) -> & BaseEntityData { LightningBoltEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LightningBoltEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LightningBoltEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LightningBoltEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LightningBoltEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `llama_spit`."] # [derive (Debug , Clone)] pub struct LlamaSpitEntityData { pub base : BaseEntityData } impl LlamaSpitEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for LlamaSpitEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LlamaSpitEntityData { fn base (& self) -> & BaseEntityData { LlamaSpitEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LlamaSpitEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LlamaSpitEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LlamaSpitEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LlamaSpitEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `magma_cube`."] # [derive (Debug , Clone)] pub struct MagmaCubeEntityData { pub abstract_cube_mob : AbstractCubeMobEntityData } impl MagmaCubeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_cube_mob : AbstractCubeMobEntityData :: new () } } # [doc = "Returns the `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob (& self) -> & AbstractCubeMobEntityData { & self . abstract_cube_mob } # [doc = "Returns the mutable `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob_mut (& mut self) -> & mut AbstractCubeMobEntityData { & mut self . abstract_cube_mob } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_cube_mob . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_cube_mob . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_cube_mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_cube_mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_cube_mob . is_dirty () } } impl Default for MagmaCubeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MagmaCubeEntityData { fn base (& self) -> & BaseEntityData { MagmaCubeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MagmaCubeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MagmaCubeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MagmaCubeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MagmaCubeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MagmaCubeEntityData { fn living_entity (& self) -> & LivingEntityData { MagmaCubeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MagmaCubeEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `mangrove_boat`."] # [derive (Debug , Clone)] pub struct MangroveBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl MangroveBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for MangroveBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MangroveBoatEntityData { fn base (& self) -> & BaseEntityData { MangroveBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MangroveBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MangroveBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MangroveBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MangroveBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `mangrove_chest_boat`."] # [derive (Debug , Clone)] pub struct MangroveChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl MangroveChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for MangroveChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MangroveChestBoatEntityData { fn base (& self) -> & BaseEntityData { MangroveChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MangroveChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MangroveChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MangroveChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MangroveChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `marker`."] # [derive (Debug , Clone)] pub struct MarkerEntityData { pub base : BaseEntityData } impl MarkerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for MarkerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MarkerEntityData { fn base (& self) -> & BaseEntityData { MarkerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MarkerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MarkerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MarkerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MarkerEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `minecart`."] # [derive (Debug , Clone)] pub struct MinecartEntityData { pub abstract_minecart : AbstractMinecartEntityData } impl MinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = AbstractMinecartEntityData :: new () ; data . id_display_offset = SyncedValue :: new (6i32) ; Self { abstract_minecart : data } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_minecart . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_minecart . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () } } impl Default for MinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MinecartEntityData { fn base (& self) -> & BaseEntityData { MinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `mooshroom`."] # [derive (Debug , Clone)] pub struct MooshroomEntityData { pub mushroom_cow : MushroomCowEntityData } impl MooshroomEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mushroom_cow : MushroomCowEntityData :: new () } } # [doc = "Returns the `MushroomCowEntityData` layer."] pub fn mushroom_cow (& self) -> & MushroomCowEntityData { & self . mushroom_cow } # [doc = "Returns the mutable `MushroomCowEntityData` layer."] pub fn mushroom_cow_mut (& mut self) -> & mut MushroomCowEntityData { & mut self . mushroom_cow } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . mushroom_cow . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . mushroom_cow . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mushroom_cow . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mushroom_cow . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mushroom_cow . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mushroom_cow . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mushroom_cow . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mushroom_cow . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mushroom_cow . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mushroom_cow . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mushroom_cow . is_dirty () } } impl Default for MooshroomEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MooshroomEntityData { fn base (& self) -> & BaseEntityData { MooshroomEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MooshroomEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MooshroomEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MooshroomEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MooshroomEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MooshroomEntityData { fn living_entity (& self) -> & LivingEntityData { MooshroomEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MooshroomEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `mule`."] # [derive (Debug , Clone)] pub struct MuleEntityData { pub abstract_chested_horse : AbstractChestedHorseEntityData } impl MuleEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_chested_horse : AbstractChestedHorseEntityData :: new () } } # [doc = "Returns the `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse (& self) -> & AbstractChestedHorseEntityData { & self . abstract_chested_horse } # [doc = "Returns the mutable `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse_mut (& mut self) -> & mut AbstractChestedHorseEntityData { & mut self . abstract_chested_horse } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_chested_horse . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_chested_horse . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_chested_horse . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_chested_horse . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_chested_horse . is_dirty () } } impl Default for MuleEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for MuleEntityData { fn base (& self) -> & BaseEntityData { MuleEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { MuleEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { MuleEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { MuleEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { MuleEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for MuleEntityData { fn living_entity (& self) -> & LivingEntityData { MuleEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { MuleEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `nautilus`."] # [derive (Debug , Clone)] pub struct NautilusEntityData { pub abstract_nautilus : AbstractNautilusEntityData } impl NautilusEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_nautilus : AbstractNautilusEntityData :: new () } } # [doc = "Returns the `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus (& self) -> & AbstractNautilusEntityData { & self . abstract_nautilus } # [doc = "Returns the mutable `AbstractNautilusEntityData` layer."] pub fn abstract_nautilus_mut (& mut self) -> & mut AbstractNautilusEntityData { & mut self . abstract_nautilus } # [doc = "Returns the `TamableAnimalEntityData` layer."] pub fn tamable_animal (& self) -> & TamableAnimalEntityData { & self . abstract_nautilus . tamable_animal } # [doc = "Returns the mutable `TamableAnimalEntityData` layer."] pub fn tamable_animal_mut (& mut self) -> & mut TamableAnimalEntityData { & mut self . abstract_nautilus . tamable_animal } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_nautilus . tamable_animal . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_nautilus . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_nautilus . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_nautilus . is_dirty () } } impl Default for NautilusEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for NautilusEntityData { fn base (& self) -> & BaseEntityData { NautilusEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { NautilusEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { NautilusEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { NautilusEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { NautilusEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for NautilusEntityData { fn living_entity (& self) -> & LivingEntityData { NautilusEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { NautilusEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `oak_boat`."] # [derive (Debug , Clone)] pub struct OakBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl OakBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for OakBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for OakBoatEntityData { fn base (& self) -> & BaseEntityData { OakBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { OakBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { OakBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { OakBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { OakBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `oak_chest_boat`."] # [derive (Debug , Clone)] pub struct OakChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl OakChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for OakChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for OakChestBoatEntityData { fn base (& self) -> & BaseEntityData { OakChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { OakChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { OakChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { OakChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { OakChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `pale_oak_boat`."] # [derive (Debug , Clone)] pub struct PaleOakBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl PaleOakBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for PaleOakBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PaleOakBoatEntityData { fn base (& self) -> & BaseEntityData { PaleOakBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PaleOakBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PaleOakBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PaleOakBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PaleOakBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `pale_oak_chest_boat`."] # [derive (Debug , Clone)] pub struct PaleOakChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl PaleOakChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for PaleOakChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PaleOakChestBoatEntityData { fn base (& self) -> & BaseEntityData { PaleOakChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PaleOakChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PaleOakChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PaleOakChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PaleOakChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `parched`."] # [derive (Debug , Clone)] pub struct ParchedEntityData { pub mob : MobEntityData } impl ParchedEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for ParchedEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ParchedEntityData { fn base (& self) -> & BaseEntityData { ParchedEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ParchedEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ParchedEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ParchedEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ParchedEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ParchedEntityData { fn living_entity (& self) -> & LivingEntityData { ParchedEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ParchedEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `piglin_brute`."] # [derive (Debug , Clone)] pub struct PiglinBruteEntityData { pub abstract_piglin : AbstractPiglinEntityData } impl PiglinBruteEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_piglin : AbstractPiglinEntityData :: new () } } # [doc = "Returns the `AbstractPiglinEntityData` layer."] pub fn abstract_piglin (& self) -> & AbstractPiglinEntityData { & self . abstract_piglin } # [doc = "Returns the mutable `AbstractPiglinEntityData` layer."] pub fn abstract_piglin_mut (& mut self) -> & mut AbstractPiglinEntityData { & mut self . abstract_piglin } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_piglin . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_piglin . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_piglin . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_piglin . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_piglin . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_piglin . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_piglin . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_piglin . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_piglin . is_dirty () } } impl Default for PiglinBruteEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for PiglinBruteEntityData { fn base (& self) -> & BaseEntityData { PiglinBruteEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { PiglinBruteEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { PiglinBruteEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { PiglinBruteEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { PiglinBruteEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for PiglinBruteEntityData { fn living_entity (& self) -> & LivingEntityData { PiglinBruteEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { PiglinBruteEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `splash_potion`."] # [derive (Debug , Clone)] pub struct SplashPotionEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl SplashPotionEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = ThrowableItemProjectileEntityData :: new () ; data . item_stack = SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: SPLASH_POTION , 1i32)) ; Self { throwable_item_projectile : data } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for SplashPotionEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SplashPotionEntityData { fn base (& self) -> & BaseEntityData { SplashPotionEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SplashPotionEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SplashPotionEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SplashPotionEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SplashPotionEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `lingering_potion`."] # [derive (Debug , Clone)] pub struct LingeringPotionEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl LingeringPotionEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = ThrowableItemProjectileEntityData :: new () ; data . item_stack = SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: LINGERING_POTION , 1i32)) ; Self { throwable_item_projectile : data } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for LingeringPotionEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for LingeringPotionEntityData { fn base (& self) -> & BaseEntityData { LingeringPotionEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { LingeringPotionEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { LingeringPotionEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { LingeringPotionEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { LingeringPotionEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `ravager`."] # [derive (Debug , Clone)] pub struct RavagerEntityData { pub raider : RaiderEntityData } impl RavagerEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { raider : RaiderEntityData :: new () } } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . raider . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . raider . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . raider . is_dirty () } } impl Default for RavagerEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for RavagerEntityData { fn base (& self) -> & BaseEntityData { RavagerEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { RavagerEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { RavagerEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { RavagerEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { RavagerEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for RavagerEntityData { fn living_entity (& self) -> & LivingEntityData { RavagerEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { RavagerEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `shulker_bullet`."] # [derive (Debug , Clone)] pub struct ShulkerBulletEntityData { pub base : BaseEntityData } impl ShulkerBulletEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for ShulkerBulletEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ShulkerBulletEntityData { fn base (& self) -> & BaseEntityData { ShulkerBulletEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ShulkerBulletEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ShulkerBulletEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ShulkerBulletEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ShulkerBulletEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `silverfish`."] # [derive (Debug , Clone)] pub struct SilverfishEntityData { pub mob : MobEntityData } impl SilverfishEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for SilverfishEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SilverfishEntityData { fn base (& self) -> & BaseEntityData { SilverfishEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SilverfishEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SilverfishEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SilverfishEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SilverfishEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SilverfishEntityData { fn living_entity (& self) -> & LivingEntityData { SilverfishEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SilverfishEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `skeleton_horse`."] # [derive (Debug , Clone)] pub struct SkeletonHorseEntityData { pub abstract_horse : AbstractHorseEntityData } impl SkeletonHorseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_horse : AbstractHorseEntityData :: new () } } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_horse . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_horse . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_horse . is_dirty () } } impl Default for SkeletonHorseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SkeletonHorseEntityData { fn base (& self) -> & BaseEntityData { SkeletonHorseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SkeletonHorseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SkeletonHorseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SkeletonHorseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SkeletonHorseEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SkeletonHorseEntityData { fn living_entity (& self) -> & LivingEntityData { SkeletonHorseEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SkeletonHorseEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `slime`."] # [derive (Debug , Clone)] pub struct SlimeEntityData { pub abstract_cube_mob : AbstractCubeMobEntityData } impl SlimeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_cube_mob : AbstractCubeMobEntityData :: new () } } # [doc = "Returns the `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob (& self) -> & AbstractCubeMobEntityData { & self . abstract_cube_mob } # [doc = "Returns the mutable `AbstractCubeMobEntityData` layer."] pub fn abstract_cube_mob_mut (& mut self) -> & mut AbstractCubeMobEntityData { & mut self . abstract_cube_mob } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_cube_mob . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_cube_mob . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_cube_mob . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_cube_mob . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_cube_mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_cube_mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_cube_mob . is_dirty () } } impl Default for SlimeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SlimeEntityData { fn base (& self) -> & BaseEntityData { SlimeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SlimeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SlimeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SlimeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SlimeEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SlimeEntityData { fn living_entity (& self) -> & LivingEntityData { SlimeEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SlimeEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `small_fireball`."] # [derive (Debug , Clone)] pub struct SmallFireballEntityData { pub fireball : FireballEntityData } impl SmallFireballEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { fireball : FireballEntityData :: new () } } # [doc = "Returns the `FireballEntityData` layer."] pub fn fireball (& self) -> & FireballEntityData { & self . fireball } # [doc = "Returns the mutable `FireballEntityData` layer."] pub fn fireball_mut (& mut self) -> & mut FireballEntityData { & mut self . fireball } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . fireball . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . fireball . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . fireball . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . fireball . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . fireball . is_dirty () } } impl Default for SmallFireballEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SmallFireballEntityData { fn base (& self) -> & BaseEntityData { SmallFireballEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SmallFireballEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SmallFireballEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SmallFireballEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SmallFireballEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `snowball`."] # [derive (Debug , Clone)] pub struct SnowballEntityData { pub throwable_item_projectile : ThrowableItemProjectileEntityData } impl SnowballEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = ThrowableItemProjectileEntityData :: new () ; data . item_stack = SyncedValue :: new (ItemStack :: with_count (& * crate :: vanilla_items :: SNOWBALL , 1i32)) ; Self { throwable_item_projectile : data } } # [doc = "Returns the `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile (& self) -> & ThrowableItemProjectileEntityData { & self . throwable_item_projectile } # [doc = "Returns the mutable `ThrowableItemProjectileEntityData` layer."] pub fn throwable_item_projectile_mut (& mut self) -> & mut ThrowableItemProjectileEntityData { & mut self . throwable_item_projectile } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . throwable_item_projectile . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . throwable_item_projectile . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . throwable_item_projectile . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . throwable_item_projectile . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . throwable_item_projectile . is_dirty () } } impl Default for SnowballEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SnowballEntityData { fn base (& self) -> & BaseEntityData { SnowballEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SnowballEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SnowballEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SnowballEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SnowballEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `spawner_minecart`."] # [derive (Debug , Clone)] pub struct SpawnerMinecartEntityData { pub abstract_minecart : AbstractMinecartEntityData } impl SpawnerMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = AbstractMinecartEntityData :: new () ; data . id_display_offset = SyncedValue :: new (6i32) ; Self { abstract_minecart : data } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_minecart . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_minecart . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () } } impl Default for SpawnerMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpawnerMinecartEntityData { fn base (& self) -> & BaseEntityData { SpawnerMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpawnerMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpawnerMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpawnerMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpawnerMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `spectral_arrow`."] # [derive (Debug , Clone)] pub struct SpectralArrowEntityData { pub abstract_arrow : AbstractArrowEntityData } impl SpectralArrowEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_arrow : AbstractArrowEntityData :: new () } } # [doc = "Returns the `AbstractArrowEntityData` layer."] pub fn abstract_arrow (& self) -> & AbstractArrowEntityData { & self . abstract_arrow } # [doc = "Returns the mutable `AbstractArrowEntityData` layer."] pub fn abstract_arrow_mut (& mut self) -> & mut AbstractArrowEntityData { & mut self . abstract_arrow } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_arrow . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_arrow . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_arrow . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_arrow . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_arrow . is_dirty () } } impl Default for SpectralArrowEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpectralArrowEntityData { fn base (& self) -> & BaseEntityData { SpectralArrowEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpectralArrowEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpectralArrowEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpectralArrowEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpectralArrowEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `spruce_boat`."] # [derive (Debug , Clone)] pub struct SpruceBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl SpruceBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for SpruceBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpruceBoatEntityData { fn base (& self) -> & BaseEntityData { SpruceBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpruceBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpruceBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpruceBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpruceBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `spruce_chest_boat`."] # [derive (Debug , Clone)] pub struct SpruceChestBoatEntityData { pub abstract_boat : AbstractBoatEntityData } impl SpruceChestBoatEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_boat : AbstractBoatEntityData :: new () } } # [doc = "Returns the `AbstractBoatEntityData` layer."] pub fn abstract_boat (& self) -> & AbstractBoatEntityData { & self . abstract_boat } # [doc = "Returns the mutable `AbstractBoatEntityData` layer."] pub fn abstract_boat_mut (& mut self) -> & mut AbstractBoatEntityData { & mut self . abstract_boat } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_boat . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_boat . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_boat . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_boat . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_boat . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_boat . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_boat . is_dirty () } } impl Default for SpruceChestBoatEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SpruceChestBoatEntityData { fn base (& self) -> & BaseEntityData { SpruceChestBoatEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SpruceChestBoatEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SpruceChestBoatEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SpruceChestBoatEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SpruceChestBoatEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `squid`."] # [derive (Debug , Clone)] pub struct SquidEntityData { pub ageable_mob : AgeableMobEntityData } impl SquidEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { ageable_mob : AgeableMobEntityData :: new () } } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . ageable_mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . ageable_mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . ageable_mob . is_dirty () } } impl Default for SquidEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for SquidEntityData { fn base (& self) -> & BaseEntityData { SquidEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { SquidEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { SquidEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { SquidEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { SquidEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for SquidEntityData { fn living_entity (& self) -> & LivingEntityData { SquidEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { SquidEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `stray`."] # [derive (Debug , Clone)] pub struct StrayEntityData { pub mob : MobEntityData } impl StrayEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for StrayEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for StrayEntityData { fn base (& self) -> & BaseEntityData { StrayEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { StrayEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { StrayEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { StrayEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { StrayEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for StrayEntityData { fn living_entity (& self) -> & LivingEntityData { StrayEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { StrayEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `tnt`."] # [derive (Debug , Clone)] pub struct TntEntityData { pub primed_tnt : PrimedTntEntityData } impl TntEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { primed_tnt : PrimedTntEntityData :: new () } } # [doc = "Returns the `PrimedTntEntityData` layer."] pub fn primed_tnt (& self) -> & PrimedTntEntityData { & self . primed_tnt } # [doc = "Returns the mutable `PrimedTntEntityData` layer."] pub fn primed_tnt_mut (& mut self) -> & mut PrimedTntEntityData { & mut self . primed_tnt } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . primed_tnt . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . primed_tnt . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . primed_tnt . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . primed_tnt . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . primed_tnt . is_dirty () } } impl Default for TntEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TntEntityData { fn base (& self) -> & BaseEntityData { TntEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TntEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TntEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TntEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TntEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `tnt_minecart`."] # [derive (Debug , Clone)] pub struct TntMinecartEntityData { pub abstract_minecart : AbstractMinecartEntityData } impl TntMinecartEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { let mut data = AbstractMinecartEntityData :: new () ; data . id_display_offset = SyncedValue :: new (6i32) ; Self { abstract_minecart : data } } # [doc = "Returns the `AbstractMinecartEntityData` layer."] pub fn abstract_minecart (& self) -> & AbstractMinecartEntityData { & self . abstract_minecart } # [doc = "Returns the mutable `AbstractMinecartEntityData` layer."] pub fn abstract_minecart_mut (& mut self) -> & mut AbstractMinecartEntityData { & mut self . abstract_minecart } # [doc = "Returns the `VehicleEntityData` layer."] pub fn vehicle_entity (& self) -> & VehicleEntityData { & self . abstract_minecart . vehicle_entity } # [doc = "Returns the mutable `VehicleEntityData` layer."] pub fn vehicle_entity_mut (& mut self) -> & mut VehicleEntityData { & mut self . abstract_minecart . vehicle_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_minecart . vehicle_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_minecart . vehicle_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_minecart . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_minecart . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_minecart . is_dirty () } } impl Default for TntMinecartEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TntMinecartEntityData { fn base (& self) -> & BaseEntityData { TntMinecartEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TntMinecartEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TntMinecartEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TntMinecartEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TntMinecartEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `trader_llama`."] # [derive (Debug , Clone)] pub struct TraderLlamaEntityData { pub llama : LlamaEntityData } impl TraderLlamaEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { llama : LlamaEntityData :: new () } } # [doc = "Returns the `LlamaEntityData` layer."] pub fn llama (& self) -> & LlamaEntityData { & self . llama } # [doc = "Returns the mutable `LlamaEntityData` layer."] pub fn llama_mut (& mut self) -> & mut LlamaEntityData { & mut self . llama } # [doc = "Returns the `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse (& self) -> & AbstractChestedHorseEntityData { & self . llama . abstract_chested_horse } # [doc = "Returns the mutable `AbstractChestedHorseEntityData` layer."] pub fn abstract_chested_horse_mut (& mut self) -> & mut AbstractChestedHorseEntityData { & mut self . llama . abstract_chested_horse } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . llama . abstract_chested_horse . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . llama . abstract_chested_horse . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . llama . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . llama . abstract_chested_horse . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . llama . abstract_chested_horse . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . llama . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . llama . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . llama . is_dirty () } } impl Default for TraderLlamaEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TraderLlamaEntityData { fn base (& self) -> & BaseEntityData { TraderLlamaEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TraderLlamaEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TraderLlamaEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TraderLlamaEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TraderLlamaEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for TraderLlamaEntityData { fn living_entity (& self) -> & LivingEntityData { TraderLlamaEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { TraderLlamaEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `trident`."] # [derive (Debug , Clone)] pub struct TridentEntityData { pub thrown_trident : ThrownTridentEntityData } impl TridentEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { thrown_trident : ThrownTridentEntityData :: new () } } # [doc = "Returns the `ThrownTridentEntityData` layer."] pub fn thrown_trident (& self) -> & ThrownTridentEntityData { & self . thrown_trident } # [doc = "Returns the mutable `ThrownTridentEntityData` layer."] pub fn thrown_trident_mut (& mut self) -> & mut ThrownTridentEntityData { & mut self . thrown_trident } # [doc = "Returns the `AbstractArrowEntityData` layer."] pub fn abstract_arrow (& self) -> & AbstractArrowEntityData { & self . thrown_trident . abstract_arrow } # [doc = "Returns the mutable `AbstractArrowEntityData` layer."] pub fn abstract_arrow_mut (& mut self) -> & mut AbstractArrowEntityData { & mut self . thrown_trident . abstract_arrow } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . thrown_trident . abstract_arrow . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . thrown_trident . abstract_arrow . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . thrown_trident . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . thrown_trident . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . thrown_trident . is_dirty () } } impl Default for TridentEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for TridentEntityData { fn base (& self) -> & BaseEntityData { TridentEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { TridentEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { TridentEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { TridentEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { TridentEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `vindicator`."] # [derive (Debug , Clone)] pub struct VindicatorEntityData { pub raider : RaiderEntityData } impl VindicatorEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { raider : RaiderEntityData :: new () } } # [doc = "Returns the `RaiderEntityData` layer."] pub fn raider (& self) -> & RaiderEntityData { & self . raider } # [doc = "Returns the mutable `RaiderEntityData` layer."] pub fn raider_mut (& mut self) -> & mut RaiderEntityData { & mut self . raider } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . raider . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . raider . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . raider . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . raider . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . raider . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . raider . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . raider . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . raider . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . raider . is_dirty () } } impl Default for VindicatorEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for VindicatorEntityData { fn base (& self) -> & BaseEntityData { VindicatorEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { VindicatorEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { VindicatorEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { VindicatorEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { VindicatorEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for VindicatorEntityData { fn living_entity (& self) -> & LivingEntityData { VindicatorEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { VindicatorEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `wandering_trader`."] # [derive (Debug , Clone)] pub struct WanderingTraderEntityData { pub abstract_villager : AbstractVillagerEntityData } impl WanderingTraderEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_villager : AbstractVillagerEntityData :: new () } } # [doc = "Returns the `AbstractVillagerEntityData` layer."] pub fn abstract_villager (& self) -> & AbstractVillagerEntityData { & self . abstract_villager } # [doc = "Returns the mutable `AbstractVillagerEntityData` layer."] pub fn abstract_villager_mut (& mut self) -> & mut AbstractVillagerEntityData { & mut self . abstract_villager } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_villager . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_villager . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_villager . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_villager . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_villager . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_villager . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_villager . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_villager . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_villager . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_villager . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_villager . is_dirty () } } impl Default for WanderingTraderEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WanderingTraderEntityData { fn base (& self) -> & BaseEntityData { WanderingTraderEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WanderingTraderEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WanderingTraderEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WanderingTraderEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WanderingTraderEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WanderingTraderEntityData { fn living_entity (& self) -> & LivingEntityData { WanderingTraderEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WanderingTraderEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `wind_charge`."] # [derive (Debug , Clone)] pub struct WindChargeEntityData { pub base : BaseEntityData } impl WindChargeEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { base : BaseEntityData :: new () } } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . base . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . base . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . base . is_dirty () } } impl Default for WindChargeEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WindChargeEntityData { fn base (& self) -> & BaseEntityData { WindChargeEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WindChargeEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WindChargeEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WindChargeEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WindChargeEntityData :: is_dirty (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `wither`."] # [derive (Debug , Clone)] pub struct WitherEntityData { pub wither_boss : WitherBossEntityData } impl WitherEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { wither_boss : WitherBossEntityData :: new () } } # [doc = "Returns the `WitherBossEntityData` layer."] pub fn wither_boss (& self) -> & WitherBossEntityData { & self . wither_boss } # [doc = "Returns the mutable `WitherBossEntityData` layer."] pub fn wither_boss_mut (& mut self) -> & mut WitherBossEntityData { & mut self . wither_boss } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . wither_boss . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . wither_boss . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . wither_boss . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . wither_boss . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . wither_boss . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . wither_boss . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . wither_boss . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . wither_boss . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . wither_boss . is_dirty () } } impl Default for WitherEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WitherEntityData { fn base (& self) -> & BaseEntityData { WitherEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WitherEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WitherEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WitherEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WitherEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WitherEntityData { fn living_entity (& self) -> & LivingEntityData { WitherEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WitherEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `wither_skeleton`."] # [derive (Debug , Clone)] pub struct WitherSkeletonEntityData { pub mob : MobEntityData } impl WitherSkeletonEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { mob : MobEntityData :: new () } } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . mob . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . mob . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . mob . is_dirty () } } impl Default for WitherSkeletonEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for WitherSkeletonEntityData { fn base (& self) -> & BaseEntityData { WitherSkeletonEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { WitherSkeletonEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { WitherSkeletonEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { WitherSkeletonEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { WitherSkeletonEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for WitherSkeletonEntityData { fn living_entity (& self) -> & LivingEntityData { WitherSkeletonEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { WitherSkeletonEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `zombie_horse`."] # [derive (Debug , Clone)] pub struct ZombieHorseEntityData { pub abstract_horse : AbstractHorseEntityData } impl ZombieHorseEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { abstract_horse : AbstractHorseEntityData :: new () } } # [doc = "Returns the `AbstractHorseEntityData` layer."] pub fn abstract_horse (& self) -> & AbstractHorseEntityData { & self . abstract_horse } # [doc = "Returns the mutable `AbstractHorseEntityData` layer."] pub fn abstract_horse_mut (& mut self) -> & mut AbstractHorseEntityData { & mut self . abstract_horse } # [doc = "Returns the `AgeableMobEntityData` layer."] pub fn ageable_mob (& self) -> & AgeableMobEntityData { & self . abstract_horse . ageable_mob } # [doc = "Returns the mutable `AgeableMobEntityData` layer."] pub fn ageable_mob_mut (& mut self) -> & mut AgeableMobEntityData { & mut self . abstract_horse . ageable_mob } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . abstract_horse . ageable_mob . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . abstract_horse . ageable_mob . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . abstract_horse . ageable_mob . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . abstract_horse . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . abstract_horse . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . abstract_horse . is_dirty () } } impl Default for ZombieHorseEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ZombieHorseEntityData { fn base (& self) -> & BaseEntityData { ZombieHorseEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZombieHorseEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZombieHorseEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZombieHorseEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZombieHorseEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZombieHorseEntityData { fn living_entity (& self) -> & LivingEntityData { ZombieHorseEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZombieHorseEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `zombified_piglin`."] # [derive (Debug , Clone)] pub struct ZombifiedPiglinEntityData { pub zombie : ZombieEntityData } impl ZombifiedPiglinEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { zombie : ZombieEntityData :: new () } } # [doc = "Returns the `ZombieEntityData` layer."] pub fn zombie (& self) -> & ZombieEntityData { & self . zombie } # [doc = "Returns the mutable `ZombieEntityData` layer."] pub fn zombie_mut (& mut self) -> & mut ZombieEntityData { & mut self . zombie } # [doc = "Returns the `MobEntityData` layer."] pub fn mob (& self) -> & MobEntityData { & self . zombie . mob } # [doc = "Returns the mutable `MobEntityData` layer."] pub fn mob_mut (& mut self) -> & mut MobEntityData { & mut self . zombie . mob } # [doc = "Returns the `LivingEntityData` layer."] pub fn living_entity (& self) -> & LivingEntityData { & self . zombie . mob . living_entity } # [doc = "Returns the mutable `LivingEntityData` layer."] pub fn living_entity_mut (& mut self) -> & mut LivingEntityData { & mut self . zombie . mob . living_entity } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . zombie . mob . living_entity . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . zombie . mob . living_entity . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . zombie . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . zombie . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . zombie . is_dirty () } } impl Default for ZombifiedPiglinEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for ZombifiedPiglinEntityData { fn base (& self) -> & BaseEntityData { ZombifiedPiglinEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { ZombifiedPiglinEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { ZombifiedPiglinEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { ZombifiedPiglinEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { ZombifiedPiglinEntityData :: is_dirty (self) } } impl VanillaLivingEntityData for ZombifiedPiglinEntityData { fn living_entity (& self) -> & LivingEntityData { ZombifiedPiglinEntityData :: living_entity (self) } fn living_entity_mut (& mut self) -> & mut LivingEntityData { ZombifiedPiglinEntityData :: living_entity_mut (self) } } # [doc = "Concrete synchronized entity data for vanilla entity `fishing_bobber`."] # [derive (Debug , Clone)] pub struct FishingBobberEntityData { pub fishing_hook : FishingHookEntityData } impl FishingBobberEntityData { # [doc = r" Create new entity data with default values."] pub fn new () -> Self { Self { fishing_hook : FishingHookEntityData :: new () } } # [doc = "Returns the `FishingHookEntityData` layer."] pub fn fishing_hook (& self) -> & FishingHookEntityData { & self . fishing_hook } # [doc = "Returns the mutable `FishingHookEntityData` layer."] pub fn fishing_hook_mut (& mut self) -> & mut FishingHookEntityData { & mut self . fishing_hook } # [doc = "Returns the `BaseEntityData` layer."] pub fn base (& self) -> & BaseEntityData { & self . fishing_hook . base } # [doc = "Returns the mutable `BaseEntityData` layer."] pub fn base_mut (& mut self) -> & mut BaseEntityData { & mut self . fishing_hook . base } # [doc = r" Pack all dirty values for network sync, clearing dirty flags."] # [doc = r" Returns `None` if no values are dirty."] pub fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { self . fishing_hook . pack_dirty () } # [doc = r" Pack all non-default values (for initial entity spawn)."] pub fn pack_all (& self) -> Vec < DataValue > { self . fishing_hook . pack_all () } # [doc = r" Returns `true` if any field has been modified."] pub fn is_dirty (& self) -> bool { self . fishing_hook . is_dirty () } } impl Default for FishingBobberEntityData { fn default () -> Self { Self :: new () } } impl VanillaEntityData for FishingBobberEntityData { fn base (& self) -> & BaseEntityData { FishingBobberEntityData :: base (self) } fn base_mut (& mut self) -> & mut BaseEntityData { FishingBobberEntityData :: base_mut (self) } fn pack_dirty (& mut self) -> Option < Vec < DataValue >> { FishingBobberEntityData :: pack_dirty (self) } fn pack_all (& self) -> Vec < DataValue > { FishingBobberEntityData :: pack_all (self) } fn is_dirty (& self) -> bool { FishingBobberEntityData :: is_dirty (self) } }