Skip to main content

azalea_entity/
metadata.rs

1// This file is @generated from codegen/lib/code/entity.py.
2// Don't change it manually!
3
4//! Metadata fields stored on entities.
5//!
6//! Also see the [protocol wiki documentation](https://minecraft.wiki/w/Java_Edition_protocol/Entity_metadata).
7//!
8//! # Entities
9//!
10//! Azalea creates a marker ECS component for every entity and abstract entity.
11//! You can use these to check if an entity is of a given type with an ECS
12//! filter, such as `With<AbstractMonster>`.
13//!
14//! All marker components are shown as a tree structure below:
15//!
16//! - [AbstractEntity]
17//!   - [AreaEffectCloud]
18//!   - [BreezeWindCharge]
19//!   - [DragonFireball]
20//!   - [EndCrystal]
21//!   - [EvokerFangs]
22//!   - [ExperienceOrb]
23//!   - [EyeOfEnder]
24//!   - [FallingBlock]
25//!   - [Fireball]
26//!   - [FireworkRocket]
27//!   - [FishingBobber]
28//!   - [Interaction]
29//!   - [Item]
30//!   - [ItemFrame]
31//!     - [GlowItemFrame]
32//!   - [LeashKnot]
33//!   - [LightningBolt]
34//!   - [LlamaSpit]
35//!   - [Marker]
36//!   - [OminousItemSpawner]
37//!   - [Painting]
38//!   - [ShulkerBullet]
39//!   - [SmallFireball]
40//!   - [Tnt]
41//!   - [WindCharge]
42//!   - [WitherSkull]
43//!   - [AbstractArrow]
44//!     - [Arrow]
45//!     - [SpectralArrow]
46//!     - [Trident]
47//!   - [AbstractDisplay]
48//!     - [BlockDisplay]
49//!     - [ItemDisplay]
50//!     - [TextDisplay]
51//!   - [AbstractLiving]
52//!     - [ArmorStand]
53//!     - [AbstractAvatar]
54//!       - [Mannequin]
55//!       - [Player]
56//!     - [AbstractInsentient]
57//!       - [Bat]
58//!       - [EnderDragon]
59//!       - [Ghast]
60//!       - [Phantom]
61//!       - [AbstractCreature]
62//!         - [Allay]
63//!         - [CopperGolem]
64//!         - [IronGolem]
65//!         - [Pufferfish]
66//!         - [Shulker]
67//!         - [SnowGolem]
68//!         - [Tadpole]
69//!         - [AbstractAgeable]
70//!           - [Dolphin]
71//!           - [MagmaCube]
72//!           - [Slime]
73//!           - [Squid]
74//!             - [GlowSquid]
75//!           - [SulfurCube]
76//!           - [AbstractAnimal]
77//!             - [Armadillo]
78//!             - [Axolotl]
79//!             - [Bee]
80//!             - [Chicken]
81//!             - [Cow]
82//!             - [Fox]
83//!             - [Frog]
84//!             - [Goat]
85//!             - [HappyGhast]
86//!             - [Hoglin]
87//!             - [Mooshroom]
88//!             - [Ocelot]
89//!             - [Panda]
90//!             - [Pig]
91//!             - [PolarBear]
92//!             - [Rabbit]
93//!             - [Sheep]
94//!             - [Sniffer]
95//!             - [Strider]
96//!             - [Turtle]
97//!             - [AbstractHorse]
98//!               - [Camel]
99//!                 - [CamelHusk]
100//!               - [Horse]
101//!               - [SkeletonHorse]
102//!               - [ZombieHorse]
103//!               - [AbstractChestedHorse]
104//!                 - [Donkey]
105//!                 - [Llama]
106//!                   - [TraderLlama]
107//!                 - [Mule]
108//!             - [AbstractTameable]
109//!               - [Cat]
110//!               - [Parrot]
111//!               - [Wolf]
112//!               - [AbstractNautilus]
113//!                 - [Nautilus]
114//!                 - [ZombieNautilus]
115//!           - [AbstractVillager]
116//!             - [Villager]
117//!             - [WanderingTrader]
118//!         - [AbstractFish]
119//!           - [Cod]
120//!           - [Salmon]
121//!           - [TropicalFish]
122//!         - [AbstractMonster]
123//!           - [Blaze]
124//!           - [Bogged]
125//!           - [Breeze]
126//!           - [Creaking]
127//!           - [Creeper]
128//!           - [Enderman]
129//!           - [Endermite]
130//!           - [Giant]
131//!           - [Guardian]
132//!             - [ElderGuardian]
133//!           - [Parched]
134//!           - [Silverfish]
135//!           - [Skeleton]
136//!           - [Spider]
137//!             - [CaveSpider]
138//!           - [Stray]
139//!           - [Vex]
140//!           - [Warden]
141//!           - [Wither]
142//!           - [WitherSkeleton]
143//!           - [Zoglin]
144//!           - [Zombie]
145//!             - [Drowned]
146//!             - [Husk]
147//!             - [ZombieVillager]
148//!             - [ZombifiedPiglin]
149//!           - [AbstractPiglin]
150//!             - [Piglin]
151//!             - [PiglinBrute]
152//!           - [AbstractRaider]
153//!             - [Pillager]
154//!             - [Ravager]
155//!             - [Vindicator]
156//!             - [Witch]
157//!             - [AbstractSpellcasterIllager]
158//!               - [Evoker]
159//!               - [Illusioner]
160//!   - [AbstractThrownItemProjectile]
161//!     - [Egg]
162//!     - [EnderPearl]
163//!     - [ExperienceBottle]
164//!     - [LingeringPotion]
165//!     - [Snowball]
166//!     - [SplashPotion]
167//!   - [AbstractVehicle]
168//!     - [AbstractBoat]
169//!       - [AcaciaBoat]
170//!       - [AcaciaChestBoat]
171//!       - [BambooChestRaft]
172//!       - [BambooRaft]
173//!       - [BirchBoat]
174//!       - [BirchChestBoat]
175//!       - [CherryBoat]
176//!       - [CherryChestBoat]
177//!       - [DarkOakBoat]
178//!       - [DarkOakChestBoat]
179//!       - [JungleBoat]
180//!       - [JungleChestBoat]
181//!       - [MangroveBoat]
182//!       - [MangroveChestBoat]
183//!       - [OakBoat]
184//!       - [OakChestBoat]
185//!       - [PaleOakBoat]
186//!       - [PaleOakChestBoat]
187//!       - [SpruceBoat]
188//!       - [SpruceChestBoat]
189//!     - [AbstractMinecart]
190//!       - [ChestMinecart]
191//!       - [CommandBlockMinecart]
192//!       - [FurnaceMinecart]
193//!       - [HopperMinecart]
194//!       - [Minecart]
195//!       - [SpawnerMinecart]
196//!       - [TntMinecart]
197
198#![allow(clippy::single_match, non_snake_case)]
199
200use azalea_chat::FormattedText;
201use azalea_core::{
202    direction::Direction,
203    position::{BlockPos, Vec3f32},
204};
205use azalea_inventory::{ItemStack, components};
206use azalea_registry::{DataRegistry, builtin::EntityKind};
207use bevy_ecs::{bundle::Bundle, component::Component};
208use derive_more::{Deref, DerefMut};
209use thiserror::Error;
210use uuid::Uuid;
211
212use super::{
213    ArmadilloStateKind, CopperGolemStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt,
214    Pose, Quaternion, Rotations, SnifferStateKind, VillagerData, WeatheringCopperStateKind,
215};
216use crate::{HumanoidArm, particle::Particle};
217
218#[derive(Error, Debug)]
219pub enum UpdateMetadataError {
220    #[error("Wrong type ({0:?})")]
221    WrongType(EntityDataValue),
222}
223impl From<EntityDataValue> for UpdateMetadataError {
224    fn from(value: EntityDataValue) -> Self {
225        Self::WrongType(value)
226    }
227}
228
229#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
230/// A metadata field for [AbstractEntity].
231pub struct OnFire(pub bool);
232#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
233/// A metadata field for [AbstractEntity].
234pub struct AbstractEntityShiftKeyDown(pub bool);
235#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
236/// A metadata field for [AbstractEntity].
237pub struct Sprinting(pub bool);
238#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
239/// A metadata field for [AbstractEntity].
240pub struct Swimming(pub bool);
241#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
242/// A metadata field for [AbstractEntity].
243pub struct CurrentlyGlowing(pub bool);
244#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
245/// A metadata field for [AbstractEntity].
246pub struct Invisible(pub bool);
247#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
248/// A metadata field for [AbstractEntity].
249pub struct FallFlying(pub bool);
250/// A metadata field for [AbstractEntity].
251#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
252pub struct AirSupply(pub i32);
253/// A metadata field for [AbstractEntity].
254#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
255pub struct CustomName(pub Option<Box<FormattedText>>);
256/// A metadata field for [AbstractEntity].
257#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
258pub struct CustomNameVisible(pub bool);
259/// A metadata field for [AbstractEntity].
260#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
261pub struct Silent(pub bool);
262/// A metadata field for [AbstractEntity].
263#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
264pub struct NoGravity(pub bool);
265/// A metadata field for [AbstractEntity].
266#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
267pub struct TicksFrozen(pub i32);
268/// The root entity marker component.
269///
270/// All entities that have had their metadata sent by the server will have this
271/// component.
272///
273/// # Metadata
274///
275/// These are the metadata components that all `AbstractEntity` entities are
276/// guaranteed to have, in addition to the metadata components from parent
277/// types:
278///
279/// - [OnFire]
280/// - [AbstractEntityShiftKeyDown]
281/// - [Sprinting]
282/// - [Swimming]
283/// - [CurrentlyGlowing]
284/// - [Invisible]
285/// - [FallFlying]
286/// - [AirSupply]
287/// - [CustomName]
288/// - [CustomNameVisible]
289/// - [Silent]
290/// - [NoGravity]
291/// - [TicksFrozen]
292///
293/// # Children
294///
295/// - [AreaEffectCloud]
296/// - [BreezeWindCharge]
297/// - [DragonFireball]
298/// - [EndCrystal]
299/// - [EvokerFangs]
300/// - [ExperienceOrb]
301/// - [EyeOfEnder]
302/// - [FallingBlock]
303/// - [Fireball]
304/// - [FireworkRocket]
305/// - [FishingBobber]
306/// - [Interaction]
307/// - [Item]
308/// - [ItemFrame]
309///   - [GlowItemFrame]
310/// - [LeashKnot]
311/// - [LightningBolt]
312/// - [LlamaSpit]
313/// - [Marker]
314/// - [OminousItemSpawner]
315/// - [Painting]
316/// - [ShulkerBullet]
317/// - [SmallFireball]
318/// - [Tnt]
319/// - [WindCharge]
320/// - [WitherSkull]
321/// - [AbstractArrow]
322///   - [Arrow]
323///   - [SpectralArrow]
324///   - [Trident]
325/// - [AbstractDisplay]
326///   - [BlockDisplay]
327///   - [ItemDisplay]
328///   - [TextDisplay]
329/// - [AbstractLiving]
330///   - [ArmorStand]
331///   - [AbstractAvatar]
332///     - [Mannequin]
333///     - [Player]
334///   - [AbstractInsentient]
335///     - [Bat]
336///     - [EnderDragon]
337///     - [Ghast]
338///     - [Phantom]
339///     - [AbstractCreature]
340///       - [Allay]
341///       - [CopperGolem]
342///       - [IronGolem]
343///       - [Pufferfish]
344///       - [Shulker]
345///       - [SnowGolem]
346///       - [Tadpole]
347///       - [AbstractAgeable]
348///         - [Dolphin]
349///         - [MagmaCube]
350///         - [Slime]
351///         - [Squid]
352///           - [GlowSquid]
353///         - [SulfurCube]
354///         - [AbstractAnimal]
355///           - [Armadillo]
356///           - [Axolotl]
357///           - [Bee]
358///           - [Chicken]
359///           - [Cow]
360///           - [Fox]
361///           - [Frog]
362///           - [Goat]
363///           - [HappyGhast]
364///           - [Hoglin]
365///           - [Mooshroom]
366///           - [Ocelot]
367///           - [Panda]
368///           - [Pig]
369///           - [PolarBear]
370///           - [Rabbit]
371///           - [Sheep]
372///           - [Sniffer]
373///           - [Strider]
374///           - [Turtle]
375///           - [AbstractHorse]
376///             - [Camel]
377///               - [CamelHusk]
378///             - [Horse]
379///             - [SkeletonHorse]
380///             - [ZombieHorse]
381///             - [AbstractChestedHorse]
382///               - [Donkey]
383///               - [Llama]
384///                 - [TraderLlama]
385///               - [Mule]
386///           - [AbstractTameable]
387///             - [Cat]
388///             - [Parrot]
389///             - [Wolf]
390///             - [AbstractNautilus]
391///               - [Nautilus]
392///               - [ZombieNautilus]
393///         - [AbstractVillager]
394///           - [Villager]
395///           - [WanderingTrader]
396///       - [AbstractFish]
397///         - [Cod]
398///         - [Salmon]
399///         - [TropicalFish]
400///       - [AbstractMonster]
401///         - [Blaze]
402///         - [Bogged]
403///         - [Breeze]
404///         - [Creaking]
405///         - [Creeper]
406///         - [Enderman]
407///         - [Endermite]
408///         - [Giant]
409///         - [Guardian]
410///           - [ElderGuardian]
411///         - [Parched]
412///         - [Silverfish]
413///         - [Skeleton]
414///         - [Spider]
415///           - [CaveSpider]
416///         - [Stray]
417///         - [Vex]
418///         - [Warden]
419///         - [Wither]
420///         - [WitherSkeleton]
421///         - [Zoglin]
422///         - [Zombie]
423///           - [Drowned]
424///           - [Husk]
425///           - [ZombieVillager]
426///           - [ZombifiedPiglin]
427///         - [AbstractPiglin]
428///           - [Piglin]
429///           - [PiglinBrute]
430///         - [AbstractRaider]
431///           - [Pillager]
432///           - [Ravager]
433///           - [Vindicator]
434///           - [Witch]
435///           - [AbstractSpellcasterIllager]
436///             - [Evoker]
437///             - [Illusioner]
438/// - [AbstractThrownItemProjectile]
439///   - [Egg]
440///   - [EnderPearl]
441///   - [ExperienceBottle]
442///   - [LingeringPotion]
443///   - [Snowball]
444///   - [SplashPotion]
445/// - [AbstractVehicle]
446///   - [AbstractBoat]
447///     - [AcaciaBoat]
448///     - [AcaciaChestBoat]
449///     - [BambooChestRaft]
450///     - [BambooRaft]
451///     - [BirchBoat]
452///     - [BirchChestBoat]
453///     - [CherryBoat]
454///     - [CherryChestBoat]
455///     - [DarkOakBoat]
456///     - [DarkOakChestBoat]
457///     - [JungleBoat]
458///     - [JungleChestBoat]
459///     - [MangroveBoat]
460///     - [MangroveChestBoat]
461///     - [OakBoat]
462///     - [OakChestBoat]
463///     - [PaleOakBoat]
464///     - [PaleOakChestBoat]
465///     - [SpruceBoat]
466///     - [SpruceChestBoat]
467///   - [AbstractMinecart]
468///     - [ChestMinecart]
469///     - [CommandBlockMinecart]
470///     - [FurnaceMinecart]
471///     - [HopperMinecart]
472///     - [Minecart]
473///     - [SpawnerMinecart]
474///     - [TntMinecart]
475#[derive(Component)]
476pub struct AbstractEntity;
477impl AbstractEntity {
478    fn apply_metadata(
479        entity: &mut bevy_ecs::system::EntityCommands,
480        d: EntityDataItem,
481    ) -> Result<(), UpdateMetadataError> {
482        match d.index {
483            0 => {
484                let bitfield = d.value.into_byte()?;
485                entity.insert(OnFire(bitfield & 0x1 != 0));
486                entity.insert(AbstractEntityShiftKeyDown(bitfield & 0x2 != 0));
487                entity.insert(Sprinting(bitfield & 0x8 != 0));
488                entity.insert(Swimming(bitfield & 0x10 != 0));
489                entity.insert(CurrentlyGlowing(bitfield & 0x40 != 0));
490                entity.insert(Invisible(bitfield & 0x20 != 0));
491                entity.insert(FallFlying(bitfield & 0x80 != 0));
492            }
493            1 => {
494                entity.insert(AirSupply(d.value.into_int()?));
495            }
496            2 => {
497                entity.insert(CustomName(d.value.into_optional_formatted_text()?));
498            }
499            3 => {
500                entity.insert(CustomNameVisible(d.value.into_boolean()?));
501            }
502            4 => {
503                entity.insert(Silent(d.value.into_boolean()?));
504            }
505            5 => {
506                entity.insert(NoGravity(d.value.into_boolean()?));
507            }
508            6 => {
509                entity.insert(d.value.into_pose()?);
510            }
511            7 => {
512                entity.insert(TicksFrozen(d.value.into_int()?));
513            }
514            _ => {}
515        }
516        Ok(())
517    }
518}
519
520/// The metadata bundle for [AbstractEntity].
521///
522/// This type should generally not be used directly.
523#[derive(Bundle)]
524pub struct AbstractEntityMetadataBundle {
525    _marker: AbstractEntity,
526    on_fire: OnFire,
527    abstract_entity_shift_key_down: AbstractEntityShiftKeyDown,
528    sprinting: Sprinting,
529    swimming: Swimming,
530    currently_glowing: CurrentlyGlowing,
531    invisible: Invisible,
532    fall_flying: FallFlying,
533    air_supply: AirSupply,
534    custom_name: CustomName,
535    custom_name_visible: CustomNameVisible,
536    silent: Silent,
537    no_gravity: NoGravity,
538    pose: Pose,
539    ticks_frozen: TicksFrozen,
540}
541impl Default for AbstractEntityMetadataBundle {
542    fn default() -> Self {
543        Self {
544            _marker: AbstractEntity,
545            on_fire: OnFire(false),
546            abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
547            sprinting: Sprinting(false),
548            swimming: Swimming(false),
549            currently_glowing: CurrentlyGlowing(false),
550            invisible: Invisible(false),
551            fall_flying: FallFlying(false),
552            air_supply: AirSupply(300),
553            custom_name: CustomName(None),
554            custom_name_visible: CustomNameVisible(false),
555            silent: Silent(false),
556            no_gravity: NoGravity(false),
557            pose: Pose::default(),
558            ticks_frozen: TicksFrozen(0),
559        }
560    }
561}
562
563/// A metadata field for [AreaEffectCloud].
564#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
565pub struct Radius(pub f32);
566/// A metadata field for [AreaEffectCloud].
567#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
568pub struct Waiting(pub bool);
569/// The marker component for entities of type `minecraft:area_effect_cloud`.
570///
571/// # Metadata
572///
573/// These are the metadata components that all `AreaEffectCloud` entities are
574/// guaranteed to have, in addition to the metadata components from parent
575/// types:
576///
577/// - [Radius]
578/// - [Waiting]
579///
580/// # Parents
581///
582/// Entities with `AreaEffectCloud` will also have the following marker
583/// components and their metadata fields:
584///
585/// - [AbstractEntity]
586///
587/// # Children
588///
589/// This entity type has no children types.
590#[derive(Component)]
591pub struct AreaEffectCloud;
592impl AreaEffectCloud {
593    fn apply_metadata(
594        entity: &mut bevy_ecs::system::EntityCommands,
595        d: EntityDataItem,
596    ) -> Result<(), UpdateMetadataError> {
597        match d.index {
598            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
599            8 => {
600                entity.insert(Radius(d.value.into_float()?));
601            }
602            9 => {
603                entity.insert(Waiting(d.value.into_boolean()?));
604            }
605            10 => {
606                entity.insert(d.value.into_particle()?);
607            }
608            _ => {}
609        }
610        Ok(())
611    }
612}
613
614/// The metadata bundle for [AreaEffectCloud].
615///
616/// This type should generally not be used directly.
617#[derive(Bundle)]
618pub struct AreaEffectCloudMetadataBundle {
619    _marker: AreaEffectCloud,
620    parent: AbstractEntityMetadataBundle,
621    radius: Radius,
622    waiting: Waiting,
623    particle: Particle,
624}
625impl Default for AreaEffectCloudMetadataBundle {
626    fn default() -> Self {
627        Self {
628            _marker: AreaEffectCloud,
629            parent: Default::default(),
630            radius: Radius(3.0),
631            waiting: Waiting(false),
632            particle: Particle::default(),
633        }
634    }
635}
636
637/// The marker component for entities of type `minecraft:breeze_wind_charge`.
638///
639/// # Metadata
640///
641/// This entity type does not add any additional metadata. It will still have
642/// metadata from parent types.
643///
644/// # Parents
645///
646/// Entities with `BreezeWindCharge` will also have the following marker
647/// components and their metadata fields:
648///
649/// - [AbstractEntity]
650///
651/// # Children
652///
653/// This entity type has no children types.
654#[derive(Component)]
655pub struct BreezeWindCharge;
656impl BreezeWindCharge {
657    fn apply_metadata(
658        entity: &mut bevy_ecs::system::EntityCommands,
659        d: EntityDataItem,
660    ) -> Result<(), UpdateMetadataError> {
661        match d.index {
662            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
663            _ => {}
664        }
665        Ok(())
666    }
667}
668
669/// The metadata bundle for [BreezeWindCharge].
670///
671/// This type should generally not be used directly.
672#[derive(Bundle)]
673pub struct BreezeWindChargeMetadataBundle {
674    _marker: BreezeWindCharge,
675    parent: AbstractEntityMetadataBundle,
676}
677impl Default for BreezeWindChargeMetadataBundle {
678    fn default() -> Self {
679        Self {
680            _marker: BreezeWindCharge,
681            parent: Default::default(),
682        }
683    }
684}
685
686/// The marker component for entities of type `minecraft:dragon_fireball`.
687///
688/// # Metadata
689///
690/// This entity type does not add any additional metadata. It will still have
691/// metadata from parent types.
692///
693/// # Parents
694///
695/// Entities with `DragonFireball` will also have the following marker
696/// components and their metadata fields:
697///
698/// - [AbstractEntity]
699///
700/// # Children
701///
702/// This entity type has no children types.
703#[derive(Component)]
704pub struct DragonFireball;
705impl DragonFireball {
706    fn apply_metadata(
707        entity: &mut bevy_ecs::system::EntityCommands,
708        d: EntityDataItem,
709    ) -> Result<(), UpdateMetadataError> {
710        match d.index {
711            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
712            _ => {}
713        }
714        Ok(())
715    }
716}
717
718/// The metadata bundle for [DragonFireball].
719///
720/// This type should generally not be used directly.
721#[derive(Bundle)]
722pub struct DragonFireballMetadataBundle {
723    _marker: DragonFireball,
724    parent: AbstractEntityMetadataBundle,
725}
726impl Default for DragonFireballMetadataBundle {
727    fn default() -> Self {
728        Self {
729            _marker: DragonFireball,
730            parent: Default::default(),
731        }
732    }
733}
734
735/// A metadata field for [EndCrystal].
736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
737pub struct BeamTarget(pub Option<BlockPos>);
738/// A metadata field for [EndCrystal].
739#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
740pub struct ShowBottom(pub bool);
741/// The marker component for entities of type `minecraft:end_crystal`.
742///
743/// # Metadata
744///
745/// These are the metadata components that all `EndCrystal` entities are
746/// guaranteed to have, in addition to the metadata components from parent
747/// types:
748///
749/// - [BeamTarget]
750/// - [ShowBottom]
751///
752/// # Parents
753///
754/// Entities with `EndCrystal` will also have the following marker components
755/// and their metadata fields:
756///
757/// - [AbstractEntity]
758///
759/// # Children
760///
761/// This entity type has no children types.
762#[derive(Component)]
763pub struct EndCrystal;
764impl EndCrystal {
765    fn apply_metadata(
766        entity: &mut bevy_ecs::system::EntityCommands,
767        d: EntityDataItem,
768    ) -> Result<(), UpdateMetadataError> {
769        match d.index {
770            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
771            8 => {
772                entity.insert(BeamTarget(d.value.into_optional_block_pos()?));
773            }
774            9 => {
775                entity.insert(ShowBottom(d.value.into_boolean()?));
776            }
777            _ => {}
778        }
779        Ok(())
780    }
781}
782
783/// The metadata bundle for [EndCrystal].
784///
785/// This type should generally not be used directly.
786#[derive(Bundle)]
787pub struct EndCrystalMetadataBundle {
788    _marker: EndCrystal,
789    parent: AbstractEntityMetadataBundle,
790    beam_target: BeamTarget,
791    show_bottom: ShowBottom,
792}
793impl Default for EndCrystalMetadataBundle {
794    fn default() -> Self {
795        Self {
796            _marker: EndCrystal,
797            parent: Default::default(),
798            beam_target: BeamTarget(None),
799            show_bottom: ShowBottom(true),
800        }
801    }
802}
803
804/// The marker component for entities of type `minecraft:evoker_fangs`.
805///
806/// # Metadata
807///
808/// This entity type does not add any additional metadata. It will still have
809/// metadata from parent types.
810///
811/// # Parents
812///
813/// Entities with `EvokerFangs` will also have the following marker components
814/// and their metadata fields:
815///
816/// - [AbstractEntity]
817///
818/// # Children
819///
820/// This entity type has no children types.
821#[derive(Component)]
822pub struct EvokerFangs;
823impl EvokerFangs {
824    fn apply_metadata(
825        entity: &mut bevy_ecs::system::EntityCommands,
826        d: EntityDataItem,
827    ) -> Result<(), UpdateMetadataError> {
828        match d.index {
829            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
830            _ => {}
831        }
832        Ok(())
833    }
834}
835
836/// The metadata bundle for [EvokerFangs].
837///
838/// This type should generally not be used directly.
839#[derive(Bundle)]
840pub struct EvokerFangsMetadataBundle {
841    _marker: EvokerFangs,
842    parent: AbstractEntityMetadataBundle,
843}
844impl Default for EvokerFangsMetadataBundle {
845    fn default() -> Self {
846        Self {
847            _marker: EvokerFangs,
848            parent: Default::default(),
849        }
850    }
851}
852
853/// A metadata field for [ExperienceOrb].
854#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
855pub struct Value(pub i32);
856/// The marker component for entities of type `minecraft:experience_orb`.
857///
858/// # Metadata
859///
860/// These are the metadata components that all `ExperienceOrb` entities are
861/// guaranteed to have, in addition to the metadata components from parent
862/// types:
863///
864/// - [Value]
865///
866/// # Parents
867///
868/// Entities with `ExperienceOrb` will also have the following marker components
869/// and their metadata fields:
870///
871/// - [AbstractEntity]
872///
873/// # Children
874///
875/// This entity type has no children types.
876#[derive(Component)]
877pub struct ExperienceOrb;
878impl ExperienceOrb {
879    fn apply_metadata(
880        entity: &mut bevy_ecs::system::EntityCommands,
881        d: EntityDataItem,
882    ) -> Result<(), UpdateMetadataError> {
883        match d.index {
884            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
885            8 => {
886                entity.insert(Value(d.value.into_int()?));
887            }
888            _ => {}
889        }
890        Ok(())
891    }
892}
893
894/// The metadata bundle for [ExperienceOrb].
895///
896/// This type should generally not be used directly.
897#[derive(Bundle)]
898pub struct ExperienceOrbMetadataBundle {
899    _marker: ExperienceOrb,
900    parent: AbstractEntityMetadataBundle,
901    value: Value,
902}
903impl Default for ExperienceOrbMetadataBundle {
904    fn default() -> Self {
905        Self {
906            _marker: ExperienceOrb,
907            parent: Default::default(),
908            value: Value(0),
909        }
910    }
911}
912
913/// A metadata field for [EyeOfEnder].
914#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
915pub struct EyeOfEnderItemStack(pub ItemStack);
916/// The marker component for entities of type `minecraft:eye_of_ender`.
917///
918/// # Metadata
919///
920/// These are the metadata components that all `EyeOfEnder` entities are
921/// guaranteed to have, in addition to the metadata components from parent
922/// types:
923///
924/// - [EyeOfEnderItemStack]
925///
926/// # Parents
927///
928/// Entities with `EyeOfEnder` will also have the following marker components
929/// and their metadata fields:
930///
931/// - [AbstractEntity]
932///
933/// # Children
934///
935/// This entity type has no children types.
936#[derive(Component)]
937pub struct EyeOfEnder;
938impl EyeOfEnder {
939    fn apply_metadata(
940        entity: &mut bevy_ecs::system::EntityCommands,
941        d: EntityDataItem,
942    ) -> Result<(), UpdateMetadataError> {
943        match d.index {
944            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
945            8 => {
946                entity.insert(EyeOfEnderItemStack(d.value.into_item_stack()?));
947            }
948            _ => {}
949        }
950        Ok(())
951    }
952}
953
954/// The metadata bundle for [EyeOfEnder].
955///
956/// This type should generally not be used directly.
957#[derive(Bundle)]
958pub struct EyeOfEnderMetadataBundle {
959    _marker: EyeOfEnder,
960    parent: AbstractEntityMetadataBundle,
961    eye_of_ender_item_stack: EyeOfEnderItemStack,
962}
963impl Default for EyeOfEnderMetadataBundle {
964    fn default() -> Self {
965        Self {
966            _marker: EyeOfEnder,
967            parent: Default::default(),
968            eye_of_ender_item_stack: EyeOfEnderItemStack(Default::default()),
969        }
970    }
971}
972
973/// A metadata field for [FallingBlock].
974#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
975pub struct StartPos(pub BlockPos);
976/// The marker component for entities of type `minecraft:falling_block`.
977///
978/// # Metadata
979///
980/// These are the metadata components that all `FallingBlock` entities are
981/// guaranteed to have, in addition to the metadata components from parent
982/// types:
983///
984/// - [StartPos]
985///
986/// # Parents
987///
988/// Entities with `FallingBlock` will also have the following marker components
989/// and their metadata fields:
990///
991/// - [AbstractEntity]
992///
993/// # Children
994///
995/// This entity type has no children types.
996#[derive(Component)]
997pub struct FallingBlock;
998impl FallingBlock {
999    fn apply_metadata(
1000        entity: &mut bevy_ecs::system::EntityCommands,
1001        d: EntityDataItem,
1002    ) -> Result<(), UpdateMetadataError> {
1003        match d.index {
1004            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1005            8 => {
1006                entity.insert(StartPos(d.value.into_block_pos()?));
1007            }
1008            _ => {}
1009        }
1010        Ok(())
1011    }
1012}
1013
1014/// The metadata bundle for [FallingBlock].
1015///
1016/// This type should generally not be used directly.
1017#[derive(Bundle)]
1018pub struct FallingBlockMetadataBundle {
1019    _marker: FallingBlock,
1020    parent: AbstractEntityMetadataBundle,
1021    start_pos: StartPos,
1022}
1023impl Default for FallingBlockMetadataBundle {
1024    fn default() -> Self {
1025        Self {
1026            _marker: FallingBlock,
1027            parent: Default::default(),
1028            start_pos: StartPos(BlockPos::new(0, 0, 0)),
1029        }
1030    }
1031}
1032
1033/// A metadata field for [Fireball].
1034#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1035pub struct FireballItemStack(pub ItemStack);
1036/// The marker component for entities of type `minecraft:fireball`.
1037///
1038/// # Metadata
1039///
1040/// These are the metadata components that all `Fireball` entities are
1041/// guaranteed to have, in addition to the metadata components from parent
1042/// types:
1043///
1044/// - [FireballItemStack]
1045///
1046/// # Parents
1047///
1048/// Entities with `Fireball` will also have the following marker components and
1049/// their metadata fields:
1050///
1051/// - [AbstractEntity]
1052///
1053/// # Children
1054///
1055/// This entity type has no children types.
1056#[derive(Component)]
1057pub struct Fireball;
1058impl Fireball {
1059    fn apply_metadata(
1060        entity: &mut bevy_ecs::system::EntityCommands,
1061        d: EntityDataItem,
1062    ) -> Result<(), UpdateMetadataError> {
1063        match d.index {
1064            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1065            8 => {
1066                entity.insert(FireballItemStack(d.value.into_item_stack()?));
1067            }
1068            _ => {}
1069        }
1070        Ok(())
1071    }
1072}
1073
1074/// The metadata bundle for [Fireball].
1075///
1076/// This type should generally not be used directly.
1077#[derive(Bundle)]
1078pub struct FireballMetadataBundle {
1079    _marker: Fireball,
1080    parent: AbstractEntityMetadataBundle,
1081    fireball_item_stack: FireballItemStack,
1082}
1083impl Default for FireballMetadataBundle {
1084    fn default() -> Self {
1085        Self {
1086            _marker: Fireball,
1087            parent: Default::default(),
1088            fireball_item_stack: FireballItemStack(Default::default()),
1089        }
1090    }
1091}
1092
1093/// A metadata field for [FireworkRocket].
1094#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1095pub struct FireworksItem(pub ItemStack);
1096/// A metadata field for [FireworkRocket].
1097#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1098pub struct AttachedToTarget(pub OptionalUnsignedInt);
1099/// A metadata field for [FireworkRocket].
1100#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1101pub struct ShotAtAngle(pub bool);
1102/// The marker component for entities of type `minecraft:firework_rocket`.
1103///
1104/// # Metadata
1105///
1106/// These are the metadata components that all `FireworkRocket` entities are
1107/// guaranteed to have, in addition to the metadata components from parent
1108/// types:
1109///
1110/// - [FireworksItem]
1111/// - [AttachedToTarget]
1112/// - [ShotAtAngle]
1113///
1114/// # Parents
1115///
1116/// Entities with `FireworkRocket` will also have the following marker
1117/// components and their metadata fields:
1118///
1119/// - [AbstractEntity]
1120///
1121/// # Children
1122///
1123/// This entity type has no children types.
1124#[derive(Component)]
1125pub struct FireworkRocket;
1126impl FireworkRocket {
1127    fn apply_metadata(
1128        entity: &mut bevy_ecs::system::EntityCommands,
1129        d: EntityDataItem,
1130    ) -> Result<(), UpdateMetadataError> {
1131        match d.index {
1132            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1133            8 => {
1134                entity.insert(FireworksItem(d.value.into_item_stack()?));
1135            }
1136            9 => {
1137                entity.insert(AttachedToTarget(d.value.into_optional_unsigned_int()?));
1138            }
1139            10 => {
1140                entity.insert(ShotAtAngle(d.value.into_boolean()?));
1141            }
1142            _ => {}
1143        }
1144        Ok(())
1145    }
1146}
1147
1148/// The metadata bundle for [FireworkRocket].
1149///
1150/// This type should generally not be used directly.
1151#[derive(Bundle)]
1152pub struct FireworkRocketMetadataBundle {
1153    _marker: FireworkRocket,
1154    parent: AbstractEntityMetadataBundle,
1155    fireworks_item: FireworksItem,
1156    attached_to_target: AttachedToTarget,
1157    shot_at_angle: ShotAtAngle,
1158}
1159impl Default for FireworkRocketMetadataBundle {
1160    fn default() -> Self {
1161        Self {
1162            _marker: FireworkRocket,
1163            parent: Default::default(),
1164            fireworks_item: FireworksItem(Default::default()),
1165            attached_to_target: AttachedToTarget(OptionalUnsignedInt(None)),
1166            shot_at_angle: ShotAtAngle(false),
1167        }
1168    }
1169}
1170
1171/// A metadata field for [FishingBobber].
1172#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1173pub struct HookedEntity(pub i32);
1174/// A metadata field for [FishingBobber].
1175#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1176pub struct Biting(pub bool);
1177/// The marker component for entities of type `minecraft:fishing_bobber`.
1178///
1179/// # Metadata
1180///
1181/// These are the metadata components that all `FishingBobber` entities are
1182/// guaranteed to have, in addition to the metadata components from parent
1183/// types:
1184///
1185/// - [HookedEntity]
1186/// - [Biting]
1187///
1188/// # Parents
1189///
1190/// Entities with `FishingBobber` will also have the following marker components
1191/// and their metadata fields:
1192///
1193/// - [AbstractEntity]
1194///
1195/// # Children
1196///
1197/// This entity type has no children types.
1198#[derive(Component)]
1199pub struct FishingBobber;
1200impl FishingBobber {
1201    fn apply_metadata(
1202        entity: &mut bevy_ecs::system::EntityCommands,
1203        d: EntityDataItem,
1204    ) -> Result<(), UpdateMetadataError> {
1205        match d.index {
1206            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1207            8 => {
1208                entity.insert(HookedEntity(d.value.into_int()?));
1209            }
1210            9 => {
1211                entity.insert(Biting(d.value.into_boolean()?));
1212            }
1213            _ => {}
1214        }
1215        Ok(())
1216    }
1217}
1218
1219/// The metadata bundle for [FishingBobber].
1220///
1221/// This type should generally not be used directly.
1222#[derive(Bundle)]
1223pub struct FishingBobberMetadataBundle {
1224    _marker: FishingBobber,
1225    parent: AbstractEntityMetadataBundle,
1226    hooked_entity: HookedEntity,
1227    biting: Biting,
1228}
1229impl Default for FishingBobberMetadataBundle {
1230    fn default() -> Self {
1231        Self {
1232            _marker: FishingBobber,
1233            parent: Default::default(),
1234            hooked_entity: HookedEntity(0),
1235            biting: Biting(false),
1236        }
1237    }
1238}
1239
1240/// A metadata field for [Interaction].
1241#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1242pub struct InteractionWidth(pub f32);
1243/// A metadata field for [Interaction].
1244#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1245pub struct InteractionHeight(pub f32);
1246/// A metadata field for [Interaction].
1247#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1248pub struct Response(pub bool);
1249/// The marker component for entities of type `minecraft:interaction`.
1250///
1251/// # Metadata
1252///
1253/// These are the metadata components that all `Interaction` entities are
1254/// guaranteed to have, in addition to the metadata components from parent
1255/// types:
1256///
1257/// - [InteractionWidth]
1258/// - [InteractionHeight]
1259/// - [Response]
1260///
1261/// # Parents
1262///
1263/// Entities with `Interaction` will also have the following marker components
1264/// and their metadata fields:
1265///
1266/// - [AbstractEntity]
1267///
1268/// # Children
1269///
1270/// This entity type has no children types.
1271#[derive(Component)]
1272pub struct Interaction;
1273impl Interaction {
1274    fn apply_metadata(
1275        entity: &mut bevy_ecs::system::EntityCommands,
1276        d: EntityDataItem,
1277    ) -> Result<(), UpdateMetadataError> {
1278        match d.index {
1279            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1280            8 => {
1281                entity.insert(InteractionWidth(d.value.into_float()?));
1282            }
1283            9 => {
1284                entity.insert(InteractionHeight(d.value.into_float()?));
1285            }
1286            10 => {
1287                entity.insert(Response(d.value.into_boolean()?));
1288            }
1289            _ => {}
1290        }
1291        Ok(())
1292    }
1293}
1294
1295/// The metadata bundle for [Interaction].
1296///
1297/// This type should generally not be used directly.
1298#[derive(Bundle)]
1299pub struct InteractionMetadataBundle {
1300    _marker: Interaction,
1301    parent: AbstractEntityMetadataBundle,
1302    interaction_width: InteractionWidth,
1303    interaction_height: InteractionHeight,
1304    response: Response,
1305}
1306impl Default for InteractionMetadataBundle {
1307    fn default() -> Self {
1308        Self {
1309            _marker: Interaction,
1310            parent: Default::default(),
1311            interaction_width: InteractionWidth(1.0),
1312            interaction_height: InteractionHeight(1.0),
1313            response: Response(false),
1314        }
1315    }
1316}
1317
1318/// A metadata field for [Item].
1319#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1320pub struct ItemItem(pub ItemStack);
1321/// The marker component for entities of type `minecraft:item`.
1322///
1323/// # Metadata
1324///
1325/// These are the metadata components that all `Item` entities are guaranteed to
1326/// have, in addition to the metadata components from parent types:
1327///
1328/// - [ItemItem]
1329///
1330/// # Parents
1331///
1332/// Entities with `Item` will also have the following marker components and
1333/// their metadata fields:
1334///
1335/// - [AbstractEntity]
1336///
1337/// # Children
1338///
1339/// This entity type has no children types.
1340#[derive(Component)]
1341pub struct Item;
1342impl Item {
1343    fn apply_metadata(
1344        entity: &mut bevy_ecs::system::EntityCommands,
1345        d: EntityDataItem,
1346    ) -> Result<(), UpdateMetadataError> {
1347        match d.index {
1348            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1349            8 => {
1350                entity.insert(ItemItem(d.value.into_item_stack()?));
1351            }
1352            _ => {}
1353        }
1354        Ok(())
1355    }
1356}
1357
1358/// The metadata bundle for [Item].
1359///
1360/// This type should generally not be used directly.
1361#[derive(Bundle)]
1362pub struct ItemMetadataBundle {
1363    _marker: Item,
1364    parent: AbstractEntityMetadataBundle,
1365    item_item: ItemItem,
1366}
1367impl Default for ItemMetadataBundle {
1368    fn default() -> Self {
1369        Self {
1370            _marker: Item,
1371            parent: Default::default(),
1372            item_item: ItemItem(Default::default()),
1373        }
1374    }
1375}
1376
1377/// A metadata field for [ItemFrame].
1378#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1379pub struct ItemFrameDirection(pub Direction);
1380/// A metadata field for [ItemFrame].
1381#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1382pub struct ItemFrameItem(pub ItemStack);
1383/// A metadata field for [ItemFrame].
1384#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1385pub struct Rotation(pub i32);
1386/// The marker component for entities of type `minecraft:item_frame`.
1387///
1388/// # Metadata
1389///
1390/// These are the metadata components that all `ItemFrame` entities are
1391/// guaranteed to have, in addition to the metadata components from parent
1392/// types:
1393///
1394/// - [ItemFrameDirection]
1395/// - [ItemFrameItem]
1396/// - [Rotation]
1397///
1398/// # Parents
1399///
1400/// Entities with `ItemFrame` will also have the following marker components and
1401/// their metadata fields:
1402///
1403/// - [AbstractEntity]
1404///
1405/// # Children
1406///
1407/// - [GlowItemFrame]
1408#[derive(Component)]
1409pub struct ItemFrame;
1410impl ItemFrame {
1411    fn apply_metadata(
1412        entity: &mut bevy_ecs::system::EntityCommands,
1413        d: EntityDataItem,
1414    ) -> Result<(), UpdateMetadataError> {
1415        match d.index {
1416            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1417            8 => {
1418                entity.insert(ItemFrameDirection(d.value.into_direction()?));
1419            }
1420            9 => {
1421                entity.insert(ItemFrameItem(d.value.into_item_stack()?));
1422            }
1423            10 => {
1424                entity.insert(Rotation(d.value.into_int()?));
1425            }
1426            _ => {}
1427        }
1428        Ok(())
1429    }
1430}
1431
1432/// The metadata bundle for [ItemFrame].
1433///
1434/// This type should generally not be used directly.
1435#[derive(Bundle)]
1436pub struct ItemFrameMetadataBundle {
1437    _marker: ItemFrame,
1438    parent: AbstractEntityMetadataBundle,
1439    item_frame_direction: ItemFrameDirection,
1440    item_frame_item: ItemFrameItem,
1441    rotation: Rotation,
1442}
1443impl Default for ItemFrameMetadataBundle {
1444    fn default() -> Self {
1445        Self {
1446            _marker: ItemFrame,
1447            parent: Default::default(),
1448            item_frame_direction: ItemFrameDirection(Default::default()),
1449            item_frame_item: ItemFrameItem(Default::default()),
1450            rotation: Rotation(0),
1451        }
1452    }
1453}
1454
1455/// The marker component for entities of type `minecraft:glow_item_frame`.
1456///
1457/// # Metadata
1458///
1459/// This entity type does not add any additional metadata. It will still have
1460/// metadata from parent types.
1461///
1462/// # Parents
1463///
1464/// Entities with `GlowItemFrame` will also have the following marker components
1465/// and their metadata fields:
1466///
1467/// - [ItemFrame]
1468/// - [AbstractEntity]
1469///
1470/// # Children
1471///
1472/// This entity type has no children types.
1473#[derive(Component)]
1474pub struct GlowItemFrame;
1475impl GlowItemFrame {
1476    fn apply_metadata(
1477        entity: &mut bevy_ecs::system::EntityCommands,
1478        d: EntityDataItem,
1479    ) -> Result<(), UpdateMetadataError> {
1480        match d.index {
1481            0..=10 => ItemFrame::apply_metadata(entity, d)?,
1482            _ => {}
1483        }
1484        Ok(())
1485    }
1486}
1487
1488/// The metadata bundle for [GlowItemFrame].
1489///
1490/// This type should generally not be used directly.
1491#[derive(Bundle)]
1492pub struct GlowItemFrameMetadataBundle {
1493    _marker: GlowItemFrame,
1494    parent: ItemFrameMetadataBundle,
1495}
1496impl Default for GlowItemFrameMetadataBundle {
1497    fn default() -> Self {
1498        Self {
1499            _marker: GlowItemFrame,
1500            parent: Default::default(),
1501        }
1502    }
1503}
1504
1505/// The marker component for entities of type `minecraft:leash_knot`.
1506///
1507/// # Metadata
1508///
1509/// This entity type does not add any additional metadata. It will still have
1510/// metadata from parent types.
1511///
1512/// # Parents
1513///
1514/// Entities with `LeashKnot` will also have the following marker components and
1515/// their metadata fields:
1516///
1517/// - [AbstractEntity]
1518///
1519/// # Children
1520///
1521/// This entity type has no children types.
1522#[derive(Component)]
1523pub struct LeashKnot;
1524impl LeashKnot {
1525    fn apply_metadata(
1526        entity: &mut bevy_ecs::system::EntityCommands,
1527        d: EntityDataItem,
1528    ) -> Result<(), UpdateMetadataError> {
1529        match d.index {
1530            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1531            _ => {}
1532        }
1533        Ok(())
1534    }
1535}
1536
1537/// The metadata bundle for [LeashKnot].
1538///
1539/// This type should generally not be used directly.
1540#[derive(Bundle)]
1541pub struct LeashKnotMetadataBundle {
1542    _marker: LeashKnot,
1543    parent: AbstractEntityMetadataBundle,
1544}
1545impl Default for LeashKnotMetadataBundle {
1546    fn default() -> Self {
1547        Self {
1548            _marker: LeashKnot,
1549            parent: Default::default(),
1550        }
1551    }
1552}
1553
1554/// The marker component for entities of type `minecraft:lightning_bolt`.
1555///
1556/// # Metadata
1557///
1558/// This entity type does not add any additional metadata. It will still have
1559/// metadata from parent types.
1560///
1561/// # Parents
1562///
1563/// Entities with `LightningBolt` will also have the following marker components
1564/// and their metadata fields:
1565///
1566/// - [AbstractEntity]
1567///
1568/// # Children
1569///
1570/// This entity type has no children types.
1571#[derive(Component)]
1572pub struct LightningBolt;
1573impl LightningBolt {
1574    fn apply_metadata(
1575        entity: &mut bevy_ecs::system::EntityCommands,
1576        d: EntityDataItem,
1577    ) -> Result<(), UpdateMetadataError> {
1578        match d.index {
1579            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1580            _ => {}
1581        }
1582        Ok(())
1583    }
1584}
1585
1586/// The metadata bundle for [LightningBolt].
1587///
1588/// This type should generally not be used directly.
1589#[derive(Bundle)]
1590pub struct LightningBoltMetadataBundle {
1591    _marker: LightningBolt,
1592    parent: AbstractEntityMetadataBundle,
1593}
1594impl Default for LightningBoltMetadataBundle {
1595    fn default() -> Self {
1596        Self {
1597            _marker: LightningBolt,
1598            parent: Default::default(),
1599        }
1600    }
1601}
1602
1603/// The marker component for entities of type `minecraft:llama_spit`.
1604///
1605/// # Metadata
1606///
1607/// This entity type does not add any additional metadata. It will still have
1608/// metadata from parent types.
1609///
1610/// # Parents
1611///
1612/// Entities with `LlamaSpit` will also have the following marker components and
1613/// their metadata fields:
1614///
1615/// - [AbstractEntity]
1616///
1617/// # Children
1618///
1619/// This entity type has no children types.
1620#[derive(Component)]
1621pub struct LlamaSpit;
1622impl LlamaSpit {
1623    fn apply_metadata(
1624        entity: &mut bevy_ecs::system::EntityCommands,
1625        d: EntityDataItem,
1626    ) -> Result<(), UpdateMetadataError> {
1627        match d.index {
1628            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1629            _ => {}
1630        }
1631        Ok(())
1632    }
1633}
1634
1635/// The metadata bundle for [LlamaSpit].
1636///
1637/// This type should generally not be used directly.
1638#[derive(Bundle)]
1639pub struct LlamaSpitMetadataBundle {
1640    _marker: LlamaSpit,
1641    parent: AbstractEntityMetadataBundle,
1642}
1643impl Default for LlamaSpitMetadataBundle {
1644    fn default() -> Self {
1645        Self {
1646            _marker: LlamaSpit,
1647            parent: Default::default(),
1648        }
1649    }
1650}
1651
1652/// The marker component for entities of type `minecraft:marker`.
1653///
1654/// # Metadata
1655///
1656/// This entity type does not add any additional metadata. It will still have
1657/// metadata from parent types.
1658///
1659/// # Parents
1660///
1661/// Entities with `Marker` will also have the following marker components and
1662/// their metadata fields:
1663///
1664/// - [AbstractEntity]
1665///
1666/// # Children
1667///
1668/// This entity type has no children types.
1669#[derive(Component)]
1670pub struct Marker;
1671impl Marker {
1672    fn apply_metadata(
1673        entity: &mut bevy_ecs::system::EntityCommands,
1674        d: EntityDataItem,
1675    ) -> Result<(), UpdateMetadataError> {
1676        match d.index {
1677            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1678            _ => {}
1679        }
1680        Ok(())
1681    }
1682}
1683
1684/// The metadata bundle for [Marker].
1685///
1686/// This type should generally not be used directly.
1687#[derive(Bundle)]
1688pub struct MarkerMetadataBundle {
1689    _marker: Marker,
1690    parent: AbstractEntityMetadataBundle,
1691}
1692impl Default for MarkerMetadataBundle {
1693    fn default() -> Self {
1694        Self {
1695            _marker: Marker,
1696            parent: Default::default(),
1697        }
1698    }
1699}
1700
1701/// A metadata field for [OminousItemSpawner].
1702#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1703pub struct OminousItemSpawnerItem(pub ItemStack);
1704/// The marker component for entities of type `minecraft:ominous_item_spawner`.
1705///
1706/// # Metadata
1707///
1708/// These are the metadata components that all `OminousItemSpawner` entities are
1709/// guaranteed to have, in addition to the metadata components from parent
1710/// types:
1711///
1712/// - [OminousItemSpawnerItem]
1713///
1714/// # Parents
1715///
1716/// Entities with `OminousItemSpawner` will also have the following marker
1717/// components and their metadata fields:
1718///
1719/// - [AbstractEntity]
1720///
1721/// # Children
1722///
1723/// This entity type has no children types.
1724#[derive(Component)]
1725pub struct OminousItemSpawner;
1726impl OminousItemSpawner {
1727    fn apply_metadata(
1728        entity: &mut bevy_ecs::system::EntityCommands,
1729        d: EntityDataItem,
1730    ) -> Result<(), UpdateMetadataError> {
1731        match d.index {
1732            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1733            8 => {
1734                entity.insert(OminousItemSpawnerItem(d.value.into_item_stack()?));
1735            }
1736            _ => {}
1737        }
1738        Ok(())
1739    }
1740}
1741
1742/// The metadata bundle for [OminousItemSpawner].
1743///
1744/// This type should generally not be used directly.
1745#[derive(Bundle)]
1746pub struct OminousItemSpawnerMetadataBundle {
1747    _marker: OminousItemSpawner,
1748    parent: AbstractEntityMetadataBundle,
1749    ominous_item_spawner_item: OminousItemSpawnerItem,
1750}
1751impl Default for OminousItemSpawnerMetadataBundle {
1752    fn default() -> Self {
1753        Self {
1754            _marker: OminousItemSpawner,
1755            parent: Default::default(),
1756            ominous_item_spawner_item: OminousItemSpawnerItem(Default::default()),
1757        }
1758    }
1759}
1760
1761/// A metadata field for [Painting].
1762#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1763pub struct PaintingDirection(pub Direction);
1764/// A metadata field for [Painting].
1765#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1766pub struct PaintingVariant(pub azalea_registry::data::PaintingVariant);
1767/// The marker component for entities of type `minecraft:painting`.
1768///
1769/// # Metadata
1770///
1771/// These are the metadata components that all `Painting` entities are
1772/// guaranteed to have, in addition to the metadata components from parent
1773/// types:
1774///
1775/// - [PaintingDirection]
1776/// - [PaintingVariant]
1777///
1778/// # Parents
1779///
1780/// Entities with `Painting` will also have the following marker components and
1781/// their metadata fields:
1782///
1783/// - [AbstractEntity]
1784///
1785/// # Children
1786///
1787/// This entity type has no children types.
1788#[derive(Component)]
1789pub struct Painting;
1790impl Painting {
1791    fn apply_metadata(
1792        entity: &mut bevy_ecs::system::EntityCommands,
1793        d: EntityDataItem,
1794    ) -> Result<(), UpdateMetadataError> {
1795        match d.index {
1796            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1797            8 => {
1798                entity.insert(PaintingDirection(d.value.into_direction()?));
1799            }
1800            9 => {
1801                entity.insert(PaintingVariant(d.value.into_painting_variant()?));
1802            }
1803            _ => {}
1804        }
1805        Ok(())
1806    }
1807}
1808
1809/// The metadata bundle for [Painting].
1810///
1811/// This type should generally not be used directly.
1812#[derive(Bundle)]
1813pub struct PaintingMetadataBundle {
1814    _marker: Painting,
1815    parent: AbstractEntityMetadataBundle,
1816    painting_direction: PaintingDirection,
1817    painting_variant: PaintingVariant,
1818}
1819impl Default for PaintingMetadataBundle {
1820    fn default() -> Self {
1821        Self {
1822            _marker: Painting,
1823            parent: Default::default(),
1824            painting_direction: PaintingDirection(Default::default()),
1825            painting_variant: PaintingVariant(azalea_registry::data::PaintingVariant::new_raw(0)),
1826        }
1827    }
1828}
1829
1830/// The marker component for entities of type `minecraft:shulker_bullet`.
1831///
1832/// # Metadata
1833///
1834/// This entity type does not add any additional metadata. It will still have
1835/// metadata from parent types.
1836///
1837/// # Parents
1838///
1839/// Entities with `ShulkerBullet` will also have the following marker components
1840/// and their metadata fields:
1841///
1842/// - [AbstractEntity]
1843///
1844/// # Children
1845///
1846/// This entity type has no children types.
1847#[derive(Component)]
1848pub struct ShulkerBullet;
1849impl ShulkerBullet {
1850    fn apply_metadata(
1851        entity: &mut bevy_ecs::system::EntityCommands,
1852        d: EntityDataItem,
1853    ) -> Result<(), UpdateMetadataError> {
1854        match d.index {
1855            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1856            _ => {}
1857        }
1858        Ok(())
1859    }
1860}
1861
1862/// The metadata bundle for [ShulkerBullet].
1863///
1864/// This type should generally not be used directly.
1865#[derive(Bundle)]
1866pub struct ShulkerBulletMetadataBundle {
1867    _marker: ShulkerBullet,
1868    parent: AbstractEntityMetadataBundle,
1869}
1870impl Default for ShulkerBulletMetadataBundle {
1871    fn default() -> Self {
1872        Self {
1873            _marker: ShulkerBullet,
1874            parent: Default::default(),
1875        }
1876    }
1877}
1878
1879/// A metadata field for [SmallFireball].
1880#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1881pub struct SmallFireballItemStack(pub ItemStack);
1882/// The marker component for entities of type `minecraft:small_fireball`.
1883///
1884/// # Metadata
1885///
1886/// These are the metadata components that all `SmallFireball` entities are
1887/// guaranteed to have, in addition to the metadata components from parent
1888/// types:
1889///
1890/// - [SmallFireballItemStack]
1891///
1892/// # Parents
1893///
1894/// Entities with `SmallFireball` will also have the following marker components
1895/// and their metadata fields:
1896///
1897/// - [AbstractEntity]
1898///
1899/// # Children
1900///
1901/// This entity type has no children types.
1902#[derive(Component)]
1903pub struct SmallFireball;
1904impl SmallFireball {
1905    fn apply_metadata(
1906        entity: &mut bevy_ecs::system::EntityCommands,
1907        d: EntityDataItem,
1908    ) -> Result<(), UpdateMetadataError> {
1909        match d.index {
1910            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1911            8 => {
1912                entity.insert(SmallFireballItemStack(d.value.into_item_stack()?));
1913            }
1914            _ => {}
1915        }
1916        Ok(())
1917    }
1918}
1919
1920/// The metadata bundle for [SmallFireball].
1921///
1922/// This type should generally not be used directly.
1923#[derive(Bundle)]
1924pub struct SmallFireballMetadataBundle {
1925    _marker: SmallFireball,
1926    parent: AbstractEntityMetadataBundle,
1927    small_fireball_item_stack: SmallFireballItemStack,
1928}
1929impl Default for SmallFireballMetadataBundle {
1930    fn default() -> Self {
1931        Self {
1932            _marker: SmallFireball,
1933            parent: Default::default(),
1934            small_fireball_item_stack: SmallFireballItemStack(Default::default()),
1935        }
1936    }
1937}
1938
1939/// A metadata field for [Tnt].
1940#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1941pub struct Fuse(pub i32);
1942/// A metadata field for [Tnt].
1943#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1944pub struct TntBlockState(pub azalea_block::BlockState);
1945/// The marker component for entities of type `minecraft:tnt`.
1946///
1947/// # Metadata
1948///
1949/// These are the metadata components that all `Tnt` entities are guaranteed to
1950/// have, in addition to the metadata components from parent types:
1951///
1952/// - [Fuse]
1953/// - [TntBlockState]
1954///
1955/// # Parents
1956///
1957/// Entities with `Tnt` will also have the following marker components and their
1958/// metadata fields:
1959///
1960/// - [AbstractEntity]
1961///
1962/// # Children
1963///
1964/// This entity type has no children types.
1965#[derive(Component)]
1966pub struct Tnt;
1967impl Tnt {
1968    fn apply_metadata(
1969        entity: &mut bevy_ecs::system::EntityCommands,
1970        d: EntityDataItem,
1971    ) -> Result<(), UpdateMetadataError> {
1972        match d.index {
1973            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1974            8 => {
1975                entity.insert(Fuse(d.value.into_int()?));
1976            }
1977            9 => {
1978                entity.insert(TntBlockState(d.value.into_block_state()?));
1979            }
1980            _ => {}
1981        }
1982        Ok(())
1983    }
1984}
1985
1986/// The metadata bundle for [Tnt].
1987///
1988/// This type should generally not be used directly.
1989#[derive(Bundle)]
1990pub struct TntMetadataBundle {
1991    _marker: Tnt,
1992    parent: AbstractEntityMetadataBundle,
1993    fuse: Fuse,
1994    tnt_block_state: TntBlockState,
1995}
1996impl Default for TntMetadataBundle {
1997    fn default() -> Self {
1998        Self {
1999            _marker: Tnt,
2000            parent: Default::default(),
2001            fuse: Fuse(80),
2002            tnt_block_state: TntBlockState(Default::default()),
2003        }
2004    }
2005}
2006
2007/// The marker component for entities of type `minecraft:wind_charge`.
2008///
2009/// # Metadata
2010///
2011/// This entity type does not add any additional metadata. It will still have
2012/// metadata from parent types.
2013///
2014/// # Parents
2015///
2016/// Entities with `WindCharge` will also have the following marker components
2017/// and their metadata fields:
2018///
2019/// - [AbstractEntity]
2020///
2021/// # Children
2022///
2023/// This entity type has no children types.
2024#[derive(Component)]
2025pub struct WindCharge;
2026impl WindCharge {
2027    fn apply_metadata(
2028        entity: &mut bevy_ecs::system::EntityCommands,
2029        d: EntityDataItem,
2030    ) -> Result<(), UpdateMetadataError> {
2031        match d.index {
2032            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2033            _ => {}
2034        }
2035        Ok(())
2036    }
2037}
2038
2039/// The metadata bundle for [WindCharge].
2040///
2041/// This type should generally not be used directly.
2042#[derive(Bundle)]
2043pub struct WindChargeMetadataBundle {
2044    _marker: WindCharge,
2045    parent: AbstractEntityMetadataBundle,
2046}
2047impl Default for WindChargeMetadataBundle {
2048    fn default() -> Self {
2049        Self {
2050            _marker: WindCharge,
2051            parent: Default::default(),
2052        }
2053    }
2054}
2055
2056/// A metadata field for [WitherSkull].
2057#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2058pub struct Dangerous(pub bool);
2059/// The marker component for entities of type `minecraft:wither_skull`.
2060///
2061/// # Metadata
2062///
2063/// These are the metadata components that all `WitherSkull` entities are
2064/// guaranteed to have, in addition to the metadata components from parent
2065/// types:
2066///
2067/// - [Dangerous]
2068///
2069/// # Parents
2070///
2071/// Entities with `WitherSkull` will also have the following marker components
2072/// and their metadata fields:
2073///
2074/// - [AbstractEntity]
2075///
2076/// # Children
2077///
2078/// This entity type has no children types.
2079#[derive(Component)]
2080pub struct WitherSkull;
2081impl WitherSkull {
2082    fn apply_metadata(
2083        entity: &mut bevy_ecs::system::EntityCommands,
2084        d: EntityDataItem,
2085    ) -> Result<(), UpdateMetadataError> {
2086        match d.index {
2087            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2088            8 => {
2089                entity.insert(Dangerous(d.value.into_boolean()?));
2090            }
2091            _ => {}
2092        }
2093        Ok(())
2094    }
2095}
2096
2097/// The metadata bundle for [WitherSkull].
2098///
2099/// This type should generally not be used directly.
2100#[derive(Bundle)]
2101pub struct WitherSkullMetadataBundle {
2102    _marker: WitherSkull,
2103    parent: AbstractEntityMetadataBundle,
2104    dangerous: Dangerous,
2105}
2106impl Default for WitherSkullMetadataBundle {
2107    fn default() -> Self {
2108        Self {
2109            _marker: WitherSkull,
2110            parent: Default::default(),
2111            dangerous: Dangerous(false),
2112        }
2113    }
2114}
2115
2116#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2117/// A metadata field for [AbstractArrow].
2118pub struct CritArrow(pub bool);
2119#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2120/// A metadata field for [AbstractArrow].
2121pub struct NoPhysics(pub bool);
2122/// A metadata field for [AbstractArrow].
2123#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2124pub struct PierceLevel(pub u8);
2125/// A metadata field for [AbstractArrow].
2126#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2127pub struct InGround(pub bool);
2128/// An abstract entity marker component.
2129///
2130/// # Metadata
2131///
2132/// These are the metadata components that all `AbstractArrow` entities are
2133/// guaranteed to have, in addition to the metadata components from parent
2134/// types:
2135///
2136/// - [CritArrow]
2137/// - [NoPhysics]
2138/// - [PierceLevel]
2139/// - [InGround]
2140///
2141/// # Parents
2142///
2143/// Entities with `AbstractArrow` will also have the following marker components
2144/// and their metadata fields:
2145///
2146/// - [AbstractEntity]
2147///
2148/// # Children
2149///
2150/// - [Arrow]
2151/// - [SpectralArrow]
2152/// - [Trident]
2153#[derive(Component)]
2154pub struct AbstractArrow;
2155impl AbstractArrow {
2156    fn apply_metadata(
2157        entity: &mut bevy_ecs::system::EntityCommands,
2158        d: EntityDataItem,
2159    ) -> Result<(), UpdateMetadataError> {
2160        match d.index {
2161            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2162            8 => {
2163                let bitfield = d.value.into_byte()?;
2164                entity.insert(CritArrow(bitfield & 0x1 != 0));
2165                entity.insert(NoPhysics(bitfield & 0x2 != 0));
2166            }
2167            9 => {
2168                entity.insert(PierceLevel(d.value.into_byte()?));
2169            }
2170            10 => {
2171                entity.insert(InGround(d.value.into_boolean()?));
2172            }
2173            _ => {}
2174        }
2175        Ok(())
2176    }
2177}
2178
2179/// The metadata bundle for [AbstractArrow].
2180///
2181/// This type should generally not be used directly.
2182#[derive(Bundle)]
2183pub struct AbstractArrowMetadataBundle {
2184    _marker: AbstractArrow,
2185    parent: AbstractEntityMetadataBundle,
2186    crit_arrow: CritArrow,
2187    no_physics: NoPhysics,
2188    pierce_level: PierceLevel,
2189    in_ground: InGround,
2190}
2191impl Default for AbstractArrowMetadataBundle {
2192    fn default() -> Self {
2193        Self {
2194            _marker: AbstractArrow,
2195            parent: Default::default(),
2196            crit_arrow: CritArrow(false),
2197            no_physics: NoPhysics(false),
2198            pierce_level: PierceLevel(0),
2199            in_ground: InGround(false),
2200        }
2201    }
2202}
2203
2204/// A metadata field for [Arrow].
2205#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2206pub struct EffectColor(pub i32);
2207/// The marker component for entities of type `minecraft:arrow`.
2208///
2209/// # Metadata
2210///
2211/// These are the metadata components that all `Arrow` entities are guaranteed
2212/// to have, in addition to the metadata components from parent types:
2213///
2214/// - [EffectColor]
2215///
2216/// # Parents
2217///
2218/// Entities with `Arrow` will also have the following marker components and
2219/// their metadata fields:
2220///
2221/// - [AbstractArrow]
2222/// - [AbstractEntity]
2223///
2224/// # Children
2225///
2226/// This entity type has no children types.
2227#[derive(Component)]
2228pub struct Arrow;
2229impl Arrow {
2230    fn apply_metadata(
2231        entity: &mut bevy_ecs::system::EntityCommands,
2232        d: EntityDataItem,
2233    ) -> Result<(), UpdateMetadataError> {
2234        match d.index {
2235            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2236            11 => {
2237                entity.insert(EffectColor(d.value.into_int()?));
2238            }
2239            _ => {}
2240        }
2241        Ok(())
2242    }
2243}
2244
2245/// The metadata bundle for [Arrow].
2246///
2247/// This type should generally not be used directly.
2248#[derive(Bundle)]
2249pub struct ArrowMetadataBundle {
2250    _marker: Arrow,
2251    parent: AbstractArrowMetadataBundle,
2252    effect_color: EffectColor,
2253}
2254impl Default for ArrowMetadataBundle {
2255    fn default() -> Self {
2256        Self {
2257            _marker: Arrow,
2258            parent: Default::default(),
2259            effect_color: EffectColor(-1),
2260        }
2261    }
2262}
2263
2264/// The marker component for entities of type `minecraft:spectral_arrow`.
2265///
2266/// # Metadata
2267///
2268/// This entity type does not add any additional metadata. It will still have
2269/// metadata from parent types.
2270///
2271/// # Parents
2272///
2273/// Entities with `SpectralArrow` will also have the following marker components
2274/// and their metadata fields:
2275///
2276/// - [AbstractArrow]
2277/// - [AbstractEntity]
2278///
2279/// # Children
2280///
2281/// This entity type has no children types.
2282#[derive(Component)]
2283pub struct SpectralArrow;
2284impl SpectralArrow {
2285    fn apply_metadata(
2286        entity: &mut bevy_ecs::system::EntityCommands,
2287        d: EntityDataItem,
2288    ) -> Result<(), UpdateMetadataError> {
2289        match d.index {
2290            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2291            _ => {}
2292        }
2293        Ok(())
2294    }
2295}
2296
2297/// The metadata bundle for [SpectralArrow].
2298///
2299/// This type should generally not be used directly.
2300#[derive(Bundle)]
2301pub struct SpectralArrowMetadataBundle {
2302    _marker: SpectralArrow,
2303    parent: AbstractArrowMetadataBundle,
2304}
2305impl Default for SpectralArrowMetadataBundle {
2306    fn default() -> Self {
2307        Self {
2308            _marker: SpectralArrow,
2309            parent: Default::default(),
2310        }
2311    }
2312}
2313
2314/// A metadata field for [Trident].
2315#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2316pub struct Loyalty(pub u8);
2317/// A metadata field for [Trident].
2318#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2319pub struct Foil(pub bool);
2320/// The marker component for entities of type `minecraft:trident`.
2321///
2322/// # Metadata
2323///
2324/// These are the metadata components that all `Trident` entities are guaranteed
2325/// to have, in addition to the metadata components from parent types:
2326///
2327/// - [Loyalty]
2328/// - [Foil]
2329///
2330/// # Parents
2331///
2332/// Entities with `Trident` will also have the following marker components and
2333/// their metadata fields:
2334///
2335/// - [AbstractArrow]
2336/// - [AbstractEntity]
2337///
2338/// # Children
2339///
2340/// This entity type has no children types.
2341#[derive(Component)]
2342pub struct Trident;
2343impl Trident {
2344    fn apply_metadata(
2345        entity: &mut bevy_ecs::system::EntityCommands,
2346        d: EntityDataItem,
2347    ) -> Result<(), UpdateMetadataError> {
2348        match d.index {
2349            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2350            11 => {
2351                entity.insert(Loyalty(d.value.into_byte()?));
2352            }
2353            12 => {
2354                entity.insert(Foil(d.value.into_boolean()?));
2355            }
2356            _ => {}
2357        }
2358        Ok(())
2359    }
2360}
2361
2362/// The metadata bundle for [Trident].
2363///
2364/// This type should generally not be used directly.
2365#[derive(Bundle)]
2366pub struct TridentMetadataBundle {
2367    _marker: Trident,
2368    parent: AbstractArrowMetadataBundle,
2369    loyalty: Loyalty,
2370    foil: Foil,
2371}
2372impl Default for TridentMetadataBundle {
2373    fn default() -> Self {
2374        Self {
2375            _marker: Trident,
2376            parent: Default::default(),
2377            loyalty: Loyalty(0),
2378            foil: Foil(false),
2379        }
2380    }
2381}
2382
2383/// A metadata field for [AbstractDisplay].
2384#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2385pub struct TransformationInterpolationStartDeltaTicks(pub i32);
2386/// A metadata field for [AbstractDisplay].
2387#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2388pub struct TransformationInterpolationDuration(pub i32);
2389/// A metadata field for [AbstractDisplay].
2390#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2391pub struct PosRotInterpolationDuration(pub i32);
2392/// A metadata field for [AbstractDisplay].
2393#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2394pub struct Translation(pub Vec3f32);
2395/// A metadata field for [AbstractDisplay].
2396#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2397pub struct Scale(pub Vec3f32);
2398/// A metadata field for [AbstractDisplay].
2399#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2400pub struct LeftRotation(pub Quaternion);
2401/// A metadata field for [AbstractDisplay].
2402#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2403pub struct RightRotation(pub Quaternion);
2404/// A metadata field for [AbstractDisplay].
2405#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2406pub struct BillboardRenderConstraints(pub u8);
2407/// A metadata field for [AbstractDisplay].
2408#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2409pub struct BrightnessOverride(pub i32);
2410/// A metadata field for [AbstractDisplay].
2411#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2412pub struct ViewRange(pub f32);
2413/// A metadata field for [AbstractDisplay].
2414#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2415pub struct ShadowRadius(pub f32);
2416/// A metadata field for [AbstractDisplay].
2417#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2418pub struct ShadowStrength(pub f32);
2419/// A metadata field for [AbstractDisplay].
2420#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2421pub struct AbstractDisplayWidth(pub f32);
2422/// A metadata field for [AbstractDisplay].
2423#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2424pub struct AbstractDisplayHeight(pub f32);
2425/// A metadata field for [AbstractDisplay].
2426#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2427pub struct GlowColorOverride(pub i32);
2428/// An abstract entity marker component.
2429///
2430/// # Metadata
2431///
2432/// These are the metadata components that all `AbstractDisplay` entities are
2433/// guaranteed to have, in addition to the metadata components from parent
2434/// types:
2435///
2436/// - [TransformationInterpolationStartDeltaTicks]
2437/// - [TransformationInterpolationDuration]
2438/// - [PosRotInterpolationDuration]
2439/// - [Translation]
2440/// - [Scale]
2441/// - [LeftRotation]
2442/// - [RightRotation]
2443/// - [BillboardRenderConstraints]
2444/// - [BrightnessOverride]
2445/// - [ViewRange]
2446/// - [ShadowRadius]
2447/// - [ShadowStrength]
2448/// - [AbstractDisplayWidth]
2449/// - [AbstractDisplayHeight]
2450/// - [GlowColorOverride]
2451///
2452/// # Parents
2453///
2454/// Entities with `AbstractDisplay` will also have the following marker
2455/// components and their metadata fields:
2456///
2457/// - [AbstractEntity]
2458///
2459/// # Children
2460///
2461/// - [BlockDisplay]
2462/// - [ItemDisplay]
2463/// - [TextDisplay]
2464#[derive(Component)]
2465pub struct AbstractDisplay;
2466impl AbstractDisplay {
2467    fn apply_metadata(
2468        entity: &mut bevy_ecs::system::EntityCommands,
2469        d: EntityDataItem,
2470    ) -> Result<(), UpdateMetadataError> {
2471        match d.index {
2472            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2473            8 => {
2474                entity.insert(TransformationInterpolationStartDeltaTicks(
2475                    d.value.into_int()?,
2476                ));
2477            }
2478            9 => {
2479                entity.insert(TransformationInterpolationDuration(d.value.into_int()?));
2480            }
2481            10 => {
2482                entity.insert(PosRotInterpolationDuration(d.value.into_int()?));
2483            }
2484            11 => {
2485                entity.insert(Translation(d.value.into_vector3()?));
2486            }
2487            12 => {
2488                entity.insert(Scale(d.value.into_vector3()?));
2489            }
2490            13 => {
2491                entity.insert(LeftRotation(d.value.into_quaternion()?));
2492            }
2493            14 => {
2494                entity.insert(RightRotation(d.value.into_quaternion()?));
2495            }
2496            15 => {
2497                entity.insert(BillboardRenderConstraints(d.value.into_byte()?));
2498            }
2499            16 => {
2500                entity.insert(BrightnessOverride(d.value.into_int()?));
2501            }
2502            17 => {
2503                entity.insert(ViewRange(d.value.into_float()?));
2504            }
2505            18 => {
2506                entity.insert(ShadowRadius(d.value.into_float()?));
2507            }
2508            19 => {
2509                entity.insert(ShadowStrength(d.value.into_float()?));
2510            }
2511            20 => {
2512                entity.insert(AbstractDisplayWidth(d.value.into_float()?));
2513            }
2514            21 => {
2515                entity.insert(AbstractDisplayHeight(d.value.into_float()?));
2516            }
2517            22 => {
2518                entity.insert(GlowColorOverride(d.value.into_int()?));
2519            }
2520            _ => {}
2521        }
2522        Ok(())
2523    }
2524}
2525
2526/// The metadata bundle for [AbstractDisplay].
2527///
2528/// This type should generally not be used directly.
2529#[derive(Bundle)]
2530pub struct AbstractDisplayMetadataBundle {
2531    _marker: AbstractDisplay,
2532    parent: AbstractEntityMetadataBundle,
2533    transformation_interpolation_start_delta_ticks: TransformationInterpolationStartDeltaTicks,
2534    transformation_interpolation_duration: TransformationInterpolationDuration,
2535    pos_rot_interpolation_duration: PosRotInterpolationDuration,
2536    translation: Translation,
2537    scale: Scale,
2538    left_rotation: LeftRotation,
2539    right_rotation: RightRotation,
2540    billboard_render_constraints: BillboardRenderConstraints,
2541    brightness_override: BrightnessOverride,
2542    view_range: ViewRange,
2543    shadow_radius: ShadowRadius,
2544    shadow_strength: ShadowStrength,
2545    abstract_display_width: AbstractDisplayWidth,
2546    abstract_display_height: AbstractDisplayHeight,
2547    glow_color_override: GlowColorOverride,
2548}
2549impl Default for AbstractDisplayMetadataBundle {
2550    fn default() -> Self {
2551        Self {
2552            _marker: AbstractDisplay,
2553            parent: Default::default(),
2554            transformation_interpolation_start_delta_ticks:
2555                TransformationInterpolationStartDeltaTicks(0),
2556            transformation_interpolation_duration: TransformationInterpolationDuration(0),
2557            pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
2558            translation: Translation(Vec3f32 {
2559                x: 0.0,
2560                y: 0.0,
2561                z: 0.0,
2562            }),
2563            scale: Scale(Vec3f32 {
2564                x: 1.0,
2565                y: 1.0,
2566                z: 1.0,
2567            }),
2568            left_rotation: LeftRotation(Quaternion {
2569                x: 0.0,
2570                y: 0.0,
2571                z: 0.0,
2572                w: 1.0,
2573            }),
2574            right_rotation: RightRotation(Quaternion {
2575                x: 0.0,
2576                y: 0.0,
2577                z: 0.0,
2578                w: 1.0,
2579            }),
2580            billboard_render_constraints: BillboardRenderConstraints(Default::default()),
2581            brightness_override: BrightnessOverride(-1),
2582            view_range: ViewRange(1.0),
2583            shadow_radius: ShadowRadius(0.0),
2584            shadow_strength: ShadowStrength(1.0),
2585            abstract_display_width: AbstractDisplayWidth(0.0),
2586            abstract_display_height: AbstractDisplayHeight(0.0),
2587            glow_color_override: GlowColorOverride(-1),
2588        }
2589    }
2590}
2591
2592/// A metadata field for [BlockDisplay].
2593#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2594pub struct BlockDisplayBlockState(pub azalea_block::BlockState);
2595/// The marker component for entities of type `minecraft:block_display`.
2596///
2597/// # Metadata
2598///
2599/// These are the metadata components that all `BlockDisplay` entities are
2600/// guaranteed to have, in addition to the metadata components from parent
2601/// types:
2602///
2603/// - [BlockDisplayBlockState]
2604///
2605/// # Parents
2606///
2607/// Entities with `BlockDisplay` will also have the following marker components
2608/// and their metadata fields:
2609///
2610/// - [AbstractDisplay]
2611/// - [AbstractEntity]
2612///
2613/// # Children
2614///
2615/// This entity type has no children types.
2616#[derive(Component)]
2617pub struct BlockDisplay;
2618impl BlockDisplay {
2619    fn apply_metadata(
2620        entity: &mut bevy_ecs::system::EntityCommands,
2621        d: EntityDataItem,
2622    ) -> Result<(), UpdateMetadataError> {
2623        match d.index {
2624            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2625            23 => {
2626                entity.insert(BlockDisplayBlockState(d.value.into_block_state()?));
2627            }
2628            _ => {}
2629        }
2630        Ok(())
2631    }
2632}
2633
2634/// The metadata bundle for [BlockDisplay].
2635///
2636/// This type should generally not be used directly.
2637#[derive(Bundle)]
2638pub struct BlockDisplayMetadataBundle {
2639    _marker: BlockDisplay,
2640    parent: AbstractDisplayMetadataBundle,
2641    block_display_block_state: BlockDisplayBlockState,
2642}
2643impl Default for BlockDisplayMetadataBundle {
2644    fn default() -> Self {
2645        Self {
2646            _marker: BlockDisplay,
2647            parent: Default::default(),
2648            block_display_block_state: BlockDisplayBlockState(Default::default()),
2649        }
2650    }
2651}
2652
2653/// A metadata field for [ItemDisplay].
2654#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2655pub struct ItemDisplayItemStack(pub ItemStack);
2656/// A metadata field for [ItemDisplay].
2657#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2658pub struct ItemDisplayItemDisplay(pub u8);
2659/// The marker component for entities of type `minecraft:item_display`.
2660///
2661/// # Metadata
2662///
2663/// These are the metadata components that all `ItemDisplay` entities are
2664/// guaranteed to have, in addition to the metadata components from parent
2665/// types:
2666///
2667/// - [ItemDisplayItemStack]
2668/// - [ItemDisplayItemDisplay]
2669///
2670/// # Parents
2671///
2672/// Entities with `ItemDisplay` will also have the following marker components
2673/// and their metadata fields:
2674///
2675/// - [AbstractDisplay]
2676/// - [AbstractEntity]
2677///
2678/// # Children
2679///
2680/// This entity type has no children types.
2681#[derive(Component)]
2682pub struct ItemDisplay;
2683impl ItemDisplay {
2684    fn apply_metadata(
2685        entity: &mut bevy_ecs::system::EntityCommands,
2686        d: EntityDataItem,
2687    ) -> Result<(), UpdateMetadataError> {
2688        match d.index {
2689            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2690            23 => {
2691                entity.insert(ItemDisplayItemStack(d.value.into_item_stack()?));
2692            }
2693            24 => {
2694                entity.insert(ItemDisplayItemDisplay(d.value.into_byte()?));
2695            }
2696            _ => {}
2697        }
2698        Ok(())
2699    }
2700}
2701
2702/// The metadata bundle for [ItemDisplay].
2703///
2704/// This type should generally not be used directly.
2705#[derive(Bundle)]
2706pub struct ItemDisplayMetadataBundle {
2707    _marker: ItemDisplay,
2708    parent: AbstractDisplayMetadataBundle,
2709    item_display_item_stack: ItemDisplayItemStack,
2710    item_display_item_display: ItemDisplayItemDisplay,
2711}
2712impl Default for ItemDisplayMetadataBundle {
2713    fn default() -> Self {
2714        Self {
2715            _marker: ItemDisplay,
2716            parent: Default::default(),
2717            item_display_item_stack: ItemDisplayItemStack(Default::default()),
2718            item_display_item_display: ItemDisplayItemDisplay(Default::default()),
2719        }
2720    }
2721}
2722
2723/// A metadata field for [TextDisplay].
2724#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2725pub struct Text(pub Box<FormattedText>);
2726/// A metadata field for [TextDisplay].
2727#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2728pub struct LineWidth(pub i32);
2729/// A metadata field for [TextDisplay].
2730#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2731pub struct BackgroundColor(pub i32);
2732/// A metadata field for [TextDisplay].
2733#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2734pub struct TextOpacity(pub u8);
2735/// A metadata field for [TextDisplay].
2736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2737pub struct StyleFlags(pub u8);
2738/// The marker component for entities of type `minecraft:text_display`.
2739///
2740/// # Metadata
2741///
2742/// These are the metadata components that all `TextDisplay` entities are
2743/// guaranteed to have, in addition to the metadata components from parent
2744/// types:
2745///
2746/// - [Text]
2747/// - [LineWidth]
2748/// - [BackgroundColor]
2749/// - [TextOpacity]
2750/// - [StyleFlags]
2751///
2752/// # Parents
2753///
2754/// Entities with `TextDisplay` will also have the following marker components
2755/// and their metadata fields:
2756///
2757/// - [AbstractDisplay]
2758/// - [AbstractEntity]
2759///
2760/// # Children
2761///
2762/// This entity type has no children types.
2763#[derive(Component)]
2764pub struct TextDisplay;
2765impl TextDisplay {
2766    fn apply_metadata(
2767        entity: &mut bevy_ecs::system::EntityCommands,
2768        d: EntityDataItem,
2769    ) -> Result<(), UpdateMetadataError> {
2770        match d.index {
2771            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2772            23 => {
2773                entity.insert(Text(d.value.into_formatted_text()?));
2774            }
2775            24 => {
2776                entity.insert(LineWidth(d.value.into_int()?));
2777            }
2778            25 => {
2779                entity.insert(BackgroundColor(d.value.into_int()?));
2780            }
2781            26 => {
2782                entity.insert(TextOpacity(d.value.into_byte()?));
2783            }
2784            27 => {
2785                entity.insert(StyleFlags(d.value.into_byte()?));
2786            }
2787            _ => {}
2788        }
2789        Ok(())
2790    }
2791}
2792
2793/// The metadata bundle for [TextDisplay].
2794///
2795/// This type should generally not be used directly.
2796#[derive(Bundle)]
2797pub struct TextDisplayMetadataBundle {
2798    _marker: TextDisplay,
2799    parent: AbstractDisplayMetadataBundle,
2800    text: Text,
2801    line_width: LineWidth,
2802    background_color: BackgroundColor,
2803    text_opacity: TextOpacity,
2804    style_flags: StyleFlags,
2805}
2806impl Default for TextDisplayMetadataBundle {
2807    fn default() -> Self {
2808        Self {
2809            _marker: TextDisplay,
2810            parent: Default::default(),
2811            text: Text(Default::default()),
2812            line_width: LineWidth(200),
2813            background_color: BackgroundColor(1073741824),
2814            text_opacity: TextOpacity(127),
2815            style_flags: StyleFlags(0),
2816        }
2817    }
2818}
2819
2820#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2821/// A metadata field for [AbstractLiving].
2822pub struct AutoSpinAttack(pub bool);
2823#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2824/// A metadata field for [AbstractLiving].
2825pub struct AbstractLivingUsingItem(pub bool);
2826/// A metadata field for [AbstractLiving].
2827#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2828pub struct Health(pub f32);
2829/// A metadata field for [AbstractLiving].
2830#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2831pub struct EffectParticles(pub Box<[Particle]>);
2832/// A metadata field for [AbstractLiving].
2833#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2834pub struct EffectAmbience(pub bool);
2835/// A metadata field for [AbstractLiving].
2836#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2837pub struct ArrowCount(pub i32);
2838/// A metadata field for [AbstractLiving].
2839#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2840pub struct StingerCount(pub i32);
2841/// A metadata field for [AbstractLiving].
2842#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2843pub struct SleepingPos(pub Option<BlockPos>);
2844/// An abstract entity marker component.
2845///
2846/// # Metadata
2847///
2848/// These are the metadata components that all `AbstractLiving` entities are
2849/// guaranteed to have, in addition to the metadata components from parent
2850/// types:
2851///
2852/// - [AutoSpinAttack]
2853/// - [AbstractLivingUsingItem]
2854/// - [Health]
2855/// - [EffectParticles]
2856/// - [EffectAmbience]
2857/// - [ArrowCount]
2858/// - [StingerCount]
2859/// - [SleepingPos]
2860///
2861/// # Parents
2862///
2863/// Entities with `AbstractLiving` will also have the following marker
2864/// components and their metadata fields:
2865///
2866/// - [AbstractEntity]
2867///
2868/// # Children
2869///
2870/// - [ArmorStand]
2871/// - [AbstractAvatar]
2872///   - [Mannequin]
2873///   - [Player]
2874/// - [AbstractInsentient]
2875///   - [Bat]
2876///   - [EnderDragon]
2877///   - [Ghast]
2878///   - [Phantom]
2879///   - [AbstractCreature]
2880///     - [Allay]
2881///     - [CopperGolem]
2882///     - [IronGolem]
2883///     - [Pufferfish]
2884///     - [Shulker]
2885///     - [SnowGolem]
2886///     - [Tadpole]
2887///     - [AbstractAgeable]
2888///       - [Dolphin]
2889///       - [MagmaCube]
2890///       - [Slime]
2891///       - [Squid]
2892///         - [GlowSquid]
2893///       - [SulfurCube]
2894///       - [AbstractAnimal]
2895///         - [Armadillo]
2896///         - [Axolotl]
2897///         - [Bee]
2898///         - [Chicken]
2899///         - [Cow]
2900///         - [Fox]
2901///         - [Frog]
2902///         - [Goat]
2903///         - [HappyGhast]
2904///         - [Hoglin]
2905///         - [Mooshroom]
2906///         - [Ocelot]
2907///         - [Panda]
2908///         - [Pig]
2909///         - [PolarBear]
2910///         - [Rabbit]
2911///         - [Sheep]
2912///         - [Sniffer]
2913///         - [Strider]
2914///         - [Turtle]
2915///         - [AbstractHorse]
2916///           - [Camel]
2917///             - [CamelHusk]
2918///           - [Horse]
2919///           - [SkeletonHorse]
2920///           - [ZombieHorse]
2921///           - [AbstractChestedHorse]
2922///             - [Donkey]
2923///             - [Llama]
2924///               - [TraderLlama]
2925///             - [Mule]
2926///         - [AbstractTameable]
2927///           - [Cat]
2928///           - [Parrot]
2929///           - [Wolf]
2930///           - [AbstractNautilus]
2931///             - [Nautilus]
2932///             - [ZombieNautilus]
2933///       - [AbstractVillager]
2934///         - [Villager]
2935///         - [WanderingTrader]
2936///     - [AbstractFish]
2937///       - [Cod]
2938///       - [Salmon]
2939///       - [TropicalFish]
2940///     - [AbstractMonster]
2941///       - [Blaze]
2942///       - [Bogged]
2943///       - [Breeze]
2944///       - [Creaking]
2945///       - [Creeper]
2946///       - [Enderman]
2947///       - [Endermite]
2948///       - [Giant]
2949///       - [Guardian]
2950///         - [ElderGuardian]
2951///       - [Parched]
2952///       - [Silverfish]
2953///       - [Skeleton]
2954///       - [Spider]
2955///         - [CaveSpider]
2956///       - [Stray]
2957///       - [Vex]
2958///       - [Warden]
2959///       - [Wither]
2960///       - [WitherSkeleton]
2961///       - [Zoglin]
2962///       - [Zombie]
2963///         - [Drowned]
2964///         - [Husk]
2965///         - [ZombieVillager]
2966///         - [ZombifiedPiglin]
2967///       - [AbstractPiglin]
2968///         - [Piglin]
2969///         - [PiglinBrute]
2970///       - [AbstractRaider]
2971///         - [Pillager]
2972///         - [Ravager]
2973///         - [Vindicator]
2974///         - [Witch]
2975///         - [AbstractSpellcasterIllager]
2976///           - [Evoker]
2977///           - [Illusioner]
2978#[derive(Component)]
2979pub struct AbstractLiving;
2980impl AbstractLiving {
2981    fn apply_metadata(
2982        entity: &mut bevy_ecs::system::EntityCommands,
2983        d: EntityDataItem,
2984    ) -> Result<(), UpdateMetadataError> {
2985        match d.index {
2986            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2987            8 => {
2988                let bitfield = d.value.into_byte()?;
2989                entity.insert(AutoSpinAttack(bitfield & 0x4 != 0));
2990                entity.insert(AbstractLivingUsingItem(bitfield & 0x1 != 0));
2991            }
2992            9 => {
2993                entity.insert(Health(d.value.into_float()?));
2994            }
2995            10 => {
2996                entity.insert(EffectParticles(d.value.into_particles()?));
2997            }
2998            11 => {
2999                entity.insert(EffectAmbience(d.value.into_boolean()?));
3000            }
3001            12 => {
3002                entity.insert(ArrowCount(d.value.into_int()?));
3003            }
3004            13 => {
3005                entity.insert(StingerCount(d.value.into_int()?));
3006            }
3007            14 => {
3008                entity.insert(SleepingPos(d.value.into_optional_block_pos()?));
3009            }
3010            _ => {}
3011        }
3012        Ok(())
3013    }
3014}
3015
3016/// The metadata bundle for [AbstractLiving].
3017///
3018/// This type should generally not be used directly.
3019#[derive(Bundle)]
3020pub struct AbstractLivingMetadataBundle {
3021    _marker: AbstractLiving,
3022    parent: AbstractEntityMetadataBundle,
3023    auto_spin_attack: AutoSpinAttack,
3024    abstract_living_using_item: AbstractLivingUsingItem,
3025    health: Health,
3026    effect_particles: EffectParticles,
3027    effect_ambience: EffectAmbience,
3028    arrow_count: ArrowCount,
3029    stinger_count: StingerCount,
3030    sleeping_pos: SleepingPos,
3031}
3032impl Default for AbstractLivingMetadataBundle {
3033    fn default() -> Self {
3034        Self {
3035            _marker: AbstractLiving,
3036            parent: Default::default(),
3037            auto_spin_attack: AutoSpinAttack(false),
3038            abstract_living_using_item: AbstractLivingUsingItem(false),
3039            health: Health(1.0),
3040            effect_particles: EffectParticles(Default::default()),
3041            effect_ambience: EffectAmbience(false),
3042            arrow_count: ArrowCount(0),
3043            stinger_count: StingerCount(0),
3044            sleeping_pos: SleepingPos(None),
3045        }
3046    }
3047}
3048
3049#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3050/// A metadata field for [ArmorStand].
3051pub struct Small(pub bool);
3052#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3053/// A metadata field for [ArmorStand].
3054pub struct ShowArms(pub bool);
3055#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3056/// A metadata field for [ArmorStand].
3057pub struct ShowBasePlate(pub bool);
3058#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3059/// A metadata field for [ArmorStand].
3060pub struct ArmorStandMarker(pub bool);
3061/// A metadata field for [ArmorStand].
3062#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3063pub struct HeadPose(pub Rotations);
3064/// A metadata field for [ArmorStand].
3065#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3066pub struct BodyPose(pub Rotations);
3067/// A metadata field for [ArmorStand].
3068#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3069pub struct LeftArmPose(pub Rotations);
3070/// A metadata field for [ArmorStand].
3071#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3072pub struct RightArmPose(pub Rotations);
3073/// A metadata field for [ArmorStand].
3074#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3075pub struct LeftLegPose(pub Rotations);
3076/// A metadata field for [ArmorStand].
3077#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3078pub struct RightLegPose(pub Rotations);
3079/// The marker component for entities of type `minecraft:armor_stand`.
3080///
3081/// # Metadata
3082///
3083/// These are the metadata components that all `ArmorStand` entities are
3084/// guaranteed to have, in addition to the metadata components from parent
3085/// types:
3086///
3087/// - [Small]
3088/// - [ShowArms]
3089/// - [ShowBasePlate]
3090/// - [ArmorStandMarker]
3091/// - [HeadPose]
3092/// - [BodyPose]
3093/// - [LeftArmPose]
3094/// - [RightArmPose]
3095/// - [LeftLegPose]
3096/// - [RightLegPose]
3097///
3098/// # Parents
3099///
3100/// Entities with `ArmorStand` will also have the following marker components
3101/// and their metadata fields:
3102///
3103/// - [AbstractLiving]
3104/// - [AbstractEntity]
3105///
3106/// # Children
3107///
3108/// This entity type has no children types.
3109#[derive(Component)]
3110pub struct ArmorStand;
3111impl ArmorStand {
3112    fn apply_metadata(
3113        entity: &mut bevy_ecs::system::EntityCommands,
3114        d: EntityDataItem,
3115    ) -> Result<(), UpdateMetadataError> {
3116        match d.index {
3117            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3118            15 => {
3119                let bitfield = d.value.into_byte()?;
3120                entity.insert(Small(bitfield & 0x1 != 0));
3121                entity.insert(ShowArms(bitfield & 0x4 != 0));
3122                entity.insert(ShowBasePlate(bitfield & 0x8 != 0));
3123                entity.insert(ArmorStandMarker(bitfield & 0x10 != 0));
3124            }
3125            16 => {
3126                entity.insert(HeadPose(d.value.into_rotations()?));
3127            }
3128            17 => {
3129                entity.insert(BodyPose(d.value.into_rotations()?));
3130            }
3131            18 => {
3132                entity.insert(LeftArmPose(d.value.into_rotations()?));
3133            }
3134            19 => {
3135                entity.insert(RightArmPose(d.value.into_rotations()?));
3136            }
3137            20 => {
3138                entity.insert(LeftLegPose(d.value.into_rotations()?));
3139            }
3140            21 => {
3141                entity.insert(RightLegPose(d.value.into_rotations()?));
3142            }
3143            _ => {}
3144        }
3145        Ok(())
3146    }
3147}
3148
3149/// The metadata bundle for [ArmorStand].
3150///
3151/// This type should generally not be used directly.
3152#[derive(Bundle)]
3153pub struct ArmorStandMetadataBundle {
3154    _marker: ArmorStand,
3155    parent: AbstractLivingMetadataBundle,
3156    small: Small,
3157    show_arms: ShowArms,
3158    show_base_plate: ShowBasePlate,
3159    armor_stand_marker: ArmorStandMarker,
3160    head_pose: HeadPose,
3161    body_pose: BodyPose,
3162    left_arm_pose: LeftArmPose,
3163    right_arm_pose: RightArmPose,
3164    left_leg_pose: LeftLegPose,
3165    right_leg_pose: RightLegPose,
3166}
3167impl Default for ArmorStandMetadataBundle {
3168    fn default() -> Self {
3169        Self {
3170            _marker: ArmorStand,
3171            parent: Default::default(),
3172            small: Small(false),
3173            show_arms: ShowArms(false),
3174            show_base_plate: ShowBasePlate(false),
3175            armor_stand_marker: ArmorStandMarker(false),
3176            head_pose: HeadPose(Default::default()),
3177            body_pose: BodyPose(Default::default()),
3178            left_arm_pose: LeftArmPose(Default::default()),
3179            right_arm_pose: RightArmPose(Default::default()),
3180            left_leg_pose: LeftLegPose(Default::default()),
3181            right_leg_pose: RightLegPose(Default::default()),
3182        }
3183    }
3184}
3185
3186/// A metadata field for [AbstractAvatar].
3187#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3188pub struct PlayerMainHand(pub HumanoidArm);
3189/// A metadata field for [AbstractAvatar].
3190#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3191pub struct PlayerModeCustomisation(pub u8);
3192/// An abstract entity marker component.
3193///
3194/// # Metadata
3195///
3196/// These are the metadata components that all `AbstractAvatar` entities are
3197/// guaranteed to have, in addition to the metadata components from parent
3198/// types:
3199///
3200/// - [PlayerMainHand]
3201/// - [PlayerModeCustomisation]
3202///
3203/// # Parents
3204///
3205/// Entities with `AbstractAvatar` will also have the following marker
3206/// components and their metadata fields:
3207///
3208/// - [AbstractLiving]
3209/// - [AbstractEntity]
3210///
3211/// # Children
3212///
3213/// - [Mannequin]
3214/// - [Player]
3215#[derive(Component)]
3216pub struct AbstractAvatar;
3217impl AbstractAvatar {
3218    fn apply_metadata(
3219        entity: &mut bevy_ecs::system::EntityCommands,
3220        d: EntityDataItem,
3221    ) -> Result<(), UpdateMetadataError> {
3222        match d.index {
3223            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3224            15 => {
3225                entity.insert(PlayerMainHand(d.value.into_humanoid_arm()?));
3226            }
3227            16 => {
3228                entity.insert(PlayerModeCustomisation(d.value.into_byte()?));
3229            }
3230            _ => {}
3231        }
3232        Ok(())
3233    }
3234}
3235
3236/// The metadata bundle for [AbstractAvatar].
3237///
3238/// This type should generally not be used directly.
3239#[derive(Bundle)]
3240pub struct AbstractAvatarMetadataBundle {
3241    _marker: AbstractAvatar,
3242    parent: AbstractLivingMetadataBundle,
3243    player_main_hand: PlayerMainHand,
3244    player_mode_customisation: PlayerModeCustomisation,
3245}
3246impl Default for AbstractAvatarMetadataBundle {
3247    fn default() -> Self {
3248        Self {
3249            _marker: AbstractAvatar,
3250            parent: Default::default(),
3251            player_main_hand: PlayerMainHand(Default::default()),
3252            player_mode_customisation: PlayerModeCustomisation(0),
3253        }
3254    }
3255}
3256
3257/// A metadata field for [Mannequin].
3258#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3259pub struct Profile(pub components::Profile);
3260/// A metadata field for [Mannequin].
3261#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3262pub struct Immovable(pub bool);
3263/// A metadata field for [Mannequin].
3264#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3265pub struct Description(pub Option<Box<FormattedText>>);
3266/// The marker component for entities of type `minecraft:mannequin`.
3267///
3268/// # Metadata
3269///
3270/// These are the metadata components that all `Mannequin` entities are
3271/// guaranteed to have, in addition to the metadata components from parent
3272/// types:
3273///
3274/// - [Profile]
3275/// - [Immovable]
3276/// - [Description]
3277///
3278/// # Parents
3279///
3280/// Entities with `Mannequin` will also have the following marker components and
3281/// their metadata fields:
3282///
3283/// - [AbstractAvatar]
3284/// - [AbstractLiving]
3285/// - [AbstractEntity]
3286///
3287/// # Children
3288///
3289/// This entity type has no children types.
3290#[derive(Component)]
3291pub struct Mannequin;
3292impl Mannequin {
3293    fn apply_metadata(
3294        entity: &mut bevy_ecs::system::EntityCommands,
3295        d: EntityDataItem,
3296    ) -> Result<(), UpdateMetadataError> {
3297        match d.index {
3298            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3299            17 => {
3300                entity.insert(Profile(d.value.into_resolvable_profile()?));
3301            }
3302            18 => {
3303                entity.insert(Immovable(d.value.into_boolean()?));
3304            }
3305            19 => {
3306                entity.insert(Description(d.value.into_optional_formatted_text()?));
3307            }
3308            _ => {}
3309        }
3310        Ok(())
3311    }
3312}
3313
3314/// The metadata bundle for [Mannequin].
3315///
3316/// This type should generally not be used directly.
3317#[derive(Bundle)]
3318pub struct MannequinMetadataBundle {
3319    _marker: Mannequin,
3320    parent: AbstractAvatarMetadataBundle,
3321    profile: Profile,
3322    immovable: Immovable,
3323    description: Description,
3324}
3325impl Default for MannequinMetadataBundle {
3326    fn default() -> Self {
3327        Self {
3328            _marker: Mannequin,
3329            parent: Default::default(),
3330            profile: Profile(Default::default()),
3331            immovable: Immovable(false),
3332            description: Description(Default::default()),
3333        }
3334    }
3335}
3336
3337/// A metadata field for [Player].
3338#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3339pub struct PlayerAbsorption(pub f32);
3340/// A metadata field for [Player].
3341#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3342pub struct Score(pub i32);
3343/// A metadata field for [Player].
3344#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3345pub struct ShoulderParrotLeft(pub OptionalUnsignedInt);
3346/// A metadata field for [Player].
3347#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3348pub struct ShoulderParrotRight(pub OptionalUnsignedInt);
3349/// The marker component for entities of type `minecraft:player`.
3350///
3351/// # Metadata
3352///
3353/// These are the metadata components that all `Player` entities are guaranteed
3354/// to have, in addition to the metadata components from parent types:
3355///
3356/// - [PlayerAbsorption]
3357/// - [Score]
3358/// - [ShoulderParrotLeft]
3359/// - [ShoulderParrotRight]
3360///
3361/// # Parents
3362///
3363/// Entities with `Player` will also have the following marker components and
3364/// their metadata fields:
3365///
3366/// - [AbstractAvatar]
3367/// - [AbstractLiving]
3368/// - [AbstractEntity]
3369///
3370/// # Children
3371///
3372/// This entity type has no children types.
3373#[derive(Component)]
3374pub struct Player;
3375impl Player {
3376    fn apply_metadata(
3377        entity: &mut bevy_ecs::system::EntityCommands,
3378        d: EntityDataItem,
3379    ) -> Result<(), UpdateMetadataError> {
3380        match d.index {
3381            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3382            17 => {
3383                entity.insert(PlayerAbsorption(d.value.into_float()?));
3384            }
3385            18 => {
3386                entity.insert(Score(d.value.into_int()?));
3387            }
3388            19 => {
3389                entity.insert(ShoulderParrotLeft(d.value.into_optional_unsigned_int()?));
3390            }
3391            20 => {
3392                entity.insert(ShoulderParrotRight(d.value.into_optional_unsigned_int()?));
3393            }
3394            _ => {}
3395        }
3396        Ok(())
3397    }
3398}
3399
3400/// The metadata bundle for [Player].
3401///
3402/// This type should generally not be used directly.
3403#[derive(Bundle)]
3404pub struct PlayerMetadataBundle {
3405    _marker: Player,
3406    parent: AbstractAvatarMetadataBundle,
3407    player_absorption: PlayerAbsorption,
3408    score: Score,
3409    shoulder_parrot_left: ShoulderParrotLeft,
3410    shoulder_parrot_right: ShoulderParrotRight,
3411}
3412impl Default for PlayerMetadataBundle {
3413    fn default() -> Self {
3414        Self {
3415            _marker: Player,
3416            parent: Default::default(),
3417            player_absorption: PlayerAbsorption(0.0),
3418            score: Score(0),
3419            shoulder_parrot_left: ShoulderParrotLeft(OptionalUnsignedInt(None)),
3420            shoulder_parrot_right: ShoulderParrotRight(OptionalUnsignedInt(None)),
3421        }
3422    }
3423}
3424
3425#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3426/// A metadata field for [AbstractInsentient].
3427pub struct NoAi(pub bool);
3428#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3429/// A metadata field for [AbstractInsentient].
3430pub struct LeftHanded(pub bool);
3431#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3432/// A metadata field for [AbstractInsentient].
3433pub struct Aggressive(pub bool);
3434/// An abstract entity marker component.
3435///
3436/// # Metadata
3437///
3438/// These are the metadata components that all `AbstractInsentient` entities are
3439/// guaranteed to have, in addition to the metadata components from parent
3440/// types:
3441///
3442/// - [NoAi]
3443/// - [LeftHanded]
3444/// - [Aggressive]
3445///
3446/// # Parents
3447///
3448/// Entities with `AbstractInsentient` will also have the following marker
3449/// components and their metadata fields:
3450///
3451/// - [AbstractLiving]
3452/// - [AbstractEntity]
3453///
3454/// # Children
3455///
3456/// - [Bat]
3457/// - [EnderDragon]
3458/// - [Ghast]
3459/// - [Phantom]
3460/// - [AbstractCreature]
3461///   - [Allay]
3462///   - [CopperGolem]
3463///   - [IronGolem]
3464///   - [Pufferfish]
3465///   - [Shulker]
3466///   - [SnowGolem]
3467///   - [Tadpole]
3468///   - [AbstractAgeable]
3469///     - [Dolphin]
3470///     - [MagmaCube]
3471///     - [Slime]
3472///     - [Squid]
3473///       - [GlowSquid]
3474///     - [SulfurCube]
3475///     - [AbstractAnimal]
3476///       - [Armadillo]
3477///       - [Axolotl]
3478///       - [Bee]
3479///       - [Chicken]
3480///       - [Cow]
3481///       - [Fox]
3482///       - [Frog]
3483///       - [Goat]
3484///       - [HappyGhast]
3485///       - [Hoglin]
3486///       - [Mooshroom]
3487///       - [Ocelot]
3488///       - [Panda]
3489///       - [Pig]
3490///       - [PolarBear]
3491///       - [Rabbit]
3492///       - [Sheep]
3493///       - [Sniffer]
3494///       - [Strider]
3495///       - [Turtle]
3496///       - [AbstractHorse]
3497///         - [Camel]
3498///           - [CamelHusk]
3499///         - [Horse]
3500///         - [SkeletonHorse]
3501///         - [ZombieHorse]
3502///         - [AbstractChestedHorse]
3503///           - [Donkey]
3504///           - [Llama]
3505///             - [TraderLlama]
3506///           - [Mule]
3507///       - [AbstractTameable]
3508///         - [Cat]
3509///         - [Parrot]
3510///         - [Wolf]
3511///         - [AbstractNautilus]
3512///           - [Nautilus]
3513///           - [ZombieNautilus]
3514///     - [AbstractVillager]
3515///       - [Villager]
3516///       - [WanderingTrader]
3517///   - [AbstractFish]
3518///     - [Cod]
3519///     - [Salmon]
3520///     - [TropicalFish]
3521///   - [AbstractMonster]
3522///     - [Blaze]
3523///     - [Bogged]
3524///     - [Breeze]
3525///     - [Creaking]
3526///     - [Creeper]
3527///     - [Enderman]
3528///     - [Endermite]
3529///     - [Giant]
3530///     - [Guardian]
3531///       - [ElderGuardian]
3532///     - [Parched]
3533///     - [Silverfish]
3534///     - [Skeleton]
3535///     - [Spider]
3536///       - [CaveSpider]
3537///     - [Stray]
3538///     - [Vex]
3539///     - [Warden]
3540///     - [Wither]
3541///     - [WitherSkeleton]
3542///     - [Zoglin]
3543///     - [Zombie]
3544///       - [Drowned]
3545///       - [Husk]
3546///       - [ZombieVillager]
3547///       - [ZombifiedPiglin]
3548///     - [AbstractPiglin]
3549///       - [Piglin]
3550///       - [PiglinBrute]
3551///     - [AbstractRaider]
3552///       - [Pillager]
3553///       - [Ravager]
3554///       - [Vindicator]
3555///       - [Witch]
3556///       - [AbstractSpellcasterIllager]
3557///         - [Evoker]
3558///         - [Illusioner]
3559#[derive(Component)]
3560pub struct AbstractInsentient;
3561impl AbstractInsentient {
3562    fn apply_metadata(
3563        entity: &mut bevy_ecs::system::EntityCommands,
3564        d: EntityDataItem,
3565    ) -> Result<(), UpdateMetadataError> {
3566        match d.index {
3567            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3568            15 => {
3569                let bitfield = d.value.into_byte()?;
3570                entity.insert(NoAi(bitfield & 0x1 != 0));
3571                entity.insert(LeftHanded(bitfield & 0x2 != 0));
3572                entity.insert(Aggressive(bitfield & 0x4 != 0));
3573            }
3574            _ => {}
3575        }
3576        Ok(())
3577    }
3578}
3579
3580/// The metadata bundle for [AbstractInsentient].
3581///
3582/// This type should generally not be used directly.
3583#[derive(Bundle)]
3584pub struct AbstractInsentientMetadataBundle {
3585    _marker: AbstractInsentient,
3586    parent: AbstractLivingMetadataBundle,
3587    no_ai: NoAi,
3588    left_handed: LeftHanded,
3589    aggressive: Aggressive,
3590}
3591impl Default for AbstractInsentientMetadataBundle {
3592    fn default() -> Self {
3593        Self {
3594            _marker: AbstractInsentient,
3595            parent: Default::default(),
3596            no_ai: NoAi(false),
3597            left_handed: LeftHanded(false),
3598            aggressive: Aggressive(false),
3599        }
3600    }
3601}
3602
3603#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3604/// A metadata field for [Bat].
3605pub struct Resting(pub bool);
3606/// The marker component for entities of type `minecraft:bat`.
3607///
3608/// # Metadata
3609///
3610/// These are the metadata components that all `Bat` entities are guaranteed to
3611/// have, in addition to the metadata components from parent types:
3612///
3613/// - [Resting]
3614///
3615/// # Parents
3616///
3617/// Entities with `Bat` will also have the following marker components and their
3618/// metadata fields:
3619///
3620/// - [AbstractInsentient]
3621/// - [AbstractLiving]
3622/// - [AbstractEntity]
3623///
3624/// # Children
3625///
3626/// This entity type has no children types.
3627#[derive(Component)]
3628pub struct Bat;
3629impl Bat {
3630    fn apply_metadata(
3631        entity: &mut bevy_ecs::system::EntityCommands,
3632        d: EntityDataItem,
3633    ) -> Result<(), UpdateMetadataError> {
3634        match d.index {
3635            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3636            16 => {
3637                let bitfield = d.value.into_byte()?;
3638                entity.insert(Resting(bitfield & 0x1 != 0));
3639            }
3640            _ => {}
3641        }
3642        Ok(())
3643    }
3644}
3645
3646/// The metadata bundle for [Bat].
3647///
3648/// This type should generally not be used directly.
3649#[derive(Bundle)]
3650pub struct BatMetadataBundle {
3651    _marker: Bat,
3652    parent: AbstractInsentientMetadataBundle,
3653    resting: Resting,
3654}
3655impl Default for BatMetadataBundle {
3656    fn default() -> Self {
3657        Self {
3658            _marker: Bat,
3659            parent: Default::default(),
3660            resting: Resting(false),
3661        }
3662    }
3663}
3664
3665/// A metadata field for [EnderDragon].
3666#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3667pub struct Phase(pub i32);
3668/// The marker component for entities of type `minecraft:ender_dragon`.
3669///
3670/// # Metadata
3671///
3672/// These are the metadata components that all `EnderDragon` entities are
3673/// guaranteed to have, in addition to the metadata components from parent
3674/// types:
3675///
3676/// - [Phase]
3677///
3678/// # Parents
3679///
3680/// Entities with `EnderDragon` will also have the following marker components
3681/// and their metadata fields:
3682///
3683/// - [AbstractInsentient]
3684/// - [AbstractLiving]
3685/// - [AbstractEntity]
3686///
3687/// # Children
3688///
3689/// This entity type has no children types.
3690#[derive(Component)]
3691pub struct EnderDragon;
3692impl EnderDragon {
3693    fn apply_metadata(
3694        entity: &mut bevy_ecs::system::EntityCommands,
3695        d: EntityDataItem,
3696    ) -> Result<(), UpdateMetadataError> {
3697        match d.index {
3698            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3699            16 => {
3700                entity.insert(Phase(d.value.into_int()?));
3701            }
3702            _ => {}
3703        }
3704        Ok(())
3705    }
3706}
3707
3708/// The metadata bundle for [EnderDragon].
3709///
3710/// This type should generally not be used directly.
3711#[derive(Bundle)]
3712pub struct EnderDragonMetadataBundle {
3713    _marker: EnderDragon,
3714    parent: AbstractInsentientMetadataBundle,
3715    phase: Phase,
3716}
3717impl Default for EnderDragonMetadataBundle {
3718    fn default() -> Self {
3719        Self {
3720            _marker: EnderDragon,
3721            parent: Default::default(),
3722            phase: Phase(Default::default()),
3723        }
3724    }
3725}
3726
3727/// A metadata field for [Ghast].
3728#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3729pub struct IsCharging(pub bool);
3730/// The marker component for entities of type `minecraft:ghast`.
3731///
3732/// # Metadata
3733///
3734/// These are the metadata components that all `Ghast` entities are guaranteed
3735/// to have, in addition to the metadata components from parent types:
3736///
3737/// - [IsCharging]
3738///
3739/// # Parents
3740///
3741/// Entities with `Ghast` will also have the following marker components and
3742/// their metadata fields:
3743///
3744/// - [AbstractInsentient]
3745/// - [AbstractLiving]
3746/// - [AbstractEntity]
3747///
3748/// # Children
3749///
3750/// This entity type has no children types.
3751#[derive(Component)]
3752pub struct Ghast;
3753impl Ghast {
3754    fn apply_metadata(
3755        entity: &mut bevy_ecs::system::EntityCommands,
3756        d: EntityDataItem,
3757    ) -> Result<(), UpdateMetadataError> {
3758        match d.index {
3759            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3760            16 => {
3761                entity.insert(IsCharging(d.value.into_boolean()?));
3762            }
3763            _ => {}
3764        }
3765        Ok(())
3766    }
3767}
3768
3769/// The metadata bundle for [Ghast].
3770///
3771/// This type should generally not be used directly.
3772#[derive(Bundle)]
3773pub struct GhastMetadataBundle {
3774    _marker: Ghast,
3775    parent: AbstractInsentientMetadataBundle,
3776    is_charging: IsCharging,
3777}
3778impl Default for GhastMetadataBundle {
3779    fn default() -> Self {
3780        Self {
3781            _marker: Ghast,
3782            parent: Default::default(),
3783            is_charging: IsCharging(false),
3784        }
3785    }
3786}
3787
3788/// A metadata field for [Phantom].
3789#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3790pub struct PhantomSize(pub i32);
3791/// The marker component for entities of type `minecraft:phantom`.
3792///
3793/// # Metadata
3794///
3795/// These are the metadata components that all `Phantom` entities are guaranteed
3796/// to have, in addition to the metadata components from parent types:
3797///
3798/// - [PhantomSize]
3799///
3800/// # Parents
3801///
3802/// Entities with `Phantom` will also have the following marker components and
3803/// their metadata fields:
3804///
3805/// - [AbstractInsentient]
3806/// - [AbstractLiving]
3807/// - [AbstractEntity]
3808///
3809/// # Children
3810///
3811/// This entity type has no children types.
3812#[derive(Component)]
3813pub struct Phantom;
3814impl Phantom {
3815    fn apply_metadata(
3816        entity: &mut bevy_ecs::system::EntityCommands,
3817        d: EntityDataItem,
3818    ) -> Result<(), UpdateMetadataError> {
3819        match d.index {
3820            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3821            16 => {
3822                entity.insert(PhantomSize(d.value.into_int()?));
3823            }
3824            _ => {}
3825        }
3826        Ok(())
3827    }
3828}
3829
3830/// The metadata bundle for [Phantom].
3831///
3832/// This type should generally not be used directly.
3833#[derive(Bundle)]
3834pub struct PhantomMetadataBundle {
3835    _marker: Phantom,
3836    parent: AbstractInsentientMetadataBundle,
3837    phantom_size: PhantomSize,
3838}
3839impl Default for PhantomMetadataBundle {
3840    fn default() -> Self {
3841        Self {
3842            _marker: Phantom,
3843            parent: Default::default(),
3844            phantom_size: PhantomSize(0),
3845        }
3846    }
3847}
3848
3849/// An abstract entity marker component.
3850///
3851/// # Metadata
3852///
3853/// This entity type does not add any additional metadata. It will still have
3854/// metadata from parent types.
3855///
3856/// # Parents
3857///
3858/// Entities with `AbstractCreature` will also have the following marker
3859/// components and their metadata fields:
3860///
3861/// - [AbstractInsentient]
3862/// - [AbstractLiving]
3863/// - [AbstractEntity]
3864///
3865/// # Children
3866///
3867/// - [Allay]
3868/// - [CopperGolem]
3869/// - [IronGolem]
3870/// - [Pufferfish]
3871/// - [Shulker]
3872/// - [SnowGolem]
3873/// - [Tadpole]
3874/// - [AbstractAgeable]
3875///   - [Dolphin]
3876///   - [MagmaCube]
3877///   - [Slime]
3878///   - [Squid]
3879///     - [GlowSquid]
3880///   - [SulfurCube]
3881///   - [AbstractAnimal]
3882///     - [Armadillo]
3883///     - [Axolotl]
3884///     - [Bee]
3885///     - [Chicken]
3886///     - [Cow]
3887///     - [Fox]
3888///     - [Frog]
3889///     - [Goat]
3890///     - [HappyGhast]
3891///     - [Hoglin]
3892///     - [Mooshroom]
3893///     - [Ocelot]
3894///     - [Panda]
3895///     - [Pig]
3896///     - [PolarBear]
3897///     - [Rabbit]
3898///     - [Sheep]
3899///     - [Sniffer]
3900///     - [Strider]
3901///     - [Turtle]
3902///     - [AbstractHorse]
3903///       - [Camel]
3904///         - [CamelHusk]
3905///       - [Horse]
3906///       - [SkeletonHorse]
3907///       - [ZombieHorse]
3908///       - [AbstractChestedHorse]
3909///         - [Donkey]
3910///         - [Llama]
3911///           - [TraderLlama]
3912///         - [Mule]
3913///     - [AbstractTameable]
3914///       - [Cat]
3915///       - [Parrot]
3916///       - [Wolf]
3917///       - [AbstractNautilus]
3918///         - [Nautilus]
3919///         - [ZombieNautilus]
3920///   - [AbstractVillager]
3921///     - [Villager]
3922///     - [WanderingTrader]
3923/// - [AbstractFish]
3924///   - [Cod]
3925///   - [Salmon]
3926///   - [TropicalFish]
3927/// - [AbstractMonster]
3928///   - [Blaze]
3929///   - [Bogged]
3930///   - [Breeze]
3931///   - [Creaking]
3932///   - [Creeper]
3933///   - [Enderman]
3934///   - [Endermite]
3935///   - [Giant]
3936///   - [Guardian]
3937///     - [ElderGuardian]
3938///   - [Parched]
3939///   - [Silverfish]
3940///   - [Skeleton]
3941///   - [Spider]
3942///     - [CaveSpider]
3943///   - [Stray]
3944///   - [Vex]
3945///   - [Warden]
3946///   - [Wither]
3947///   - [WitherSkeleton]
3948///   - [Zoglin]
3949///   - [Zombie]
3950///     - [Drowned]
3951///     - [Husk]
3952///     - [ZombieVillager]
3953///     - [ZombifiedPiglin]
3954///   - [AbstractPiglin]
3955///     - [Piglin]
3956///     - [PiglinBrute]
3957///   - [AbstractRaider]
3958///     - [Pillager]
3959///     - [Ravager]
3960///     - [Vindicator]
3961///     - [Witch]
3962///     - [AbstractSpellcasterIllager]
3963///       - [Evoker]
3964///       - [Illusioner]
3965#[derive(Component)]
3966pub struct AbstractCreature;
3967impl AbstractCreature {
3968    fn apply_metadata(
3969        entity: &mut bevy_ecs::system::EntityCommands,
3970        d: EntityDataItem,
3971    ) -> Result<(), UpdateMetadataError> {
3972        match d.index {
3973            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3974            _ => {}
3975        }
3976        Ok(())
3977    }
3978}
3979
3980/// The metadata bundle for [AbstractCreature].
3981///
3982/// This type should generally not be used directly.
3983#[derive(Bundle)]
3984pub struct AbstractCreatureMetadataBundle {
3985    _marker: AbstractCreature,
3986    parent: AbstractInsentientMetadataBundle,
3987}
3988impl Default for AbstractCreatureMetadataBundle {
3989    fn default() -> Self {
3990        Self {
3991            _marker: AbstractCreature,
3992            parent: Default::default(),
3993        }
3994    }
3995}
3996
3997/// A metadata field for [Allay].
3998#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3999pub struct Dancing(pub bool);
4000/// A metadata field for [Allay].
4001#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4002pub struct CanDuplicate(pub bool);
4003/// The marker component for entities of type `minecraft:allay`.
4004///
4005/// # Metadata
4006///
4007/// These are the metadata components that all `Allay` entities are guaranteed
4008/// to have, in addition to the metadata components from parent types:
4009///
4010/// - [Dancing]
4011/// - [CanDuplicate]
4012///
4013/// # Parents
4014///
4015/// Entities with `Allay` will also have the following marker components and
4016/// their metadata fields:
4017///
4018/// - [AbstractCreature]
4019/// - [AbstractInsentient]
4020/// - [AbstractLiving]
4021/// - [AbstractEntity]
4022///
4023/// # Children
4024///
4025/// This entity type has no children types.
4026#[derive(Component)]
4027pub struct Allay;
4028impl Allay {
4029    fn apply_metadata(
4030        entity: &mut bevy_ecs::system::EntityCommands,
4031        d: EntityDataItem,
4032    ) -> Result<(), UpdateMetadataError> {
4033        match d.index {
4034            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4035            16 => {
4036                entity.insert(Dancing(d.value.into_boolean()?));
4037            }
4038            17 => {
4039                entity.insert(CanDuplicate(d.value.into_boolean()?));
4040            }
4041            _ => {}
4042        }
4043        Ok(())
4044    }
4045}
4046
4047/// The metadata bundle for [Allay].
4048///
4049/// This type should generally not be used directly.
4050#[derive(Bundle)]
4051pub struct AllayMetadataBundle {
4052    _marker: Allay,
4053    parent: AbstractCreatureMetadataBundle,
4054    dancing: Dancing,
4055    can_duplicate: CanDuplicate,
4056}
4057impl Default for AllayMetadataBundle {
4058    fn default() -> Self {
4059        Self {
4060            _marker: Allay,
4061            parent: Default::default(),
4062            dancing: Dancing(false),
4063            can_duplicate: CanDuplicate(true),
4064        }
4065    }
4066}
4067
4068/// A metadata field for [CopperGolem].
4069#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4070pub struct WeatherState(pub WeatheringCopperStateKind);
4071/// A metadata field for [CopperGolem].
4072#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4073pub struct CopperGolemState(pub CopperGolemStateKind);
4074/// The marker component for entities of type `minecraft:copper_golem`.
4075///
4076/// # Metadata
4077///
4078/// These are the metadata components that all `CopperGolem` entities are
4079/// guaranteed to have, in addition to the metadata components from parent
4080/// types:
4081///
4082/// - [WeatherState]
4083/// - [CopperGolemState]
4084///
4085/// # Parents
4086///
4087/// Entities with `CopperGolem` will also have the following marker components
4088/// and their metadata fields:
4089///
4090/// - [AbstractCreature]
4091/// - [AbstractInsentient]
4092/// - [AbstractLiving]
4093/// - [AbstractEntity]
4094///
4095/// # Children
4096///
4097/// This entity type has no children types.
4098#[derive(Component)]
4099pub struct CopperGolem;
4100impl CopperGolem {
4101    fn apply_metadata(
4102        entity: &mut bevy_ecs::system::EntityCommands,
4103        d: EntityDataItem,
4104    ) -> Result<(), UpdateMetadataError> {
4105        match d.index {
4106            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4107            16 => {
4108                entity.insert(WeatherState(d.value.into_weathering_copper_state()?));
4109            }
4110            17 => {
4111                entity.insert(CopperGolemState(d.value.into_copper_golem_state()?));
4112            }
4113            _ => {}
4114        }
4115        Ok(())
4116    }
4117}
4118
4119/// The metadata bundle for [CopperGolem].
4120///
4121/// This type should generally not be used directly.
4122#[derive(Bundle)]
4123pub struct CopperGolemMetadataBundle {
4124    _marker: CopperGolem,
4125    parent: AbstractCreatureMetadataBundle,
4126    weather_state: WeatherState,
4127    copper_golem_state: CopperGolemState,
4128}
4129impl Default for CopperGolemMetadataBundle {
4130    fn default() -> Self {
4131        Self {
4132            _marker: CopperGolem,
4133            parent: Default::default(),
4134            weather_state: WeatherState(Default::default()),
4135            copper_golem_state: CopperGolemState(Default::default()),
4136        }
4137    }
4138}
4139
4140#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4141/// A metadata field for [IronGolem].
4142pub struct PlayerCreated(pub bool);
4143/// The marker component for entities of type `minecraft:iron_golem`.
4144///
4145/// # Metadata
4146///
4147/// These are the metadata components that all `IronGolem` entities are
4148/// guaranteed to have, in addition to the metadata components from parent
4149/// types:
4150///
4151/// - [PlayerCreated]
4152///
4153/// # Parents
4154///
4155/// Entities with `IronGolem` will also have the following marker components and
4156/// their metadata fields:
4157///
4158/// - [AbstractCreature]
4159/// - [AbstractInsentient]
4160/// - [AbstractLiving]
4161/// - [AbstractEntity]
4162///
4163/// # Children
4164///
4165/// This entity type has no children types.
4166#[derive(Component)]
4167pub struct IronGolem;
4168impl IronGolem {
4169    fn apply_metadata(
4170        entity: &mut bevy_ecs::system::EntityCommands,
4171        d: EntityDataItem,
4172    ) -> Result<(), UpdateMetadataError> {
4173        match d.index {
4174            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4175            16 => {
4176                let bitfield = d.value.into_byte()?;
4177                entity.insert(PlayerCreated(bitfield & 0x1 != 0));
4178            }
4179            _ => {}
4180        }
4181        Ok(())
4182    }
4183}
4184
4185/// The metadata bundle for [IronGolem].
4186///
4187/// This type should generally not be used directly.
4188#[derive(Bundle)]
4189pub struct IronGolemMetadataBundle {
4190    _marker: IronGolem,
4191    parent: AbstractCreatureMetadataBundle,
4192    player_created: PlayerCreated,
4193}
4194impl Default for IronGolemMetadataBundle {
4195    fn default() -> Self {
4196        Self {
4197            _marker: IronGolem,
4198            parent: Default::default(),
4199            player_created: PlayerCreated(false),
4200        }
4201    }
4202}
4203
4204/// A metadata field for [Pufferfish].
4205#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4206pub struct PufferfishFromBucket(pub bool);
4207/// A metadata field for [Pufferfish].
4208#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4209pub struct PuffState(pub i32);
4210/// The marker component for entities of type `minecraft:pufferfish`.
4211///
4212/// # Metadata
4213///
4214/// These are the metadata components that all `Pufferfish` entities are
4215/// guaranteed to have, in addition to the metadata components from parent
4216/// types:
4217///
4218/// - [PufferfishFromBucket]
4219/// - [PuffState]
4220///
4221/// # Parents
4222///
4223/// Entities with `Pufferfish` will also have the following marker components
4224/// and their metadata fields:
4225///
4226/// - [AbstractCreature]
4227/// - [AbstractInsentient]
4228/// - [AbstractLiving]
4229/// - [AbstractEntity]
4230///
4231/// # Children
4232///
4233/// This entity type has no children types.
4234#[derive(Component)]
4235pub struct Pufferfish;
4236impl Pufferfish {
4237    fn apply_metadata(
4238        entity: &mut bevy_ecs::system::EntityCommands,
4239        d: EntityDataItem,
4240    ) -> Result<(), UpdateMetadataError> {
4241        match d.index {
4242            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4243            16 => {
4244                entity.insert(PufferfishFromBucket(d.value.into_boolean()?));
4245            }
4246            17 => {
4247                entity.insert(PuffState(d.value.into_int()?));
4248            }
4249            _ => {}
4250        }
4251        Ok(())
4252    }
4253}
4254
4255/// The metadata bundle for [Pufferfish].
4256///
4257/// This type should generally not be used directly.
4258#[derive(Bundle)]
4259pub struct PufferfishMetadataBundle {
4260    _marker: Pufferfish,
4261    parent: AbstractCreatureMetadataBundle,
4262    pufferfish_from_bucket: PufferfishFromBucket,
4263    puff_state: PuffState,
4264}
4265impl Default for PufferfishMetadataBundle {
4266    fn default() -> Self {
4267        Self {
4268            _marker: Pufferfish,
4269            parent: Default::default(),
4270            pufferfish_from_bucket: PufferfishFromBucket(false),
4271            puff_state: PuffState(0),
4272        }
4273    }
4274}
4275
4276/// A metadata field for [Shulker].
4277#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4278pub struct AttachFace(pub Direction);
4279/// A metadata field for [Shulker].
4280#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4281pub struct Peek(pub u8);
4282/// A metadata field for [Shulker].
4283#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4284pub struct Color(pub u8);
4285/// The marker component for entities of type `minecraft:shulker`.
4286///
4287/// # Metadata
4288///
4289/// These are the metadata components that all `Shulker` entities are guaranteed
4290/// to have, in addition to the metadata components from parent types:
4291///
4292/// - [AttachFace]
4293/// - [Peek]
4294/// - [Color]
4295///
4296/// # Parents
4297///
4298/// Entities with `Shulker` will also have the following marker components and
4299/// their metadata fields:
4300///
4301/// - [AbstractCreature]
4302/// - [AbstractInsentient]
4303/// - [AbstractLiving]
4304/// - [AbstractEntity]
4305///
4306/// # Children
4307///
4308/// This entity type has no children types.
4309#[derive(Component)]
4310pub struct Shulker;
4311impl Shulker {
4312    fn apply_metadata(
4313        entity: &mut bevy_ecs::system::EntityCommands,
4314        d: EntityDataItem,
4315    ) -> Result<(), UpdateMetadataError> {
4316        match d.index {
4317            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4318            16 => {
4319                entity.insert(AttachFace(d.value.into_direction()?));
4320            }
4321            17 => {
4322                entity.insert(Peek(d.value.into_byte()?));
4323            }
4324            18 => {
4325                entity.insert(Color(d.value.into_byte()?));
4326            }
4327            _ => {}
4328        }
4329        Ok(())
4330    }
4331}
4332
4333/// The metadata bundle for [Shulker].
4334///
4335/// This type should generally not be used directly.
4336#[derive(Bundle)]
4337pub struct ShulkerMetadataBundle {
4338    _marker: Shulker,
4339    parent: AbstractCreatureMetadataBundle,
4340    attach_face: AttachFace,
4341    peek: Peek,
4342    color: Color,
4343}
4344impl Default for ShulkerMetadataBundle {
4345    fn default() -> Self {
4346        Self {
4347            _marker: Shulker,
4348            parent: Default::default(),
4349            attach_face: AttachFace(Default::default()),
4350            peek: Peek(0),
4351            color: Color(16),
4352        }
4353    }
4354}
4355
4356#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4357/// A metadata field for [SnowGolem].
4358pub struct HasPumpkin(pub bool);
4359/// The marker component for entities of type `minecraft:snow_golem`.
4360///
4361/// # Metadata
4362///
4363/// These are the metadata components that all `SnowGolem` entities are
4364/// guaranteed to have, in addition to the metadata components from parent
4365/// types:
4366///
4367/// - [HasPumpkin]
4368///
4369/// # Parents
4370///
4371/// Entities with `SnowGolem` will also have the following marker components and
4372/// their metadata fields:
4373///
4374/// - [AbstractCreature]
4375/// - [AbstractInsentient]
4376/// - [AbstractLiving]
4377/// - [AbstractEntity]
4378///
4379/// # Children
4380///
4381/// This entity type has no children types.
4382#[derive(Component)]
4383pub struct SnowGolem;
4384impl SnowGolem {
4385    fn apply_metadata(
4386        entity: &mut bevy_ecs::system::EntityCommands,
4387        d: EntityDataItem,
4388    ) -> Result<(), UpdateMetadataError> {
4389        match d.index {
4390            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4391            16 => {
4392                let bitfield = d.value.into_byte()?;
4393                entity.insert(HasPumpkin(bitfield & 0x10 != 0));
4394            }
4395            _ => {}
4396        }
4397        Ok(())
4398    }
4399}
4400
4401/// The metadata bundle for [SnowGolem].
4402///
4403/// This type should generally not be used directly.
4404#[derive(Bundle)]
4405pub struct SnowGolemMetadataBundle {
4406    _marker: SnowGolem,
4407    parent: AbstractCreatureMetadataBundle,
4408    has_pumpkin: HasPumpkin,
4409}
4410impl Default for SnowGolemMetadataBundle {
4411    fn default() -> Self {
4412        Self {
4413            _marker: SnowGolem,
4414            parent: Default::default(),
4415            has_pumpkin: HasPumpkin(true),
4416        }
4417    }
4418}
4419
4420/// A metadata field for [Tadpole].
4421#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4422pub struct TadpoleFromBucket(pub bool);
4423/// A metadata field for [Tadpole].
4424#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4425pub struct TadpoleAgeLocked(pub bool);
4426/// The marker component for entities of type `minecraft:tadpole`.
4427///
4428/// # Metadata
4429///
4430/// These are the metadata components that all `Tadpole` entities are guaranteed
4431/// to have, in addition to the metadata components from parent types:
4432///
4433/// - [TadpoleFromBucket]
4434/// - [TadpoleAgeLocked]
4435///
4436/// # Parents
4437///
4438/// Entities with `Tadpole` will also have the following marker components and
4439/// their metadata fields:
4440///
4441/// - [AbstractCreature]
4442/// - [AbstractInsentient]
4443/// - [AbstractLiving]
4444/// - [AbstractEntity]
4445///
4446/// # Children
4447///
4448/// This entity type has no children types.
4449#[derive(Component)]
4450pub struct Tadpole;
4451impl Tadpole {
4452    fn apply_metadata(
4453        entity: &mut bevy_ecs::system::EntityCommands,
4454        d: EntityDataItem,
4455    ) -> Result<(), UpdateMetadataError> {
4456        match d.index {
4457            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4458            16 => {
4459                entity.insert(TadpoleFromBucket(d.value.into_boolean()?));
4460            }
4461            17 => {
4462                entity.insert(TadpoleAgeLocked(d.value.into_boolean()?));
4463            }
4464            _ => {}
4465        }
4466        Ok(())
4467    }
4468}
4469
4470/// The metadata bundle for [Tadpole].
4471///
4472/// This type should generally not be used directly.
4473#[derive(Bundle)]
4474pub struct TadpoleMetadataBundle {
4475    _marker: Tadpole,
4476    parent: AbstractCreatureMetadataBundle,
4477    tadpole_from_bucket: TadpoleFromBucket,
4478    tadpole_age_locked: TadpoleAgeLocked,
4479}
4480impl Default for TadpoleMetadataBundle {
4481    fn default() -> Self {
4482        Self {
4483            _marker: Tadpole,
4484            parent: Default::default(),
4485            tadpole_from_bucket: TadpoleFromBucket(false),
4486            tadpole_age_locked: TadpoleAgeLocked(false),
4487        }
4488    }
4489}
4490
4491/// A metadata field for [AbstractAgeable].
4492#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4493pub struct AbstractAgeableBaby(pub bool);
4494/// A metadata field for [AbstractAgeable].
4495#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4496pub struct AbstractAgeableAgeLocked(pub bool);
4497/// An abstract entity marker component.
4498///
4499/// # Metadata
4500///
4501/// These are the metadata components that all `AbstractAgeable` entities are
4502/// guaranteed to have, in addition to the metadata components from parent
4503/// types:
4504///
4505/// - [AbstractAgeableBaby]
4506/// - [AbstractAgeableAgeLocked]
4507///
4508/// # Parents
4509///
4510/// Entities with `AbstractAgeable` will also have the following marker
4511/// components and their metadata fields:
4512///
4513/// - [AbstractCreature]
4514/// - [AbstractInsentient]
4515/// - [AbstractLiving]
4516/// - [AbstractEntity]
4517///
4518/// # Children
4519///
4520/// - [Dolphin]
4521/// - [MagmaCube]
4522/// - [Slime]
4523/// - [Squid]
4524///   - [GlowSquid]
4525/// - [SulfurCube]
4526/// - [AbstractAnimal]
4527///   - [Armadillo]
4528///   - [Axolotl]
4529///   - [Bee]
4530///   - [Chicken]
4531///   - [Cow]
4532///   - [Fox]
4533///   - [Frog]
4534///   - [Goat]
4535///   - [HappyGhast]
4536///   - [Hoglin]
4537///   - [Mooshroom]
4538///   - [Ocelot]
4539///   - [Panda]
4540///   - [Pig]
4541///   - [PolarBear]
4542///   - [Rabbit]
4543///   - [Sheep]
4544///   - [Sniffer]
4545///   - [Strider]
4546///   - [Turtle]
4547///   - [AbstractHorse]
4548///     - [Camel]
4549///       - [CamelHusk]
4550///     - [Horse]
4551///     - [SkeletonHorse]
4552///     - [ZombieHorse]
4553///     - [AbstractChestedHorse]
4554///       - [Donkey]
4555///       - [Llama]
4556///         - [TraderLlama]
4557///       - [Mule]
4558///   - [AbstractTameable]
4559///     - [Cat]
4560///     - [Parrot]
4561///     - [Wolf]
4562///     - [AbstractNautilus]
4563///       - [Nautilus]
4564///       - [ZombieNautilus]
4565/// - [AbstractVillager]
4566///   - [Villager]
4567///   - [WanderingTrader]
4568#[derive(Component)]
4569pub struct AbstractAgeable;
4570impl AbstractAgeable {
4571    fn apply_metadata(
4572        entity: &mut bevy_ecs::system::EntityCommands,
4573        d: EntityDataItem,
4574    ) -> Result<(), UpdateMetadataError> {
4575        match d.index {
4576            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4577            16 => {
4578                entity.insert(AbstractAgeableBaby(d.value.into_boolean()?));
4579            }
4580            17 => {
4581                entity.insert(AbstractAgeableAgeLocked(d.value.into_boolean()?));
4582            }
4583            _ => {}
4584        }
4585        Ok(())
4586    }
4587}
4588
4589/// The metadata bundle for [AbstractAgeable].
4590///
4591/// This type should generally not be used directly.
4592#[derive(Bundle)]
4593pub struct AbstractAgeableMetadataBundle {
4594    _marker: AbstractAgeable,
4595    parent: AbstractCreatureMetadataBundle,
4596    abstract_ageable_baby: AbstractAgeableBaby,
4597    abstract_ageable_age_locked: AbstractAgeableAgeLocked,
4598}
4599impl Default for AbstractAgeableMetadataBundle {
4600    fn default() -> Self {
4601        Self {
4602            _marker: AbstractAgeable,
4603            parent: Default::default(),
4604            abstract_ageable_baby: AbstractAgeableBaby(false),
4605            abstract_ageable_age_locked: AbstractAgeableAgeLocked(false),
4606        }
4607    }
4608}
4609
4610/// A metadata field for [Dolphin].
4611#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4612pub struct GotFish(pub bool);
4613/// A metadata field for [Dolphin].
4614#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4615pub struct MoistnessLevel(pub i32);
4616/// The marker component for entities of type `minecraft:dolphin`.
4617///
4618/// # Metadata
4619///
4620/// These are the metadata components that all `Dolphin` entities are guaranteed
4621/// to have, in addition to the metadata components from parent types:
4622///
4623/// - [GotFish]
4624/// - [MoistnessLevel]
4625///
4626/// # Parents
4627///
4628/// Entities with `Dolphin` will also have the following marker components and
4629/// their metadata fields:
4630///
4631/// - [AbstractAgeable]
4632/// - [AbstractCreature]
4633/// - [AbstractInsentient]
4634/// - [AbstractLiving]
4635/// - [AbstractEntity]
4636///
4637/// # Children
4638///
4639/// This entity type has no children types.
4640#[derive(Component)]
4641pub struct Dolphin;
4642impl Dolphin {
4643    fn apply_metadata(
4644        entity: &mut bevy_ecs::system::EntityCommands,
4645        d: EntityDataItem,
4646    ) -> Result<(), UpdateMetadataError> {
4647        match d.index {
4648            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
4649            18 => {
4650                entity.insert(GotFish(d.value.into_boolean()?));
4651            }
4652            19 => {
4653                entity.insert(MoistnessLevel(d.value.into_int()?));
4654            }
4655            _ => {}
4656        }
4657        Ok(())
4658    }
4659}
4660
4661/// The metadata bundle for [Dolphin].
4662///
4663/// This type should generally not be used directly.
4664#[derive(Bundle)]
4665pub struct DolphinMetadataBundle {
4666    _marker: Dolphin,
4667    parent: AbstractAgeableMetadataBundle,
4668    got_fish: GotFish,
4669    moistness_level: MoistnessLevel,
4670}
4671impl Default for DolphinMetadataBundle {
4672    fn default() -> Self {
4673        Self {
4674            _marker: Dolphin,
4675            parent: Default::default(),
4676            got_fish: GotFish(false),
4677            moistness_level: MoistnessLevel(2400),
4678        }
4679    }
4680}
4681
4682/// A metadata field for [MagmaCube].
4683#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4684pub struct MagmaCubeSize(pub i32);
4685/// The marker component for entities of type `minecraft:magma_cube`.
4686///
4687/// # Metadata
4688///
4689/// These are the metadata components that all `MagmaCube` entities are
4690/// guaranteed to have, in addition to the metadata components from parent
4691/// types:
4692///
4693/// - [MagmaCubeSize]
4694///
4695/// # Parents
4696///
4697/// Entities with `MagmaCube` will also have the following marker components and
4698/// their metadata fields:
4699///
4700/// - [AbstractAgeable]
4701/// - [AbstractCreature]
4702/// - [AbstractInsentient]
4703/// - [AbstractLiving]
4704/// - [AbstractEntity]
4705///
4706/// # Children
4707///
4708/// This entity type has no children types.
4709#[derive(Component)]
4710pub struct MagmaCube;
4711impl MagmaCube {
4712    fn apply_metadata(
4713        entity: &mut bevy_ecs::system::EntityCommands,
4714        d: EntityDataItem,
4715    ) -> Result<(), UpdateMetadataError> {
4716        match d.index {
4717            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
4718            18 => {
4719                entity.insert(MagmaCubeSize(d.value.into_int()?));
4720            }
4721            _ => {}
4722        }
4723        Ok(())
4724    }
4725}
4726
4727/// The metadata bundle for [MagmaCube].
4728///
4729/// This type should generally not be used directly.
4730#[derive(Bundle)]
4731pub struct MagmaCubeMetadataBundle {
4732    _marker: MagmaCube,
4733    parent: AbstractAgeableMetadataBundle,
4734    magma_cube_size: MagmaCubeSize,
4735}
4736impl Default for MagmaCubeMetadataBundle {
4737    fn default() -> Self {
4738        Self {
4739            _marker: MagmaCube,
4740            parent: Default::default(),
4741            magma_cube_size: MagmaCubeSize(1),
4742        }
4743    }
4744}
4745
4746/// A metadata field for [Slime].
4747#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4748pub struct SlimeSize(pub i32);
4749/// The marker component for entities of type `minecraft:slime`.
4750///
4751/// # Metadata
4752///
4753/// These are the metadata components that all `Slime` entities are guaranteed
4754/// to have, in addition to the metadata components from parent types:
4755///
4756/// - [SlimeSize]
4757///
4758/// # Parents
4759///
4760/// Entities with `Slime` will also have the following marker components and
4761/// their metadata fields:
4762///
4763/// - [AbstractAgeable]
4764/// - [AbstractCreature]
4765/// - [AbstractInsentient]
4766/// - [AbstractLiving]
4767/// - [AbstractEntity]
4768///
4769/// # Children
4770///
4771/// This entity type has no children types.
4772#[derive(Component)]
4773pub struct Slime;
4774impl Slime {
4775    fn apply_metadata(
4776        entity: &mut bevy_ecs::system::EntityCommands,
4777        d: EntityDataItem,
4778    ) -> Result<(), UpdateMetadataError> {
4779        match d.index {
4780            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
4781            18 => {
4782                entity.insert(SlimeSize(d.value.into_int()?));
4783            }
4784            _ => {}
4785        }
4786        Ok(())
4787    }
4788}
4789
4790/// The metadata bundle for [Slime].
4791///
4792/// This type should generally not be used directly.
4793#[derive(Bundle)]
4794pub struct SlimeMetadataBundle {
4795    _marker: Slime,
4796    parent: AbstractAgeableMetadataBundle,
4797    slime_size: SlimeSize,
4798}
4799impl Default for SlimeMetadataBundle {
4800    fn default() -> Self {
4801        Self {
4802            _marker: Slime,
4803            parent: Default::default(),
4804            slime_size: SlimeSize(1),
4805        }
4806    }
4807}
4808
4809/// The marker component for entities of type `minecraft:squid`.
4810///
4811/// # Metadata
4812///
4813/// This entity type does not add any additional metadata. It will still have
4814/// metadata from parent types.
4815///
4816/// # Parents
4817///
4818/// Entities with `Squid` will also have the following marker components and
4819/// their metadata fields:
4820///
4821/// - [AbstractAgeable]
4822/// - [AbstractCreature]
4823/// - [AbstractInsentient]
4824/// - [AbstractLiving]
4825/// - [AbstractEntity]
4826///
4827/// # Children
4828///
4829/// - [GlowSquid]
4830#[derive(Component)]
4831pub struct Squid;
4832impl Squid {
4833    fn apply_metadata(
4834        entity: &mut bevy_ecs::system::EntityCommands,
4835        d: EntityDataItem,
4836    ) -> Result<(), UpdateMetadataError> {
4837        match d.index {
4838            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
4839            _ => {}
4840        }
4841        Ok(())
4842    }
4843}
4844
4845/// The metadata bundle for [Squid].
4846///
4847/// This type should generally not be used directly.
4848#[derive(Bundle)]
4849pub struct SquidMetadataBundle {
4850    _marker: Squid,
4851    parent: AbstractAgeableMetadataBundle,
4852}
4853impl Default for SquidMetadataBundle {
4854    fn default() -> Self {
4855        Self {
4856            _marker: Squid,
4857            parent: Default::default(),
4858        }
4859    }
4860}
4861
4862/// A metadata field for [GlowSquid].
4863#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4864pub struct DarkTicksRemaining(pub i32);
4865/// The marker component for entities of type `minecraft:glow_squid`.
4866///
4867/// # Metadata
4868///
4869/// These are the metadata components that all `GlowSquid` entities are
4870/// guaranteed to have, in addition to the metadata components from parent
4871/// types:
4872///
4873/// - [DarkTicksRemaining]
4874///
4875/// # Parents
4876///
4877/// Entities with `GlowSquid` will also have the following marker components and
4878/// their metadata fields:
4879///
4880/// - [Squid]
4881/// - [AbstractAgeable]
4882/// - [AbstractCreature]
4883/// - [AbstractInsentient]
4884/// - [AbstractLiving]
4885/// - [AbstractEntity]
4886///
4887/// # Children
4888///
4889/// This entity type has no children types.
4890#[derive(Component)]
4891pub struct GlowSquid;
4892impl GlowSquid {
4893    fn apply_metadata(
4894        entity: &mut bevy_ecs::system::EntityCommands,
4895        d: EntityDataItem,
4896    ) -> Result<(), UpdateMetadataError> {
4897        match d.index {
4898            0..=17 => Squid::apply_metadata(entity, d)?,
4899            18 => {
4900                entity.insert(DarkTicksRemaining(d.value.into_int()?));
4901            }
4902            _ => {}
4903        }
4904        Ok(())
4905    }
4906}
4907
4908/// The metadata bundle for [GlowSquid].
4909///
4910/// This type should generally not be used directly.
4911#[derive(Bundle)]
4912pub struct GlowSquidMetadataBundle {
4913    _marker: GlowSquid,
4914    parent: SquidMetadataBundle,
4915    dark_ticks_remaining: DarkTicksRemaining,
4916}
4917impl Default for GlowSquidMetadataBundle {
4918    fn default() -> Self {
4919        Self {
4920            _marker: GlowSquid,
4921            parent: Default::default(),
4922            dark_ticks_remaining: DarkTicksRemaining(0),
4923        }
4924    }
4925}
4926
4927/// A metadata field for [SulfurCube].
4928#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4929pub struct SulfurCubeSize(pub i32);
4930/// A metadata field for [SulfurCube].
4931#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4932pub struct MaxFuse(pub i32);
4933/// A metadata field for [SulfurCube].
4934#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4935pub struct SulfurCubeFromBucket(pub bool);
4936/// The marker component for entities of type `minecraft:sulfur_cube`.
4937///
4938/// # Metadata
4939///
4940/// These are the metadata components that all `SulfurCube` entities are
4941/// guaranteed to have, in addition to the metadata components from parent
4942/// types:
4943///
4944/// - [SulfurCubeSize]
4945/// - [MaxFuse]
4946/// - [SulfurCubeFromBucket]
4947///
4948/// # Parents
4949///
4950/// Entities with `SulfurCube` will also have the following marker components
4951/// and their metadata fields:
4952///
4953/// - [AbstractAgeable]
4954/// - [AbstractCreature]
4955/// - [AbstractInsentient]
4956/// - [AbstractLiving]
4957/// - [AbstractEntity]
4958///
4959/// # Children
4960///
4961/// This entity type has no children types.
4962#[derive(Component)]
4963pub struct SulfurCube;
4964impl SulfurCube {
4965    fn apply_metadata(
4966        entity: &mut bevy_ecs::system::EntityCommands,
4967        d: EntityDataItem,
4968    ) -> Result<(), UpdateMetadataError> {
4969        match d.index {
4970            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
4971            18 => {
4972                entity.insert(SulfurCubeSize(d.value.into_int()?));
4973            }
4974            19 => {
4975                entity.insert(MaxFuse(d.value.into_int()?));
4976            }
4977            20 => {
4978                entity.insert(SulfurCubeFromBucket(d.value.into_boolean()?));
4979            }
4980            _ => {}
4981        }
4982        Ok(())
4983    }
4984}
4985
4986/// The metadata bundle for [SulfurCube].
4987///
4988/// This type should generally not be used directly.
4989#[derive(Bundle)]
4990pub struct SulfurCubeMetadataBundle {
4991    _marker: SulfurCube,
4992    parent: AbstractAgeableMetadataBundle,
4993    sulfur_cube_size: SulfurCubeSize,
4994    max_fuse: MaxFuse,
4995    sulfur_cube_from_bucket: SulfurCubeFromBucket,
4996}
4997impl Default for SulfurCubeMetadataBundle {
4998    fn default() -> Self {
4999        Self {
5000            _marker: SulfurCube,
5001            parent: Default::default(),
5002            sulfur_cube_size: SulfurCubeSize(1),
5003            max_fuse: MaxFuse(-1),
5004            sulfur_cube_from_bucket: SulfurCubeFromBucket(false),
5005        }
5006    }
5007}
5008
5009/// An abstract entity marker component.
5010///
5011/// # Metadata
5012///
5013/// This entity type does not add any additional metadata. It will still have
5014/// metadata from parent types.
5015///
5016/// # Parents
5017///
5018/// Entities with `AbstractAnimal` will also have the following marker
5019/// components and their metadata fields:
5020///
5021/// - [AbstractAgeable]
5022/// - [AbstractCreature]
5023/// - [AbstractInsentient]
5024/// - [AbstractLiving]
5025/// - [AbstractEntity]
5026///
5027/// # Children
5028///
5029/// - [Armadillo]
5030/// - [Axolotl]
5031/// - [Bee]
5032/// - [Chicken]
5033/// - [Cow]
5034/// - [Fox]
5035/// - [Frog]
5036/// - [Goat]
5037/// - [HappyGhast]
5038/// - [Hoglin]
5039/// - [Mooshroom]
5040/// - [Ocelot]
5041/// - [Panda]
5042/// - [Pig]
5043/// - [PolarBear]
5044/// - [Rabbit]
5045/// - [Sheep]
5046/// - [Sniffer]
5047/// - [Strider]
5048/// - [Turtle]
5049/// - [AbstractHorse]
5050///   - [Camel]
5051///     - [CamelHusk]
5052///   - [Horse]
5053///   - [SkeletonHorse]
5054///   - [ZombieHorse]
5055///   - [AbstractChestedHorse]
5056///     - [Donkey]
5057///     - [Llama]
5058///       - [TraderLlama]
5059///     - [Mule]
5060/// - [AbstractTameable]
5061///   - [Cat]
5062///   - [Parrot]
5063///   - [Wolf]
5064///   - [AbstractNautilus]
5065///     - [Nautilus]
5066///     - [ZombieNautilus]
5067#[derive(Component)]
5068pub struct AbstractAnimal;
5069impl AbstractAnimal {
5070    fn apply_metadata(
5071        entity: &mut bevy_ecs::system::EntityCommands,
5072        d: EntityDataItem,
5073    ) -> Result<(), UpdateMetadataError> {
5074        match d.index {
5075            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
5076            _ => {}
5077        }
5078        Ok(())
5079    }
5080}
5081
5082/// The metadata bundle for [AbstractAnimal].
5083///
5084/// This type should generally not be used directly.
5085#[derive(Bundle)]
5086pub struct AbstractAnimalMetadataBundle {
5087    _marker: AbstractAnimal,
5088    parent: AbstractAgeableMetadataBundle,
5089}
5090impl Default for AbstractAnimalMetadataBundle {
5091    fn default() -> Self {
5092        Self {
5093            _marker: AbstractAnimal,
5094            parent: Default::default(),
5095        }
5096    }
5097}
5098
5099/// A metadata field for [Armadillo].
5100#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5101pub struct ArmadilloState(pub ArmadilloStateKind);
5102/// The marker component for entities of type `minecraft:armadillo`.
5103///
5104/// # Metadata
5105///
5106/// These are the metadata components that all `Armadillo` entities are
5107/// guaranteed to have, in addition to the metadata components from parent
5108/// types:
5109///
5110/// - [ArmadilloState]
5111///
5112/// # Parents
5113///
5114/// Entities with `Armadillo` will also have the following marker components and
5115/// their metadata fields:
5116///
5117/// - [AbstractAnimal]
5118/// - [AbstractAgeable]
5119/// - [AbstractCreature]
5120/// - [AbstractInsentient]
5121/// - [AbstractLiving]
5122/// - [AbstractEntity]
5123///
5124/// # Children
5125///
5126/// This entity type has no children types.
5127#[derive(Component)]
5128pub struct Armadillo;
5129impl Armadillo {
5130    fn apply_metadata(
5131        entity: &mut bevy_ecs::system::EntityCommands,
5132        d: EntityDataItem,
5133    ) -> Result<(), UpdateMetadataError> {
5134        match d.index {
5135            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5136            18 => {
5137                entity.insert(ArmadilloState(d.value.into_armadillo_state()?));
5138            }
5139            _ => {}
5140        }
5141        Ok(())
5142    }
5143}
5144
5145/// The metadata bundle for [Armadillo].
5146///
5147/// This type should generally not be used directly.
5148#[derive(Bundle)]
5149pub struct ArmadilloMetadataBundle {
5150    _marker: Armadillo,
5151    parent: AbstractAnimalMetadataBundle,
5152    armadillo_state: ArmadilloState,
5153}
5154impl Default for ArmadilloMetadataBundle {
5155    fn default() -> Self {
5156        Self {
5157            _marker: Armadillo,
5158            parent: Default::default(),
5159            armadillo_state: ArmadilloState(Default::default()),
5160        }
5161    }
5162}
5163
5164/// A metadata field for [Axolotl].
5165#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5166pub struct AxolotlVariant(pub i32);
5167/// A metadata field for [Axolotl].
5168#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5169pub struct PlayingDead(pub bool);
5170/// A metadata field for [Axolotl].
5171#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5172pub struct AxolotlFromBucket(pub bool);
5173/// The marker component for entities of type `minecraft:axolotl`.
5174///
5175/// # Metadata
5176///
5177/// These are the metadata components that all `Axolotl` entities are guaranteed
5178/// to have, in addition to the metadata components from parent types:
5179///
5180/// - [AxolotlVariant]
5181/// - [PlayingDead]
5182/// - [AxolotlFromBucket]
5183///
5184/// # Parents
5185///
5186/// Entities with `Axolotl` will also have the following marker components and
5187/// their metadata fields:
5188///
5189/// - [AbstractAnimal]
5190/// - [AbstractAgeable]
5191/// - [AbstractCreature]
5192/// - [AbstractInsentient]
5193/// - [AbstractLiving]
5194/// - [AbstractEntity]
5195///
5196/// # Children
5197///
5198/// This entity type has no children types.
5199#[derive(Component)]
5200pub struct Axolotl;
5201impl Axolotl {
5202    fn apply_metadata(
5203        entity: &mut bevy_ecs::system::EntityCommands,
5204        d: EntityDataItem,
5205    ) -> Result<(), UpdateMetadataError> {
5206        match d.index {
5207            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5208            18 => {
5209                entity.insert(AxolotlVariant(d.value.into_int()?));
5210            }
5211            19 => {
5212                entity.insert(PlayingDead(d.value.into_boolean()?));
5213            }
5214            20 => {
5215                entity.insert(AxolotlFromBucket(d.value.into_boolean()?));
5216            }
5217            _ => {}
5218        }
5219        Ok(())
5220    }
5221}
5222
5223/// The metadata bundle for [Axolotl].
5224///
5225/// This type should generally not be used directly.
5226#[derive(Bundle)]
5227pub struct AxolotlMetadataBundle {
5228    _marker: Axolotl,
5229    parent: AbstractAnimalMetadataBundle,
5230    axolotl_variant: AxolotlVariant,
5231    playing_dead: PlayingDead,
5232    axolotl_from_bucket: AxolotlFromBucket,
5233}
5234impl Default for AxolotlMetadataBundle {
5235    fn default() -> Self {
5236        Self {
5237            _marker: Axolotl,
5238            parent: Default::default(),
5239            axolotl_variant: AxolotlVariant(0),
5240            playing_dead: PlayingDead(false),
5241            axolotl_from_bucket: AxolotlFromBucket(false),
5242        }
5243    }
5244}
5245
5246#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5247/// A metadata field for [Bee].
5248pub struct HasNectar(pub bool);
5249#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5250/// A metadata field for [Bee].
5251pub struct HasStung(pub bool);
5252#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5253/// A metadata field for [Bee].
5254pub struct BeeRolling(pub bool);
5255/// A metadata field for [Bee].
5256#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5257pub struct BeeAngerEndTime(pub i64);
5258/// The marker component for entities of type `minecraft:bee`.
5259///
5260/// # Metadata
5261///
5262/// These are the metadata components that all `Bee` entities are guaranteed to
5263/// have, in addition to the metadata components from parent types:
5264///
5265/// - [HasNectar]
5266/// - [HasStung]
5267/// - [BeeRolling]
5268/// - [BeeAngerEndTime]
5269///
5270/// # Parents
5271///
5272/// Entities with `Bee` will also have the following marker components and their
5273/// metadata fields:
5274///
5275/// - [AbstractAnimal]
5276/// - [AbstractAgeable]
5277/// - [AbstractCreature]
5278/// - [AbstractInsentient]
5279/// - [AbstractLiving]
5280/// - [AbstractEntity]
5281///
5282/// # Children
5283///
5284/// This entity type has no children types.
5285#[derive(Component)]
5286pub struct Bee;
5287impl Bee {
5288    fn apply_metadata(
5289        entity: &mut bevy_ecs::system::EntityCommands,
5290        d: EntityDataItem,
5291    ) -> Result<(), UpdateMetadataError> {
5292        match d.index {
5293            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5294            18 => {
5295                let bitfield = d.value.into_byte()?;
5296                entity.insert(HasNectar(bitfield & 0x8 != 0));
5297                entity.insert(HasStung(bitfield & 0x4 != 0));
5298                entity.insert(BeeRolling(bitfield & 0x2 != 0));
5299            }
5300            19 => {
5301                entity.insert(BeeAngerEndTime(d.value.into_long()?));
5302            }
5303            _ => {}
5304        }
5305        Ok(())
5306    }
5307}
5308
5309/// The metadata bundle for [Bee].
5310///
5311/// This type should generally not be used directly.
5312#[derive(Bundle)]
5313pub struct BeeMetadataBundle {
5314    _marker: Bee,
5315    parent: AbstractAnimalMetadataBundle,
5316    has_nectar: HasNectar,
5317    has_stung: HasStung,
5318    bee_rolling: BeeRolling,
5319    bee_anger_end_time: BeeAngerEndTime,
5320}
5321impl Default for BeeMetadataBundle {
5322    fn default() -> Self {
5323        Self {
5324            _marker: Bee,
5325            parent: Default::default(),
5326            has_nectar: HasNectar(false),
5327            has_stung: HasStung(false),
5328            bee_rolling: BeeRolling(false),
5329            bee_anger_end_time: BeeAngerEndTime(-1),
5330        }
5331    }
5332}
5333
5334/// A metadata field for [Chicken].
5335#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5336pub struct ChickenVariant(pub azalea_registry::data::ChickenVariant);
5337/// A metadata field for [Chicken].
5338#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5339pub struct ChickenSoundVariant(pub azalea_registry::data::ChickenSoundVariant);
5340/// The marker component for entities of type `minecraft:chicken`.
5341///
5342/// # Metadata
5343///
5344/// These are the metadata components that all `Chicken` entities are guaranteed
5345/// to have, in addition to the metadata components from parent types:
5346///
5347/// - [ChickenVariant]
5348/// - [ChickenSoundVariant]
5349///
5350/// # Parents
5351///
5352/// Entities with `Chicken` will also have the following marker components and
5353/// their metadata fields:
5354///
5355/// - [AbstractAnimal]
5356/// - [AbstractAgeable]
5357/// - [AbstractCreature]
5358/// - [AbstractInsentient]
5359/// - [AbstractLiving]
5360/// - [AbstractEntity]
5361///
5362/// # Children
5363///
5364/// This entity type has no children types.
5365#[derive(Component)]
5366pub struct Chicken;
5367impl Chicken {
5368    fn apply_metadata(
5369        entity: &mut bevy_ecs::system::EntityCommands,
5370        d: EntityDataItem,
5371    ) -> Result<(), UpdateMetadataError> {
5372        match d.index {
5373            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5374            18 => {
5375                entity.insert(ChickenVariant(d.value.into_chicken_variant()?));
5376            }
5377            19 => {
5378                entity.insert(ChickenSoundVariant(d.value.into_chicken_sound_variant()?));
5379            }
5380            _ => {}
5381        }
5382        Ok(())
5383    }
5384}
5385
5386/// The metadata bundle for [Chicken].
5387///
5388/// This type should generally not be used directly.
5389#[derive(Bundle)]
5390pub struct ChickenMetadataBundle {
5391    _marker: Chicken,
5392    parent: AbstractAnimalMetadataBundle,
5393    chicken_variant: ChickenVariant,
5394    chicken_sound_variant: ChickenSoundVariant,
5395}
5396impl Default for ChickenMetadataBundle {
5397    fn default() -> Self {
5398        Self {
5399            _marker: Chicken,
5400            parent: Default::default(),
5401            chicken_variant: ChickenVariant(azalea_registry::data::ChickenVariant::new_raw(0)),
5402            chicken_sound_variant: ChickenSoundVariant(
5403                azalea_registry::data::ChickenSoundVariant::new_raw(0),
5404            ),
5405        }
5406    }
5407}
5408
5409/// A metadata field for [Cow].
5410#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5411pub struct CowVariant(pub azalea_registry::data::CowVariant);
5412/// A metadata field for [Cow].
5413#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5414pub struct CowSoundVariant(pub azalea_registry::data::CowSoundVariant);
5415/// The marker component for entities of type `minecraft:cow`.
5416///
5417/// # Metadata
5418///
5419/// These are the metadata components that all `Cow` entities are guaranteed to
5420/// have, in addition to the metadata components from parent types:
5421///
5422/// - [CowVariant]
5423/// - [CowSoundVariant]
5424///
5425/// # Parents
5426///
5427/// Entities with `Cow` will also have the following marker components and their
5428/// metadata fields:
5429///
5430/// - [AbstractAnimal]
5431/// - [AbstractAgeable]
5432/// - [AbstractCreature]
5433/// - [AbstractInsentient]
5434/// - [AbstractLiving]
5435/// - [AbstractEntity]
5436///
5437/// # Children
5438///
5439/// This entity type has no children types.
5440#[derive(Component)]
5441pub struct Cow;
5442impl Cow {
5443    fn apply_metadata(
5444        entity: &mut bevy_ecs::system::EntityCommands,
5445        d: EntityDataItem,
5446    ) -> Result<(), UpdateMetadataError> {
5447        match d.index {
5448            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5449            18 => {
5450                entity.insert(CowVariant(d.value.into_cow_variant()?));
5451            }
5452            19 => {
5453                entity.insert(CowSoundVariant(d.value.into_cow_sound_variant()?));
5454            }
5455            _ => {}
5456        }
5457        Ok(())
5458    }
5459}
5460
5461/// The metadata bundle for [Cow].
5462///
5463/// This type should generally not be used directly.
5464#[derive(Bundle)]
5465pub struct CowMetadataBundle {
5466    _marker: Cow,
5467    parent: AbstractAnimalMetadataBundle,
5468    cow_variant: CowVariant,
5469    cow_sound_variant: CowSoundVariant,
5470}
5471impl Default for CowMetadataBundle {
5472    fn default() -> Self {
5473        Self {
5474            _marker: Cow,
5475            parent: Default::default(),
5476            cow_variant: CowVariant(azalea_registry::data::CowVariant::new_raw(0)),
5477            cow_sound_variant: CowSoundVariant(azalea_registry::data::CowSoundVariant::new_raw(0)),
5478        }
5479    }
5480}
5481
5482/// A metadata field for [Fox].
5483#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5484pub struct FoxKind(pub i32);
5485#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5486/// A metadata field for [Fox].
5487pub struct FoxSitting(pub bool);
5488#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5489/// A metadata field for [Fox].
5490pub struct Faceplanted(pub bool);
5491#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5492/// A metadata field for [Fox].
5493pub struct Defending(pub bool);
5494#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5495/// A metadata field for [Fox].
5496pub struct Sleeping(pub bool);
5497#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5498/// A metadata field for [Fox].
5499pub struct Pouncing(pub bool);
5500#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5501/// A metadata field for [Fox].
5502pub struct FoxCrouching(pub bool);
5503#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5504/// A metadata field for [Fox].
5505pub struct FoxInterested(pub bool);
5506/// A metadata field for [Fox].
5507#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5508pub struct TrustedId0(pub Option<Uuid>);
5509/// A metadata field for [Fox].
5510#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5511pub struct TrustedId1(pub Option<Uuid>);
5512/// The marker component for entities of type `minecraft:fox`.
5513///
5514/// # Metadata
5515///
5516/// These are the metadata components that all `Fox` entities are guaranteed to
5517/// have, in addition to the metadata components from parent types:
5518///
5519/// - [FoxKind]
5520/// - [FoxSitting]
5521/// - [Faceplanted]
5522/// - [Defending]
5523/// - [Sleeping]
5524/// - [Pouncing]
5525/// - [FoxCrouching]
5526/// - [FoxInterested]
5527/// - [TrustedId0]
5528/// - [TrustedId1]
5529///
5530/// # Parents
5531///
5532/// Entities with `Fox` will also have the following marker components and their
5533/// metadata fields:
5534///
5535/// - [AbstractAnimal]
5536/// - [AbstractAgeable]
5537/// - [AbstractCreature]
5538/// - [AbstractInsentient]
5539/// - [AbstractLiving]
5540/// - [AbstractEntity]
5541///
5542/// # Children
5543///
5544/// This entity type has no children types.
5545#[derive(Component)]
5546pub struct Fox;
5547impl Fox {
5548    fn apply_metadata(
5549        entity: &mut bevy_ecs::system::EntityCommands,
5550        d: EntityDataItem,
5551    ) -> Result<(), UpdateMetadataError> {
5552        match d.index {
5553            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5554            18 => {
5555                entity.insert(FoxKind(d.value.into_int()?));
5556            }
5557            19 => {
5558                let bitfield = d.value.into_byte()?;
5559                entity.insert(FoxSitting(bitfield & 0x1 != 0));
5560                entity.insert(Faceplanted(bitfield & 0x40 != 0));
5561                entity.insert(Defending(bitfield & 0x80 != 0));
5562                entity.insert(Sleeping(bitfield & 0x20 != 0));
5563                entity.insert(Pouncing(bitfield & 0x10 != 0));
5564                entity.insert(FoxCrouching(bitfield & 0x4 != 0));
5565                entity.insert(FoxInterested(bitfield & 0x8 != 0));
5566            }
5567            20 => {
5568                entity.insert(TrustedId0(d.value.into_optional_living_entity_reference()?));
5569            }
5570            21 => {
5571                entity.insert(TrustedId1(d.value.into_optional_living_entity_reference()?));
5572            }
5573            _ => {}
5574        }
5575        Ok(())
5576    }
5577}
5578
5579/// The metadata bundle for [Fox].
5580///
5581/// This type should generally not be used directly.
5582#[derive(Bundle)]
5583pub struct FoxMetadataBundle {
5584    _marker: Fox,
5585    parent: AbstractAnimalMetadataBundle,
5586    fox_kind: FoxKind,
5587    fox_sitting: FoxSitting,
5588    faceplanted: Faceplanted,
5589    defending: Defending,
5590    sleeping: Sleeping,
5591    pouncing: Pouncing,
5592    fox_crouching: FoxCrouching,
5593    fox_interested: FoxInterested,
5594    trusted_id_0: TrustedId0,
5595    trusted_id_1: TrustedId1,
5596}
5597impl Default for FoxMetadataBundle {
5598    fn default() -> Self {
5599        Self {
5600            _marker: Fox,
5601            parent: Default::default(),
5602            fox_kind: FoxKind(Default::default()),
5603            fox_sitting: FoxSitting(false),
5604            faceplanted: Faceplanted(false),
5605            defending: Defending(false),
5606            sleeping: Sleeping(false),
5607            pouncing: Pouncing(false),
5608            fox_crouching: FoxCrouching(false),
5609            fox_interested: FoxInterested(false),
5610            trusted_id_0: TrustedId0(None),
5611            trusted_id_1: TrustedId1(None),
5612        }
5613    }
5614}
5615
5616/// A metadata field for [Frog].
5617#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5618pub struct FrogVariant(pub azalea_registry::data::FrogVariant);
5619/// A metadata field for [Frog].
5620#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5621pub struct TongueTarget(pub OptionalUnsignedInt);
5622/// The marker component for entities of type `minecraft:frog`.
5623///
5624/// # Metadata
5625///
5626/// These are the metadata components that all `Frog` entities are guaranteed to
5627/// have, in addition to the metadata components from parent types:
5628///
5629/// - [FrogVariant]
5630/// - [TongueTarget]
5631///
5632/// # Parents
5633///
5634/// Entities with `Frog` will also have the following marker components and
5635/// their metadata fields:
5636///
5637/// - [AbstractAnimal]
5638/// - [AbstractAgeable]
5639/// - [AbstractCreature]
5640/// - [AbstractInsentient]
5641/// - [AbstractLiving]
5642/// - [AbstractEntity]
5643///
5644/// # Children
5645///
5646/// This entity type has no children types.
5647#[derive(Component)]
5648pub struct Frog;
5649impl Frog {
5650    fn apply_metadata(
5651        entity: &mut bevy_ecs::system::EntityCommands,
5652        d: EntityDataItem,
5653    ) -> Result<(), UpdateMetadataError> {
5654        match d.index {
5655            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5656            18 => {
5657                entity.insert(FrogVariant(d.value.into_frog_variant()?));
5658            }
5659            19 => {
5660                entity.insert(TongueTarget(d.value.into_optional_unsigned_int()?));
5661            }
5662            _ => {}
5663        }
5664        Ok(())
5665    }
5666}
5667
5668/// The metadata bundle for [Frog].
5669///
5670/// This type should generally not be used directly.
5671#[derive(Bundle)]
5672pub struct FrogMetadataBundle {
5673    _marker: Frog,
5674    parent: AbstractAnimalMetadataBundle,
5675    frog_variant: FrogVariant,
5676    tongue_target: TongueTarget,
5677}
5678impl Default for FrogMetadataBundle {
5679    fn default() -> Self {
5680        Self {
5681            _marker: Frog,
5682            parent: Default::default(),
5683            frog_variant: FrogVariant(azalea_registry::data::FrogVariant::new_raw(0)),
5684            tongue_target: TongueTarget(OptionalUnsignedInt(None)),
5685        }
5686    }
5687}
5688
5689/// A metadata field for [Goat].
5690#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5691pub struct IsScreamingGoat(pub bool);
5692/// A metadata field for [Goat].
5693#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5694pub struct HasLeftHorn(pub bool);
5695/// A metadata field for [Goat].
5696#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5697pub struct HasRightHorn(pub bool);
5698/// The marker component for entities of type `minecraft:goat`.
5699///
5700/// # Metadata
5701///
5702/// These are the metadata components that all `Goat` entities are guaranteed to
5703/// have, in addition to the metadata components from parent types:
5704///
5705/// - [IsScreamingGoat]
5706/// - [HasLeftHorn]
5707/// - [HasRightHorn]
5708///
5709/// # Parents
5710///
5711/// Entities with `Goat` will also have the following marker components and
5712/// their metadata fields:
5713///
5714/// - [AbstractAnimal]
5715/// - [AbstractAgeable]
5716/// - [AbstractCreature]
5717/// - [AbstractInsentient]
5718/// - [AbstractLiving]
5719/// - [AbstractEntity]
5720///
5721/// # Children
5722///
5723/// This entity type has no children types.
5724#[derive(Component)]
5725pub struct Goat;
5726impl Goat {
5727    fn apply_metadata(
5728        entity: &mut bevy_ecs::system::EntityCommands,
5729        d: EntityDataItem,
5730    ) -> Result<(), UpdateMetadataError> {
5731        match d.index {
5732            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5733            18 => {
5734                entity.insert(IsScreamingGoat(d.value.into_boolean()?));
5735            }
5736            19 => {
5737                entity.insert(HasLeftHorn(d.value.into_boolean()?));
5738            }
5739            20 => {
5740                entity.insert(HasRightHorn(d.value.into_boolean()?));
5741            }
5742            _ => {}
5743        }
5744        Ok(())
5745    }
5746}
5747
5748/// The metadata bundle for [Goat].
5749///
5750/// This type should generally not be used directly.
5751#[derive(Bundle)]
5752pub struct GoatMetadataBundle {
5753    _marker: Goat,
5754    parent: AbstractAnimalMetadataBundle,
5755    is_screaming_goat: IsScreamingGoat,
5756    has_left_horn: HasLeftHorn,
5757    has_right_horn: HasRightHorn,
5758}
5759impl Default for GoatMetadataBundle {
5760    fn default() -> Self {
5761        Self {
5762            _marker: Goat,
5763            parent: Default::default(),
5764            is_screaming_goat: IsScreamingGoat(false),
5765            has_left_horn: HasLeftHorn(true),
5766            has_right_horn: HasRightHorn(true),
5767        }
5768    }
5769}
5770
5771/// A metadata field for [HappyGhast].
5772#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5773pub struct IsLeashHolder(pub bool);
5774/// A metadata field for [HappyGhast].
5775#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5776pub struct StaysStill(pub bool);
5777/// The marker component for entities of type `minecraft:happy_ghast`.
5778///
5779/// # Metadata
5780///
5781/// These are the metadata components that all `HappyGhast` entities are
5782/// guaranteed to have, in addition to the metadata components from parent
5783/// types:
5784///
5785/// - [IsLeashHolder]
5786/// - [StaysStill]
5787///
5788/// # Parents
5789///
5790/// Entities with `HappyGhast` will also have the following marker components
5791/// and their metadata fields:
5792///
5793/// - [AbstractAnimal]
5794/// - [AbstractAgeable]
5795/// - [AbstractCreature]
5796/// - [AbstractInsentient]
5797/// - [AbstractLiving]
5798/// - [AbstractEntity]
5799///
5800/// # Children
5801///
5802/// This entity type has no children types.
5803#[derive(Component)]
5804pub struct HappyGhast;
5805impl HappyGhast {
5806    fn apply_metadata(
5807        entity: &mut bevy_ecs::system::EntityCommands,
5808        d: EntityDataItem,
5809    ) -> Result<(), UpdateMetadataError> {
5810        match d.index {
5811            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5812            18 => {
5813                entity.insert(IsLeashHolder(d.value.into_boolean()?));
5814            }
5815            19 => {
5816                entity.insert(StaysStill(d.value.into_boolean()?));
5817            }
5818            _ => {}
5819        }
5820        Ok(())
5821    }
5822}
5823
5824/// The metadata bundle for [HappyGhast].
5825///
5826/// This type should generally not be used directly.
5827#[derive(Bundle)]
5828pub struct HappyGhastMetadataBundle {
5829    _marker: HappyGhast,
5830    parent: AbstractAnimalMetadataBundle,
5831    is_leash_holder: IsLeashHolder,
5832    stays_still: StaysStill,
5833}
5834impl Default for HappyGhastMetadataBundle {
5835    fn default() -> Self {
5836        Self {
5837            _marker: HappyGhast,
5838            parent: Default::default(),
5839            is_leash_holder: IsLeashHolder(false),
5840            stays_still: StaysStill(false),
5841        }
5842    }
5843}
5844
5845/// A metadata field for [Hoglin].
5846#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5847pub struct HoglinImmuneToZombification(pub bool);
5848/// The marker component for entities of type `minecraft:hoglin`.
5849///
5850/// # Metadata
5851///
5852/// These are the metadata components that all `Hoglin` entities are guaranteed
5853/// to have, in addition to the metadata components from parent types:
5854///
5855/// - [HoglinImmuneToZombification]
5856///
5857/// # Parents
5858///
5859/// Entities with `Hoglin` will also have the following marker components and
5860/// their metadata fields:
5861///
5862/// - [AbstractAnimal]
5863/// - [AbstractAgeable]
5864/// - [AbstractCreature]
5865/// - [AbstractInsentient]
5866/// - [AbstractLiving]
5867/// - [AbstractEntity]
5868///
5869/// # Children
5870///
5871/// This entity type has no children types.
5872#[derive(Component)]
5873pub struct Hoglin;
5874impl Hoglin {
5875    fn apply_metadata(
5876        entity: &mut bevy_ecs::system::EntityCommands,
5877        d: EntityDataItem,
5878    ) -> Result<(), UpdateMetadataError> {
5879        match d.index {
5880            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5881            18 => {
5882                entity.insert(HoglinImmuneToZombification(d.value.into_boolean()?));
5883            }
5884            _ => {}
5885        }
5886        Ok(())
5887    }
5888}
5889
5890/// The metadata bundle for [Hoglin].
5891///
5892/// This type should generally not be used directly.
5893#[derive(Bundle)]
5894pub struct HoglinMetadataBundle {
5895    _marker: Hoglin,
5896    parent: AbstractAnimalMetadataBundle,
5897    hoglin_immune_to_zombification: HoglinImmuneToZombification,
5898}
5899impl Default for HoglinMetadataBundle {
5900    fn default() -> Self {
5901        Self {
5902            _marker: Hoglin,
5903            parent: Default::default(),
5904            hoglin_immune_to_zombification: HoglinImmuneToZombification(false),
5905        }
5906    }
5907}
5908
5909/// A metadata field for [Mooshroom].
5910#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5911pub struct MooshroomKind(pub i32);
5912/// The marker component for entities of type `minecraft:mooshroom`.
5913///
5914/// # Metadata
5915///
5916/// These are the metadata components that all `Mooshroom` entities are
5917/// guaranteed to have, in addition to the metadata components from parent
5918/// types:
5919///
5920/// - [MooshroomKind]
5921///
5922/// # Parents
5923///
5924/// Entities with `Mooshroom` will also have the following marker components and
5925/// their metadata fields:
5926///
5927/// - [AbstractAnimal]
5928/// - [AbstractAgeable]
5929/// - [AbstractCreature]
5930/// - [AbstractInsentient]
5931/// - [AbstractLiving]
5932/// - [AbstractEntity]
5933///
5934/// # Children
5935///
5936/// This entity type has no children types.
5937#[derive(Component)]
5938pub struct Mooshroom;
5939impl Mooshroom {
5940    fn apply_metadata(
5941        entity: &mut bevy_ecs::system::EntityCommands,
5942        d: EntityDataItem,
5943    ) -> Result<(), UpdateMetadataError> {
5944        match d.index {
5945            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5946            18 => {
5947                entity.insert(MooshroomKind(d.value.into_int()?));
5948            }
5949            _ => {}
5950        }
5951        Ok(())
5952    }
5953}
5954
5955/// The metadata bundle for [Mooshroom].
5956///
5957/// This type should generally not be used directly.
5958#[derive(Bundle)]
5959pub struct MooshroomMetadataBundle {
5960    _marker: Mooshroom,
5961    parent: AbstractAnimalMetadataBundle,
5962    mooshroom_kind: MooshroomKind,
5963}
5964impl Default for MooshroomMetadataBundle {
5965    fn default() -> Self {
5966        Self {
5967            _marker: Mooshroom,
5968            parent: Default::default(),
5969            mooshroom_kind: MooshroomKind(Default::default()),
5970        }
5971    }
5972}
5973
5974/// A metadata field for [Ocelot].
5975#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5976pub struct Trusting(pub bool);
5977/// The marker component for entities of type `minecraft:ocelot`.
5978///
5979/// # Metadata
5980///
5981/// These are the metadata components that all `Ocelot` entities are guaranteed
5982/// to have, in addition to the metadata components from parent types:
5983///
5984/// - [Trusting]
5985///
5986/// # Parents
5987///
5988/// Entities with `Ocelot` will also have the following marker components and
5989/// their metadata fields:
5990///
5991/// - [AbstractAnimal]
5992/// - [AbstractAgeable]
5993/// - [AbstractCreature]
5994/// - [AbstractInsentient]
5995/// - [AbstractLiving]
5996/// - [AbstractEntity]
5997///
5998/// # Children
5999///
6000/// This entity type has no children types.
6001#[derive(Component)]
6002pub struct Ocelot;
6003impl Ocelot {
6004    fn apply_metadata(
6005        entity: &mut bevy_ecs::system::EntityCommands,
6006        d: EntityDataItem,
6007    ) -> Result<(), UpdateMetadataError> {
6008        match d.index {
6009            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6010            18 => {
6011                entity.insert(Trusting(d.value.into_boolean()?));
6012            }
6013            _ => {}
6014        }
6015        Ok(())
6016    }
6017}
6018
6019/// The metadata bundle for [Ocelot].
6020///
6021/// This type should generally not be used directly.
6022#[derive(Bundle)]
6023pub struct OcelotMetadataBundle {
6024    _marker: Ocelot,
6025    parent: AbstractAnimalMetadataBundle,
6026    trusting: Trusting,
6027}
6028impl Default for OcelotMetadataBundle {
6029    fn default() -> Self {
6030        Self {
6031            _marker: Ocelot,
6032            parent: Default::default(),
6033            trusting: Trusting(false),
6034        }
6035    }
6036}
6037
6038/// A metadata field for [Panda].
6039#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6040pub struct PandaUnhappyCounter(pub i32);
6041/// A metadata field for [Panda].
6042#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6043pub struct SneezeCounter(pub i32);
6044/// A metadata field for [Panda].
6045#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6046pub struct EatCounter(pub i32);
6047#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6048/// A metadata field for [Panda].
6049pub struct Sneezing(pub bool);
6050#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6051/// A metadata field for [Panda].
6052pub struct PandaSitting(pub bool);
6053#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6054/// A metadata field for [Panda].
6055pub struct OnBack(pub bool);
6056#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6057/// A metadata field for [Panda].
6058pub struct PandaRolling(pub bool);
6059/// A metadata field for [Panda].
6060#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6061pub struct HiddenGene(pub u8);
6062/// A metadata field for [Panda].
6063#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6064pub struct PandaFlags(pub u8);
6065/// The marker component for entities of type `minecraft:panda`.
6066///
6067/// # Metadata
6068///
6069/// These are the metadata components that all `Panda` entities are guaranteed
6070/// to have, in addition to the metadata components from parent types:
6071///
6072/// - [PandaUnhappyCounter]
6073/// - [SneezeCounter]
6074/// - [EatCounter]
6075/// - [Sneezing]
6076/// - [PandaSitting]
6077/// - [OnBack]
6078/// - [PandaRolling]
6079/// - [HiddenGene]
6080/// - [PandaFlags]
6081///
6082/// # Parents
6083///
6084/// Entities with `Panda` will also have the following marker components and
6085/// their metadata fields:
6086///
6087/// - [AbstractAnimal]
6088/// - [AbstractAgeable]
6089/// - [AbstractCreature]
6090/// - [AbstractInsentient]
6091/// - [AbstractLiving]
6092/// - [AbstractEntity]
6093///
6094/// # Children
6095///
6096/// This entity type has no children types.
6097#[derive(Component)]
6098pub struct Panda;
6099impl Panda {
6100    fn apply_metadata(
6101        entity: &mut bevy_ecs::system::EntityCommands,
6102        d: EntityDataItem,
6103    ) -> Result<(), UpdateMetadataError> {
6104        match d.index {
6105            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6106            18 => {
6107                entity.insert(PandaUnhappyCounter(d.value.into_int()?));
6108            }
6109            19 => {
6110                entity.insert(SneezeCounter(d.value.into_int()?));
6111            }
6112            20 => {
6113                entity.insert(EatCounter(d.value.into_int()?));
6114            }
6115            21 => {
6116                let bitfield = d.value.into_byte()?;
6117                entity.insert(Sneezing(bitfield & 0x2 != 0));
6118                entity.insert(PandaSitting(bitfield & 0x8 != 0));
6119                entity.insert(OnBack(bitfield & 0x10 != 0));
6120                entity.insert(PandaRolling(bitfield & 0x4 != 0));
6121            }
6122            22 => {
6123                entity.insert(HiddenGene(d.value.into_byte()?));
6124            }
6125            23 => {
6126                entity.insert(PandaFlags(d.value.into_byte()?));
6127            }
6128            _ => {}
6129        }
6130        Ok(())
6131    }
6132}
6133
6134/// The metadata bundle for [Panda].
6135///
6136/// This type should generally not be used directly.
6137#[derive(Bundle)]
6138pub struct PandaMetadataBundle {
6139    _marker: Panda,
6140    parent: AbstractAnimalMetadataBundle,
6141    panda_unhappy_counter: PandaUnhappyCounter,
6142    sneeze_counter: SneezeCounter,
6143    eat_counter: EatCounter,
6144    sneezing: Sneezing,
6145    panda_sitting: PandaSitting,
6146    on_back: OnBack,
6147    panda_rolling: PandaRolling,
6148    hidden_gene: HiddenGene,
6149    panda_flags: PandaFlags,
6150}
6151impl Default for PandaMetadataBundle {
6152    fn default() -> Self {
6153        Self {
6154            _marker: Panda,
6155            parent: Default::default(),
6156            panda_unhappy_counter: PandaUnhappyCounter(0),
6157            sneeze_counter: SneezeCounter(0),
6158            eat_counter: EatCounter(0),
6159            sneezing: Sneezing(false),
6160            panda_sitting: PandaSitting(false),
6161            on_back: OnBack(false),
6162            panda_rolling: PandaRolling(false),
6163            hidden_gene: HiddenGene(0),
6164            panda_flags: PandaFlags(0),
6165        }
6166    }
6167}
6168
6169/// A metadata field for [Pig].
6170#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6171pub struct PigBoostTime(pub i32);
6172/// A metadata field for [Pig].
6173#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6174pub struct PigVariant(pub azalea_registry::data::PigVariant);
6175/// A metadata field for [Pig].
6176#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6177pub struct PigSoundVariant(pub azalea_registry::data::PigSoundVariant);
6178/// The marker component for entities of type `minecraft:pig`.
6179///
6180/// # Metadata
6181///
6182/// These are the metadata components that all `Pig` entities are guaranteed to
6183/// have, in addition to the metadata components from parent types:
6184///
6185/// - [PigBoostTime]
6186/// - [PigVariant]
6187/// - [PigSoundVariant]
6188///
6189/// # Parents
6190///
6191/// Entities with `Pig` will also have the following marker components and their
6192/// metadata fields:
6193///
6194/// - [AbstractAnimal]
6195/// - [AbstractAgeable]
6196/// - [AbstractCreature]
6197/// - [AbstractInsentient]
6198/// - [AbstractLiving]
6199/// - [AbstractEntity]
6200///
6201/// # Children
6202///
6203/// This entity type has no children types.
6204#[derive(Component)]
6205pub struct Pig;
6206impl Pig {
6207    fn apply_metadata(
6208        entity: &mut bevy_ecs::system::EntityCommands,
6209        d: EntityDataItem,
6210    ) -> Result<(), UpdateMetadataError> {
6211        match d.index {
6212            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6213            18 => {
6214                entity.insert(PigBoostTime(d.value.into_int()?));
6215            }
6216            19 => {
6217                entity.insert(PigVariant(d.value.into_pig_variant()?));
6218            }
6219            20 => {
6220                entity.insert(PigSoundVariant(d.value.into_pig_sound_variant()?));
6221            }
6222            _ => {}
6223        }
6224        Ok(())
6225    }
6226}
6227
6228/// The metadata bundle for [Pig].
6229///
6230/// This type should generally not be used directly.
6231#[derive(Bundle)]
6232pub struct PigMetadataBundle {
6233    _marker: Pig,
6234    parent: AbstractAnimalMetadataBundle,
6235    pig_boost_time: PigBoostTime,
6236    pig_variant: PigVariant,
6237    pig_sound_variant: PigSoundVariant,
6238}
6239impl Default for PigMetadataBundle {
6240    fn default() -> Self {
6241        Self {
6242            _marker: Pig,
6243            parent: Default::default(),
6244            pig_boost_time: PigBoostTime(0),
6245            pig_variant: PigVariant(azalea_registry::data::PigVariant::new_raw(0)),
6246            pig_sound_variant: PigSoundVariant(azalea_registry::data::PigSoundVariant::new_raw(0)),
6247        }
6248    }
6249}
6250
6251/// A metadata field for [PolarBear].
6252#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6253pub struct PolarBearStanding(pub bool);
6254/// The marker component for entities of type `minecraft:polar_bear`.
6255///
6256/// # Metadata
6257///
6258/// These are the metadata components that all `PolarBear` entities are
6259/// guaranteed to have, in addition to the metadata components from parent
6260/// types:
6261///
6262/// - [PolarBearStanding]
6263///
6264/// # Parents
6265///
6266/// Entities with `PolarBear` will also have the following marker components and
6267/// their metadata fields:
6268///
6269/// - [AbstractAnimal]
6270/// - [AbstractAgeable]
6271/// - [AbstractCreature]
6272/// - [AbstractInsentient]
6273/// - [AbstractLiving]
6274/// - [AbstractEntity]
6275///
6276/// # Children
6277///
6278/// This entity type has no children types.
6279#[derive(Component)]
6280pub struct PolarBear;
6281impl PolarBear {
6282    fn apply_metadata(
6283        entity: &mut bevy_ecs::system::EntityCommands,
6284        d: EntityDataItem,
6285    ) -> Result<(), UpdateMetadataError> {
6286        match d.index {
6287            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6288            18 => {
6289                entity.insert(PolarBearStanding(d.value.into_boolean()?));
6290            }
6291            _ => {}
6292        }
6293        Ok(())
6294    }
6295}
6296
6297/// The metadata bundle for [PolarBear].
6298///
6299/// This type should generally not be used directly.
6300#[derive(Bundle)]
6301pub struct PolarBearMetadataBundle {
6302    _marker: PolarBear,
6303    parent: AbstractAnimalMetadataBundle,
6304    polar_bear_standing: PolarBearStanding,
6305}
6306impl Default for PolarBearMetadataBundle {
6307    fn default() -> Self {
6308        Self {
6309            _marker: PolarBear,
6310            parent: Default::default(),
6311            polar_bear_standing: PolarBearStanding(false),
6312        }
6313    }
6314}
6315
6316/// A metadata field for [Rabbit].
6317#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6318pub struct RabbitKind(pub i32);
6319/// The marker component for entities of type `minecraft:rabbit`.
6320///
6321/// # Metadata
6322///
6323/// These are the metadata components that all `Rabbit` entities are guaranteed
6324/// to have, in addition to the metadata components from parent types:
6325///
6326/// - [RabbitKind]
6327///
6328/// # Parents
6329///
6330/// Entities with `Rabbit` will also have the following marker components and
6331/// their metadata fields:
6332///
6333/// - [AbstractAnimal]
6334/// - [AbstractAgeable]
6335/// - [AbstractCreature]
6336/// - [AbstractInsentient]
6337/// - [AbstractLiving]
6338/// - [AbstractEntity]
6339///
6340/// # Children
6341///
6342/// This entity type has no children types.
6343#[derive(Component)]
6344pub struct Rabbit;
6345impl Rabbit {
6346    fn apply_metadata(
6347        entity: &mut bevy_ecs::system::EntityCommands,
6348        d: EntityDataItem,
6349    ) -> Result<(), UpdateMetadataError> {
6350        match d.index {
6351            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6352            18 => {
6353                entity.insert(RabbitKind(d.value.into_int()?));
6354            }
6355            _ => {}
6356        }
6357        Ok(())
6358    }
6359}
6360
6361/// The metadata bundle for [Rabbit].
6362///
6363/// This type should generally not be used directly.
6364#[derive(Bundle)]
6365pub struct RabbitMetadataBundle {
6366    _marker: Rabbit,
6367    parent: AbstractAnimalMetadataBundle,
6368    rabbit_kind: RabbitKind,
6369}
6370impl Default for RabbitMetadataBundle {
6371    fn default() -> Self {
6372        Self {
6373            _marker: Rabbit,
6374            parent: Default::default(),
6375            rabbit_kind: RabbitKind(Default::default()),
6376        }
6377    }
6378}
6379
6380#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6381/// A metadata field for [Sheep].
6382pub struct SheepSheared(pub bool);
6383/// The marker component for entities of type `minecraft:sheep`.
6384///
6385/// # Metadata
6386///
6387/// These are the metadata components that all `Sheep` entities are guaranteed
6388/// to have, in addition to the metadata components from parent types:
6389///
6390/// - [SheepSheared]
6391///
6392/// # Parents
6393///
6394/// Entities with `Sheep` will also have the following marker components and
6395/// their metadata fields:
6396///
6397/// - [AbstractAnimal]
6398/// - [AbstractAgeable]
6399/// - [AbstractCreature]
6400/// - [AbstractInsentient]
6401/// - [AbstractLiving]
6402/// - [AbstractEntity]
6403///
6404/// # Children
6405///
6406/// This entity type has no children types.
6407#[derive(Component)]
6408pub struct Sheep;
6409impl Sheep {
6410    fn apply_metadata(
6411        entity: &mut bevy_ecs::system::EntityCommands,
6412        d: EntityDataItem,
6413    ) -> Result<(), UpdateMetadataError> {
6414        match d.index {
6415            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6416            18 => {
6417                let bitfield = d.value.into_byte()?;
6418                entity.insert(SheepSheared(bitfield & 0x10 != 0));
6419            }
6420            _ => {}
6421        }
6422        Ok(())
6423    }
6424}
6425
6426/// The metadata bundle for [Sheep].
6427///
6428/// This type should generally not be used directly.
6429#[derive(Bundle)]
6430pub struct SheepMetadataBundle {
6431    _marker: Sheep,
6432    parent: AbstractAnimalMetadataBundle,
6433    sheep_sheared: SheepSheared,
6434}
6435impl Default for SheepMetadataBundle {
6436    fn default() -> Self {
6437        Self {
6438            _marker: Sheep,
6439            parent: Default::default(),
6440            sheep_sheared: SheepSheared(false),
6441        }
6442    }
6443}
6444
6445/// A metadata field for [Sniffer].
6446#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6447pub struct SnifferState(pub SnifferStateKind);
6448/// A metadata field for [Sniffer].
6449#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6450pub struct DropSeedAtTick(pub i32);
6451/// The marker component for entities of type `minecraft:sniffer`.
6452///
6453/// # Metadata
6454///
6455/// These are the metadata components that all `Sniffer` entities are guaranteed
6456/// to have, in addition to the metadata components from parent types:
6457///
6458/// - [SnifferState]
6459/// - [DropSeedAtTick]
6460///
6461/// # Parents
6462///
6463/// Entities with `Sniffer` will also have the following marker components and
6464/// their metadata fields:
6465///
6466/// - [AbstractAnimal]
6467/// - [AbstractAgeable]
6468/// - [AbstractCreature]
6469/// - [AbstractInsentient]
6470/// - [AbstractLiving]
6471/// - [AbstractEntity]
6472///
6473/// # Children
6474///
6475/// This entity type has no children types.
6476#[derive(Component)]
6477pub struct Sniffer;
6478impl Sniffer {
6479    fn apply_metadata(
6480        entity: &mut bevy_ecs::system::EntityCommands,
6481        d: EntityDataItem,
6482    ) -> Result<(), UpdateMetadataError> {
6483        match d.index {
6484            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6485            18 => {
6486                entity.insert(SnifferState(d.value.into_sniffer_state()?));
6487            }
6488            19 => {
6489                entity.insert(DropSeedAtTick(d.value.into_int()?));
6490            }
6491            _ => {}
6492        }
6493        Ok(())
6494    }
6495}
6496
6497/// The metadata bundle for [Sniffer].
6498///
6499/// This type should generally not be used directly.
6500#[derive(Bundle)]
6501pub struct SnifferMetadataBundle {
6502    _marker: Sniffer,
6503    parent: AbstractAnimalMetadataBundle,
6504    sniffer_state: SnifferState,
6505    drop_seed_at_tick: DropSeedAtTick,
6506}
6507impl Default for SnifferMetadataBundle {
6508    fn default() -> Self {
6509        Self {
6510            _marker: Sniffer,
6511            parent: Default::default(),
6512            sniffer_state: SnifferState(Default::default()),
6513            drop_seed_at_tick: DropSeedAtTick(0),
6514        }
6515    }
6516}
6517
6518/// A metadata field for [Strider].
6519#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6520pub struct StriderBoostTime(pub i32);
6521/// A metadata field for [Strider].
6522#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6523pub struct Suffocating(pub bool);
6524/// The marker component for entities of type `minecraft:strider`.
6525///
6526/// # Metadata
6527///
6528/// These are the metadata components that all `Strider` entities are guaranteed
6529/// to have, in addition to the metadata components from parent types:
6530///
6531/// - [StriderBoostTime]
6532/// - [Suffocating]
6533///
6534/// # Parents
6535///
6536/// Entities with `Strider` will also have the following marker components and
6537/// their metadata fields:
6538///
6539/// - [AbstractAnimal]
6540/// - [AbstractAgeable]
6541/// - [AbstractCreature]
6542/// - [AbstractInsentient]
6543/// - [AbstractLiving]
6544/// - [AbstractEntity]
6545///
6546/// # Children
6547///
6548/// This entity type has no children types.
6549#[derive(Component)]
6550pub struct Strider;
6551impl Strider {
6552    fn apply_metadata(
6553        entity: &mut bevy_ecs::system::EntityCommands,
6554        d: EntityDataItem,
6555    ) -> Result<(), UpdateMetadataError> {
6556        match d.index {
6557            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6558            18 => {
6559                entity.insert(StriderBoostTime(d.value.into_int()?));
6560            }
6561            19 => {
6562                entity.insert(Suffocating(d.value.into_boolean()?));
6563            }
6564            _ => {}
6565        }
6566        Ok(())
6567    }
6568}
6569
6570/// The metadata bundle for [Strider].
6571///
6572/// This type should generally not be used directly.
6573#[derive(Bundle)]
6574pub struct StriderMetadataBundle {
6575    _marker: Strider,
6576    parent: AbstractAnimalMetadataBundle,
6577    strider_boost_time: StriderBoostTime,
6578    suffocating: Suffocating,
6579}
6580impl Default for StriderMetadataBundle {
6581    fn default() -> Self {
6582        Self {
6583            _marker: Strider,
6584            parent: Default::default(),
6585            strider_boost_time: StriderBoostTime(0),
6586            suffocating: Suffocating(false),
6587        }
6588    }
6589}
6590
6591/// A metadata field for [Turtle].
6592#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6593pub struct HasEgg(pub bool);
6594/// A metadata field for [Turtle].
6595#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6596pub struct LayingEgg(pub bool);
6597/// The marker component for entities of type `minecraft:turtle`.
6598///
6599/// # Metadata
6600///
6601/// These are the metadata components that all `Turtle` entities are guaranteed
6602/// to have, in addition to the metadata components from parent types:
6603///
6604/// - [HasEgg]
6605/// - [LayingEgg]
6606///
6607/// # Parents
6608///
6609/// Entities with `Turtle` will also have the following marker components and
6610/// their metadata fields:
6611///
6612/// - [AbstractAnimal]
6613/// - [AbstractAgeable]
6614/// - [AbstractCreature]
6615/// - [AbstractInsentient]
6616/// - [AbstractLiving]
6617/// - [AbstractEntity]
6618///
6619/// # Children
6620///
6621/// This entity type has no children types.
6622#[derive(Component)]
6623pub struct Turtle;
6624impl Turtle {
6625    fn apply_metadata(
6626        entity: &mut bevy_ecs::system::EntityCommands,
6627        d: EntityDataItem,
6628    ) -> Result<(), UpdateMetadataError> {
6629        match d.index {
6630            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6631            18 => {
6632                entity.insert(HasEgg(d.value.into_boolean()?));
6633            }
6634            19 => {
6635                entity.insert(LayingEgg(d.value.into_boolean()?));
6636            }
6637            _ => {}
6638        }
6639        Ok(())
6640    }
6641}
6642
6643/// The metadata bundle for [Turtle].
6644///
6645/// This type should generally not be used directly.
6646#[derive(Bundle)]
6647pub struct TurtleMetadataBundle {
6648    _marker: Turtle,
6649    parent: AbstractAnimalMetadataBundle,
6650    has_egg: HasEgg,
6651    laying_egg: LayingEgg,
6652}
6653impl Default for TurtleMetadataBundle {
6654    fn default() -> Self {
6655        Self {
6656            _marker: Turtle,
6657            parent: Default::default(),
6658            has_egg: HasEgg(false),
6659            laying_egg: LayingEgg(false),
6660        }
6661    }
6662}
6663
6664#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6665/// A metadata field for [AbstractHorse].
6666pub struct Tamed(pub bool);
6667#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6668/// A metadata field for [AbstractHorse].
6669pub struct Eating(pub bool);
6670#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6671/// A metadata field for [AbstractHorse].
6672pub struct AbstractHorseStanding(pub bool);
6673#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6674/// A metadata field for [AbstractHorse].
6675pub struct Bred(pub bool);
6676/// An abstract entity marker component.
6677///
6678/// # Metadata
6679///
6680/// These are the metadata components that all `AbstractHorse` entities are
6681/// guaranteed to have, in addition to the metadata components from parent
6682/// types:
6683///
6684/// - [Tamed]
6685/// - [Eating]
6686/// - [AbstractHorseStanding]
6687/// - [Bred]
6688///
6689/// # Parents
6690///
6691/// Entities with `AbstractHorse` will also have the following marker components
6692/// and their metadata fields:
6693///
6694/// - [AbstractAnimal]
6695/// - [AbstractAgeable]
6696/// - [AbstractCreature]
6697/// - [AbstractInsentient]
6698/// - [AbstractLiving]
6699/// - [AbstractEntity]
6700///
6701/// # Children
6702///
6703/// - [Camel]
6704///   - [CamelHusk]
6705/// - [Horse]
6706/// - [SkeletonHorse]
6707/// - [ZombieHorse]
6708/// - [AbstractChestedHorse]
6709///   - [Donkey]
6710///   - [Llama]
6711///     - [TraderLlama]
6712///   - [Mule]
6713#[derive(Component)]
6714pub struct AbstractHorse;
6715impl AbstractHorse {
6716    fn apply_metadata(
6717        entity: &mut bevy_ecs::system::EntityCommands,
6718        d: EntityDataItem,
6719    ) -> Result<(), UpdateMetadataError> {
6720        match d.index {
6721            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6722            18 => {
6723                let bitfield = d.value.into_byte()?;
6724                entity.insert(Tamed(bitfield & 0x2 != 0));
6725                entity.insert(Eating(bitfield & 0x10 != 0));
6726                entity.insert(AbstractHorseStanding(bitfield & 0x20 != 0));
6727                entity.insert(Bred(bitfield & 0x8 != 0));
6728            }
6729            _ => {}
6730        }
6731        Ok(())
6732    }
6733}
6734
6735/// The metadata bundle for [AbstractHorse].
6736///
6737/// This type should generally not be used directly.
6738#[derive(Bundle)]
6739pub struct AbstractHorseMetadataBundle {
6740    _marker: AbstractHorse,
6741    parent: AbstractAnimalMetadataBundle,
6742    tamed: Tamed,
6743    eating: Eating,
6744    abstract_horse_standing: AbstractHorseStanding,
6745    bred: Bred,
6746}
6747impl Default for AbstractHorseMetadataBundle {
6748    fn default() -> Self {
6749        Self {
6750            _marker: AbstractHorse,
6751            parent: Default::default(),
6752            tamed: Tamed(false),
6753            eating: Eating(false),
6754            abstract_horse_standing: AbstractHorseStanding(false),
6755            bred: Bred(false),
6756        }
6757    }
6758}
6759
6760/// A metadata field for [Camel].
6761#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6762pub struct CamelDash(pub bool);
6763/// A metadata field for [Camel].
6764#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6765pub struct LastPoseChangeTick(pub i64);
6766/// The marker component for entities of type `minecraft:camel`.
6767///
6768/// # Metadata
6769///
6770/// These are the metadata components that all `Camel` entities are guaranteed
6771/// to have, in addition to the metadata components from parent types:
6772///
6773/// - [CamelDash]
6774/// - [LastPoseChangeTick]
6775///
6776/// # Parents
6777///
6778/// Entities with `Camel` will also have the following marker components and
6779/// their metadata fields:
6780///
6781/// - [AbstractHorse]
6782/// - [AbstractAnimal]
6783/// - [AbstractAgeable]
6784/// - [AbstractCreature]
6785/// - [AbstractInsentient]
6786/// - [AbstractLiving]
6787/// - [AbstractEntity]
6788///
6789/// # Children
6790///
6791/// - [CamelHusk]
6792#[derive(Component)]
6793pub struct Camel;
6794impl Camel {
6795    fn apply_metadata(
6796        entity: &mut bevy_ecs::system::EntityCommands,
6797        d: EntityDataItem,
6798    ) -> Result<(), UpdateMetadataError> {
6799        match d.index {
6800            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
6801            19 => {
6802                entity.insert(CamelDash(d.value.into_boolean()?));
6803            }
6804            20 => {
6805                entity.insert(LastPoseChangeTick(d.value.into_long()?));
6806            }
6807            _ => {}
6808        }
6809        Ok(())
6810    }
6811}
6812
6813/// The metadata bundle for [Camel].
6814///
6815/// This type should generally not be used directly.
6816#[derive(Bundle)]
6817pub struct CamelMetadataBundle {
6818    _marker: Camel,
6819    parent: AbstractHorseMetadataBundle,
6820    camel_dash: CamelDash,
6821    last_pose_change_tick: LastPoseChangeTick,
6822}
6823impl Default for CamelMetadataBundle {
6824    fn default() -> Self {
6825        Self {
6826            _marker: Camel,
6827            parent: Default::default(),
6828            camel_dash: CamelDash(false),
6829            last_pose_change_tick: LastPoseChangeTick(0),
6830        }
6831    }
6832}
6833
6834/// The marker component for entities of type `minecraft:camel_husk`.
6835///
6836/// # Metadata
6837///
6838/// This entity type does not add any additional metadata. It will still have
6839/// metadata from parent types.
6840///
6841/// # Parents
6842///
6843/// Entities with `CamelHusk` will also have the following marker components and
6844/// their metadata fields:
6845///
6846/// - [Camel]
6847/// - [AbstractHorse]
6848/// - [AbstractAnimal]
6849/// - [AbstractAgeable]
6850/// - [AbstractCreature]
6851/// - [AbstractInsentient]
6852/// - [AbstractLiving]
6853/// - [AbstractEntity]
6854///
6855/// # Children
6856///
6857/// This entity type has no children types.
6858#[derive(Component)]
6859pub struct CamelHusk;
6860impl CamelHusk {
6861    fn apply_metadata(
6862        entity: &mut bevy_ecs::system::EntityCommands,
6863        d: EntityDataItem,
6864    ) -> Result<(), UpdateMetadataError> {
6865        match d.index {
6866            0..=20 => Camel::apply_metadata(entity, d)?,
6867            _ => {}
6868        }
6869        Ok(())
6870    }
6871}
6872
6873/// The metadata bundle for [CamelHusk].
6874///
6875/// This type should generally not be used directly.
6876#[derive(Bundle)]
6877pub struct CamelHuskMetadataBundle {
6878    _marker: CamelHusk,
6879    parent: CamelMetadataBundle,
6880}
6881impl Default for CamelHuskMetadataBundle {
6882    fn default() -> Self {
6883        Self {
6884            _marker: CamelHusk,
6885            parent: Default::default(),
6886        }
6887    }
6888}
6889
6890/// A metadata field for [Horse].
6891#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6892pub struct HorseTypeVariant(pub i32);
6893/// The marker component for entities of type `minecraft:horse`.
6894///
6895/// # Metadata
6896///
6897/// These are the metadata components that all `Horse` entities are guaranteed
6898/// to have, in addition to the metadata components from parent types:
6899///
6900/// - [HorseTypeVariant]
6901///
6902/// # Parents
6903///
6904/// Entities with `Horse` will also have the following marker components and
6905/// their metadata fields:
6906///
6907/// - [AbstractHorse]
6908/// - [AbstractAnimal]
6909/// - [AbstractAgeable]
6910/// - [AbstractCreature]
6911/// - [AbstractInsentient]
6912/// - [AbstractLiving]
6913/// - [AbstractEntity]
6914///
6915/// # Children
6916///
6917/// This entity type has no children types.
6918#[derive(Component)]
6919pub struct Horse;
6920impl Horse {
6921    fn apply_metadata(
6922        entity: &mut bevy_ecs::system::EntityCommands,
6923        d: EntityDataItem,
6924    ) -> Result<(), UpdateMetadataError> {
6925        match d.index {
6926            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
6927            19 => {
6928                entity.insert(HorseTypeVariant(d.value.into_int()?));
6929            }
6930            _ => {}
6931        }
6932        Ok(())
6933    }
6934}
6935
6936/// The metadata bundle for [Horse].
6937///
6938/// This type should generally not be used directly.
6939#[derive(Bundle)]
6940pub struct HorseMetadataBundle {
6941    _marker: Horse,
6942    parent: AbstractHorseMetadataBundle,
6943    horse_type_variant: HorseTypeVariant,
6944}
6945impl Default for HorseMetadataBundle {
6946    fn default() -> Self {
6947        Self {
6948            _marker: Horse,
6949            parent: Default::default(),
6950            horse_type_variant: HorseTypeVariant(0),
6951        }
6952    }
6953}
6954
6955/// The marker component for entities of type `minecraft:skeleton_horse`.
6956///
6957/// # Metadata
6958///
6959/// This entity type does not add any additional metadata. It will still have
6960/// metadata from parent types.
6961///
6962/// # Parents
6963///
6964/// Entities with `SkeletonHorse` will also have the following marker components
6965/// and their metadata fields:
6966///
6967/// - [AbstractHorse]
6968/// - [AbstractAnimal]
6969/// - [AbstractAgeable]
6970/// - [AbstractCreature]
6971/// - [AbstractInsentient]
6972/// - [AbstractLiving]
6973/// - [AbstractEntity]
6974///
6975/// # Children
6976///
6977/// This entity type has no children types.
6978#[derive(Component)]
6979pub struct SkeletonHorse;
6980impl SkeletonHorse {
6981    fn apply_metadata(
6982        entity: &mut bevy_ecs::system::EntityCommands,
6983        d: EntityDataItem,
6984    ) -> Result<(), UpdateMetadataError> {
6985        match d.index {
6986            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
6987            _ => {}
6988        }
6989        Ok(())
6990    }
6991}
6992
6993/// The metadata bundle for [SkeletonHorse].
6994///
6995/// This type should generally not be used directly.
6996#[derive(Bundle)]
6997pub struct SkeletonHorseMetadataBundle {
6998    _marker: SkeletonHorse,
6999    parent: AbstractHorseMetadataBundle,
7000}
7001impl Default for SkeletonHorseMetadataBundle {
7002    fn default() -> Self {
7003        Self {
7004            _marker: SkeletonHorse,
7005            parent: Default::default(),
7006        }
7007    }
7008}
7009
7010/// The marker component for entities of type `minecraft:zombie_horse`.
7011///
7012/// # Metadata
7013///
7014/// This entity type does not add any additional metadata. It will still have
7015/// metadata from parent types.
7016///
7017/// # Parents
7018///
7019/// Entities with `ZombieHorse` will also have the following marker components
7020/// and their metadata fields:
7021///
7022/// - [AbstractHorse]
7023/// - [AbstractAnimal]
7024/// - [AbstractAgeable]
7025/// - [AbstractCreature]
7026/// - [AbstractInsentient]
7027/// - [AbstractLiving]
7028/// - [AbstractEntity]
7029///
7030/// # Children
7031///
7032/// This entity type has no children types.
7033#[derive(Component)]
7034pub struct ZombieHorse;
7035impl ZombieHorse {
7036    fn apply_metadata(
7037        entity: &mut bevy_ecs::system::EntityCommands,
7038        d: EntityDataItem,
7039    ) -> Result<(), UpdateMetadataError> {
7040        match d.index {
7041            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7042            _ => {}
7043        }
7044        Ok(())
7045    }
7046}
7047
7048/// The metadata bundle for [ZombieHorse].
7049///
7050/// This type should generally not be used directly.
7051#[derive(Bundle)]
7052pub struct ZombieHorseMetadataBundle {
7053    _marker: ZombieHorse,
7054    parent: AbstractHorseMetadataBundle,
7055}
7056impl Default for ZombieHorseMetadataBundle {
7057    fn default() -> Self {
7058        Self {
7059            _marker: ZombieHorse,
7060            parent: Default::default(),
7061        }
7062    }
7063}
7064
7065/// A metadata field for [AbstractChestedHorse].
7066#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7067pub struct Chest(pub bool);
7068/// An abstract entity marker component.
7069///
7070/// # Metadata
7071///
7072/// These are the metadata components that all `AbstractChestedHorse` entities
7073/// are guaranteed to have, in addition to the metadata components from parent
7074/// types:
7075///
7076/// - [Chest]
7077///
7078/// # Parents
7079///
7080/// Entities with `AbstractChestedHorse` will also have the following marker
7081/// components and their metadata fields:
7082///
7083/// - [AbstractHorse]
7084/// - [AbstractAnimal]
7085/// - [AbstractAgeable]
7086/// - [AbstractCreature]
7087/// - [AbstractInsentient]
7088/// - [AbstractLiving]
7089/// - [AbstractEntity]
7090///
7091/// # Children
7092///
7093/// - [Donkey]
7094/// - [Llama]
7095///   - [TraderLlama]
7096/// - [Mule]
7097#[derive(Component)]
7098pub struct AbstractChestedHorse;
7099impl AbstractChestedHorse {
7100    fn apply_metadata(
7101        entity: &mut bevy_ecs::system::EntityCommands,
7102        d: EntityDataItem,
7103    ) -> Result<(), UpdateMetadataError> {
7104        match d.index {
7105            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7106            19 => {
7107                entity.insert(Chest(d.value.into_boolean()?));
7108            }
7109            _ => {}
7110        }
7111        Ok(())
7112    }
7113}
7114
7115/// The metadata bundle for [AbstractChestedHorse].
7116///
7117/// This type should generally not be used directly.
7118#[derive(Bundle)]
7119pub struct AbstractChestedHorseMetadataBundle {
7120    _marker: AbstractChestedHorse,
7121    parent: AbstractHorseMetadataBundle,
7122    chest: Chest,
7123}
7124impl Default for AbstractChestedHorseMetadataBundle {
7125    fn default() -> Self {
7126        Self {
7127            _marker: AbstractChestedHorse,
7128            parent: Default::default(),
7129            chest: Chest(false),
7130        }
7131    }
7132}
7133
7134/// The marker component for entities of type `minecraft:donkey`.
7135///
7136/// # Metadata
7137///
7138/// This entity type does not add any additional metadata. It will still have
7139/// metadata from parent types.
7140///
7141/// # Parents
7142///
7143/// Entities with `Donkey` will also have the following marker components and
7144/// their metadata fields:
7145///
7146/// - [AbstractChestedHorse]
7147/// - [AbstractHorse]
7148/// - [AbstractAnimal]
7149/// - [AbstractAgeable]
7150/// - [AbstractCreature]
7151/// - [AbstractInsentient]
7152/// - [AbstractLiving]
7153/// - [AbstractEntity]
7154///
7155/// # Children
7156///
7157/// This entity type has no children types.
7158#[derive(Component)]
7159pub struct Donkey;
7160impl Donkey {
7161    fn apply_metadata(
7162        entity: &mut bevy_ecs::system::EntityCommands,
7163        d: EntityDataItem,
7164    ) -> Result<(), UpdateMetadataError> {
7165        match d.index {
7166            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7167            _ => {}
7168        }
7169        Ok(())
7170    }
7171}
7172
7173/// The metadata bundle for [Donkey].
7174///
7175/// This type should generally not be used directly.
7176#[derive(Bundle)]
7177pub struct DonkeyMetadataBundle {
7178    _marker: Donkey,
7179    parent: AbstractChestedHorseMetadataBundle,
7180}
7181impl Default for DonkeyMetadataBundle {
7182    fn default() -> Self {
7183        Self {
7184            _marker: Donkey,
7185            parent: Default::default(),
7186        }
7187    }
7188}
7189
7190/// A metadata field for [Llama].
7191#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7192pub struct Strength(pub i32);
7193/// A metadata field for [Llama].
7194#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7195pub struct LlamaVariant(pub i32);
7196/// The marker component for entities of type `minecraft:llama`.
7197///
7198/// # Metadata
7199///
7200/// These are the metadata components that all `Llama` entities are guaranteed
7201/// to have, in addition to the metadata components from parent types:
7202///
7203/// - [Strength]
7204/// - [LlamaVariant]
7205///
7206/// # Parents
7207///
7208/// Entities with `Llama` will also have the following marker components and
7209/// their metadata fields:
7210///
7211/// - [AbstractChestedHorse]
7212/// - [AbstractHorse]
7213/// - [AbstractAnimal]
7214/// - [AbstractAgeable]
7215/// - [AbstractCreature]
7216/// - [AbstractInsentient]
7217/// - [AbstractLiving]
7218/// - [AbstractEntity]
7219///
7220/// # Children
7221///
7222/// - [TraderLlama]
7223#[derive(Component)]
7224pub struct Llama;
7225impl Llama {
7226    fn apply_metadata(
7227        entity: &mut bevy_ecs::system::EntityCommands,
7228        d: EntityDataItem,
7229    ) -> Result<(), UpdateMetadataError> {
7230        match d.index {
7231            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7232            20 => {
7233                entity.insert(Strength(d.value.into_int()?));
7234            }
7235            21 => {
7236                entity.insert(LlamaVariant(d.value.into_int()?));
7237            }
7238            _ => {}
7239        }
7240        Ok(())
7241    }
7242}
7243
7244/// The metadata bundle for [Llama].
7245///
7246/// This type should generally not be used directly.
7247#[derive(Bundle)]
7248pub struct LlamaMetadataBundle {
7249    _marker: Llama,
7250    parent: AbstractChestedHorseMetadataBundle,
7251    strength: Strength,
7252    llama_variant: LlamaVariant,
7253}
7254impl Default for LlamaMetadataBundle {
7255    fn default() -> Self {
7256        Self {
7257            _marker: Llama,
7258            parent: Default::default(),
7259            strength: Strength(0),
7260            llama_variant: LlamaVariant(0),
7261        }
7262    }
7263}
7264
7265/// The marker component for entities of type `minecraft:trader_llama`.
7266///
7267/// # Metadata
7268///
7269/// This entity type does not add any additional metadata. It will still have
7270/// metadata from parent types.
7271///
7272/// # Parents
7273///
7274/// Entities with `TraderLlama` will also have the following marker components
7275/// and their metadata fields:
7276///
7277/// - [Llama]
7278/// - [AbstractChestedHorse]
7279/// - [AbstractHorse]
7280/// - [AbstractAnimal]
7281/// - [AbstractAgeable]
7282/// - [AbstractCreature]
7283/// - [AbstractInsentient]
7284/// - [AbstractLiving]
7285/// - [AbstractEntity]
7286///
7287/// # Children
7288///
7289/// This entity type has no children types.
7290#[derive(Component)]
7291pub struct TraderLlama;
7292impl TraderLlama {
7293    fn apply_metadata(
7294        entity: &mut bevy_ecs::system::EntityCommands,
7295        d: EntityDataItem,
7296    ) -> Result<(), UpdateMetadataError> {
7297        match d.index {
7298            0..=21 => Llama::apply_metadata(entity, d)?,
7299            _ => {}
7300        }
7301        Ok(())
7302    }
7303}
7304
7305/// The metadata bundle for [TraderLlama].
7306///
7307/// This type should generally not be used directly.
7308#[derive(Bundle)]
7309pub struct TraderLlamaMetadataBundle {
7310    _marker: TraderLlama,
7311    parent: LlamaMetadataBundle,
7312}
7313impl Default for TraderLlamaMetadataBundle {
7314    fn default() -> Self {
7315        Self {
7316            _marker: TraderLlama,
7317            parent: Default::default(),
7318        }
7319    }
7320}
7321
7322/// The marker component for entities of type `minecraft:mule`.
7323///
7324/// # Metadata
7325///
7326/// This entity type does not add any additional metadata. It will still have
7327/// metadata from parent types.
7328///
7329/// # Parents
7330///
7331/// Entities with `Mule` will also have the following marker components and
7332/// their metadata fields:
7333///
7334/// - [AbstractChestedHorse]
7335/// - [AbstractHorse]
7336/// - [AbstractAnimal]
7337/// - [AbstractAgeable]
7338/// - [AbstractCreature]
7339/// - [AbstractInsentient]
7340/// - [AbstractLiving]
7341/// - [AbstractEntity]
7342///
7343/// # Children
7344///
7345/// This entity type has no children types.
7346#[derive(Component)]
7347pub struct Mule;
7348impl Mule {
7349    fn apply_metadata(
7350        entity: &mut bevy_ecs::system::EntityCommands,
7351        d: EntityDataItem,
7352    ) -> Result<(), UpdateMetadataError> {
7353        match d.index {
7354            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7355            _ => {}
7356        }
7357        Ok(())
7358    }
7359}
7360
7361/// The metadata bundle for [Mule].
7362///
7363/// This type should generally not be used directly.
7364#[derive(Bundle)]
7365pub struct MuleMetadataBundle {
7366    _marker: Mule,
7367    parent: AbstractChestedHorseMetadataBundle,
7368}
7369impl Default for MuleMetadataBundle {
7370    fn default() -> Self {
7371        Self {
7372            _marker: Mule,
7373            parent: Default::default(),
7374        }
7375    }
7376}
7377
7378#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7379/// A metadata field for [AbstractTameable].
7380pub struct Tame(pub bool);
7381#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7382/// A metadata field for [AbstractTameable].
7383pub struct InSittingPose(pub bool);
7384/// A metadata field for [AbstractTameable].
7385#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7386pub struct Owneruuid(pub Option<Uuid>);
7387/// An abstract entity marker component.
7388///
7389/// # Metadata
7390///
7391/// These are the metadata components that all `AbstractTameable` entities are
7392/// guaranteed to have, in addition to the metadata components from parent
7393/// types:
7394///
7395/// - [Tame]
7396/// - [InSittingPose]
7397/// - [Owneruuid]
7398///
7399/// # Parents
7400///
7401/// Entities with `AbstractTameable` will also have the following marker
7402/// components and their metadata fields:
7403///
7404/// - [AbstractAnimal]
7405/// - [AbstractAgeable]
7406/// - [AbstractCreature]
7407/// - [AbstractInsentient]
7408/// - [AbstractLiving]
7409/// - [AbstractEntity]
7410///
7411/// # Children
7412///
7413/// - [Cat]
7414/// - [Parrot]
7415/// - [Wolf]
7416/// - [AbstractNautilus]
7417///   - [Nautilus]
7418///   - [ZombieNautilus]
7419#[derive(Component)]
7420pub struct AbstractTameable;
7421impl AbstractTameable {
7422    fn apply_metadata(
7423        entity: &mut bevy_ecs::system::EntityCommands,
7424        d: EntityDataItem,
7425    ) -> Result<(), UpdateMetadataError> {
7426        match d.index {
7427            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
7428            18 => {
7429                let bitfield = d.value.into_byte()?;
7430                entity.insert(Tame(bitfield & 0x4 != 0));
7431                entity.insert(InSittingPose(bitfield & 0x1 != 0));
7432            }
7433            19 => {
7434                entity.insert(Owneruuid(d.value.into_optional_living_entity_reference()?));
7435            }
7436            _ => {}
7437        }
7438        Ok(())
7439    }
7440}
7441
7442/// The metadata bundle for [AbstractTameable].
7443///
7444/// This type should generally not be used directly.
7445#[derive(Bundle)]
7446pub struct AbstractTameableMetadataBundle {
7447    _marker: AbstractTameable,
7448    parent: AbstractAnimalMetadataBundle,
7449    tame: Tame,
7450    in_sitting_pose: InSittingPose,
7451    owneruuid: Owneruuid,
7452}
7453impl Default for AbstractTameableMetadataBundle {
7454    fn default() -> Self {
7455        Self {
7456            _marker: AbstractTameable,
7457            parent: Default::default(),
7458            tame: Tame(false),
7459            in_sitting_pose: InSittingPose(false),
7460            owneruuid: Owneruuid(None),
7461        }
7462    }
7463}
7464
7465/// A metadata field for [Cat].
7466#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7467pub struct CatVariant(pub azalea_registry::data::CatVariant);
7468/// A metadata field for [Cat].
7469#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7470pub struct IsLying(pub bool);
7471/// A metadata field for [Cat].
7472#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7473pub struct RelaxStateOne(pub bool);
7474/// A metadata field for [Cat].
7475#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7476pub struct CatCollarColor(pub i32);
7477/// A metadata field for [Cat].
7478#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7479pub struct CatSoundVariant(pub azalea_registry::data::CatSoundVariant);
7480/// The marker component for entities of type `minecraft:cat`.
7481///
7482/// # Metadata
7483///
7484/// These are the metadata components that all `Cat` entities are guaranteed to
7485/// have, in addition to the metadata components from parent types:
7486///
7487/// - [CatVariant]
7488/// - [IsLying]
7489/// - [RelaxStateOne]
7490/// - [CatCollarColor]
7491/// - [CatSoundVariant]
7492///
7493/// # Parents
7494///
7495/// Entities with `Cat` will also have the following marker components and their
7496/// metadata fields:
7497///
7498/// - [AbstractTameable]
7499/// - [AbstractAnimal]
7500/// - [AbstractAgeable]
7501/// - [AbstractCreature]
7502/// - [AbstractInsentient]
7503/// - [AbstractLiving]
7504/// - [AbstractEntity]
7505///
7506/// # Children
7507///
7508/// This entity type has no children types.
7509#[derive(Component)]
7510pub struct Cat;
7511impl Cat {
7512    fn apply_metadata(
7513        entity: &mut bevy_ecs::system::EntityCommands,
7514        d: EntityDataItem,
7515    ) -> Result<(), UpdateMetadataError> {
7516        match d.index {
7517            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
7518            20 => {
7519                entity.insert(CatVariant(d.value.into_cat_variant()?));
7520            }
7521            21 => {
7522                entity.insert(IsLying(d.value.into_boolean()?));
7523            }
7524            22 => {
7525                entity.insert(RelaxStateOne(d.value.into_boolean()?));
7526            }
7527            23 => {
7528                entity.insert(CatCollarColor(d.value.into_int()?));
7529            }
7530            24 => {
7531                entity.insert(CatSoundVariant(d.value.into_cat_sound_variant()?));
7532            }
7533            _ => {}
7534        }
7535        Ok(())
7536    }
7537}
7538
7539/// The metadata bundle for [Cat].
7540///
7541/// This type should generally not be used directly.
7542#[derive(Bundle)]
7543pub struct CatMetadataBundle {
7544    _marker: Cat,
7545    parent: AbstractTameableMetadataBundle,
7546    cat_variant: CatVariant,
7547    is_lying: IsLying,
7548    relax_state_one: RelaxStateOne,
7549    cat_collar_color: CatCollarColor,
7550    cat_sound_variant: CatSoundVariant,
7551}
7552impl Default for CatMetadataBundle {
7553    fn default() -> Self {
7554        Self {
7555            _marker: Cat,
7556            parent: Default::default(),
7557            cat_variant: CatVariant(azalea_registry::data::CatVariant::new_raw(0)),
7558            is_lying: IsLying(false),
7559            relax_state_one: RelaxStateOne(false),
7560            cat_collar_color: CatCollarColor(Default::default()),
7561            cat_sound_variant: CatSoundVariant(azalea_registry::data::CatSoundVariant::new_raw(0)),
7562        }
7563    }
7564}
7565
7566/// A metadata field for [Parrot].
7567#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7568pub struct ParrotVariant(pub i32);
7569/// The marker component for entities of type `minecraft:parrot`.
7570///
7571/// # Metadata
7572///
7573/// These are the metadata components that all `Parrot` entities are guaranteed
7574/// to have, in addition to the metadata components from parent types:
7575///
7576/// - [ParrotVariant]
7577///
7578/// # Parents
7579///
7580/// Entities with `Parrot` will also have the following marker components and
7581/// their metadata fields:
7582///
7583/// - [AbstractTameable]
7584/// - [AbstractAnimal]
7585/// - [AbstractAgeable]
7586/// - [AbstractCreature]
7587/// - [AbstractInsentient]
7588/// - [AbstractLiving]
7589/// - [AbstractEntity]
7590///
7591/// # Children
7592///
7593/// This entity type has no children types.
7594#[derive(Component)]
7595pub struct Parrot;
7596impl Parrot {
7597    fn apply_metadata(
7598        entity: &mut bevy_ecs::system::EntityCommands,
7599        d: EntityDataItem,
7600    ) -> Result<(), UpdateMetadataError> {
7601        match d.index {
7602            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
7603            20 => {
7604                entity.insert(ParrotVariant(d.value.into_int()?));
7605            }
7606            _ => {}
7607        }
7608        Ok(())
7609    }
7610}
7611
7612/// The metadata bundle for [Parrot].
7613///
7614/// This type should generally not be used directly.
7615#[derive(Bundle)]
7616pub struct ParrotMetadataBundle {
7617    _marker: Parrot,
7618    parent: AbstractTameableMetadataBundle,
7619    parrot_variant: ParrotVariant,
7620}
7621impl Default for ParrotMetadataBundle {
7622    fn default() -> Self {
7623        Self {
7624            _marker: Parrot,
7625            parent: Default::default(),
7626            parrot_variant: ParrotVariant(Default::default()),
7627        }
7628    }
7629}
7630
7631/// A metadata field for [Wolf].
7632#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7633pub struct WolfInterested(pub bool);
7634/// A metadata field for [Wolf].
7635#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7636pub struct WolfCollarColor(pub i32);
7637/// A metadata field for [Wolf].
7638#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7639pub struct WolfAngerEndTime(pub i64);
7640/// A metadata field for [Wolf].
7641#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7642pub struct WolfVariant(pub azalea_registry::data::WolfVariant);
7643/// A metadata field for [Wolf].
7644#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7645pub struct WolfSoundVariant(pub azalea_registry::data::WolfSoundVariant);
7646/// The marker component for entities of type `minecraft:wolf`.
7647///
7648/// # Metadata
7649///
7650/// These are the metadata components that all `Wolf` entities are guaranteed to
7651/// have, in addition to the metadata components from parent types:
7652///
7653/// - [WolfInterested]
7654/// - [WolfCollarColor]
7655/// - [WolfAngerEndTime]
7656/// - [WolfVariant]
7657/// - [WolfSoundVariant]
7658///
7659/// # Parents
7660///
7661/// Entities with `Wolf` will also have the following marker components and
7662/// their metadata fields:
7663///
7664/// - [AbstractTameable]
7665/// - [AbstractAnimal]
7666/// - [AbstractAgeable]
7667/// - [AbstractCreature]
7668/// - [AbstractInsentient]
7669/// - [AbstractLiving]
7670/// - [AbstractEntity]
7671///
7672/// # Children
7673///
7674/// This entity type has no children types.
7675#[derive(Component)]
7676pub struct Wolf;
7677impl Wolf {
7678    fn apply_metadata(
7679        entity: &mut bevy_ecs::system::EntityCommands,
7680        d: EntityDataItem,
7681    ) -> Result<(), UpdateMetadataError> {
7682        match d.index {
7683            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
7684            20 => {
7685                entity.insert(WolfInterested(d.value.into_boolean()?));
7686            }
7687            21 => {
7688                entity.insert(WolfCollarColor(d.value.into_int()?));
7689            }
7690            22 => {
7691                entity.insert(WolfAngerEndTime(d.value.into_long()?));
7692            }
7693            23 => {
7694                entity.insert(WolfVariant(d.value.into_wolf_variant()?));
7695            }
7696            24 => {
7697                entity.insert(WolfSoundVariant(d.value.into_wolf_sound_variant()?));
7698            }
7699            _ => {}
7700        }
7701        Ok(())
7702    }
7703}
7704
7705/// The metadata bundle for [Wolf].
7706///
7707/// This type should generally not be used directly.
7708#[derive(Bundle)]
7709pub struct WolfMetadataBundle {
7710    _marker: Wolf,
7711    parent: AbstractTameableMetadataBundle,
7712    wolf_interested: WolfInterested,
7713    wolf_collar_color: WolfCollarColor,
7714    wolf_anger_end_time: WolfAngerEndTime,
7715    wolf_variant: WolfVariant,
7716    wolf_sound_variant: WolfSoundVariant,
7717}
7718impl Default for WolfMetadataBundle {
7719    fn default() -> Self {
7720        Self {
7721            _marker: Wolf,
7722            parent: Default::default(),
7723            wolf_interested: WolfInterested(false),
7724            wolf_collar_color: WolfCollarColor(Default::default()),
7725            wolf_anger_end_time: WolfAngerEndTime(-1),
7726            wolf_variant: WolfVariant(azalea_registry::data::WolfVariant::new_raw(0)),
7727            wolf_sound_variant: WolfSoundVariant(azalea_registry::data::WolfSoundVariant::new_raw(
7728                0,
7729            )),
7730        }
7731    }
7732}
7733
7734/// A metadata field for [AbstractNautilus].
7735#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7736pub struct AbstractNautilusDash(pub bool);
7737/// An abstract entity marker component.
7738///
7739/// # Metadata
7740///
7741/// These are the metadata components that all `AbstractNautilus` entities are
7742/// guaranteed to have, in addition to the metadata components from parent
7743/// types:
7744///
7745/// - [AbstractNautilusDash]
7746///
7747/// # Parents
7748///
7749/// Entities with `AbstractNautilus` will also have the following marker
7750/// components and their metadata fields:
7751///
7752/// - [AbstractTameable]
7753/// - [AbstractAnimal]
7754/// - [AbstractAgeable]
7755/// - [AbstractCreature]
7756/// - [AbstractInsentient]
7757/// - [AbstractLiving]
7758/// - [AbstractEntity]
7759///
7760/// # Children
7761///
7762/// - [Nautilus]
7763/// - [ZombieNautilus]
7764#[derive(Component)]
7765pub struct AbstractNautilus;
7766impl AbstractNautilus {
7767    fn apply_metadata(
7768        entity: &mut bevy_ecs::system::EntityCommands,
7769        d: EntityDataItem,
7770    ) -> Result<(), UpdateMetadataError> {
7771        match d.index {
7772            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
7773            20 => {
7774                entity.insert(AbstractNautilusDash(d.value.into_boolean()?));
7775            }
7776            _ => {}
7777        }
7778        Ok(())
7779    }
7780}
7781
7782/// The metadata bundle for [AbstractNautilus].
7783///
7784/// This type should generally not be used directly.
7785#[derive(Bundle)]
7786pub struct AbstractNautilusMetadataBundle {
7787    _marker: AbstractNautilus,
7788    parent: AbstractTameableMetadataBundle,
7789    abstract_nautilus_dash: AbstractNautilusDash,
7790}
7791impl Default for AbstractNautilusMetadataBundle {
7792    fn default() -> Self {
7793        Self {
7794            _marker: AbstractNautilus,
7795            parent: Default::default(),
7796            abstract_nautilus_dash: AbstractNautilusDash(false),
7797        }
7798    }
7799}
7800
7801/// The marker component for entities of type `minecraft:nautilus`.
7802///
7803/// # Metadata
7804///
7805/// This entity type does not add any additional metadata. It will still have
7806/// metadata from parent types.
7807///
7808/// # Parents
7809///
7810/// Entities with `Nautilus` will also have the following marker components and
7811/// their metadata fields:
7812///
7813/// - [AbstractNautilus]
7814/// - [AbstractTameable]
7815/// - [AbstractAnimal]
7816/// - [AbstractAgeable]
7817/// - [AbstractCreature]
7818/// - [AbstractInsentient]
7819/// - [AbstractLiving]
7820/// - [AbstractEntity]
7821///
7822/// # Children
7823///
7824/// This entity type has no children types.
7825#[derive(Component)]
7826pub struct Nautilus;
7827impl Nautilus {
7828    fn apply_metadata(
7829        entity: &mut bevy_ecs::system::EntityCommands,
7830        d: EntityDataItem,
7831    ) -> Result<(), UpdateMetadataError> {
7832        match d.index {
7833            0..=20 => AbstractNautilus::apply_metadata(entity, d)?,
7834            _ => {}
7835        }
7836        Ok(())
7837    }
7838}
7839
7840/// The metadata bundle for [Nautilus].
7841///
7842/// This type should generally not be used directly.
7843#[derive(Bundle)]
7844pub struct NautilusMetadataBundle {
7845    _marker: Nautilus,
7846    parent: AbstractNautilusMetadataBundle,
7847}
7848impl Default for NautilusMetadataBundle {
7849    fn default() -> Self {
7850        Self {
7851            _marker: Nautilus,
7852            parent: Default::default(),
7853        }
7854    }
7855}
7856
7857/// A metadata field for [ZombieNautilus].
7858#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7859pub struct ZombieNautilusVariant(pub azalea_registry::data::ZombieNautilusVariant);
7860/// The marker component for entities of type `minecraft:zombie_nautilus`.
7861///
7862/// # Metadata
7863///
7864/// These are the metadata components that all `ZombieNautilus` entities are
7865/// guaranteed to have, in addition to the metadata components from parent
7866/// types:
7867///
7868/// - [ZombieNautilusVariant]
7869///
7870/// # Parents
7871///
7872/// Entities with `ZombieNautilus` will also have the following marker
7873/// components and their metadata fields:
7874///
7875/// - [AbstractNautilus]
7876/// - [AbstractTameable]
7877/// - [AbstractAnimal]
7878/// - [AbstractAgeable]
7879/// - [AbstractCreature]
7880/// - [AbstractInsentient]
7881/// - [AbstractLiving]
7882/// - [AbstractEntity]
7883///
7884/// # Children
7885///
7886/// This entity type has no children types.
7887#[derive(Component)]
7888pub struct ZombieNautilus;
7889impl ZombieNautilus {
7890    fn apply_metadata(
7891        entity: &mut bevy_ecs::system::EntityCommands,
7892        d: EntityDataItem,
7893    ) -> Result<(), UpdateMetadataError> {
7894        match d.index {
7895            0..=20 => AbstractNautilus::apply_metadata(entity, d)?,
7896            21 => {
7897                entity.insert(ZombieNautilusVariant(
7898                    d.value.into_zombie_nautilus_variant()?,
7899                ));
7900            }
7901            _ => {}
7902        }
7903        Ok(())
7904    }
7905}
7906
7907/// The metadata bundle for [ZombieNautilus].
7908///
7909/// This type should generally not be used directly.
7910#[derive(Bundle)]
7911pub struct ZombieNautilusMetadataBundle {
7912    _marker: ZombieNautilus,
7913    parent: AbstractNautilusMetadataBundle,
7914    zombie_nautilus_variant: ZombieNautilusVariant,
7915}
7916impl Default for ZombieNautilusMetadataBundle {
7917    fn default() -> Self {
7918        Self {
7919            _marker: ZombieNautilus,
7920            parent: Default::default(),
7921            zombie_nautilus_variant: ZombieNautilusVariant(
7922                azalea_registry::data::ZombieNautilusVariant::new_raw(0),
7923            ),
7924        }
7925    }
7926}
7927
7928/// A metadata field for [AbstractVillager].
7929#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7930pub struct AbstractVillagerUnhappyCounter(pub i32);
7931/// An abstract entity marker component.
7932///
7933/// # Metadata
7934///
7935/// These are the metadata components that all `AbstractVillager` entities are
7936/// guaranteed to have, in addition to the metadata components from parent
7937/// types:
7938///
7939/// - [AbstractVillagerUnhappyCounter]
7940///
7941/// # Parents
7942///
7943/// Entities with `AbstractVillager` will also have the following marker
7944/// components and their metadata fields:
7945///
7946/// - [AbstractAgeable]
7947/// - [AbstractCreature]
7948/// - [AbstractInsentient]
7949/// - [AbstractLiving]
7950/// - [AbstractEntity]
7951///
7952/// # Children
7953///
7954/// - [Villager]
7955/// - [WanderingTrader]
7956#[derive(Component)]
7957pub struct AbstractVillager;
7958impl AbstractVillager {
7959    fn apply_metadata(
7960        entity: &mut bevy_ecs::system::EntityCommands,
7961        d: EntityDataItem,
7962    ) -> Result<(), UpdateMetadataError> {
7963        match d.index {
7964            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
7965            18 => {
7966                entity.insert(AbstractVillagerUnhappyCounter(d.value.into_int()?));
7967            }
7968            _ => {}
7969        }
7970        Ok(())
7971    }
7972}
7973
7974/// The metadata bundle for [AbstractVillager].
7975///
7976/// This type should generally not be used directly.
7977#[derive(Bundle)]
7978pub struct AbstractVillagerMetadataBundle {
7979    _marker: AbstractVillager,
7980    parent: AbstractAgeableMetadataBundle,
7981    abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter,
7982}
7983impl Default for AbstractVillagerMetadataBundle {
7984    fn default() -> Self {
7985        Self {
7986            _marker: AbstractVillager,
7987            parent: Default::default(),
7988            abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
7989        }
7990    }
7991}
7992
7993/// A metadata field for [Villager].
7994#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7995pub struct VillagerVillagerData(pub VillagerData);
7996/// A metadata field for [Villager].
7997#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7998pub struct VillagerVillagerDataFinalized(pub bool);
7999/// The marker component for entities of type `minecraft:villager`.
8000///
8001/// # Metadata
8002///
8003/// These are the metadata components that all `Villager` entities are
8004/// guaranteed to have, in addition to the metadata components from parent
8005/// types:
8006///
8007/// - [VillagerVillagerData]
8008/// - [VillagerVillagerDataFinalized]
8009///
8010/// # Parents
8011///
8012/// Entities with `Villager` will also have the following marker components and
8013/// their metadata fields:
8014///
8015/// - [AbstractVillager]
8016/// - [AbstractAgeable]
8017/// - [AbstractCreature]
8018/// - [AbstractInsentient]
8019/// - [AbstractLiving]
8020/// - [AbstractEntity]
8021///
8022/// # Children
8023///
8024/// This entity type has no children types.
8025#[derive(Component)]
8026pub struct Villager;
8027impl Villager {
8028    fn apply_metadata(
8029        entity: &mut bevy_ecs::system::EntityCommands,
8030        d: EntityDataItem,
8031    ) -> Result<(), UpdateMetadataError> {
8032        match d.index {
8033            0..=18 => AbstractVillager::apply_metadata(entity, d)?,
8034            19 => {
8035                entity.insert(VillagerVillagerData(d.value.into_villager_data()?));
8036            }
8037            20 => {
8038                entity.insert(VillagerVillagerDataFinalized(d.value.into_boolean()?));
8039            }
8040            _ => {}
8041        }
8042        Ok(())
8043    }
8044}
8045
8046/// The metadata bundle for [Villager].
8047///
8048/// This type should generally not be used directly.
8049#[derive(Bundle)]
8050pub struct VillagerMetadataBundle {
8051    _marker: Villager,
8052    parent: AbstractVillagerMetadataBundle,
8053    villager_villager_data: VillagerVillagerData,
8054    villager_villager_data_finalized: VillagerVillagerDataFinalized,
8055}
8056impl Default for VillagerMetadataBundle {
8057    fn default() -> Self {
8058        Self {
8059            _marker: Villager,
8060            parent: Default::default(),
8061            villager_villager_data: VillagerVillagerData(VillagerData {
8062                kind: azalea_registry::builtin::VillagerKind::Plains,
8063                profession: azalea_registry::builtin::VillagerProfession::None,
8064                level: 0,
8065            }),
8066            villager_villager_data_finalized: VillagerVillagerDataFinalized(false),
8067        }
8068    }
8069}
8070
8071/// The marker component for entities of type `minecraft:wandering_trader`.
8072///
8073/// # Metadata
8074///
8075/// This entity type does not add any additional metadata. It will still have
8076/// metadata from parent types.
8077///
8078/// # Parents
8079///
8080/// Entities with `WanderingTrader` will also have the following marker
8081/// components and their metadata fields:
8082///
8083/// - [AbstractVillager]
8084/// - [AbstractAgeable]
8085/// - [AbstractCreature]
8086/// - [AbstractInsentient]
8087/// - [AbstractLiving]
8088/// - [AbstractEntity]
8089///
8090/// # Children
8091///
8092/// This entity type has no children types.
8093#[derive(Component)]
8094pub struct WanderingTrader;
8095impl WanderingTrader {
8096    fn apply_metadata(
8097        entity: &mut bevy_ecs::system::EntityCommands,
8098        d: EntityDataItem,
8099    ) -> Result<(), UpdateMetadataError> {
8100        match d.index {
8101            0..=18 => AbstractVillager::apply_metadata(entity, d)?,
8102            _ => {}
8103        }
8104        Ok(())
8105    }
8106}
8107
8108/// The metadata bundle for [WanderingTrader].
8109///
8110/// This type should generally not be used directly.
8111#[derive(Bundle)]
8112pub struct WanderingTraderMetadataBundle {
8113    _marker: WanderingTrader,
8114    parent: AbstractVillagerMetadataBundle,
8115}
8116impl Default for WanderingTraderMetadataBundle {
8117    fn default() -> Self {
8118        Self {
8119            _marker: WanderingTrader,
8120            parent: Default::default(),
8121        }
8122    }
8123}
8124
8125/// A metadata field for [AbstractFish].
8126#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8127pub struct AbstractFishFromBucket(pub bool);
8128/// An abstract entity marker component.
8129///
8130/// # Metadata
8131///
8132/// These are the metadata components that all `AbstractFish` entities are
8133/// guaranteed to have, in addition to the metadata components from parent
8134/// types:
8135///
8136/// - [AbstractFishFromBucket]
8137///
8138/// # Parents
8139///
8140/// Entities with `AbstractFish` will also have the following marker components
8141/// and their metadata fields:
8142///
8143/// - [AbstractCreature]
8144/// - [AbstractInsentient]
8145/// - [AbstractLiving]
8146/// - [AbstractEntity]
8147///
8148/// # Children
8149///
8150/// - [Cod]
8151/// - [Salmon]
8152/// - [TropicalFish]
8153#[derive(Component)]
8154pub struct AbstractFish;
8155impl AbstractFish {
8156    fn apply_metadata(
8157        entity: &mut bevy_ecs::system::EntityCommands,
8158        d: EntityDataItem,
8159    ) -> Result<(), UpdateMetadataError> {
8160        match d.index {
8161            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
8162            16 => {
8163                entity.insert(AbstractFishFromBucket(d.value.into_boolean()?));
8164            }
8165            _ => {}
8166        }
8167        Ok(())
8168    }
8169}
8170
8171/// The metadata bundle for [AbstractFish].
8172///
8173/// This type should generally not be used directly.
8174#[derive(Bundle)]
8175pub struct AbstractFishMetadataBundle {
8176    _marker: AbstractFish,
8177    parent: AbstractCreatureMetadataBundle,
8178    abstract_fish_from_bucket: AbstractFishFromBucket,
8179}
8180impl Default for AbstractFishMetadataBundle {
8181    fn default() -> Self {
8182        Self {
8183            _marker: AbstractFish,
8184            parent: Default::default(),
8185            abstract_fish_from_bucket: AbstractFishFromBucket(false),
8186        }
8187    }
8188}
8189
8190/// The marker component for entities of type `minecraft:cod`.
8191///
8192/// # Metadata
8193///
8194/// This entity type does not add any additional metadata. It will still have
8195/// metadata from parent types.
8196///
8197/// # Parents
8198///
8199/// Entities with `Cod` will also have the following marker components and their
8200/// metadata fields:
8201///
8202/// - [AbstractFish]
8203/// - [AbstractCreature]
8204/// - [AbstractInsentient]
8205/// - [AbstractLiving]
8206/// - [AbstractEntity]
8207///
8208/// # Children
8209///
8210/// This entity type has no children types.
8211#[derive(Component)]
8212pub struct Cod;
8213impl Cod {
8214    fn apply_metadata(
8215        entity: &mut bevy_ecs::system::EntityCommands,
8216        d: EntityDataItem,
8217    ) -> Result<(), UpdateMetadataError> {
8218        match d.index {
8219            0..=16 => AbstractFish::apply_metadata(entity, d)?,
8220            _ => {}
8221        }
8222        Ok(())
8223    }
8224}
8225
8226/// The metadata bundle for [Cod].
8227///
8228/// This type should generally not be used directly.
8229#[derive(Bundle)]
8230pub struct CodMetadataBundle {
8231    _marker: Cod,
8232    parent: AbstractFishMetadataBundle,
8233}
8234impl Default for CodMetadataBundle {
8235    fn default() -> Self {
8236        Self {
8237            _marker: Cod,
8238            parent: Default::default(),
8239        }
8240    }
8241}
8242
8243/// A metadata field for [Salmon].
8244#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8245pub struct SalmonKind(pub i32);
8246/// The marker component for entities of type `minecraft:salmon`.
8247///
8248/// # Metadata
8249///
8250/// These are the metadata components that all `Salmon` entities are guaranteed
8251/// to have, in addition to the metadata components from parent types:
8252///
8253/// - [SalmonKind]
8254///
8255/// # Parents
8256///
8257/// Entities with `Salmon` will also have the following marker components and
8258/// their metadata fields:
8259///
8260/// - [AbstractFish]
8261/// - [AbstractCreature]
8262/// - [AbstractInsentient]
8263/// - [AbstractLiving]
8264/// - [AbstractEntity]
8265///
8266/// # Children
8267///
8268/// This entity type has no children types.
8269#[derive(Component)]
8270pub struct Salmon;
8271impl Salmon {
8272    fn apply_metadata(
8273        entity: &mut bevy_ecs::system::EntityCommands,
8274        d: EntityDataItem,
8275    ) -> Result<(), UpdateMetadataError> {
8276        match d.index {
8277            0..=16 => AbstractFish::apply_metadata(entity, d)?,
8278            17 => {
8279                entity.insert(SalmonKind(d.value.into_int()?));
8280            }
8281            _ => {}
8282        }
8283        Ok(())
8284    }
8285}
8286
8287/// The metadata bundle for [Salmon].
8288///
8289/// This type should generally not be used directly.
8290#[derive(Bundle)]
8291pub struct SalmonMetadataBundle {
8292    _marker: Salmon,
8293    parent: AbstractFishMetadataBundle,
8294    salmon_kind: SalmonKind,
8295}
8296impl Default for SalmonMetadataBundle {
8297    fn default() -> Self {
8298        Self {
8299            _marker: Salmon,
8300            parent: Default::default(),
8301            salmon_kind: SalmonKind(Default::default()),
8302        }
8303    }
8304}
8305
8306/// A metadata field for [TropicalFish].
8307#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8308pub struct TropicalFishTypeVariant(pub i32);
8309/// The marker component for entities of type `minecraft:tropical_fish`.
8310///
8311/// # Metadata
8312///
8313/// These are the metadata components that all `TropicalFish` entities are
8314/// guaranteed to have, in addition to the metadata components from parent
8315/// types:
8316///
8317/// - [TropicalFishTypeVariant]
8318///
8319/// # Parents
8320///
8321/// Entities with `TropicalFish` will also have the following marker components
8322/// and their metadata fields:
8323///
8324/// - [AbstractFish]
8325/// - [AbstractCreature]
8326/// - [AbstractInsentient]
8327/// - [AbstractLiving]
8328/// - [AbstractEntity]
8329///
8330/// # Children
8331///
8332/// This entity type has no children types.
8333#[derive(Component)]
8334pub struct TropicalFish;
8335impl TropicalFish {
8336    fn apply_metadata(
8337        entity: &mut bevy_ecs::system::EntityCommands,
8338        d: EntityDataItem,
8339    ) -> Result<(), UpdateMetadataError> {
8340        match d.index {
8341            0..=16 => AbstractFish::apply_metadata(entity, d)?,
8342            17 => {
8343                entity.insert(TropicalFishTypeVariant(d.value.into_int()?));
8344            }
8345            _ => {}
8346        }
8347        Ok(())
8348    }
8349}
8350
8351/// The metadata bundle for [TropicalFish].
8352///
8353/// This type should generally not be used directly.
8354#[derive(Bundle)]
8355pub struct TropicalFishMetadataBundle {
8356    _marker: TropicalFish,
8357    parent: AbstractFishMetadataBundle,
8358    tropical_fish_type_variant: TropicalFishTypeVariant,
8359}
8360impl Default for TropicalFishMetadataBundle {
8361    fn default() -> Self {
8362        Self {
8363            _marker: TropicalFish,
8364            parent: Default::default(),
8365            tropical_fish_type_variant: TropicalFishTypeVariant(Default::default()),
8366        }
8367    }
8368}
8369
8370/// An abstract entity marker component.
8371///
8372/// # Metadata
8373///
8374/// This entity type does not add any additional metadata. It will still have
8375/// metadata from parent types.
8376///
8377/// # Parents
8378///
8379/// Entities with `AbstractMonster` will also have the following marker
8380/// components and their metadata fields:
8381///
8382/// - [AbstractCreature]
8383/// - [AbstractInsentient]
8384/// - [AbstractLiving]
8385/// - [AbstractEntity]
8386///
8387/// # Children
8388///
8389/// - [Blaze]
8390/// - [Bogged]
8391/// - [Breeze]
8392/// - [Creaking]
8393/// - [Creeper]
8394/// - [Enderman]
8395/// - [Endermite]
8396/// - [Giant]
8397/// - [Guardian]
8398///   - [ElderGuardian]
8399/// - [Parched]
8400/// - [Silverfish]
8401/// - [Skeleton]
8402/// - [Spider]
8403///   - [CaveSpider]
8404/// - [Stray]
8405/// - [Vex]
8406/// - [Warden]
8407/// - [Wither]
8408/// - [WitherSkeleton]
8409/// - [Zoglin]
8410/// - [Zombie]
8411///   - [Drowned]
8412///   - [Husk]
8413///   - [ZombieVillager]
8414///   - [ZombifiedPiglin]
8415/// - [AbstractPiglin]
8416///   - [Piglin]
8417///   - [PiglinBrute]
8418/// - [AbstractRaider]
8419///   - [Pillager]
8420///   - [Ravager]
8421///   - [Vindicator]
8422///   - [Witch]
8423///   - [AbstractSpellcasterIllager]
8424///     - [Evoker]
8425///     - [Illusioner]
8426#[derive(Component)]
8427pub struct AbstractMonster;
8428impl AbstractMonster {
8429    fn apply_metadata(
8430        entity: &mut bevy_ecs::system::EntityCommands,
8431        d: EntityDataItem,
8432    ) -> Result<(), UpdateMetadataError> {
8433        match d.index {
8434            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
8435            _ => {}
8436        }
8437        Ok(())
8438    }
8439}
8440
8441/// The metadata bundle for [AbstractMonster].
8442///
8443/// This type should generally not be used directly.
8444#[derive(Bundle)]
8445pub struct AbstractMonsterMetadataBundle {
8446    _marker: AbstractMonster,
8447    parent: AbstractCreatureMetadataBundle,
8448}
8449impl Default for AbstractMonsterMetadataBundle {
8450    fn default() -> Self {
8451        Self {
8452            _marker: AbstractMonster,
8453            parent: Default::default(),
8454        }
8455    }
8456}
8457
8458#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8459/// A metadata field for [Blaze].
8460pub struct Charged(pub bool);
8461/// The marker component for entities of type `minecraft:blaze`.
8462///
8463/// # Metadata
8464///
8465/// These are the metadata components that all `Blaze` entities are guaranteed
8466/// to have, in addition to the metadata components from parent types:
8467///
8468/// - [Charged]
8469///
8470/// # Parents
8471///
8472/// Entities with `Blaze` will also have the following marker components and
8473/// their metadata fields:
8474///
8475/// - [AbstractMonster]
8476/// - [AbstractCreature]
8477/// - [AbstractInsentient]
8478/// - [AbstractLiving]
8479/// - [AbstractEntity]
8480///
8481/// # Children
8482///
8483/// This entity type has no children types.
8484#[derive(Component)]
8485pub struct Blaze;
8486impl Blaze {
8487    fn apply_metadata(
8488        entity: &mut bevy_ecs::system::EntityCommands,
8489        d: EntityDataItem,
8490    ) -> Result<(), UpdateMetadataError> {
8491        match d.index {
8492            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8493            16 => {
8494                let bitfield = d.value.into_byte()?;
8495                entity.insert(Charged(bitfield & 0x1 != 0));
8496            }
8497            _ => {}
8498        }
8499        Ok(())
8500    }
8501}
8502
8503/// The metadata bundle for [Blaze].
8504///
8505/// This type should generally not be used directly.
8506#[derive(Bundle)]
8507pub struct BlazeMetadataBundle {
8508    _marker: Blaze,
8509    parent: AbstractMonsterMetadataBundle,
8510    charged: Charged,
8511}
8512impl Default for BlazeMetadataBundle {
8513    fn default() -> Self {
8514        Self {
8515            _marker: Blaze,
8516            parent: Default::default(),
8517            charged: Charged(false),
8518        }
8519    }
8520}
8521
8522/// A metadata field for [Bogged].
8523#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8524pub struct BoggedSheared(pub bool);
8525/// The marker component for entities of type `minecraft:bogged`.
8526///
8527/// # Metadata
8528///
8529/// These are the metadata components that all `Bogged` entities are guaranteed
8530/// to have, in addition to the metadata components from parent types:
8531///
8532/// - [BoggedSheared]
8533///
8534/// # Parents
8535///
8536/// Entities with `Bogged` will also have the following marker components and
8537/// their metadata fields:
8538///
8539/// - [AbstractMonster]
8540/// - [AbstractCreature]
8541/// - [AbstractInsentient]
8542/// - [AbstractLiving]
8543/// - [AbstractEntity]
8544///
8545/// # Children
8546///
8547/// This entity type has no children types.
8548#[derive(Component)]
8549pub struct Bogged;
8550impl Bogged {
8551    fn apply_metadata(
8552        entity: &mut bevy_ecs::system::EntityCommands,
8553        d: EntityDataItem,
8554    ) -> Result<(), UpdateMetadataError> {
8555        match d.index {
8556            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8557            16 => {
8558                entity.insert(BoggedSheared(d.value.into_boolean()?));
8559            }
8560            _ => {}
8561        }
8562        Ok(())
8563    }
8564}
8565
8566/// The metadata bundle for [Bogged].
8567///
8568/// This type should generally not be used directly.
8569#[derive(Bundle)]
8570pub struct BoggedMetadataBundle {
8571    _marker: Bogged,
8572    parent: AbstractMonsterMetadataBundle,
8573    bogged_sheared: BoggedSheared,
8574}
8575impl Default for BoggedMetadataBundle {
8576    fn default() -> Self {
8577        Self {
8578            _marker: Bogged,
8579            parent: Default::default(),
8580            bogged_sheared: BoggedSheared(false),
8581        }
8582    }
8583}
8584
8585/// The marker component for entities of type `minecraft:breeze`.
8586///
8587/// # Metadata
8588///
8589/// This entity type does not add any additional metadata. It will still have
8590/// metadata from parent types.
8591///
8592/// # Parents
8593///
8594/// Entities with `Breeze` will also have the following marker components and
8595/// their metadata fields:
8596///
8597/// - [AbstractMonster]
8598/// - [AbstractCreature]
8599/// - [AbstractInsentient]
8600/// - [AbstractLiving]
8601/// - [AbstractEntity]
8602///
8603/// # Children
8604///
8605/// This entity type has no children types.
8606#[derive(Component)]
8607pub struct Breeze;
8608impl Breeze {
8609    fn apply_metadata(
8610        entity: &mut bevy_ecs::system::EntityCommands,
8611        d: EntityDataItem,
8612    ) -> Result<(), UpdateMetadataError> {
8613        match d.index {
8614            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8615            _ => {}
8616        }
8617        Ok(())
8618    }
8619}
8620
8621/// The metadata bundle for [Breeze].
8622///
8623/// This type should generally not be used directly.
8624#[derive(Bundle)]
8625pub struct BreezeMetadataBundle {
8626    _marker: Breeze,
8627    parent: AbstractMonsterMetadataBundle,
8628}
8629impl Default for BreezeMetadataBundle {
8630    fn default() -> Self {
8631        Self {
8632            _marker: Breeze,
8633            parent: Default::default(),
8634        }
8635    }
8636}
8637
8638/// A metadata field for [Creaking].
8639#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8640pub struct CanMove(pub bool);
8641/// A metadata field for [Creaking].
8642#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8643pub struct IsActive(pub bool);
8644/// A metadata field for [Creaking].
8645#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8646pub struct IsTearingDown(pub bool);
8647/// A metadata field for [Creaking].
8648#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8649pub struct HomePos(pub Option<BlockPos>);
8650/// The marker component for entities of type `minecraft:creaking`.
8651///
8652/// # Metadata
8653///
8654/// These are the metadata components that all `Creaking` entities are
8655/// guaranteed to have, in addition to the metadata components from parent
8656/// types:
8657///
8658/// - [CanMove]
8659/// - [IsActive]
8660/// - [IsTearingDown]
8661/// - [HomePos]
8662///
8663/// # Parents
8664///
8665/// Entities with `Creaking` will also have the following marker components and
8666/// their metadata fields:
8667///
8668/// - [AbstractMonster]
8669/// - [AbstractCreature]
8670/// - [AbstractInsentient]
8671/// - [AbstractLiving]
8672/// - [AbstractEntity]
8673///
8674/// # Children
8675///
8676/// This entity type has no children types.
8677#[derive(Component)]
8678pub struct Creaking;
8679impl Creaking {
8680    fn apply_metadata(
8681        entity: &mut bevy_ecs::system::EntityCommands,
8682        d: EntityDataItem,
8683    ) -> Result<(), UpdateMetadataError> {
8684        match d.index {
8685            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8686            16 => {
8687                entity.insert(CanMove(d.value.into_boolean()?));
8688            }
8689            17 => {
8690                entity.insert(IsActive(d.value.into_boolean()?));
8691            }
8692            18 => {
8693                entity.insert(IsTearingDown(d.value.into_boolean()?));
8694            }
8695            19 => {
8696                entity.insert(HomePos(d.value.into_optional_block_pos()?));
8697            }
8698            _ => {}
8699        }
8700        Ok(())
8701    }
8702}
8703
8704/// The metadata bundle for [Creaking].
8705///
8706/// This type should generally not be used directly.
8707#[derive(Bundle)]
8708pub struct CreakingMetadataBundle {
8709    _marker: Creaking,
8710    parent: AbstractMonsterMetadataBundle,
8711    can_move: CanMove,
8712    is_active: IsActive,
8713    is_tearing_down: IsTearingDown,
8714    home_pos: HomePos,
8715}
8716impl Default for CreakingMetadataBundle {
8717    fn default() -> Self {
8718        Self {
8719            _marker: Creaking,
8720            parent: Default::default(),
8721            can_move: CanMove(true),
8722            is_active: IsActive(false),
8723            is_tearing_down: IsTearingDown(false),
8724            home_pos: HomePos(None),
8725        }
8726    }
8727}
8728
8729/// A metadata field for [Creeper].
8730#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8731pub struct SwellDir(pub i32);
8732/// A metadata field for [Creeper].
8733#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8734pub struct IsPowered(pub bool);
8735/// A metadata field for [Creeper].
8736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8737pub struct IsIgnited(pub bool);
8738/// The marker component for entities of type `minecraft:creeper`.
8739///
8740/// # Metadata
8741///
8742/// These are the metadata components that all `Creeper` entities are guaranteed
8743/// to have, in addition to the metadata components from parent types:
8744///
8745/// - [SwellDir]
8746/// - [IsPowered]
8747/// - [IsIgnited]
8748///
8749/// # Parents
8750///
8751/// Entities with `Creeper` will also have the following marker components and
8752/// their metadata fields:
8753///
8754/// - [AbstractMonster]
8755/// - [AbstractCreature]
8756/// - [AbstractInsentient]
8757/// - [AbstractLiving]
8758/// - [AbstractEntity]
8759///
8760/// # Children
8761///
8762/// This entity type has no children types.
8763#[derive(Component)]
8764pub struct Creeper;
8765impl Creeper {
8766    fn apply_metadata(
8767        entity: &mut bevy_ecs::system::EntityCommands,
8768        d: EntityDataItem,
8769    ) -> Result<(), UpdateMetadataError> {
8770        match d.index {
8771            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8772            16 => {
8773                entity.insert(SwellDir(d.value.into_int()?));
8774            }
8775            17 => {
8776                entity.insert(IsPowered(d.value.into_boolean()?));
8777            }
8778            18 => {
8779                entity.insert(IsIgnited(d.value.into_boolean()?));
8780            }
8781            _ => {}
8782        }
8783        Ok(())
8784    }
8785}
8786
8787/// The metadata bundle for [Creeper].
8788///
8789/// This type should generally not be used directly.
8790#[derive(Bundle)]
8791pub struct CreeperMetadataBundle {
8792    _marker: Creeper,
8793    parent: AbstractMonsterMetadataBundle,
8794    swell_dir: SwellDir,
8795    is_powered: IsPowered,
8796    is_ignited: IsIgnited,
8797}
8798impl Default for CreeperMetadataBundle {
8799    fn default() -> Self {
8800        Self {
8801            _marker: Creeper,
8802            parent: Default::default(),
8803            swell_dir: SwellDir(-1),
8804            is_powered: IsPowered(false),
8805            is_ignited: IsIgnited(false),
8806        }
8807    }
8808}
8809
8810/// A metadata field for [Enderman].
8811#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8812pub struct CarryState(pub azalea_block::BlockState);
8813/// A metadata field for [Enderman].
8814#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8815pub struct Creepy(pub bool);
8816/// A metadata field for [Enderman].
8817#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8818pub struct StaredAt(pub bool);
8819/// The marker component for entities of type `minecraft:enderman`.
8820///
8821/// # Metadata
8822///
8823/// These are the metadata components that all `Enderman` entities are
8824/// guaranteed to have, in addition to the metadata components from parent
8825/// types:
8826///
8827/// - [CarryState]
8828/// - [Creepy]
8829/// - [StaredAt]
8830///
8831/// # Parents
8832///
8833/// Entities with `Enderman` will also have the following marker components and
8834/// their metadata fields:
8835///
8836/// - [AbstractMonster]
8837/// - [AbstractCreature]
8838/// - [AbstractInsentient]
8839/// - [AbstractLiving]
8840/// - [AbstractEntity]
8841///
8842/// # Children
8843///
8844/// This entity type has no children types.
8845#[derive(Component)]
8846pub struct Enderman;
8847impl Enderman {
8848    fn apply_metadata(
8849        entity: &mut bevy_ecs::system::EntityCommands,
8850        d: EntityDataItem,
8851    ) -> Result<(), UpdateMetadataError> {
8852        match d.index {
8853            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8854            16 => {
8855                entity.insert(CarryState(d.value.into_optional_block_state()?));
8856            }
8857            17 => {
8858                entity.insert(Creepy(d.value.into_boolean()?));
8859            }
8860            18 => {
8861                entity.insert(StaredAt(d.value.into_boolean()?));
8862            }
8863            _ => {}
8864        }
8865        Ok(())
8866    }
8867}
8868
8869/// The metadata bundle for [Enderman].
8870///
8871/// This type should generally not be used directly.
8872#[derive(Bundle)]
8873pub struct EndermanMetadataBundle {
8874    _marker: Enderman,
8875    parent: AbstractMonsterMetadataBundle,
8876    carry_state: CarryState,
8877    creepy: Creepy,
8878    stared_at: StaredAt,
8879}
8880impl Default for EndermanMetadataBundle {
8881    fn default() -> Self {
8882        Self {
8883            _marker: Enderman,
8884            parent: Default::default(),
8885            carry_state: CarryState(azalea_block::BlockState::AIR),
8886            creepy: Creepy(false),
8887            stared_at: StaredAt(false),
8888        }
8889    }
8890}
8891
8892/// The marker component for entities of type `minecraft:endermite`.
8893///
8894/// # Metadata
8895///
8896/// This entity type does not add any additional metadata. It will still have
8897/// metadata from parent types.
8898///
8899/// # Parents
8900///
8901/// Entities with `Endermite` will also have the following marker components and
8902/// their metadata fields:
8903///
8904/// - [AbstractMonster]
8905/// - [AbstractCreature]
8906/// - [AbstractInsentient]
8907/// - [AbstractLiving]
8908/// - [AbstractEntity]
8909///
8910/// # Children
8911///
8912/// This entity type has no children types.
8913#[derive(Component)]
8914pub struct Endermite;
8915impl Endermite {
8916    fn apply_metadata(
8917        entity: &mut bevy_ecs::system::EntityCommands,
8918        d: EntityDataItem,
8919    ) -> Result<(), UpdateMetadataError> {
8920        match d.index {
8921            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8922            _ => {}
8923        }
8924        Ok(())
8925    }
8926}
8927
8928/// The metadata bundle for [Endermite].
8929///
8930/// This type should generally not be used directly.
8931#[derive(Bundle)]
8932pub struct EndermiteMetadataBundle {
8933    _marker: Endermite,
8934    parent: AbstractMonsterMetadataBundle,
8935}
8936impl Default for EndermiteMetadataBundle {
8937    fn default() -> Self {
8938        Self {
8939            _marker: Endermite,
8940            parent: Default::default(),
8941        }
8942    }
8943}
8944
8945/// The marker component for entities of type `minecraft:giant`.
8946///
8947/// # Metadata
8948///
8949/// This entity type does not add any additional metadata. It will still have
8950/// metadata from parent types.
8951///
8952/// # Parents
8953///
8954/// Entities with `Giant` will also have the following marker components and
8955/// their metadata fields:
8956///
8957/// - [AbstractMonster]
8958/// - [AbstractCreature]
8959/// - [AbstractInsentient]
8960/// - [AbstractLiving]
8961/// - [AbstractEntity]
8962///
8963/// # Children
8964///
8965/// This entity type has no children types.
8966#[derive(Component)]
8967pub struct Giant;
8968impl Giant {
8969    fn apply_metadata(
8970        entity: &mut bevy_ecs::system::EntityCommands,
8971        d: EntityDataItem,
8972    ) -> Result<(), UpdateMetadataError> {
8973        match d.index {
8974            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8975            _ => {}
8976        }
8977        Ok(())
8978    }
8979}
8980
8981/// The metadata bundle for [Giant].
8982///
8983/// This type should generally not be used directly.
8984#[derive(Bundle)]
8985pub struct GiantMetadataBundle {
8986    _marker: Giant,
8987    parent: AbstractMonsterMetadataBundle,
8988}
8989impl Default for GiantMetadataBundle {
8990    fn default() -> Self {
8991        Self {
8992            _marker: Giant,
8993            parent: Default::default(),
8994        }
8995    }
8996}
8997
8998/// A metadata field for [Guardian].
8999#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9000pub struct Moving(pub bool);
9001/// A metadata field for [Guardian].
9002#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9003pub struct AttackTarget(pub i32);
9004/// The marker component for entities of type `minecraft:guardian`.
9005///
9006/// # Metadata
9007///
9008/// These are the metadata components that all `Guardian` entities are
9009/// guaranteed to have, in addition to the metadata components from parent
9010/// types:
9011///
9012/// - [Moving]
9013/// - [AttackTarget]
9014///
9015/// # Parents
9016///
9017/// Entities with `Guardian` will also have the following marker components and
9018/// their metadata fields:
9019///
9020/// - [AbstractMonster]
9021/// - [AbstractCreature]
9022/// - [AbstractInsentient]
9023/// - [AbstractLiving]
9024/// - [AbstractEntity]
9025///
9026/// # Children
9027///
9028/// - [ElderGuardian]
9029#[derive(Component)]
9030pub struct Guardian;
9031impl Guardian {
9032    fn apply_metadata(
9033        entity: &mut bevy_ecs::system::EntityCommands,
9034        d: EntityDataItem,
9035    ) -> Result<(), UpdateMetadataError> {
9036        match d.index {
9037            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9038            16 => {
9039                entity.insert(Moving(d.value.into_boolean()?));
9040            }
9041            17 => {
9042                entity.insert(AttackTarget(d.value.into_int()?));
9043            }
9044            _ => {}
9045        }
9046        Ok(())
9047    }
9048}
9049
9050/// The metadata bundle for [Guardian].
9051///
9052/// This type should generally not be used directly.
9053#[derive(Bundle)]
9054pub struct GuardianMetadataBundle {
9055    _marker: Guardian,
9056    parent: AbstractMonsterMetadataBundle,
9057    moving: Moving,
9058    attack_target: AttackTarget,
9059}
9060impl Default for GuardianMetadataBundle {
9061    fn default() -> Self {
9062        Self {
9063            _marker: Guardian,
9064            parent: Default::default(),
9065            moving: Moving(false),
9066            attack_target: AttackTarget(0),
9067        }
9068    }
9069}
9070
9071/// The marker component for entities of type `minecraft:elder_guardian`.
9072///
9073/// # Metadata
9074///
9075/// This entity type does not add any additional metadata. It will still have
9076/// metadata from parent types.
9077///
9078/// # Parents
9079///
9080/// Entities with `ElderGuardian` will also have the following marker components
9081/// and their metadata fields:
9082///
9083/// - [Guardian]
9084/// - [AbstractMonster]
9085/// - [AbstractCreature]
9086/// - [AbstractInsentient]
9087/// - [AbstractLiving]
9088/// - [AbstractEntity]
9089///
9090/// # Children
9091///
9092/// This entity type has no children types.
9093#[derive(Component)]
9094pub struct ElderGuardian;
9095impl ElderGuardian {
9096    fn apply_metadata(
9097        entity: &mut bevy_ecs::system::EntityCommands,
9098        d: EntityDataItem,
9099    ) -> Result<(), UpdateMetadataError> {
9100        match d.index {
9101            0..=17 => Guardian::apply_metadata(entity, d)?,
9102            _ => {}
9103        }
9104        Ok(())
9105    }
9106}
9107
9108/// The metadata bundle for [ElderGuardian].
9109///
9110/// This type should generally not be used directly.
9111#[derive(Bundle)]
9112pub struct ElderGuardianMetadataBundle {
9113    _marker: ElderGuardian,
9114    parent: GuardianMetadataBundle,
9115}
9116impl Default for ElderGuardianMetadataBundle {
9117    fn default() -> Self {
9118        Self {
9119            _marker: ElderGuardian,
9120            parent: Default::default(),
9121        }
9122    }
9123}
9124
9125/// The marker component for entities of type `minecraft:parched`.
9126///
9127/// # Metadata
9128///
9129/// This entity type does not add any additional metadata. It will still have
9130/// metadata from parent types.
9131///
9132/// # Parents
9133///
9134/// Entities with `Parched` will also have the following marker components and
9135/// their metadata fields:
9136///
9137/// - [AbstractMonster]
9138/// - [AbstractCreature]
9139/// - [AbstractInsentient]
9140/// - [AbstractLiving]
9141/// - [AbstractEntity]
9142///
9143/// # Children
9144///
9145/// This entity type has no children types.
9146#[derive(Component)]
9147pub struct Parched;
9148impl Parched {
9149    fn apply_metadata(
9150        entity: &mut bevy_ecs::system::EntityCommands,
9151        d: EntityDataItem,
9152    ) -> Result<(), UpdateMetadataError> {
9153        match d.index {
9154            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9155            _ => {}
9156        }
9157        Ok(())
9158    }
9159}
9160
9161/// The metadata bundle for [Parched].
9162///
9163/// This type should generally not be used directly.
9164#[derive(Bundle)]
9165pub struct ParchedMetadataBundle {
9166    _marker: Parched,
9167    parent: AbstractMonsterMetadataBundle,
9168}
9169impl Default for ParchedMetadataBundle {
9170    fn default() -> Self {
9171        Self {
9172            _marker: Parched,
9173            parent: Default::default(),
9174        }
9175    }
9176}
9177
9178/// The marker component for entities of type `minecraft:silverfish`.
9179///
9180/// # Metadata
9181///
9182/// This entity type does not add any additional metadata. It will still have
9183/// metadata from parent types.
9184///
9185/// # Parents
9186///
9187/// Entities with `Silverfish` will also have the following marker components
9188/// and their metadata fields:
9189///
9190/// - [AbstractMonster]
9191/// - [AbstractCreature]
9192/// - [AbstractInsentient]
9193/// - [AbstractLiving]
9194/// - [AbstractEntity]
9195///
9196/// # Children
9197///
9198/// This entity type has no children types.
9199#[derive(Component)]
9200pub struct Silverfish;
9201impl Silverfish {
9202    fn apply_metadata(
9203        entity: &mut bevy_ecs::system::EntityCommands,
9204        d: EntityDataItem,
9205    ) -> Result<(), UpdateMetadataError> {
9206        match d.index {
9207            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9208            _ => {}
9209        }
9210        Ok(())
9211    }
9212}
9213
9214/// The metadata bundle for [Silverfish].
9215///
9216/// This type should generally not be used directly.
9217#[derive(Bundle)]
9218pub struct SilverfishMetadataBundle {
9219    _marker: Silverfish,
9220    parent: AbstractMonsterMetadataBundle,
9221}
9222impl Default for SilverfishMetadataBundle {
9223    fn default() -> Self {
9224        Self {
9225            _marker: Silverfish,
9226            parent: Default::default(),
9227        }
9228    }
9229}
9230
9231/// A metadata field for [Skeleton].
9232#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9233pub struct StrayConversion(pub bool);
9234/// The marker component for entities of type `minecraft:skeleton`.
9235///
9236/// # Metadata
9237///
9238/// These are the metadata components that all `Skeleton` entities are
9239/// guaranteed to have, in addition to the metadata components from parent
9240/// types:
9241///
9242/// - [StrayConversion]
9243///
9244/// # Parents
9245///
9246/// Entities with `Skeleton` will also have the following marker components and
9247/// their metadata fields:
9248///
9249/// - [AbstractMonster]
9250/// - [AbstractCreature]
9251/// - [AbstractInsentient]
9252/// - [AbstractLiving]
9253/// - [AbstractEntity]
9254///
9255/// # Children
9256///
9257/// This entity type has no children types.
9258#[derive(Component)]
9259pub struct Skeleton;
9260impl Skeleton {
9261    fn apply_metadata(
9262        entity: &mut bevy_ecs::system::EntityCommands,
9263        d: EntityDataItem,
9264    ) -> Result<(), UpdateMetadataError> {
9265        match d.index {
9266            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9267            16 => {
9268                entity.insert(StrayConversion(d.value.into_boolean()?));
9269            }
9270            _ => {}
9271        }
9272        Ok(())
9273    }
9274}
9275
9276/// The metadata bundle for [Skeleton].
9277///
9278/// This type should generally not be used directly.
9279#[derive(Bundle)]
9280pub struct SkeletonMetadataBundle {
9281    _marker: Skeleton,
9282    parent: AbstractMonsterMetadataBundle,
9283    stray_conversion: StrayConversion,
9284}
9285impl Default for SkeletonMetadataBundle {
9286    fn default() -> Self {
9287        Self {
9288            _marker: Skeleton,
9289            parent: Default::default(),
9290            stray_conversion: StrayConversion(false),
9291        }
9292    }
9293}
9294
9295#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
9296/// A metadata field for [Spider].
9297pub struct Climbing(pub bool);
9298/// The marker component for entities of type `minecraft:spider`.
9299///
9300/// # Metadata
9301///
9302/// These are the metadata components that all `Spider` entities are guaranteed
9303/// to have, in addition to the metadata components from parent types:
9304///
9305/// - [Climbing]
9306///
9307/// # Parents
9308///
9309/// Entities with `Spider` will also have the following marker components and
9310/// their metadata fields:
9311///
9312/// - [AbstractMonster]
9313/// - [AbstractCreature]
9314/// - [AbstractInsentient]
9315/// - [AbstractLiving]
9316/// - [AbstractEntity]
9317///
9318/// # Children
9319///
9320/// - [CaveSpider]
9321#[derive(Component)]
9322pub struct Spider;
9323impl Spider {
9324    fn apply_metadata(
9325        entity: &mut bevy_ecs::system::EntityCommands,
9326        d: EntityDataItem,
9327    ) -> Result<(), UpdateMetadataError> {
9328        match d.index {
9329            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9330            16 => {
9331                let bitfield = d.value.into_byte()?;
9332                entity.insert(Climbing(bitfield & 0x1 != 0));
9333            }
9334            _ => {}
9335        }
9336        Ok(())
9337    }
9338}
9339
9340/// The metadata bundle for [Spider].
9341///
9342/// This type should generally not be used directly.
9343#[derive(Bundle)]
9344pub struct SpiderMetadataBundle {
9345    _marker: Spider,
9346    parent: AbstractMonsterMetadataBundle,
9347    climbing: Climbing,
9348}
9349impl Default for SpiderMetadataBundle {
9350    fn default() -> Self {
9351        Self {
9352            _marker: Spider,
9353            parent: Default::default(),
9354            climbing: Climbing(false),
9355        }
9356    }
9357}
9358
9359/// The marker component for entities of type `minecraft:cave_spider`.
9360///
9361/// # Metadata
9362///
9363/// This entity type does not add any additional metadata. It will still have
9364/// metadata from parent types.
9365///
9366/// # Parents
9367///
9368/// Entities with `CaveSpider` will also have the following marker components
9369/// and their metadata fields:
9370///
9371/// - [Spider]
9372/// - [AbstractMonster]
9373/// - [AbstractCreature]
9374/// - [AbstractInsentient]
9375/// - [AbstractLiving]
9376/// - [AbstractEntity]
9377///
9378/// # Children
9379///
9380/// This entity type has no children types.
9381#[derive(Component)]
9382pub struct CaveSpider;
9383impl CaveSpider {
9384    fn apply_metadata(
9385        entity: &mut bevy_ecs::system::EntityCommands,
9386        d: EntityDataItem,
9387    ) -> Result<(), UpdateMetadataError> {
9388        match d.index {
9389            0..=16 => Spider::apply_metadata(entity, d)?,
9390            _ => {}
9391        }
9392        Ok(())
9393    }
9394}
9395
9396/// The metadata bundle for [CaveSpider].
9397///
9398/// This type should generally not be used directly.
9399#[derive(Bundle)]
9400pub struct CaveSpiderMetadataBundle {
9401    _marker: CaveSpider,
9402    parent: SpiderMetadataBundle,
9403}
9404impl Default for CaveSpiderMetadataBundle {
9405    fn default() -> Self {
9406        Self {
9407            _marker: CaveSpider,
9408            parent: Default::default(),
9409        }
9410    }
9411}
9412
9413/// The marker component for entities of type `minecraft:stray`.
9414///
9415/// # Metadata
9416///
9417/// This entity type does not add any additional metadata. It will still have
9418/// metadata from parent types.
9419///
9420/// # Parents
9421///
9422/// Entities with `Stray` will also have the following marker components and
9423/// their metadata fields:
9424///
9425/// - [AbstractMonster]
9426/// - [AbstractCreature]
9427/// - [AbstractInsentient]
9428/// - [AbstractLiving]
9429/// - [AbstractEntity]
9430///
9431/// # Children
9432///
9433/// This entity type has no children types.
9434#[derive(Component)]
9435pub struct Stray;
9436impl Stray {
9437    fn apply_metadata(
9438        entity: &mut bevy_ecs::system::EntityCommands,
9439        d: EntityDataItem,
9440    ) -> Result<(), UpdateMetadataError> {
9441        match d.index {
9442            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9443            _ => {}
9444        }
9445        Ok(())
9446    }
9447}
9448
9449/// The metadata bundle for [Stray].
9450///
9451/// This type should generally not be used directly.
9452#[derive(Bundle)]
9453pub struct StrayMetadataBundle {
9454    _marker: Stray,
9455    parent: AbstractMonsterMetadataBundle,
9456}
9457impl Default for StrayMetadataBundle {
9458    fn default() -> Self {
9459        Self {
9460            _marker: Stray,
9461            parent: Default::default(),
9462        }
9463    }
9464}
9465
9466/// A metadata field for [Vex].
9467#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9468pub struct VexFlags(pub u8);
9469/// The marker component for entities of type `minecraft:vex`.
9470///
9471/// # Metadata
9472///
9473/// These are the metadata components that all `Vex` entities are guaranteed to
9474/// have, in addition to the metadata components from parent types:
9475///
9476/// - [VexFlags]
9477///
9478/// # Parents
9479///
9480/// Entities with `Vex` will also have the following marker components and their
9481/// metadata fields:
9482///
9483/// - [AbstractMonster]
9484/// - [AbstractCreature]
9485/// - [AbstractInsentient]
9486/// - [AbstractLiving]
9487/// - [AbstractEntity]
9488///
9489/// # Children
9490///
9491/// This entity type has no children types.
9492#[derive(Component)]
9493pub struct Vex;
9494impl Vex {
9495    fn apply_metadata(
9496        entity: &mut bevy_ecs::system::EntityCommands,
9497        d: EntityDataItem,
9498    ) -> Result<(), UpdateMetadataError> {
9499        match d.index {
9500            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9501            16 => {
9502                entity.insert(VexFlags(d.value.into_byte()?));
9503            }
9504            _ => {}
9505        }
9506        Ok(())
9507    }
9508}
9509
9510/// The metadata bundle for [Vex].
9511///
9512/// This type should generally not be used directly.
9513#[derive(Bundle)]
9514pub struct VexMetadataBundle {
9515    _marker: Vex,
9516    parent: AbstractMonsterMetadataBundle,
9517    vex_flags: VexFlags,
9518}
9519impl Default for VexMetadataBundle {
9520    fn default() -> Self {
9521        Self {
9522            _marker: Vex,
9523            parent: Default::default(),
9524            vex_flags: VexFlags(0),
9525        }
9526    }
9527}
9528
9529/// A metadata field for [Warden].
9530#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9531pub struct ClientAngerLevel(pub i32);
9532/// The marker component for entities of type `minecraft:warden`.
9533///
9534/// # Metadata
9535///
9536/// These are the metadata components that all `Warden` entities are guaranteed
9537/// to have, in addition to the metadata components from parent types:
9538///
9539/// - [ClientAngerLevel]
9540///
9541/// # Parents
9542///
9543/// Entities with `Warden` will also have the following marker components and
9544/// their metadata fields:
9545///
9546/// - [AbstractMonster]
9547/// - [AbstractCreature]
9548/// - [AbstractInsentient]
9549/// - [AbstractLiving]
9550/// - [AbstractEntity]
9551///
9552/// # Children
9553///
9554/// This entity type has no children types.
9555#[derive(Component)]
9556pub struct Warden;
9557impl Warden {
9558    fn apply_metadata(
9559        entity: &mut bevy_ecs::system::EntityCommands,
9560        d: EntityDataItem,
9561    ) -> Result<(), UpdateMetadataError> {
9562        match d.index {
9563            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9564            16 => {
9565                entity.insert(ClientAngerLevel(d.value.into_int()?));
9566            }
9567            _ => {}
9568        }
9569        Ok(())
9570    }
9571}
9572
9573/// The metadata bundle for [Warden].
9574///
9575/// This type should generally not be used directly.
9576#[derive(Bundle)]
9577pub struct WardenMetadataBundle {
9578    _marker: Warden,
9579    parent: AbstractMonsterMetadataBundle,
9580    client_anger_level: ClientAngerLevel,
9581}
9582impl Default for WardenMetadataBundle {
9583    fn default() -> Self {
9584        Self {
9585            _marker: Warden,
9586            parent: Default::default(),
9587            client_anger_level: ClientAngerLevel(0),
9588        }
9589    }
9590}
9591
9592/// A metadata field for [Wither].
9593#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9594pub struct TargetA(pub i32);
9595/// A metadata field for [Wither].
9596#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9597pub struct TargetB(pub i32);
9598/// A metadata field for [Wither].
9599#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9600pub struct TargetC(pub i32);
9601/// A metadata field for [Wither].
9602#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9603pub struct Inv(pub i32);
9604/// The marker component for entities of type `minecraft:wither`.
9605///
9606/// # Metadata
9607///
9608/// These are the metadata components that all `Wither` entities are guaranteed
9609/// to have, in addition to the metadata components from parent types:
9610///
9611/// - [TargetA]
9612/// - [TargetB]
9613/// - [TargetC]
9614/// - [Inv]
9615///
9616/// # Parents
9617///
9618/// Entities with `Wither` will also have the following marker components and
9619/// their metadata fields:
9620///
9621/// - [AbstractMonster]
9622/// - [AbstractCreature]
9623/// - [AbstractInsentient]
9624/// - [AbstractLiving]
9625/// - [AbstractEntity]
9626///
9627/// # Children
9628///
9629/// This entity type has no children types.
9630#[derive(Component)]
9631pub struct Wither;
9632impl Wither {
9633    fn apply_metadata(
9634        entity: &mut bevy_ecs::system::EntityCommands,
9635        d: EntityDataItem,
9636    ) -> Result<(), UpdateMetadataError> {
9637        match d.index {
9638            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9639            16 => {
9640                entity.insert(TargetA(d.value.into_int()?));
9641            }
9642            17 => {
9643                entity.insert(TargetB(d.value.into_int()?));
9644            }
9645            18 => {
9646                entity.insert(TargetC(d.value.into_int()?));
9647            }
9648            19 => {
9649                entity.insert(Inv(d.value.into_int()?));
9650            }
9651            _ => {}
9652        }
9653        Ok(())
9654    }
9655}
9656
9657/// The metadata bundle for [Wither].
9658///
9659/// This type should generally not be used directly.
9660#[derive(Bundle)]
9661pub struct WitherMetadataBundle {
9662    _marker: Wither,
9663    parent: AbstractMonsterMetadataBundle,
9664    target_a: TargetA,
9665    target_b: TargetB,
9666    target_c: TargetC,
9667    inv: Inv,
9668}
9669impl Default for WitherMetadataBundle {
9670    fn default() -> Self {
9671        Self {
9672            _marker: Wither,
9673            parent: Default::default(),
9674            target_a: TargetA(0),
9675            target_b: TargetB(0),
9676            target_c: TargetC(0),
9677            inv: Inv(0),
9678        }
9679    }
9680}
9681
9682/// The marker component for entities of type `minecraft:wither_skeleton`.
9683///
9684/// # Metadata
9685///
9686/// This entity type does not add any additional metadata. It will still have
9687/// metadata from parent types.
9688///
9689/// # Parents
9690///
9691/// Entities with `WitherSkeleton` will also have the following marker
9692/// components and their metadata fields:
9693///
9694/// - [AbstractMonster]
9695/// - [AbstractCreature]
9696/// - [AbstractInsentient]
9697/// - [AbstractLiving]
9698/// - [AbstractEntity]
9699///
9700/// # Children
9701///
9702/// This entity type has no children types.
9703#[derive(Component)]
9704pub struct WitherSkeleton;
9705impl WitherSkeleton {
9706    fn apply_metadata(
9707        entity: &mut bevy_ecs::system::EntityCommands,
9708        d: EntityDataItem,
9709    ) -> Result<(), UpdateMetadataError> {
9710        match d.index {
9711            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9712            _ => {}
9713        }
9714        Ok(())
9715    }
9716}
9717
9718/// The metadata bundle for [WitherSkeleton].
9719///
9720/// This type should generally not be used directly.
9721#[derive(Bundle)]
9722pub struct WitherSkeletonMetadataBundle {
9723    _marker: WitherSkeleton,
9724    parent: AbstractMonsterMetadataBundle,
9725}
9726impl Default for WitherSkeletonMetadataBundle {
9727    fn default() -> Self {
9728        Self {
9729            _marker: WitherSkeleton,
9730            parent: Default::default(),
9731        }
9732    }
9733}
9734
9735/// A metadata field for [Zoglin].
9736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9737pub struct ZoglinBaby(pub bool);
9738/// The marker component for entities of type `minecraft:zoglin`.
9739///
9740/// # Metadata
9741///
9742/// These are the metadata components that all `Zoglin` entities are guaranteed
9743/// to have, in addition to the metadata components from parent types:
9744///
9745/// - [ZoglinBaby]
9746///
9747/// # Parents
9748///
9749/// Entities with `Zoglin` will also have the following marker components and
9750/// their metadata fields:
9751///
9752/// - [AbstractMonster]
9753/// - [AbstractCreature]
9754/// - [AbstractInsentient]
9755/// - [AbstractLiving]
9756/// - [AbstractEntity]
9757///
9758/// # Children
9759///
9760/// This entity type has no children types.
9761#[derive(Component)]
9762pub struct Zoglin;
9763impl Zoglin {
9764    fn apply_metadata(
9765        entity: &mut bevy_ecs::system::EntityCommands,
9766        d: EntityDataItem,
9767    ) -> Result<(), UpdateMetadataError> {
9768        match d.index {
9769            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9770            16 => {
9771                entity.insert(ZoglinBaby(d.value.into_boolean()?));
9772            }
9773            _ => {}
9774        }
9775        Ok(())
9776    }
9777}
9778
9779/// The metadata bundle for [Zoglin].
9780///
9781/// This type should generally not be used directly.
9782#[derive(Bundle)]
9783pub struct ZoglinMetadataBundle {
9784    _marker: Zoglin,
9785    parent: AbstractMonsterMetadataBundle,
9786    zoglin_baby: ZoglinBaby,
9787}
9788impl Default for ZoglinMetadataBundle {
9789    fn default() -> Self {
9790        Self {
9791            _marker: Zoglin,
9792            parent: Default::default(),
9793            zoglin_baby: ZoglinBaby(false),
9794        }
9795    }
9796}
9797
9798/// A metadata field for [Zombie].
9799#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9800pub struct ZombieBaby(pub bool);
9801/// A metadata field for [Zombie].
9802#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9803pub struct SpecialType(pub i32);
9804/// A metadata field for [Zombie].
9805#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9806pub struct DrownedConversion(pub bool);
9807/// The marker component for entities of type `minecraft:zombie`.
9808///
9809/// # Metadata
9810///
9811/// These are the metadata components that all `Zombie` entities are guaranteed
9812/// to have, in addition to the metadata components from parent types:
9813///
9814/// - [ZombieBaby]
9815/// - [SpecialType]
9816/// - [DrownedConversion]
9817///
9818/// # Parents
9819///
9820/// Entities with `Zombie` will also have the following marker components and
9821/// their metadata fields:
9822///
9823/// - [AbstractMonster]
9824/// - [AbstractCreature]
9825/// - [AbstractInsentient]
9826/// - [AbstractLiving]
9827/// - [AbstractEntity]
9828///
9829/// # Children
9830///
9831/// - [Drowned]
9832/// - [Husk]
9833/// - [ZombieVillager]
9834/// - [ZombifiedPiglin]
9835#[derive(Component)]
9836pub struct Zombie;
9837impl Zombie {
9838    fn apply_metadata(
9839        entity: &mut bevy_ecs::system::EntityCommands,
9840        d: EntityDataItem,
9841    ) -> Result<(), UpdateMetadataError> {
9842        match d.index {
9843            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9844            16 => {
9845                entity.insert(ZombieBaby(d.value.into_boolean()?));
9846            }
9847            17 => {
9848                entity.insert(SpecialType(d.value.into_int()?));
9849            }
9850            18 => {
9851                entity.insert(DrownedConversion(d.value.into_boolean()?));
9852            }
9853            _ => {}
9854        }
9855        Ok(())
9856    }
9857}
9858
9859/// The metadata bundle for [Zombie].
9860///
9861/// This type should generally not be used directly.
9862#[derive(Bundle)]
9863pub struct ZombieMetadataBundle {
9864    _marker: Zombie,
9865    parent: AbstractMonsterMetadataBundle,
9866    zombie_baby: ZombieBaby,
9867    special_type: SpecialType,
9868    drowned_conversion: DrownedConversion,
9869}
9870impl Default for ZombieMetadataBundle {
9871    fn default() -> Self {
9872        Self {
9873            _marker: Zombie,
9874            parent: Default::default(),
9875            zombie_baby: ZombieBaby(false),
9876            special_type: SpecialType(0),
9877            drowned_conversion: DrownedConversion(false),
9878        }
9879    }
9880}
9881
9882/// The marker component for entities of type `minecraft:drowned`.
9883///
9884/// # Metadata
9885///
9886/// This entity type does not add any additional metadata. It will still have
9887/// metadata from parent types.
9888///
9889/// # Parents
9890///
9891/// Entities with `Drowned` will also have the following marker components and
9892/// their metadata fields:
9893///
9894/// - [Zombie]
9895/// - [AbstractMonster]
9896/// - [AbstractCreature]
9897/// - [AbstractInsentient]
9898/// - [AbstractLiving]
9899/// - [AbstractEntity]
9900///
9901/// # Children
9902///
9903/// This entity type has no children types.
9904#[derive(Component)]
9905pub struct Drowned;
9906impl Drowned {
9907    fn apply_metadata(
9908        entity: &mut bevy_ecs::system::EntityCommands,
9909        d: EntityDataItem,
9910    ) -> Result<(), UpdateMetadataError> {
9911        match d.index {
9912            0..=18 => Zombie::apply_metadata(entity, d)?,
9913            _ => {}
9914        }
9915        Ok(())
9916    }
9917}
9918
9919/// The metadata bundle for [Drowned].
9920///
9921/// This type should generally not be used directly.
9922#[derive(Bundle)]
9923pub struct DrownedMetadataBundle {
9924    _marker: Drowned,
9925    parent: ZombieMetadataBundle,
9926}
9927impl Default for DrownedMetadataBundle {
9928    fn default() -> Self {
9929        Self {
9930            _marker: Drowned,
9931            parent: Default::default(),
9932        }
9933    }
9934}
9935
9936/// The marker component for entities of type `minecraft:husk`.
9937///
9938/// # Metadata
9939///
9940/// This entity type does not add any additional metadata. It will still have
9941/// metadata from parent types.
9942///
9943/// # Parents
9944///
9945/// Entities with `Husk` will also have the following marker components and
9946/// their metadata fields:
9947///
9948/// - [Zombie]
9949/// - [AbstractMonster]
9950/// - [AbstractCreature]
9951/// - [AbstractInsentient]
9952/// - [AbstractLiving]
9953/// - [AbstractEntity]
9954///
9955/// # Children
9956///
9957/// This entity type has no children types.
9958#[derive(Component)]
9959pub struct Husk;
9960impl Husk {
9961    fn apply_metadata(
9962        entity: &mut bevy_ecs::system::EntityCommands,
9963        d: EntityDataItem,
9964    ) -> Result<(), UpdateMetadataError> {
9965        match d.index {
9966            0..=18 => Zombie::apply_metadata(entity, d)?,
9967            _ => {}
9968        }
9969        Ok(())
9970    }
9971}
9972
9973/// The metadata bundle for [Husk].
9974///
9975/// This type should generally not be used directly.
9976#[derive(Bundle)]
9977pub struct HuskMetadataBundle {
9978    _marker: Husk,
9979    parent: ZombieMetadataBundle,
9980}
9981impl Default for HuskMetadataBundle {
9982    fn default() -> Self {
9983        Self {
9984            _marker: Husk,
9985            parent: Default::default(),
9986        }
9987    }
9988}
9989
9990/// A metadata field for [ZombieVillager].
9991#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9992pub struct Converting(pub bool);
9993/// A metadata field for [ZombieVillager].
9994#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9995pub struct ZombieVillagerVillagerData(pub VillagerData);
9996/// A metadata field for [ZombieVillager].
9997#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9998pub struct ZombieVillagerVillagerDataFinalized(pub bool);
9999/// The marker component for entities of type `minecraft:zombie_villager`.
10000///
10001/// # Metadata
10002///
10003/// These are the metadata components that all `ZombieVillager` entities are
10004/// guaranteed to have, in addition to the metadata components from parent
10005/// types:
10006///
10007/// - [Converting]
10008/// - [ZombieVillagerVillagerData]
10009/// - [ZombieVillagerVillagerDataFinalized]
10010///
10011/// # Parents
10012///
10013/// Entities with `ZombieVillager` will also have the following marker
10014/// components and their metadata fields:
10015///
10016/// - [Zombie]
10017/// - [AbstractMonster]
10018/// - [AbstractCreature]
10019/// - [AbstractInsentient]
10020/// - [AbstractLiving]
10021/// - [AbstractEntity]
10022///
10023/// # Children
10024///
10025/// This entity type has no children types.
10026#[derive(Component)]
10027pub struct ZombieVillager;
10028impl ZombieVillager {
10029    fn apply_metadata(
10030        entity: &mut bevy_ecs::system::EntityCommands,
10031        d: EntityDataItem,
10032    ) -> Result<(), UpdateMetadataError> {
10033        match d.index {
10034            0..=18 => Zombie::apply_metadata(entity, d)?,
10035            19 => {
10036                entity.insert(Converting(d.value.into_boolean()?));
10037            }
10038            20 => {
10039                entity.insert(ZombieVillagerVillagerData(d.value.into_villager_data()?));
10040            }
10041            21 => {
10042                entity.insert(ZombieVillagerVillagerDataFinalized(d.value.into_boolean()?));
10043            }
10044            _ => {}
10045        }
10046        Ok(())
10047    }
10048}
10049
10050/// The metadata bundle for [ZombieVillager].
10051///
10052/// This type should generally not be used directly.
10053#[derive(Bundle)]
10054pub struct ZombieVillagerMetadataBundle {
10055    _marker: ZombieVillager,
10056    parent: ZombieMetadataBundle,
10057    converting: Converting,
10058    zombie_villager_villager_data: ZombieVillagerVillagerData,
10059    zombie_villager_villager_data_finalized: ZombieVillagerVillagerDataFinalized,
10060}
10061impl Default for ZombieVillagerMetadataBundle {
10062    fn default() -> Self {
10063        Self {
10064            _marker: ZombieVillager,
10065            parent: Default::default(),
10066            converting: Converting(false),
10067            zombie_villager_villager_data: ZombieVillagerVillagerData(VillagerData {
10068                kind: azalea_registry::builtin::VillagerKind::Plains,
10069                profession: azalea_registry::builtin::VillagerProfession::None,
10070                level: 0,
10071            }),
10072            zombie_villager_villager_data_finalized: ZombieVillagerVillagerDataFinalized(false),
10073        }
10074    }
10075}
10076
10077/// The marker component for entities of type `minecraft:zombified_piglin`.
10078///
10079/// # Metadata
10080///
10081/// This entity type does not add any additional metadata. It will still have
10082/// metadata from parent types.
10083///
10084/// # Parents
10085///
10086/// Entities with `ZombifiedPiglin` will also have the following marker
10087/// components and their metadata fields:
10088///
10089/// - [Zombie]
10090/// - [AbstractMonster]
10091/// - [AbstractCreature]
10092/// - [AbstractInsentient]
10093/// - [AbstractLiving]
10094/// - [AbstractEntity]
10095///
10096/// # Children
10097///
10098/// This entity type has no children types.
10099#[derive(Component)]
10100pub struct ZombifiedPiglin;
10101impl ZombifiedPiglin {
10102    fn apply_metadata(
10103        entity: &mut bevy_ecs::system::EntityCommands,
10104        d: EntityDataItem,
10105    ) -> Result<(), UpdateMetadataError> {
10106        match d.index {
10107            0..=18 => Zombie::apply_metadata(entity, d)?,
10108            _ => {}
10109        }
10110        Ok(())
10111    }
10112}
10113
10114/// The metadata bundle for [ZombifiedPiglin].
10115///
10116/// This type should generally not be used directly.
10117#[derive(Bundle)]
10118pub struct ZombifiedPiglinMetadataBundle {
10119    _marker: ZombifiedPiglin,
10120    parent: ZombieMetadataBundle,
10121}
10122impl Default for ZombifiedPiglinMetadataBundle {
10123    fn default() -> Self {
10124        Self {
10125            _marker: ZombifiedPiglin,
10126            parent: Default::default(),
10127        }
10128    }
10129}
10130
10131/// A metadata field for [AbstractPiglin].
10132#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10133pub struct AbstractPiglinImmuneToZombification(pub bool);
10134/// An abstract entity marker component.
10135///
10136/// # Metadata
10137///
10138/// These are the metadata components that all `AbstractPiglin` entities are
10139/// guaranteed to have, in addition to the metadata components from parent
10140/// types:
10141///
10142/// - [AbstractPiglinImmuneToZombification]
10143///
10144/// # Parents
10145///
10146/// Entities with `AbstractPiglin` will also have the following marker
10147/// components and their metadata fields:
10148///
10149/// - [AbstractMonster]
10150/// - [AbstractCreature]
10151/// - [AbstractInsentient]
10152/// - [AbstractLiving]
10153/// - [AbstractEntity]
10154///
10155/// # Children
10156///
10157/// - [Piglin]
10158/// - [PiglinBrute]
10159#[derive(Component)]
10160pub struct AbstractPiglin;
10161impl AbstractPiglin {
10162    fn apply_metadata(
10163        entity: &mut bevy_ecs::system::EntityCommands,
10164        d: EntityDataItem,
10165    ) -> Result<(), UpdateMetadataError> {
10166        match d.index {
10167            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10168            16 => {
10169                entity.insert(AbstractPiglinImmuneToZombification(d.value.into_boolean()?));
10170            }
10171            _ => {}
10172        }
10173        Ok(())
10174    }
10175}
10176
10177/// The metadata bundle for [AbstractPiglin].
10178///
10179/// This type should generally not be used directly.
10180#[derive(Bundle)]
10181pub struct AbstractPiglinMetadataBundle {
10182    _marker: AbstractPiglin,
10183    parent: AbstractMonsterMetadataBundle,
10184    abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification,
10185}
10186impl Default for AbstractPiglinMetadataBundle {
10187    fn default() -> Self {
10188        Self {
10189            _marker: AbstractPiglin,
10190            parent: Default::default(),
10191            abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
10192        }
10193    }
10194}
10195
10196/// A metadata field for [Piglin].
10197#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10198pub struct PiglinBaby(pub bool);
10199/// A metadata field for [Piglin].
10200#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10201pub struct PiglinIsChargingCrossbow(pub bool);
10202/// A metadata field for [Piglin].
10203#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10204pub struct IsDancing(pub bool);
10205/// The marker component for entities of type `minecraft:piglin`.
10206///
10207/// # Metadata
10208///
10209/// These are the metadata components that all `Piglin` entities are guaranteed
10210/// to have, in addition to the metadata components from parent types:
10211///
10212/// - [PiglinBaby]
10213/// - [PiglinIsChargingCrossbow]
10214/// - [IsDancing]
10215///
10216/// # Parents
10217///
10218/// Entities with `Piglin` will also have the following marker components and
10219/// their metadata fields:
10220///
10221/// - [AbstractPiglin]
10222/// - [AbstractMonster]
10223/// - [AbstractCreature]
10224/// - [AbstractInsentient]
10225/// - [AbstractLiving]
10226/// - [AbstractEntity]
10227///
10228/// # Children
10229///
10230/// This entity type has no children types.
10231#[derive(Component)]
10232pub struct Piglin;
10233impl Piglin {
10234    fn apply_metadata(
10235        entity: &mut bevy_ecs::system::EntityCommands,
10236        d: EntityDataItem,
10237    ) -> Result<(), UpdateMetadataError> {
10238        match d.index {
10239            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
10240            17 => {
10241                entity.insert(PiglinBaby(d.value.into_boolean()?));
10242            }
10243            18 => {
10244                entity.insert(PiglinIsChargingCrossbow(d.value.into_boolean()?));
10245            }
10246            19 => {
10247                entity.insert(IsDancing(d.value.into_boolean()?));
10248            }
10249            _ => {}
10250        }
10251        Ok(())
10252    }
10253}
10254
10255/// The metadata bundle for [Piglin].
10256///
10257/// This type should generally not be used directly.
10258#[derive(Bundle)]
10259pub struct PiglinMetadataBundle {
10260    _marker: Piglin,
10261    parent: AbstractPiglinMetadataBundle,
10262    piglin_baby: PiglinBaby,
10263    piglin_is_charging_crossbow: PiglinIsChargingCrossbow,
10264    is_dancing: IsDancing,
10265}
10266impl Default for PiglinMetadataBundle {
10267    fn default() -> Self {
10268        Self {
10269            _marker: Piglin,
10270            parent: Default::default(),
10271            piglin_baby: PiglinBaby(false),
10272            piglin_is_charging_crossbow: PiglinIsChargingCrossbow(false),
10273            is_dancing: IsDancing(false),
10274        }
10275    }
10276}
10277
10278/// The marker component for entities of type `minecraft:piglin_brute`.
10279///
10280/// # Metadata
10281///
10282/// This entity type does not add any additional metadata. It will still have
10283/// metadata from parent types.
10284///
10285/// # Parents
10286///
10287/// Entities with `PiglinBrute` will also have the following marker components
10288/// and their metadata fields:
10289///
10290/// - [AbstractPiglin]
10291/// - [AbstractMonster]
10292/// - [AbstractCreature]
10293/// - [AbstractInsentient]
10294/// - [AbstractLiving]
10295/// - [AbstractEntity]
10296///
10297/// # Children
10298///
10299/// This entity type has no children types.
10300#[derive(Component)]
10301pub struct PiglinBrute;
10302impl PiglinBrute {
10303    fn apply_metadata(
10304        entity: &mut bevy_ecs::system::EntityCommands,
10305        d: EntityDataItem,
10306    ) -> Result<(), UpdateMetadataError> {
10307        match d.index {
10308            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
10309            _ => {}
10310        }
10311        Ok(())
10312    }
10313}
10314
10315/// The metadata bundle for [PiglinBrute].
10316///
10317/// This type should generally not be used directly.
10318#[derive(Bundle)]
10319pub struct PiglinBruteMetadataBundle {
10320    _marker: PiglinBrute,
10321    parent: AbstractPiglinMetadataBundle,
10322}
10323impl Default for PiglinBruteMetadataBundle {
10324    fn default() -> Self {
10325        Self {
10326            _marker: PiglinBrute,
10327            parent: Default::default(),
10328        }
10329    }
10330}
10331
10332/// A metadata field for [AbstractRaider].
10333#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10334pub struct IsCelebrating(pub bool);
10335/// An abstract entity marker component.
10336///
10337/// # Metadata
10338///
10339/// These are the metadata components that all `AbstractRaider` entities are
10340/// guaranteed to have, in addition to the metadata components from parent
10341/// types:
10342///
10343/// - [IsCelebrating]
10344///
10345/// # Parents
10346///
10347/// Entities with `AbstractRaider` will also have the following marker
10348/// components and their metadata fields:
10349///
10350/// - [AbstractMonster]
10351/// - [AbstractCreature]
10352/// - [AbstractInsentient]
10353/// - [AbstractLiving]
10354/// - [AbstractEntity]
10355///
10356/// # Children
10357///
10358/// - [Pillager]
10359/// - [Ravager]
10360/// - [Vindicator]
10361/// - [Witch]
10362/// - [AbstractSpellcasterIllager]
10363///   - [Evoker]
10364///   - [Illusioner]
10365#[derive(Component)]
10366pub struct AbstractRaider;
10367impl AbstractRaider {
10368    fn apply_metadata(
10369        entity: &mut bevy_ecs::system::EntityCommands,
10370        d: EntityDataItem,
10371    ) -> Result<(), UpdateMetadataError> {
10372        match d.index {
10373            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10374            16 => {
10375                entity.insert(IsCelebrating(d.value.into_boolean()?));
10376            }
10377            _ => {}
10378        }
10379        Ok(())
10380    }
10381}
10382
10383/// The metadata bundle for [AbstractRaider].
10384///
10385/// This type should generally not be used directly.
10386#[derive(Bundle)]
10387pub struct AbstractRaiderMetadataBundle {
10388    _marker: AbstractRaider,
10389    parent: AbstractMonsterMetadataBundle,
10390    is_celebrating: IsCelebrating,
10391}
10392impl Default for AbstractRaiderMetadataBundle {
10393    fn default() -> Self {
10394        Self {
10395            _marker: AbstractRaider,
10396            parent: Default::default(),
10397            is_celebrating: IsCelebrating(false),
10398        }
10399    }
10400}
10401
10402/// A metadata field for [Pillager].
10403#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10404pub struct PillagerIsChargingCrossbow(pub bool);
10405/// The marker component for entities of type `minecraft:pillager`.
10406///
10407/// # Metadata
10408///
10409/// These are the metadata components that all `Pillager` entities are
10410/// guaranteed to have, in addition to the metadata components from parent
10411/// types:
10412///
10413/// - [PillagerIsChargingCrossbow]
10414///
10415/// # Parents
10416///
10417/// Entities with `Pillager` will also have the following marker components and
10418/// their metadata fields:
10419///
10420/// - [AbstractRaider]
10421/// - [AbstractMonster]
10422/// - [AbstractCreature]
10423/// - [AbstractInsentient]
10424/// - [AbstractLiving]
10425/// - [AbstractEntity]
10426///
10427/// # Children
10428///
10429/// This entity type has no children types.
10430#[derive(Component)]
10431pub struct Pillager;
10432impl Pillager {
10433    fn apply_metadata(
10434        entity: &mut bevy_ecs::system::EntityCommands,
10435        d: EntityDataItem,
10436    ) -> Result<(), UpdateMetadataError> {
10437        match d.index {
10438            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10439            17 => {
10440                entity.insert(PillagerIsChargingCrossbow(d.value.into_boolean()?));
10441            }
10442            _ => {}
10443        }
10444        Ok(())
10445    }
10446}
10447
10448/// The metadata bundle for [Pillager].
10449///
10450/// This type should generally not be used directly.
10451#[derive(Bundle)]
10452pub struct PillagerMetadataBundle {
10453    _marker: Pillager,
10454    parent: AbstractRaiderMetadataBundle,
10455    pillager_is_charging_crossbow: PillagerIsChargingCrossbow,
10456}
10457impl Default for PillagerMetadataBundle {
10458    fn default() -> Self {
10459        Self {
10460            _marker: Pillager,
10461            parent: Default::default(),
10462            pillager_is_charging_crossbow: PillagerIsChargingCrossbow(false),
10463        }
10464    }
10465}
10466
10467/// The marker component for entities of type `minecraft:ravager`.
10468///
10469/// # Metadata
10470///
10471/// This entity type does not add any additional metadata. It will still have
10472/// metadata from parent types.
10473///
10474/// # Parents
10475///
10476/// Entities with `Ravager` will also have the following marker components and
10477/// their metadata fields:
10478///
10479/// - [AbstractRaider]
10480/// - [AbstractMonster]
10481/// - [AbstractCreature]
10482/// - [AbstractInsentient]
10483/// - [AbstractLiving]
10484/// - [AbstractEntity]
10485///
10486/// # Children
10487///
10488/// This entity type has no children types.
10489#[derive(Component)]
10490pub struct Ravager;
10491impl Ravager {
10492    fn apply_metadata(
10493        entity: &mut bevy_ecs::system::EntityCommands,
10494        d: EntityDataItem,
10495    ) -> Result<(), UpdateMetadataError> {
10496        match d.index {
10497            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10498            _ => {}
10499        }
10500        Ok(())
10501    }
10502}
10503
10504/// The metadata bundle for [Ravager].
10505///
10506/// This type should generally not be used directly.
10507#[derive(Bundle)]
10508pub struct RavagerMetadataBundle {
10509    _marker: Ravager,
10510    parent: AbstractRaiderMetadataBundle,
10511}
10512impl Default for RavagerMetadataBundle {
10513    fn default() -> Self {
10514        Self {
10515            _marker: Ravager,
10516            parent: Default::default(),
10517        }
10518    }
10519}
10520
10521/// The marker component for entities of type `minecraft:vindicator`.
10522///
10523/// # Metadata
10524///
10525/// This entity type does not add any additional metadata. It will still have
10526/// metadata from parent types.
10527///
10528/// # Parents
10529///
10530/// Entities with `Vindicator` will also have the following marker components
10531/// and their metadata fields:
10532///
10533/// - [AbstractRaider]
10534/// - [AbstractMonster]
10535/// - [AbstractCreature]
10536/// - [AbstractInsentient]
10537/// - [AbstractLiving]
10538/// - [AbstractEntity]
10539///
10540/// # Children
10541///
10542/// This entity type has no children types.
10543#[derive(Component)]
10544pub struct Vindicator;
10545impl Vindicator {
10546    fn apply_metadata(
10547        entity: &mut bevy_ecs::system::EntityCommands,
10548        d: EntityDataItem,
10549    ) -> Result<(), UpdateMetadataError> {
10550        match d.index {
10551            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10552            _ => {}
10553        }
10554        Ok(())
10555    }
10556}
10557
10558/// The metadata bundle for [Vindicator].
10559///
10560/// This type should generally not be used directly.
10561#[derive(Bundle)]
10562pub struct VindicatorMetadataBundle {
10563    _marker: Vindicator,
10564    parent: AbstractRaiderMetadataBundle,
10565}
10566impl Default for VindicatorMetadataBundle {
10567    fn default() -> Self {
10568        Self {
10569            _marker: Vindicator,
10570            parent: Default::default(),
10571        }
10572    }
10573}
10574
10575/// A metadata field for [Witch].
10576#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10577pub struct WitchUsingItem(pub bool);
10578/// The marker component for entities of type `minecraft:witch`.
10579///
10580/// # Metadata
10581///
10582/// These are the metadata components that all `Witch` entities are guaranteed
10583/// to have, in addition to the metadata components from parent types:
10584///
10585/// - [WitchUsingItem]
10586///
10587/// # Parents
10588///
10589/// Entities with `Witch` will also have the following marker components and
10590/// their metadata fields:
10591///
10592/// - [AbstractRaider]
10593/// - [AbstractMonster]
10594/// - [AbstractCreature]
10595/// - [AbstractInsentient]
10596/// - [AbstractLiving]
10597/// - [AbstractEntity]
10598///
10599/// # Children
10600///
10601/// This entity type has no children types.
10602#[derive(Component)]
10603pub struct Witch;
10604impl Witch {
10605    fn apply_metadata(
10606        entity: &mut bevy_ecs::system::EntityCommands,
10607        d: EntityDataItem,
10608    ) -> Result<(), UpdateMetadataError> {
10609        match d.index {
10610            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10611            17 => {
10612                entity.insert(WitchUsingItem(d.value.into_boolean()?));
10613            }
10614            _ => {}
10615        }
10616        Ok(())
10617    }
10618}
10619
10620/// The metadata bundle for [Witch].
10621///
10622/// This type should generally not be used directly.
10623#[derive(Bundle)]
10624pub struct WitchMetadataBundle {
10625    _marker: Witch,
10626    parent: AbstractRaiderMetadataBundle,
10627    witch_using_item: WitchUsingItem,
10628}
10629impl Default for WitchMetadataBundle {
10630    fn default() -> Self {
10631        Self {
10632            _marker: Witch,
10633            parent: Default::default(),
10634            witch_using_item: WitchUsingItem(false),
10635        }
10636    }
10637}
10638
10639/// A metadata field for [AbstractSpellcasterIllager].
10640#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10641pub struct SpellCasting(pub u8);
10642/// An abstract entity marker component.
10643///
10644/// # Metadata
10645///
10646/// These are the metadata components that all `AbstractSpellcasterIllager`
10647/// entities are guaranteed to have, in addition to the metadata components from
10648/// parent types:
10649///
10650/// - [SpellCasting]
10651///
10652/// # Parents
10653///
10654/// Entities with `AbstractSpellcasterIllager` will also have the following
10655/// marker components and their metadata fields:
10656///
10657/// - [AbstractRaider]
10658/// - [AbstractMonster]
10659/// - [AbstractCreature]
10660/// - [AbstractInsentient]
10661/// - [AbstractLiving]
10662/// - [AbstractEntity]
10663///
10664/// # Children
10665///
10666/// - [Evoker]
10667/// - [Illusioner]
10668#[derive(Component)]
10669pub struct AbstractSpellcasterIllager;
10670impl AbstractSpellcasterIllager {
10671    fn apply_metadata(
10672        entity: &mut bevy_ecs::system::EntityCommands,
10673        d: EntityDataItem,
10674    ) -> Result<(), UpdateMetadataError> {
10675        match d.index {
10676            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10677            17 => {
10678                entity.insert(SpellCasting(d.value.into_byte()?));
10679            }
10680            _ => {}
10681        }
10682        Ok(())
10683    }
10684}
10685
10686/// The metadata bundle for [AbstractSpellcasterIllager].
10687///
10688/// This type should generally not be used directly.
10689#[derive(Bundle)]
10690pub struct AbstractSpellcasterIllagerMetadataBundle {
10691    _marker: AbstractSpellcasterIllager,
10692    parent: AbstractRaiderMetadataBundle,
10693    spell_casting: SpellCasting,
10694}
10695impl Default for AbstractSpellcasterIllagerMetadataBundle {
10696    fn default() -> Self {
10697        Self {
10698            _marker: AbstractSpellcasterIllager,
10699            parent: Default::default(),
10700            spell_casting: SpellCasting(0),
10701        }
10702    }
10703}
10704
10705/// The marker component for entities of type `minecraft:evoker`.
10706///
10707/// # Metadata
10708///
10709/// This entity type does not add any additional metadata. It will still have
10710/// metadata from parent types.
10711///
10712/// # Parents
10713///
10714/// Entities with `Evoker` will also have the following marker components and
10715/// their metadata fields:
10716///
10717/// - [AbstractSpellcasterIllager]
10718/// - [AbstractRaider]
10719/// - [AbstractMonster]
10720/// - [AbstractCreature]
10721/// - [AbstractInsentient]
10722/// - [AbstractLiving]
10723/// - [AbstractEntity]
10724///
10725/// # Children
10726///
10727/// This entity type has no children types.
10728#[derive(Component)]
10729pub struct Evoker;
10730impl Evoker {
10731    fn apply_metadata(
10732        entity: &mut bevy_ecs::system::EntityCommands,
10733        d: EntityDataItem,
10734    ) -> Result<(), UpdateMetadataError> {
10735        match d.index {
10736            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
10737            _ => {}
10738        }
10739        Ok(())
10740    }
10741}
10742
10743/// The metadata bundle for [Evoker].
10744///
10745/// This type should generally not be used directly.
10746#[derive(Bundle)]
10747pub struct EvokerMetadataBundle {
10748    _marker: Evoker,
10749    parent: AbstractSpellcasterIllagerMetadataBundle,
10750}
10751impl Default for EvokerMetadataBundle {
10752    fn default() -> Self {
10753        Self {
10754            _marker: Evoker,
10755            parent: Default::default(),
10756        }
10757    }
10758}
10759
10760/// The marker component for entities of type `minecraft:illusioner`.
10761///
10762/// # Metadata
10763///
10764/// This entity type does not add any additional metadata. It will still have
10765/// metadata from parent types.
10766///
10767/// # Parents
10768///
10769/// Entities with `Illusioner` will also have the following marker components
10770/// and their metadata fields:
10771///
10772/// - [AbstractSpellcasterIllager]
10773/// - [AbstractRaider]
10774/// - [AbstractMonster]
10775/// - [AbstractCreature]
10776/// - [AbstractInsentient]
10777/// - [AbstractLiving]
10778/// - [AbstractEntity]
10779///
10780/// # Children
10781///
10782/// This entity type has no children types.
10783#[derive(Component)]
10784pub struct Illusioner;
10785impl Illusioner {
10786    fn apply_metadata(
10787        entity: &mut bevy_ecs::system::EntityCommands,
10788        d: EntityDataItem,
10789    ) -> Result<(), UpdateMetadataError> {
10790        match d.index {
10791            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
10792            _ => {}
10793        }
10794        Ok(())
10795    }
10796}
10797
10798/// The metadata bundle for [Illusioner].
10799///
10800/// This type should generally not be used directly.
10801#[derive(Bundle)]
10802pub struct IllusionerMetadataBundle {
10803    _marker: Illusioner,
10804    parent: AbstractSpellcasterIllagerMetadataBundle,
10805}
10806impl Default for IllusionerMetadataBundle {
10807    fn default() -> Self {
10808        Self {
10809            _marker: Illusioner,
10810            parent: Default::default(),
10811        }
10812    }
10813}
10814
10815/// A metadata field for [AbstractThrownItemProjectile].
10816#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10817pub struct AbstractThrownItemProjectileItemStack(pub ItemStack);
10818/// An abstract entity marker component.
10819///
10820/// # Metadata
10821///
10822/// These are the metadata components that all `AbstractThrownItemProjectile`
10823/// entities are guaranteed to have, in addition to the metadata components from
10824/// parent types:
10825///
10826/// - [AbstractThrownItemProjectileItemStack]
10827///
10828/// # Parents
10829///
10830/// Entities with `AbstractThrownItemProjectile` will also have the following
10831/// marker components and their metadata fields:
10832///
10833/// - [AbstractEntity]
10834///
10835/// # Children
10836///
10837/// - [Egg]
10838/// - [EnderPearl]
10839/// - [ExperienceBottle]
10840/// - [LingeringPotion]
10841/// - [Snowball]
10842/// - [SplashPotion]
10843#[derive(Component)]
10844pub struct AbstractThrownItemProjectile;
10845impl AbstractThrownItemProjectile {
10846    fn apply_metadata(
10847        entity: &mut bevy_ecs::system::EntityCommands,
10848        d: EntityDataItem,
10849    ) -> Result<(), UpdateMetadataError> {
10850        match d.index {
10851            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
10852            8 => {
10853                entity.insert(AbstractThrownItemProjectileItemStack(
10854                    d.value.into_item_stack()?,
10855                ));
10856            }
10857            _ => {}
10858        }
10859        Ok(())
10860    }
10861}
10862
10863/// The metadata bundle for [AbstractThrownItemProjectile].
10864///
10865/// This type should generally not be used directly.
10866#[derive(Bundle)]
10867pub struct AbstractThrownItemProjectileMetadataBundle {
10868    _marker: AbstractThrownItemProjectile,
10869    parent: AbstractEntityMetadataBundle,
10870    abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack,
10871}
10872impl Default for AbstractThrownItemProjectileMetadataBundle {
10873    fn default() -> Self {
10874        Self {
10875            _marker: AbstractThrownItemProjectile,
10876            parent: Default::default(),
10877            abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
10878                Default::default(),
10879            ),
10880        }
10881    }
10882}
10883
10884/// The marker component for entities of type `minecraft:egg`.
10885///
10886/// # Metadata
10887///
10888/// This entity type does not add any additional metadata. It will still have
10889/// metadata from parent types.
10890///
10891/// # Parents
10892///
10893/// Entities with `Egg` will also have the following marker components and their
10894/// metadata fields:
10895///
10896/// - [AbstractThrownItemProjectile]
10897/// - [AbstractEntity]
10898///
10899/// # Children
10900///
10901/// This entity type has no children types.
10902#[derive(Component)]
10903pub struct Egg;
10904impl Egg {
10905    fn apply_metadata(
10906        entity: &mut bevy_ecs::system::EntityCommands,
10907        d: EntityDataItem,
10908    ) -> Result<(), UpdateMetadataError> {
10909        match d.index {
10910            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10911            _ => {}
10912        }
10913        Ok(())
10914    }
10915}
10916
10917/// The metadata bundle for [Egg].
10918///
10919/// This type should generally not be used directly.
10920#[derive(Bundle)]
10921pub struct EggMetadataBundle {
10922    _marker: Egg,
10923    parent: AbstractThrownItemProjectileMetadataBundle,
10924}
10925impl Default for EggMetadataBundle {
10926    fn default() -> Self {
10927        Self {
10928            _marker: Egg,
10929            parent: Default::default(),
10930        }
10931    }
10932}
10933
10934/// The marker component for entities of type `minecraft:ender_pearl`.
10935///
10936/// # Metadata
10937///
10938/// This entity type does not add any additional metadata. It will still have
10939/// metadata from parent types.
10940///
10941/// # Parents
10942///
10943/// Entities with `EnderPearl` will also have the following marker components
10944/// and their metadata fields:
10945///
10946/// - [AbstractThrownItemProjectile]
10947/// - [AbstractEntity]
10948///
10949/// # Children
10950///
10951/// This entity type has no children types.
10952#[derive(Component)]
10953pub struct EnderPearl;
10954impl EnderPearl {
10955    fn apply_metadata(
10956        entity: &mut bevy_ecs::system::EntityCommands,
10957        d: EntityDataItem,
10958    ) -> Result<(), UpdateMetadataError> {
10959        match d.index {
10960            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10961            _ => {}
10962        }
10963        Ok(())
10964    }
10965}
10966
10967/// The metadata bundle for [EnderPearl].
10968///
10969/// This type should generally not be used directly.
10970#[derive(Bundle)]
10971pub struct EnderPearlMetadataBundle {
10972    _marker: EnderPearl,
10973    parent: AbstractThrownItemProjectileMetadataBundle,
10974}
10975impl Default for EnderPearlMetadataBundle {
10976    fn default() -> Self {
10977        Self {
10978            _marker: EnderPearl,
10979            parent: Default::default(),
10980        }
10981    }
10982}
10983
10984/// The marker component for entities of type `minecraft:experience_bottle`.
10985///
10986/// # Metadata
10987///
10988/// This entity type does not add any additional metadata. It will still have
10989/// metadata from parent types.
10990///
10991/// # Parents
10992///
10993/// Entities with `ExperienceBottle` will also have the following marker
10994/// components and their metadata fields:
10995///
10996/// - [AbstractThrownItemProjectile]
10997/// - [AbstractEntity]
10998///
10999/// # Children
11000///
11001/// This entity type has no children types.
11002#[derive(Component)]
11003pub struct ExperienceBottle;
11004impl ExperienceBottle {
11005    fn apply_metadata(
11006        entity: &mut bevy_ecs::system::EntityCommands,
11007        d: EntityDataItem,
11008    ) -> Result<(), UpdateMetadataError> {
11009        match d.index {
11010            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11011            _ => {}
11012        }
11013        Ok(())
11014    }
11015}
11016
11017/// The metadata bundle for [ExperienceBottle].
11018///
11019/// This type should generally not be used directly.
11020#[derive(Bundle)]
11021pub struct ExperienceBottleMetadataBundle {
11022    _marker: ExperienceBottle,
11023    parent: AbstractThrownItemProjectileMetadataBundle,
11024}
11025impl Default for ExperienceBottleMetadataBundle {
11026    fn default() -> Self {
11027        Self {
11028            _marker: ExperienceBottle,
11029            parent: Default::default(),
11030        }
11031    }
11032}
11033
11034/// The marker component for entities of type `minecraft:lingering_potion`.
11035///
11036/// # Metadata
11037///
11038/// This entity type does not add any additional metadata. It will still have
11039/// metadata from parent types.
11040///
11041/// # Parents
11042///
11043/// Entities with `LingeringPotion` will also have the following marker
11044/// components and their metadata fields:
11045///
11046/// - [AbstractThrownItemProjectile]
11047/// - [AbstractEntity]
11048///
11049/// # Children
11050///
11051/// This entity type has no children types.
11052#[derive(Component)]
11053pub struct LingeringPotion;
11054impl LingeringPotion {
11055    fn apply_metadata(
11056        entity: &mut bevy_ecs::system::EntityCommands,
11057        d: EntityDataItem,
11058    ) -> Result<(), UpdateMetadataError> {
11059        match d.index {
11060            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11061            _ => {}
11062        }
11063        Ok(())
11064    }
11065}
11066
11067/// The metadata bundle for [LingeringPotion].
11068///
11069/// This type should generally not be used directly.
11070#[derive(Bundle)]
11071pub struct LingeringPotionMetadataBundle {
11072    _marker: LingeringPotion,
11073    parent: AbstractThrownItemProjectileMetadataBundle,
11074}
11075impl Default for LingeringPotionMetadataBundle {
11076    fn default() -> Self {
11077        Self {
11078            _marker: LingeringPotion,
11079            parent: Default::default(),
11080        }
11081    }
11082}
11083
11084/// The marker component for entities of type `minecraft:snowball`.
11085///
11086/// # Metadata
11087///
11088/// This entity type does not add any additional metadata. It will still have
11089/// metadata from parent types.
11090///
11091/// # Parents
11092///
11093/// Entities with `Snowball` will also have the following marker components and
11094/// their metadata fields:
11095///
11096/// - [AbstractThrownItemProjectile]
11097/// - [AbstractEntity]
11098///
11099/// # Children
11100///
11101/// This entity type has no children types.
11102#[derive(Component)]
11103pub struct Snowball;
11104impl Snowball {
11105    fn apply_metadata(
11106        entity: &mut bevy_ecs::system::EntityCommands,
11107        d: EntityDataItem,
11108    ) -> Result<(), UpdateMetadataError> {
11109        match d.index {
11110            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11111            _ => {}
11112        }
11113        Ok(())
11114    }
11115}
11116
11117/// The metadata bundle for [Snowball].
11118///
11119/// This type should generally not be used directly.
11120#[derive(Bundle)]
11121pub struct SnowballMetadataBundle {
11122    _marker: Snowball,
11123    parent: AbstractThrownItemProjectileMetadataBundle,
11124}
11125impl Default for SnowballMetadataBundle {
11126    fn default() -> Self {
11127        Self {
11128            _marker: Snowball,
11129            parent: Default::default(),
11130        }
11131    }
11132}
11133
11134/// The marker component for entities of type `minecraft:splash_potion`.
11135///
11136/// # Metadata
11137///
11138/// This entity type does not add any additional metadata. It will still have
11139/// metadata from parent types.
11140///
11141/// # Parents
11142///
11143/// Entities with `SplashPotion` will also have the following marker components
11144/// and their metadata fields:
11145///
11146/// - [AbstractThrownItemProjectile]
11147/// - [AbstractEntity]
11148///
11149/// # Children
11150///
11151/// This entity type has no children types.
11152#[derive(Component)]
11153pub struct SplashPotion;
11154impl SplashPotion {
11155    fn apply_metadata(
11156        entity: &mut bevy_ecs::system::EntityCommands,
11157        d: EntityDataItem,
11158    ) -> Result<(), UpdateMetadataError> {
11159        match d.index {
11160            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11161            _ => {}
11162        }
11163        Ok(())
11164    }
11165}
11166
11167/// The metadata bundle for [SplashPotion].
11168///
11169/// This type should generally not be used directly.
11170#[derive(Bundle)]
11171pub struct SplashPotionMetadataBundle {
11172    _marker: SplashPotion,
11173    parent: AbstractThrownItemProjectileMetadataBundle,
11174}
11175impl Default for SplashPotionMetadataBundle {
11176    fn default() -> Self {
11177        Self {
11178            _marker: SplashPotion,
11179            parent: Default::default(),
11180        }
11181    }
11182}
11183
11184/// A metadata field for [AbstractVehicle].
11185#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11186pub struct Hurt(pub i32);
11187/// A metadata field for [AbstractVehicle].
11188#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11189pub struct Hurtdir(pub i32);
11190/// A metadata field for [AbstractVehicle].
11191#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11192pub struct Damage(pub f32);
11193/// An abstract entity marker component.
11194///
11195/// # Metadata
11196///
11197/// These are the metadata components that all `AbstractVehicle` entities are
11198/// guaranteed to have, in addition to the metadata components from parent
11199/// types:
11200///
11201/// - [Hurt]
11202/// - [Hurtdir]
11203/// - [Damage]
11204///
11205/// # Parents
11206///
11207/// Entities with `AbstractVehicle` will also have the following marker
11208/// components and their metadata fields:
11209///
11210/// - [AbstractEntity]
11211///
11212/// # Children
11213///
11214/// - [AbstractBoat]
11215///   - [AcaciaBoat]
11216///   - [AcaciaChestBoat]
11217///   - [BambooChestRaft]
11218///   - [BambooRaft]
11219///   - [BirchBoat]
11220///   - [BirchChestBoat]
11221///   - [CherryBoat]
11222///   - [CherryChestBoat]
11223///   - [DarkOakBoat]
11224///   - [DarkOakChestBoat]
11225///   - [JungleBoat]
11226///   - [JungleChestBoat]
11227///   - [MangroveBoat]
11228///   - [MangroveChestBoat]
11229///   - [OakBoat]
11230///   - [OakChestBoat]
11231///   - [PaleOakBoat]
11232///   - [PaleOakChestBoat]
11233///   - [SpruceBoat]
11234///   - [SpruceChestBoat]
11235/// - [AbstractMinecart]
11236///   - [ChestMinecart]
11237///   - [CommandBlockMinecart]
11238///   - [FurnaceMinecart]
11239///   - [HopperMinecart]
11240///   - [Minecart]
11241///   - [SpawnerMinecart]
11242///   - [TntMinecart]
11243#[derive(Component)]
11244pub struct AbstractVehicle;
11245impl AbstractVehicle {
11246    fn apply_metadata(
11247        entity: &mut bevy_ecs::system::EntityCommands,
11248        d: EntityDataItem,
11249    ) -> Result<(), UpdateMetadataError> {
11250        match d.index {
11251            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
11252            8 => {
11253                entity.insert(Hurt(d.value.into_int()?));
11254            }
11255            9 => {
11256                entity.insert(Hurtdir(d.value.into_int()?));
11257            }
11258            10 => {
11259                entity.insert(Damage(d.value.into_float()?));
11260            }
11261            _ => {}
11262        }
11263        Ok(())
11264    }
11265}
11266
11267/// The metadata bundle for [AbstractVehicle].
11268///
11269/// This type should generally not be used directly.
11270#[derive(Bundle)]
11271pub struct AbstractVehicleMetadataBundle {
11272    _marker: AbstractVehicle,
11273    parent: AbstractEntityMetadataBundle,
11274    hurt: Hurt,
11275    hurtdir: Hurtdir,
11276    damage: Damage,
11277}
11278impl Default for AbstractVehicleMetadataBundle {
11279    fn default() -> Self {
11280        Self {
11281            _marker: AbstractVehicle,
11282            parent: Default::default(),
11283            hurt: Hurt(0),
11284            hurtdir: Hurtdir(1),
11285            damage: Damage(0.0),
11286        }
11287    }
11288}
11289
11290/// A metadata field for [AbstractBoat].
11291#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11292pub struct PaddleLeft(pub bool);
11293/// A metadata field for [AbstractBoat].
11294#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11295pub struct PaddleRight(pub bool);
11296/// A metadata field for [AbstractBoat].
11297#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11298pub struct BubbleTime(pub i32);
11299/// An abstract entity marker component.
11300///
11301/// # Metadata
11302///
11303/// These are the metadata components that all `AbstractBoat` entities are
11304/// guaranteed to have, in addition to the metadata components from parent
11305/// types:
11306///
11307/// - [PaddleLeft]
11308/// - [PaddleRight]
11309/// - [BubbleTime]
11310///
11311/// # Parents
11312///
11313/// Entities with `AbstractBoat` will also have the following marker components
11314/// and their metadata fields:
11315///
11316/// - [AbstractVehicle]
11317/// - [AbstractEntity]
11318///
11319/// # Children
11320///
11321/// - [AcaciaBoat]
11322/// - [AcaciaChestBoat]
11323/// - [BambooChestRaft]
11324/// - [BambooRaft]
11325/// - [BirchBoat]
11326/// - [BirchChestBoat]
11327/// - [CherryBoat]
11328/// - [CherryChestBoat]
11329/// - [DarkOakBoat]
11330/// - [DarkOakChestBoat]
11331/// - [JungleBoat]
11332/// - [JungleChestBoat]
11333/// - [MangroveBoat]
11334/// - [MangroveChestBoat]
11335/// - [OakBoat]
11336/// - [OakChestBoat]
11337/// - [PaleOakBoat]
11338/// - [PaleOakChestBoat]
11339/// - [SpruceBoat]
11340/// - [SpruceChestBoat]
11341#[derive(Component)]
11342pub struct AbstractBoat;
11343impl AbstractBoat {
11344    fn apply_metadata(
11345        entity: &mut bevy_ecs::system::EntityCommands,
11346        d: EntityDataItem,
11347    ) -> Result<(), UpdateMetadataError> {
11348        match d.index {
11349            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
11350            11 => {
11351                entity.insert(PaddleLeft(d.value.into_boolean()?));
11352            }
11353            12 => {
11354                entity.insert(PaddleRight(d.value.into_boolean()?));
11355            }
11356            13 => {
11357                entity.insert(BubbleTime(d.value.into_int()?));
11358            }
11359            _ => {}
11360        }
11361        Ok(())
11362    }
11363}
11364
11365/// The metadata bundle for [AbstractBoat].
11366///
11367/// This type should generally not be used directly.
11368#[derive(Bundle)]
11369pub struct AbstractBoatMetadataBundle {
11370    _marker: AbstractBoat,
11371    parent: AbstractVehicleMetadataBundle,
11372    paddle_left: PaddleLeft,
11373    paddle_right: PaddleRight,
11374    bubble_time: BubbleTime,
11375}
11376impl Default for AbstractBoatMetadataBundle {
11377    fn default() -> Self {
11378        Self {
11379            _marker: AbstractBoat,
11380            parent: Default::default(),
11381            paddle_left: PaddleLeft(false),
11382            paddle_right: PaddleRight(false),
11383            bubble_time: BubbleTime(0),
11384        }
11385    }
11386}
11387
11388/// The marker component for entities of type `minecraft:acacia_boat`.
11389///
11390/// # Metadata
11391///
11392/// This entity type does not add any additional metadata. It will still have
11393/// metadata from parent types.
11394///
11395/// # Parents
11396///
11397/// Entities with `AcaciaBoat` will also have the following marker components
11398/// and their metadata fields:
11399///
11400/// - [AbstractBoat]
11401/// - [AbstractVehicle]
11402/// - [AbstractEntity]
11403///
11404/// # Children
11405///
11406/// This entity type has no children types.
11407#[derive(Component)]
11408pub struct AcaciaBoat;
11409impl AcaciaBoat {
11410    fn apply_metadata(
11411        entity: &mut bevy_ecs::system::EntityCommands,
11412        d: EntityDataItem,
11413    ) -> Result<(), UpdateMetadataError> {
11414        match d.index {
11415            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11416            _ => {}
11417        }
11418        Ok(())
11419    }
11420}
11421
11422/// The metadata bundle for [AcaciaBoat].
11423///
11424/// This type should generally not be used directly.
11425#[derive(Bundle)]
11426pub struct AcaciaBoatMetadataBundle {
11427    _marker: AcaciaBoat,
11428    parent: AbstractBoatMetadataBundle,
11429}
11430impl Default for AcaciaBoatMetadataBundle {
11431    fn default() -> Self {
11432        Self {
11433            _marker: AcaciaBoat,
11434            parent: Default::default(),
11435        }
11436    }
11437}
11438
11439/// The marker component for entities of type `minecraft:acacia_chest_boat`.
11440///
11441/// # Metadata
11442///
11443/// This entity type does not add any additional metadata. It will still have
11444/// metadata from parent types.
11445///
11446/// # Parents
11447///
11448/// Entities with `AcaciaChestBoat` will also have the following marker
11449/// components and their metadata fields:
11450///
11451/// - [AbstractBoat]
11452/// - [AbstractVehicle]
11453/// - [AbstractEntity]
11454///
11455/// # Children
11456///
11457/// This entity type has no children types.
11458#[derive(Component)]
11459pub struct AcaciaChestBoat;
11460impl AcaciaChestBoat {
11461    fn apply_metadata(
11462        entity: &mut bevy_ecs::system::EntityCommands,
11463        d: EntityDataItem,
11464    ) -> Result<(), UpdateMetadataError> {
11465        match d.index {
11466            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11467            _ => {}
11468        }
11469        Ok(())
11470    }
11471}
11472
11473/// The metadata bundle for [AcaciaChestBoat].
11474///
11475/// This type should generally not be used directly.
11476#[derive(Bundle)]
11477pub struct AcaciaChestBoatMetadataBundle {
11478    _marker: AcaciaChestBoat,
11479    parent: AbstractBoatMetadataBundle,
11480}
11481impl Default for AcaciaChestBoatMetadataBundle {
11482    fn default() -> Self {
11483        Self {
11484            _marker: AcaciaChestBoat,
11485            parent: Default::default(),
11486        }
11487    }
11488}
11489
11490/// The marker component for entities of type `minecraft:bamboo_chest_raft`.
11491///
11492/// # Metadata
11493///
11494/// This entity type does not add any additional metadata. It will still have
11495/// metadata from parent types.
11496///
11497/// # Parents
11498///
11499/// Entities with `BambooChestRaft` will also have the following marker
11500/// components and their metadata fields:
11501///
11502/// - [AbstractBoat]
11503/// - [AbstractVehicle]
11504/// - [AbstractEntity]
11505///
11506/// # Children
11507///
11508/// This entity type has no children types.
11509#[derive(Component)]
11510pub struct BambooChestRaft;
11511impl BambooChestRaft {
11512    fn apply_metadata(
11513        entity: &mut bevy_ecs::system::EntityCommands,
11514        d: EntityDataItem,
11515    ) -> Result<(), UpdateMetadataError> {
11516        match d.index {
11517            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11518            _ => {}
11519        }
11520        Ok(())
11521    }
11522}
11523
11524/// The metadata bundle for [BambooChestRaft].
11525///
11526/// This type should generally not be used directly.
11527#[derive(Bundle)]
11528pub struct BambooChestRaftMetadataBundle {
11529    _marker: BambooChestRaft,
11530    parent: AbstractBoatMetadataBundle,
11531}
11532impl Default for BambooChestRaftMetadataBundle {
11533    fn default() -> Self {
11534        Self {
11535            _marker: BambooChestRaft,
11536            parent: Default::default(),
11537        }
11538    }
11539}
11540
11541/// The marker component for entities of type `minecraft:bamboo_raft`.
11542///
11543/// # Metadata
11544///
11545/// This entity type does not add any additional metadata. It will still have
11546/// metadata from parent types.
11547///
11548/// # Parents
11549///
11550/// Entities with `BambooRaft` will also have the following marker components
11551/// and their metadata fields:
11552///
11553/// - [AbstractBoat]
11554/// - [AbstractVehicle]
11555/// - [AbstractEntity]
11556///
11557/// # Children
11558///
11559/// This entity type has no children types.
11560#[derive(Component)]
11561pub struct BambooRaft;
11562impl BambooRaft {
11563    fn apply_metadata(
11564        entity: &mut bevy_ecs::system::EntityCommands,
11565        d: EntityDataItem,
11566    ) -> Result<(), UpdateMetadataError> {
11567        match d.index {
11568            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11569            _ => {}
11570        }
11571        Ok(())
11572    }
11573}
11574
11575/// The metadata bundle for [BambooRaft].
11576///
11577/// This type should generally not be used directly.
11578#[derive(Bundle)]
11579pub struct BambooRaftMetadataBundle {
11580    _marker: BambooRaft,
11581    parent: AbstractBoatMetadataBundle,
11582}
11583impl Default for BambooRaftMetadataBundle {
11584    fn default() -> Self {
11585        Self {
11586            _marker: BambooRaft,
11587            parent: Default::default(),
11588        }
11589    }
11590}
11591
11592/// The marker component for entities of type `minecraft:birch_boat`.
11593///
11594/// # Metadata
11595///
11596/// This entity type does not add any additional metadata. It will still have
11597/// metadata from parent types.
11598///
11599/// # Parents
11600///
11601/// Entities with `BirchBoat` will also have the following marker components and
11602/// their metadata fields:
11603///
11604/// - [AbstractBoat]
11605/// - [AbstractVehicle]
11606/// - [AbstractEntity]
11607///
11608/// # Children
11609///
11610/// This entity type has no children types.
11611#[derive(Component)]
11612pub struct BirchBoat;
11613impl BirchBoat {
11614    fn apply_metadata(
11615        entity: &mut bevy_ecs::system::EntityCommands,
11616        d: EntityDataItem,
11617    ) -> Result<(), UpdateMetadataError> {
11618        match d.index {
11619            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11620            _ => {}
11621        }
11622        Ok(())
11623    }
11624}
11625
11626/// The metadata bundle for [BirchBoat].
11627///
11628/// This type should generally not be used directly.
11629#[derive(Bundle)]
11630pub struct BirchBoatMetadataBundle {
11631    _marker: BirchBoat,
11632    parent: AbstractBoatMetadataBundle,
11633}
11634impl Default for BirchBoatMetadataBundle {
11635    fn default() -> Self {
11636        Self {
11637            _marker: BirchBoat,
11638            parent: Default::default(),
11639        }
11640    }
11641}
11642
11643/// The marker component for entities of type `minecraft:birch_chest_boat`.
11644///
11645/// # Metadata
11646///
11647/// This entity type does not add any additional metadata. It will still have
11648/// metadata from parent types.
11649///
11650/// # Parents
11651///
11652/// Entities with `BirchChestBoat` will also have the following marker
11653/// components and their metadata fields:
11654///
11655/// - [AbstractBoat]
11656/// - [AbstractVehicle]
11657/// - [AbstractEntity]
11658///
11659/// # Children
11660///
11661/// This entity type has no children types.
11662#[derive(Component)]
11663pub struct BirchChestBoat;
11664impl BirchChestBoat {
11665    fn apply_metadata(
11666        entity: &mut bevy_ecs::system::EntityCommands,
11667        d: EntityDataItem,
11668    ) -> Result<(), UpdateMetadataError> {
11669        match d.index {
11670            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11671            _ => {}
11672        }
11673        Ok(())
11674    }
11675}
11676
11677/// The metadata bundle for [BirchChestBoat].
11678///
11679/// This type should generally not be used directly.
11680#[derive(Bundle)]
11681pub struct BirchChestBoatMetadataBundle {
11682    _marker: BirchChestBoat,
11683    parent: AbstractBoatMetadataBundle,
11684}
11685impl Default for BirchChestBoatMetadataBundle {
11686    fn default() -> Self {
11687        Self {
11688            _marker: BirchChestBoat,
11689            parent: Default::default(),
11690        }
11691    }
11692}
11693
11694/// The marker component for entities of type `minecraft:cherry_boat`.
11695///
11696/// # Metadata
11697///
11698/// This entity type does not add any additional metadata. It will still have
11699/// metadata from parent types.
11700///
11701/// # Parents
11702///
11703/// Entities with `CherryBoat` will also have the following marker components
11704/// and their metadata fields:
11705///
11706/// - [AbstractBoat]
11707/// - [AbstractVehicle]
11708/// - [AbstractEntity]
11709///
11710/// # Children
11711///
11712/// This entity type has no children types.
11713#[derive(Component)]
11714pub struct CherryBoat;
11715impl CherryBoat {
11716    fn apply_metadata(
11717        entity: &mut bevy_ecs::system::EntityCommands,
11718        d: EntityDataItem,
11719    ) -> Result<(), UpdateMetadataError> {
11720        match d.index {
11721            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11722            _ => {}
11723        }
11724        Ok(())
11725    }
11726}
11727
11728/// The metadata bundle for [CherryBoat].
11729///
11730/// This type should generally not be used directly.
11731#[derive(Bundle)]
11732pub struct CherryBoatMetadataBundle {
11733    _marker: CherryBoat,
11734    parent: AbstractBoatMetadataBundle,
11735}
11736impl Default for CherryBoatMetadataBundle {
11737    fn default() -> Self {
11738        Self {
11739            _marker: CherryBoat,
11740            parent: Default::default(),
11741        }
11742    }
11743}
11744
11745/// The marker component for entities of type `minecraft:cherry_chest_boat`.
11746///
11747/// # Metadata
11748///
11749/// This entity type does not add any additional metadata. It will still have
11750/// metadata from parent types.
11751///
11752/// # Parents
11753///
11754/// Entities with `CherryChestBoat` will also have the following marker
11755/// components and their metadata fields:
11756///
11757/// - [AbstractBoat]
11758/// - [AbstractVehicle]
11759/// - [AbstractEntity]
11760///
11761/// # Children
11762///
11763/// This entity type has no children types.
11764#[derive(Component)]
11765pub struct CherryChestBoat;
11766impl CherryChestBoat {
11767    fn apply_metadata(
11768        entity: &mut bevy_ecs::system::EntityCommands,
11769        d: EntityDataItem,
11770    ) -> Result<(), UpdateMetadataError> {
11771        match d.index {
11772            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11773            _ => {}
11774        }
11775        Ok(())
11776    }
11777}
11778
11779/// The metadata bundle for [CherryChestBoat].
11780///
11781/// This type should generally not be used directly.
11782#[derive(Bundle)]
11783pub struct CherryChestBoatMetadataBundle {
11784    _marker: CherryChestBoat,
11785    parent: AbstractBoatMetadataBundle,
11786}
11787impl Default for CherryChestBoatMetadataBundle {
11788    fn default() -> Self {
11789        Self {
11790            _marker: CherryChestBoat,
11791            parent: Default::default(),
11792        }
11793    }
11794}
11795
11796/// The marker component for entities of type `minecraft:dark_oak_boat`.
11797///
11798/// # Metadata
11799///
11800/// This entity type does not add any additional metadata. It will still have
11801/// metadata from parent types.
11802///
11803/// # Parents
11804///
11805/// Entities with `DarkOakBoat` will also have the following marker components
11806/// and their metadata fields:
11807///
11808/// - [AbstractBoat]
11809/// - [AbstractVehicle]
11810/// - [AbstractEntity]
11811///
11812/// # Children
11813///
11814/// This entity type has no children types.
11815#[derive(Component)]
11816pub struct DarkOakBoat;
11817impl DarkOakBoat {
11818    fn apply_metadata(
11819        entity: &mut bevy_ecs::system::EntityCommands,
11820        d: EntityDataItem,
11821    ) -> Result<(), UpdateMetadataError> {
11822        match d.index {
11823            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11824            _ => {}
11825        }
11826        Ok(())
11827    }
11828}
11829
11830/// The metadata bundle for [DarkOakBoat].
11831///
11832/// This type should generally not be used directly.
11833#[derive(Bundle)]
11834pub struct DarkOakBoatMetadataBundle {
11835    _marker: DarkOakBoat,
11836    parent: AbstractBoatMetadataBundle,
11837}
11838impl Default for DarkOakBoatMetadataBundle {
11839    fn default() -> Self {
11840        Self {
11841            _marker: DarkOakBoat,
11842            parent: Default::default(),
11843        }
11844    }
11845}
11846
11847/// The marker component for entities of type `minecraft:dark_oak_chest_boat`.
11848///
11849/// # Metadata
11850///
11851/// This entity type does not add any additional metadata. It will still have
11852/// metadata from parent types.
11853///
11854/// # Parents
11855///
11856/// Entities with `DarkOakChestBoat` will also have the following marker
11857/// components and their metadata fields:
11858///
11859/// - [AbstractBoat]
11860/// - [AbstractVehicle]
11861/// - [AbstractEntity]
11862///
11863/// # Children
11864///
11865/// This entity type has no children types.
11866#[derive(Component)]
11867pub struct DarkOakChestBoat;
11868impl DarkOakChestBoat {
11869    fn apply_metadata(
11870        entity: &mut bevy_ecs::system::EntityCommands,
11871        d: EntityDataItem,
11872    ) -> Result<(), UpdateMetadataError> {
11873        match d.index {
11874            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11875            _ => {}
11876        }
11877        Ok(())
11878    }
11879}
11880
11881/// The metadata bundle for [DarkOakChestBoat].
11882///
11883/// This type should generally not be used directly.
11884#[derive(Bundle)]
11885pub struct DarkOakChestBoatMetadataBundle {
11886    _marker: DarkOakChestBoat,
11887    parent: AbstractBoatMetadataBundle,
11888}
11889impl Default for DarkOakChestBoatMetadataBundle {
11890    fn default() -> Self {
11891        Self {
11892            _marker: DarkOakChestBoat,
11893            parent: Default::default(),
11894        }
11895    }
11896}
11897
11898/// The marker component for entities of type `minecraft:jungle_boat`.
11899///
11900/// # Metadata
11901///
11902/// This entity type does not add any additional metadata. It will still have
11903/// metadata from parent types.
11904///
11905/// # Parents
11906///
11907/// Entities with `JungleBoat` will also have the following marker components
11908/// and their metadata fields:
11909///
11910/// - [AbstractBoat]
11911/// - [AbstractVehicle]
11912/// - [AbstractEntity]
11913///
11914/// # Children
11915///
11916/// This entity type has no children types.
11917#[derive(Component)]
11918pub struct JungleBoat;
11919impl JungleBoat {
11920    fn apply_metadata(
11921        entity: &mut bevy_ecs::system::EntityCommands,
11922        d: EntityDataItem,
11923    ) -> Result<(), UpdateMetadataError> {
11924        match d.index {
11925            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11926            _ => {}
11927        }
11928        Ok(())
11929    }
11930}
11931
11932/// The metadata bundle for [JungleBoat].
11933///
11934/// This type should generally not be used directly.
11935#[derive(Bundle)]
11936pub struct JungleBoatMetadataBundle {
11937    _marker: JungleBoat,
11938    parent: AbstractBoatMetadataBundle,
11939}
11940impl Default for JungleBoatMetadataBundle {
11941    fn default() -> Self {
11942        Self {
11943            _marker: JungleBoat,
11944            parent: Default::default(),
11945        }
11946    }
11947}
11948
11949/// The marker component for entities of type `minecraft:jungle_chest_boat`.
11950///
11951/// # Metadata
11952///
11953/// This entity type does not add any additional metadata. It will still have
11954/// metadata from parent types.
11955///
11956/// # Parents
11957///
11958/// Entities with `JungleChestBoat` will also have the following marker
11959/// components and their metadata fields:
11960///
11961/// - [AbstractBoat]
11962/// - [AbstractVehicle]
11963/// - [AbstractEntity]
11964///
11965/// # Children
11966///
11967/// This entity type has no children types.
11968#[derive(Component)]
11969pub struct JungleChestBoat;
11970impl JungleChestBoat {
11971    fn apply_metadata(
11972        entity: &mut bevy_ecs::system::EntityCommands,
11973        d: EntityDataItem,
11974    ) -> Result<(), UpdateMetadataError> {
11975        match d.index {
11976            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11977            _ => {}
11978        }
11979        Ok(())
11980    }
11981}
11982
11983/// The metadata bundle for [JungleChestBoat].
11984///
11985/// This type should generally not be used directly.
11986#[derive(Bundle)]
11987pub struct JungleChestBoatMetadataBundle {
11988    _marker: JungleChestBoat,
11989    parent: AbstractBoatMetadataBundle,
11990}
11991impl Default for JungleChestBoatMetadataBundle {
11992    fn default() -> Self {
11993        Self {
11994            _marker: JungleChestBoat,
11995            parent: Default::default(),
11996        }
11997    }
11998}
11999
12000/// The marker component for entities of type `minecraft:mangrove_boat`.
12001///
12002/// # Metadata
12003///
12004/// This entity type does not add any additional metadata. It will still have
12005/// metadata from parent types.
12006///
12007/// # Parents
12008///
12009/// Entities with `MangroveBoat` will also have the following marker components
12010/// and their metadata fields:
12011///
12012/// - [AbstractBoat]
12013/// - [AbstractVehicle]
12014/// - [AbstractEntity]
12015///
12016/// # Children
12017///
12018/// This entity type has no children types.
12019#[derive(Component)]
12020pub struct MangroveBoat;
12021impl MangroveBoat {
12022    fn apply_metadata(
12023        entity: &mut bevy_ecs::system::EntityCommands,
12024        d: EntityDataItem,
12025    ) -> Result<(), UpdateMetadataError> {
12026        match d.index {
12027            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12028            _ => {}
12029        }
12030        Ok(())
12031    }
12032}
12033
12034/// The metadata bundle for [MangroveBoat].
12035///
12036/// This type should generally not be used directly.
12037#[derive(Bundle)]
12038pub struct MangroveBoatMetadataBundle {
12039    _marker: MangroveBoat,
12040    parent: AbstractBoatMetadataBundle,
12041}
12042impl Default for MangroveBoatMetadataBundle {
12043    fn default() -> Self {
12044        Self {
12045            _marker: MangroveBoat,
12046            parent: Default::default(),
12047        }
12048    }
12049}
12050
12051/// The marker component for entities of type `minecraft:mangrove_chest_boat`.
12052///
12053/// # Metadata
12054///
12055/// This entity type does not add any additional metadata. It will still have
12056/// metadata from parent types.
12057///
12058/// # Parents
12059///
12060/// Entities with `MangroveChestBoat` will also have the following marker
12061/// components and their metadata fields:
12062///
12063/// - [AbstractBoat]
12064/// - [AbstractVehicle]
12065/// - [AbstractEntity]
12066///
12067/// # Children
12068///
12069/// This entity type has no children types.
12070#[derive(Component)]
12071pub struct MangroveChestBoat;
12072impl MangroveChestBoat {
12073    fn apply_metadata(
12074        entity: &mut bevy_ecs::system::EntityCommands,
12075        d: EntityDataItem,
12076    ) -> Result<(), UpdateMetadataError> {
12077        match d.index {
12078            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12079            _ => {}
12080        }
12081        Ok(())
12082    }
12083}
12084
12085/// The metadata bundle for [MangroveChestBoat].
12086///
12087/// This type should generally not be used directly.
12088#[derive(Bundle)]
12089pub struct MangroveChestBoatMetadataBundle {
12090    _marker: MangroveChestBoat,
12091    parent: AbstractBoatMetadataBundle,
12092}
12093impl Default for MangroveChestBoatMetadataBundle {
12094    fn default() -> Self {
12095        Self {
12096            _marker: MangroveChestBoat,
12097            parent: Default::default(),
12098        }
12099    }
12100}
12101
12102/// The marker component for entities of type `minecraft:oak_boat`.
12103///
12104/// # Metadata
12105///
12106/// This entity type does not add any additional metadata. It will still have
12107/// metadata from parent types.
12108///
12109/// # Parents
12110///
12111/// Entities with `OakBoat` will also have the following marker components and
12112/// their metadata fields:
12113///
12114/// - [AbstractBoat]
12115/// - [AbstractVehicle]
12116/// - [AbstractEntity]
12117///
12118/// # Children
12119///
12120/// This entity type has no children types.
12121#[derive(Component)]
12122pub struct OakBoat;
12123impl OakBoat {
12124    fn apply_metadata(
12125        entity: &mut bevy_ecs::system::EntityCommands,
12126        d: EntityDataItem,
12127    ) -> Result<(), UpdateMetadataError> {
12128        match d.index {
12129            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12130            _ => {}
12131        }
12132        Ok(())
12133    }
12134}
12135
12136/// The metadata bundle for [OakBoat].
12137///
12138/// This type should generally not be used directly.
12139#[derive(Bundle)]
12140pub struct OakBoatMetadataBundle {
12141    _marker: OakBoat,
12142    parent: AbstractBoatMetadataBundle,
12143}
12144impl Default for OakBoatMetadataBundle {
12145    fn default() -> Self {
12146        Self {
12147            _marker: OakBoat,
12148            parent: Default::default(),
12149        }
12150    }
12151}
12152
12153/// The marker component for entities of type `minecraft:oak_chest_boat`.
12154///
12155/// # Metadata
12156///
12157/// This entity type does not add any additional metadata. It will still have
12158/// metadata from parent types.
12159///
12160/// # Parents
12161///
12162/// Entities with `OakChestBoat` will also have the following marker components
12163/// and their metadata fields:
12164///
12165/// - [AbstractBoat]
12166/// - [AbstractVehicle]
12167/// - [AbstractEntity]
12168///
12169/// # Children
12170///
12171/// This entity type has no children types.
12172#[derive(Component)]
12173pub struct OakChestBoat;
12174impl OakChestBoat {
12175    fn apply_metadata(
12176        entity: &mut bevy_ecs::system::EntityCommands,
12177        d: EntityDataItem,
12178    ) -> Result<(), UpdateMetadataError> {
12179        match d.index {
12180            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12181            _ => {}
12182        }
12183        Ok(())
12184    }
12185}
12186
12187/// The metadata bundle for [OakChestBoat].
12188///
12189/// This type should generally not be used directly.
12190#[derive(Bundle)]
12191pub struct OakChestBoatMetadataBundle {
12192    _marker: OakChestBoat,
12193    parent: AbstractBoatMetadataBundle,
12194}
12195impl Default for OakChestBoatMetadataBundle {
12196    fn default() -> Self {
12197        Self {
12198            _marker: OakChestBoat,
12199            parent: Default::default(),
12200        }
12201    }
12202}
12203
12204/// The marker component for entities of type `minecraft:pale_oak_boat`.
12205///
12206/// # Metadata
12207///
12208/// This entity type does not add any additional metadata. It will still have
12209/// metadata from parent types.
12210///
12211/// # Parents
12212///
12213/// Entities with `PaleOakBoat` will also have the following marker components
12214/// and their metadata fields:
12215///
12216/// - [AbstractBoat]
12217/// - [AbstractVehicle]
12218/// - [AbstractEntity]
12219///
12220/// # Children
12221///
12222/// This entity type has no children types.
12223#[derive(Component)]
12224pub struct PaleOakBoat;
12225impl PaleOakBoat {
12226    fn apply_metadata(
12227        entity: &mut bevy_ecs::system::EntityCommands,
12228        d: EntityDataItem,
12229    ) -> Result<(), UpdateMetadataError> {
12230        match d.index {
12231            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12232            _ => {}
12233        }
12234        Ok(())
12235    }
12236}
12237
12238/// The metadata bundle for [PaleOakBoat].
12239///
12240/// This type should generally not be used directly.
12241#[derive(Bundle)]
12242pub struct PaleOakBoatMetadataBundle {
12243    _marker: PaleOakBoat,
12244    parent: AbstractBoatMetadataBundle,
12245}
12246impl Default for PaleOakBoatMetadataBundle {
12247    fn default() -> Self {
12248        Self {
12249            _marker: PaleOakBoat,
12250            parent: Default::default(),
12251        }
12252    }
12253}
12254
12255/// The marker component for entities of type `minecraft:pale_oak_chest_boat`.
12256///
12257/// # Metadata
12258///
12259/// This entity type does not add any additional metadata. It will still have
12260/// metadata from parent types.
12261///
12262/// # Parents
12263///
12264/// Entities with `PaleOakChestBoat` will also have the following marker
12265/// components and their metadata fields:
12266///
12267/// - [AbstractBoat]
12268/// - [AbstractVehicle]
12269/// - [AbstractEntity]
12270///
12271/// # Children
12272///
12273/// This entity type has no children types.
12274#[derive(Component)]
12275pub struct PaleOakChestBoat;
12276impl PaleOakChestBoat {
12277    fn apply_metadata(
12278        entity: &mut bevy_ecs::system::EntityCommands,
12279        d: EntityDataItem,
12280    ) -> Result<(), UpdateMetadataError> {
12281        match d.index {
12282            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12283            _ => {}
12284        }
12285        Ok(())
12286    }
12287}
12288
12289/// The metadata bundle for [PaleOakChestBoat].
12290///
12291/// This type should generally not be used directly.
12292#[derive(Bundle)]
12293pub struct PaleOakChestBoatMetadataBundle {
12294    _marker: PaleOakChestBoat,
12295    parent: AbstractBoatMetadataBundle,
12296}
12297impl Default for PaleOakChestBoatMetadataBundle {
12298    fn default() -> Self {
12299        Self {
12300            _marker: PaleOakChestBoat,
12301            parent: Default::default(),
12302        }
12303    }
12304}
12305
12306/// The marker component for entities of type `minecraft:spruce_boat`.
12307///
12308/// # Metadata
12309///
12310/// This entity type does not add any additional metadata. It will still have
12311/// metadata from parent types.
12312///
12313/// # Parents
12314///
12315/// Entities with `SpruceBoat` will also have the following marker components
12316/// and their metadata fields:
12317///
12318/// - [AbstractBoat]
12319/// - [AbstractVehicle]
12320/// - [AbstractEntity]
12321///
12322/// # Children
12323///
12324/// This entity type has no children types.
12325#[derive(Component)]
12326pub struct SpruceBoat;
12327impl SpruceBoat {
12328    fn apply_metadata(
12329        entity: &mut bevy_ecs::system::EntityCommands,
12330        d: EntityDataItem,
12331    ) -> Result<(), UpdateMetadataError> {
12332        match d.index {
12333            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12334            _ => {}
12335        }
12336        Ok(())
12337    }
12338}
12339
12340/// The metadata bundle for [SpruceBoat].
12341///
12342/// This type should generally not be used directly.
12343#[derive(Bundle)]
12344pub struct SpruceBoatMetadataBundle {
12345    _marker: SpruceBoat,
12346    parent: AbstractBoatMetadataBundle,
12347}
12348impl Default for SpruceBoatMetadataBundle {
12349    fn default() -> Self {
12350        Self {
12351            _marker: SpruceBoat,
12352            parent: Default::default(),
12353        }
12354    }
12355}
12356
12357/// The marker component for entities of type `minecraft:spruce_chest_boat`.
12358///
12359/// # Metadata
12360///
12361/// This entity type does not add any additional metadata. It will still have
12362/// metadata from parent types.
12363///
12364/// # Parents
12365///
12366/// Entities with `SpruceChestBoat` will also have the following marker
12367/// components and their metadata fields:
12368///
12369/// - [AbstractBoat]
12370/// - [AbstractVehicle]
12371/// - [AbstractEntity]
12372///
12373/// # Children
12374///
12375/// This entity type has no children types.
12376#[derive(Component)]
12377pub struct SpruceChestBoat;
12378impl SpruceChestBoat {
12379    fn apply_metadata(
12380        entity: &mut bevy_ecs::system::EntityCommands,
12381        d: EntityDataItem,
12382    ) -> Result<(), UpdateMetadataError> {
12383        match d.index {
12384            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12385            _ => {}
12386        }
12387        Ok(())
12388    }
12389}
12390
12391/// The metadata bundle for [SpruceChestBoat].
12392///
12393/// This type should generally not be used directly.
12394#[derive(Bundle)]
12395pub struct SpruceChestBoatMetadataBundle {
12396    _marker: SpruceChestBoat,
12397    parent: AbstractBoatMetadataBundle,
12398}
12399impl Default for SpruceChestBoatMetadataBundle {
12400    fn default() -> Self {
12401        Self {
12402            _marker: SpruceChestBoat,
12403            parent: Default::default(),
12404        }
12405    }
12406}
12407
12408/// A metadata field for [AbstractMinecart].
12409#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12410pub struct CustomDisplayBlock(pub azalea_block::BlockState);
12411/// A metadata field for [AbstractMinecart].
12412#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12413pub struct DisplayOffset(pub i32);
12414/// An abstract entity marker component.
12415///
12416/// # Metadata
12417///
12418/// These are the metadata components that all `AbstractMinecart` entities are
12419/// guaranteed to have, in addition to the metadata components from parent
12420/// types:
12421///
12422/// - [CustomDisplayBlock]
12423/// - [DisplayOffset]
12424///
12425/// # Parents
12426///
12427/// Entities with `AbstractMinecart` will also have the following marker
12428/// components and their metadata fields:
12429///
12430/// - [AbstractVehicle]
12431/// - [AbstractEntity]
12432///
12433/// # Children
12434///
12435/// - [ChestMinecart]
12436/// - [CommandBlockMinecart]
12437/// - [FurnaceMinecart]
12438/// - [HopperMinecart]
12439/// - [Minecart]
12440/// - [SpawnerMinecart]
12441/// - [TntMinecart]
12442#[derive(Component)]
12443pub struct AbstractMinecart;
12444impl AbstractMinecart {
12445    fn apply_metadata(
12446        entity: &mut bevy_ecs::system::EntityCommands,
12447        d: EntityDataItem,
12448    ) -> Result<(), UpdateMetadataError> {
12449        match d.index {
12450            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
12451            11 => {
12452                entity.insert(CustomDisplayBlock(d.value.into_optional_block_state()?));
12453            }
12454            12 => {
12455                entity.insert(DisplayOffset(d.value.into_int()?));
12456            }
12457            _ => {}
12458        }
12459        Ok(())
12460    }
12461}
12462
12463/// The metadata bundle for [AbstractMinecart].
12464///
12465/// This type should generally not be used directly.
12466#[derive(Bundle)]
12467pub struct AbstractMinecartMetadataBundle {
12468    _marker: AbstractMinecart,
12469    parent: AbstractVehicleMetadataBundle,
12470    custom_display_block: CustomDisplayBlock,
12471    display_offset: DisplayOffset,
12472}
12473impl Default for AbstractMinecartMetadataBundle {
12474    fn default() -> Self {
12475        Self {
12476            _marker: AbstractMinecart,
12477            parent: Default::default(),
12478            custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
12479            display_offset: DisplayOffset(Default::default()),
12480        }
12481    }
12482}
12483
12484/// The marker component for entities of type `minecraft:chest_minecart`.
12485///
12486/// # Metadata
12487///
12488/// This entity type does not add any additional metadata. It will still have
12489/// metadata from parent types.
12490///
12491/// # Parents
12492///
12493/// Entities with `ChestMinecart` will also have the following marker components
12494/// and their metadata fields:
12495///
12496/// - [AbstractMinecart]
12497/// - [AbstractVehicle]
12498/// - [AbstractEntity]
12499///
12500/// # Children
12501///
12502/// This entity type has no children types.
12503#[derive(Component)]
12504pub struct ChestMinecart;
12505impl ChestMinecart {
12506    fn apply_metadata(
12507        entity: &mut bevy_ecs::system::EntityCommands,
12508        d: EntityDataItem,
12509    ) -> Result<(), UpdateMetadataError> {
12510        match d.index {
12511            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12512            _ => {}
12513        }
12514        Ok(())
12515    }
12516}
12517
12518/// The metadata bundle for [ChestMinecart].
12519///
12520/// This type should generally not be used directly.
12521#[derive(Bundle)]
12522pub struct ChestMinecartMetadataBundle {
12523    _marker: ChestMinecart,
12524    parent: AbstractMinecartMetadataBundle,
12525}
12526impl Default for ChestMinecartMetadataBundle {
12527    fn default() -> Self {
12528        Self {
12529            _marker: ChestMinecart,
12530            parent: Default::default(),
12531        }
12532    }
12533}
12534
12535/// A metadata field for [CommandBlockMinecart].
12536#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12537pub struct CommandName(pub Box<str>);
12538/// A metadata field for [CommandBlockMinecart].
12539#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12540pub struct LastOutput(pub Box<FormattedText>);
12541/// The marker component for entities of type
12542/// `minecraft:command_block_minecart`.
12543///
12544/// # Metadata
12545///
12546/// These are the metadata components that all `CommandBlockMinecart` entities
12547/// are guaranteed to have, in addition to the metadata components from parent
12548/// types:
12549///
12550/// - [CommandName]
12551/// - [LastOutput]
12552///
12553/// # Parents
12554///
12555/// Entities with `CommandBlockMinecart` will also have the following marker
12556/// components and their metadata fields:
12557///
12558/// - [AbstractMinecart]
12559/// - [AbstractVehicle]
12560/// - [AbstractEntity]
12561///
12562/// # Children
12563///
12564/// This entity type has no children types.
12565#[derive(Component)]
12566pub struct CommandBlockMinecart;
12567impl CommandBlockMinecart {
12568    fn apply_metadata(
12569        entity: &mut bevy_ecs::system::EntityCommands,
12570        d: EntityDataItem,
12571    ) -> Result<(), UpdateMetadataError> {
12572        match d.index {
12573            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12574            13 => {
12575                entity.insert(CommandName(d.value.into_string()?));
12576            }
12577            14 => {
12578                entity.insert(LastOutput(d.value.into_formatted_text()?));
12579            }
12580            _ => {}
12581        }
12582        Ok(())
12583    }
12584}
12585
12586/// The metadata bundle for [CommandBlockMinecart].
12587///
12588/// This type should generally not be used directly.
12589#[derive(Bundle)]
12590pub struct CommandBlockMinecartMetadataBundle {
12591    _marker: CommandBlockMinecart,
12592    parent: AbstractMinecartMetadataBundle,
12593    command_name: CommandName,
12594    last_output: LastOutput,
12595}
12596impl Default for CommandBlockMinecartMetadataBundle {
12597    fn default() -> Self {
12598        Self {
12599            _marker: CommandBlockMinecart,
12600            parent: Default::default(),
12601            command_name: CommandName("".into()),
12602            last_output: LastOutput(Default::default()),
12603        }
12604    }
12605}
12606
12607/// A metadata field for [FurnaceMinecart].
12608#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12609pub struct Fuel(pub bool);
12610/// The marker component for entities of type `minecraft:furnace_minecart`.
12611///
12612/// # Metadata
12613///
12614/// These are the metadata components that all `FurnaceMinecart` entities are
12615/// guaranteed to have, in addition to the metadata components from parent
12616/// types:
12617///
12618/// - [Fuel]
12619///
12620/// # Parents
12621///
12622/// Entities with `FurnaceMinecart` will also have the following marker
12623/// components and their metadata fields:
12624///
12625/// - [AbstractMinecart]
12626/// - [AbstractVehicle]
12627/// - [AbstractEntity]
12628///
12629/// # Children
12630///
12631/// This entity type has no children types.
12632#[derive(Component)]
12633pub struct FurnaceMinecart;
12634impl FurnaceMinecart {
12635    fn apply_metadata(
12636        entity: &mut bevy_ecs::system::EntityCommands,
12637        d: EntityDataItem,
12638    ) -> Result<(), UpdateMetadataError> {
12639        match d.index {
12640            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12641            13 => {
12642                entity.insert(Fuel(d.value.into_boolean()?));
12643            }
12644            _ => {}
12645        }
12646        Ok(())
12647    }
12648}
12649
12650/// The metadata bundle for [FurnaceMinecart].
12651///
12652/// This type should generally not be used directly.
12653#[derive(Bundle)]
12654pub struct FurnaceMinecartMetadataBundle {
12655    _marker: FurnaceMinecart,
12656    parent: AbstractMinecartMetadataBundle,
12657    fuel: Fuel,
12658}
12659impl Default for FurnaceMinecartMetadataBundle {
12660    fn default() -> Self {
12661        Self {
12662            _marker: FurnaceMinecart,
12663            parent: Default::default(),
12664            fuel: Fuel(false),
12665        }
12666    }
12667}
12668
12669/// The marker component for entities of type `minecraft:hopper_minecart`.
12670///
12671/// # Metadata
12672///
12673/// This entity type does not add any additional metadata. It will still have
12674/// metadata from parent types.
12675///
12676/// # Parents
12677///
12678/// Entities with `HopperMinecart` will also have the following marker
12679/// components and their metadata fields:
12680///
12681/// - [AbstractMinecart]
12682/// - [AbstractVehicle]
12683/// - [AbstractEntity]
12684///
12685/// # Children
12686///
12687/// This entity type has no children types.
12688#[derive(Component)]
12689pub struct HopperMinecart;
12690impl HopperMinecart {
12691    fn apply_metadata(
12692        entity: &mut bevy_ecs::system::EntityCommands,
12693        d: EntityDataItem,
12694    ) -> Result<(), UpdateMetadataError> {
12695        match d.index {
12696            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12697            _ => {}
12698        }
12699        Ok(())
12700    }
12701}
12702
12703/// The metadata bundle for [HopperMinecart].
12704///
12705/// This type should generally not be used directly.
12706#[derive(Bundle)]
12707pub struct HopperMinecartMetadataBundle {
12708    _marker: HopperMinecart,
12709    parent: AbstractMinecartMetadataBundle,
12710}
12711impl Default for HopperMinecartMetadataBundle {
12712    fn default() -> Self {
12713        Self {
12714            _marker: HopperMinecart,
12715            parent: Default::default(),
12716        }
12717    }
12718}
12719
12720/// The marker component for entities of type `minecraft:minecart`.
12721///
12722/// # Metadata
12723///
12724/// This entity type does not add any additional metadata. It will still have
12725/// metadata from parent types.
12726///
12727/// # Parents
12728///
12729/// Entities with `Minecart` will also have the following marker components and
12730/// their metadata fields:
12731///
12732/// - [AbstractMinecart]
12733/// - [AbstractVehicle]
12734/// - [AbstractEntity]
12735///
12736/// # Children
12737///
12738/// This entity type has no children types.
12739#[derive(Component)]
12740pub struct Minecart;
12741impl Minecart {
12742    fn apply_metadata(
12743        entity: &mut bevy_ecs::system::EntityCommands,
12744        d: EntityDataItem,
12745    ) -> Result<(), UpdateMetadataError> {
12746        match d.index {
12747            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12748            _ => {}
12749        }
12750        Ok(())
12751    }
12752}
12753
12754/// The metadata bundle for [Minecart].
12755///
12756/// This type should generally not be used directly.
12757#[derive(Bundle)]
12758pub struct MinecartMetadataBundle {
12759    _marker: Minecart,
12760    parent: AbstractMinecartMetadataBundle,
12761}
12762impl Default for MinecartMetadataBundle {
12763    fn default() -> Self {
12764        Self {
12765            _marker: Minecart,
12766            parent: Default::default(),
12767        }
12768    }
12769}
12770
12771/// The marker component for entities of type `minecraft:spawner_minecart`.
12772///
12773/// # Metadata
12774///
12775/// This entity type does not add any additional metadata. It will still have
12776/// metadata from parent types.
12777///
12778/// # Parents
12779///
12780/// Entities with `SpawnerMinecart` will also have the following marker
12781/// components and their metadata fields:
12782///
12783/// - [AbstractMinecart]
12784/// - [AbstractVehicle]
12785/// - [AbstractEntity]
12786///
12787/// # Children
12788///
12789/// This entity type has no children types.
12790#[derive(Component)]
12791pub struct SpawnerMinecart;
12792impl SpawnerMinecart {
12793    fn apply_metadata(
12794        entity: &mut bevy_ecs::system::EntityCommands,
12795        d: EntityDataItem,
12796    ) -> Result<(), UpdateMetadataError> {
12797        match d.index {
12798            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12799            _ => {}
12800        }
12801        Ok(())
12802    }
12803}
12804
12805/// The metadata bundle for [SpawnerMinecart].
12806///
12807/// This type should generally not be used directly.
12808#[derive(Bundle)]
12809pub struct SpawnerMinecartMetadataBundle {
12810    _marker: SpawnerMinecart,
12811    parent: AbstractMinecartMetadataBundle,
12812}
12813impl Default for SpawnerMinecartMetadataBundle {
12814    fn default() -> Self {
12815        Self {
12816            _marker: SpawnerMinecart,
12817            parent: Default::default(),
12818        }
12819    }
12820}
12821
12822/// The marker component for entities of type `minecraft:tnt_minecart`.
12823///
12824/// # Metadata
12825///
12826/// This entity type does not add any additional metadata. It will still have
12827/// metadata from parent types.
12828///
12829/// # Parents
12830///
12831/// Entities with `TntMinecart` will also have the following marker components
12832/// and their metadata fields:
12833///
12834/// - [AbstractMinecart]
12835/// - [AbstractVehicle]
12836/// - [AbstractEntity]
12837///
12838/// # Children
12839///
12840/// This entity type has no children types.
12841#[derive(Component)]
12842pub struct TntMinecart;
12843impl TntMinecart {
12844    fn apply_metadata(
12845        entity: &mut bevy_ecs::system::EntityCommands,
12846        d: EntityDataItem,
12847    ) -> Result<(), UpdateMetadataError> {
12848        match d.index {
12849            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12850            _ => {}
12851        }
12852        Ok(())
12853    }
12854}
12855
12856/// The metadata bundle for [TntMinecart].
12857///
12858/// This type should generally not be used directly.
12859#[derive(Bundle)]
12860pub struct TntMinecartMetadataBundle {
12861    _marker: TntMinecart,
12862    parent: AbstractMinecartMetadataBundle,
12863}
12864impl Default for TntMinecartMetadataBundle {
12865    fn default() -> Self {
12866        Self {
12867            _marker: TntMinecart,
12868            parent: Default::default(),
12869        }
12870    }
12871}
12872
12873pub fn apply_metadata(
12874    entity: &mut bevy_ecs::system::EntityCommands,
12875    entity_kind: EntityKind,
12876    items: Vec<EntityDataItem>,
12877) -> Result<(), UpdateMetadataError> {
12878    match entity_kind {
12879        EntityKind::AcaciaBoat => {
12880            for d in items {
12881                AcaciaBoat::apply_metadata(entity, d)?;
12882            }
12883        }
12884        EntityKind::AcaciaChestBoat => {
12885            for d in items {
12886                AcaciaChestBoat::apply_metadata(entity, d)?;
12887            }
12888        }
12889        EntityKind::Allay => {
12890            for d in items {
12891                Allay::apply_metadata(entity, d)?;
12892            }
12893        }
12894        EntityKind::AreaEffectCloud => {
12895            for d in items {
12896                AreaEffectCloud::apply_metadata(entity, d)?;
12897            }
12898        }
12899        EntityKind::Armadillo => {
12900            for d in items {
12901                Armadillo::apply_metadata(entity, d)?;
12902            }
12903        }
12904        EntityKind::ArmorStand => {
12905            for d in items {
12906                ArmorStand::apply_metadata(entity, d)?;
12907            }
12908        }
12909        EntityKind::Arrow => {
12910            for d in items {
12911                Arrow::apply_metadata(entity, d)?;
12912            }
12913        }
12914        EntityKind::Axolotl => {
12915            for d in items {
12916                Axolotl::apply_metadata(entity, d)?;
12917            }
12918        }
12919        EntityKind::BambooChestRaft => {
12920            for d in items {
12921                BambooChestRaft::apply_metadata(entity, d)?;
12922            }
12923        }
12924        EntityKind::BambooRaft => {
12925            for d in items {
12926                BambooRaft::apply_metadata(entity, d)?;
12927            }
12928        }
12929        EntityKind::Bat => {
12930            for d in items {
12931                Bat::apply_metadata(entity, d)?;
12932            }
12933        }
12934        EntityKind::Bee => {
12935            for d in items {
12936                Bee::apply_metadata(entity, d)?;
12937            }
12938        }
12939        EntityKind::BirchBoat => {
12940            for d in items {
12941                BirchBoat::apply_metadata(entity, d)?;
12942            }
12943        }
12944        EntityKind::BirchChestBoat => {
12945            for d in items {
12946                BirchChestBoat::apply_metadata(entity, d)?;
12947            }
12948        }
12949        EntityKind::Blaze => {
12950            for d in items {
12951                Blaze::apply_metadata(entity, d)?;
12952            }
12953        }
12954        EntityKind::BlockDisplay => {
12955            for d in items {
12956                BlockDisplay::apply_metadata(entity, d)?;
12957            }
12958        }
12959        EntityKind::Bogged => {
12960            for d in items {
12961                Bogged::apply_metadata(entity, d)?;
12962            }
12963        }
12964        EntityKind::Breeze => {
12965            for d in items {
12966                Breeze::apply_metadata(entity, d)?;
12967            }
12968        }
12969        EntityKind::BreezeWindCharge => {
12970            for d in items {
12971                BreezeWindCharge::apply_metadata(entity, d)?;
12972            }
12973        }
12974        EntityKind::Camel => {
12975            for d in items {
12976                Camel::apply_metadata(entity, d)?;
12977            }
12978        }
12979        EntityKind::CamelHusk => {
12980            for d in items {
12981                CamelHusk::apply_metadata(entity, d)?;
12982            }
12983        }
12984        EntityKind::Cat => {
12985            for d in items {
12986                Cat::apply_metadata(entity, d)?;
12987            }
12988        }
12989        EntityKind::CaveSpider => {
12990            for d in items {
12991                CaveSpider::apply_metadata(entity, d)?;
12992            }
12993        }
12994        EntityKind::CherryBoat => {
12995            for d in items {
12996                CherryBoat::apply_metadata(entity, d)?;
12997            }
12998        }
12999        EntityKind::CherryChestBoat => {
13000            for d in items {
13001                CherryChestBoat::apply_metadata(entity, d)?;
13002            }
13003        }
13004        EntityKind::ChestMinecart => {
13005            for d in items {
13006                ChestMinecart::apply_metadata(entity, d)?;
13007            }
13008        }
13009        EntityKind::Chicken => {
13010            for d in items {
13011                Chicken::apply_metadata(entity, d)?;
13012            }
13013        }
13014        EntityKind::Cod => {
13015            for d in items {
13016                Cod::apply_metadata(entity, d)?;
13017            }
13018        }
13019        EntityKind::CommandBlockMinecart => {
13020            for d in items {
13021                CommandBlockMinecart::apply_metadata(entity, d)?;
13022            }
13023        }
13024        EntityKind::CopperGolem => {
13025            for d in items {
13026                CopperGolem::apply_metadata(entity, d)?;
13027            }
13028        }
13029        EntityKind::Cow => {
13030            for d in items {
13031                Cow::apply_metadata(entity, d)?;
13032            }
13033        }
13034        EntityKind::Creaking => {
13035            for d in items {
13036                Creaking::apply_metadata(entity, d)?;
13037            }
13038        }
13039        EntityKind::Creeper => {
13040            for d in items {
13041                Creeper::apply_metadata(entity, d)?;
13042            }
13043        }
13044        EntityKind::DarkOakBoat => {
13045            for d in items {
13046                DarkOakBoat::apply_metadata(entity, d)?;
13047            }
13048        }
13049        EntityKind::DarkOakChestBoat => {
13050            for d in items {
13051                DarkOakChestBoat::apply_metadata(entity, d)?;
13052            }
13053        }
13054        EntityKind::Dolphin => {
13055            for d in items {
13056                Dolphin::apply_metadata(entity, d)?;
13057            }
13058        }
13059        EntityKind::Donkey => {
13060            for d in items {
13061                Donkey::apply_metadata(entity, d)?;
13062            }
13063        }
13064        EntityKind::DragonFireball => {
13065            for d in items {
13066                DragonFireball::apply_metadata(entity, d)?;
13067            }
13068        }
13069        EntityKind::Drowned => {
13070            for d in items {
13071                Drowned::apply_metadata(entity, d)?;
13072            }
13073        }
13074        EntityKind::Egg => {
13075            for d in items {
13076                Egg::apply_metadata(entity, d)?;
13077            }
13078        }
13079        EntityKind::ElderGuardian => {
13080            for d in items {
13081                ElderGuardian::apply_metadata(entity, d)?;
13082            }
13083        }
13084        EntityKind::EndCrystal => {
13085            for d in items {
13086                EndCrystal::apply_metadata(entity, d)?;
13087            }
13088        }
13089        EntityKind::EnderDragon => {
13090            for d in items {
13091                EnderDragon::apply_metadata(entity, d)?;
13092            }
13093        }
13094        EntityKind::EnderPearl => {
13095            for d in items {
13096                EnderPearl::apply_metadata(entity, d)?;
13097            }
13098        }
13099        EntityKind::Enderman => {
13100            for d in items {
13101                Enderman::apply_metadata(entity, d)?;
13102            }
13103        }
13104        EntityKind::Endermite => {
13105            for d in items {
13106                Endermite::apply_metadata(entity, d)?;
13107            }
13108        }
13109        EntityKind::Evoker => {
13110            for d in items {
13111                Evoker::apply_metadata(entity, d)?;
13112            }
13113        }
13114        EntityKind::EvokerFangs => {
13115            for d in items {
13116                EvokerFangs::apply_metadata(entity, d)?;
13117            }
13118        }
13119        EntityKind::ExperienceBottle => {
13120            for d in items {
13121                ExperienceBottle::apply_metadata(entity, d)?;
13122            }
13123        }
13124        EntityKind::ExperienceOrb => {
13125            for d in items {
13126                ExperienceOrb::apply_metadata(entity, d)?;
13127            }
13128        }
13129        EntityKind::EyeOfEnder => {
13130            for d in items {
13131                EyeOfEnder::apply_metadata(entity, d)?;
13132            }
13133        }
13134        EntityKind::FallingBlock => {
13135            for d in items {
13136                FallingBlock::apply_metadata(entity, d)?;
13137            }
13138        }
13139        EntityKind::Fireball => {
13140            for d in items {
13141                Fireball::apply_metadata(entity, d)?;
13142            }
13143        }
13144        EntityKind::FireworkRocket => {
13145            for d in items {
13146                FireworkRocket::apply_metadata(entity, d)?;
13147            }
13148        }
13149        EntityKind::FishingBobber => {
13150            for d in items {
13151                FishingBobber::apply_metadata(entity, d)?;
13152            }
13153        }
13154        EntityKind::Fox => {
13155            for d in items {
13156                Fox::apply_metadata(entity, d)?;
13157            }
13158        }
13159        EntityKind::Frog => {
13160            for d in items {
13161                Frog::apply_metadata(entity, d)?;
13162            }
13163        }
13164        EntityKind::FurnaceMinecart => {
13165            for d in items {
13166                FurnaceMinecart::apply_metadata(entity, d)?;
13167            }
13168        }
13169        EntityKind::Ghast => {
13170            for d in items {
13171                Ghast::apply_metadata(entity, d)?;
13172            }
13173        }
13174        EntityKind::Giant => {
13175            for d in items {
13176                Giant::apply_metadata(entity, d)?;
13177            }
13178        }
13179        EntityKind::GlowItemFrame => {
13180            for d in items {
13181                GlowItemFrame::apply_metadata(entity, d)?;
13182            }
13183        }
13184        EntityKind::GlowSquid => {
13185            for d in items {
13186                GlowSquid::apply_metadata(entity, d)?;
13187            }
13188        }
13189        EntityKind::Goat => {
13190            for d in items {
13191                Goat::apply_metadata(entity, d)?;
13192            }
13193        }
13194        EntityKind::Guardian => {
13195            for d in items {
13196                Guardian::apply_metadata(entity, d)?;
13197            }
13198        }
13199        EntityKind::HappyGhast => {
13200            for d in items {
13201                HappyGhast::apply_metadata(entity, d)?;
13202            }
13203        }
13204        EntityKind::Hoglin => {
13205            for d in items {
13206                Hoglin::apply_metadata(entity, d)?;
13207            }
13208        }
13209        EntityKind::HopperMinecart => {
13210            for d in items {
13211                HopperMinecart::apply_metadata(entity, d)?;
13212            }
13213        }
13214        EntityKind::Horse => {
13215            for d in items {
13216                Horse::apply_metadata(entity, d)?;
13217            }
13218        }
13219        EntityKind::Husk => {
13220            for d in items {
13221                Husk::apply_metadata(entity, d)?;
13222            }
13223        }
13224        EntityKind::Illusioner => {
13225            for d in items {
13226                Illusioner::apply_metadata(entity, d)?;
13227            }
13228        }
13229        EntityKind::Interaction => {
13230            for d in items {
13231                Interaction::apply_metadata(entity, d)?;
13232            }
13233        }
13234        EntityKind::IronGolem => {
13235            for d in items {
13236                IronGolem::apply_metadata(entity, d)?;
13237            }
13238        }
13239        EntityKind::Item => {
13240            for d in items {
13241                Item::apply_metadata(entity, d)?;
13242            }
13243        }
13244        EntityKind::ItemDisplay => {
13245            for d in items {
13246                ItemDisplay::apply_metadata(entity, d)?;
13247            }
13248        }
13249        EntityKind::ItemFrame => {
13250            for d in items {
13251                ItemFrame::apply_metadata(entity, d)?;
13252            }
13253        }
13254        EntityKind::JungleBoat => {
13255            for d in items {
13256                JungleBoat::apply_metadata(entity, d)?;
13257            }
13258        }
13259        EntityKind::JungleChestBoat => {
13260            for d in items {
13261                JungleChestBoat::apply_metadata(entity, d)?;
13262            }
13263        }
13264        EntityKind::LeashKnot => {
13265            for d in items {
13266                LeashKnot::apply_metadata(entity, d)?;
13267            }
13268        }
13269        EntityKind::LightningBolt => {
13270            for d in items {
13271                LightningBolt::apply_metadata(entity, d)?;
13272            }
13273        }
13274        EntityKind::LingeringPotion => {
13275            for d in items {
13276                LingeringPotion::apply_metadata(entity, d)?;
13277            }
13278        }
13279        EntityKind::Llama => {
13280            for d in items {
13281                Llama::apply_metadata(entity, d)?;
13282            }
13283        }
13284        EntityKind::LlamaSpit => {
13285            for d in items {
13286                LlamaSpit::apply_metadata(entity, d)?;
13287            }
13288        }
13289        EntityKind::MagmaCube => {
13290            for d in items {
13291                MagmaCube::apply_metadata(entity, d)?;
13292            }
13293        }
13294        EntityKind::MangroveBoat => {
13295            for d in items {
13296                MangroveBoat::apply_metadata(entity, d)?;
13297            }
13298        }
13299        EntityKind::MangroveChestBoat => {
13300            for d in items {
13301                MangroveChestBoat::apply_metadata(entity, d)?;
13302            }
13303        }
13304        EntityKind::Mannequin => {
13305            for d in items {
13306                Mannequin::apply_metadata(entity, d)?;
13307            }
13308        }
13309        EntityKind::Marker => {
13310            for d in items {
13311                Marker::apply_metadata(entity, d)?;
13312            }
13313        }
13314        EntityKind::Minecart => {
13315            for d in items {
13316                Minecart::apply_metadata(entity, d)?;
13317            }
13318        }
13319        EntityKind::Mooshroom => {
13320            for d in items {
13321                Mooshroom::apply_metadata(entity, d)?;
13322            }
13323        }
13324        EntityKind::Mule => {
13325            for d in items {
13326                Mule::apply_metadata(entity, d)?;
13327            }
13328        }
13329        EntityKind::Nautilus => {
13330            for d in items {
13331                Nautilus::apply_metadata(entity, d)?;
13332            }
13333        }
13334        EntityKind::OakBoat => {
13335            for d in items {
13336                OakBoat::apply_metadata(entity, d)?;
13337            }
13338        }
13339        EntityKind::OakChestBoat => {
13340            for d in items {
13341                OakChestBoat::apply_metadata(entity, d)?;
13342            }
13343        }
13344        EntityKind::Ocelot => {
13345            for d in items {
13346                Ocelot::apply_metadata(entity, d)?;
13347            }
13348        }
13349        EntityKind::OminousItemSpawner => {
13350            for d in items {
13351                OminousItemSpawner::apply_metadata(entity, d)?;
13352            }
13353        }
13354        EntityKind::Painting => {
13355            for d in items {
13356                Painting::apply_metadata(entity, d)?;
13357            }
13358        }
13359        EntityKind::PaleOakBoat => {
13360            for d in items {
13361                PaleOakBoat::apply_metadata(entity, d)?;
13362            }
13363        }
13364        EntityKind::PaleOakChestBoat => {
13365            for d in items {
13366                PaleOakChestBoat::apply_metadata(entity, d)?;
13367            }
13368        }
13369        EntityKind::Panda => {
13370            for d in items {
13371                Panda::apply_metadata(entity, d)?;
13372            }
13373        }
13374        EntityKind::Parched => {
13375            for d in items {
13376                Parched::apply_metadata(entity, d)?;
13377            }
13378        }
13379        EntityKind::Parrot => {
13380            for d in items {
13381                Parrot::apply_metadata(entity, d)?;
13382            }
13383        }
13384        EntityKind::Phantom => {
13385            for d in items {
13386                Phantom::apply_metadata(entity, d)?;
13387            }
13388        }
13389        EntityKind::Pig => {
13390            for d in items {
13391                Pig::apply_metadata(entity, d)?;
13392            }
13393        }
13394        EntityKind::Piglin => {
13395            for d in items {
13396                Piglin::apply_metadata(entity, d)?;
13397            }
13398        }
13399        EntityKind::PiglinBrute => {
13400            for d in items {
13401                PiglinBrute::apply_metadata(entity, d)?;
13402            }
13403        }
13404        EntityKind::Pillager => {
13405            for d in items {
13406                Pillager::apply_metadata(entity, d)?;
13407            }
13408        }
13409        EntityKind::Player => {
13410            for d in items {
13411                Player::apply_metadata(entity, d)?;
13412            }
13413        }
13414        EntityKind::PolarBear => {
13415            for d in items {
13416                PolarBear::apply_metadata(entity, d)?;
13417            }
13418        }
13419        EntityKind::Pufferfish => {
13420            for d in items {
13421                Pufferfish::apply_metadata(entity, d)?;
13422            }
13423        }
13424        EntityKind::Rabbit => {
13425            for d in items {
13426                Rabbit::apply_metadata(entity, d)?;
13427            }
13428        }
13429        EntityKind::Ravager => {
13430            for d in items {
13431                Ravager::apply_metadata(entity, d)?;
13432            }
13433        }
13434        EntityKind::Salmon => {
13435            for d in items {
13436                Salmon::apply_metadata(entity, d)?;
13437            }
13438        }
13439        EntityKind::Sheep => {
13440            for d in items {
13441                Sheep::apply_metadata(entity, d)?;
13442            }
13443        }
13444        EntityKind::Shulker => {
13445            for d in items {
13446                Shulker::apply_metadata(entity, d)?;
13447            }
13448        }
13449        EntityKind::ShulkerBullet => {
13450            for d in items {
13451                ShulkerBullet::apply_metadata(entity, d)?;
13452            }
13453        }
13454        EntityKind::Silverfish => {
13455            for d in items {
13456                Silverfish::apply_metadata(entity, d)?;
13457            }
13458        }
13459        EntityKind::Skeleton => {
13460            for d in items {
13461                Skeleton::apply_metadata(entity, d)?;
13462            }
13463        }
13464        EntityKind::SkeletonHorse => {
13465            for d in items {
13466                SkeletonHorse::apply_metadata(entity, d)?;
13467            }
13468        }
13469        EntityKind::Slime => {
13470            for d in items {
13471                Slime::apply_metadata(entity, d)?;
13472            }
13473        }
13474        EntityKind::SmallFireball => {
13475            for d in items {
13476                SmallFireball::apply_metadata(entity, d)?;
13477            }
13478        }
13479        EntityKind::Sniffer => {
13480            for d in items {
13481                Sniffer::apply_metadata(entity, d)?;
13482            }
13483        }
13484        EntityKind::SnowGolem => {
13485            for d in items {
13486                SnowGolem::apply_metadata(entity, d)?;
13487            }
13488        }
13489        EntityKind::Snowball => {
13490            for d in items {
13491                Snowball::apply_metadata(entity, d)?;
13492            }
13493        }
13494        EntityKind::SpawnerMinecart => {
13495            for d in items {
13496                SpawnerMinecart::apply_metadata(entity, d)?;
13497            }
13498        }
13499        EntityKind::SpectralArrow => {
13500            for d in items {
13501                SpectralArrow::apply_metadata(entity, d)?;
13502            }
13503        }
13504        EntityKind::Spider => {
13505            for d in items {
13506                Spider::apply_metadata(entity, d)?;
13507            }
13508        }
13509        EntityKind::SplashPotion => {
13510            for d in items {
13511                SplashPotion::apply_metadata(entity, d)?;
13512            }
13513        }
13514        EntityKind::SpruceBoat => {
13515            for d in items {
13516                SpruceBoat::apply_metadata(entity, d)?;
13517            }
13518        }
13519        EntityKind::SpruceChestBoat => {
13520            for d in items {
13521                SpruceChestBoat::apply_metadata(entity, d)?;
13522            }
13523        }
13524        EntityKind::Squid => {
13525            for d in items {
13526                Squid::apply_metadata(entity, d)?;
13527            }
13528        }
13529        EntityKind::Stray => {
13530            for d in items {
13531                Stray::apply_metadata(entity, d)?;
13532            }
13533        }
13534        EntityKind::Strider => {
13535            for d in items {
13536                Strider::apply_metadata(entity, d)?;
13537            }
13538        }
13539        EntityKind::SulfurCube => {
13540            for d in items {
13541                SulfurCube::apply_metadata(entity, d)?;
13542            }
13543        }
13544        EntityKind::Tadpole => {
13545            for d in items {
13546                Tadpole::apply_metadata(entity, d)?;
13547            }
13548        }
13549        EntityKind::TextDisplay => {
13550            for d in items {
13551                TextDisplay::apply_metadata(entity, d)?;
13552            }
13553        }
13554        EntityKind::Tnt => {
13555            for d in items {
13556                Tnt::apply_metadata(entity, d)?;
13557            }
13558        }
13559        EntityKind::TntMinecart => {
13560            for d in items {
13561                TntMinecart::apply_metadata(entity, d)?;
13562            }
13563        }
13564        EntityKind::TraderLlama => {
13565            for d in items {
13566                TraderLlama::apply_metadata(entity, d)?;
13567            }
13568        }
13569        EntityKind::Trident => {
13570            for d in items {
13571                Trident::apply_metadata(entity, d)?;
13572            }
13573        }
13574        EntityKind::TropicalFish => {
13575            for d in items {
13576                TropicalFish::apply_metadata(entity, d)?;
13577            }
13578        }
13579        EntityKind::Turtle => {
13580            for d in items {
13581                Turtle::apply_metadata(entity, d)?;
13582            }
13583        }
13584        EntityKind::Vex => {
13585            for d in items {
13586                Vex::apply_metadata(entity, d)?;
13587            }
13588        }
13589        EntityKind::Villager => {
13590            for d in items {
13591                Villager::apply_metadata(entity, d)?;
13592            }
13593        }
13594        EntityKind::Vindicator => {
13595            for d in items {
13596                Vindicator::apply_metadata(entity, d)?;
13597            }
13598        }
13599        EntityKind::WanderingTrader => {
13600            for d in items {
13601                WanderingTrader::apply_metadata(entity, d)?;
13602            }
13603        }
13604        EntityKind::Warden => {
13605            for d in items {
13606                Warden::apply_metadata(entity, d)?;
13607            }
13608        }
13609        EntityKind::WindCharge => {
13610            for d in items {
13611                WindCharge::apply_metadata(entity, d)?;
13612            }
13613        }
13614        EntityKind::Witch => {
13615            for d in items {
13616                Witch::apply_metadata(entity, d)?;
13617            }
13618        }
13619        EntityKind::Wither => {
13620            for d in items {
13621                Wither::apply_metadata(entity, d)?;
13622            }
13623        }
13624        EntityKind::WitherSkeleton => {
13625            for d in items {
13626                WitherSkeleton::apply_metadata(entity, d)?;
13627            }
13628        }
13629        EntityKind::WitherSkull => {
13630            for d in items {
13631                WitherSkull::apply_metadata(entity, d)?;
13632            }
13633        }
13634        EntityKind::Wolf => {
13635            for d in items {
13636                Wolf::apply_metadata(entity, d)?;
13637            }
13638        }
13639        EntityKind::Zoglin => {
13640            for d in items {
13641                Zoglin::apply_metadata(entity, d)?;
13642            }
13643        }
13644        EntityKind::Zombie => {
13645            for d in items {
13646                Zombie::apply_metadata(entity, d)?;
13647            }
13648        }
13649        EntityKind::ZombieHorse => {
13650            for d in items {
13651                ZombieHorse::apply_metadata(entity, d)?;
13652            }
13653        }
13654        EntityKind::ZombieNautilus => {
13655            for d in items {
13656                ZombieNautilus::apply_metadata(entity, d)?;
13657            }
13658        }
13659        EntityKind::ZombieVillager => {
13660            for d in items {
13661                ZombieVillager::apply_metadata(entity, d)?;
13662            }
13663        }
13664        EntityKind::ZombifiedPiglin => {
13665            for d in items {
13666                ZombifiedPiglin::apply_metadata(entity, d)?;
13667            }
13668        }
13669    }
13670    Ok(())
13671}
13672
13673pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: EntityKind) {
13674    match kind {
13675        EntityKind::AcaciaBoat => {
13676            entity.insert(AcaciaBoatMetadataBundle::default());
13677        }
13678        EntityKind::AcaciaChestBoat => {
13679            entity.insert(AcaciaChestBoatMetadataBundle::default());
13680        }
13681        EntityKind::Allay => {
13682            entity.insert(AllayMetadataBundle::default());
13683        }
13684        EntityKind::AreaEffectCloud => {
13685            entity.insert(AreaEffectCloudMetadataBundle::default());
13686        }
13687        EntityKind::Armadillo => {
13688            entity.insert(ArmadilloMetadataBundle::default());
13689        }
13690        EntityKind::ArmorStand => {
13691            entity.insert(ArmorStandMetadataBundle::default());
13692        }
13693        EntityKind::Arrow => {
13694            entity.insert(ArrowMetadataBundle::default());
13695        }
13696        EntityKind::Axolotl => {
13697            entity.insert(AxolotlMetadataBundle::default());
13698        }
13699        EntityKind::BambooChestRaft => {
13700            entity.insert(BambooChestRaftMetadataBundle::default());
13701        }
13702        EntityKind::BambooRaft => {
13703            entity.insert(BambooRaftMetadataBundle::default());
13704        }
13705        EntityKind::Bat => {
13706            entity.insert(BatMetadataBundle::default());
13707        }
13708        EntityKind::Bee => {
13709            entity.insert(BeeMetadataBundle::default());
13710        }
13711        EntityKind::BirchBoat => {
13712            entity.insert(BirchBoatMetadataBundle::default());
13713        }
13714        EntityKind::BirchChestBoat => {
13715            entity.insert(BirchChestBoatMetadataBundle::default());
13716        }
13717        EntityKind::Blaze => {
13718            entity.insert(BlazeMetadataBundle::default());
13719        }
13720        EntityKind::BlockDisplay => {
13721            entity.insert(BlockDisplayMetadataBundle::default());
13722        }
13723        EntityKind::Bogged => {
13724            entity.insert(BoggedMetadataBundle::default());
13725        }
13726        EntityKind::Breeze => {
13727            entity.insert(BreezeMetadataBundle::default());
13728        }
13729        EntityKind::BreezeWindCharge => {
13730            entity.insert(BreezeWindChargeMetadataBundle::default());
13731        }
13732        EntityKind::Camel => {
13733            entity.insert(CamelMetadataBundle::default());
13734        }
13735        EntityKind::CamelHusk => {
13736            entity.insert(CamelHuskMetadataBundle::default());
13737        }
13738        EntityKind::Cat => {
13739            entity.insert(CatMetadataBundle::default());
13740        }
13741        EntityKind::CaveSpider => {
13742            entity.insert(CaveSpiderMetadataBundle::default());
13743        }
13744        EntityKind::CherryBoat => {
13745            entity.insert(CherryBoatMetadataBundle::default());
13746        }
13747        EntityKind::CherryChestBoat => {
13748            entity.insert(CherryChestBoatMetadataBundle::default());
13749        }
13750        EntityKind::ChestMinecart => {
13751            entity.insert(ChestMinecartMetadataBundle::default());
13752        }
13753        EntityKind::Chicken => {
13754            entity.insert(ChickenMetadataBundle::default());
13755        }
13756        EntityKind::Cod => {
13757            entity.insert(CodMetadataBundle::default());
13758        }
13759        EntityKind::CommandBlockMinecart => {
13760            entity.insert(CommandBlockMinecartMetadataBundle::default());
13761        }
13762        EntityKind::CopperGolem => {
13763            entity.insert(CopperGolemMetadataBundle::default());
13764        }
13765        EntityKind::Cow => {
13766            entity.insert(CowMetadataBundle::default());
13767        }
13768        EntityKind::Creaking => {
13769            entity.insert(CreakingMetadataBundle::default());
13770        }
13771        EntityKind::Creeper => {
13772            entity.insert(CreeperMetadataBundle::default());
13773        }
13774        EntityKind::DarkOakBoat => {
13775            entity.insert(DarkOakBoatMetadataBundle::default());
13776        }
13777        EntityKind::DarkOakChestBoat => {
13778            entity.insert(DarkOakChestBoatMetadataBundle::default());
13779        }
13780        EntityKind::Dolphin => {
13781            entity.insert(DolphinMetadataBundle::default());
13782        }
13783        EntityKind::Donkey => {
13784            entity.insert(DonkeyMetadataBundle::default());
13785        }
13786        EntityKind::DragonFireball => {
13787            entity.insert(DragonFireballMetadataBundle::default());
13788        }
13789        EntityKind::Drowned => {
13790            entity.insert(DrownedMetadataBundle::default());
13791        }
13792        EntityKind::Egg => {
13793            entity.insert(EggMetadataBundle::default());
13794        }
13795        EntityKind::ElderGuardian => {
13796            entity.insert(ElderGuardianMetadataBundle::default());
13797        }
13798        EntityKind::EndCrystal => {
13799            entity.insert(EndCrystalMetadataBundle::default());
13800        }
13801        EntityKind::EnderDragon => {
13802            entity.insert(EnderDragonMetadataBundle::default());
13803        }
13804        EntityKind::EnderPearl => {
13805            entity.insert(EnderPearlMetadataBundle::default());
13806        }
13807        EntityKind::Enderman => {
13808            entity.insert(EndermanMetadataBundle::default());
13809        }
13810        EntityKind::Endermite => {
13811            entity.insert(EndermiteMetadataBundle::default());
13812        }
13813        EntityKind::Evoker => {
13814            entity.insert(EvokerMetadataBundle::default());
13815        }
13816        EntityKind::EvokerFangs => {
13817            entity.insert(EvokerFangsMetadataBundle::default());
13818        }
13819        EntityKind::ExperienceBottle => {
13820            entity.insert(ExperienceBottleMetadataBundle::default());
13821        }
13822        EntityKind::ExperienceOrb => {
13823            entity.insert(ExperienceOrbMetadataBundle::default());
13824        }
13825        EntityKind::EyeOfEnder => {
13826            entity.insert(EyeOfEnderMetadataBundle::default());
13827        }
13828        EntityKind::FallingBlock => {
13829            entity.insert(FallingBlockMetadataBundle::default());
13830        }
13831        EntityKind::Fireball => {
13832            entity.insert(FireballMetadataBundle::default());
13833        }
13834        EntityKind::FireworkRocket => {
13835            entity.insert(FireworkRocketMetadataBundle::default());
13836        }
13837        EntityKind::FishingBobber => {
13838            entity.insert(FishingBobberMetadataBundle::default());
13839        }
13840        EntityKind::Fox => {
13841            entity.insert(FoxMetadataBundle::default());
13842        }
13843        EntityKind::Frog => {
13844            entity.insert(FrogMetadataBundle::default());
13845        }
13846        EntityKind::FurnaceMinecart => {
13847            entity.insert(FurnaceMinecartMetadataBundle::default());
13848        }
13849        EntityKind::Ghast => {
13850            entity.insert(GhastMetadataBundle::default());
13851        }
13852        EntityKind::Giant => {
13853            entity.insert(GiantMetadataBundle::default());
13854        }
13855        EntityKind::GlowItemFrame => {
13856            entity.insert(GlowItemFrameMetadataBundle::default());
13857        }
13858        EntityKind::GlowSquid => {
13859            entity.insert(GlowSquidMetadataBundle::default());
13860        }
13861        EntityKind::Goat => {
13862            entity.insert(GoatMetadataBundle::default());
13863        }
13864        EntityKind::Guardian => {
13865            entity.insert(GuardianMetadataBundle::default());
13866        }
13867        EntityKind::HappyGhast => {
13868            entity.insert(HappyGhastMetadataBundle::default());
13869        }
13870        EntityKind::Hoglin => {
13871            entity.insert(HoglinMetadataBundle::default());
13872        }
13873        EntityKind::HopperMinecart => {
13874            entity.insert(HopperMinecartMetadataBundle::default());
13875        }
13876        EntityKind::Horse => {
13877            entity.insert(HorseMetadataBundle::default());
13878        }
13879        EntityKind::Husk => {
13880            entity.insert(HuskMetadataBundle::default());
13881        }
13882        EntityKind::Illusioner => {
13883            entity.insert(IllusionerMetadataBundle::default());
13884        }
13885        EntityKind::Interaction => {
13886            entity.insert(InteractionMetadataBundle::default());
13887        }
13888        EntityKind::IronGolem => {
13889            entity.insert(IronGolemMetadataBundle::default());
13890        }
13891        EntityKind::Item => {
13892            entity.insert(ItemMetadataBundle::default());
13893        }
13894        EntityKind::ItemDisplay => {
13895            entity.insert(ItemDisplayMetadataBundle::default());
13896        }
13897        EntityKind::ItemFrame => {
13898            entity.insert(ItemFrameMetadataBundle::default());
13899        }
13900        EntityKind::JungleBoat => {
13901            entity.insert(JungleBoatMetadataBundle::default());
13902        }
13903        EntityKind::JungleChestBoat => {
13904            entity.insert(JungleChestBoatMetadataBundle::default());
13905        }
13906        EntityKind::LeashKnot => {
13907            entity.insert(LeashKnotMetadataBundle::default());
13908        }
13909        EntityKind::LightningBolt => {
13910            entity.insert(LightningBoltMetadataBundle::default());
13911        }
13912        EntityKind::LingeringPotion => {
13913            entity.insert(LingeringPotionMetadataBundle::default());
13914        }
13915        EntityKind::Llama => {
13916            entity.insert(LlamaMetadataBundle::default());
13917        }
13918        EntityKind::LlamaSpit => {
13919            entity.insert(LlamaSpitMetadataBundle::default());
13920        }
13921        EntityKind::MagmaCube => {
13922            entity.insert(MagmaCubeMetadataBundle::default());
13923        }
13924        EntityKind::MangroveBoat => {
13925            entity.insert(MangroveBoatMetadataBundle::default());
13926        }
13927        EntityKind::MangroveChestBoat => {
13928            entity.insert(MangroveChestBoatMetadataBundle::default());
13929        }
13930        EntityKind::Mannequin => {
13931            entity.insert(MannequinMetadataBundle::default());
13932        }
13933        EntityKind::Marker => {
13934            entity.insert(MarkerMetadataBundle::default());
13935        }
13936        EntityKind::Minecart => {
13937            entity.insert(MinecartMetadataBundle::default());
13938        }
13939        EntityKind::Mooshroom => {
13940            entity.insert(MooshroomMetadataBundle::default());
13941        }
13942        EntityKind::Mule => {
13943            entity.insert(MuleMetadataBundle::default());
13944        }
13945        EntityKind::Nautilus => {
13946            entity.insert(NautilusMetadataBundle::default());
13947        }
13948        EntityKind::OakBoat => {
13949            entity.insert(OakBoatMetadataBundle::default());
13950        }
13951        EntityKind::OakChestBoat => {
13952            entity.insert(OakChestBoatMetadataBundle::default());
13953        }
13954        EntityKind::Ocelot => {
13955            entity.insert(OcelotMetadataBundle::default());
13956        }
13957        EntityKind::OminousItemSpawner => {
13958            entity.insert(OminousItemSpawnerMetadataBundle::default());
13959        }
13960        EntityKind::Painting => {
13961            entity.insert(PaintingMetadataBundle::default());
13962        }
13963        EntityKind::PaleOakBoat => {
13964            entity.insert(PaleOakBoatMetadataBundle::default());
13965        }
13966        EntityKind::PaleOakChestBoat => {
13967            entity.insert(PaleOakChestBoatMetadataBundle::default());
13968        }
13969        EntityKind::Panda => {
13970            entity.insert(PandaMetadataBundle::default());
13971        }
13972        EntityKind::Parched => {
13973            entity.insert(ParchedMetadataBundle::default());
13974        }
13975        EntityKind::Parrot => {
13976            entity.insert(ParrotMetadataBundle::default());
13977        }
13978        EntityKind::Phantom => {
13979            entity.insert(PhantomMetadataBundle::default());
13980        }
13981        EntityKind::Pig => {
13982            entity.insert(PigMetadataBundle::default());
13983        }
13984        EntityKind::Piglin => {
13985            entity.insert(PiglinMetadataBundle::default());
13986        }
13987        EntityKind::PiglinBrute => {
13988            entity.insert(PiglinBruteMetadataBundle::default());
13989        }
13990        EntityKind::Pillager => {
13991            entity.insert(PillagerMetadataBundle::default());
13992        }
13993        EntityKind::Player => {
13994            entity.insert(PlayerMetadataBundle::default());
13995        }
13996        EntityKind::PolarBear => {
13997            entity.insert(PolarBearMetadataBundle::default());
13998        }
13999        EntityKind::Pufferfish => {
14000            entity.insert(PufferfishMetadataBundle::default());
14001        }
14002        EntityKind::Rabbit => {
14003            entity.insert(RabbitMetadataBundle::default());
14004        }
14005        EntityKind::Ravager => {
14006            entity.insert(RavagerMetadataBundle::default());
14007        }
14008        EntityKind::Salmon => {
14009            entity.insert(SalmonMetadataBundle::default());
14010        }
14011        EntityKind::Sheep => {
14012            entity.insert(SheepMetadataBundle::default());
14013        }
14014        EntityKind::Shulker => {
14015            entity.insert(ShulkerMetadataBundle::default());
14016        }
14017        EntityKind::ShulkerBullet => {
14018            entity.insert(ShulkerBulletMetadataBundle::default());
14019        }
14020        EntityKind::Silverfish => {
14021            entity.insert(SilverfishMetadataBundle::default());
14022        }
14023        EntityKind::Skeleton => {
14024            entity.insert(SkeletonMetadataBundle::default());
14025        }
14026        EntityKind::SkeletonHorse => {
14027            entity.insert(SkeletonHorseMetadataBundle::default());
14028        }
14029        EntityKind::Slime => {
14030            entity.insert(SlimeMetadataBundle::default());
14031        }
14032        EntityKind::SmallFireball => {
14033            entity.insert(SmallFireballMetadataBundle::default());
14034        }
14035        EntityKind::Sniffer => {
14036            entity.insert(SnifferMetadataBundle::default());
14037        }
14038        EntityKind::SnowGolem => {
14039            entity.insert(SnowGolemMetadataBundle::default());
14040        }
14041        EntityKind::Snowball => {
14042            entity.insert(SnowballMetadataBundle::default());
14043        }
14044        EntityKind::SpawnerMinecart => {
14045            entity.insert(SpawnerMinecartMetadataBundle::default());
14046        }
14047        EntityKind::SpectralArrow => {
14048            entity.insert(SpectralArrowMetadataBundle::default());
14049        }
14050        EntityKind::Spider => {
14051            entity.insert(SpiderMetadataBundle::default());
14052        }
14053        EntityKind::SplashPotion => {
14054            entity.insert(SplashPotionMetadataBundle::default());
14055        }
14056        EntityKind::SpruceBoat => {
14057            entity.insert(SpruceBoatMetadataBundle::default());
14058        }
14059        EntityKind::SpruceChestBoat => {
14060            entity.insert(SpruceChestBoatMetadataBundle::default());
14061        }
14062        EntityKind::Squid => {
14063            entity.insert(SquidMetadataBundle::default());
14064        }
14065        EntityKind::Stray => {
14066            entity.insert(StrayMetadataBundle::default());
14067        }
14068        EntityKind::Strider => {
14069            entity.insert(StriderMetadataBundle::default());
14070        }
14071        EntityKind::SulfurCube => {
14072            entity.insert(SulfurCubeMetadataBundle::default());
14073        }
14074        EntityKind::Tadpole => {
14075            entity.insert(TadpoleMetadataBundle::default());
14076        }
14077        EntityKind::TextDisplay => {
14078            entity.insert(TextDisplayMetadataBundle::default());
14079        }
14080        EntityKind::Tnt => {
14081            entity.insert(TntMetadataBundle::default());
14082        }
14083        EntityKind::TntMinecart => {
14084            entity.insert(TntMinecartMetadataBundle::default());
14085        }
14086        EntityKind::TraderLlama => {
14087            entity.insert(TraderLlamaMetadataBundle::default());
14088        }
14089        EntityKind::Trident => {
14090            entity.insert(TridentMetadataBundle::default());
14091        }
14092        EntityKind::TropicalFish => {
14093            entity.insert(TropicalFishMetadataBundle::default());
14094        }
14095        EntityKind::Turtle => {
14096            entity.insert(TurtleMetadataBundle::default());
14097        }
14098        EntityKind::Vex => {
14099            entity.insert(VexMetadataBundle::default());
14100        }
14101        EntityKind::Villager => {
14102            entity.insert(VillagerMetadataBundle::default());
14103        }
14104        EntityKind::Vindicator => {
14105            entity.insert(VindicatorMetadataBundle::default());
14106        }
14107        EntityKind::WanderingTrader => {
14108            entity.insert(WanderingTraderMetadataBundle::default());
14109        }
14110        EntityKind::Warden => {
14111            entity.insert(WardenMetadataBundle::default());
14112        }
14113        EntityKind::WindCharge => {
14114            entity.insert(WindChargeMetadataBundle::default());
14115        }
14116        EntityKind::Witch => {
14117            entity.insert(WitchMetadataBundle::default());
14118        }
14119        EntityKind::Wither => {
14120            entity.insert(WitherMetadataBundle::default());
14121        }
14122        EntityKind::WitherSkeleton => {
14123            entity.insert(WitherSkeletonMetadataBundle::default());
14124        }
14125        EntityKind::WitherSkull => {
14126            entity.insert(WitherSkullMetadataBundle::default());
14127        }
14128        EntityKind::Wolf => {
14129            entity.insert(WolfMetadataBundle::default());
14130        }
14131        EntityKind::Zoglin => {
14132            entity.insert(ZoglinMetadataBundle::default());
14133        }
14134        EntityKind::Zombie => {
14135            entity.insert(ZombieMetadataBundle::default());
14136        }
14137        EntityKind::ZombieHorse => {
14138            entity.insert(ZombieHorseMetadataBundle::default());
14139        }
14140        EntityKind::ZombieNautilus => {
14141            entity.insert(ZombieNautilusMetadataBundle::default());
14142        }
14143        EntityKind::ZombieVillager => {
14144            entity.insert(ZombieVillagerMetadataBundle::default());
14145        }
14146        EntityKind::ZombifiedPiglin => {
14147            entity.insert(ZombifiedPiglinMetadataBundle::default());
14148        }
14149    }
14150}