From 31d0ac75684c0db09ddbc1ee9e7522ffd199d713 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jan 2025 04:09:39 +0000 Subject: [PATCH] update wrong entity metadata --- azalea-entity/src/metadata.rs | 1613 ++++++++++++++++++--------------- codegen/lib/download.py | 2 +- 2 files changed, 903 insertions(+), 712 deletions(-) diff --git a/azalea-entity/src/metadata.rs b/azalea-entity/src/metadata.rs index 41e7a0e85..cac64999d 100644 --- a/azalea-entity/src/metadata.rs +++ b/azalea-entity/src/metadata.rs @@ -58,11 +58,11 @@ pub struct NoGravity(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct TicksFrozen(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractBoatHurt(pub i32); +pub struct Hurt(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractBoatHurtdir(pub i32); +pub struct Hurtdir(pub i32); #[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractBoatDamage(pub f32); +pub struct Damage(pub f32); #[derive(Component, Deref, DerefMut, Clone)] pub struct PaddleLeft(pub bool); #[derive(Component, Deref, DerefMut, Clone)] @@ -95,26 +95,29 @@ impl Default for AcaciaBoatMetadataBundle { _marker: AcaciaBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -149,26 +152,29 @@ impl Default for AcaciaChestBoatMetadataBundle { _marker: AcaciaChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -730,26 +736,29 @@ impl Default for BambooChestRaftMetadataBundle { _marker: BambooChestRaft, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -784,26 +793,29 @@ impl Default for BambooRaftMetadataBundle { _marker: BambooRaft, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -1005,26 +1017,29 @@ impl Default for BirchBoatMetadataBundle { _marker: BirchBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -1059,26 +1074,29 @@ impl Default for BirchChestBoatMetadataBundle { _marker: BirchChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -1786,26 +1804,29 @@ impl Default for CherryBoatMetadataBundle { _marker: CherryBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -1840,40 +1861,37 @@ impl Default for CherryChestBoatMetadataBundle { _marker: CherryChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), - }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), - paddle_left: PaddleLeft(false), - paddle_right: PaddleRight(false), - bubble_time: BubbleTime(0), - }, - } - } -} - -#[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartHurt(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartHurtdir(pub i32); -#[derive(Component, Deref, DerefMut, Clone)] -pub struct AbstractMinecartDamage(pub f32); + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), + }, + paddle_left: PaddleLeft(false), + paddle_right: PaddleRight(false), + bubble_time: BubbleTime(0), + }, + } + } +} + #[derive(Component, Deref, DerefMut, Clone)] pub struct DisplayBlock(pub i32); #[derive(Component, Deref, DerefMut, Clone)] @@ -1906,26 +1924,29 @@ impl Default for ChestMinecartMetadataBundle { _marker: ChestMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -2115,26 +2136,29 @@ impl Default for CommandBlockMinecartMetadataBundle { _marker: CommandBlockMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -2428,26 +2452,29 @@ impl Default for DarkOakBoatMetadataBundle { _marker: DarkOakBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -2482,26 +2509,29 @@ impl Default for DarkOakChestBoatMetadataBundle { _marker: DarkOakChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -3788,6 +3818,8 @@ pub struct FoxSitting(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Faceplanted(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] +pub struct Defending(pub bool); +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Sleeping(pub bool); #[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Pouncing(pub bool); @@ -3815,6 +3847,7 @@ impl Fox { let bitfield = d.value.into_byte()?; entity.insert(FoxSitting(bitfield & 0x1 != 0)); entity.insert(Faceplanted(bitfield & 0x40 != 0)); + entity.insert(Defending(bitfield & 0x80 != 0)); entity.insert(Sleeping(bitfield & 0x20 != 0)); entity.insert(Pouncing(bitfield & 0x10 != 0)); entity.insert(Crouching(bitfield & 0x4 != 0)); @@ -3839,6 +3872,7 @@ pub struct FoxMetadataBundle { fox_kind: FoxKind, fox_sitting: FoxSitting, faceplanted: Faceplanted, + defending: Defending, sleeping: Sleeping, pouncing: Pouncing, crouching: Crouching, @@ -3897,6 +3931,7 @@ impl Default for FoxMetadataBundle { fox_kind: FoxKind(0), fox_sitting: FoxSitting(false), faceplanted: Faceplanted(false), + defending: Defending(false), sleeping: Sleeping(false), pouncing: Pouncing(false), crouching: Crouching(false), @@ -4025,26 +4060,29 @@ impl Default for FurnaceMinecartMetadataBundle { _marker: FurnaceMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -4600,26 +4638,29 @@ impl Default for HopperMinecartMetadataBundle { _marker: HopperMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -5233,37 +5274,40 @@ impl Default for JungleBoatMetadataBundle { _marker: JungleBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), - }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), - paddle_left: PaddleLeft(false), - paddle_right: PaddleRight(false), - bubble_time: BubbleTime(0), - }, - } - } -} - -#[derive(Component)] -pub struct JungleChestBoat; -impl JungleChestBoat { + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), + }, + paddle_left: PaddleLeft(false), + paddle_right: PaddleRight(false), + bubble_time: BubbleTime(0), + }, + } + } +} + +#[derive(Component)] +pub struct JungleChestBoat; +impl JungleChestBoat { pub fn apply_metadata( entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem, @@ -5287,26 +5331,29 @@ impl Default for JungleChestBoatMetadataBundle { _marker: JungleChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -5644,26 +5691,29 @@ impl Default for MangroveBoatMetadataBundle { _marker: MangroveBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -5698,26 +5748,29 @@ impl Default for MangroveChestBoatMetadataBundle { _marker: MangroveChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -5797,26 +5850,29 @@ impl Default for MinecartMetadataBundle { _marker: Minecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -6019,26 +6075,29 @@ impl Default for OakBoatMetadataBundle { _marker: OakBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -6073,26 +6132,29 @@ impl Default for OakChestBoatMetadataBundle { _marker: OakChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -6310,26 +6372,29 @@ impl Default for PaleOakBoatMetadataBundle { _marker: PaleOakBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -6364,26 +6429,29 @@ impl Default for PaleOakChestBoatMetadataBundle { _marker: PaleOakChestBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -6763,7 +6831,7 @@ impl Default for PigMetadataBundle { } #[derive(Component, Deref, DerefMut, Clone)] -pub struct PiglinImmuneToZombification(pub bool); +pub struct AbstractPiglinImmuneToZombification(pub bool); #[derive(Component, Deref, DerefMut, Clone)] pub struct PiglinBaby(pub bool); #[derive(Component, Deref, DerefMut, Clone)] @@ -6778,10 +6846,7 @@ impl Piglin { d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=15 => AbstractMonster::apply_metadata(entity, d)?, - 16 => { - entity.insert(PiglinImmuneToZombification(d.value.into_boolean()?)); - } + 0..=16 => AbstractPiglin::apply_metadata(entity, d)?, 17 => { entity.insert(PiglinBaby(d.value.into_boolean()?)); } @@ -6800,8 +6865,7 @@ impl Piglin { #[derive(Bundle)] pub struct PiglinMetadataBundle { _marker: Piglin, - parent: AbstractMonsterMetadataBundle, - piglin_immune_to_zombification: PiglinImmuneToZombification, + parent: AbstractPiglinMetadataBundle, piglin_baby: PiglinBaby, piglin_is_charging_crossbow: PiglinIsChargingCrossbow, is_dancing: IsDancing, @@ -6810,47 +6874,50 @@ impl Default for PiglinMetadataBundle { fn default() -> Self { Self { _marker: Piglin, - parent: AbstractMonsterMetadataBundle { - _marker: AbstractMonster, - parent: AbstractCreatureMetadataBundle { - _marker: AbstractCreature, - parent: AbstractInsentientMetadataBundle { - _marker: AbstractInsentient, - parent: AbstractLivingMetadataBundle { - _marker: AbstractLiving, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractPiglinMetadataBundle { + _marker: AbstractPiglin, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), }, - auto_spin_attack: AutoSpinAttack(false), - abstract_living_using_item: AbstractLivingUsingItem(false), - health: Health(1.0), - effect_particles: EffectParticles(Default::default()), - effect_ambience: EffectAmbience(false), - arrow_count: ArrowCount(0), - stinger_count: StingerCount(0), - sleeping_pos: SleepingPos(None), + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), }, - no_ai: NoAi(false), - left_handed: LeftHanded(false), - aggressive: Aggressive(false), }, }, + abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false), }, - piglin_immune_to_zombification: PiglinImmuneToZombification(false), piglin_baby: PiglinBaby(false), piglin_is_charging_crossbow: PiglinIsChargingCrossbow(false), is_dancing: IsDancing(false), @@ -6858,8 +6925,6 @@ impl Default for PiglinMetadataBundle { } } -#[derive(Component, Deref, DerefMut, Clone)] -pub struct PiglinBruteImmuneToZombification(pub bool); #[derive(Component)] pub struct PiglinBrute; impl PiglinBrute { @@ -6868,10 +6933,7 @@ impl PiglinBrute { d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=15 => AbstractMonster::apply_metadata(entity, d)?, - 16 => { - entity.insert(PiglinBruteImmuneToZombification(d.value.into_boolean()?)); - } + 0..=16 => AbstractPiglin::apply_metadata(entity, d)?, _ => {} } Ok(()) @@ -6881,54 +6943,56 @@ impl PiglinBrute { #[derive(Bundle)] pub struct PiglinBruteMetadataBundle { _marker: PiglinBrute, - parent: AbstractMonsterMetadataBundle, - piglin_brute_immune_to_zombification: PiglinBruteImmuneToZombification, + parent: AbstractPiglinMetadataBundle, } impl Default for PiglinBruteMetadataBundle { fn default() -> Self { Self { _marker: PiglinBrute, - parent: AbstractMonsterMetadataBundle { - _marker: AbstractMonster, - parent: AbstractCreatureMetadataBundle { - _marker: AbstractCreature, - parent: AbstractInsentientMetadataBundle { - _marker: AbstractInsentient, - parent: AbstractLivingMetadataBundle { - _marker: AbstractLiving, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractPiglinMetadataBundle { + _marker: AbstractPiglin, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), }, - auto_spin_attack: AutoSpinAttack(false), - abstract_living_using_item: AbstractLivingUsingItem(false), - health: Health(1.0), - effect_particles: EffectParticles(Default::default()), - effect_ambience: EffectAmbience(false), - arrow_count: ArrowCount(0), - stinger_count: StingerCount(0), - sleeping_pos: SleepingPos(None), + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), }, - no_ai: NoAi(false), - left_handed: LeftHanded(false), - aggressive: Aggressive(false), }, }, + abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false), }, - piglin_brute_immune_to_zombification: PiglinBruteImmuneToZombification(false), } } } @@ -8335,26 +8399,29 @@ impl Default for SpawnerMinecartMetadataBundle { _marker: SpawnerMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -8515,26 +8582,29 @@ impl Default for SpruceBoatMetadataBundle { _marker: SpruceBoat, parent: AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -8554,41 +8624,44 @@ impl SpruceChestBoat { 0..=13 => AbstractBoat::apply_metadata(entity, d)?, _ => {} } - Ok(()) - } -} - -#[derive(Bundle)] -pub struct SpruceChestBoatMetadataBundle { - _marker: SpruceChestBoat, - parent: AbstractBoatMetadataBundle, -} -impl Default for SpruceChestBoatMetadataBundle { - fn default() -> Self { - Self { - _marker: SpruceChestBoat, - parent: AbstractBoatMetadataBundle { - _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + Ok(()) + } +} + +#[derive(Bundle)] +pub struct SpruceChestBoatMetadataBundle { + _marker: SpruceChestBoat, + parent: AbstractBoatMetadataBundle, +} +impl Default for SpruceChestBoatMetadataBundle { + fn default() -> Self { + Self { + _marker: SpruceChestBoat, + parent: AbstractBoatMetadataBundle { + _marker: AbstractBoat, + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -9101,26 +9174,29 @@ impl Default for TntMinecartMetadataBundle { _marker: TntMinecart, parent: AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -10920,16 +10996,7 @@ impl AbstractBoat { d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=7 => AbstractEntity::apply_metadata(entity, d)?, - 8 => { - entity.insert(AbstractBoatHurt(d.value.into_int()?)); - } - 9 => { - entity.insert(AbstractBoatHurtdir(d.value.into_int()?)); - } - 10 => { - entity.insert(AbstractBoatDamage(d.value.into_float()?)); - } + 0..=10 => AbstractVehicle::apply_metadata(entity, d)?, 11 => { entity.insert(PaddleLeft(d.value.into_boolean()?)); } @@ -10948,10 +11015,7 @@ impl AbstractBoat { #[derive(Bundle)] pub struct AbstractBoatMetadataBundle { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle, - abstract_boat_hurt: AbstractBoatHurt, - abstract_boat_hurtdir: AbstractBoatHurtdir, - abstract_boat_damage: AbstractBoatDamage, + parent: AbstractVehicleMetadataBundle, paddle_left: PaddleLeft, paddle_right: PaddleRight, bubble_time: BubbleTime, @@ -10960,26 +11024,29 @@ impl Default for AbstractBoatMetadataBundle { fn default() -> Self { Self { _marker: AbstractBoat, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_boat_hurt: AbstractBoatHurt(0), - abstract_boat_hurtdir: AbstractBoatHurtdir(1), - abstract_boat_damage: AbstractBoatDamage(0.0), paddle_left: PaddleLeft(false), paddle_right: PaddleRight(false), bubble_time: BubbleTime(0), @@ -11680,16 +11747,7 @@ impl AbstractMinecart { d: EntityDataItem, ) -> Result<(), UpdateMetadataError> { match d.index { - 0..=7 => AbstractEntity::apply_metadata(entity, d)?, - 8 => { - entity.insert(AbstractMinecartHurt(d.value.into_int()?)); - } - 9 => { - entity.insert(AbstractMinecartHurtdir(d.value.into_int()?)); - } - 10 => { - entity.insert(AbstractMinecartDamage(d.value.into_float()?)); - } + 0..=10 => AbstractVehicle::apply_metadata(entity, d)?, 11 => { entity.insert(DisplayBlock(d.value.into_int()?)); } @@ -11708,10 +11766,7 @@ impl AbstractMinecart { #[derive(Bundle)] pub struct AbstractMinecartMetadataBundle { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle, - abstract_minecart_hurt: AbstractMinecartHurt, - abstract_minecart_hurtdir: AbstractMinecartHurtdir, - abstract_minecart_damage: AbstractMinecartDamage, + parent: AbstractVehicleMetadataBundle, display_block: DisplayBlock, display_offset: DisplayOffset, custom_display: CustomDisplay, @@ -11720,26 +11775,29 @@ impl Default for AbstractMinecartMetadataBundle { fn default() -> Self { Self { _marker: AbstractMinecart, - parent: AbstractEntityMetadataBundle { - _marker: AbstractEntity, - on_fire: OnFire(false), - shift_key_down: ShiftKeyDown(false), - sprinting: Sprinting(false), - swimming: Swimming(false), - currently_glowing: CurrentlyGlowing(false), - invisible: Invisible(false), - fall_flying: FallFlying(false), - air_supply: AirSupply(Default::default()), - custom_name: CustomName(Default::default()), - custom_name_visible: CustomNameVisible(Default::default()), - silent: Silent(Default::default()), - no_gravity: NoGravity(Default::default()), - pose: Pose::default(), - ticks_frozen: TicksFrozen(Default::default()), + parent: AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), }, - abstract_minecart_hurt: AbstractMinecartHurt(0), - abstract_minecart_hurtdir: AbstractMinecartHurtdir(1), - abstract_minecart_damage: AbstractMinecartDamage(0.0), display_block: DisplayBlock(Default::default()), display_offset: DisplayOffset(6), custom_display: CustomDisplay(false), @@ -11812,6 +11870,79 @@ impl Default for AbstractMonsterMetadataBundle { } } +#[derive(Component)] +pub struct AbstractPiglin; +impl AbstractPiglin { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=15 => AbstractMonster::apply_metadata(entity, d)?, + 16 => { + entity.insert(AbstractPiglinImmuneToZombification(d.value.into_boolean()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct AbstractPiglinMetadataBundle { + _marker: AbstractPiglin, + parent: AbstractMonsterMetadataBundle, + abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification, +} +impl Default for AbstractPiglinMetadataBundle { + fn default() -> Self { + Self { + _marker: AbstractPiglin, + parent: AbstractMonsterMetadataBundle { + _marker: AbstractMonster, + parent: AbstractCreatureMetadataBundle { + _marker: AbstractCreature, + parent: AbstractInsentientMetadataBundle { + _marker: AbstractInsentient, + parent: AbstractLivingMetadataBundle { + _marker: AbstractLiving, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + auto_spin_attack: AutoSpinAttack(false), + abstract_living_using_item: AbstractLivingUsingItem(false), + health: Health(1.0), + effect_particles: EffectParticles(Default::default()), + effect_ambience: EffectAmbience(false), + arrow_count: ArrowCount(0), + stinger_count: StingerCount(0), + sleeping_pos: SleepingPos(None), + }, + no_ai: NoAi(false), + left_handed: LeftHanded(false), + aggressive: Aggressive(false), + }, + }, + }, + abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false), + } + } +} + #[derive(Component)] pub struct AbstractRaider; impl AbstractRaider { @@ -12102,6 +12233,66 @@ impl Default for AbstractThrownItemProjectileMetadataBundle { } } +#[derive(Component)] +pub struct AbstractVehicle; +impl AbstractVehicle { + pub fn apply_metadata( + entity: &mut bevy_ecs::system::EntityCommands, + d: EntityDataItem, + ) -> Result<(), UpdateMetadataError> { + match d.index { + 0..=7 => AbstractEntity::apply_metadata(entity, d)?, + 8 => { + entity.insert(Hurt(d.value.into_int()?)); + } + 9 => { + entity.insert(Hurtdir(d.value.into_int()?)); + } + 10 => { + entity.insert(Damage(d.value.into_float()?)); + } + _ => {} + } + Ok(()) + } +} + +#[derive(Bundle)] +pub struct AbstractVehicleMetadataBundle { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle, + hurt: Hurt, + hurtdir: Hurtdir, + damage: Damage, +} +impl Default for AbstractVehicleMetadataBundle { + fn default() -> Self { + Self { + _marker: AbstractVehicle, + parent: AbstractEntityMetadataBundle { + _marker: AbstractEntity, + on_fire: OnFire(false), + shift_key_down: ShiftKeyDown(false), + sprinting: Sprinting(false), + swimming: Swimming(false), + currently_glowing: CurrentlyGlowing(false), + invisible: Invisible(false), + fall_flying: FallFlying(false), + air_supply: AirSupply(Default::default()), + custom_name: CustomName(Default::default()), + custom_name_visible: CustomNameVisible(Default::default()), + silent: Silent(Default::default()), + no_gravity: NoGravity(Default::default()), + pose: Pose::default(), + ticks_frozen: TicksFrozen(Default::default()), + }, + hurt: Hurt(0), + hurtdir: Hurtdir(1), + damage: Damage(0.0), + } + } +} + #[derive(Component)] pub struct AbstractVillager; impl AbstractVillager { diff --git a/codegen/lib/download.py b/codegen/lib/download.py index 41576594d..599e0b72b 100755 --- a/codegen/lib/download.py +++ b/codegen/lib/download.py @@ -19,7 +19,7 @@ def get_burger(): f'cd {get_dir_location("__cache__")} && git clone https://github.com/mat-1/Burger && cd Burger && git pull') print('\033[92mInstalling dependencies...\033[m') - os.system(f'cd {get_dir_location("__cache__")}/Burger && pip install six jawa') + os.system(f'cd {get_dir_location("__cache__")}/Burger && python -m venv venv && venv/bin/pip install six jawa') def get_pixlyzer():