From 66094921c88e80187a712dca39e421a648d69198 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 21 Feb 2023 21:46:30 -0600 Subject: [PATCH] make metadata components clonable --- azalea-world/src/entity/metadata.rs | 540 ++++++++++++++-------------- codegen/lib/code/entity.py | 4 +- codegen/lib/extract.py | 2 +- 3 files changed, 273 insertions(+), 273 deletions(-) diff --git a/azalea-world/src/entity/metadata.rs b/azalea-world/src/entity/metadata.rs index 3d6c52c8..8960b045 100644 --- a/azalea-world/src/entity/metadata.rs +++ b/azalea-world/src/entity/metadata.rs @@ -23,57 +23,57 @@ impl From for UpdateMetadataError { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct OnFire(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ShiftKeyDown(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Sprinting(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Swimming(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CurrentlyGlowing(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Invisible(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct FallFlying(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AirSupply(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CustomName(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CustomNameVisible(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Silent(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct NoGravity(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TicksFrozen(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct AutoSpinAttack(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct AbstractLivingUsingItem(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Health(pub f32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AbstractLivingEffectColor(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EffectAmbience(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ArrowCount(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StingerCount(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SleepingPos(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct NoAi(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LeftHanded(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Aggressive(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Dancing(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CanDuplicate(pub bool); #[derive(Component)] pub struct Allay; @@ -150,11 +150,11 @@ impl Default for AllayMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Radius(pub f32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AreaEffectCloudColor(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Waiting(pub bool); #[derive(Component)] pub struct AreaEffectCloud; @@ -221,25 +221,25 @@ impl Default for AreaEffectCloudMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Small(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ShowArms(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct NoBasePlate(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArmorStandMarker(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HeadPose(pub Rotations); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BodyPose(pub Rotations); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LeftArmPose(pub Rotations); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct RightArmPose(pub Rotations); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LeftLegPose(pub Rotations); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct RightLegPose(pub Rotations); #[derive(Component)] pub struct ArmorStand; @@ -342,15 +342,15 @@ impl Default for ArmorStandMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArrowCritArrow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArrowShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ArrowNoPhysics(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ArrowPierceLevel(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ArrowEffectColor(pub i32); #[derive(Component)] pub struct Arrow; @@ -419,13 +419,13 @@ impl Default for ArrowMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AbstractAgeableBaby(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AxolotlVariant(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PlayingDead(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AxolotlFromBucket(pub bool); #[derive(Component)] pub struct Axolotl; @@ -514,7 +514,7 @@ impl Default for AxolotlMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Resting(pub bool); #[derive(Component)] pub struct Bat; @@ -584,13 +584,13 @@ impl Default for BatMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HasNectar(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HasStung(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct BeeRolling(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BeeRemainingAngerTime(pub i32); #[derive(Component)] pub struct Bee; @@ -681,7 +681,7 @@ impl Default for BeeMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Charged(pub bool); #[derive(Component)] pub struct Blaze; @@ -757,19 +757,19 @@ impl Default for BlazeMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BoatHurt(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BoatHurtdir(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BoatDamage(pub f32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BoatKind(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PaddleLeft(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PaddleRight(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BubbleTime(pub i32); #[derive(Component)] pub struct Boat; @@ -851,21 +851,21 @@ impl Default for BoatMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CamelTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CamelEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CamelStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CamelBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct CamelSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CamelOwnerUuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Dash(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LastPoseChangeTick(pub i64); #[derive(Component)] pub struct Camel; @@ -972,19 +972,19 @@ impl Default for CamelMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Tame(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct InSittingPose(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Owneruuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CatVariant(pub azalea_registry::CatVariant); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsLying(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct RelaxStateOne(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CatCollarColor(pub i32); #[derive(Component)] pub struct Cat; @@ -1084,7 +1084,7 @@ impl Default for CatMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Climbing(pub bool); #[derive(Component)] pub struct CaveSpider; @@ -1213,17 +1213,17 @@ impl Default for ChestBoatMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AbstractMinecartHurt(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AbstractMinecartHurtdir(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AbstractMinecartDamage(pub f32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DisplayBlock(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DisplayOffset(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CustomDisplay(pub bool); #[derive(Component)] pub struct ChestMinecart; @@ -1351,7 +1351,7 @@ impl Default for ChickenMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CodFromBucket(pub bool); #[derive(Component)] pub struct Cod; @@ -1423,9 +1423,9 @@ impl Default for CodMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CommandName(pub String); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LastOutput(pub FormattedText); #[derive(Component)] pub struct CommandBlockMinecart; @@ -1563,11 +1563,11 @@ impl Default for CowMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SwellDir(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsPowered(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsIgnited(pub bool); #[derive(Component)] pub struct Creeper; @@ -1652,11 +1652,11 @@ impl Default for CreeperMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TreasurePos(pub BlockPos); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct GotFish(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct MoistnessLevel(pub i32); #[derive(Component)] pub struct Dolphin; @@ -1738,19 +1738,19 @@ impl Default for DolphinMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct DonkeyTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct DonkeyEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct DonkeyStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct DonkeyBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct DonkeySaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DonkeyOwnerUuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DonkeyChest(pub bool); #[derive(Component)] pub struct Donkey; @@ -1897,11 +1897,11 @@ impl Default for DragonFireballMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ZombieBaby(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SpecialType(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DrownedConversion(pub bool); #[derive(Component)] pub struct Drowned; @@ -1977,7 +1977,7 @@ impl Default for DrownedMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EggItemStack(pub Slot); #[derive(Component)] pub struct Egg; @@ -2029,9 +2029,9 @@ impl Default for EggMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Moving(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AttackTarget(pub i32); #[derive(Component)] pub struct ElderGuardian; @@ -2106,9 +2106,9 @@ impl Default for ElderGuardianMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct BeamTarget(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ShowBottom(pub bool); #[derive(Component)] pub struct EndCrystal; @@ -2165,7 +2165,7 @@ impl Default for EndCrystalMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Phase(pub i32); #[derive(Component)] pub struct EnderDragon; @@ -2234,7 +2234,7 @@ impl Default for EnderDragonMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EnderPearlItemStack(pub Slot); #[derive(Component)] pub struct EnderPearl; @@ -2286,11 +2286,11 @@ impl Default for EnderPearlMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct CarryState(pub BlockState); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Creepy(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StaredAt(pub bool); #[derive(Component)] pub struct Enderman; @@ -2443,9 +2443,9 @@ impl Default for EndermiteMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EvokerIsCelebrating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EvokerSpellCasting(pub u8); #[derive(Component)] pub struct Evoker; @@ -2570,7 +2570,7 @@ impl Default for EvokerFangsMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ExperienceBottleItemStack(pub Slot); #[derive(Component)] pub struct ExperienceBottle; @@ -2667,7 +2667,7 @@ impl Default for ExperienceOrbMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EyeOfEnderItemStack(pub Slot); #[derive(Component)] pub struct EyeOfEnder; @@ -2719,7 +2719,7 @@ impl Default for EyeOfEnderMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StartPos(pub BlockPos); #[derive(Component)] pub struct FallingBlock; @@ -2771,7 +2771,7 @@ impl Default for FallingBlockMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct FireballItemStack(pub Slot); #[derive(Component)] pub struct Fireball; @@ -2823,11 +2823,11 @@ impl Default for FireballMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct FireworksItem(pub Slot); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AttachedToTarget(pub OptionalUnsignedInt); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ShotAtAngle(pub bool); #[derive(Component)] pub struct FireworkRocket; @@ -2889,9 +2889,9 @@ impl Default for FireworkRocketMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HookedEntity(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Biting(pub bool); #[derive(Component)] pub struct FishingBobber; @@ -2948,23 +2948,23 @@ impl Default for FishingBobberMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct FoxKind(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct FoxSitting(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Faceplanted(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Sleeping(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Pouncing(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Crouching(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct FoxInterested(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TrustedId0(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TrustedId1(pub Option); #[derive(Component)] pub struct Fox; @@ -3074,9 +3074,9 @@ impl Default for FoxMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct FrogVariant(pub azalea_registry::FrogVariant); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TongueTarget(pub OptionalUnsignedInt); #[derive(Component)] pub struct Frog; @@ -3160,7 +3160,7 @@ impl Default for FrogMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Fuel(pub bool); #[derive(Component)] pub struct FurnaceMinecart; @@ -3221,7 +3221,7 @@ impl Default for FurnaceMinecartMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsCharging(pub bool); #[derive(Component)] pub struct Ghast; @@ -3358,9 +3358,9 @@ impl Default for GiantMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ItemFrameItem(pub Slot); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Rotation(pub i32); #[derive(Component)] pub struct GlowItemFrame; @@ -3412,7 +3412,7 @@ impl Default for GlowItemFrameMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct DarkTicksRemaining(pub i32); #[derive(Component)] pub struct GlowSquid; @@ -3487,11 +3487,11 @@ impl Default for GlowSquidMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsScreamingGoat(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HasLeftHorn(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HasRightHorn(pub bool); #[derive(Component)] pub struct Goat; @@ -3658,7 +3658,7 @@ impl Default for GuardianMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HoglinImmuneToZombification(pub bool); #[derive(Component)] pub struct Hoglin; @@ -3791,19 +3791,19 @@ impl Default for HopperMinecartMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HorseTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HorseEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HorseStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HorseBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HorseSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HorseOwnerUuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HorseTypeVariant(pub i32); #[derive(Component)] pub struct Horse; @@ -3979,9 +3979,9 @@ impl Default for HuskMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IllusionerIsCelebrating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IllusionerSpellCasting(pub u8); #[derive(Component)] pub struct Illusioner; @@ -4061,7 +4061,7 @@ impl Default for IllusionerMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct PlayerCreated(pub bool); #[derive(Component)] pub struct IronGolem; @@ -4134,7 +4134,7 @@ impl Default for IronGolemMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ItemItem(pub Slot); #[derive(Component)] pub struct Item; @@ -4331,25 +4331,25 @@ impl Default for LightningBoltMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LlamaTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LlamaEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LlamaStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LlamaBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct LlamaSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LlamaOwnerUuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LlamaChest(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Strength(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Swag(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LlamaVariant(pub i32); #[derive(Component)] pub struct Llama; @@ -4511,7 +4511,7 @@ impl Default for LlamaSpitMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SlimeSize(pub i32); #[derive(Component)] pub struct MagmaCube; @@ -4678,7 +4678,7 @@ impl Default for MinecartMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct MooshroomKind(pub String); #[derive(Component)] pub struct Mooshroom; @@ -4760,19 +4760,19 @@ impl Default for MooshroomMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct MuleTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct MuleEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct MuleStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct MuleBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct MuleSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct MuleOwnerUuid(pub Option); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct MuleChest(pub bool); #[derive(Component)] pub struct Mule; @@ -4874,7 +4874,7 @@ impl Default for MuleMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Trusting(pub bool); #[derive(Component)] pub struct Ocelot; @@ -4953,7 +4953,7 @@ impl Default for OcelotMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PaintingVariant(pub azalea_registry::PaintingVariant); #[derive(Component)] pub struct Painting; @@ -5005,23 +5005,23 @@ impl Default for PaintingMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PandaUnhappyCounter(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SneezeCounter(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct EatCounter(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Sneezing(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct PandaSitting(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct OnBack(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct PandaRolling(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HiddenGene(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PandaFlags(pub u8); #[derive(Component)] pub struct Panda; @@ -5135,7 +5135,7 @@ impl Default for PandaMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ParrotVariant(pub i32); #[derive(Component)] pub struct Parrot; @@ -5220,7 +5220,7 @@ impl Default for ParrotMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PhantomSize(pub i32); #[derive(Component)] pub struct Phantom; @@ -5289,9 +5289,9 @@ impl Default for PhantomMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PigSaddle(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PigBoostTime(pub i32); #[derive(Component)] pub struct Pig; @@ -5375,13 +5375,13 @@ impl Default for PigMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PiglinImmuneToZombification(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PiglinBaby(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PiglinIsChargingCrossbow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct IsDancing(pub bool); #[derive(Component)] pub struct Piglin; @@ -5471,7 +5471,7 @@ impl Default for PiglinMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PiglinBruteImmuneToZombification(pub bool); #[derive(Component)] pub struct PiglinBrute; @@ -5546,9 +5546,9 @@ impl Default for PiglinBruteMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PillagerIsCelebrating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PillagerIsChargingCrossbow(pub bool); #[derive(Component)] pub struct Pillager; @@ -5628,17 +5628,17 @@ impl Default for PillagerMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PlayerAbsorption(pub f32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Score(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PlayerModeCustomisation(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PlayerMainHand(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ShoulderLeft(pub azalea_nbt::Tag); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ShoulderRight(pub azalea_nbt::Tag); #[derive(Component)] pub struct Player; @@ -5726,7 +5726,7 @@ impl Default for PlayerMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PolarBearStanding(pub bool); #[derive(Component)] pub struct PolarBear; @@ -5805,7 +5805,7 @@ impl Default for PolarBearMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PotionItemStack(pub Slot); #[derive(Component)] pub struct Potion; @@ -5857,9 +5857,9 @@ impl Default for PotionMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PufferfishFromBucket(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct PuffState(pub i32); #[derive(Component)] pub struct Pufferfish; @@ -5936,7 +5936,7 @@ impl Default for PufferfishMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct RabbitKind(pub i32); #[derive(Component)] pub struct Rabbit; @@ -6015,7 +6015,7 @@ impl Default for RabbitMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct RavagerIsCelebrating(pub bool); #[derive(Component)] pub struct Ravager; @@ -6090,7 +6090,7 @@ impl Default for RavagerMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SalmonFromBucket(pub bool); #[derive(Component)] pub struct Salmon; @@ -6162,7 +6162,7 @@ impl Default for SalmonMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct Sheared(pub bool); #[derive(Component)] pub struct Sheep; @@ -6242,11 +6242,11 @@ impl Default for SheepMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct AttachFace(pub Direction); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Peek(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ShulkerColor(pub u8); #[derive(Component)] pub struct Shulker; @@ -6441,7 +6441,7 @@ impl Default for SilverfishMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StrayConversion(pub bool); #[derive(Component)] pub struct Skeleton; @@ -6516,17 +6516,17 @@ impl Default for SkeletonMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SkeletonHorseTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SkeletonHorseEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SkeletonHorseStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SkeletonHorseBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SkeletonHorseSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SkeletonHorseOwnerUuid(pub Option); #[derive(Component)] pub struct SkeletonHorse; @@ -6690,7 +6690,7 @@ impl Default for SlimeMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SmallFireballItemStack(pub Slot); #[derive(Component)] pub struct SmallFireball; @@ -6742,7 +6742,7 @@ impl Default for SmallFireballMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct HasPumpkin(pub bool); #[derive(Component)] pub struct SnowGolem; @@ -6815,7 +6815,7 @@ impl Default for SnowGolemMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SnowballItemStack(pub Slot); #[derive(Component)] pub struct Snowball; @@ -6921,13 +6921,13 @@ impl Default for SpawnerMinecartMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SpectralArrowCritArrow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SpectralArrowShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct SpectralArrowNoPhysics(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct SpectralArrowPierceLevel(pub u8); #[derive(Component)] pub struct SpectralArrow; @@ -7198,11 +7198,11 @@ impl Default for StrayMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StriderBoostTime(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Suffocating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct StriderSaddle(pub bool); #[derive(Component)] pub struct Strider; @@ -7291,7 +7291,7 @@ impl Default for StriderMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TadpoleFromBucket(pub bool); #[derive(Component)] pub struct Tadpole; @@ -7363,7 +7363,7 @@ impl Default for TadpoleMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Fuse(pub i32); #[derive(Component)] pub struct Tnt; @@ -7554,17 +7554,17 @@ impl Default for TraderLlamaMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct TridentCritArrow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct TridentShotFromCrossbow(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct TridentNoPhysics(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TridentPierceLevel(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Loyalty(pub u8); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Foil(pub bool); #[derive(Component)] pub struct Trident; @@ -7638,9 +7638,9 @@ impl Default for TridentMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TropicalFishFromBucket(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TropicalFishTypeVariant(pub i32); #[derive(Component)] pub struct TropicalFish; @@ -7717,17 +7717,17 @@ impl Default for TropicalFishMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HomePos(pub BlockPos); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct HasEgg(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct LayingEgg(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TravelPos(pub BlockPos); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct GoingHome(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Travelling(pub bool); #[derive(Component)] pub struct Turtle; @@ -7831,7 +7831,7 @@ impl Default for TurtleMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct VexFlags(pub u8); #[derive(Component)] pub struct Vex; @@ -7906,9 +7906,9 @@ impl Default for VexMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct VillagerUnhappyCounter(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct VillagerVillagerData(pub VillagerData); #[derive(Component)] pub struct Villager; @@ -7993,7 +7993,7 @@ impl Default for VillagerMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct VindicatorIsCelebrating(pub bool); #[derive(Component)] pub struct Vindicator; @@ -8068,7 +8068,7 @@ impl Default for VindicatorMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WanderingTraderUnhappyCounter(pub i32); #[derive(Component)] pub struct WanderingTrader; @@ -8144,7 +8144,7 @@ impl Default for WanderingTraderMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ClientAngerLevel(pub i32); #[derive(Component)] pub struct Warden; @@ -8219,9 +8219,9 @@ impl Default for WardenMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WitchIsCelebrating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WitchUsingItem(pub bool); #[derive(Component)] pub struct Witch; @@ -8301,13 +8301,13 @@ impl Default for WitchMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TargetA(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TargetB(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct TargetC(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Inv(pub i32); #[derive(Component)] pub struct Wither; @@ -8465,7 +8465,7 @@ impl Default for WitherSkeletonMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Dangerous(pub bool); #[derive(Component)] pub struct WitherSkull; @@ -8517,11 +8517,11 @@ impl Default for WitherSkullMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WolfInterested(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WolfCollarColor(pub i32); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct WolfRemainingAngerTime(pub i32); #[derive(Component)] pub struct Wolf; @@ -8616,7 +8616,7 @@ impl Default for WolfMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ZoglinBaby(pub bool); #[derive(Component)] pub struct Zoglin; @@ -8774,17 +8774,17 @@ impl Default for ZombieMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ZombieHorseTamed(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ZombieHorseEating(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ZombieHorseStanding(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ZombieHorseBred(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone, Copy)] pub struct ZombieHorseSaddled(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ZombieHorseOwnerUuid(pub Option); #[derive(Component)] pub struct ZombieHorse; @@ -8881,9 +8881,9 @@ impl Default for ZombieHorseMetadataBundle { } } -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct Converting(pub bool); -#[derive(Component, Deref, DerefMut)] +#[derive(Component, Deref, DerefMut, Clone)] pub struct ZombieVillagerVillagerData(pub VillagerData); #[derive(Component)] pub struct ZombieVillager; diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py index 750b7ca3..250b7e70 100644 --- a/codegen/lib/code/entity.py +++ b/codegen/lib/code/entity.py @@ -162,14 +162,14 @@ impl From for UpdateMetadataError { metadata_type_data = metadata_types[type_id] rust_type = metadata_type_data['type'] - code.append(f'#[derive(Component, Deref, DerefMut)]') + code.append(f'#[derive(Component, Deref, DerefMut, Clone)]') code.append(f'pub struct {struct_name}(pub {rust_type});') else: # if it's a bitfield just make a struct for each bit for mask, name in name_or_bitfield.items(): name = maybe_rename_field(name, index) struct_name = upper_first_letter(to_camel_case(name)) - code.append(f'#[derive(Component, Deref, DerefMut)]') + code.append(f'#[derive(Component, Deref, DerefMut, Clone, Copy)]') code.append(f'pub struct {struct_name}(pub bool);') # add the entity struct and Bundle struct diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index 09035e86..6bf2d57f 100755 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -54,7 +54,7 @@ def determine_python_command(): def try_python_command(version): return os.system(f'{version} --version') == 0 - for version in ('python3.9', 'python3.8', 'python3', 'python'): + for version in (sys.executable, 'python3.9', 'python3.8', 'python3', 'python'): if try_python_command(version): python_command = version return version