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//!       - [Slime]
62//!         - [MagmaCube]
63//!       - [AbstractCreature]
64//!         - [Allay]
65//!         - [CopperGolem]
66//!         - [IronGolem]
67//!         - [Pufferfish]
68//!         - [Shulker]
69//!         - [SnowGolem]
70//!         - [Tadpole]
71//!         - [AbstractAgeable]
72//!           - [Dolphin]
73//!           - [Squid]
74//!             - [GlowSquid]
75//!           - [AbstractAnimal]
76//!             - [Armadillo]
77//!             - [Axolotl]
78//!             - [Bee]
79//!             - [Chicken]
80//!             - [Cow]
81//!             - [Fox]
82//!             - [Frog]
83//!             - [Goat]
84//!             - [HappyGhast]
85//!             - [Hoglin]
86//!             - [Mooshroom]
87//!             - [Ocelot]
88//!             - [Panda]
89//!             - [Pig]
90//!             - [PolarBear]
91//!             - [Rabbit]
92//!             - [Sheep]
93//!             - [Sniffer]
94//!             - [Strider]
95//!             - [Turtle]
96//!             - [AbstractHorse]
97//!               - [Camel]
98//!                 - [CamelHusk]
99//!               - [Horse]
100//!               - [SkeletonHorse]
101//!               - [ZombieHorse]
102//!               - [AbstractChestedHorse]
103//!                 - [Donkey]
104//!                 - [Llama]
105//!                   - [TraderLlama]
106//!                 - [Mule]
107//!             - [AbstractTameable]
108//!               - [Cat]
109//!               - [Nautilus]
110//!               - [Parrot]
111//!               - [Wolf]
112//!               - [ZombieNautilus]
113//!           - [AbstractVillager]
114//!             - [Villager]
115//!             - [WanderingTrader]
116//!         - [AbstractFish]
117//!           - [Cod]
118//!           - [Salmon]
119//!           - [TropicalFish]
120//!         - [AbstractMonster]
121//!           - [Blaze]
122//!           - [Bogged]
123//!           - [Breeze]
124//!           - [Creaking]
125//!           - [Creeper]
126//!           - [Enderman]
127//!           - [Endermite]
128//!           - [Giant]
129//!           - [Guardian]
130//!             - [ElderGuardian]
131//!           - [Parched]
132//!           - [Silverfish]
133//!           - [Skeleton]
134//!           - [Spider]
135//!             - [CaveSpider]
136//!           - [Stray]
137//!           - [Vex]
138//!           - [Warden]
139//!           - [Wither]
140//!           - [WitherSkeleton]
141//!           - [Zoglin]
142//!           - [Zombie]
143//!             - [Drowned]
144//!             - [Husk]
145//!             - [ZombieVillager]
146//!             - [ZombifiedPiglin]
147//!           - [AbstractPiglin]
148//!             - [Piglin]
149//!             - [PiglinBrute]
150//!           - [AbstractRaider]
151//!             - [Pillager]
152//!             - [Ravager]
153//!             - [Vindicator]
154//!             - [Witch]
155//!             - [AbstractSpellcasterIllager]
156//!               - [Evoker]
157//!               - [Illusioner]
158//!   - [AbstractThrownItemProjectile]
159//!     - [Egg]
160//!     - [EnderPearl]
161//!     - [ExperienceBottle]
162//!     - [LingeringPotion]
163//!     - [Snowball]
164//!     - [SplashPotion]
165//!   - [AbstractVehicle]
166//!     - [AbstractBoat]
167//!       - [AcaciaBoat]
168//!       - [AcaciaChestBoat]
169//!       - [BambooChestRaft]
170//!       - [BambooRaft]
171//!       - [BirchBoat]
172//!       - [BirchChestBoat]
173//!       - [CherryBoat]
174//!       - [CherryChestBoat]
175//!       - [DarkOakBoat]
176//!       - [DarkOakChestBoat]
177//!       - [JungleBoat]
178//!       - [JungleChestBoat]
179//!       - [MangroveBoat]
180//!       - [MangroveChestBoat]
181//!       - [OakBoat]
182//!       - [OakChestBoat]
183//!       - [PaleOakBoat]
184//!       - [PaleOakChestBoat]
185//!       - [SpruceBoat]
186//!       - [SpruceChestBoat]
187//!     - [AbstractMinecart]
188//!       - [ChestMinecart]
189//!       - [CommandBlockMinecart]
190//!       - [FurnaceMinecart]
191//!       - [HopperMinecart]
192//!       - [Minecart]
193//!       - [SpawnerMinecart]
194//!       - [TntMinecart]
195
196#![allow(clippy::single_match)]
197
198use azalea_chat::FormattedText;
199use azalea_core::{
200    direction::Direction,
201    position::{BlockPos, Vec3f32},
202};
203use azalea_inventory::{ItemStack, components};
204use azalea_registry::{DataRegistry, builtin::EntityKind};
205use bevy_ecs::{bundle::Bundle, component::Component};
206use derive_more::{Deref, DerefMut};
207use thiserror::Error;
208use uuid::Uuid;
209
210use super::{
211    ArmadilloStateKind, CopperGolemStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt,
212    Pose, Quaternion, Rotations, SnifferStateKind, VillagerData, WeatheringCopperStateKind,
213};
214use crate::{HumanoidArm, particle::Particle};
215
216#[derive(Error, Debug)]
217pub enum UpdateMetadataError {
218    #[error("Wrong type ({0:?})")]
219    WrongType(EntityDataValue),
220}
221impl From<EntityDataValue> for UpdateMetadataError {
222    fn from(value: EntityDataValue) -> Self {
223        Self::WrongType(value)
224    }
225}
226
227#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
228/// A metadata field for [AbstractEntity].
229pub struct OnFire(pub bool);
230#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
231/// A metadata field for [AbstractEntity].
232pub struct AbstractEntityShiftKeyDown(pub bool);
233#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
234/// A metadata field for [AbstractEntity].
235pub struct Sprinting(pub bool);
236#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
237/// A metadata field for [AbstractEntity].
238pub struct Swimming(pub bool);
239#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
240/// A metadata field for [AbstractEntity].
241pub struct CurrentlyGlowing(pub bool);
242#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
243/// A metadata field for [AbstractEntity].
244pub struct Invisible(pub bool);
245#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
246/// A metadata field for [AbstractEntity].
247pub struct FallFlying(pub bool);
248/// A metadata field for [AbstractEntity].
249#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
250pub struct AirSupply(pub i32);
251/// A metadata field for [AbstractEntity].
252#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
253pub struct CustomName(pub Option<Box<FormattedText>>);
254/// A metadata field for [AbstractEntity].
255#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
256pub struct CustomNameVisible(pub bool);
257/// A metadata field for [AbstractEntity].
258#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
259pub struct Silent(pub bool);
260/// A metadata field for [AbstractEntity].
261#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
262pub struct NoGravity(pub bool);
263/// A metadata field for [AbstractEntity].
264#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
265pub struct TicksFrozen(pub i32);
266/// The root entity marker component.
267///
268/// All entities that have had their metadata sent by the server will have this
269/// component.
270///
271/// # Metadata
272///
273/// These are the metadata components that all `AbstractEntity` entities are
274/// guaranteed to have, in addition to the metadata components from parent
275/// types:
276///
277/// - [OnFire]
278/// - [AbstractEntityShiftKeyDown]
279/// - [Sprinting]
280/// - [Swimming]
281/// - [CurrentlyGlowing]
282/// - [Invisible]
283/// - [FallFlying]
284/// - [AirSupply]
285/// - [CustomName]
286/// - [CustomNameVisible]
287/// - [Silent]
288/// - [NoGravity]
289/// - [TicksFrozen]
290///
291/// # Children
292///
293/// - [AreaEffectCloud]
294/// - [BreezeWindCharge]
295/// - [DragonFireball]
296/// - [EndCrystal]
297/// - [EvokerFangs]
298/// - [ExperienceOrb]
299/// - [EyeOfEnder]
300/// - [FallingBlock]
301/// - [Fireball]
302/// - [FireworkRocket]
303/// - [FishingBobber]
304/// - [Interaction]
305/// - [Item]
306/// - [ItemFrame]
307///   - [GlowItemFrame]
308/// - [LeashKnot]
309/// - [LightningBolt]
310/// - [LlamaSpit]
311/// - [Marker]
312/// - [OminousItemSpawner]
313/// - [Painting]
314/// - [ShulkerBullet]
315/// - [SmallFireball]
316/// - [Tnt]
317/// - [WindCharge]
318/// - [WitherSkull]
319/// - [AbstractArrow]
320///   - [Arrow]
321///   - [SpectralArrow]
322///   - [Trident]
323/// - [AbstractDisplay]
324///   - [BlockDisplay]
325///   - [ItemDisplay]
326///   - [TextDisplay]
327/// - [AbstractLiving]
328///   - [ArmorStand]
329///   - [AbstractAvatar]
330///     - [Mannequin]
331///     - [Player]
332///   - [AbstractInsentient]
333///     - [Bat]
334///     - [EnderDragon]
335///     - [Ghast]
336///     - [Phantom]
337///     - [Slime]
338///       - [MagmaCube]
339///     - [AbstractCreature]
340///       - [Allay]
341///       - [CopperGolem]
342///       - [IronGolem]
343///       - [Pufferfish]
344///       - [Shulker]
345///       - [SnowGolem]
346///       - [Tadpole]
347///       - [AbstractAgeable]
348///         - [Dolphin]
349///         - [Squid]
350///           - [GlowSquid]
351///         - [AbstractAnimal]
352///           - [Armadillo]
353///           - [Axolotl]
354///           - [Bee]
355///           - [Chicken]
356///           - [Cow]
357///           - [Fox]
358///           - [Frog]
359///           - [Goat]
360///           - [HappyGhast]
361///           - [Hoglin]
362///           - [Mooshroom]
363///           - [Ocelot]
364///           - [Panda]
365///           - [Pig]
366///           - [PolarBear]
367///           - [Rabbit]
368///           - [Sheep]
369///           - [Sniffer]
370///           - [Strider]
371///           - [Turtle]
372///           - [AbstractHorse]
373///             - [Camel]
374///               - [CamelHusk]
375///             - [Horse]
376///             - [SkeletonHorse]
377///             - [ZombieHorse]
378///             - [AbstractChestedHorse]
379///               - [Donkey]
380///               - [Llama]
381///                 - [TraderLlama]
382///               - [Mule]
383///           - [AbstractTameable]
384///             - [Cat]
385///             - [Nautilus]
386///             - [Parrot]
387///             - [Wolf]
388///             - [ZombieNautilus]
389///         - [AbstractVillager]
390///           - [Villager]
391///           - [WanderingTrader]
392///       - [AbstractFish]
393///         - [Cod]
394///         - [Salmon]
395///         - [TropicalFish]
396///       - [AbstractMonster]
397///         - [Blaze]
398///         - [Bogged]
399///         - [Breeze]
400///         - [Creaking]
401///         - [Creeper]
402///         - [Enderman]
403///         - [Endermite]
404///         - [Giant]
405///         - [Guardian]
406///           - [ElderGuardian]
407///         - [Parched]
408///         - [Silverfish]
409///         - [Skeleton]
410///         - [Spider]
411///           - [CaveSpider]
412///         - [Stray]
413///         - [Vex]
414///         - [Warden]
415///         - [Wither]
416///         - [WitherSkeleton]
417///         - [Zoglin]
418///         - [Zombie]
419///           - [Drowned]
420///           - [Husk]
421///           - [ZombieVillager]
422///           - [ZombifiedPiglin]
423///         - [AbstractPiglin]
424///           - [Piglin]
425///           - [PiglinBrute]
426///         - [AbstractRaider]
427///           - [Pillager]
428///           - [Ravager]
429///           - [Vindicator]
430///           - [Witch]
431///           - [AbstractSpellcasterIllager]
432///             - [Evoker]
433///             - [Illusioner]
434/// - [AbstractThrownItemProjectile]
435///   - [Egg]
436///   - [EnderPearl]
437///   - [ExperienceBottle]
438///   - [LingeringPotion]
439///   - [Snowball]
440///   - [SplashPotion]
441/// - [AbstractVehicle]
442///   - [AbstractBoat]
443///     - [AcaciaBoat]
444///     - [AcaciaChestBoat]
445///     - [BambooChestRaft]
446///     - [BambooRaft]
447///     - [BirchBoat]
448///     - [BirchChestBoat]
449///     - [CherryBoat]
450///     - [CherryChestBoat]
451///     - [DarkOakBoat]
452///     - [DarkOakChestBoat]
453///     - [JungleBoat]
454///     - [JungleChestBoat]
455///     - [MangroveBoat]
456///     - [MangroveChestBoat]
457///     - [OakBoat]
458///     - [OakChestBoat]
459///     - [PaleOakBoat]
460///     - [PaleOakChestBoat]
461///     - [SpruceBoat]
462///     - [SpruceChestBoat]
463///   - [AbstractMinecart]
464///     - [ChestMinecart]
465///     - [CommandBlockMinecart]
466///     - [FurnaceMinecart]
467///     - [HopperMinecart]
468///     - [Minecart]
469///     - [SpawnerMinecart]
470///     - [TntMinecart]
471#[derive(Component)]
472pub struct AbstractEntity;
473impl AbstractEntity {
474    fn apply_metadata(
475        entity: &mut bevy_ecs::system::EntityCommands,
476        d: EntityDataItem,
477    ) -> Result<(), UpdateMetadataError> {
478        match d.index {
479            0 => {
480                let bitfield = d.value.into_byte()?;
481                entity.insert(OnFire(bitfield & 0x1 != 0));
482                entity.insert(AbstractEntityShiftKeyDown(bitfield & 0x2 != 0));
483                entity.insert(Sprinting(bitfield & 0x8 != 0));
484                entity.insert(Swimming(bitfield & 0x10 != 0));
485                entity.insert(CurrentlyGlowing(bitfield & 0x40 != 0));
486                entity.insert(Invisible(bitfield & 0x20 != 0));
487                entity.insert(FallFlying(bitfield & 0x80 != 0));
488            }
489            1 => {
490                entity.insert(AirSupply(d.value.into_int()?));
491            }
492            2 => {
493                entity.insert(CustomName(d.value.into_optional_formatted_text()?));
494            }
495            3 => {
496                entity.insert(CustomNameVisible(d.value.into_boolean()?));
497            }
498            4 => {
499                entity.insert(Silent(d.value.into_boolean()?));
500            }
501            5 => {
502                entity.insert(NoGravity(d.value.into_boolean()?));
503            }
504            6 => {
505                entity.insert(d.value.into_pose()?);
506            }
507            7 => {
508                entity.insert(TicksFrozen(d.value.into_int()?));
509            }
510            _ => {}
511        }
512        Ok(())
513    }
514}
515
516/// The metadata bundle for [AbstractEntity].
517///
518/// This type should generally not be used directly.
519#[derive(Bundle)]
520pub struct AbstractEntityMetadataBundle {
521    _marker: AbstractEntity,
522    on_fire: OnFire,
523    abstract_entity_shift_key_down: AbstractEntityShiftKeyDown,
524    sprinting: Sprinting,
525    swimming: Swimming,
526    currently_glowing: CurrentlyGlowing,
527    invisible: Invisible,
528    fall_flying: FallFlying,
529    air_supply: AirSupply,
530    custom_name: CustomName,
531    custom_name_visible: CustomNameVisible,
532    silent: Silent,
533    no_gravity: NoGravity,
534    pose: Pose,
535    ticks_frozen: TicksFrozen,
536}
537impl Default for AbstractEntityMetadataBundle {
538    fn default() -> Self {
539        Self {
540            _marker: AbstractEntity,
541            on_fire: OnFire(false),
542            abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
543            sprinting: Sprinting(false),
544            swimming: Swimming(false),
545            currently_glowing: CurrentlyGlowing(false),
546            invisible: Invisible(false),
547            fall_flying: FallFlying(false),
548            air_supply: AirSupply(Default::default()),
549            custom_name: CustomName(Default::default()),
550            custom_name_visible: CustomNameVisible(Default::default()),
551            silent: Silent(Default::default()),
552            no_gravity: NoGravity(Default::default()),
553            pose: Pose::default(),
554            ticks_frozen: TicksFrozen(Default::default()),
555        }
556    }
557}
558
559/// A metadata field for [AreaEffectCloud].
560#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
561pub struct Radius(pub f32);
562/// A metadata field for [AreaEffectCloud].
563#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
564pub struct Waiting(pub bool);
565/// The marker component for entities of type `minecraft:area_effect_cloud`.
566///
567/// # Metadata
568///
569/// These are the metadata components that all `AreaEffectCloud` entities are
570/// guaranteed to have, in addition to the metadata components from parent
571/// types:
572///
573/// - [Radius]
574/// - [Waiting]
575///
576/// # Parents
577///
578/// Entities with `AreaEffectCloud` will also have the following marker
579/// components and their metadata fields:
580///
581/// - [AbstractEntity]
582///
583/// # Children
584///
585/// This entity type has no children types.
586#[derive(Component)]
587pub struct AreaEffectCloud;
588impl AreaEffectCloud {
589    fn apply_metadata(
590        entity: &mut bevy_ecs::system::EntityCommands,
591        d: EntityDataItem,
592    ) -> Result<(), UpdateMetadataError> {
593        match d.index {
594            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
595            8 => {
596                entity.insert(Radius(d.value.into_float()?));
597            }
598            9 => {
599                entity.insert(Waiting(d.value.into_boolean()?));
600            }
601            10 => {
602                entity.insert(d.value.into_particle()?);
603            }
604            _ => {}
605        }
606        Ok(())
607    }
608}
609
610/// The metadata bundle for [AreaEffectCloud].
611///
612/// This type should generally not be used directly.
613#[derive(Bundle)]
614pub struct AreaEffectCloudMetadataBundle {
615    _marker: AreaEffectCloud,
616    parent: AbstractEntityMetadataBundle,
617    radius: Radius,
618    waiting: Waiting,
619    particle: Particle,
620}
621impl Default for AreaEffectCloudMetadataBundle {
622    fn default() -> Self {
623        Self {
624            _marker: AreaEffectCloud,
625            parent: Default::default(),
626            radius: Radius(3.0),
627            waiting: Waiting(false),
628            particle: Particle::default(),
629        }
630    }
631}
632
633/// The marker component for entities of type `minecraft:breeze_wind_charge`.
634///
635/// # Metadata
636///
637/// This entity type does not add any additional metadata. It will still have
638/// metadata from parent types.
639///
640/// # Parents
641///
642/// Entities with `BreezeWindCharge` will also have the following marker
643/// components and their metadata fields:
644///
645/// - [AbstractEntity]
646///
647/// # Children
648///
649/// This entity type has no children types.
650#[derive(Component)]
651pub struct BreezeWindCharge;
652impl BreezeWindCharge {
653    fn apply_metadata(
654        entity: &mut bevy_ecs::system::EntityCommands,
655        d: EntityDataItem,
656    ) -> Result<(), UpdateMetadataError> {
657        match d.index {
658            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
659            _ => {}
660        }
661        Ok(())
662    }
663}
664
665/// The metadata bundle for [BreezeWindCharge].
666///
667/// This type should generally not be used directly.
668#[derive(Bundle)]
669pub struct BreezeWindChargeMetadataBundle {
670    _marker: BreezeWindCharge,
671    parent: AbstractEntityMetadataBundle,
672}
673impl Default for BreezeWindChargeMetadataBundle {
674    fn default() -> Self {
675        Self {
676            _marker: BreezeWindCharge,
677            parent: Default::default(),
678        }
679    }
680}
681
682/// The marker component for entities of type `minecraft:dragon_fireball`.
683///
684/// # Metadata
685///
686/// This entity type does not add any additional metadata. It will still have
687/// metadata from parent types.
688///
689/// # Parents
690///
691/// Entities with `DragonFireball` will also have the following marker
692/// components and their metadata fields:
693///
694/// - [AbstractEntity]
695///
696/// # Children
697///
698/// This entity type has no children types.
699#[derive(Component)]
700pub struct DragonFireball;
701impl DragonFireball {
702    fn apply_metadata(
703        entity: &mut bevy_ecs::system::EntityCommands,
704        d: EntityDataItem,
705    ) -> Result<(), UpdateMetadataError> {
706        match d.index {
707            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
708            _ => {}
709        }
710        Ok(())
711    }
712}
713
714/// The metadata bundle for [DragonFireball].
715///
716/// This type should generally not be used directly.
717#[derive(Bundle)]
718pub struct DragonFireballMetadataBundle {
719    _marker: DragonFireball,
720    parent: AbstractEntityMetadataBundle,
721}
722impl Default for DragonFireballMetadataBundle {
723    fn default() -> Self {
724        Self {
725            _marker: DragonFireball,
726            parent: Default::default(),
727        }
728    }
729}
730
731/// A metadata field for [EndCrystal].
732#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
733pub struct BeamTarget(pub Option<BlockPos>);
734/// A metadata field for [EndCrystal].
735#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
736pub struct ShowBottom(pub bool);
737/// The marker component for entities of type `minecraft:end_crystal`.
738///
739/// # Metadata
740///
741/// These are the metadata components that all `EndCrystal` entities are
742/// guaranteed to have, in addition to the metadata components from parent
743/// types:
744///
745/// - [BeamTarget]
746/// - [ShowBottom]
747///
748/// # Parents
749///
750/// Entities with `EndCrystal` will also have the following marker components
751/// and their metadata fields:
752///
753/// - [AbstractEntity]
754///
755/// # Children
756///
757/// This entity type has no children types.
758#[derive(Component)]
759pub struct EndCrystal;
760impl EndCrystal {
761    fn apply_metadata(
762        entity: &mut bevy_ecs::system::EntityCommands,
763        d: EntityDataItem,
764    ) -> Result<(), UpdateMetadataError> {
765        match d.index {
766            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
767            8 => {
768                entity.insert(BeamTarget(d.value.into_optional_block_pos()?));
769            }
770            9 => {
771                entity.insert(ShowBottom(d.value.into_boolean()?));
772            }
773            _ => {}
774        }
775        Ok(())
776    }
777}
778
779/// The metadata bundle for [EndCrystal].
780///
781/// This type should generally not be used directly.
782#[derive(Bundle)]
783pub struct EndCrystalMetadataBundle {
784    _marker: EndCrystal,
785    parent: AbstractEntityMetadataBundle,
786    beam_target: BeamTarget,
787    show_bottom: ShowBottom,
788}
789impl Default for EndCrystalMetadataBundle {
790    fn default() -> Self {
791        Self {
792            _marker: EndCrystal,
793            parent: Default::default(),
794            beam_target: BeamTarget(None),
795            show_bottom: ShowBottom(true),
796        }
797    }
798}
799
800/// The marker component for entities of type `minecraft:evoker_fangs`.
801///
802/// # Metadata
803///
804/// This entity type does not add any additional metadata. It will still have
805/// metadata from parent types.
806///
807/// # Parents
808///
809/// Entities with `EvokerFangs` will also have the following marker components
810/// and their metadata fields:
811///
812/// - [AbstractEntity]
813///
814/// # Children
815///
816/// This entity type has no children types.
817#[derive(Component)]
818pub struct EvokerFangs;
819impl EvokerFangs {
820    fn apply_metadata(
821        entity: &mut bevy_ecs::system::EntityCommands,
822        d: EntityDataItem,
823    ) -> Result<(), UpdateMetadataError> {
824        match d.index {
825            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
826            _ => {}
827        }
828        Ok(())
829    }
830}
831
832/// The metadata bundle for [EvokerFangs].
833///
834/// This type should generally not be used directly.
835#[derive(Bundle)]
836pub struct EvokerFangsMetadataBundle {
837    _marker: EvokerFangs,
838    parent: AbstractEntityMetadataBundle,
839}
840impl Default for EvokerFangsMetadataBundle {
841    fn default() -> Self {
842        Self {
843            _marker: EvokerFangs,
844            parent: Default::default(),
845        }
846    }
847}
848
849/// A metadata field for [ExperienceOrb].
850#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
851pub struct Value(pub i32);
852/// The marker component for entities of type `minecraft:experience_orb`.
853///
854/// # Metadata
855///
856/// These are the metadata components that all `ExperienceOrb` entities are
857/// guaranteed to have, in addition to the metadata components from parent
858/// types:
859///
860/// - [Value]
861///
862/// # Parents
863///
864/// Entities with `ExperienceOrb` will also have the following marker components
865/// and their metadata fields:
866///
867/// - [AbstractEntity]
868///
869/// # Children
870///
871/// This entity type has no children types.
872#[derive(Component)]
873pub struct ExperienceOrb;
874impl ExperienceOrb {
875    fn apply_metadata(
876        entity: &mut bevy_ecs::system::EntityCommands,
877        d: EntityDataItem,
878    ) -> Result<(), UpdateMetadataError> {
879        match d.index {
880            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
881            8 => {
882                entity.insert(Value(d.value.into_int()?));
883            }
884            _ => {}
885        }
886        Ok(())
887    }
888}
889
890/// The metadata bundle for [ExperienceOrb].
891///
892/// This type should generally not be used directly.
893#[derive(Bundle)]
894pub struct ExperienceOrbMetadataBundle {
895    _marker: ExperienceOrb,
896    parent: AbstractEntityMetadataBundle,
897    value: Value,
898}
899impl Default for ExperienceOrbMetadataBundle {
900    fn default() -> Self {
901        Self {
902            _marker: ExperienceOrb,
903            parent: Default::default(),
904            value: Value(0),
905        }
906    }
907}
908
909/// A metadata field for [EyeOfEnder].
910#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
911pub struct EyeOfEnderItemStack(pub ItemStack);
912/// The marker component for entities of type `minecraft:eye_of_ender`.
913///
914/// # Metadata
915///
916/// These are the metadata components that all `EyeOfEnder` entities are
917/// guaranteed to have, in addition to the metadata components from parent
918/// types:
919///
920/// - [EyeOfEnderItemStack]
921///
922/// # Parents
923///
924/// Entities with `EyeOfEnder` will also have the following marker components
925/// and their metadata fields:
926///
927/// - [AbstractEntity]
928///
929/// # Children
930///
931/// This entity type has no children types.
932#[derive(Component)]
933pub struct EyeOfEnder;
934impl EyeOfEnder {
935    fn apply_metadata(
936        entity: &mut bevy_ecs::system::EntityCommands,
937        d: EntityDataItem,
938    ) -> Result<(), UpdateMetadataError> {
939        match d.index {
940            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
941            8 => {
942                entity.insert(EyeOfEnderItemStack(d.value.into_item_stack()?));
943            }
944            _ => {}
945        }
946        Ok(())
947    }
948}
949
950/// The metadata bundle for [EyeOfEnder].
951///
952/// This type should generally not be used directly.
953#[derive(Bundle)]
954pub struct EyeOfEnderMetadataBundle {
955    _marker: EyeOfEnder,
956    parent: AbstractEntityMetadataBundle,
957    eye_of_ender_item_stack: EyeOfEnderItemStack,
958}
959impl Default for EyeOfEnderMetadataBundle {
960    fn default() -> Self {
961        Self {
962            _marker: EyeOfEnder,
963            parent: Default::default(),
964            eye_of_ender_item_stack: EyeOfEnderItemStack(Default::default()),
965        }
966    }
967}
968
969/// A metadata field for [FallingBlock].
970#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
971pub struct StartPos(pub BlockPos);
972/// The marker component for entities of type `minecraft:falling_block`.
973///
974/// # Metadata
975///
976/// These are the metadata components that all `FallingBlock` entities are
977/// guaranteed to have, in addition to the metadata components from parent
978/// types:
979///
980/// - [StartPos]
981///
982/// # Parents
983///
984/// Entities with `FallingBlock` will also have the following marker components
985/// and their metadata fields:
986///
987/// - [AbstractEntity]
988///
989/// # Children
990///
991/// This entity type has no children types.
992#[derive(Component)]
993pub struct FallingBlock;
994impl FallingBlock {
995    fn apply_metadata(
996        entity: &mut bevy_ecs::system::EntityCommands,
997        d: EntityDataItem,
998    ) -> Result<(), UpdateMetadataError> {
999        match d.index {
1000            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1001            8 => {
1002                entity.insert(StartPos(d.value.into_block_pos()?));
1003            }
1004            _ => {}
1005        }
1006        Ok(())
1007    }
1008}
1009
1010/// The metadata bundle for [FallingBlock].
1011///
1012/// This type should generally not be used directly.
1013#[derive(Bundle)]
1014pub struct FallingBlockMetadataBundle {
1015    _marker: FallingBlock,
1016    parent: AbstractEntityMetadataBundle,
1017    start_pos: StartPos,
1018}
1019impl Default for FallingBlockMetadataBundle {
1020    fn default() -> Self {
1021        Self {
1022            _marker: FallingBlock,
1023            parent: Default::default(),
1024            start_pos: StartPos(BlockPos::new(0, 0, 0)),
1025        }
1026    }
1027}
1028
1029/// A metadata field for [Fireball].
1030#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1031pub struct FireballItemStack(pub ItemStack);
1032/// The marker component for entities of type `minecraft:fireball`.
1033///
1034/// # Metadata
1035///
1036/// These are the metadata components that all `Fireball` entities are
1037/// guaranteed to have, in addition to the metadata components from parent
1038/// types:
1039///
1040/// - [FireballItemStack]
1041///
1042/// # Parents
1043///
1044/// Entities with `Fireball` will also have the following marker components and
1045/// their metadata fields:
1046///
1047/// - [AbstractEntity]
1048///
1049/// # Children
1050///
1051/// This entity type has no children types.
1052#[derive(Component)]
1053pub struct Fireball;
1054impl Fireball {
1055    fn apply_metadata(
1056        entity: &mut bevy_ecs::system::EntityCommands,
1057        d: EntityDataItem,
1058    ) -> Result<(), UpdateMetadataError> {
1059        match d.index {
1060            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1061            8 => {
1062                entity.insert(FireballItemStack(d.value.into_item_stack()?));
1063            }
1064            _ => {}
1065        }
1066        Ok(())
1067    }
1068}
1069
1070/// The metadata bundle for [Fireball].
1071///
1072/// This type should generally not be used directly.
1073#[derive(Bundle)]
1074pub struct FireballMetadataBundle {
1075    _marker: Fireball,
1076    parent: AbstractEntityMetadataBundle,
1077    fireball_item_stack: FireballItemStack,
1078}
1079impl Default for FireballMetadataBundle {
1080    fn default() -> Self {
1081        Self {
1082            _marker: Fireball,
1083            parent: Default::default(),
1084            fireball_item_stack: FireballItemStack(Default::default()),
1085        }
1086    }
1087}
1088
1089/// A metadata field for [FireworkRocket].
1090#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1091pub struct FireworksItem(pub ItemStack);
1092/// A metadata field for [FireworkRocket].
1093#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1094pub struct AttachedToTarget(pub OptionalUnsignedInt);
1095/// A metadata field for [FireworkRocket].
1096#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1097pub struct ShotAtAngle(pub bool);
1098/// The marker component for entities of type `minecraft:firework_rocket`.
1099///
1100/// # Metadata
1101///
1102/// These are the metadata components that all `FireworkRocket` entities are
1103/// guaranteed to have, in addition to the metadata components from parent
1104/// types:
1105///
1106/// - [FireworksItem]
1107/// - [AttachedToTarget]
1108/// - [ShotAtAngle]
1109///
1110/// # Parents
1111///
1112/// Entities with `FireworkRocket` will also have the following marker
1113/// components and their metadata fields:
1114///
1115/// - [AbstractEntity]
1116///
1117/// # Children
1118///
1119/// This entity type has no children types.
1120#[derive(Component)]
1121pub struct FireworkRocket;
1122impl FireworkRocket {
1123    fn apply_metadata(
1124        entity: &mut bevy_ecs::system::EntityCommands,
1125        d: EntityDataItem,
1126    ) -> Result<(), UpdateMetadataError> {
1127        match d.index {
1128            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1129            8 => {
1130                entity.insert(FireworksItem(d.value.into_item_stack()?));
1131            }
1132            9 => {
1133                entity.insert(AttachedToTarget(d.value.into_optional_unsigned_int()?));
1134            }
1135            10 => {
1136                entity.insert(ShotAtAngle(d.value.into_boolean()?));
1137            }
1138            _ => {}
1139        }
1140        Ok(())
1141    }
1142}
1143
1144/// The metadata bundle for [FireworkRocket].
1145///
1146/// This type should generally not be used directly.
1147#[derive(Bundle)]
1148pub struct FireworkRocketMetadataBundle {
1149    _marker: FireworkRocket,
1150    parent: AbstractEntityMetadataBundle,
1151    fireworks_item: FireworksItem,
1152    attached_to_target: AttachedToTarget,
1153    shot_at_angle: ShotAtAngle,
1154}
1155impl Default for FireworkRocketMetadataBundle {
1156    fn default() -> Self {
1157        Self {
1158            _marker: FireworkRocket,
1159            parent: Default::default(),
1160            fireworks_item: FireworksItem(Default::default()),
1161            attached_to_target: AttachedToTarget(OptionalUnsignedInt(None)),
1162            shot_at_angle: ShotAtAngle(false),
1163        }
1164    }
1165}
1166
1167/// A metadata field for [FishingBobber].
1168#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1169pub struct HookedEntity(pub i32);
1170/// A metadata field for [FishingBobber].
1171#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1172pub struct Biting(pub bool);
1173/// The marker component for entities of type `minecraft:fishing_bobber`.
1174///
1175/// # Metadata
1176///
1177/// These are the metadata components that all `FishingBobber` entities are
1178/// guaranteed to have, in addition to the metadata components from parent
1179/// types:
1180///
1181/// - [HookedEntity]
1182/// - [Biting]
1183///
1184/// # Parents
1185///
1186/// Entities with `FishingBobber` will also have the following marker components
1187/// and their metadata fields:
1188///
1189/// - [AbstractEntity]
1190///
1191/// # Children
1192///
1193/// This entity type has no children types.
1194#[derive(Component)]
1195pub struct FishingBobber;
1196impl FishingBobber {
1197    fn apply_metadata(
1198        entity: &mut bevy_ecs::system::EntityCommands,
1199        d: EntityDataItem,
1200    ) -> Result<(), UpdateMetadataError> {
1201        match d.index {
1202            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1203            8 => {
1204                entity.insert(HookedEntity(d.value.into_int()?));
1205            }
1206            9 => {
1207                entity.insert(Biting(d.value.into_boolean()?));
1208            }
1209            _ => {}
1210        }
1211        Ok(())
1212    }
1213}
1214
1215/// The metadata bundle for [FishingBobber].
1216///
1217/// This type should generally not be used directly.
1218#[derive(Bundle)]
1219pub struct FishingBobberMetadataBundle {
1220    _marker: FishingBobber,
1221    parent: AbstractEntityMetadataBundle,
1222    hooked_entity: HookedEntity,
1223    biting: Biting,
1224}
1225impl Default for FishingBobberMetadataBundle {
1226    fn default() -> Self {
1227        Self {
1228            _marker: FishingBobber,
1229            parent: Default::default(),
1230            hooked_entity: HookedEntity(0),
1231            biting: Biting(false),
1232        }
1233    }
1234}
1235
1236/// A metadata field for [Interaction].
1237#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1238pub struct InteractionWidth(pub f32);
1239/// A metadata field for [Interaction].
1240#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1241pub struct InteractionHeight(pub f32);
1242/// A metadata field for [Interaction].
1243#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1244pub struct Response(pub bool);
1245/// The marker component for entities of type `minecraft:interaction`.
1246///
1247/// # Metadata
1248///
1249/// These are the metadata components that all `Interaction` entities are
1250/// guaranteed to have, in addition to the metadata components from parent
1251/// types:
1252///
1253/// - [InteractionWidth]
1254/// - [InteractionHeight]
1255/// - [Response]
1256///
1257/// # Parents
1258///
1259/// Entities with `Interaction` will also have the following marker components
1260/// and their metadata fields:
1261///
1262/// - [AbstractEntity]
1263///
1264/// # Children
1265///
1266/// This entity type has no children types.
1267#[derive(Component)]
1268pub struct Interaction;
1269impl Interaction {
1270    fn apply_metadata(
1271        entity: &mut bevy_ecs::system::EntityCommands,
1272        d: EntityDataItem,
1273    ) -> Result<(), UpdateMetadataError> {
1274        match d.index {
1275            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1276            8 => {
1277                entity.insert(InteractionWidth(d.value.into_float()?));
1278            }
1279            9 => {
1280                entity.insert(InteractionHeight(d.value.into_float()?));
1281            }
1282            10 => {
1283                entity.insert(Response(d.value.into_boolean()?));
1284            }
1285            _ => {}
1286        }
1287        Ok(())
1288    }
1289}
1290
1291/// The metadata bundle for [Interaction].
1292///
1293/// This type should generally not be used directly.
1294#[derive(Bundle)]
1295pub struct InteractionMetadataBundle {
1296    _marker: Interaction,
1297    parent: AbstractEntityMetadataBundle,
1298    interaction_width: InteractionWidth,
1299    interaction_height: InteractionHeight,
1300    response: Response,
1301}
1302impl Default for InteractionMetadataBundle {
1303    fn default() -> Self {
1304        Self {
1305            _marker: Interaction,
1306            parent: Default::default(),
1307            interaction_width: InteractionWidth(1.0),
1308            interaction_height: InteractionHeight(1.0),
1309            response: Response(false),
1310        }
1311    }
1312}
1313
1314/// A metadata field for [Item].
1315#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1316pub struct ItemItem(pub ItemStack);
1317/// The marker component for entities of type `minecraft:item`.
1318///
1319/// # Metadata
1320///
1321/// These are the metadata components that all `Item` entities are guaranteed to
1322/// have, in addition to the metadata components from parent types:
1323///
1324/// - [ItemItem]
1325///
1326/// # Parents
1327///
1328/// Entities with `Item` will also have the following marker components and
1329/// their metadata fields:
1330///
1331/// - [AbstractEntity]
1332///
1333/// # Children
1334///
1335/// This entity type has no children types.
1336#[derive(Component)]
1337pub struct Item;
1338impl Item {
1339    fn apply_metadata(
1340        entity: &mut bevy_ecs::system::EntityCommands,
1341        d: EntityDataItem,
1342    ) -> Result<(), UpdateMetadataError> {
1343        match d.index {
1344            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1345            8 => {
1346                entity.insert(ItemItem(d.value.into_item_stack()?));
1347            }
1348            _ => {}
1349        }
1350        Ok(())
1351    }
1352}
1353
1354/// The metadata bundle for [Item].
1355///
1356/// This type should generally not be used directly.
1357#[derive(Bundle)]
1358pub struct ItemMetadataBundle {
1359    _marker: Item,
1360    parent: AbstractEntityMetadataBundle,
1361    item_item: ItemItem,
1362}
1363impl Default for ItemMetadataBundle {
1364    fn default() -> Self {
1365        Self {
1366            _marker: Item,
1367            parent: Default::default(),
1368            item_item: ItemItem(Default::default()),
1369        }
1370    }
1371}
1372
1373/// A metadata field for [ItemFrame].
1374#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1375pub struct ItemFrameDirection(pub Direction);
1376/// A metadata field for [ItemFrame].
1377#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1378pub struct ItemFrameItem(pub ItemStack);
1379/// A metadata field for [ItemFrame].
1380#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1381pub struct Rotation(pub i32);
1382/// The marker component for entities of type `minecraft:item_frame`.
1383///
1384/// # Metadata
1385///
1386/// These are the metadata components that all `ItemFrame` entities are
1387/// guaranteed to have, in addition to the metadata components from parent
1388/// types:
1389///
1390/// - [ItemFrameDirection]
1391/// - [ItemFrameItem]
1392/// - [Rotation]
1393///
1394/// # Parents
1395///
1396/// Entities with `ItemFrame` will also have the following marker components and
1397/// their metadata fields:
1398///
1399/// - [AbstractEntity]
1400///
1401/// # Children
1402///
1403/// - [GlowItemFrame]
1404#[derive(Component)]
1405pub struct ItemFrame;
1406impl ItemFrame {
1407    fn apply_metadata(
1408        entity: &mut bevy_ecs::system::EntityCommands,
1409        d: EntityDataItem,
1410    ) -> Result<(), UpdateMetadataError> {
1411        match d.index {
1412            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1413            8 => {
1414                entity.insert(ItemFrameDirection(d.value.into_direction()?));
1415            }
1416            9 => {
1417                entity.insert(ItemFrameItem(d.value.into_item_stack()?));
1418            }
1419            10 => {
1420                entity.insert(Rotation(d.value.into_int()?));
1421            }
1422            _ => {}
1423        }
1424        Ok(())
1425    }
1426}
1427
1428/// The metadata bundle for [ItemFrame].
1429///
1430/// This type should generally not be used directly.
1431#[derive(Bundle)]
1432pub struct ItemFrameMetadataBundle {
1433    _marker: ItemFrame,
1434    parent: AbstractEntityMetadataBundle,
1435    item_frame_direction: ItemFrameDirection,
1436    item_frame_item: ItemFrameItem,
1437    rotation: Rotation,
1438}
1439impl Default for ItemFrameMetadataBundle {
1440    fn default() -> Self {
1441        Self {
1442            _marker: ItemFrame,
1443            parent: Default::default(),
1444            item_frame_direction: ItemFrameDirection(Default::default()),
1445            item_frame_item: ItemFrameItem(Default::default()),
1446            rotation: Rotation(0),
1447        }
1448    }
1449}
1450
1451/// The marker component for entities of type `minecraft:glow_item_frame`.
1452///
1453/// # Metadata
1454///
1455/// This entity type does not add any additional metadata. It will still have
1456/// metadata from parent types.
1457///
1458/// # Parents
1459///
1460/// Entities with `GlowItemFrame` will also have the following marker components
1461/// and their metadata fields:
1462///
1463/// - [ItemFrame]
1464/// - [AbstractEntity]
1465///
1466/// # Children
1467///
1468/// This entity type has no children types.
1469#[derive(Component)]
1470pub struct GlowItemFrame;
1471impl GlowItemFrame {
1472    fn apply_metadata(
1473        entity: &mut bevy_ecs::system::EntityCommands,
1474        d: EntityDataItem,
1475    ) -> Result<(), UpdateMetadataError> {
1476        match d.index {
1477            0..=10 => ItemFrame::apply_metadata(entity, d)?,
1478            _ => {}
1479        }
1480        Ok(())
1481    }
1482}
1483
1484/// The metadata bundle for [GlowItemFrame].
1485///
1486/// This type should generally not be used directly.
1487#[derive(Bundle)]
1488pub struct GlowItemFrameMetadataBundle {
1489    _marker: GlowItemFrame,
1490    parent: ItemFrameMetadataBundle,
1491}
1492impl Default for GlowItemFrameMetadataBundle {
1493    fn default() -> Self {
1494        Self {
1495            _marker: GlowItemFrame,
1496            parent: Default::default(),
1497        }
1498    }
1499}
1500
1501/// The marker component for entities of type `minecraft:leash_knot`.
1502///
1503/// # Metadata
1504///
1505/// This entity type does not add any additional metadata. It will still have
1506/// metadata from parent types.
1507///
1508/// # Parents
1509///
1510/// Entities with `LeashKnot` will also have the following marker components and
1511/// their metadata fields:
1512///
1513/// - [AbstractEntity]
1514///
1515/// # Children
1516///
1517/// This entity type has no children types.
1518#[derive(Component)]
1519pub struct LeashKnot;
1520impl LeashKnot {
1521    fn apply_metadata(
1522        entity: &mut bevy_ecs::system::EntityCommands,
1523        d: EntityDataItem,
1524    ) -> Result<(), UpdateMetadataError> {
1525        match d.index {
1526            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1527            _ => {}
1528        }
1529        Ok(())
1530    }
1531}
1532
1533/// The metadata bundle for [LeashKnot].
1534///
1535/// This type should generally not be used directly.
1536#[derive(Bundle)]
1537pub struct LeashKnotMetadataBundle {
1538    _marker: LeashKnot,
1539    parent: AbstractEntityMetadataBundle,
1540}
1541impl Default for LeashKnotMetadataBundle {
1542    fn default() -> Self {
1543        Self {
1544            _marker: LeashKnot,
1545            parent: Default::default(),
1546        }
1547    }
1548}
1549
1550/// The marker component for entities of type `minecraft:lightning_bolt`.
1551///
1552/// # Metadata
1553///
1554/// This entity type does not add any additional metadata. It will still have
1555/// metadata from parent types.
1556///
1557/// # Parents
1558///
1559/// Entities with `LightningBolt` will also have the following marker components
1560/// and their metadata fields:
1561///
1562/// - [AbstractEntity]
1563///
1564/// # Children
1565///
1566/// This entity type has no children types.
1567#[derive(Component)]
1568pub struct LightningBolt;
1569impl LightningBolt {
1570    fn apply_metadata(
1571        entity: &mut bevy_ecs::system::EntityCommands,
1572        d: EntityDataItem,
1573    ) -> Result<(), UpdateMetadataError> {
1574        match d.index {
1575            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1576            _ => {}
1577        }
1578        Ok(())
1579    }
1580}
1581
1582/// The metadata bundle for [LightningBolt].
1583///
1584/// This type should generally not be used directly.
1585#[derive(Bundle)]
1586pub struct LightningBoltMetadataBundle {
1587    _marker: LightningBolt,
1588    parent: AbstractEntityMetadataBundle,
1589}
1590impl Default for LightningBoltMetadataBundle {
1591    fn default() -> Self {
1592        Self {
1593            _marker: LightningBolt,
1594            parent: Default::default(),
1595        }
1596    }
1597}
1598
1599/// The marker component for entities of type `minecraft:llama_spit`.
1600///
1601/// # Metadata
1602///
1603/// This entity type does not add any additional metadata. It will still have
1604/// metadata from parent types.
1605///
1606/// # Parents
1607///
1608/// Entities with `LlamaSpit` will also have the following marker components and
1609/// their metadata fields:
1610///
1611/// - [AbstractEntity]
1612///
1613/// # Children
1614///
1615/// This entity type has no children types.
1616#[derive(Component)]
1617pub struct LlamaSpit;
1618impl LlamaSpit {
1619    fn apply_metadata(
1620        entity: &mut bevy_ecs::system::EntityCommands,
1621        d: EntityDataItem,
1622    ) -> Result<(), UpdateMetadataError> {
1623        match d.index {
1624            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1625            _ => {}
1626        }
1627        Ok(())
1628    }
1629}
1630
1631/// The metadata bundle for [LlamaSpit].
1632///
1633/// This type should generally not be used directly.
1634#[derive(Bundle)]
1635pub struct LlamaSpitMetadataBundle {
1636    _marker: LlamaSpit,
1637    parent: AbstractEntityMetadataBundle,
1638}
1639impl Default for LlamaSpitMetadataBundle {
1640    fn default() -> Self {
1641        Self {
1642            _marker: LlamaSpit,
1643            parent: Default::default(),
1644        }
1645    }
1646}
1647
1648/// The marker component for entities of type `minecraft:marker`.
1649///
1650/// # Metadata
1651///
1652/// This entity type does not add any additional metadata. It will still have
1653/// metadata from parent types.
1654///
1655/// # Parents
1656///
1657/// Entities with `Marker` will also have the following marker components and
1658/// their metadata fields:
1659///
1660/// - [AbstractEntity]
1661///
1662/// # Children
1663///
1664/// This entity type has no children types.
1665#[derive(Component)]
1666pub struct Marker;
1667impl Marker {
1668    fn apply_metadata(
1669        entity: &mut bevy_ecs::system::EntityCommands,
1670        d: EntityDataItem,
1671    ) -> Result<(), UpdateMetadataError> {
1672        match d.index {
1673            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1674            _ => {}
1675        }
1676        Ok(())
1677    }
1678}
1679
1680/// The metadata bundle for [Marker].
1681///
1682/// This type should generally not be used directly.
1683#[derive(Bundle)]
1684pub struct MarkerMetadataBundle {
1685    _marker: Marker,
1686    parent: AbstractEntityMetadataBundle,
1687}
1688impl Default for MarkerMetadataBundle {
1689    fn default() -> Self {
1690        Self {
1691            _marker: Marker,
1692            parent: Default::default(),
1693        }
1694    }
1695}
1696
1697/// A metadata field for [OminousItemSpawner].
1698#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1699pub struct OminousItemSpawnerItem(pub ItemStack);
1700/// The marker component for entities of type `minecraft:ominous_item_spawner`.
1701///
1702/// # Metadata
1703///
1704/// These are the metadata components that all `OminousItemSpawner` entities are
1705/// guaranteed to have, in addition to the metadata components from parent
1706/// types:
1707///
1708/// - [OminousItemSpawnerItem]
1709///
1710/// # Parents
1711///
1712/// Entities with `OminousItemSpawner` will also have the following marker
1713/// components and their metadata fields:
1714///
1715/// - [AbstractEntity]
1716///
1717/// # Children
1718///
1719/// This entity type has no children types.
1720#[derive(Component)]
1721pub struct OminousItemSpawner;
1722impl OminousItemSpawner {
1723    fn apply_metadata(
1724        entity: &mut bevy_ecs::system::EntityCommands,
1725        d: EntityDataItem,
1726    ) -> Result<(), UpdateMetadataError> {
1727        match d.index {
1728            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1729            8 => {
1730                entity.insert(OminousItemSpawnerItem(d.value.into_item_stack()?));
1731            }
1732            _ => {}
1733        }
1734        Ok(())
1735    }
1736}
1737
1738/// The metadata bundle for [OminousItemSpawner].
1739///
1740/// This type should generally not be used directly.
1741#[derive(Bundle)]
1742pub struct OminousItemSpawnerMetadataBundle {
1743    _marker: OminousItemSpawner,
1744    parent: AbstractEntityMetadataBundle,
1745    ominous_item_spawner_item: OminousItemSpawnerItem,
1746}
1747impl Default for OminousItemSpawnerMetadataBundle {
1748    fn default() -> Self {
1749        Self {
1750            _marker: OminousItemSpawner,
1751            parent: Default::default(),
1752            ominous_item_spawner_item: OminousItemSpawnerItem(Default::default()),
1753        }
1754    }
1755}
1756
1757/// A metadata field for [Painting].
1758#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1759pub struct PaintingDirection(pub Direction);
1760/// A metadata field for [Painting].
1761#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1762pub struct PaintingVariant(pub azalea_registry::data::PaintingVariant);
1763/// The marker component for entities of type `minecraft:painting`.
1764///
1765/// # Metadata
1766///
1767/// These are the metadata components that all `Painting` entities are
1768/// guaranteed to have, in addition to the metadata components from parent
1769/// types:
1770///
1771/// - [PaintingDirection]
1772/// - [PaintingVariant]
1773///
1774/// # Parents
1775///
1776/// Entities with `Painting` will also have the following marker components and
1777/// their metadata fields:
1778///
1779/// - [AbstractEntity]
1780///
1781/// # Children
1782///
1783/// This entity type has no children types.
1784#[derive(Component)]
1785pub struct Painting;
1786impl Painting {
1787    fn apply_metadata(
1788        entity: &mut bevy_ecs::system::EntityCommands,
1789        d: EntityDataItem,
1790    ) -> Result<(), UpdateMetadataError> {
1791        match d.index {
1792            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1793            8 => {
1794                entity.insert(PaintingDirection(d.value.into_direction()?));
1795            }
1796            9 => {
1797                entity.insert(PaintingVariant(d.value.into_painting_variant()?));
1798            }
1799            _ => {}
1800        }
1801        Ok(())
1802    }
1803}
1804
1805/// The metadata bundle for [Painting].
1806///
1807/// This type should generally not be used directly.
1808#[derive(Bundle)]
1809pub struct PaintingMetadataBundle {
1810    _marker: Painting,
1811    parent: AbstractEntityMetadataBundle,
1812    painting_direction: PaintingDirection,
1813    painting_variant: PaintingVariant,
1814}
1815impl Default for PaintingMetadataBundle {
1816    fn default() -> Self {
1817        Self {
1818            _marker: Painting,
1819            parent: Default::default(),
1820            painting_direction: PaintingDirection(Default::default()),
1821            painting_variant: PaintingVariant(azalea_registry::data::PaintingVariant::new_raw(0)),
1822        }
1823    }
1824}
1825
1826/// The marker component for entities of type `minecraft:shulker_bullet`.
1827///
1828/// # Metadata
1829///
1830/// This entity type does not add any additional metadata. It will still have
1831/// metadata from parent types.
1832///
1833/// # Parents
1834///
1835/// Entities with `ShulkerBullet` will also have the following marker components
1836/// and their metadata fields:
1837///
1838/// - [AbstractEntity]
1839///
1840/// # Children
1841///
1842/// This entity type has no children types.
1843#[derive(Component)]
1844pub struct ShulkerBullet;
1845impl ShulkerBullet {
1846    fn apply_metadata(
1847        entity: &mut bevy_ecs::system::EntityCommands,
1848        d: EntityDataItem,
1849    ) -> Result<(), UpdateMetadataError> {
1850        match d.index {
1851            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1852            _ => {}
1853        }
1854        Ok(())
1855    }
1856}
1857
1858/// The metadata bundle for [ShulkerBullet].
1859///
1860/// This type should generally not be used directly.
1861#[derive(Bundle)]
1862pub struct ShulkerBulletMetadataBundle {
1863    _marker: ShulkerBullet,
1864    parent: AbstractEntityMetadataBundle,
1865}
1866impl Default for ShulkerBulletMetadataBundle {
1867    fn default() -> Self {
1868        Self {
1869            _marker: ShulkerBullet,
1870            parent: Default::default(),
1871        }
1872    }
1873}
1874
1875/// A metadata field for [SmallFireball].
1876#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1877pub struct SmallFireballItemStack(pub ItemStack);
1878/// The marker component for entities of type `minecraft:small_fireball`.
1879///
1880/// # Metadata
1881///
1882/// These are the metadata components that all `SmallFireball` entities are
1883/// guaranteed to have, in addition to the metadata components from parent
1884/// types:
1885///
1886/// - [SmallFireballItemStack]
1887///
1888/// # Parents
1889///
1890/// Entities with `SmallFireball` will also have the following marker components
1891/// and their metadata fields:
1892///
1893/// - [AbstractEntity]
1894///
1895/// # Children
1896///
1897/// This entity type has no children types.
1898#[derive(Component)]
1899pub struct SmallFireball;
1900impl SmallFireball {
1901    fn apply_metadata(
1902        entity: &mut bevy_ecs::system::EntityCommands,
1903        d: EntityDataItem,
1904    ) -> Result<(), UpdateMetadataError> {
1905        match d.index {
1906            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1907            8 => {
1908                entity.insert(SmallFireballItemStack(d.value.into_item_stack()?));
1909            }
1910            _ => {}
1911        }
1912        Ok(())
1913    }
1914}
1915
1916/// The metadata bundle for [SmallFireball].
1917///
1918/// This type should generally not be used directly.
1919#[derive(Bundle)]
1920pub struct SmallFireballMetadataBundle {
1921    _marker: SmallFireball,
1922    parent: AbstractEntityMetadataBundle,
1923    small_fireball_item_stack: SmallFireballItemStack,
1924}
1925impl Default for SmallFireballMetadataBundle {
1926    fn default() -> Self {
1927        Self {
1928            _marker: SmallFireball,
1929            parent: Default::default(),
1930            small_fireball_item_stack: SmallFireballItemStack(Default::default()),
1931        }
1932    }
1933}
1934
1935/// A metadata field for [Tnt].
1936#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1937pub struct Fuse(pub i32);
1938/// A metadata field for [Tnt].
1939#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1940pub struct TntBlockState(pub azalea_block::BlockState);
1941/// The marker component for entities of type `minecraft:tnt`.
1942///
1943/// # Metadata
1944///
1945/// These are the metadata components that all `Tnt` entities are guaranteed to
1946/// have, in addition to the metadata components from parent types:
1947///
1948/// - [Fuse]
1949/// - [TntBlockState]
1950///
1951/// # Parents
1952///
1953/// Entities with `Tnt` will also have the following marker components and their
1954/// metadata fields:
1955///
1956/// - [AbstractEntity]
1957///
1958/// # Children
1959///
1960/// This entity type has no children types.
1961#[derive(Component)]
1962pub struct Tnt;
1963impl Tnt {
1964    fn apply_metadata(
1965        entity: &mut bevy_ecs::system::EntityCommands,
1966        d: EntityDataItem,
1967    ) -> Result<(), UpdateMetadataError> {
1968        match d.index {
1969            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1970            8 => {
1971                entity.insert(Fuse(d.value.into_int()?));
1972            }
1973            9 => {
1974                entity.insert(TntBlockState(d.value.into_block_state()?));
1975            }
1976            _ => {}
1977        }
1978        Ok(())
1979    }
1980}
1981
1982/// The metadata bundle for [Tnt].
1983///
1984/// This type should generally not be used directly.
1985#[derive(Bundle)]
1986pub struct TntMetadataBundle {
1987    _marker: Tnt,
1988    parent: AbstractEntityMetadataBundle,
1989    fuse: Fuse,
1990    tnt_block_state: TntBlockState,
1991}
1992impl Default for TntMetadataBundle {
1993    fn default() -> Self {
1994        Self {
1995            _marker: Tnt,
1996            parent: Default::default(),
1997            fuse: Fuse(80),
1998            tnt_block_state: TntBlockState(Default::default()),
1999        }
2000    }
2001}
2002
2003/// The marker component for entities of type `minecraft:wind_charge`.
2004///
2005/// # Metadata
2006///
2007/// This entity type does not add any additional metadata. It will still have
2008/// metadata from parent types.
2009///
2010/// # Parents
2011///
2012/// Entities with `WindCharge` will also have the following marker components
2013/// and their metadata fields:
2014///
2015/// - [AbstractEntity]
2016///
2017/// # Children
2018///
2019/// This entity type has no children types.
2020#[derive(Component)]
2021pub struct WindCharge;
2022impl WindCharge {
2023    fn apply_metadata(
2024        entity: &mut bevy_ecs::system::EntityCommands,
2025        d: EntityDataItem,
2026    ) -> Result<(), UpdateMetadataError> {
2027        match d.index {
2028            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2029            _ => {}
2030        }
2031        Ok(())
2032    }
2033}
2034
2035/// The metadata bundle for [WindCharge].
2036///
2037/// This type should generally not be used directly.
2038#[derive(Bundle)]
2039pub struct WindChargeMetadataBundle {
2040    _marker: WindCharge,
2041    parent: AbstractEntityMetadataBundle,
2042}
2043impl Default for WindChargeMetadataBundle {
2044    fn default() -> Self {
2045        Self {
2046            _marker: WindCharge,
2047            parent: Default::default(),
2048        }
2049    }
2050}
2051
2052/// A metadata field for [WitherSkull].
2053#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2054pub struct Dangerous(pub bool);
2055/// The marker component for entities of type `minecraft:wither_skull`.
2056///
2057/// # Metadata
2058///
2059/// These are the metadata components that all `WitherSkull` entities are
2060/// guaranteed to have, in addition to the metadata components from parent
2061/// types:
2062///
2063/// - [Dangerous]
2064///
2065/// # Parents
2066///
2067/// Entities with `WitherSkull` will also have the following marker components
2068/// and their metadata fields:
2069///
2070/// - [AbstractEntity]
2071///
2072/// # Children
2073///
2074/// This entity type has no children types.
2075#[derive(Component)]
2076pub struct WitherSkull;
2077impl WitherSkull {
2078    fn apply_metadata(
2079        entity: &mut bevy_ecs::system::EntityCommands,
2080        d: EntityDataItem,
2081    ) -> Result<(), UpdateMetadataError> {
2082        match d.index {
2083            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2084            8 => {
2085                entity.insert(Dangerous(d.value.into_boolean()?));
2086            }
2087            _ => {}
2088        }
2089        Ok(())
2090    }
2091}
2092
2093/// The metadata bundle for [WitherSkull].
2094///
2095/// This type should generally not be used directly.
2096#[derive(Bundle)]
2097pub struct WitherSkullMetadataBundle {
2098    _marker: WitherSkull,
2099    parent: AbstractEntityMetadataBundle,
2100    dangerous: Dangerous,
2101}
2102impl Default for WitherSkullMetadataBundle {
2103    fn default() -> Self {
2104        Self {
2105            _marker: WitherSkull,
2106            parent: Default::default(),
2107            dangerous: Dangerous(false),
2108        }
2109    }
2110}
2111
2112#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2113/// A metadata field for [AbstractArrow].
2114pub struct CritArrow(pub bool);
2115#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2116/// A metadata field for [AbstractArrow].
2117pub struct NoPhysics(pub bool);
2118/// A metadata field for [AbstractArrow].
2119#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2120pub struct PierceLevel(pub u8);
2121/// A metadata field for [AbstractArrow].
2122#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2123pub struct InGround(pub bool);
2124/// An abstract entity marker component.
2125///
2126/// # Metadata
2127///
2128/// These are the metadata components that all `AbstractArrow` entities are
2129/// guaranteed to have, in addition to the metadata components from parent
2130/// types:
2131///
2132/// - [CritArrow]
2133/// - [NoPhysics]
2134/// - [PierceLevel]
2135/// - [InGround]
2136///
2137/// # Parents
2138///
2139/// Entities with `AbstractArrow` will also have the following marker components
2140/// and their metadata fields:
2141///
2142/// - [AbstractEntity]
2143///
2144/// # Children
2145///
2146/// - [Arrow]
2147/// - [SpectralArrow]
2148/// - [Trident]
2149#[derive(Component)]
2150pub struct AbstractArrow;
2151impl AbstractArrow {
2152    fn apply_metadata(
2153        entity: &mut bevy_ecs::system::EntityCommands,
2154        d: EntityDataItem,
2155    ) -> Result<(), UpdateMetadataError> {
2156        match d.index {
2157            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2158            8 => {
2159                let bitfield = d.value.into_byte()?;
2160                entity.insert(CritArrow(bitfield & 0x1 != 0));
2161                entity.insert(NoPhysics(bitfield & 0x2 != 0));
2162            }
2163            9 => {
2164                entity.insert(PierceLevel(d.value.into_byte()?));
2165            }
2166            10 => {
2167                entity.insert(InGround(d.value.into_boolean()?));
2168            }
2169            _ => {}
2170        }
2171        Ok(())
2172    }
2173}
2174
2175/// The metadata bundle for [AbstractArrow].
2176///
2177/// This type should generally not be used directly.
2178#[derive(Bundle)]
2179pub struct AbstractArrowMetadataBundle {
2180    _marker: AbstractArrow,
2181    parent: AbstractEntityMetadataBundle,
2182    crit_arrow: CritArrow,
2183    no_physics: NoPhysics,
2184    pierce_level: PierceLevel,
2185    in_ground: InGround,
2186}
2187impl Default for AbstractArrowMetadataBundle {
2188    fn default() -> Self {
2189        Self {
2190            _marker: AbstractArrow,
2191            parent: Default::default(),
2192            crit_arrow: CritArrow(false),
2193            no_physics: NoPhysics(false),
2194            pierce_level: PierceLevel(0),
2195            in_ground: InGround(false),
2196        }
2197    }
2198}
2199
2200/// A metadata field for [Arrow].
2201#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2202pub struct EffectColor(pub i32);
2203/// The marker component for entities of type `minecraft:arrow`.
2204///
2205/// # Metadata
2206///
2207/// These are the metadata components that all `Arrow` entities are guaranteed
2208/// to have, in addition to the metadata components from parent types:
2209///
2210/// - [EffectColor]
2211///
2212/// # Parents
2213///
2214/// Entities with `Arrow` will also have the following marker components and
2215/// their metadata fields:
2216///
2217/// - [AbstractArrow]
2218/// - [AbstractEntity]
2219///
2220/// # Children
2221///
2222/// This entity type has no children types.
2223#[derive(Component)]
2224pub struct Arrow;
2225impl Arrow {
2226    fn apply_metadata(
2227        entity: &mut bevy_ecs::system::EntityCommands,
2228        d: EntityDataItem,
2229    ) -> Result<(), UpdateMetadataError> {
2230        match d.index {
2231            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2232            11 => {
2233                entity.insert(EffectColor(d.value.into_int()?));
2234            }
2235            _ => {}
2236        }
2237        Ok(())
2238    }
2239}
2240
2241/// The metadata bundle for [Arrow].
2242///
2243/// This type should generally not be used directly.
2244#[derive(Bundle)]
2245pub struct ArrowMetadataBundle {
2246    _marker: Arrow,
2247    parent: AbstractArrowMetadataBundle,
2248    effect_color: EffectColor,
2249}
2250impl Default for ArrowMetadataBundle {
2251    fn default() -> Self {
2252        Self {
2253            _marker: Arrow,
2254            parent: Default::default(),
2255            effect_color: EffectColor(-1),
2256        }
2257    }
2258}
2259
2260/// The marker component for entities of type `minecraft:spectral_arrow`.
2261///
2262/// # Metadata
2263///
2264/// This entity type does not add any additional metadata. It will still have
2265/// metadata from parent types.
2266///
2267/// # Parents
2268///
2269/// Entities with `SpectralArrow` will also have the following marker components
2270/// and their metadata fields:
2271///
2272/// - [AbstractArrow]
2273/// - [AbstractEntity]
2274///
2275/// # Children
2276///
2277/// This entity type has no children types.
2278#[derive(Component)]
2279pub struct SpectralArrow;
2280impl SpectralArrow {
2281    fn apply_metadata(
2282        entity: &mut bevy_ecs::system::EntityCommands,
2283        d: EntityDataItem,
2284    ) -> Result<(), UpdateMetadataError> {
2285        match d.index {
2286            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2287            _ => {}
2288        }
2289        Ok(())
2290    }
2291}
2292
2293/// The metadata bundle for [SpectralArrow].
2294///
2295/// This type should generally not be used directly.
2296#[derive(Bundle)]
2297pub struct SpectralArrowMetadataBundle {
2298    _marker: SpectralArrow,
2299    parent: AbstractArrowMetadataBundle,
2300}
2301impl Default for SpectralArrowMetadataBundle {
2302    fn default() -> Self {
2303        Self {
2304            _marker: SpectralArrow,
2305            parent: Default::default(),
2306        }
2307    }
2308}
2309
2310/// A metadata field for [Trident].
2311#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2312pub struct Loyalty(pub u8);
2313/// A metadata field for [Trident].
2314#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2315pub struct Foil(pub bool);
2316/// The marker component for entities of type `minecraft:trident`.
2317///
2318/// # Metadata
2319///
2320/// These are the metadata components that all `Trident` entities are guaranteed
2321/// to have, in addition to the metadata components from parent types:
2322///
2323/// - [Loyalty]
2324/// - [Foil]
2325///
2326/// # Parents
2327///
2328/// Entities with `Trident` will also have the following marker components and
2329/// their metadata fields:
2330///
2331/// - [AbstractArrow]
2332/// - [AbstractEntity]
2333///
2334/// # Children
2335///
2336/// This entity type has no children types.
2337#[derive(Component)]
2338pub struct Trident;
2339impl Trident {
2340    fn apply_metadata(
2341        entity: &mut bevy_ecs::system::EntityCommands,
2342        d: EntityDataItem,
2343    ) -> Result<(), UpdateMetadataError> {
2344        match d.index {
2345            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2346            11 => {
2347                entity.insert(Loyalty(d.value.into_byte()?));
2348            }
2349            12 => {
2350                entity.insert(Foil(d.value.into_boolean()?));
2351            }
2352            _ => {}
2353        }
2354        Ok(())
2355    }
2356}
2357
2358/// The metadata bundle for [Trident].
2359///
2360/// This type should generally not be used directly.
2361#[derive(Bundle)]
2362pub struct TridentMetadataBundle {
2363    _marker: Trident,
2364    parent: AbstractArrowMetadataBundle,
2365    loyalty: Loyalty,
2366    foil: Foil,
2367}
2368impl Default for TridentMetadataBundle {
2369    fn default() -> Self {
2370        Self {
2371            _marker: Trident,
2372            parent: Default::default(),
2373            loyalty: Loyalty(0),
2374            foil: Foil(false),
2375        }
2376    }
2377}
2378
2379/// A metadata field for [AbstractDisplay].
2380#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2381pub struct TransformationInterpolationStartDeltaTicks(pub i32);
2382/// A metadata field for [AbstractDisplay].
2383#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2384pub struct TransformationInterpolationDuration(pub i32);
2385/// A metadata field for [AbstractDisplay].
2386#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2387pub struct PosRotInterpolationDuration(pub i32);
2388/// A metadata field for [AbstractDisplay].
2389#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2390pub struct Translation(pub Vec3f32);
2391/// A metadata field for [AbstractDisplay].
2392#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2393pub struct Scale(pub Vec3f32);
2394/// A metadata field for [AbstractDisplay].
2395#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2396pub struct LeftRotation(pub Quaternion);
2397/// A metadata field for [AbstractDisplay].
2398#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2399pub struct RightRotation(pub Quaternion);
2400/// A metadata field for [AbstractDisplay].
2401#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2402pub struct BillboardRenderConstraints(pub u8);
2403/// A metadata field for [AbstractDisplay].
2404#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2405pub struct BrightnessOverride(pub i32);
2406/// A metadata field for [AbstractDisplay].
2407#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2408pub struct ViewRange(pub f32);
2409/// A metadata field for [AbstractDisplay].
2410#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2411pub struct ShadowRadius(pub f32);
2412/// A metadata field for [AbstractDisplay].
2413#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2414pub struct ShadowStrength(pub f32);
2415/// A metadata field for [AbstractDisplay].
2416#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2417pub struct AbstractDisplayWidth(pub f32);
2418/// A metadata field for [AbstractDisplay].
2419#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2420pub struct AbstractDisplayHeight(pub f32);
2421/// A metadata field for [AbstractDisplay].
2422#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2423pub struct GlowColorOverride(pub i32);
2424/// An abstract entity marker component.
2425///
2426/// # Metadata
2427///
2428/// These are the metadata components that all `AbstractDisplay` entities are
2429/// guaranteed to have, in addition to the metadata components from parent
2430/// types:
2431///
2432/// - [TransformationInterpolationStartDeltaTicks]
2433/// - [TransformationInterpolationDuration]
2434/// - [PosRotInterpolationDuration]
2435/// - [Translation]
2436/// - [Scale]
2437/// - [LeftRotation]
2438/// - [RightRotation]
2439/// - [BillboardRenderConstraints]
2440/// - [BrightnessOverride]
2441/// - [ViewRange]
2442/// - [ShadowRadius]
2443/// - [ShadowStrength]
2444/// - [AbstractDisplayWidth]
2445/// - [AbstractDisplayHeight]
2446/// - [GlowColorOverride]
2447///
2448/// # Parents
2449///
2450/// Entities with `AbstractDisplay` will also have the following marker
2451/// components and their metadata fields:
2452///
2453/// - [AbstractEntity]
2454///
2455/// # Children
2456///
2457/// - [BlockDisplay]
2458/// - [ItemDisplay]
2459/// - [TextDisplay]
2460#[derive(Component)]
2461pub struct AbstractDisplay;
2462impl AbstractDisplay {
2463    fn apply_metadata(
2464        entity: &mut bevy_ecs::system::EntityCommands,
2465        d: EntityDataItem,
2466    ) -> Result<(), UpdateMetadataError> {
2467        match d.index {
2468            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2469            8 => {
2470                entity.insert(TransformationInterpolationStartDeltaTicks(
2471                    d.value.into_int()?,
2472                ));
2473            }
2474            9 => {
2475                entity.insert(TransformationInterpolationDuration(d.value.into_int()?));
2476            }
2477            10 => {
2478                entity.insert(PosRotInterpolationDuration(d.value.into_int()?));
2479            }
2480            11 => {
2481                entity.insert(Translation(d.value.into_vector3()?));
2482            }
2483            12 => {
2484                entity.insert(Scale(d.value.into_vector3()?));
2485            }
2486            13 => {
2487                entity.insert(LeftRotation(d.value.into_quaternion()?));
2488            }
2489            14 => {
2490                entity.insert(RightRotation(d.value.into_quaternion()?));
2491            }
2492            15 => {
2493                entity.insert(BillboardRenderConstraints(d.value.into_byte()?));
2494            }
2495            16 => {
2496                entity.insert(BrightnessOverride(d.value.into_int()?));
2497            }
2498            17 => {
2499                entity.insert(ViewRange(d.value.into_float()?));
2500            }
2501            18 => {
2502                entity.insert(ShadowRadius(d.value.into_float()?));
2503            }
2504            19 => {
2505                entity.insert(ShadowStrength(d.value.into_float()?));
2506            }
2507            20 => {
2508                entity.insert(AbstractDisplayWidth(d.value.into_float()?));
2509            }
2510            21 => {
2511                entity.insert(AbstractDisplayHeight(d.value.into_float()?));
2512            }
2513            22 => {
2514                entity.insert(GlowColorOverride(d.value.into_int()?));
2515            }
2516            _ => {}
2517        }
2518        Ok(())
2519    }
2520}
2521
2522/// The metadata bundle for [AbstractDisplay].
2523///
2524/// This type should generally not be used directly.
2525#[derive(Bundle)]
2526pub struct AbstractDisplayMetadataBundle {
2527    _marker: AbstractDisplay,
2528    parent: AbstractEntityMetadataBundle,
2529    transformation_interpolation_start_delta_ticks: TransformationInterpolationStartDeltaTicks,
2530    transformation_interpolation_duration: TransformationInterpolationDuration,
2531    pos_rot_interpolation_duration: PosRotInterpolationDuration,
2532    translation: Translation,
2533    scale: Scale,
2534    left_rotation: LeftRotation,
2535    right_rotation: RightRotation,
2536    billboard_render_constraints: BillboardRenderConstraints,
2537    brightness_override: BrightnessOverride,
2538    view_range: ViewRange,
2539    shadow_radius: ShadowRadius,
2540    shadow_strength: ShadowStrength,
2541    abstract_display_width: AbstractDisplayWidth,
2542    abstract_display_height: AbstractDisplayHeight,
2543    glow_color_override: GlowColorOverride,
2544}
2545impl Default for AbstractDisplayMetadataBundle {
2546    fn default() -> Self {
2547        Self {
2548            _marker: AbstractDisplay,
2549            parent: Default::default(),
2550            transformation_interpolation_start_delta_ticks:
2551                TransformationInterpolationStartDeltaTicks(0),
2552            transformation_interpolation_duration: TransformationInterpolationDuration(0),
2553            pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
2554            translation: Translation(Vec3f32 {
2555                x: 0.0,
2556                y: 0.0,
2557                z: 0.0,
2558            }),
2559            scale: Scale(Vec3f32 {
2560                x: 1.0,
2561                y: 1.0,
2562                z: 1.0,
2563            }),
2564            left_rotation: LeftRotation(Quaternion {
2565                x: 0.0,
2566                y: 0.0,
2567                z: 0.0,
2568                w: 1.0,
2569            }),
2570            right_rotation: RightRotation(Quaternion {
2571                x: 0.0,
2572                y: 0.0,
2573                z: 0.0,
2574                w: 1.0,
2575            }),
2576            billboard_render_constraints: BillboardRenderConstraints(Default::default()),
2577            brightness_override: BrightnessOverride(-1),
2578            view_range: ViewRange(1.0),
2579            shadow_radius: ShadowRadius(0.0),
2580            shadow_strength: ShadowStrength(1.0),
2581            abstract_display_width: AbstractDisplayWidth(0.0),
2582            abstract_display_height: AbstractDisplayHeight(0.0),
2583            glow_color_override: GlowColorOverride(-1),
2584        }
2585    }
2586}
2587
2588/// A metadata field for [BlockDisplay].
2589#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2590pub struct BlockDisplayBlockState(pub azalea_block::BlockState);
2591/// The marker component for entities of type `minecraft:block_display`.
2592///
2593/// # Metadata
2594///
2595/// These are the metadata components that all `BlockDisplay` entities are
2596/// guaranteed to have, in addition to the metadata components from parent
2597/// types:
2598///
2599/// - [BlockDisplayBlockState]
2600///
2601/// # Parents
2602///
2603/// Entities with `BlockDisplay` will also have the following marker components
2604/// and their metadata fields:
2605///
2606/// - [AbstractDisplay]
2607/// - [AbstractEntity]
2608///
2609/// # Children
2610///
2611/// This entity type has no children types.
2612#[derive(Component)]
2613pub struct BlockDisplay;
2614impl BlockDisplay {
2615    fn apply_metadata(
2616        entity: &mut bevy_ecs::system::EntityCommands,
2617        d: EntityDataItem,
2618    ) -> Result<(), UpdateMetadataError> {
2619        match d.index {
2620            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2621            23 => {
2622                entity.insert(BlockDisplayBlockState(d.value.into_block_state()?));
2623            }
2624            _ => {}
2625        }
2626        Ok(())
2627    }
2628}
2629
2630/// The metadata bundle for [BlockDisplay].
2631///
2632/// This type should generally not be used directly.
2633#[derive(Bundle)]
2634pub struct BlockDisplayMetadataBundle {
2635    _marker: BlockDisplay,
2636    parent: AbstractDisplayMetadataBundle,
2637    block_display_block_state: BlockDisplayBlockState,
2638}
2639impl Default for BlockDisplayMetadataBundle {
2640    fn default() -> Self {
2641        Self {
2642            _marker: BlockDisplay,
2643            parent: Default::default(),
2644            block_display_block_state: BlockDisplayBlockState(Default::default()),
2645        }
2646    }
2647}
2648
2649/// A metadata field for [ItemDisplay].
2650#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2651pub struct ItemDisplayItemStack(pub ItemStack);
2652/// A metadata field for [ItemDisplay].
2653#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2654pub struct ItemDisplayItemDisplay(pub u8);
2655/// The marker component for entities of type `minecraft:item_display`.
2656///
2657/// # Metadata
2658///
2659/// These are the metadata components that all `ItemDisplay` entities are
2660/// guaranteed to have, in addition to the metadata components from parent
2661/// types:
2662///
2663/// - [ItemDisplayItemStack]
2664/// - [ItemDisplayItemDisplay]
2665///
2666/// # Parents
2667///
2668/// Entities with `ItemDisplay` will also have the following marker components
2669/// and their metadata fields:
2670///
2671/// - [AbstractDisplay]
2672/// - [AbstractEntity]
2673///
2674/// # Children
2675///
2676/// This entity type has no children types.
2677#[derive(Component)]
2678pub struct ItemDisplay;
2679impl ItemDisplay {
2680    fn apply_metadata(
2681        entity: &mut bevy_ecs::system::EntityCommands,
2682        d: EntityDataItem,
2683    ) -> Result<(), UpdateMetadataError> {
2684        match d.index {
2685            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2686            23 => {
2687                entity.insert(ItemDisplayItemStack(d.value.into_item_stack()?));
2688            }
2689            24 => {
2690                entity.insert(ItemDisplayItemDisplay(d.value.into_byte()?));
2691            }
2692            _ => {}
2693        }
2694        Ok(())
2695    }
2696}
2697
2698/// The metadata bundle for [ItemDisplay].
2699///
2700/// This type should generally not be used directly.
2701#[derive(Bundle)]
2702pub struct ItemDisplayMetadataBundle {
2703    _marker: ItemDisplay,
2704    parent: AbstractDisplayMetadataBundle,
2705    item_display_item_stack: ItemDisplayItemStack,
2706    item_display_item_display: ItemDisplayItemDisplay,
2707}
2708impl Default for ItemDisplayMetadataBundle {
2709    fn default() -> Self {
2710        Self {
2711            _marker: ItemDisplay,
2712            parent: Default::default(),
2713            item_display_item_stack: ItemDisplayItemStack(Default::default()),
2714            item_display_item_display: ItemDisplayItemDisplay(Default::default()),
2715        }
2716    }
2717}
2718
2719/// A metadata field for [TextDisplay].
2720#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2721pub struct Text(pub Box<FormattedText>);
2722/// A metadata field for [TextDisplay].
2723#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2724pub struct LineWidth(pub i32);
2725/// A metadata field for [TextDisplay].
2726#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2727pub struct BackgroundColor(pub i32);
2728/// A metadata field for [TextDisplay].
2729#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2730pub struct TextOpacity(pub u8);
2731/// A metadata field for [TextDisplay].
2732#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2733pub struct StyleFlags(pub u8);
2734/// The marker component for entities of type `minecraft:text_display`.
2735///
2736/// # Metadata
2737///
2738/// These are the metadata components that all `TextDisplay` entities are
2739/// guaranteed to have, in addition to the metadata components from parent
2740/// types:
2741///
2742/// - [Text]
2743/// - [LineWidth]
2744/// - [BackgroundColor]
2745/// - [TextOpacity]
2746/// - [StyleFlags]
2747///
2748/// # Parents
2749///
2750/// Entities with `TextDisplay` will also have the following marker components
2751/// and their metadata fields:
2752///
2753/// - [AbstractDisplay]
2754/// - [AbstractEntity]
2755///
2756/// # Children
2757///
2758/// This entity type has no children types.
2759#[derive(Component)]
2760pub struct TextDisplay;
2761impl TextDisplay {
2762    fn apply_metadata(
2763        entity: &mut bevy_ecs::system::EntityCommands,
2764        d: EntityDataItem,
2765    ) -> Result<(), UpdateMetadataError> {
2766        match d.index {
2767            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2768            23 => {
2769                entity.insert(Text(d.value.into_formatted_text()?));
2770            }
2771            24 => {
2772                entity.insert(LineWidth(d.value.into_int()?));
2773            }
2774            25 => {
2775                entity.insert(BackgroundColor(d.value.into_int()?));
2776            }
2777            26 => {
2778                entity.insert(TextOpacity(d.value.into_byte()?));
2779            }
2780            27 => {
2781                entity.insert(StyleFlags(d.value.into_byte()?));
2782            }
2783            _ => {}
2784        }
2785        Ok(())
2786    }
2787}
2788
2789/// The metadata bundle for [TextDisplay].
2790///
2791/// This type should generally not be used directly.
2792#[derive(Bundle)]
2793pub struct TextDisplayMetadataBundle {
2794    _marker: TextDisplay,
2795    parent: AbstractDisplayMetadataBundle,
2796    text: Text,
2797    line_width: LineWidth,
2798    background_color: BackgroundColor,
2799    text_opacity: TextOpacity,
2800    style_flags: StyleFlags,
2801}
2802impl Default for TextDisplayMetadataBundle {
2803    fn default() -> Self {
2804        Self {
2805            _marker: TextDisplay,
2806            parent: Default::default(),
2807            text: Text(Default::default()),
2808            line_width: LineWidth(200),
2809            background_color: BackgroundColor(1073741824),
2810            text_opacity: TextOpacity(127),
2811            style_flags: StyleFlags(0),
2812        }
2813    }
2814}
2815
2816#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2817/// A metadata field for [AbstractLiving].
2818pub struct AutoSpinAttack(pub bool);
2819#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2820/// A metadata field for [AbstractLiving].
2821pub struct AbstractLivingUsingItem(pub bool);
2822/// A metadata field for [AbstractLiving].
2823#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2824pub struct Health(pub f32);
2825/// A metadata field for [AbstractLiving].
2826#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2827pub struct EffectParticles(pub Box<[Particle]>);
2828/// A metadata field for [AbstractLiving].
2829#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2830pub struct EffectAmbience(pub bool);
2831/// A metadata field for [AbstractLiving].
2832#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2833pub struct ArrowCount(pub i32);
2834/// A metadata field for [AbstractLiving].
2835#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2836pub struct StingerCount(pub i32);
2837/// A metadata field for [AbstractLiving].
2838#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2839pub struct SleepingPos(pub Option<BlockPos>);
2840/// An abstract entity marker component.
2841///
2842/// # Metadata
2843///
2844/// These are the metadata components that all `AbstractLiving` entities are
2845/// guaranteed to have, in addition to the metadata components from parent
2846/// types:
2847///
2848/// - [AutoSpinAttack]
2849/// - [AbstractLivingUsingItem]
2850/// - [Health]
2851/// - [EffectParticles]
2852/// - [EffectAmbience]
2853/// - [ArrowCount]
2854/// - [StingerCount]
2855/// - [SleepingPos]
2856///
2857/// # Parents
2858///
2859/// Entities with `AbstractLiving` will also have the following marker
2860/// components and their metadata fields:
2861///
2862/// - [AbstractEntity]
2863///
2864/// # Children
2865///
2866/// - [ArmorStand]
2867/// - [AbstractAvatar]
2868///   - [Mannequin]
2869///   - [Player]
2870/// - [AbstractInsentient]
2871///   - [Bat]
2872///   - [EnderDragon]
2873///   - [Ghast]
2874///   - [Phantom]
2875///   - [Slime]
2876///     - [MagmaCube]
2877///   - [AbstractCreature]
2878///     - [Allay]
2879///     - [CopperGolem]
2880///     - [IronGolem]
2881///     - [Pufferfish]
2882///     - [Shulker]
2883///     - [SnowGolem]
2884///     - [Tadpole]
2885///     - [AbstractAgeable]
2886///       - [Dolphin]
2887///       - [Squid]
2888///         - [GlowSquid]
2889///       - [AbstractAnimal]
2890///         - [Armadillo]
2891///         - [Axolotl]
2892///         - [Bee]
2893///         - [Chicken]
2894///         - [Cow]
2895///         - [Fox]
2896///         - [Frog]
2897///         - [Goat]
2898///         - [HappyGhast]
2899///         - [Hoglin]
2900///         - [Mooshroom]
2901///         - [Ocelot]
2902///         - [Panda]
2903///         - [Pig]
2904///         - [PolarBear]
2905///         - [Rabbit]
2906///         - [Sheep]
2907///         - [Sniffer]
2908///         - [Strider]
2909///         - [Turtle]
2910///         - [AbstractHorse]
2911///           - [Camel]
2912///             - [CamelHusk]
2913///           - [Horse]
2914///           - [SkeletonHorse]
2915///           - [ZombieHorse]
2916///           - [AbstractChestedHorse]
2917///             - [Donkey]
2918///             - [Llama]
2919///               - [TraderLlama]
2920///             - [Mule]
2921///         - [AbstractTameable]
2922///           - [Cat]
2923///           - [Nautilus]
2924///           - [Parrot]
2925///           - [Wolf]
2926///           - [ZombieNautilus]
2927///       - [AbstractVillager]
2928///         - [Villager]
2929///         - [WanderingTrader]
2930///     - [AbstractFish]
2931///       - [Cod]
2932///       - [Salmon]
2933///       - [TropicalFish]
2934///     - [AbstractMonster]
2935///       - [Blaze]
2936///       - [Bogged]
2937///       - [Breeze]
2938///       - [Creaking]
2939///       - [Creeper]
2940///       - [Enderman]
2941///       - [Endermite]
2942///       - [Giant]
2943///       - [Guardian]
2944///         - [ElderGuardian]
2945///       - [Parched]
2946///       - [Silverfish]
2947///       - [Skeleton]
2948///       - [Spider]
2949///         - [CaveSpider]
2950///       - [Stray]
2951///       - [Vex]
2952///       - [Warden]
2953///       - [Wither]
2954///       - [WitherSkeleton]
2955///       - [Zoglin]
2956///       - [Zombie]
2957///         - [Drowned]
2958///         - [Husk]
2959///         - [ZombieVillager]
2960///         - [ZombifiedPiglin]
2961///       - [AbstractPiglin]
2962///         - [Piglin]
2963///         - [PiglinBrute]
2964///       - [AbstractRaider]
2965///         - [Pillager]
2966///         - [Ravager]
2967///         - [Vindicator]
2968///         - [Witch]
2969///         - [AbstractSpellcasterIllager]
2970///           - [Evoker]
2971///           - [Illusioner]
2972#[derive(Component)]
2973pub struct AbstractLiving;
2974impl AbstractLiving {
2975    fn apply_metadata(
2976        entity: &mut bevy_ecs::system::EntityCommands,
2977        d: EntityDataItem,
2978    ) -> Result<(), UpdateMetadataError> {
2979        match d.index {
2980            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2981            8 => {
2982                let bitfield = d.value.into_byte()?;
2983                entity.insert(AutoSpinAttack(bitfield & 0x4 != 0));
2984                entity.insert(AbstractLivingUsingItem(bitfield & 0x1 != 0));
2985            }
2986            9 => {
2987                entity.insert(Health(d.value.into_float()?));
2988            }
2989            10 => {
2990                entity.insert(EffectParticles(d.value.into_particles()?));
2991            }
2992            11 => {
2993                entity.insert(EffectAmbience(d.value.into_boolean()?));
2994            }
2995            12 => {
2996                entity.insert(ArrowCount(d.value.into_int()?));
2997            }
2998            13 => {
2999                entity.insert(StingerCount(d.value.into_int()?));
3000            }
3001            14 => {
3002                entity.insert(SleepingPos(d.value.into_optional_block_pos()?));
3003            }
3004            _ => {}
3005        }
3006        Ok(())
3007    }
3008}
3009
3010/// The metadata bundle for [AbstractLiving].
3011///
3012/// This type should generally not be used directly.
3013#[derive(Bundle)]
3014pub struct AbstractLivingMetadataBundle {
3015    _marker: AbstractLiving,
3016    parent: AbstractEntityMetadataBundle,
3017    auto_spin_attack: AutoSpinAttack,
3018    abstract_living_using_item: AbstractLivingUsingItem,
3019    health: Health,
3020    effect_particles: EffectParticles,
3021    effect_ambience: EffectAmbience,
3022    arrow_count: ArrowCount,
3023    stinger_count: StingerCount,
3024    sleeping_pos: SleepingPos,
3025}
3026impl Default for AbstractLivingMetadataBundle {
3027    fn default() -> Self {
3028        Self {
3029            _marker: AbstractLiving,
3030            parent: Default::default(),
3031            auto_spin_attack: AutoSpinAttack(false),
3032            abstract_living_using_item: AbstractLivingUsingItem(false),
3033            health: Health(1.0),
3034            effect_particles: EffectParticles(Default::default()),
3035            effect_ambience: EffectAmbience(false),
3036            arrow_count: ArrowCount(0),
3037            stinger_count: StingerCount(0),
3038            sleeping_pos: SleepingPos(None),
3039        }
3040    }
3041}
3042
3043#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3044/// A metadata field for [ArmorStand].
3045pub struct Small(pub bool);
3046#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3047/// A metadata field for [ArmorStand].
3048pub struct ShowArms(pub bool);
3049#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3050/// A metadata field for [ArmorStand].
3051pub struct ShowBasePlate(pub bool);
3052#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3053/// A metadata field for [ArmorStand].
3054pub struct ArmorStandMarker(pub bool);
3055/// A metadata field for [ArmorStand].
3056#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3057pub struct HeadPose(pub Rotations);
3058/// A metadata field for [ArmorStand].
3059#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3060pub struct BodyPose(pub Rotations);
3061/// A metadata field for [ArmorStand].
3062#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3063pub struct LeftArmPose(pub Rotations);
3064/// A metadata field for [ArmorStand].
3065#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3066pub struct RightArmPose(pub Rotations);
3067/// A metadata field for [ArmorStand].
3068#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3069pub struct LeftLegPose(pub Rotations);
3070/// A metadata field for [ArmorStand].
3071#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3072pub struct RightLegPose(pub Rotations);
3073/// The marker component for entities of type `minecraft:armor_stand`.
3074///
3075/// # Metadata
3076///
3077/// These are the metadata components that all `ArmorStand` entities are
3078/// guaranteed to have, in addition to the metadata components from parent
3079/// types:
3080///
3081/// - [Small]
3082/// - [ShowArms]
3083/// - [ShowBasePlate]
3084/// - [ArmorStandMarker]
3085/// - [HeadPose]
3086/// - [BodyPose]
3087/// - [LeftArmPose]
3088/// - [RightArmPose]
3089/// - [LeftLegPose]
3090/// - [RightLegPose]
3091///
3092/// # Parents
3093///
3094/// Entities with `ArmorStand` will also have the following marker components
3095/// and their metadata fields:
3096///
3097/// - [AbstractLiving]
3098/// - [AbstractEntity]
3099///
3100/// # Children
3101///
3102/// This entity type has no children types.
3103#[derive(Component)]
3104pub struct ArmorStand;
3105impl ArmorStand {
3106    fn apply_metadata(
3107        entity: &mut bevy_ecs::system::EntityCommands,
3108        d: EntityDataItem,
3109    ) -> Result<(), UpdateMetadataError> {
3110        match d.index {
3111            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3112            15 => {
3113                let bitfield = d.value.into_byte()?;
3114                entity.insert(Small(bitfield & 0x1 != 0));
3115                entity.insert(ShowArms(bitfield & 0x4 != 0));
3116                entity.insert(ShowBasePlate(bitfield & 0x8 != 0));
3117                entity.insert(ArmorStandMarker(bitfield & 0x10 != 0));
3118            }
3119            16 => {
3120                entity.insert(HeadPose(d.value.into_rotations()?));
3121            }
3122            17 => {
3123                entity.insert(BodyPose(d.value.into_rotations()?));
3124            }
3125            18 => {
3126                entity.insert(LeftArmPose(d.value.into_rotations()?));
3127            }
3128            19 => {
3129                entity.insert(RightArmPose(d.value.into_rotations()?));
3130            }
3131            20 => {
3132                entity.insert(LeftLegPose(d.value.into_rotations()?));
3133            }
3134            21 => {
3135                entity.insert(RightLegPose(d.value.into_rotations()?));
3136            }
3137            _ => {}
3138        }
3139        Ok(())
3140    }
3141}
3142
3143/// The metadata bundle for [ArmorStand].
3144///
3145/// This type should generally not be used directly.
3146#[derive(Bundle)]
3147pub struct ArmorStandMetadataBundle {
3148    _marker: ArmorStand,
3149    parent: AbstractLivingMetadataBundle,
3150    small: Small,
3151    show_arms: ShowArms,
3152    show_base_plate: ShowBasePlate,
3153    armor_stand_marker: ArmorStandMarker,
3154    head_pose: HeadPose,
3155    body_pose: BodyPose,
3156    left_arm_pose: LeftArmPose,
3157    right_arm_pose: RightArmPose,
3158    left_leg_pose: LeftLegPose,
3159    right_leg_pose: RightLegPose,
3160}
3161impl Default for ArmorStandMetadataBundle {
3162    fn default() -> Self {
3163        Self {
3164            _marker: ArmorStand,
3165            parent: Default::default(),
3166            small: Small(false),
3167            show_arms: ShowArms(false),
3168            show_base_plate: ShowBasePlate(false),
3169            armor_stand_marker: ArmorStandMarker(false),
3170            head_pose: HeadPose(Default::default()),
3171            body_pose: BodyPose(Default::default()),
3172            left_arm_pose: LeftArmPose(Default::default()),
3173            right_arm_pose: RightArmPose(Default::default()),
3174            left_leg_pose: LeftLegPose(Default::default()),
3175            right_leg_pose: RightLegPose(Default::default()),
3176        }
3177    }
3178}
3179
3180/// A metadata field for [AbstractAvatar].
3181#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3182pub struct PlayerMainHand(pub HumanoidArm);
3183/// A metadata field for [AbstractAvatar].
3184#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3185pub struct PlayerModeCustomisation(pub u8);
3186/// An abstract entity marker component.
3187///
3188/// # Metadata
3189///
3190/// These are the metadata components that all `AbstractAvatar` entities are
3191/// guaranteed to have, in addition to the metadata components from parent
3192/// types:
3193///
3194/// - [PlayerMainHand]
3195/// - [PlayerModeCustomisation]
3196///
3197/// # Parents
3198///
3199/// Entities with `AbstractAvatar` will also have the following marker
3200/// components and their metadata fields:
3201///
3202/// - [AbstractLiving]
3203/// - [AbstractEntity]
3204///
3205/// # Children
3206///
3207/// - [Mannequin]
3208/// - [Player]
3209#[derive(Component)]
3210pub struct AbstractAvatar;
3211impl AbstractAvatar {
3212    fn apply_metadata(
3213        entity: &mut bevy_ecs::system::EntityCommands,
3214        d: EntityDataItem,
3215    ) -> Result<(), UpdateMetadataError> {
3216        match d.index {
3217            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3218            15 => {
3219                entity.insert(PlayerMainHand(d.value.into_humanoid_arm()?));
3220            }
3221            16 => {
3222                entity.insert(PlayerModeCustomisation(d.value.into_byte()?));
3223            }
3224            _ => {}
3225        }
3226        Ok(())
3227    }
3228}
3229
3230/// The metadata bundle for [AbstractAvatar].
3231///
3232/// This type should generally not be used directly.
3233#[derive(Bundle)]
3234pub struct AbstractAvatarMetadataBundle {
3235    _marker: AbstractAvatar,
3236    parent: AbstractLivingMetadataBundle,
3237    player_main_hand: PlayerMainHand,
3238    player_mode_customisation: PlayerModeCustomisation,
3239}
3240impl Default for AbstractAvatarMetadataBundle {
3241    fn default() -> Self {
3242        Self {
3243            _marker: AbstractAvatar,
3244            parent: Default::default(),
3245            player_main_hand: PlayerMainHand(Default::default()),
3246            player_mode_customisation: PlayerModeCustomisation(0),
3247        }
3248    }
3249}
3250
3251/// A metadata field for [Mannequin].
3252#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3253pub struct Profile(pub components::Profile);
3254/// A metadata field for [Mannequin].
3255#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3256pub struct Immovable(pub bool);
3257/// A metadata field for [Mannequin].
3258#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3259pub struct Description(pub Option<Box<FormattedText>>);
3260/// The marker component for entities of type `minecraft:mannequin`.
3261///
3262/// # Metadata
3263///
3264/// These are the metadata components that all `Mannequin` entities are
3265/// guaranteed to have, in addition to the metadata components from parent
3266/// types:
3267///
3268/// - [Profile]
3269/// - [Immovable]
3270/// - [Description]
3271///
3272/// # Parents
3273///
3274/// Entities with `Mannequin` will also have the following marker components and
3275/// their metadata fields:
3276///
3277/// - [AbstractAvatar]
3278/// - [AbstractLiving]
3279/// - [AbstractEntity]
3280///
3281/// # Children
3282///
3283/// This entity type has no children types.
3284#[derive(Component)]
3285pub struct Mannequin;
3286impl Mannequin {
3287    fn apply_metadata(
3288        entity: &mut bevy_ecs::system::EntityCommands,
3289        d: EntityDataItem,
3290    ) -> Result<(), UpdateMetadataError> {
3291        match d.index {
3292            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3293            17 => {
3294                entity.insert(Profile(d.value.into_resolvable_profile()?));
3295            }
3296            18 => {
3297                entity.insert(Immovable(d.value.into_boolean()?));
3298            }
3299            19 => {
3300                entity.insert(Description(d.value.into_optional_formatted_text()?));
3301            }
3302            _ => {}
3303        }
3304        Ok(())
3305    }
3306}
3307
3308/// The metadata bundle for [Mannequin].
3309///
3310/// This type should generally not be used directly.
3311#[derive(Bundle)]
3312pub struct MannequinMetadataBundle {
3313    _marker: Mannequin,
3314    parent: AbstractAvatarMetadataBundle,
3315    profile: Profile,
3316    immovable: Immovable,
3317    description: Description,
3318}
3319impl Default for MannequinMetadataBundle {
3320    fn default() -> Self {
3321        Self {
3322            _marker: Mannequin,
3323            parent: Default::default(),
3324            profile: Profile(Default::default()),
3325            immovable: Immovable(false),
3326            description: Description(Default::default()),
3327        }
3328    }
3329}
3330
3331/// A metadata field for [Player].
3332#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3333pub struct PlayerAbsorption(pub f32);
3334/// A metadata field for [Player].
3335#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3336pub struct Score(pub i32);
3337/// A metadata field for [Player].
3338#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3339pub struct ShoulderParrotLeft(pub OptionalUnsignedInt);
3340/// A metadata field for [Player].
3341#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3342pub struct ShoulderParrotRight(pub OptionalUnsignedInt);
3343/// The marker component for entities of type `minecraft:player`.
3344///
3345/// # Metadata
3346///
3347/// These are the metadata components that all `Player` entities are guaranteed
3348/// to have, in addition to the metadata components from parent types:
3349///
3350/// - [PlayerAbsorption]
3351/// - [Score]
3352/// - [ShoulderParrotLeft]
3353/// - [ShoulderParrotRight]
3354///
3355/// # Parents
3356///
3357/// Entities with `Player` will also have the following marker components and
3358/// their metadata fields:
3359///
3360/// - [AbstractAvatar]
3361/// - [AbstractLiving]
3362/// - [AbstractEntity]
3363///
3364/// # Children
3365///
3366/// This entity type has no children types.
3367#[derive(Component)]
3368pub struct Player;
3369impl Player {
3370    fn apply_metadata(
3371        entity: &mut bevy_ecs::system::EntityCommands,
3372        d: EntityDataItem,
3373    ) -> Result<(), UpdateMetadataError> {
3374        match d.index {
3375            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3376            17 => {
3377                entity.insert(PlayerAbsorption(d.value.into_float()?));
3378            }
3379            18 => {
3380                entity.insert(Score(d.value.into_int()?));
3381            }
3382            19 => {
3383                entity.insert(ShoulderParrotLeft(d.value.into_optional_unsigned_int()?));
3384            }
3385            20 => {
3386                entity.insert(ShoulderParrotRight(d.value.into_optional_unsigned_int()?));
3387            }
3388            _ => {}
3389        }
3390        Ok(())
3391    }
3392}
3393
3394/// The metadata bundle for [Player].
3395///
3396/// This type should generally not be used directly.
3397#[derive(Bundle)]
3398pub struct PlayerMetadataBundle {
3399    _marker: Player,
3400    parent: AbstractAvatarMetadataBundle,
3401    player_absorption: PlayerAbsorption,
3402    score: Score,
3403    shoulder_parrot_left: ShoulderParrotLeft,
3404    shoulder_parrot_right: ShoulderParrotRight,
3405}
3406impl Default for PlayerMetadataBundle {
3407    fn default() -> Self {
3408        Self {
3409            _marker: Player,
3410            parent: Default::default(),
3411            player_absorption: PlayerAbsorption(0.0),
3412            score: Score(0),
3413            shoulder_parrot_left: ShoulderParrotLeft(OptionalUnsignedInt(None)),
3414            shoulder_parrot_right: ShoulderParrotRight(OptionalUnsignedInt(None)),
3415        }
3416    }
3417}
3418
3419#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3420/// A metadata field for [AbstractInsentient].
3421pub struct NoAi(pub bool);
3422#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3423/// A metadata field for [AbstractInsentient].
3424pub struct LeftHanded(pub bool);
3425#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3426/// A metadata field for [AbstractInsentient].
3427pub struct Aggressive(pub bool);
3428/// An abstract entity marker component.
3429///
3430/// # Metadata
3431///
3432/// These are the metadata components that all `AbstractInsentient` entities are
3433/// guaranteed to have, in addition to the metadata components from parent
3434/// types:
3435///
3436/// - [NoAi]
3437/// - [LeftHanded]
3438/// - [Aggressive]
3439///
3440/// # Parents
3441///
3442/// Entities with `AbstractInsentient` will also have the following marker
3443/// components and their metadata fields:
3444///
3445/// - [AbstractLiving]
3446/// - [AbstractEntity]
3447///
3448/// # Children
3449///
3450/// - [Bat]
3451/// - [EnderDragon]
3452/// - [Ghast]
3453/// - [Phantom]
3454/// - [Slime]
3455///   - [MagmaCube]
3456/// - [AbstractCreature]
3457///   - [Allay]
3458///   - [CopperGolem]
3459///   - [IronGolem]
3460///   - [Pufferfish]
3461///   - [Shulker]
3462///   - [SnowGolem]
3463///   - [Tadpole]
3464///   - [AbstractAgeable]
3465///     - [Dolphin]
3466///     - [Squid]
3467///       - [GlowSquid]
3468///     - [AbstractAnimal]
3469///       - [Armadillo]
3470///       - [Axolotl]
3471///       - [Bee]
3472///       - [Chicken]
3473///       - [Cow]
3474///       - [Fox]
3475///       - [Frog]
3476///       - [Goat]
3477///       - [HappyGhast]
3478///       - [Hoglin]
3479///       - [Mooshroom]
3480///       - [Ocelot]
3481///       - [Panda]
3482///       - [Pig]
3483///       - [PolarBear]
3484///       - [Rabbit]
3485///       - [Sheep]
3486///       - [Sniffer]
3487///       - [Strider]
3488///       - [Turtle]
3489///       - [AbstractHorse]
3490///         - [Camel]
3491///           - [CamelHusk]
3492///         - [Horse]
3493///         - [SkeletonHorse]
3494///         - [ZombieHorse]
3495///         - [AbstractChestedHorse]
3496///           - [Donkey]
3497///           - [Llama]
3498///             - [TraderLlama]
3499///           - [Mule]
3500///       - [AbstractTameable]
3501///         - [Cat]
3502///         - [Nautilus]
3503///         - [Parrot]
3504///         - [Wolf]
3505///         - [ZombieNautilus]
3506///     - [AbstractVillager]
3507///       - [Villager]
3508///       - [WanderingTrader]
3509///   - [AbstractFish]
3510///     - [Cod]
3511///     - [Salmon]
3512///     - [TropicalFish]
3513///   - [AbstractMonster]
3514///     - [Blaze]
3515///     - [Bogged]
3516///     - [Breeze]
3517///     - [Creaking]
3518///     - [Creeper]
3519///     - [Enderman]
3520///     - [Endermite]
3521///     - [Giant]
3522///     - [Guardian]
3523///       - [ElderGuardian]
3524///     - [Parched]
3525///     - [Silverfish]
3526///     - [Skeleton]
3527///     - [Spider]
3528///       - [CaveSpider]
3529///     - [Stray]
3530///     - [Vex]
3531///     - [Warden]
3532///     - [Wither]
3533///     - [WitherSkeleton]
3534///     - [Zoglin]
3535///     - [Zombie]
3536///       - [Drowned]
3537///       - [Husk]
3538///       - [ZombieVillager]
3539///       - [ZombifiedPiglin]
3540///     - [AbstractPiglin]
3541///       - [Piglin]
3542///       - [PiglinBrute]
3543///     - [AbstractRaider]
3544///       - [Pillager]
3545///       - [Ravager]
3546///       - [Vindicator]
3547///       - [Witch]
3548///       - [AbstractSpellcasterIllager]
3549///         - [Evoker]
3550///         - [Illusioner]
3551#[derive(Component)]
3552pub struct AbstractInsentient;
3553impl AbstractInsentient {
3554    fn apply_metadata(
3555        entity: &mut bevy_ecs::system::EntityCommands,
3556        d: EntityDataItem,
3557    ) -> Result<(), UpdateMetadataError> {
3558        match d.index {
3559            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3560            15 => {
3561                let bitfield = d.value.into_byte()?;
3562                entity.insert(NoAi(bitfield & 0x1 != 0));
3563                entity.insert(LeftHanded(bitfield & 0x2 != 0));
3564                entity.insert(Aggressive(bitfield & 0x4 != 0));
3565            }
3566            _ => {}
3567        }
3568        Ok(())
3569    }
3570}
3571
3572/// The metadata bundle for [AbstractInsentient].
3573///
3574/// This type should generally not be used directly.
3575#[derive(Bundle)]
3576pub struct AbstractInsentientMetadataBundle {
3577    _marker: AbstractInsentient,
3578    parent: AbstractLivingMetadataBundle,
3579    no_ai: NoAi,
3580    left_handed: LeftHanded,
3581    aggressive: Aggressive,
3582}
3583impl Default for AbstractInsentientMetadataBundle {
3584    fn default() -> Self {
3585        Self {
3586            _marker: AbstractInsentient,
3587            parent: Default::default(),
3588            no_ai: NoAi(false),
3589            left_handed: LeftHanded(false),
3590            aggressive: Aggressive(false),
3591        }
3592    }
3593}
3594
3595#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3596/// A metadata field for [Bat].
3597pub struct Resting(pub bool);
3598/// The marker component for entities of type `minecraft:bat`.
3599///
3600/// # Metadata
3601///
3602/// These are the metadata components that all `Bat` entities are guaranteed to
3603/// have, in addition to the metadata components from parent types:
3604///
3605/// - [Resting]
3606///
3607/// # Parents
3608///
3609/// Entities with `Bat` will also have the following marker components and their
3610/// metadata fields:
3611///
3612/// - [AbstractInsentient]
3613/// - [AbstractLiving]
3614/// - [AbstractEntity]
3615///
3616/// # Children
3617///
3618/// This entity type has no children types.
3619#[derive(Component)]
3620pub struct Bat;
3621impl Bat {
3622    fn apply_metadata(
3623        entity: &mut bevy_ecs::system::EntityCommands,
3624        d: EntityDataItem,
3625    ) -> Result<(), UpdateMetadataError> {
3626        match d.index {
3627            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3628            16 => {
3629                let bitfield = d.value.into_byte()?;
3630                entity.insert(Resting(bitfield & 0x1 != 0));
3631            }
3632            _ => {}
3633        }
3634        Ok(())
3635    }
3636}
3637
3638/// The metadata bundle for [Bat].
3639///
3640/// This type should generally not be used directly.
3641#[derive(Bundle)]
3642pub struct BatMetadataBundle {
3643    _marker: Bat,
3644    parent: AbstractInsentientMetadataBundle,
3645    resting: Resting,
3646}
3647impl Default for BatMetadataBundle {
3648    fn default() -> Self {
3649        Self {
3650            _marker: Bat,
3651            parent: Default::default(),
3652            resting: Resting(false),
3653        }
3654    }
3655}
3656
3657/// A metadata field for [EnderDragon].
3658#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3659pub struct Phase(pub i32);
3660/// The marker component for entities of type `minecraft:ender_dragon`.
3661///
3662/// # Metadata
3663///
3664/// These are the metadata components that all `EnderDragon` entities are
3665/// guaranteed to have, in addition to the metadata components from parent
3666/// types:
3667///
3668/// - [Phase]
3669///
3670/// # Parents
3671///
3672/// Entities with `EnderDragon` will also have the following marker components
3673/// and their metadata fields:
3674///
3675/// - [AbstractInsentient]
3676/// - [AbstractLiving]
3677/// - [AbstractEntity]
3678///
3679/// # Children
3680///
3681/// This entity type has no children types.
3682#[derive(Component)]
3683pub struct EnderDragon;
3684impl EnderDragon {
3685    fn apply_metadata(
3686        entity: &mut bevy_ecs::system::EntityCommands,
3687        d: EntityDataItem,
3688    ) -> Result<(), UpdateMetadataError> {
3689        match d.index {
3690            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3691            16 => {
3692                entity.insert(Phase(d.value.into_int()?));
3693            }
3694            _ => {}
3695        }
3696        Ok(())
3697    }
3698}
3699
3700/// The metadata bundle for [EnderDragon].
3701///
3702/// This type should generally not be used directly.
3703#[derive(Bundle)]
3704pub struct EnderDragonMetadataBundle {
3705    _marker: EnderDragon,
3706    parent: AbstractInsentientMetadataBundle,
3707    phase: Phase,
3708}
3709impl Default for EnderDragonMetadataBundle {
3710    fn default() -> Self {
3711        Self {
3712            _marker: EnderDragon,
3713            parent: Default::default(),
3714            phase: Phase(Default::default()),
3715        }
3716    }
3717}
3718
3719/// A metadata field for [Ghast].
3720#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3721pub struct IsCharging(pub bool);
3722/// The marker component for entities of type `minecraft:ghast`.
3723///
3724/// # Metadata
3725///
3726/// These are the metadata components that all `Ghast` entities are guaranteed
3727/// to have, in addition to the metadata components from parent types:
3728///
3729/// - [IsCharging]
3730///
3731/// # Parents
3732///
3733/// Entities with `Ghast` will also have the following marker components and
3734/// their metadata fields:
3735///
3736/// - [AbstractInsentient]
3737/// - [AbstractLiving]
3738/// - [AbstractEntity]
3739///
3740/// # Children
3741///
3742/// This entity type has no children types.
3743#[derive(Component)]
3744pub struct Ghast;
3745impl Ghast {
3746    fn apply_metadata(
3747        entity: &mut bevy_ecs::system::EntityCommands,
3748        d: EntityDataItem,
3749    ) -> Result<(), UpdateMetadataError> {
3750        match d.index {
3751            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3752            16 => {
3753                entity.insert(IsCharging(d.value.into_boolean()?));
3754            }
3755            _ => {}
3756        }
3757        Ok(())
3758    }
3759}
3760
3761/// The metadata bundle for [Ghast].
3762///
3763/// This type should generally not be used directly.
3764#[derive(Bundle)]
3765pub struct GhastMetadataBundle {
3766    _marker: Ghast,
3767    parent: AbstractInsentientMetadataBundle,
3768    is_charging: IsCharging,
3769}
3770impl Default for GhastMetadataBundle {
3771    fn default() -> Self {
3772        Self {
3773            _marker: Ghast,
3774            parent: Default::default(),
3775            is_charging: IsCharging(false),
3776        }
3777    }
3778}
3779
3780/// A metadata field for [Phantom].
3781#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3782pub struct PhantomSize(pub i32);
3783/// The marker component for entities of type `minecraft:phantom`.
3784///
3785/// # Metadata
3786///
3787/// These are the metadata components that all `Phantom` entities are guaranteed
3788/// to have, in addition to the metadata components from parent types:
3789///
3790/// - [PhantomSize]
3791///
3792/// # Parents
3793///
3794/// Entities with `Phantom` will also have the following marker components and
3795/// their metadata fields:
3796///
3797/// - [AbstractInsentient]
3798/// - [AbstractLiving]
3799/// - [AbstractEntity]
3800///
3801/// # Children
3802///
3803/// This entity type has no children types.
3804#[derive(Component)]
3805pub struct Phantom;
3806impl Phantom {
3807    fn apply_metadata(
3808        entity: &mut bevy_ecs::system::EntityCommands,
3809        d: EntityDataItem,
3810    ) -> Result<(), UpdateMetadataError> {
3811        match d.index {
3812            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3813            16 => {
3814                entity.insert(PhantomSize(d.value.into_int()?));
3815            }
3816            _ => {}
3817        }
3818        Ok(())
3819    }
3820}
3821
3822/// The metadata bundle for [Phantom].
3823///
3824/// This type should generally not be used directly.
3825#[derive(Bundle)]
3826pub struct PhantomMetadataBundle {
3827    _marker: Phantom,
3828    parent: AbstractInsentientMetadataBundle,
3829    phantom_size: PhantomSize,
3830}
3831impl Default for PhantomMetadataBundle {
3832    fn default() -> Self {
3833        Self {
3834            _marker: Phantom,
3835            parent: Default::default(),
3836            phantom_size: PhantomSize(0),
3837        }
3838    }
3839}
3840
3841/// A metadata field for [Slime].
3842#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3843pub struct SlimeSize(pub i32);
3844/// The marker component for entities of type `minecraft:slime`.
3845///
3846/// # Metadata
3847///
3848/// These are the metadata components that all `Slime` entities are guaranteed
3849/// to have, in addition to the metadata components from parent types:
3850///
3851/// - [SlimeSize]
3852///
3853/// # Parents
3854///
3855/// Entities with `Slime` will also have the following marker components and
3856/// their metadata fields:
3857///
3858/// - [AbstractInsentient]
3859/// - [AbstractLiving]
3860/// - [AbstractEntity]
3861///
3862/// # Children
3863///
3864/// - [MagmaCube]
3865#[derive(Component)]
3866pub struct Slime;
3867impl Slime {
3868    fn apply_metadata(
3869        entity: &mut bevy_ecs::system::EntityCommands,
3870        d: EntityDataItem,
3871    ) -> Result<(), UpdateMetadataError> {
3872        match d.index {
3873            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
3874            16 => {
3875                entity.insert(SlimeSize(d.value.into_int()?));
3876            }
3877            _ => {}
3878        }
3879        Ok(())
3880    }
3881}
3882
3883/// The metadata bundle for [Slime].
3884///
3885/// This type should generally not be used directly.
3886#[derive(Bundle)]
3887pub struct SlimeMetadataBundle {
3888    _marker: Slime,
3889    parent: AbstractInsentientMetadataBundle,
3890    slime_size: SlimeSize,
3891}
3892impl Default for SlimeMetadataBundle {
3893    fn default() -> Self {
3894        Self {
3895            _marker: Slime,
3896            parent: Default::default(),
3897            slime_size: SlimeSize(1),
3898        }
3899    }
3900}
3901
3902/// The marker component for entities of type `minecraft:magma_cube`.
3903///
3904/// # Metadata
3905///
3906/// This entity type does not add any additional metadata. It will still have
3907/// metadata from parent types.
3908///
3909/// # Parents
3910///
3911/// Entities with `MagmaCube` will also have the following marker components and
3912/// their metadata fields:
3913///
3914/// - [Slime]
3915/// - [AbstractInsentient]
3916/// - [AbstractLiving]
3917/// - [AbstractEntity]
3918///
3919/// # Children
3920///
3921/// This entity type has no children types.
3922#[derive(Component)]
3923pub struct MagmaCube;
3924impl MagmaCube {
3925    fn apply_metadata(
3926        entity: &mut bevy_ecs::system::EntityCommands,
3927        d: EntityDataItem,
3928    ) -> Result<(), UpdateMetadataError> {
3929        match d.index {
3930            0..=16 => Slime::apply_metadata(entity, d)?,
3931            _ => {}
3932        }
3933        Ok(())
3934    }
3935}
3936
3937/// The metadata bundle for [MagmaCube].
3938///
3939/// This type should generally not be used directly.
3940#[derive(Bundle)]
3941pub struct MagmaCubeMetadataBundle {
3942    _marker: MagmaCube,
3943    parent: SlimeMetadataBundle,
3944}
3945impl Default for MagmaCubeMetadataBundle {
3946    fn default() -> Self {
3947        Self {
3948            _marker: MagmaCube,
3949            parent: Default::default(),
3950        }
3951    }
3952}
3953
3954/// An abstract entity marker component.
3955///
3956/// # Metadata
3957///
3958/// This entity type does not add any additional metadata. It will still have
3959/// metadata from parent types.
3960///
3961/// # Parents
3962///
3963/// Entities with `AbstractCreature` will also have the following marker
3964/// components and their metadata fields:
3965///
3966/// - [AbstractInsentient]
3967/// - [AbstractLiving]
3968/// - [AbstractEntity]
3969///
3970/// # Children
3971///
3972/// - [Allay]
3973/// - [CopperGolem]
3974/// - [IronGolem]
3975/// - [Pufferfish]
3976/// - [Shulker]
3977/// - [SnowGolem]
3978/// - [Tadpole]
3979/// - [AbstractAgeable]
3980///   - [Dolphin]
3981///   - [Squid]
3982///     - [GlowSquid]
3983///   - [AbstractAnimal]
3984///     - [Armadillo]
3985///     - [Axolotl]
3986///     - [Bee]
3987///     - [Chicken]
3988///     - [Cow]
3989///     - [Fox]
3990///     - [Frog]
3991///     - [Goat]
3992///     - [HappyGhast]
3993///     - [Hoglin]
3994///     - [Mooshroom]
3995///     - [Ocelot]
3996///     - [Panda]
3997///     - [Pig]
3998///     - [PolarBear]
3999///     - [Rabbit]
4000///     - [Sheep]
4001///     - [Sniffer]
4002///     - [Strider]
4003///     - [Turtle]
4004///     - [AbstractHorse]
4005///       - [Camel]
4006///         - [CamelHusk]
4007///       - [Horse]
4008///       - [SkeletonHorse]
4009///       - [ZombieHorse]
4010///       - [AbstractChestedHorse]
4011///         - [Donkey]
4012///         - [Llama]
4013///           - [TraderLlama]
4014///         - [Mule]
4015///     - [AbstractTameable]
4016///       - [Cat]
4017///       - [Nautilus]
4018///       - [Parrot]
4019///       - [Wolf]
4020///       - [ZombieNautilus]
4021///   - [AbstractVillager]
4022///     - [Villager]
4023///     - [WanderingTrader]
4024/// - [AbstractFish]
4025///   - [Cod]
4026///   - [Salmon]
4027///   - [TropicalFish]
4028/// - [AbstractMonster]
4029///   - [Blaze]
4030///   - [Bogged]
4031///   - [Breeze]
4032///   - [Creaking]
4033///   - [Creeper]
4034///   - [Enderman]
4035///   - [Endermite]
4036///   - [Giant]
4037///   - [Guardian]
4038///     - [ElderGuardian]
4039///   - [Parched]
4040///   - [Silverfish]
4041///   - [Skeleton]
4042///   - [Spider]
4043///     - [CaveSpider]
4044///   - [Stray]
4045///   - [Vex]
4046///   - [Warden]
4047///   - [Wither]
4048///   - [WitherSkeleton]
4049///   - [Zoglin]
4050///   - [Zombie]
4051///     - [Drowned]
4052///     - [Husk]
4053///     - [ZombieVillager]
4054///     - [ZombifiedPiglin]
4055///   - [AbstractPiglin]
4056///     - [Piglin]
4057///     - [PiglinBrute]
4058///   - [AbstractRaider]
4059///     - [Pillager]
4060///     - [Ravager]
4061///     - [Vindicator]
4062///     - [Witch]
4063///     - [AbstractSpellcasterIllager]
4064///       - [Evoker]
4065///       - [Illusioner]
4066#[derive(Component)]
4067pub struct AbstractCreature;
4068impl AbstractCreature {
4069    fn apply_metadata(
4070        entity: &mut bevy_ecs::system::EntityCommands,
4071        d: EntityDataItem,
4072    ) -> Result<(), UpdateMetadataError> {
4073        match d.index {
4074            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4075            _ => {}
4076        }
4077        Ok(())
4078    }
4079}
4080
4081/// The metadata bundle for [AbstractCreature].
4082///
4083/// This type should generally not be used directly.
4084#[derive(Bundle)]
4085pub struct AbstractCreatureMetadataBundle {
4086    _marker: AbstractCreature,
4087    parent: AbstractInsentientMetadataBundle,
4088}
4089impl Default for AbstractCreatureMetadataBundle {
4090    fn default() -> Self {
4091        Self {
4092            _marker: AbstractCreature,
4093            parent: Default::default(),
4094        }
4095    }
4096}
4097
4098/// A metadata field for [Allay].
4099#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4100pub struct Dancing(pub bool);
4101/// A metadata field for [Allay].
4102#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4103pub struct CanDuplicate(pub bool);
4104/// The marker component for entities of type `minecraft:allay`.
4105///
4106/// # Metadata
4107///
4108/// These are the metadata components that all `Allay` entities are guaranteed
4109/// to have, in addition to the metadata components from parent types:
4110///
4111/// - [Dancing]
4112/// - [CanDuplicate]
4113///
4114/// # Parents
4115///
4116/// Entities with `Allay` will also have the following marker components and
4117/// their metadata fields:
4118///
4119/// - [AbstractCreature]
4120/// - [AbstractInsentient]
4121/// - [AbstractLiving]
4122/// - [AbstractEntity]
4123///
4124/// # Children
4125///
4126/// This entity type has no children types.
4127#[derive(Component)]
4128pub struct Allay;
4129impl Allay {
4130    fn apply_metadata(
4131        entity: &mut bevy_ecs::system::EntityCommands,
4132        d: EntityDataItem,
4133    ) -> Result<(), UpdateMetadataError> {
4134        match d.index {
4135            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4136            16 => {
4137                entity.insert(Dancing(d.value.into_boolean()?));
4138            }
4139            17 => {
4140                entity.insert(CanDuplicate(d.value.into_boolean()?));
4141            }
4142            _ => {}
4143        }
4144        Ok(())
4145    }
4146}
4147
4148/// The metadata bundle for [Allay].
4149///
4150/// This type should generally not be used directly.
4151#[derive(Bundle)]
4152pub struct AllayMetadataBundle {
4153    _marker: Allay,
4154    parent: AbstractCreatureMetadataBundle,
4155    dancing: Dancing,
4156    can_duplicate: CanDuplicate,
4157}
4158impl Default for AllayMetadataBundle {
4159    fn default() -> Self {
4160        Self {
4161            _marker: Allay,
4162            parent: Default::default(),
4163            dancing: Dancing(false),
4164            can_duplicate: CanDuplicate(true),
4165        }
4166    }
4167}
4168
4169/// A metadata field for [CopperGolem].
4170#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4171pub struct WeatherState(pub WeatheringCopperStateKind);
4172/// A metadata field for [CopperGolem].
4173#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4174pub struct CopperGolemState(pub CopperGolemStateKind);
4175/// The marker component for entities of type `minecraft:copper_golem`.
4176///
4177/// # Metadata
4178///
4179/// These are the metadata components that all `CopperGolem` entities are
4180/// guaranteed to have, in addition to the metadata components from parent
4181/// types:
4182///
4183/// - [WeatherState]
4184/// - [CopperGolemState]
4185///
4186/// # Parents
4187///
4188/// Entities with `CopperGolem` will also have the following marker components
4189/// and their metadata fields:
4190///
4191/// - [AbstractCreature]
4192/// - [AbstractInsentient]
4193/// - [AbstractLiving]
4194/// - [AbstractEntity]
4195///
4196/// # Children
4197///
4198/// This entity type has no children types.
4199#[derive(Component)]
4200pub struct CopperGolem;
4201impl CopperGolem {
4202    fn apply_metadata(
4203        entity: &mut bevy_ecs::system::EntityCommands,
4204        d: EntityDataItem,
4205    ) -> Result<(), UpdateMetadataError> {
4206        match d.index {
4207            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4208            16 => {
4209                entity.insert(WeatherState(d.value.into_weathering_copper_state()?));
4210            }
4211            17 => {
4212                entity.insert(CopperGolemState(d.value.into_copper_golem_state()?));
4213            }
4214            _ => {}
4215        }
4216        Ok(())
4217    }
4218}
4219
4220/// The metadata bundle for [CopperGolem].
4221///
4222/// This type should generally not be used directly.
4223#[derive(Bundle)]
4224pub struct CopperGolemMetadataBundle {
4225    _marker: CopperGolem,
4226    parent: AbstractCreatureMetadataBundle,
4227    weather_state: WeatherState,
4228    copper_golem_state: CopperGolemState,
4229}
4230impl Default for CopperGolemMetadataBundle {
4231    fn default() -> Self {
4232        Self {
4233            _marker: CopperGolem,
4234            parent: Default::default(),
4235            weather_state: WeatherState(Default::default()),
4236            copper_golem_state: CopperGolemState(Default::default()),
4237        }
4238    }
4239}
4240
4241#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4242/// A metadata field for [IronGolem].
4243pub struct PlayerCreated(pub bool);
4244/// The marker component for entities of type `minecraft:iron_golem`.
4245///
4246/// # Metadata
4247///
4248/// These are the metadata components that all `IronGolem` entities are
4249/// guaranteed to have, in addition to the metadata components from parent
4250/// types:
4251///
4252/// - [PlayerCreated]
4253///
4254/// # Parents
4255///
4256/// Entities with `IronGolem` will also have the following marker components and
4257/// their metadata fields:
4258///
4259/// - [AbstractCreature]
4260/// - [AbstractInsentient]
4261/// - [AbstractLiving]
4262/// - [AbstractEntity]
4263///
4264/// # Children
4265///
4266/// This entity type has no children types.
4267#[derive(Component)]
4268pub struct IronGolem;
4269impl IronGolem {
4270    fn apply_metadata(
4271        entity: &mut bevy_ecs::system::EntityCommands,
4272        d: EntityDataItem,
4273    ) -> Result<(), UpdateMetadataError> {
4274        match d.index {
4275            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4276            16 => {
4277                let bitfield = d.value.into_byte()?;
4278                entity.insert(PlayerCreated(bitfield & 0x1 != 0));
4279            }
4280            _ => {}
4281        }
4282        Ok(())
4283    }
4284}
4285
4286/// The metadata bundle for [IronGolem].
4287///
4288/// This type should generally not be used directly.
4289#[derive(Bundle)]
4290pub struct IronGolemMetadataBundle {
4291    _marker: IronGolem,
4292    parent: AbstractCreatureMetadataBundle,
4293    player_created: PlayerCreated,
4294}
4295impl Default for IronGolemMetadataBundle {
4296    fn default() -> Self {
4297        Self {
4298            _marker: IronGolem,
4299            parent: Default::default(),
4300            player_created: PlayerCreated(false),
4301        }
4302    }
4303}
4304
4305/// A metadata field for [Pufferfish].
4306#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4307pub struct PufferfishFromBucket(pub bool);
4308/// A metadata field for [Pufferfish].
4309#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4310pub struct PuffState(pub i32);
4311/// The marker component for entities of type `minecraft:pufferfish`.
4312///
4313/// # Metadata
4314///
4315/// These are the metadata components that all `Pufferfish` entities are
4316/// guaranteed to have, in addition to the metadata components from parent
4317/// types:
4318///
4319/// - [PufferfishFromBucket]
4320/// - [PuffState]
4321///
4322/// # Parents
4323///
4324/// Entities with `Pufferfish` will also have the following marker components
4325/// and their metadata fields:
4326///
4327/// - [AbstractCreature]
4328/// - [AbstractInsentient]
4329/// - [AbstractLiving]
4330/// - [AbstractEntity]
4331///
4332/// # Children
4333///
4334/// This entity type has no children types.
4335#[derive(Component)]
4336pub struct Pufferfish;
4337impl Pufferfish {
4338    fn apply_metadata(
4339        entity: &mut bevy_ecs::system::EntityCommands,
4340        d: EntityDataItem,
4341    ) -> Result<(), UpdateMetadataError> {
4342        match d.index {
4343            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4344            16 => {
4345                entity.insert(PufferfishFromBucket(d.value.into_boolean()?));
4346            }
4347            17 => {
4348                entity.insert(PuffState(d.value.into_int()?));
4349            }
4350            _ => {}
4351        }
4352        Ok(())
4353    }
4354}
4355
4356/// The metadata bundle for [Pufferfish].
4357///
4358/// This type should generally not be used directly.
4359#[derive(Bundle)]
4360pub struct PufferfishMetadataBundle {
4361    _marker: Pufferfish,
4362    parent: AbstractCreatureMetadataBundle,
4363    pufferfish_from_bucket: PufferfishFromBucket,
4364    puff_state: PuffState,
4365}
4366impl Default for PufferfishMetadataBundle {
4367    fn default() -> Self {
4368        Self {
4369            _marker: Pufferfish,
4370            parent: Default::default(),
4371            pufferfish_from_bucket: PufferfishFromBucket(false),
4372            puff_state: PuffState(0),
4373        }
4374    }
4375}
4376
4377/// A metadata field for [Shulker].
4378#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4379pub struct AttachFace(pub Direction);
4380/// A metadata field for [Shulker].
4381#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4382pub struct Peek(pub u8);
4383/// A metadata field for [Shulker].
4384#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4385pub struct Color(pub u8);
4386/// The marker component for entities of type `minecraft:shulker`.
4387///
4388/// # Metadata
4389///
4390/// These are the metadata components that all `Shulker` entities are guaranteed
4391/// to have, in addition to the metadata components from parent types:
4392///
4393/// - [AttachFace]
4394/// - [Peek]
4395/// - [Color]
4396///
4397/// # Parents
4398///
4399/// Entities with `Shulker` will also have the following marker components and
4400/// their metadata fields:
4401///
4402/// - [AbstractCreature]
4403/// - [AbstractInsentient]
4404/// - [AbstractLiving]
4405/// - [AbstractEntity]
4406///
4407/// # Children
4408///
4409/// This entity type has no children types.
4410#[derive(Component)]
4411pub struct Shulker;
4412impl Shulker {
4413    fn apply_metadata(
4414        entity: &mut bevy_ecs::system::EntityCommands,
4415        d: EntityDataItem,
4416    ) -> Result<(), UpdateMetadataError> {
4417        match d.index {
4418            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4419            16 => {
4420                entity.insert(AttachFace(d.value.into_direction()?));
4421            }
4422            17 => {
4423                entity.insert(Peek(d.value.into_byte()?));
4424            }
4425            18 => {
4426                entity.insert(Color(d.value.into_byte()?));
4427            }
4428            _ => {}
4429        }
4430        Ok(())
4431    }
4432}
4433
4434/// The metadata bundle for [Shulker].
4435///
4436/// This type should generally not be used directly.
4437#[derive(Bundle)]
4438pub struct ShulkerMetadataBundle {
4439    _marker: Shulker,
4440    parent: AbstractCreatureMetadataBundle,
4441    attach_face: AttachFace,
4442    peek: Peek,
4443    color: Color,
4444}
4445impl Default for ShulkerMetadataBundle {
4446    fn default() -> Self {
4447        Self {
4448            _marker: Shulker,
4449            parent: Default::default(),
4450            attach_face: AttachFace(Default::default()),
4451            peek: Peek(0),
4452            color: Color(16),
4453        }
4454    }
4455}
4456
4457#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4458/// A metadata field for [SnowGolem].
4459pub struct HasPumpkin(pub bool);
4460/// The marker component for entities of type `minecraft:snow_golem`.
4461///
4462/// # Metadata
4463///
4464/// These are the metadata components that all `SnowGolem` entities are
4465/// guaranteed to have, in addition to the metadata components from parent
4466/// types:
4467///
4468/// - [HasPumpkin]
4469///
4470/// # Parents
4471///
4472/// Entities with `SnowGolem` will also have the following marker components and
4473/// their metadata fields:
4474///
4475/// - [AbstractCreature]
4476/// - [AbstractInsentient]
4477/// - [AbstractLiving]
4478/// - [AbstractEntity]
4479///
4480/// # Children
4481///
4482/// This entity type has no children types.
4483#[derive(Component)]
4484pub struct SnowGolem;
4485impl SnowGolem {
4486    fn apply_metadata(
4487        entity: &mut bevy_ecs::system::EntityCommands,
4488        d: EntityDataItem,
4489    ) -> Result<(), UpdateMetadataError> {
4490        match d.index {
4491            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4492            16 => {
4493                let bitfield = d.value.into_byte()?;
4494                entity.insert(HasPumpkin(bitfield & 0x10 != 0));
4495            }
4496            _ => {}
4497        }
4498        Ok(())
4499    }
4500}
4501
4502/// The metadata bundle for [SnowGolem].
4503///
4504/// This type should generally not be used directly.
4505#[derive(Bundle)]
4506pub struct SnowGolemMetadataBundle {
4507    _marker: SnowGolem,
4508    parent: AbstractCreatureMetadataBundle,
4509    has_pumpkin: HasPumpkin,
4510}
4511impl Default for SnowGolemMetadataBundle {
4512    fn default() -> Self {
4513        Self {
4514            _marker: SnowGolem,
4515            parent: Default::default(),
4516            has_pumpkin: HasPumpkin(true),
4517        }
4518    }
4519}
4520
4521/// A metadata field for [Tadpole].
4522#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4523pub struct TadpoleFromBucket(pub bool);
4524/// The marker component for entities of type `minecraft:tadpole`.
4525///
4526/// # Metadata
4527///
4528/// These are the metadata components that all `Tadpole` entities are guaranteed
4529/// to have, in addition to the metadata components from parent types:
4530///
4531/// - [TadpoleFromBucket]
4532///
4533/// # Parents
4534///
4535/// Entities with `Tadpole` will also have the following marker components and
4536/// their metadata fields:
4537///
4538/// - [AbstractCreature]
4539/// - [AbstractInsentient]
4540/// - [AbstractLiving]
4541/// - [AbstractEntity]
4542///
4543/// # Children
4544///
4545/// This entity type has no children types.
4546#[derive(Component)]
4547pub struct Tadpole;
4548impl Tadpole {
4549    fn apply_metadata(
4550        entity: &mut bevy_ecs::system::EntityCommands,
4551        d: EntityDataItem,
4552    ) -> Result<(), UpdateMetadataError> {
4553        match d.index {
4554            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4555            16 => {
4556                entity.insert(TadpoleFromBucket(d.value.into_boolean()?));
4557            }
4558            _ => {}
4559        }
4560        Ok(())
4561    }
4562}
4563
4564/// The metadata bundle for [Tadpole].
4565///
4566/// This type should generally not be used directly.
4567#[derive(Bundle)]
4568pub struct TadpoleMetadataBundle {
4569    _marker: Tadpole,
4570    parent: AbstractCreatureMetadataBundle,
4571    tadpole_from_bucket: TadpoleFromBucket,
4572}
4573impl Default for TadpoleMetadataBundle {
4574    fn default() -> Self {
4575        Self {
4576            _marker: Tadpole,
4577            parent: Default::default(),
4578            tadpole_from_bucket: TadpoleFromBucket(false),
4579        }
4580    }
4581}
4582
4583/// A metadata field for [AbstractAgeable].
4584#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4585pub struct AbstractAgeableBaby(pub bool);
4586/// An abstract entity marker component.
4587///
4588/// # Metadata
4589///
4590/// These are the metadata components that all `AbstractAgeable` entities are
4591/// guaranteed to have, in addition to the metadata components from parent
4592/// types:
4593///
4594/// - [AbstractAgeableBaby]
4595///
4596/// # Parents
4597///
4598/// Entities with `AbstractAgeable` will also have the following marker
4599/// components and their metadata fields:
4600///
4601/// - [AbstractCreature]
4602/// - [AbstractInsentient]
4603/// - [AbstractLiving]
4604/// - [AbstractEntity]
4605///
4606/// # Children
4607///
4608/// - [Dolphin]
4609/// - [Squid]
4610///   - [GlowSquid]
4611/// - [AbstractAnimal]
4612///   - [Armadillo]
4613///   - [Axolotl]
4614///   - [Bee]
4615///   - [Chicken]
4616///   - [Cow]
4617///   - [Fox]
4618///   - [Frog]
4619///   - [Goat]
4620///   - [HappyGhast]
4621///   - [Hoglin]
4622///   - [Mooshroom]
4623///   - [Ocelot]
4624///   - [Panda]
4625///   - [Pig]
4626///   - [PolarBear]
4627///   - [Rabbit]
4628///   - [Sheep]
4629///   - [Sniffer]
4630///   - [Strider]
4631///   - [Turtle]
4632///   - [AbstractHorse]
4633///     - [Camel]
4634///       - [CamelHusk]
4635///     - [Horse]
4636///     - [SkeletonHorse]
4637///     - [ZombieHorse]
4638///     - [AbstractChestedHorse]
4639///       - [Donkey]
4640///       - [Llama]
4641///         - [TraderLlama]
4642///       - [Mule]
4643///   - [AbstractTameable]
4644///     - [Cat]
4645///     - [Nautilus]
4646///     - [Parrot]
4647///     - [Wolf]
4648///     - [ZombieNautilus]
4649/// - [AbstractVillager]
4650///   - [Villager]
4651///   - [WanderingTrader]
4652#[derive(Component)]
4653pub struct AbstractAgeable;
4654impl AbstractAgeable {
4655    fn apply_metadata(
4656        entity: &mut bevy_ecs::system::EntityCommands,
4657        d: EntityDataItem,
4658    ) -> Result<(), UpdateMetadataError> {
4659        match d.index {
4660            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4661            16 => {
4662                entity.insert(AbstractAgeableBaby(d.value.into_boolean()?));
4663            }
4664            _ => {}
4665        }
4666        Ok(())
4667    }
4668}
4669
4670/// The metadata bundle for [AbstractAgeable].
4671///
4672/// This type should generally not be used directly.
4673#[derive(Bundle)]
4674pub struct AbstractAgeableMetadataBundle {
4675    _marker: AbstractAgeable,
4676    parent: AbstractCreatureMetadataBundle,
4677    abstract_ageable_baby: AbstractAgeableBaby,
4678}
4679impl Default for AbstractAgeableMetadataBundle {
4680    fn default() -> Self {
4681        Self {
4682            _marker: AbstractAgeable,
4683            parent: Default::default(),
4684            abstract_ageable_baby: AbstractAgeableBaby(false),
4685        }
4686    }
4687}
4688
4689/// A metadata field for [Dolphin].
4690#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4691pub struct GotFish(pub bool);
4692/// A metadata field for [Dolphin].
4693#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4694pub struct MoistnessLevel(pub i32);
4695/// The marker component for entities of type `minecraft:dolphin`.
4696///
4697/// # Metadata
4698///
4699/// These are the metadata components that all `Dolphin` entities are guaranteed
4700/// to have, in addition to the metadata components from parent types:
4701///
4702/// - [GotFish]
4703/// - [MoistnessLevel]
4704///
4705/// # Parents
4706///
4707/// Entities with `Dolphin` will also have the following marker components and
4708/// their metadata fields:
4709///
4710/// - [AbstractAgeable]
4711/// - [AbstractCreature]
4712/// - [AbstractInsentient]
4713/// - [AbstractLiving]
4714/// - [AbstractEntity]
4715///
4716/// # Children
4717///
4718/// This entity type has no children types.
4719#[derive(Component)]
4720pub struct Dolphin;
4721impl Dolphin {
4722    fn apply_metadata(
4723        entity: &mut bevy_ecs::system::EntityCommands,
4724        d: EntityDataItem,
4725    ) -> Result<(), UpdateMetadataError> {
4726        match d.index {
4727            0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
4728            17 => {
4729                entity.insert(GotFish(d.value.into_boolean()?));
4730            }
4731            18 => {
4732                entity.insert(MoistnessLevel(d.value.into_int()?));
4733            }
4734            _ => {}
4735        }
4736        Ok(())
4737    }
4738}
4739
4740/// The metadata bundle for [Dolphin].
4741///
4742/// This type should generally not be used directly.
4743#[derive(Bundle)]
4744pub struct DolphinMetadataBundle {
4745    _marker: Dolphin,
4746    parent: AbstractAgeableMetadataBundle,
4747    got_fish: GotFish,
4748    moistness_level: MoistnessLevel,
4749}
4750impl Default for DolphinMetadataBundle {
4751    fn default() -> Self {
4752        Self {
4753            _marker: Dolphin,
4754            parent: Default::default(),
4755            got_fish: GotFish(false),
4756            moistness_level: MoistnessLevel(2400),
4757        }
4758    }
4759}
4760
4761/// The marker component for entities of type `minecraft:squid`.
4762///
4763/// # Metadata
4764///
4765/// This entity type does not add any additional metadata. It will still have
4766/// metadata from parent types.
4767///
4768/// # Parents
4769///
4770/// Entities with `Squid` will also have the following marker components and
4771/// their metadata fields:
4772///
4773/// - [AbstractAgeable]
4774/// - [AbstractCreature]
4775/// - [AbstractInsentient]
4776/// - [AbstractLiving]
4777/// - [AbstractEntity]
4778///
4779/// # Children
4780///
4781/// - [GlowSquid]
4782#[derive(Component)]
4783pub struct Squid;
4784impl Squid {
4785    fn apply_metadata(
4786        entity: &mut bevy_ecs::system::EntityCommands,
4787        d: EntityDataItem,
4788    ) -> Result<(), UpdateMetadataError> {
4789        match d.index {
4790            0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
4791            _ => {}
4792        }
4793        Ok(())
4794    }
4795}
4796
4797/// The metadata bundle for [Squid].
4798///
4799/// This type should generally not be used directly.
4800#[derive(Bundle)]
4801pub struct SquidMetadataBundle {
4802    _marker: Squid,
4803    parent: AbstractAgeableMetadataBundle,
4804}
4805impl Default for SquidMetadataBundle {
4806    fn default() -> Self {
4807        Self {
4808            _marker: Squid,
4809            parent: Default::default(),
4810        }
4811    }
4812}
4813
4814/// A metadata field for [GlowSquid].
4815#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4816pub struct DarkTicksRemaining(pub i32);
4817/// The marker component for entities of type `minecraft:glow_squid`.
4818///
4819/// # Metadata
4820///
4821/// These are the metadata components that all `GlowSquid` entities are
4822/// guaranteed to have, in addition to the metadata components from parent
4823/// types:
4824///
4825/// - [DarkTicksRemaining]
4826///
4827/// # Parents
4828///
4829/// Entities with `GlowSquid` will also have the following marker components and
4830/// their metadata fields:
4831///
4832/// - [Squid]
4833/// - [AbstractAgeable]
4834/// - [AbstractCreature]
4835/// - [AbstractInsentient]
4836/// - [AbstractLiving]
4837/// - [AbstractEntity]
4838///
4839/// # Children
4840///
4841/// This entity type has no children types.
4842#[derive(Component)]
4843pub struct GlowSquid;
4844impl GlowSquid {
4845    fn apply_metadata(
4846        entity: &mut bevy_ecs::system::EntityCommands,
4847        d: EntityDataItem,
4848    ) -> Result<(), UpdateMetadataError> {
4849        match d.index {
4850            0..=16 => Squid::apply_metadata(entity, d)?,
4851            17 => {
4852                entity.insert(DarkTicksRemaining(d.value.into_int()?));
4853            }
4854            _ => {}
4855        }
4856        Ok(())
4857    }
4858}
4859
4860/// The metadata bundle for [GlowSquid].
4861///
4862/// This type should generally not be used directly.
4863#[derive(Bundle)]
4864pub struct GlowSquidMetadataBundle {
4865    _marker: GlowSquid,
4866    parent: SquidMetadataBundle,
4867    dark_ticks_remaining: DarkTicksRemaining,
4868}
4869impl Default for GlowSquidMetadataBundle {
4870    fn default() -> Self {
4871        Self {
4872            _marker: GlowSquid,
4873            parent: Default::default(),
4874            dark_ticks_remaining: DarkTicksRemaining(0),
4875        }
4876    }
4877}
4878
4879/// An abstract entity marker component.
4880///
4881/// # Metadata
4882///
4883/// This entity type does not add any additional metadata. It will still have
4884/// metadata from parent types.
4885///
4886/// # Parents
4887///
4888/// Entities with `AbstractAnimal` will also have the following marker
4889/// components and their metadata fields:
4890///
4891/// - [AbstractAgeable]
4892/// - [AbstractCreature]
4893/// - [AbstractInsentient]
4894/// - [AbstractLiving]
4895/// - [AbstractEntity]
4896///
4897/// # Children
4898///
4899/// - [Armadillo]
4900/// - [Axolotl]
4901/// - [Bee]
4902/// - [Chicken]
4903/// - [Cow]
4904/// - [Fox]
4905/// - [Frog]
4906/// - [Goat]
4907/// - [HappyGhast]
4908/// - [Hoglin]
4909/// - [Mooshroom]
4910/// - [Ocelot]
4911/// - [Panda]
4912/// - [Pig]
4913/// - [PolarBear]
4914/// - [Rabbit]
4915/// - [Sheep]
4916/// - [Sniffer]
4917/// - [Strider]
4918/// - [Turtle]
4919/// - [AbstractHorse]
4920///   - [Camel]
4921///     - [CamelHusk]
4922///   - [Horse]
4923///   - [SkeletonHorse]
4924///   - [ZombieHorse]
4925///   - [AbstractChestedHorse]
4926///     - [Donkey]
4927///     - [Llama]
4928///       - [TraderLlama]
4929///     - [Mule]
4930/// - [AbstractTameable]
4931///   - [Cat]
4932///   - [Nautilus]
4933///   - [Parrot]
4934///   - [Wolf]
4935///   - [ZombieNautilus]
4936#[derive(Component)]
4937pub struct AbstractAnimal;
4938impl AbstractAnimal {
4939    fn apply_metadata(
4940        entity: &mut bevy_ecs::system::EntityCommands,
4941        d: EntityDataItem,
4942    ) -> Result<(), UpdateMetadataError> {
4943        match d.index {
4944            0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
4945            _ => {}
4946        }
4947        Ok(())
4948    }
4949}
4950
4951/// The metadata bundle for [AbstractAnimal].
4952///
4953/// This type should generally not be used directly.
4954#[derive(Bundle)]
4955pub struct AbstractAnimalMetadataBundle {
4956    _marker: AbstractAnimal,
4957    parent: AbstractAgeableMetadataBundle,
4958}
4959impl Default for AbstractAnimalMetadataBundle {
4960    fn default() -> Self {
4961        Self {
4962            _marker: AbstractAnimal,
4963            parent: Default::default(),
4964        }
4965    }
4966}
4967
4968/// A metadata field for [Armadillo].
4969#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4970pub struct ArmadilloState(pub ArmadilloStateKind);
4971/// The marker component for entities of type `minecraft:armadillo`.
4972///
4973/// # Metadata
4974///
4975/// These are the metadata components that all `Armadillo` entities are
4976/// guaranteed to have, in addition to the metadata components from parent
4977/// types:
4978///
4979/// - [ArmadilloState]
4980///
4981/// # Parents
4982///
4983/// Entities with `Armadillo` will also have the following marker components and
4984/// their metadata fields:
4985///
4986/// - [AbstractAnimal]
4987/// - [AbstractAgeable]
4988/// - [AbstractCreature]
4989/// - [AbstractInsentient]
4990/// - [AbstractLiving]
4991/// - [AbstractEntity]
4992///
4993/// # Children
4994///
4995/// This entity type has no children types.
4996#[derive(Component)]
4997pub struct Armadillo;
4998impl Armadillo {
4999    fn apply_metadata(
5000        entity: &mut bevy_ecs::system::EntityCommands,
5001        d: EntityDataItem,
5002    ) -> Result<(), UpdateMetadataError> {
5003        match d.index {
5004            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5005            17 => {
5006                entity.insert(ArmadilloState(d.value.into_armadillo_state()?));
5007            }
5008            _ => {}
5009        }
5010        Ok(())
5011    }
5012}
5013
5014/// The metadata bundle for [Armadillo].
5015///
5016/// This type should generally not be used directly.
5017#[derive(Bundle)]
5018pub struct ArmadilloMetadataBundle {
5019    _marker: Armadillo,
5020    parent: AbstractAnimalMetadataBundle,
5021    armadillo_state: ArmadilloState,
5022}
5023impl Default for ArmadilloMetadataBundle {
5024    fn default() -> Self {
5025        Self {
5026            _marker: Armadillo,
5027            parent: Default::default(),
5028            armadillo_state: ArmadilloState(Default::default()),
5029        }
5030    }
5031}
5032
5033/// A metadata field for [Axolotl].
5034#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5035pub struct AxolotlVariant(pub i32);
5036/// A metadata field for [Axolotl].
5037#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5038pub struct PlayingDead(pub bool);
5039/// A metadata field for [Axolotl].
5040#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5041pub struct AxolotlFromBucket(pub bool);
5042/// The marker component for entities of type `minecraft:axolotl`.
5043///
5044/// # Metadata
5045///
5046/// These are the metadata components that all `Axolotl` entities are guaranteed
5047/// to have, in addition to the metadata components from parent types:
5048///
5049/// - [AxolotlVariant]
5050/// - [PlayingDead]
5051/// - [AxolotlFromBucket]
5052///
5053/// # Parents
5054///
5055/// Entities with `Axolotl` will also have the following marker components and
5056/// their metadata fields:
5057///
5058/// - [AbstractAnimal]
5059/// - [AbstractAgeable]
5060/// - [AbstractCreature]
5061/// - [AbstractInsentient]
5062/// - [AbstractLiving]
5063/// - [AbstractEntity]
5064///
5065/// # Children
5066///
5067/// This entity type has no children types.
5068#[derive(Component)]
5069pub struct Axolotl;
5070impl Axolotl {
5071    fn apply_metadata(
5072        entity: &mut bevy_ecs::system::EntityCommands,
5073        d: EntityDataItem,
5074    ) -> Result<(), UpdateMetadataError> {
5075        match d.index {
5076            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5077            17 => {
5078                entity.insert(AxolotlVariant(d.value.into_int()?));
5079            }
5080            18 => {
5081                entity.insert(PlayingDead(d.value.into_boolean()?));
5082            }
5083            19 => {
5084                entity.insert(AxolotlFromBucket(d.value.into_boolean()?));
5085            }
5086            _ => {}
5087        }
5088        Ok(())
5089    }
5090}
5091
5092/// The metadata bundle for [Axolotl].
5093///
5094/// This type should generally not be used directly.
5095#[derive(Bundle)]
5096pub struct AxolotlMetadataBundle {
5097    _marker: Axolotl,
5098    parent: AbstractAnimalMetadataBundle,
5099    axolotl_variant: AxolotlVariant,
5100    playing_dead: PlayingDead,
5101    axolotl_from_bucket: AxolotlFromBucket,
5102}
5103impl Default for AxolotlMetadataBundle {
5104    fn default() -> Self {
5105        Self {
5106            _marker: Axolotl,
5107            parent: Default::default(),
5108            axolotl_variant: AxolotlVariant(0),
5109            playing_dead: PlayingDead(false),
5110            axolotl_from_bucket: AxolotlFromBucket(false),
5111        }
5112    }
5113}
5114
5115#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5116/// A metadata field for [Bee].
5117pub struct HasNectar(pub bool);
5118#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5119/// A metadata field for [Bee].
5120pub struct HasStung(pub bool);
5121#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5122/// A metadata field for [Bee].
5123pub struct BeeRolling(pub bool);
5124/// A metadata field for [Bee].
5125#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5126pub struct BeeAngerEndTime(pub i64);
5127/// The marker component for entities of type `minecraft:bee`.
5128///
5129/// # Metadata
5130///
5131/// These are the metadata components that all `Bee` entities are guaranteed to
5132/// have, in addition to the metadata components from parent types:
5133///
5134/// - [HasNectar]
5135/// - [HasStung]
5136/// - [BeeRolling]
5137/// - [BeeAngerEndTime]
5138///
5139/// # Parents
5140///
5141/// Entities with `Bee` will also have the following marker components and their
5142/// metadata fields:
5143///
5144/// - [AbstractAnimal]
5145/// - [AbstractAgeable]
5146/// - [AbstractCreature]
5147/// - [AbstractInsentient]
5148/// - [AbstractLiving]
5149/// - [AbstractEntity]
5150///
5151/// # Children
5152///
5153/// This entity type has no children types.
5154#[derive(Component)]
5155pub struct Bee;
5156impl Bee {
5157    fn apply_metadata(
5158        entity: &mut bevy_ecs::system::EntityCommands,
5159        d: EntityDataItem,
5160    ) -> Result<(), UpdateMetadataError> {
5161        match d.index {
5162            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5163            17 => {
5164                let bitfield = d.value.into_byte()?;
5165                entity.insert(HasNectar(bitfield & 0x8 != 0));
5166                entity.insert(HasStung(bitfield & 0x4 != 0));
5167                entity.insert(BeeRolling(bitfield & 0x2 != 0));
5168            }
5169            18 => {
5170                entity.insert(BeeAngerEndTime(d.value.into_long()?));
5171            }
5172            _ => {}
5173        }
5174        Ok(())
5175    }
5176}
5177
5178/// The metadata bundle for [Bee].
5179///
5180/// This type should generally not be used directly.
5181#[derive(Bundle)]
5182pub struct BeeMetadataBundle {
5183    _marker: Bee,
5184    parent: AbstractAnimalMetadataBundle,
5185    has_nectar: HasNectar,
5186    has_stung: HasStung,
5187    bee_rolling: BeeRolling,
5188    bee_anger_end_time: BeeAngerEndTime,
5189}
5190impl Default for BeeMetadataBundle {
5191    fn default() -> Self {
5192        Self {
5193            _marker: Bee,
5194            parent: Default::default(),
5195            has_nectar: HasNectar(false),
5196            has_stung: HasStung(false),
5197            bee_rolling: BeeRolling(false),
5198            bee_anger_end_time: BeeAngerEndTime(-1),
5199        }
5200    }
5201}
5202
5203/// A metadata field for [Chicken].
5204#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5205pub struct ChickenVariant(pub azalea_registry::data::ChickenVariant);
5206/// The marker component for entities of type `minecraft:chicken`.
5207///
5208/// # Metadata
5209///
5210/// These are the metadata components that all `Chicken` entities are guaranteed
5211/// to have, in addition to the metadata components from parent types:
5212///
5213/// - [ChickenVariant]
5214///
5215/// # Parents
5216///
5217/// Entities with `Chicken` will also have the following marker components and
5218/// their metadata fields:
5219///
5220/// - [AbstractAnimal]
5221/// - [AbstractAgeable]
5222/// - [AbstractCreature]
5223/// - [AbstractInsentient]
5224/// - [AbstractLiving]
5225/// - [AbstractEntity]
5226///
5227/// # Children
5228///
5229/// This entity type has no children types.
5230#[derive(Component)]
5231pub struct Chicken;
5232impl Chicken {
5233    fn apply_metadata(
5234        entity: &mut bevy_ecs::system::EntityCommands,
5235        d: EntityDataItem,
5236    ) -> Result<(), UpdateMetadataError> {
5237        match d.index {
5238            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5239            17 => {
5240                entity.insert(ChickenVariant(d.value.into_chicken_variant()?));
5241            }
5242            _ => {}
5243        }
5244        Ok(())
5245    }
5246}
5247
5248/// The metadata bundle for [Chicken].
5249///
5250/// This type should generally not be used directly.
5251#[derive(Bundle)]
5252pub struct ChickenMetadataBundle {
5253    _marker: Chicken,
5254    parent: AbstractAnimalMetadataBundle,
5255    chicken_variant: ChickenVariant,
5256}
5257impl Default for ChickenMetadataBundle {
5258    fn default() -> Self {
5259        Self {
5260            _marker: Chicken,
5261            parent: Default::default(),
5262            chicken_variant: ChickenVariant(azalea_registry::data::ChickenVariant::new_raw(0)),
5263        }
5264    }
5265}
5266
5267/// A metadata field for [Cow].
5268#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5269pub struct CowVariant(pub azalea_registry::data::CowVariant);
5270/// The marker component for entities of type `minecraft:cow`.
5271///
5272/// # Metadata
5273///
5274/// These are the metadata components that all `Cow` entities are guaranteed to
5275/// have, in addition to the metadata components from parent types:
5276///
5277/// - [CowVariant]
5278///
5279/// # Parents
5280///
5281/// Entities with `Cow` will also have the following marker components and their
5282/// metadata fields:
5283///
5284/// - [AbstractAnimal]
5285/// - [AbstractAgeable]
5286/// - [AbstractCreature]
5287/// - [AbstractInsentient]
5288/// - [AbstractLiving]
5289/// - [AbstractEntity]
5290///
5291/// # Children
5292///
5293/// This entity type has no children types.
5294#[derive(Component)]
5295pub struct Cow;
5296impl Cow {
5297    fn apply_metadata(
5298        entity: &mut bevy_ecs::system::EntityCommands,
5299        d: EntityDataItem,
5300    ) -> Result<(), UpdateMetadataError> {
5301        match d.index {
5302            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5303            17 => {
5304                entity.insert(CowVariant(d.value.into_cow_variant()?));
5305            }
5306            _ => {}
5307        }
5308        Ok(())
5309    }
5310}
5311
5312/// The metadata bundle for [Cow].
5313///
5314/// This type should generally not be used directly.
5315#[derive(Bundle)]
5316pub struct CowMetadataBundle {
5317    _marker: Cow,
5318    parent: AbstractAnimalMetadataBundle,
5319    cow_variant: CowVariant,
5320}
5321impl Default for CowMetadataBundle {
5322    fn default() -> Self {
5323        Self {
5324            _marker: Cow,
5325            parent: Default::default(),
5326            cow_variant: CowVariant(azalea_registry::data::CowVariant::new_raw(0)),
5327        }
5328    }
5329}
5330
5331/// A metadata field for [Fox].
5332#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5333pub struct FoxKind(pub i32);
5334#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5335/// A metadata field for [Fox].
5336pub struct FoxSitting(pub bool);
5337#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5338/// A metadata field for [Fox].
5339pub struct Faceplanted(pub bool);
5340#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5341/// A metadata field for [Fox].
5342pub struct Defending(pub bool);
5343#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5344/// A metadata field for [Fox].
5345pub struct Sleeping(pub bool);
5346#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5347/// A metadata field for [Fox].
5348pub struct Pouncing(pub bool);
5349#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5350/// A metadata field for [Fox].
5351pub struct FoxCrouching(pub bool);
5352#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5353/// A metadata field for [Fox].
5354pub struct FoxInterested(pub bool);
5355/// A metadata field for [Fox].
5356#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5357pub struct TrustedId0(pub Option<Uuid>);
5358/// A metadata field for [Fox].
5359#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5360pub struct TrustedId1(pub Option<Uuid>);
5361/// The marker component for entities of type `minecraft:fox`.
5362///
5363/// # Metadata
5364///
5365/// These are the metadata components that all `Fox` entities are guaranteed to
5366/// have, in addition to the metadata components from parent types:
5367///
5368/// - [FoxKind]
5369/// - [FoxSitting]
5370/// - [Faceplanted]
5371/// - [Defending]
5372/// - [Sleeping]
5373/// - [Pouncing]
5374/// - [FoxCrouching]
5375/// - [FoxInterested]
5376/// - [TrustedId0]
5377/// - [TrustedId1]
5378///
5379/// # Parents
5380///
5381/// Entities with `Fox` will also have the following marker components and their
5382/// metadata fields:
5383///
5384/// - [AbstractAnimal]
5385/// - [AbstractAgeable]
5386/// - [AbstractCreature]
5387/// - [AbstractInsentient]
5388/// - [AbstractLiving]
5389/// - [AbstractEntity]
5390///
5391/// # Children
5392///
5393/// This entity type has no children types.
5394#[derive(Component)]
5395pub struct Fox;
5396impl Fox {
5397    fn apply_metadata(
5398        entity: &mut bevy_ecs::system::EntityCommands,
5399        d: EntityDataItem,
5400    ) -> Result<(), UpdateMetadataError> {
5401        match d.index {
5402            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5403            17 => {
5404                entity.insert(FoxKind(d.value.into_int()?));
5405            }
5406            18 => {
5407                let bitfield = d.value.into_byte()?;
5408                entity.insert(FoxSitting(bitfield & 0x1 != 0));
5409                entity.insert(Faceplanted(bitfield & 0x40 != 0));
5410                entity.insert(Defending(bitfield & 0x80 != 0));
5411                entity.insert(Sleeping(bitfield & 0x20 != 0));
5412                entity.insert(Pouncing(bitfield & 0x10 != 0));
5413                entity.insert(FoxCrouching(bitfield & 0x4 != 0));
5414                entity.insert(FoxInterested(bitfield & 0x8 != 0));
5415            }
5416            19 => {
5417                entity.insert(TrustedId0(d.value.into_optional_living_entity_reference()?));
5418            }
5419            20 => {
5420                entity.insert(TrustedId1(d.value.into_optional_living_entity_reference()?));
5421            }
5422            _ => {}
5423        }
5424        Ok(())
5425    }
5426}
5427
5428/// The metadata bundle for [Fox].
5429///
5430/// This type should generally not be used directly.
5431#[derive(Bundle)]
5432pub struct FoxMetadataBundle {
5433    _marker: Fox,
5434    parent: AbstractAnimalMetadataBundle,
5435    fox_kind: FoxKind,
5436    fox_sitting: FoxSitting,
5437    faceplanted: Faceplanted,
5438    defending: Defending,
5439    sleeping: Sleeping,
5440    pouncing: Pouncing,
5441    fox_crouching: FoxCrouching,
5442    fox_interested: FoxInterested,
5443    trusted_id_0: TrustedId0,
5444    trusted_id_1: TrustedId1,
5445}
5446impl Default for FoxMetadataBundle {
5447    fn default() -> Self {
5448        Self {
5449            _marker: Fox,
5450            parent: Default::default(),
5451            fox_kind: FoxKind(Default::default()),
5452            fox_sitting: FoxSitting(false),
5453            faceplanted: Faceplanted(false),
5454            defending: Defending(false),
5455            sleeping: Sleeping(false),
5456            pouncing: Pouncing(false),
5457            fox_crouching: FoxCrouching(false),
5458            fox_interested: FoxInterested(false),
5459            trusted_id_0: TrustedId0(None),
5460            trusted_id_1: TrustedId1(None),
5461        }
5462    }
5463}
5464
5465/// A metadata field for [Frog].
5466#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5467pub struct FrogVariant(pub azalea_registry::data::FrogVariant);
5468/// A metadata field for [Frog].
5469#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5470pub struct TongueTarget(pub OptionalUnsignedInt);
5471/// The marker component for entities of type `minecraft:frog`.
5472///
5473/// # Metadata
5474///
5475/// These are the metadata components that all `Frog` entities are guaranteed to
5476/// have, in addition to the metadata components from parent types:
5477///
5478/// - [FrogVariant]
5479/// - [TongueTarget]
5480///
5481/// # Parents
5482///
5483/// Entities with `Frog` will also have the following marker components and
5484/// their metadata fields:
5485///
5486/// - [AbstractAnimal]
5487/// - [AbstractAgeable]
5488/// - [AbstractCreature]
5489/// - [AbstractInsentient]
5490/// - [AbstractLiving]
5491/// - [AbstractEntity]
5492///
5493/// # Children
5494///
5495/// This entity type has no children types.
5496#[derive(Component)]
5497pub struct Frog;
5498impl Frog {
5499    fn apply_metadata(
5500        entity: &mut bevy_ecs::system::EntityCommands,
5501        d: EntityDataItem,
5502    ) -> Result<(), UpdateMetadataError> {
5503        match d.index {
5504            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5505            17 => {
5506                entity.insert(FrogVariant(d.value.into_frog_variant()?));
5507            }
5508            18 => {
5509                entity.insert(TongueTarget(d.value.into_optional_unsigned_int()?));
5510            }
5511            _ => {}
5512        }
5513        Ok(())
5514    }
5515}
5516
5517/// The metadata bundle for [Frog].
5518///
5519/// This type should generally not be used directly.
5520#[derive(Bundle)]
5521pub struct FrogMetadataBundle {
5522    _marker: Frog,
5523    parent: AbstractAnimalMetadataBundle,
5524    frog_variant: FrogVariant,
5525    tongue_target: TongueTarget,
5526}
5527impl Default for FrogMetadataBundle {
5528    fn default() -> Self {
5529        Self {
5530            _marker: Frog,
5531            parent: Default::default(),
5532            frog_variant: FrogVariant(azalea_registry::data::FrogVariant::new_raw(0)),
5533            tongue_target: TongueTarget(OptionalUnsignedInt(None)),
5534        }
5535    }
5536}
5537
5538/// A metadata field for [Goat].
5539#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5540pub struct IsScreamingGoat(pub bool);
5541/// A metadata field for [Goat].
5542#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5543pub struct HasLeftHorn(pub bool);
5544/// A metadata field for [Goat].
5545#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5546pub struct HasRightHorn(pub bool);
5547/// The marker component for entities of type `minecraft:goat`.
5548///
5549/// # Metadata
5550///
5551/// These are the metadata components that all `Goat` entities are guaranteed to
5552/// have, in addition to the metadata components from parent types:
5553///
5554/// - [IsScreamingGoat]
5555/// - [HasLeftHorn]
5556/// - [HasRightHorn]
5557///
5558/// # Parents
5559///
5560/// Entities with `Goat` will also have the following marker components and
5561/// their metadata fields:
5562///
5563/// - [AbstractAnimal]
5564/// - [AbstractAgeable]
5565/// - [AbstractCreature]
5566/// - [AbstractInsentient]
5567/// - [AbstractLiving]
5568/// - [AbstractEntity]
5569///
5570/// # Children
5571///
5572/// This entity type has no children types.
5573#[derive(Component)]
5574pub struct Goat;
5575impl Goat {
5576    fn apply_metadata(
5577        entity: &mut bevy_ecs::system::EntityCommands,
5578        d: EntityDataItem,
5579    ) -> Result<(), UpdateMetadataError> {
5580        match d.index {
5581            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5582            17 => {
5583                entity.insert(IsScreamingGoat(d.value.into_boolean()?));
5584            }
5585            18 => {
5586                entity.insert(HasLeftHorn(d.value.into_boolean()?));
5587            }
5588            19 => {
5589                entity.insert(HasRightHorn(d.value.into_boolean()?));
5590            }
5591            _ => {}
5592        }
5593        Ok(())
5594    }
5595}
5596
5597/// The metadata bundle for [Goat].
5598///
5599/// This type should generally not be used directly.
5600#[derive(Bundle)]
5601pub struct GoatMetadataBundle {
5602    _marker: Goat,
5603    parent: AbstractAnimalMetadataBundle,
5604    is_screaming_goat: IsScreamingGoat,
5605    has_left_horn: HasLeftHorn,
5606    has_right_horn: HasRightHorn,
5607}
5608impl Default for GoatMetadataBundle {
5609    fn default() -> Self {
5610        Self {
5611            _marker: Goat,
5612            parent: Default::default(),
5613            is_screaming_goat: IsScreamingGoat(false),
5614            has_left_horn: HasLeftHorn(true),
5615            has_right_horn: HasRightHorn(true),
5616        }
5617    }
5618}
5619
5620/// A metadata field for [HappyGhast].
5621#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5622pub struct IsLeashHolder(pub bool);
5623/// A metadata field for [HappyGhast].
5624#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5625pub struct StaysStill(pub bool);
5626/// The marker component for entities of type `minecraft:happy_ghast`.
5627///
5628/// # Metadata
5629///
5630/// These are the metadata components that all `HappyGhast` entities are
5631/// guaranteed to have, in addition to the metadata components from parent
5632/// types:
5633///
5634/// - [IsLeashHolder]
5635/// - [StaysStill]
5636///
5637/// # Parents
5638///
5639/// Entities with `HappyGhast` will also have the following marker components
5640/// and their metadata fields:
5641///
5642/// - [AbstractAnimal]
5643/// - [AbstractAgeable]
5644/// - [AbstractCreature]
5645/// - [AbstractInsentient]
5646/// - [AbstractLiving]
5647/// - [AbstractEntity]
5648///
5649/// # Children
5650///
5651/// This entity type has no children types.
5652#[derive(Component)]
5653pub struct HappyGhast;
5654impl HappyGhast {
5655    fn apply_metadata(
5656        entity: &mut bevy_ecs::system::EntityCommands,
5657        d: EntityDataItem,
5658    ) -> Result<(), UpdateMetadataError> {
5659        match d.index {
5660            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5661            17 => {
5662                entity.insert(IsLeashHolder(d.value.into_boolean()?));
5663            }
5664            18 => {
5665                entity.insert(StaysStill(d.value.into_boolean()?));
5666            }
5667            _ => {}
5668        }
5669        Ok(())
5670    }
5671}
5672
5673/// The metadata bundle for [HappyGhast].
5674///
5675/// This type should generally not be used directly.
5676#[derive(Bundle)]
5677pub struct HappyGhastMetadataBundle {
5678    _marker: HappyGhast,
5679    parent: AbstractAnimalMetadataBundle,
5680    is_leash_holder: IsLeashHolder,
5681    stays_still: StaysStill,
5682}
5683impl Default for HappyGhastMetadataBundle {
5684    fn default() -> Self {
5685        Self {
5686            _marker: HappyGhast,
5687            parent: Default::default(),
5688            is_leash_holder: IsLeashHolder(false),
5689            stays_still: StaysStill(false),
5690        }
5691    }
5692}
5693
5694/// A metadata field for [Hoglin].
5695#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5696pub struct HoglinImmuneToZombification(pub bool);
5697/// The marker component for entities of type `minecraft:hoglin`.
5698///
5699/// # Metadata
5700///
5701/// These are the metadata components that all `Hoglin` entities are guaranteed
5702/// to have, in addition to the metadata components from parent types:
5703///
5704/// - [HoglinImmuneToZombification]
5705///
5706/// # Parents
5707///
5708/// Entities with `Hoglin` will also have the following marker components and
5709/// their metadata fields:
5710///
5711/// - [AbstractAnimal]
5712/// - [AbstractAgeable]
5713/// - [AbstractCreature]
5714/// - [AbstractInsentient]
5715/// - [AbstractLiving]
5716/// - [AbstractEntity]
5717///
5718/// # Children
5719///
5720/// This entity type has no children types.
5721#[derive(Component)]
5722pub struct Hoglin;
5723impl Hoglin {
5724    fn apply_metadata(
5725        entity: &mut bevy_ecs::system::EntityCommands,
5726        d: EntityDataItem,
5727    ) -> Result<(), UpdateMetadataError> {
5728        match d.index {
5729            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5730            17 => {
5731                entity.insert(HoglinImmuneToZombification(d.value.into_boolean()?));
5732            }
5733            _ => {}
5734        }
5735        Ok(())
5736    }
5737}
5738
5739/// The metadata bundle for [Hoglin].
5740///
5741/// This type should generally not be used directly.
5742#[derive(Bundle)]
5743pub struct HoglinMetadataBundle {
5744    _marker: Hoglin,
5745    parent: AbstractAnimalMetadataBundle,
5746    hoglin_immune_to_zombification: HoglinImmuneToZombification,
5747}
5748impl Default for HoglinMetadataBundle {
5749    fn default() -> Self {
5750        Self {
5751            _marker: Hoglin,
5752            parent: Default::default(),
5753            hoglin_immune_to_zombification: HoglinImmuneToZombification(false),
5754        }
5755    }
5756}
5757
5758/// A metadata field for [Mooshroom].
5759#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5760pub struct MooshroomKind(pub i32);
5761/// The marker component for entities of type `minecraft:mooshroom`.
5762///
5763/// # Metadata
5764///
5765/// These are the metadata components that all `Mooshroom` entities are
5766/// guaranteed to have, in addition to the metadata components from parent
5767/// types:
5768///
5769/// - [MooshroomKind]
5770///
5771/// # Parents
5772///
5773/// Entities with `Mooshroom` will also have the following marker components and
5774/// their metadata fields:
5775///
5776/// - [AbstractAnimal]
5777/// - [AbstractAgeable]
5778/// - [AbstractCreature]
5779/// - [AbstractInsentient]
5780/// - [AbstractLiving]
5781/// - [AbstractEntity]
5782///
5783/// # Children
5784///
5785/// This entity type has no children types.
5786#[derive(Component)]
5787pub struct Mooshroom;
5788impl Mooshroom {
5789    fn apply_metadata(
5790        entity: &mut bevy_ecs::system::EntityCommands,
5791        d: EntityDataItem,
5792    ) -> Result<(), UpdateMetadataError> {
5793        match d.index {
5794            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5795            17 => {
5796                entity.insert(MooshroomKind(d.value.into_int()?));
5797            }
5798            _ => {}
5799        }
5800        Ok(())
5801    }
5802}
5803
5804/// The metadata bundle for [Mooshroom].
5805///
5806/// This type should generally not be used directly.
5807#[derive(Bundle)]
5808pub struct MooshroomMetadataBundle {
5809    _marker: Mooshroom,
5810    parent: AbstractAnimalMetadataBundle,
5811    mooshroom_kind: MooshroomKind,
5812}
5813impl Default for MooshroomMetadataBundle {
5814    fn default() -> Self {
5815        Self {
5816            _marker: Mooshroom,
5817            parent: Default::default(),
5818            mooshroom_kind: MooshroomKind(Default::default()),
5819        }
5820    }
5821}
5822
5823/// A metadata field for [Ocelot].
5824#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5825pub struct Trusting(pub bool);
5826/// The marker component for entities of type `minecraft:ocelot`.
5827///
5828/// # Metadata
5829///
5830/// These are the metadata components that all `Ocelot` entities are guaranteed
5831/// to have, in addition to the metadata components from parent types:
5832///
5833/// - [Trusting]
5834///
5835/// # Parents
5836///
5837/// Entities with `Ocelot` will also have the following marker components and
5838/// their metadata fields:
5839///
5840/// - [AbstractAnimal]
5841/// - [AbstractAgeable]
5842/// - [AbstractCreature]
5843/// - [AbstractInsentient]
5844/// - [AbstractLiving]
5845/// - [AbstractEntity]
5846///
5847/// # Children
5848///
5849/// This entity type has no children types.
5850#[derive(Component)]
5851pub struct Ocelot;
5852impl Ocelot {
5853    fn apply_metadata(
5854        entity: &mut bevy_ecs::system::EntityCommands,
5855        d: EntityDataItem,
5856    ) -> Result<(), UpdateMetadataError> {
5857        match d.index {
5858            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5859            17 => {
5860                entity.insert(Trusting(d.value.into_boolean()?));
5861            }
5862            _ => {}
5863        }
5864        Ok(())
5865    }
5866}
5867
5868/// The metadata bundle for [Ocelot].
5869///
5870/// This type should generally not be used directly.
5871#[derive(Bundle)]
5872pub struct OcelotMetadataBundle {
5873    _marker: Ocelot,
5874    parent: AbstractAnimalMetadataBundle,
5875    trusting: Trusting,
5876}
5877impl Default for OcelotMetadataBundle {
5878    fn default() -> Self {
5879        Self {
5880            _marker: Ocelot,
5881            parent: Default::default(),
5882            trusting: Trusting(false),
5883        }
5884    }
5885}
5886
5887/// A metadata field for [Panda].
5888#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5889pub struct PandaUnhappyCounter(pub i32);
5890/// A metadata field for [Panda].
5891#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5892pub struct SneezeCounter(pub i32);
5893/// A metadata field for [Panda].
5894#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5895pub struct EatCounter(pub i32);
5896#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5897/// A metadata field for [Panda].
5898pub struct Sneezing(pub bool);
5899#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5900/// A metadata field for [Panda].
5901pub struct PandaSitting(pub bool);
5902#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5903/// A metadata field for [Panda].
5904pub struct OnBack(pub bool);
5905#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5906/// A metadata field for [Panda].
5907pub struct PandaRolling(pub bool);
5908/// A metadata field for [Panda].
5909#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5910pub struct HiddenGene(pub u8);
5911/// A metadata field for [Panda].
5912#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5913pub struct PandaFlags(pub u8);
5914/// The marker component for entities of type `minecraft:panda`.
5915///
5916/// # Metadata
5917///
5918/// These are the metadata components that all `Panda` entities are guaranteed
5919/// to have, in addition to the metadata components from parent types:
5920///
5921/// - [PandaUnhappyCounter]
5922/// - [SneezeCounter]
5923/// - [EatCounter]
5924/// - [Sneezing]
5925/// - [PandaSitting]
5926/// - [OnBack]
5927/// - [PandaRolling]
5928/// - [HiddenGene]
5929/// - [PandaFlags]
5930///
5931/// # Parents
5932///
5933/// Entities with `Panda` will also have the following marker components and
5934/// their metadata fields:
5935///
5936/// - [AbstractAnimal]
5937/// - [AbstractAgeable]
5938/// - [AbstractCreature]
5939/// - [AbstractInsentient]
5940/// - [AbstractLiving]
5941/// - [AbstractEntity]
5942///
5943/// # Children
5944///
5945/// This entity type has no children types.
5946#[derive(Component)]
5947pub struct Panda;
5948impl Panda {
5949    fn apply_metadata(
5950        entity: &mut bevy_ecs::system::EntityCommands,
5951        d: EntityDataItem,
5952    ) -> Result<(), UpdateMetadataError> {
5953        match d.index {
5954            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
5955            17 => {
5956                entity.insert(PandaUnhappyCounter(d.value.into_int()?));
5957            }
5958            18 => {
5959                entity.insert(SneezeCounter(d.value.into_int()?));
5960            }
5961            19 => {
5962                entity.insert(EatCounter(d.value.into_int()?));
5963            }
5964            20 => {
5965                let bitfield = d.value.into_byte()?;
5966                entity.insert(Sneezing(bitfield & 0x2 != 0));
5967                entity.insert(PandaSitting(bitfield & 0x8 != 0));
5968                entity.insert(OnBack(bitfield & 0x10 != 0));
5969                entity.insert(PandaRolling(bitfield & 0x4 != 0));
5970            }
5971            21 => {
5972                entity.insert(HiddenGene(d.value.into_byte()?));
5973            }
5974            22 => {
5975                entity.insert(PandaFlags(d.value.into_byte()?));
5976            }
5977            _ => {}
5978        }
5979        Ok(())
5980    }
5981}
5982
5983/// The metadata bundle for [Panda].
5984///
5985/// This type should generally not be used directly.
5986#[derive(Bundle)]
5987pub struct PandaMetadataBundle {
5988    _marker: Panda,
5989    parent: AbstractAnimalMetadataBundle,
5990    panda_unhappy_counter: PandaUnhappyCounter,
5991    sneeze_counter: SneezeCounter,
5992    eat_counter: EatCounter,
5993    sneezing: Sneezing,
5994    panda_sitting: PandaSitting,
5995    on_back: OnBack,
5996    panda_rolling: PandaRolling,
5997    hidden_gene: HiddenGene,
5998    panda_flags: PandaFlags,
5999}
6000impl Default for PandaMetadataBundle {
6001    fn default() -> Self {
6002        Self {
6003            _marker: Panda,
6004            parent: Default::default(),
6005            panda_unhappy_counter: PandaUnhappyCounter(0),
6006            sneeze_counter: SneezeCounter(0),
6007            eat_counter: EatCounter(0),
6008            sneezing: Sneezing(false),
6009            panda_sitting: PandaSitting(false),
6010            on_back: OnBack(false),
6011            panda_rolling: PandaRolling(false),
6012            hidden_gene: HiddenGene(0),
6013            panda_flags: PandaFlags(0),
6014        }
6015    }
6016}
6017
6018/// A metadata field for [Pig].
6019#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6020pub struct PigBoostTime(pub i32);
6021/// A metadata field for [Pig].
6022#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6023pub struct PigVariant(pub azalea_registry::data::PigVariant);
6024/// The marker component for entities of type `minecraft:pig`.
6025///
6026/// # Metadata
6027///
6028/// These are the metadata components that all `Pig` entities are guaranteed to
6029/// have, in addition to the metadata components from parent types:
6030///
6031/// - [PigBoostTime]
6032/// - [PigVariant]
6033///
6034/// # Parents
6035///
6036/// Entities with `Pig` will also have the following marker components and their
6037/// metadata fields:
6038///
6039/// - [AbstractAnimal]
6040/// - [AbstractAgeable]
6041/// - [AbstractCreature]
6042/// - [AbstractInsentient]
6043/// - [AbstractLiving]
6044/// - [AbstractEntity]
6045///
6046/// # Children
6047///
6048/// This entity type has no children types.
6049#[derive(Component)]
6050pub struct Pig;
6051impl Pig {
6052    fn apply_metadata(
6053        entity: &mut bevy_ecs::system::EntityCommands,
6054        d: EntityDataItem,
6055    ) -> Result<(), UpdateMetadataError> {
6056        match d.index {
6057            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6058            17 => {
6059                entity.insert(PigBoostTime(d.value.into_int()?));
6060            }
6061            18 => {
6062                entity.insert(PigVariant(d.value.into_pig_variant()?));
6063            }
6064            _ => {}
6065        }
6066        Ok(())
6067    }
6068}
6069
6070/// The metadata bundle for [Pig].
6071///
6072/// This type should generally not be used directly.
6073#[derive(Bundle)]
6074pub struct PigMetadataBundle {
6075    _marker: Pig,
6076    parent: AbstractAnimalMetadataBundle,
6077    pig_boost_time: PigBoostTime,
6078    pig_variant: PigVariant,
6079}
6080impl Default for PigMetadataBundle {
6081    fn default() -> Self {
6082        Self {
6083            _marker: Pig,
6084            parent: Default::default(),
6085            pig_boost_time: PigBoostTime(0),
6086            pig_variant: PigVariant(azalea_registry::data::PigVariant::new_raw(0)),
6087        }
6088    }
6089}
6090
6091/// A metadata field for [PolarBear].
6092#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6093pub struct PolarBearStanding(pub bool);
6094/// The marker component for entities of type `minecraft:polar_bear`.
6095///
6096/// # Metadata
6097///
6098/// These are the metadata components that all `PolarBear` entities are
6099/// guaranteed to have, in addition to the metadata components from parent
6100/// types:
6101///
6102/// - [PolarBearStanding]
6103///
6104/// # Parents
6105///
6106/// Entities with `PolarBear` will also have the following marker components and
6107/// their metadata fields:
6108///
6109/// - [AbstractAnimal]
6110/// - [AbstractAgeable]
6111/// - [AbstractCreature]
6112/// - [AbstractInsentient]
6113/// - [AbstractLiving]
6114/// - [AbstractEntity]
6115///
6116/// # Children
6117///
6118/// This entity type has no children types.
6119#[derive(Component)]
6120pub struct PolarBear;
6121impl PolarBear {
6122    fn apply_metadata(
6123        entity: &mut bevy_ecs::system::EntityCommands,
6124        d: EntityDataItem,
6125    ) -> Result<(), UpdateMetadataError> {
6126        match d.index {
6127            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6128            17 => {
6129                entity.insert(PolarBearStanding(d.value.into_boolean()?));
6130            }
6131            _ => {}
6132        }
6133        Ok(())
6134    }
6135}
6136
6137/// The metadata bundle for [PolarBear].
6138///
6139/// This type should generally not be used directly.
6140#[derive(Bundle)]
6141pub struct PolarBearMetadataBundle {
6142    _marker: PolarBear,
6143    parent: AbstractAnimalMetadataBundle,
6144    polar_bear_standing: PolarBearStanding,
6145}
6146impl Default for PolarBearMetadataBundle {
6147    fn default() -> Self {
6148        Self {
6149            _marker: PolarBear,
6150            parent: Default::default(),
6151            polar_bear_standing: PolarBearStanding(false),
6152        }
6153    }
6154}
6155
6156/// A metadata field for [Rabbit].
6157#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6158pub struct RabbitKind(pub i32);
6159/// The marker component for entities of type `minecraft:rabbit`.
6160///
6161/// # Metadata
6162///
6163/// These are the metadata components that all `Rabbit` entities are guaranteed
6164/// to have, in addition to the metadata components from parent types:
6165///
6166/// - [RabbitKind]
6167///
6168/// # Parents
6169///
6170/// Entities with `Rabbit` will also have the following marker components and
6171/// their metadata fields:
6172///
6173/// - [AbstractAnimal]
6174/// - [AbstractAgeable]
6175/// - [AbstractCreature]
6176/// - [AbstractInsentient]
6177/// - [AbstractLiving]
6178/// - [AbstractEntity]
6179///
6180/// # Children
6181///
6182/// This entity type has no children types.
6183#[derive(Component)]
6184pub struct Rabbit;
6185impl Rabbit {
6186    fn apply_metadata(
6187        entity: &mut bevy_ecs::system::EntityCommands,
6188        d: EntityDataItem,
6189    ) -> Result<(), UpdateMetadataError> {
6190        match d.index {
6191            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6192            17 => {
6193                entity.insert(RabbitKind(d.value.into_int()?));
6194            }
6195            _ => {}
6196        }
6197        Ok(())
6198    }
6199}
6200
6201/// The metadata bundle for [Rabbit].
6202///
6203/// This type should generally not be used directly.
6204#[derive(Bundle)]
6205pub struct RabbitMetadataBundle {
6206    _marker: Rabbit,
6207    parent: AbstractAnimalMetadataBundle,
6208    rabbit_kind: RabbitKind,
6209}
6210impl Default for RabbitMetadataBundle {
6211    fn default() -> Self {
6212        Self {
6213            _marker: Rabbit,
6214            parent: Default::default(),
6215            rabbit_kind: RabbitKind(Default::default()),
6216        }
6217    }
6218}
6219
6220#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6221/// A metadata field for [Sheep].
6222pub struct SheepSheared(pub bool);
6223/// The marker component for entities of type `minecraft:sheep`.
6224///
6225/// # Metadata
6226///
6227/// These are the metadata components that all `Sheep` entities are guaranteed
6228/// to have, in addition to the metadata components from parent types:
6229///
6230/// - [SheepSheared]
6231///
6232/// # Parents
6233///
6234/// Entities with `Sheep` will also have the following marker components and
6235/// their metadata fields:
6236///
6237/// - [AbstractAnimal]
6238/// - [AbstractAgeable]
6239/// - [AbstractCreature]
6240/// - [AbstractInsentient]
6241/// - [AbstractLiving]
6242/// - [AbstractEntity]
6243///
6244/// # Children
6245///
6246/// This entity type has no children types.
6247#[derive(Component)]
6248pub struct Sheep;
6249impl Sheep {
6250    fn apply_metadata(
6251        entity: &mut bevy_ecs::system::EntityCommands,
6252        d: EntityDataItem,
6253    ) -> Result<(), UpdateMetadataError> {
6254        match d.index {
6255            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6256            17 => {
6257                let bitfield = d.value.into_byte()?;
6258                entity.insert(SheepSheared(bitfield & 0x10 != 0));
6259            }
6260            _ => {}
6261        }
6262        Ok(())
6263    }
6264}
6265
6266/// The metadata bundle for [Sheep].
6267///
6268/// This type should generally not be used directly.
6269#[derive(Bundle)]
6270pub struct SheepMetadataBundle {
6271    _marker: Sheep,
6272    parent: AbstractAnimalMetadataBundle,
6273    sheep_sheared: SheepSheared,
6274}
6275impl Default for SheepMetadataBundle {
6276    fn default() -> Self {
6277        Self {
6278            _marker: Sheep,
6279            parent: Default::default(),
6280            sheep_sheared: SheepSheared(false),
6281        }
6282    }
6283}
6284
6285/// A metadata field for [Sniffer].
6286#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6287pub struct SnifferState(pub SnifferStateKind);
6288/// A metadata field for [Sniffer].
6289#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6290pub struct DropSeedAtTick(pub i32);
6291/// The marker component for entities of type `minecraft:sniffer`.
6292///
6293/// # Metadata
6294///
6295/// These are the metadata components that all `Sniffer` entities are guaranteed
6296/// to have, in addition to the metadata components from parent types:
6297///
6298/// - [SnifferState]
6299/// - [DropSeedAtTick]
6300///
6301/// # Parents
6302///
6303/// Entities with `Sniffer` will also have the following marker components and
6304/// their metadata fields:
6305///
6306/// - [AbstractAnimal]
6307/// - [AbstractAgeable]
6308/// - [AbstractCreature]
6309/// - [AbstractInsentient]
6310/// - [AbstractLiving]
6311/// - [AbstractEntity]
6312///
6313/// # Children
6314///
6315/// This entity type has no children types.
6316#[derive(Component)]
6317pub struct Sniffer;
6318impl Sniffer {
6319    fn apply_metadata(
6320        entity: &mut bevy_ecs::system::EntityCommands,
6321        d: EntityDataItem,
6322    ) -> Result<(), UpdateMetadataError> {
6323        match d.index {
6324            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6325            17 => {
6326                entity.insert(SnifferState(d.value.into_sniffer_state()?));
6327            }
6328            18 => {
6329                entity.insert(DropSeedAtTick(d.value.into_int()?));
6330            }
6331            _ => {}
6332        }
6333        Ok(())
6334    }
6335}
6336
6337/// The metadata bundle for [Sniffer].
6338///
6339/// This type should generally not be used directly.
6340#[derive(Bundle)]
6341pub struct SnifferMetadataBundle {
6342    _marker: Sniffer,
6343    parent: AbstractAnimalMetadataBundle,
6344    sniffer_state: SnifferState,
6345    drop_seed_at_tick: DropSeedAtTick,
6346}
6347impl Default for SnifferMetadataBundle {
6348    fn default() -> Self {
6349        Self {
6350            _marker: Sniffer,
6351            parent: Default::default(),
6352            sniffer_state: SnifferState(Default::default()),
6353            drop_seed_at_tick: DropSeedAtTick(0),
6354        }
6355    }
6356}
6357
6358/// A metadata field for [Strider].
6359#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6360pub struct StriderBoostTime(pub i32);
6361/// A metadata field for [Strider].
6362#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6363pub struct Suffocating(pub bool);
6364/// The marker component for entities of type `minecraft:strider`.
6365///
6366/// # Metadata
6367///
6368/// These are the metadata components that all `Strider` entities are guaranteed
6369/// to have, in addition to the metadata components from parent types:
6370///
6371/// - [StriderBoostTime]
6372/// - [Suffocating]
6373///
6374/// # Parents
6375///
6376/// Entities with `Strider` will also have the following marker components and
6377/// their metadata fields:
6378///
6379/// - [AbstractAnimal]
6380/// - [AbstractAgeable]
6381/// - [AbstractCreature]
6382/// - [AbstractInsentient]
6383/// - [AbstractLiving]
6384/// - [AbstractEntity]
6385///
6386/// # Children
6387///
6388/// This entity type has no children types.
6389#[derive(Component)]
6390pub struct Strider;
6391impl Strider {
6392    fn apply_metadata(
6393        entity: &mut bevy_ecs::system::EntityCommands,
6394        d: EntityDataItem,
6395    ) -> Result<(), UpdateMetadataError> {
6396        match d.index {
6397            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6398            17 => {
6399                entity.insert(StriderBoostTime(d.value.into_int()?));
6400            }
6401            18 => {
6402                entity.insert(Suffocating(d.value.into_boolean()?));
6403            }
6404            _ => {}
6405        }
6406        Ok(())
6407    }
6408}
6409
6410/// The metadata bundle for [Strider].
6411///
6412/// This type should generally not be used directly.
6413#[derive(Bundle)]
6414pub struct StriderMetadataBundle {
6415    _marker: Strider,
6416    parent: AbstractAnimalMetadataBundle,
6417    strider_boost_time: StriderBoostTime,
6418    suffocating: Suffocating,
6419}
6420impl Default for StriderMetadataBundle {
6421    fn default() -> Self {
6422        Self {
6423            _marker: Strider,
6424            parent: Default::default(),
6425            strider_boost_time: StriderBoostTime(0),
6426            suffocating: Suffocating(false),
6427        }
6428    }
6429}
6430
6431/// A metadata field for [Turtle].
6432#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6433pub struct HasEgg(pub bool);
6434/// A metadata field for [Turtle].
6435#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6436pub struct LayingEgg(pub bool);
6437/// The marker component for entities of type `minecraft:turtle`.
6438///
6439/// # Metadata
6440///
6441/// These are the metadata components that all `Turtle` entities are guaranteed
6442/// to have, in addition to the metadata components from parent types:
6443///
6444/// - [HasEgg]
6445/// - [LayingEgg]
6446///
6447/// # Parents
6448///
6449/// Entities with `Turtle` will also have the following marker components and
6450/// their metadata fields:
6451///
6452/// - [AbstractAnimal]
6453/// - [AbstractAgeable]
6454/// - [AbstractCreature]
6455/// - [AbstractInsentient]
6456/// - [AbstractLiving]
6457/// - [AbstractEntity]
6458///
6459/// # Children
6460///
6461/// This entity type has no children types.
6462#[derive(Component)]
6463pub struct Turtle;
6464impl Turtle {
6465    fn apply_metadata(
6466        entity: &mut bevy_ecs::system::EntityCommands,
6467        d: EntityDataItem,
6468    ) -> Result<(), UpdateMetadataError> {
6469        match d.index {
6470            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6471            17 => {
6472                entity.insert(HasEgg(d.value.into_boolean()?));
6473            }
6474            18 => {
6475                entity.insert(LayingEgg(d.value.into_boolean()?));
6476            }
6477            _ => {}
6478        }
6479        Ok(())
6480    }
6481}
6482
6483/// The metadata bundle for [Turtle].
6484///
6485/// This type should generally not be used directly.
6486#[derive(Bundle)]
6487pub struct TurtleMetadataBundle {
6488    _marker: Turtle,
6489    parent: AbstractAnimalMetadataBundle,
6490    has_egg: HasEgg,
6491    laying_egg: LayingEgg,
6492}
6493impl Default for TurtleMetadataBundle {
6494    fn default() -> Self {
6495        Self {
6496            _marker: Turtle,
6497            parent: Default::default(),
6498            has_egg: HasEgg(false),
6499            laying_egg: LayingEgg(false),
6500        }
6501    }
6502}
6503
6504#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6505/// A metadata field for [AbstractHorse].
6506pub struct Tamed(pub bool);
6507#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6508/// A metadata field for [AbstractHorse].
6509pub struct Eating(pub bool);
6510#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6511/// A metadata field for [AbstractHorse].
6512pub struct AbstractHorseStanding(pub bool);
6513#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6514/// A metadata field for [AbstractHorse].
6515pub struct Bred(pub bool);
6516/// An abstract entity marker component.
6517///
6518/// # Metadata
6519///
6520/// These are the metadata components that all `AbstractHorse` entities are
6521/// guaranteed to have, in addition to the metadata components from parent
6522/// types:
6523///
6524/// - [Tamed]
6525/// - [Eating]
6526/// - [AbstractHorseStanding]
6527/// - [Bred]
6528///
6529/// # Parents
6530///
6531/// Entities with `AbstractHorse` will also have the following marker components
6532/// and their metadata fields:
6533///
6534/// - [AbstractAnimal]
6535/// - [AbstractAgeable]
6536/// - [AbstractCreature]
6537/// - [AbstractInsentient]
6538/// - [AbstractLiving]
6539/// - [AbstractEntity]
6540///
6541/// # Children
6542///
6543/// - [Camel]
6544///   - [CamelHusk]
6545/// - [Horse]
6546/// - [SkeletonHorse]
6547/// - [ZombieHorse]
6548/// - [AbstractChestedHorse]
6549///   - [Donkey]
6550///   - [Llama]
6551///     - [TraderLlama]
6552///   - [Mule]
6553#[derive(Component)]
6554pub struct AbstractHorse;
6555impl AbstractHorse {
6556    fn apply_metadata(
6557        entity: &mut bevy_ecs::system::EntityCommands,
6558        d: EntityDataItem,
6559    ) -> Result<(), UpdateMetadataError> {
6560        match d.index {
6561            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6562            17 => {
6563                let bitfield = d.value.into_byte()?;
6564                entity.insert(Tamed(bitfield & 0x2 != 0));
6565                entity.insert(Eating(bitfield & 0x10 != 0));
6566                entity.insert(AbstractHorseStanding(bitfield & 0x20 != 0));
6567                entity.insert(Bred(bitfield & 0x8 != 0));
6568            }
6569            _ => {}
6570        }
6571        Ok(())
6572    }
6573}
6574
6575/// The metadata bundle for [AbstractHorse].
6576///
6577/// This type should generally not be used directly.
6578#[derive(Bundle)]
6579pub struct AbstractHorseMetadataBundle {
6580    _marker: AbstractHorse,
6581    parent: AbstractAnimalMetadataBundle,
6582    tamed: Tamed,
6583    eating: Eating,
6584    abstract_horse_standing: AbstractHorseStanding,
6585    bred: Bred,
6586}
6587impl Default for AbstractHorseMetadataBundle {
6588    fn default() -> Self {
6589        Self {
6590            _marker: AbstractHorse,
6591            parent: Default::default(),
6592            tamed: Tamed(false),
6593            eating: Eating(false),
6594            abstract_horse_standing: AbstractHorseStanding(false),
6595            bred: Bred(false),
6596        }
6597    }
6598}
6599
6600/// A metadata field for [Camel].
6601#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6602pub struct CamelDash(pub bool);
6603/// A metadata field for [Camel].
6604#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6605pub struct LastPoseChangeTick(pub i64);
6606/// The marker component for entities of type `minecraft:camel`.
6607///
6608/// # Metadata
6609///
6610/// These are the metadata components that all `Camel` entities are guaranteed
6611/// to have, in addition to the metadata components from parent types:
6612///
6613/// - [CamelDash]
6614/// - [LastPoseChangeTick]
6615///
6616/// # Parents
6617///
6618/// Entities with `Camel` will also have the following marker components and
6619/// their metadata fields:
6620///
6621/// - [AbstractHorse]
6622/// - [AbstractAnimal]
6623/// - [AbstractAgeable]
6624/// - [AbstractCreature]
6625/// - [AbstractInsentient]
6626/// - [AbstractLiving]
6627/// - [AbstractEntity]
6628///
6629/// # Children
6630///
6631/// - [CamelHusk]
6632#[derive(Component)]
6633pub struct Camel;
6634impl Camel {
6635    fn apply_metadata(
6636        entity: &mut bevy_ecs::system::EntityCommands,
6637        d: EntityDataItem,
6638    ) -> Result<(), UpdateMetadataError> {
6639        match d.index {
6640            0..=17 => AbstractHorse::apply_metadata(entity, d)?,
6641            18 => {
6642                entity.insert(CamelDash(d.value.into_boolean()?));
6643            }
6644            19 => {
6645                entity.insert(LastPoseChangeTick(d.value.into_long()?));
6646            }
6647            _ => {}
6648        }
6649        Ok(())
6650    }
6651}
6652
6653/// The metadata bundle for [Camel].
6654///
6655/// This type should generally not be used directly.
6656#[derive(Bundle)]
6657pub struct CamelMetadataBundle {
6658    _marker: Camel,
6659    parent: AbstractHorseMetadataBundle,
6660    camel_dash: CamelDash,
6661    last_pose_change_tick: LastPoseChangeTick,
6662}
6663impl Default for CamelMetadataBundle {
6664    fn default() -> Self {
6665        Self {
6666            _marker: Camel,
6667            parent: Default::default(),
6668            camel_dash: CamelDash(false),
6669            last_pose_change_tick: LastPoseChangeTick(0),
6670        }
6671    }
6672}
6673
6674/// The marker component for entities of type `minecraft:camel_husk`.
6675///
6676/// # Metadata
6677///
6678/// This entity type does not add any additional metadata. It will still have
6679/// metadata from parent types.
6680///
6681/// # Parents
6682///
6683/// Entities with `CamelHusk` will also have the following marker components and
6684/// their metadata fields:
6685///
6686/// - [Camel]
6687/// - [AbstractHorse]
6688/// - [AbstractAnimal]
6689/// - [AbstractAgeable]
6690/// - [AbstractCreature]
6691/// - [AbstractInsentient]
6692/// - [AbstractLiving]
6693/// - [AbstractEntity]
6694///
6695/// # Children
6696///
6697/// This entity type has no children types.
6698#[derive(Component)]
6699pub struct CamelHusk;
6700impl CamelHusk {
6701    fn apply_metadata(
6702        entity: &mut bevy_ecs::system::EntityCommands,
6703        d: EntityDataItem,
6704    ) -> Result<(), UpdateMetadataError> {
6705        match d.index {
6706            0..=19 => Camel::apply_metadata(entity, d)?,
6707            _ => {}
6708        }
6709        Ok(())
6710    }
6711}
6712
6713/// The metadata bundle for [CamelHusk].
6714///
6715/// This type should generally not be used directly.
6716#[derive(Bundle)]
6717pub struct CamelHuskMetadataBundle {
6718    _marker: CamelHusk,
6719    parent: CamelMetadataBundle,
6720}
6721impl Default for CamelHuskMetadataBundle {
6722    fn default() -> Self {
6723        Self {
6724            _marker: CamelHusk,
6725            parent: Default::default(),
6726        }
6727    }
6728}
6729
6730/// A metadata field for [Horse].
6731#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6732pub struct HorseTypeVariant(pub i32);
6733/// The marker component for entities of type `minecraft:horse`.
6734///
6735/// # Metadata
6736///
6737/// These are the metadata components that all `Horse` entities are guaranteed
6738/// to have, in addition to the metadata components from parent types:
6739///
6740/// - [HorseTypeVariant]
6741///
6742/// # Parents
6743///
6744/// Entities with `Horse` will also have the following marker components and
6745/// their metadata fields:
6746///
6747/// - [AbstractHorse]
6748/// - [AbstractAnimal]
6749/// - [AbstractAgeable]
6750/// - [AbstractCreature]
6751/// - [AbstractInsentient]
6752/// - [AbstractLiving]
6753/// - [AbstractEntity]
6754///
6755/// # Children
6756///
6757/// This entity type has no children types.
6758#[derive(Component)]
6759pub struct Horse;
6760impl Horse {
6761    fn apply_metadata(
6762        entity: &mut bevy_ecs::system::EntityCommands,
6763        d: EntityDataItem,
6764    ) -> Result<(), UpdateMetadataError> {
6765        match d.index {
6766            0..=17 => AbstractHorse::apply_metadata(entity, d)?,
6767            18 => {
6768                entity.insert(HorseTypeVariant(d.value.into_int()?));
6769            }
6770            _ => {}
6771        }
6772        Ok(())
6773    }
6774}
6775
6776/// The metadata bundle for [Horse].
6777///
6778/// This type should generally not be used directly.
6779#[derive(Bundle)]
6780pub struct HorseMetadataBundle {
6781    _marker: Horse,
6782    parent: AbstractHorseMetadataBundle,
6783    horse_type_variant: HorseTypeVariant,
6784}
6785impl Default for HorseMetadataBundle {
6786    fn default() -> Self {
6787        Self {
6788            _marker: Horse,
6789            parent: Default::default(),
6790            horse_type_variant: HorseTypeVariant(0),
6791        }
6792    }
6793}
6794
6795/// The marker component for entities of type `minecraft:skeleton_horse`.
6796///
6797/// # Metadata
6798///
6799/// This entity type does not add any additional metadata. It will still have
6800/// metadata from parent types.
6801///
6802/// # Parents
6803///
6804/// Entities with `SkeletonHorse` will also have the following marker components
6805/// and their metadata fields:
6806///
6807/// - [AbstractHorse]
6808/// - [AbstractAnimal]
6809/// - [AbstractAgeable]
6810/// - [AbstractCreature]
6811/// - [AbstractInsentient]
6812/// - [AbstractLiving]
6813/// - [AbstractEntity]
6814///
6815/// # Children
6816///
6817/// This entity type has no children types.
6818#[derive(Component)]
6819pub struct SkeletonHorse;
6820impl SkeletonHorse {
6821    fn apply_metadata(
6822        entity: &mut bevy_ecs::system::EntityCommands,
6823        d: EntityDataItem,
6824    ) -> Result<(), UpdateMetadataError> {
6825        match d.index {
6826            0..=17 => AbstractHorse::apply_metadata(entity, d)?,
6827            _ => {}
6828        }
6829        Ok(())
6830    }
6831}
6832
6833/// The metadata bundle for [SkeletonHorse].
6834///
6835/// This type should generally not be used directly.
6836#[derive(Bundle)]
6837pub struct SkeletonHorseMetadataBundle {
6838    _marker: SkeletonHorse,
6839    parent: AbstractHorseMetadataBundle,
6840}
6841impl Default for SkeletonHorseMetadataBundle {
6842    fn default() -> Self {
6843        Self {
6844            _marker: SkeletonHorse,
6845            parent: Default::default(),
6846        }
6847    }
6848}
6849
6850/// The marker component for entities of type `minecraft:zombie_horse`.
6851///
6852/// # Metadata
6853///
6854/// This entity type does not add any additional metadata. It will still have
6855/// metadata from parent types.
6856///
6857/// # Parents
6858///
6859/// Entities with `ZombieHorse` will also have the following marker components
6860/// and their metadata fields:
6861///
6862/// - [AbstractHorse]
6863/// - [AbstractAnimal]
6864/// - [AbstractAgeable]
6865/// - [AbstractCreature]
6866/// - [AbstractInsentient]
6867/// - [AbstractLiving]
6868/// - [AbstractEntity]
6869///
6870/// # Children
6871///
6872/// This entity type has no children types.
6873#[derive(Component)]
6874pub struct ZombieHorse;
6875impl ZombieHorse {
6876    fn apply_metadata(
6877        entity: &mut bevy_ecs::system::EntityCommands,
6878        d: EntityDataItem,
6879    ) -> Result<(), UpdateMetadataError> {
6880        match d.index {
6881            0..=17 => AbstractHorse::apply_metadata(entity, d)?,
6882            _ => {}
6883        }
6884        Ok(())
6885    }
6886}
6887
6888/// The metadata bundle for [ZombieHorse].
6889///
6890/// This type should generally not be used directly.
6891#[derive(Bundle)]
6892pub struct ZombieHorseMetadataBundle {
6893    _marker: ZombieHorse,
6894    parent: AbstractHorseMetadataBundle,
6895}
6896impl Default for ZombieHorseMetadataBundle {
6897    fn default() -> Self {
6898        Self {
6899            _marker: ZombieHorse,
6900            parent: Default::default(),
6901        }
6902    }
6903}
6904
6905/// A metadata field for [AbstractChestedHorse].
6906#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6907pub struct Chest(pub bool);
6908/// An abstract entity marker component.
6909///
6910/// # Metadata
6911///
6912/// These are the metadata components that all `AbstractChestedHorse` entities
6913/// are guaranteed to have, in addition to the metadata components from parent
6914/// types:
6915///
6916/// - [Chest]
6917///
6918/// # Parents
6919///
6920/// Entities with `AbstractChestedHorse` will also have the following marker
6921/// components and their metadata fields:
6922///
6923/// - [AbstractHorse]
6924/// - [AbstractAnimal]
6925/// - [AbstractAgeable]
6926/// - [AbstractCreature]
6927/// - [AbstractInsentient]
6928/// - [AbstractLiving]
6929/// - [AbstractEntity]
6930///
6931/// # Children
6932///
6933/// - [Donkey]
6934/// - [Llama]
6935///   - [TraderLlama]
6936/// - [Mule]
6937#[derive(Component)]
6938pub struct AbstractChestedHorse;
6939impl AbstractChestedHorse {
6940    fn apply_metadata(
6941        entity: &mut bevy_ecs::system::EntityCommands,
6942        d: EntityDataItem,
6943    ) -> Result<(), UpdateMetadataError> {
6944        match d.index {
6945            0..=17 => AbstractHorse::apply_metadata(entity, d)?,
6946            18 => {
6947                entity.insert(Chest(d.value.into_boolean()?));
6948            }
6949            _ => {}
6950        }
6951        Ok(())
6952    }
6953}
6954
6955/// The metadata bundle for [AbstractChestedHorse].
6956///
6957/// This type should generally not be used directly.
6958#[derive(Bundle)]
6959pub struct AbstractChestedHorseMetadataBundle {
6960    _marker: AbstractChestedHorse,
6961    parent: AbstractHorseMetadataBundle,
6962    chest: Chest,
6963}
6964impl Default for AbstractChestedHorseMetadataBundle {
6965    fn default() -> Self {
6966        Self {
6967            _marker: AbstractChestedHorse,
6968            parent: Default::default(),
6969            chest: Chest(false),
6970        }
6971    }
6972}
6973
6974/// The marker component for entities of type `minecraft:donkey`.
6975///
6976/// # Metadata
6977///
6978/// This entity type does not add any additional metadata. It will still have
6979/// metadata from parent types.
6980///
6981/// # Parents
6982///
6983/// Entities with `Donkey` will also have the following marker components and
6984/// their metadata fields:
6985///
6986/// - [AbstractChestedHorse]
6987/// - [AbstractHorse]
6988/// - [AbstractAnimal]
6989/// - [AbstractAgeable]
6990/// - [AbstractCreature]
6991/// - [AbstractInsentient]
6992/// - [AbstractLiving]
6993/// - [AbstractEntity]
6994///
6995/// # Children
6996///
6997/// This entity type has no children types.
6998#[derive(Component)]
6999pub struct Donkey;
7000impl Donkey {
7001    fn apply_metadata(
7002        entity: &mut bevy_ecs::system::EntityCommands,
7003        d: EntityDataItem,
7004    ) -> Result<(), UpdateMetadataError> {
7005        match d.index {
7006            0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
7007            _ => {}
7008        }
7009        Ok(())
7010    }
7011}
7012
7013/// The metadata bundle for [Donkey].
7014///
7015/// This type should generally not be used directly.
7016#[derive(Bundle)]
7017pub struct DonkeyMetadataBundle {
7018    _marker: Donkey,
7019    parent: AbstractChestedHorseMetadataBundle,
7020}
7021impl Default for DonkeyMetadataBundle {
7022    fn default() -> Self {
7023        Self {
7024            _marker: Donkey,
7025            parent: Default::default(),
7026        }
7027    }
7028}
7029
7030/// A metadata field for [Llama].
7031#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7032pub struct Strength(pub i32);
7033/// A metadata field for [Llama].
7034#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7035pub struct LlamaVariant(pub i32);
7036/// The marker component for entities of type `minecraft:llama`.
7037///
7038/// # Metadata
7039///
7040/// These are the metadata components that all `Llama` entities are guaranteed
7041/// to have, in addition to the metadata components from parent types:
7042///
7043/// - [Strength]
7044/// - [LlamaVariant]
7045///
7046/// # Parents
7047///
7048/// Entities with `Llama` will also have the following marker components and
7049/// their metadata fields:
7050///
7051/// - [AbstractChestedHorse]
7052/// - [AbstractHorse]
7053/// - [AbstractAnimal]
7054/// - [AbstractAgeable]
7055/// - [AbstractCreature]
7056/// - [AbstractInsentient]
7057/// - [AbstractLiving]
7058/// - [AbstractEntity]
7059///
7060/// # Children
7061///
7062/// - [TraderLlama]
7063#[derive(Component)]
7064pub struct Llama;
7065impl Llama {
7066    fn apply_metadata(
7067        entity: &mut bevy_ecs::system::EntityCommands,
7068        d: EntityDataItem,
7069    ) -> Result<(), UpdateMetadataError> {
7070        match d.index {
7071            0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
7072            19 => {
7073                entity.insert(Strength(d.value.into_int()?));
7074            }
7075            20 => {
7076                entity.insert(LlamaVariant(d.value.into_int()?));
7077            }
7078            _ => {}
7079        }
7080        Ok(())
7081    }
7082}
7083
7084/// The metadata bundle for [Llama].
7085///
7086/// This type should generally not be used directly.
7087#[derive(Bundle)]
7088pub struct LlamaMetadataBundle {
7089    _marker: Llama,
7090    parent: AbstractChestedHorseMetadataBundle,
7091    strength: Strength,
7092    llama_variant: LlamaVariant,
7093}
7094impl Default for LlamaMetadataBundle {
7095    fn default() -> Self {
7096        Self {
7097            _marker: Llama,
7098            parent: Default::default(),
7099            strength: Strength(0),
7100            llama_variant: LlamaVariant(0),
7101        }
7102    }
7103}
7104
7105/// The marker component for entities of type `minecraft:trader_llama`.
7106///
7107/// # Metadata
7108///
7109/// This entity type does not add any additional metadata. It will still have
7110/// metadata from parent types.
7111///
7112/// # Parents
7113///
7114/// Entities with `TraderLlama` will also have the following marker components
7115/// and their metadata fields:
7116///
7117/// - [Llama]
7118/// - [AbstractChestedHorse]
7119/// - [AbstractHorse]
7120/// - [AbstractAnimal]
7121/// - [AbstractAgeable]
7122/// - [AbstractCreature]
7123/// - [AbstractInsentient]
7124/// - [AbstractLiving]
7125/// - [AbstractEntity]
7126///
7127/// # Children
7128///
7129/// This entity type has no children types.
7130#[derive(Component)]
7131pub struct TraderLlama;
7132impl TraderLlama {
7133    fn apply_metadata(
7134        entity: &mut bevy_ecs::system::EntityCommands,
7135        d: EntityDataItem,
7136    ) -> Result<(), UpdateMetadataError> {
7137        match d.index {
7138            0..=20 => Llama::apply_metadata(entity, d)?,
7139            _ => {}
7140        }
7141        Ok(())
7142    }
7143}
7144
7145/// The metadata bundle for [TraderLlama].
7146///
7147/// This type should generally not be used directly.
7148#[derive(Bundle)]
7149pub struct TraderLlamaMetadataBundle {
7150    _marker: TraderLlama,
7151    parent: LlamaMetadataBundle,
7152}
7153impl Default for TraderLlamaMetadataBundle {
7154    fn default() -> Self {
7155        Self {
7156            _marker: TraderLlama,
7157            parent: Default::default(),
7158        }
7159    }
7160}
7161
7162/// The marker component for entities of type `minecraft:mule`.
7163///
7164/// # Metadata
7165///
7166/// This entity type does not add any additional metadata. It will still have
7167/// metadata from parent types.
7168///
7169/// # Parents
7170///
7171/// Entities with `Mule` will also have the following marker components and
7172/// their metadata fields:
7173///
7174/// - [AbstractChestedHorse]
7175/// - [AbstractHorse]
7176/// - [AbstractAnimal]
7177/// - [AbstractAgeable]
7178/// - [AbstractCreature]
7179/// - [AbstractInsentient]
7180/// - [AbstractLiving]
7181/// - [AbstractEntity]
7182///
7183/// # Children
7184///
7185/// This entity type has no children types.
7186#[derive(Component)]
7187pub struct Mule;
7188impl Mule {
7189    fn apply_metadata(
7190        entity: &mut bevy_ecs::system::EntityCommands,
7191        d: EntityDataItem,
7192    ) -> Result<(), UpdateMetadataError> {
7193        match d.index {
7194            0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
7195            _ => {}
7196        }
7197        Ok(())
7198    }
7199}
7200
7201/// The metadata bundle for [Mule].
7202///
7203/// This type should generally not be used directly.
7204#[derive(Bundle)]
7205pub struct MuleMetadataBundle {
7206    _marker: Mule,
7207    parent: AbstractChestedHorseMetadataBundle,
7208}
7209impl Default for MuleMetadataBundle {
7210    fn default() -> Self {
7211        Self {
7212            _marker: Mule,
7213            parent: Default::default(),
7214        }
7215    }
7216}
7217
7218#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7219/// A metadata field for [AbstractTameable].
7220pub struct Tame(pub bool);
7221#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7222/// A metadata field for [AbstractTameable].
7223pub struct InSittingPose(pub bool);
7224/// A metadata field for [AbstractTameable].
7225#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7226pub struct Owneruuid(pub Option<Uuid>);
7227/// An abstract entity marker component.
7228///
7229/// # Metadata
7230///
7231/// These are the metadata components that all `AbstractTameable` entities are
7232/// guaranteed to have, in addition to the metadata components from parent
7233/// types:
7234///
7235/// - [Tame]
7236/// - [InSittingPose]
7237/// - [Owneruuid]
7238///
7239/// # Parents
7240///
7241/// Entities with `AbstractTameable` will also have the following marker
7242/// components and their metadata fields:
7243///
7244/// - [AbstractAnimal]
7245/// - [AbstractAgeable]
7246/// - [AbstractCreature]
7247/// - [AbstractInsentient]
7248/// - [AbstractLiving]
7249/// - [AbstractEntity]
7250///
7251/// # Children
7252///
7253/// - [Cat]
7254/// - [Nautilus]
7255/// - [Parrot]
7256/// - [Wolf]
7257/// - [ZombieNautilus]
7258#[derive(Component)]
7259pub struct AbstractTameable;
7260impl AbstractTameable {
7261    fn apply_metadata(
7262        entity: &mut bevy_ecs::system::EntityCommands,
7263        d: EntityDataItem,
7264    ) -> Result<(), UpdateMetadataError> {
7265        match d.index {
7266            0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7267            17 => {
7268                let bitfield = d.value.into_byte()?;
7269                entity.insert(Tame(bitfield & 0x4 != 0));
7270                entity.insert(InSittingPose(bitfield & 0x1 != 0));
7271            }
7272            18 => {
7273                entity.insert(Owneruuid(d.value.into_optional_living_entity_reference()?));
7274            }
7275            _ => {}
7276        }
7277        Ok(())
7278    }
7279}
7280
7281/// The metadata bundle for [AbstractTameable].
7282///
7283/// This type should generally not be used directly.
7284#[derive(Bundle)]
7285pub struct AbstractTameableMetadataBundle {
7286    _marker: AbstractTameable,
7287    parent: AbstractAnimalMetadataBundle,
7288    tame: Tame,
7289    in_sitting_pose: InSittingPose,
7290    owneruuid: Owneruuid,
7291}
7292impl Default for AbstractTameableMetadataBundle {
7293    fn default() -> Self {
7294        Self {
7295            _marker: AbstractTameable,
7296            parent: Default::default(),
7297            tame: Tame(false),
7298            in_sitting_pose: InSittingPose(false),
7299            owneruuid: Owneruuid(None),
7300        }
7301    }
7302}
7303
7304/// A metadata field for [Cat].
7305#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7306pub struct CatVariant(pub azalea_registry::data::CatVariant);
7307/// A metadata field for [Cat].
7308#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7309pub struct IsLying(pub bool);
7310/// A metadata field for [Cat].
7311#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7312pub struct RelaxStateOne(pub bool);
7313/// A metadata field for [Cat].
7314#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7315pub struct CatCollarColor(pub i32);
7316/// The marker component for entities of type `minecraft:cat`.
7317///
7318/// # Metadata
7319///
7320/// These are the metadata components that all `Cat` entities are guaranteed to
7321/// have, in addition to the metadata components from parent types:
7322///
7323/// - [CatVariant]
7324/// - [IsLying]
7325/// - [RelaxStateOne]
7326/// - [CatCollarColor]
7327///
7328/// # Parents
7329///
7330/// Entities with `Cat` will also have the following marker components and their
7331/// metadata fields:
7332///
7333/// - [AbstractTameable]
7334/// - [AbstractAnimal]
7335/// - [AbstractAgeable]
7336/// - [AbstractCreature]
7337/// - [AbstractInsentient]
7338/// - [AbstractLiving]
7339/// - [AbstractEntity]
7340///
7341/// # Children
7342///
7343/// This entity type has no children types.
7344#[derive(Component)]
7345pub struct Cat;
7346impl Cat {
7347    fn apply_metadata(
7348        entity: &mut bevy_ecs::system::EntityCommands,
7349        d: EntityDataItem,
7350    ) -> Result<(), UpdateMetadataError> {
7351        match d.index {
7352            0..=18 => AbstractTameable::apply_metadata(entity, d)?,
7353            19 => {
7354                entity.insert(CatVariant(d.value.into_cat_variant()?));
7355            }
7356            20 => {
7357                entity.insert(IsLying(d.value.into_boolean()?));
7358            }
7359            21 => {
7360                entity.insert(RelaxStateOne(d.value.into_boolean()?));
7361            }
7362            22 => {
7363                entity.insert(CatCollarColor(d.value.into_int()?));
7364            }
7365            _ => {}
7366        }
7367        Ok(())
7368    }
7369}
7370
7371/// The metadata bundle for [Cat].
7372///
7373/// This type should generally not be used directly.
7374#[derive(Bundle)]
7375pub struct CatMetadataBundle {
7376    _marker: Cat,
7377    parent: AbstractTameableMetadataBundle,
7378    cat_variant: CatVariant,
7379    is_lying: IsLying,
7380    relax_state_one: RelaxStateOne,
7381    cat_collar_color: CatCollarColor,
7382}
7383impl Default for CatMetadataBundle {
7384    fn default() -> Self {
7385        Self {
7386            _marker: Cat,
7387            parent: Default::default(),
7388            cat_variant: CatVariant(azalea_registry::data::CatVariant::new_raw(0)),
7389            is_lying: IsLying(false),
7390            relax_state_one: RelaxStateOne(false),
7391            cat_collar_color: CatCollarColor(Default::default()),
7392        }
7393    }
7394}
7395
7396/// A metadata field for [Nautilus].
7397#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7398pub struct NautilusDash(pub bool);
7399/// The marker component for entities of type `minecraft:nautilus`.
7400///
7401/// # Metadata
7402///
7403/// These are the metadata components that all `Nautilus` entities are
7404/// guaranteed to have, in addition to the metadata components from parent
7405/// types:
7406///
7407/// - [NautilusDash]
7408///
7409/// # Parents
7410///
7411/// Entities with `Nautilus` will also have the following marker components and
7412/// their metadata fields:
7413///
7414/// - [AbstractTameable]
7415/// - [AbstractAnimal]
7416/// - [AbstractAgeable]
7417/// - [AbstractCreature]
7418/// - [AbstractInsentient]
7419/// - [AbstractLiving]
7420/// - [AbstractEntity]
7421///
7422/// # Children
7423///
7424/// This entity type has no children types.
7425#[derive(Component)]
7426pub struct Nautilus;
7427impl Nautilus {
7428    fn apply_metadata(
7429        entity: &mut bevy_ecs::system::EntityCommands,
7430        d: EntityDataItem,
7431    ) -> Result<(), UpdateMetadataError> {
7432        match d.index {
7433            0..=18 => AbstractTameable::apply_metadata(entity, d)?,
7434            19 => {
7435                entity.insert(NautilusDash(d.value.into_boolean()?));
7436            }
7437            _ => {}
7438        }
7439        Ok(())
7440    }
7441}
7442
7443/// The metadata bundle for [Nautilus].
7444///
7445/// This type should generally not be used directly.
7446#[derive(Bundle)]
7447pub struct NautilusMetadataBundle {
7448    _marker: Nautilus,
7449    parent: AbstractTameableMetadataBundle,
7450    nautilus_dash: NautilusDash,
7451}
7452impl Default for NautilusMetadataBundle {
7453    fn default() -> Self {
7454        Self {
7455            _marker: Nautilus,
7456            parent: Default::default(),
7457            nautilus_dash: NautilusDash(false),
7458        }
7459    }
7460}
7461
7462/// A metadata field for [Parrot].
7463#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7464pub struct ParrotVariant(pub i32);
7465/// The marker component for entities of type `minecraft:parrot`.
7466///
7467/// # Metadata
7468///
7469/// These are the metadata components that all `Parrot` entities are guaranteed
7470/// to have, in addition to the metadata components from parent types:
7471///
7472/// - [ParrotVariant]
7473///
7474/// # Parents
7475///
7476/// Entities with `Parrot` will also have the following marker components and
7477/// their metadata fields:
7478///
7479/// - [AbstractTameable]
7480/// - [AbstractAnimal]
7481/// - [AbstractAgeable]
7482/// - [AbstractCreature]
7483/// - [AbstractInsentient]
7484/// - [AbstractLiving]
7485/// - [AbstractEntity]
7486///
7487/// # Children
7488///
7489/// This entity type has no children types.
7490#[derive(Component)]
7491pub struct Parrot;
7492impl Parrot {
7493    fn apply_metadata(
7494        entity: &mut bevy_ecs::system::EntityCommands,
7495        d: EntityDataItem,
7496    ) -> Result<(), UpdateMetadataError> {
7497        match d.index {
7498            0..=18 => AbstractTameable::apply_metadata(entity, d)?,
7499            19 => {
7500                entity.insert(ParrotVariant(d.value.into_int()?));
7501            }
7502            _ => {}
7503        }
7504        Ok(())
7505    }
7506}
7507
7508/// The metadata bundle for [Parrot].
7509///
7510/// This type should generally not be used directly.
7511#[derive(Bundle)]
7512pub struct ParrotMetadataBundle {
7513    _marker: Parrot,
7514    parent: AbstractTameableMetadataBundle,
7515    parrot_variant: ParrotVariant,
7516}
7517impl Default for ParrotMetadataBundle {
7518    fn default() -> Self {
7519        Self {
7520            _marker: Parrot,
7521            parent: Default::default(),
7522            parrot_variant: ParrotVariant(Default::default()),
7523        }
7524    }
7525}
7526
7527/// A metadata field for [Wolf].
7528#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7529pub struct WolfInterested(pub bool);
7530/// A metadata field for [Wolf].
7531#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7532pub struct WolfCollarColor(pub i32);
7533/// A metadata field for [Wolf].
7534#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7535pub struct WolfAngerEndTime(pub i64);
7536/// A metadata field for [Wolf].
7537#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7538pub struct WolfVariant(pub azalea_registry::data::WolfVariant);
7539/// A metadata field for [Wolf].
7540#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7541pub struct SoundVariant(pub azalea_registry::data::WolfSoundVariant);
7542/// The marker component for entities of type `minecraft:wolf`.
7543///
7544/// # Metadata
7545///
7546/// These are the metadata components that all `Wolf` entities are guaranteed to
7547/// have, in addition to the metadata components from parent types:
7548///
7549/// - [WolfInterested]
7550/// - [WolfCollarColor]
7551/// - [WolfAngerEndTime]
7552/// - [WolfVariant]
7553/// - [SoundVariant]
7554///
7555/// # Parents
7556///
7557/// Entities with `Wolf` will also have the following marker components and
7558/// their metadata fields:
7559///
7560/// - [AbstractTameable]
7561/// - [AbstractAnimal]
7562/// - [AbstractAgeable]
7563/// - [AbstractCreature]
7564/// - [AbstractInsentient]
7565/// - [AbstractLiving]
7566/// - [AbstractEntity]
7567///
7568/// # Children
7569///
7570/// This entity type has no children types.
7571#[derive(Component)]
7572pub struct Wolf;
7573impl Wolf {
7574    fn apply_metadata(
7575        entity: &mut bevy_ecs::system::EntityCommands,
7576        d: EntityDataItem,
7577    ) -> Result<(), UpdateMetadataError> {
7578        match d.index {
7579            0..=18 => AbstractTameable::apply_metadata(entity, d)?,
7580            19 => {
7581                entity.insert(WolfInterested(d.value.into_boolean()?));
7582            }
7583            20 => {
7584                entity.insert(WolfCollarColor(d.value.into_int()?));
7585            }
7586            21 => {
7587                entity.insert(WolfAngerEndTime(d.value.into_long()?));
7588            }
7589            22 => {
7590                entity.insert(WolfVariant(d.value.into_wolf_variant()?));
7591            }
7592            23 => {
7593                entity.insert(SoundVariant(d.value.into_wolf_sound_variant()?));
7594            }
7595            _ => {}
7596        }
7597        Ok(())
7598    }
7599}
7600
7601/// The metadata bundle for [Wolf].
7602///
7603/// This type should generally not be used directly.
7604#[derive(Bundle)]
7605pub struct WolfMetadataBundle {
7606    _marker: Wolf,
7607    parent: AbstractTameableMetadataBundle,
7608    wolf_interested: WolfInterested,
7609    wolf_collar_color: WolfCollarColor,
7610    wolf_anger_end_time: WolfAngerEndTime,
7611    wolf_variant: WolfVariant,
7612    sound_variant: SoundVariant,
7613}
7614impl Default for WolfMetadataBundle {
7615    fn default() -> Self {
7616        Self {
7617            _marker: Wolf,
7618            parent: Default::default(),
7619            wolf_interested: WolfInterested(false),
7620            wolf_collar_color: WolfCollarColor(Default::default()),
7621            wolf_anger_end_time: WolfAngerEndTime(-1),
7622            wolf_variant: WolfVariant(azalea_registry::data::WolfVariant::new_raw(0)),
7623            sound_variant: SoundVariant(azalea_registry::data::WolfSoundVariant::new_raw(0)),
7624        }
7625    }
7626}
7627
7628/// A metadata field for [ZombieNautilus].
7629#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7630pub struct ZombieNautilusDash(pub bool);
7631/// A metadata field for [ZombieNautilus].
7632#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7633pub struct ZombieNautilusVariant(pub azalea_registry::data::ZombieNautilusVariant);
7634/// The marker component for entities of type `minecraft:zombie_nautilus`.
7635///
7636/// # Metadata
7637///
7638/// These are the metadata components that all `ZombieNautilus` entities are
7639/// guaranteed to have, in addition to the metadata components from parent
7640/// types:
7641///
7642/// - [ZombieNautilusDash]
7643/// - [ZombieNautilusVariant]
7644///
7645/// # Parents
7646///
7647/// Entities with `ZombieNautilus` will also have the following marker
7648/// components and their metadata fields:
7649///
7650/// - [AbstractTameable]
7651/// - [AbstractAnimal]
7652/// - [AbstractAgeable]
7653/// - [AbstractCreature]
7654/// - [AbstractInsentient]
7655/// - [AbstractLiving]
7656/// - [AbstractEntity]
7657///
7658/// # Children
7659///
7660/// This entity type has no children types.
7661#[derive(Component)]
7662pub struct ZombieNautilus;
7663impl ZombieNautilus {
7664    fn apply_metadata(
7665        entity: &mut bevy_ecs::system::EntityCommands,
7666        d: EntityDataItem,
7667    ) -> Result<(), UpdateMetadataError> {
7668        match d.index {
7669            0..=18 => AbstractTameable::apply_metadata(entity, d)?,
7670            19 => {
7671                entity.insert(ZombieNautilusDash(d.value.into_boolean()?));
7672            }
7673            20 => {
7674                entity.insert(ZombieNautilusVariant(
7675                    d.value.into_zombie_nautilus_variant()?,
7676                ));
7677            }
7678            _ => {}
7679        }
7680        Ok(())
7681    }
7682}
7683
7684/// The metadata bundle for [ZombieNautilus].
7685///
7686/// This type should generally not be used directly.
7687#[derive(Bundle)]
7688pub struct ZombieNautilusMetadataBundle {
7689    _marker: ZombieNautilus,
7690    parent: AbstractTameableMetadataBundle,
7691    zombie_nautilus_dash: ZombieNautilusDash,
7692    zombie_nautilus_variant: ZombieNautilusVariant,
7693}
7694impl Default for ZombieNautilusMetadataBundle {
7695    fn default() -> Self {
7696        Self {
7697            _marker: ZombieNautilus,
7698            parent: Default::default(),
7699            zombie_nautilus_dash: ZombieNautilusDash(false),
7700            zombie_nautilus_variant: ZombieNautilusVariant(
7701                azalea_registry::data::ZombieNautilusVariant::new_raw(0),
7702            ),
7703        }
7704    }
7705}
7706
7707/// A metadata field for [AbstractVillager].
7708#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7709pub struct AbstractVillagerUnhappyCounter(pub i32);
7710/// An abstract entity marker component.
7711///
7712/// # Metadata
7713///
7714/// These are the metadata components that all `AbstractVillager` entities are
7715/// guaranteed to have, in addition to the metadata components from parent
7716/// types:
7717///
7718/// - [AbstractVillagerUnhappyCounter]
7719///
7720/// # Parents
7721///
7722/// Entities with `AbstractVillager` will also have the following marker
7723/// components and their metadata fields:
7724///
7725/// - [AbstractAgeable]
7726/// - [AbstractCreature]
7727/// - [AbstractInsentient]
7728/// - [AbstractLiving]
7729/// - [AbstractEntity]
7730///
7731/// # Children
7732///
7733/// - [Villager]
7734/// - [WanderingTrader]
7735#[derive(Component)]
7736pub struct AbstractVillager;
7737impl AbstractVillager {
7738    fn apply_metadata(
7739        entity: &mut bevy_ecs::system::EntityCommands,
7740        d: EntityDataItem,
7741    ) -> Result<(), UpdateMetadataError> {
7742        match d.index {
7743            0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
7744            17 => {
7745                entity.insert(AbstractVillagerUnhappyCounter(d.value.into_int()?));
7746            }
7747            _ => {}
7748        }
7749        Ok(())
7750    }
7751}
7752
7753/// The metadata bundle for [AbstractVillager].
7754///
7755/// This type should generally not be used directly.
7756#[derive(Bundle)]
7757pub struct AbstractVillagerMetadataBundle {
7758    _marker: AbstractVillager,
7759    parent: AbstractAgeableMetadataBundle,
7760    abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter,
7761}
7762impl Default for AbstractVillagerMetadataBundle {
7763    fn default() -> Self {
7764        Self {
7765            _marker: AbstractVillager,
7766            parent: Default::default(),
7767            abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
7768        }
7769    }
7770}
7771
7772/// A metadata field for [Villager].
7773#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7774pub struct VillagerVillagerData(pub VillagerData);
7775/// The marker component for entities of type `minecraft:villager`.
7776///
7777/// # Metadata
7778///
7779/// These are the metadata components that all `Villager` entities are
7780/// guaranteed to have, in addition to the metadata components from parent
7781/// types:
7782///
7783/// - [VillagerVillagerData]
7784///
7785/// # Parents
7786///
7787/// Entities with `Villager` will also have the following marker components and
7788/// their metadata fields:
7789///
7790/// - [AbstractVillager]
7791/// - [AbstractAgeable]
7792/// - [AbstractCreature]
7793/// - [AbstractInsentient]
7794/// - [AbstractLiving]
7795/// - [AbstractEntity]
7796///
7797/// # Children
7798///
7799/// This entity type has no children types.
7800#[derive(Component)]
7801pub struct Villager;
7802impl Villager {
7803    fn apply_metadata(
7804        entity: &mut bevy_ecs::system::EntityCommands,
7805        d: EntityDataItem,
7806    ) -> Result<(), UpdateMetadataError> {
7807        match d.index {
7808            0..=17 => AbstractVillager::apply_metadata(entity, d)?,
7809            18 => {
7810                entity.insert(VillagerVillagerData(d.value.into_villager_data()?));
7811            }
7812            _ => {}
7813        }
7814        Ok(())
7815    }
7816}
7817
7818/// The metadata bundle for [Villager].
7819///
7820/// This type should generally not be used directly.
7821#[derive(Bundle)]
7822pub struct VillagerMetadataBundle {
7823    _marker: Villager,
7824    parent: AbstractVillagerMetadataBundle,
7825    villager_villager_data: VillagerVillagerData,
7826}
7827impl Default for VillagerMetadataBundle {
7828    fn default() -> Self {
7829        Self {
7830            _marker: Villager,
7831            parent: Default::default(),
7832            villager_villager_data: VillagerVillagerData(VillagerData {
7833                kind: azalea_registry::builtin::VillagerKind::Plains,
7834                profession: azalea_registry::builtin::VillagerProfession::None,
7835                level: 0,
7836            }),
7837        }
7838    }
7839}
7840
7841/// The marker component for entities of type `minecraft:wandering_trader`.
7842///
7843/// # Metadata
7844///
7845/// This entity type does not add any additional metadata. It will still have
7846/// metadata from parent types.
7847///
7848/// # Parents
7849///
7850/// Entities with `WanderingTrader` will also have the following marker
7851/// components and their metadata fields:
7852///
7853/// - [AbstractVillager]
7854/// - [AbstractAgeable]
7855/// - [AbstractCreature]
7856/// - [AbstractInsentient]
7857/// - [AbstractLiving]
7858/// - [AbstractEntity]
7859///
7860/// # Children
7861///
7862/// This entity type has no children types.
7863#[derive(Component)]
7864pub struct WanderingTrader;
7865impl WanderingTrader {
7866    fn apply_metadata(
7867        entity: &mut bevy_ecs::system::EntityCommands,
7868        d: EntityDataItem,
7869    ) -> Result<(), UpdateMetadataError> {
7870        match d.index {
7871            0..=17 => AbstractVillager::apply_metadata(entity, d)?,
7872            _ => {}
7873        }
7874        Ok(())
7875    }
7876}
7877
7878/// The metadata bundle for [WanderingTrader].
7879///
7880/// This type should generally not be used directly.
7881#[derive(Bundle)]
7882pub struct WanderingTraderMetadataBundle {
7883    _marker: WanderingTrader,
7884    parent: AbstractVillagerMetadataBundle,
7885}
7886impl Default for WanderingTraderMetadataBundle {
7887    fn default() -> Self {
7888        Self {
7889            _marker: WanderingTrader,
7890            parent: Default::default(),
7891        }
7892    }
7893}
7894
7895/// A metadata field for [AbstractFish].
7896#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7897pub struct AbstractFishFromBucket(pub bool);
7898/// An abstract entity marker component.
7899///
7900/// # Metadata
7901///
7902/// These are the metadata components that all `AbstractFish` entities are
7903/// guaranteed to have, in addition to the metadata components from parent
7904/// types:
7905///
7906/// - [AbstractFishFromBucket]
7907///
7908/// # Parents
7909///
7910/// Entities with `AbstractFish` will also have the following marker components
7911/// and their metadata fields:
7912///
7913/// - [AbstractCreature]
7914/// - [AbstractInsentient]
7915/// - [AbstractLiving]
7916/// - [AbstractEntity]
7917///
7918/// # Children
7919///
7920/// - [Cod]
7921/// - [Salmon]
7922/// - [TropicalFish]
7923#[derive(Component)]
7924pub struct AbstractFish;
7925impl AbstractFish {
7926    fn apply_metadata(
7927        entity: &mut bevy_ecs::system::EntityCommands,
7928        d: EntityDataItem,
7929    ) -> Result<(), UpdateMetadataError> {
7930        match d.index {
7931            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
7932            16 => {
7933                entity.insert(AbstractFishFromBucket(d.value.into_boolean()?));
7934            }
7935            _ => {}
7936        }
7937        Ok(())
7938    }
7939}
7940
7941/// The metadata bundle for [AbstractFish].
7942///
7943/// This type should generally not be used directly.
7944#[derive(Bundle)]
7945pub struct AbstractFishMetadataBundle {
7946    _marker: AbstractFish,
7947    parent: AbstractCreatureMetadataBundle,
7948    abstract_fish_from_bucket: AbstractFishFromBucket,
7949}
7950impl Default for AbstractFishMetadataBundle {
7951    fn default() -> Self {
7952        Self {
7953            _marker: AbstractFish,
7954            parent: Default::default(),
7955            abstract_fish_from_bucket: AbstractFishFromBucket(false),
7956        }
7957    }
7958}
7959
7960/// The marker component for entities of type `minecraft:cod`.
7961///
7962/// # Metadata
7963///
7964/// This entity type does not add any additional metadata. It will still have
7965/// metadata from parent types.
7966///
7967/// # Parents
7968///
7969/// Entities with `Cod` will also have the following marker components and their
7970/// metadata fields:
7971///
7972/// - [AbstractFish]
7973/// - [AbstractCreature]
7974/// - [AbstractInsentient]
7975/// - [AbstractLiving]
7976/// - [AbstractEntity]
7977///
7978/// # Children
7979///
7980/// This entity type has no children types.
7981#[derive(Component)]
7982pub struct Cod;
7983impl Cod {
7984    fn apply_metadata(
7985        entity: &mut bevy_ecs::system::EntityCommands,
7986        d: EntityDataItem,
7987    ) -> Result<(), UpdateMetadataError> {
7988        match d.index {
7989            0..=16 => AbstractFish::apply_metadata(entity, d)?,
7990            _ => {}
7991        }
7992        Ok(())
7993    }
7994}
7995
7996/// The metadata bundle for [Cod].
7997///
7998/// This type should generally not be used directly.
7999#[derive(Bundle)]
8000pub struct CodMetadataBundle {
8001    _marker: Cod,
8002    parent: AbstractFishMetadataBundle,
8003}
8004impl Default for CodMetadataBundle {
8005    fn default() -> Self {
8006        Self {
8007            _marker: Cod,
8008            parent: Default::default(),
8009        }
8010    }
8011}
8012
8013/// A metadata field for [Salmon].
8014#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8015pub struct SalmonKind(pub i32);
8016/// The marker component for entities of type `minecraft:salmon`.
8017///
8018/// # Metadata
8019///
8020/// These are the metadata components that all `Salmon` entities are guaranteed
8021/// to have, in addition to the metadata components from parent types:
8022///
8023/// - [SalmonKind]
8024///
8025/// # Parents
8026///
8027/// Entities with `Salmon` will also have the following marker components and
8028/// their metadata fields:
8029///
8030/// - [AbstractFish]
8031/// - [AbstractCreature]
8032/// - [AbstractInsentient]
8033/// - [AbstractLiving]
8034/// - [AbstractEntity]
8035///
8036/// # Children
8037///
8038/// This entity type has no children types.
8039#[derive(Component)]
8040pub struct Salmon;
8041impl Salmon {
8042    fn apply_metadata(
8043        entity: &mut bevy_ecs::system::EntityCommands,
8044        d: EntityDataItem,
8045    ) -> Result<(), UpdateMetadataError> {
8046        match d.index {
8047            0..=16 => AbstractFish::apply_metadata(entity, d)?,
8048            17 => {
8049                entity.insert(SalmonKind(d.value.into_int()?));
8050            }
8051            _ => {}
8052        }
8053        Ok(())
8054    }
8055}
8056
8057/// The metadata bundle for [Salmon].
8058///
8059/// This type should generally not be used directly.
8060#[derive(Bundle)]
8061pub struct SalmonMetadataBundle {
8062    _marker: Salmon,
8063    parent: AbstractFishMetadataBundle,
8064    salmon_kind: SalmonKind,
8065}
8066impl Default for SalmonMetadataBundle {
8067    fn default() -> Self {
8068        Self {
8069            _marker: Salmon,
8070            parent: Default::default(),
8071            salmon_kind: SalmonKind(Default::default()),
8072        }
8073    }
8074}
8075
8076/// A metadata field for [TropicalFish].
8077#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8078pub struct TropicalFishTypeVariant(pub i32);
8079/// The marker component for entities of type `minecraft:tropical_fish`.
8080///
8081/// # Metadata
8082///
8083/// These are the metadata components that all `TropicalFish` entities are
8084/// guaranteed to have, in addition to the metadata components from parent
8085/// types:
8086///
8087/// - [TropicalFishTypeVariant]
8088///
8089/// # Parents
8090///
8091/// Entities with `TropicalFish` will also have the following marker components
8092/// and their metadata fields:
8093///
8094/// - [AbstractFish]
8095/// - [AbstractCreature]
8096/// - [AbstractInsentient]
8097/// - [AbstractLiving]
8098/// - [AbstractEntity]
8099///
8100/// # Children
8101///
8102/// This entity type has no children types.
8103#[derive(Component)]
8104pub struct TropicalFish;
8105impl TropicalFish {
8106    fn apply_metadata(
8107        entity: &mut bevy_ecs::system::EntityCommands,
8108        d: EntityDataItem,
8109    ) -> Result<(), UpdateMetadataError> {
8110        match d.index {
8111            0..=16 => AbstractFish::apply_metadata(entity, d)?,
8112            17 => {
8113                entity.insert(TropicalFishTypeVariant(d.value.into_int()?));
8114            }
8115            _ => {}
8116        }
8117        Ok(())
8118    }
8119}
8120
8121/// The metadata bundle for [TropicalFish].
8122///
8123/// This type should generally not be used directly.
8124#[derive(Bundle)]
8125pub struct TropicalFishMetadataBundle {
8126    _marker: TropicalFish,
8127    parent: AbstractFishMetadataBundle,
8128    tropical_fish_type_variant: TropicalFishTypeVariant,
8129}
8130impl Default for TropicalFishMetadataBundle {
8131    fn default() -> Self {
8132        Self {
8133            _marker: TropicalFish,
8134            parent: Default::default(),
8135            tropical_fish_type_variant: TropicalFishTypeVariant(Default::default()),
8136        }
8137    }
8138}
8139
8140/// An abstract entity marker component.
8141///
8142/// # Metadata
8143///
8144/// This entity type does not add any additional metadata. It will still have
8145/// metadata from parent types.
8146///
8147/// # Parents
8148///
8149/// Entities with `AbstractMonster` will also have the following marker
8150/// components and their metadata fields:
8151///
8152/// - [AbstractCreature]
8153/// - [AbstractInsentient]
8154/// - [AbstractLiving]
8155/// - [AbstractEntity]
8156///
8157/// # Children
8158///
8159/// - [Blaze]
8160/// - [Bogged]
8161/// - [Breeze]
8162/// - [Creaking]
8163/// - [Creeper]
8164/// - [Enderman]
8165/// - [Endermite]
8166/// - [Giant]
8167/// - [Guardian]
8168///   - [ElderGuardian]
8169/// - [Parched]
8170/// - [Silverfish]
8171/// - [Skeleton]
8172/// - [Spider]
8173///   - [CaveSpider]
8174/// - [Stray]
8175/// - [Vex]
8176/// - [Warden]
8177/// - [Wither]
8178/// - [WitherSkeleton]
8179/// - [Zoglin]
8180/// - [Zombie]
8181///   - [Drowned]
8182///   - [Husk]
8183///   - [ZombieVillager]
8184///   - [ZombifiedPiglin]
8185/// - [AbstractPiglin]
8186///   - [Piglin]
8187///   - [PiglinBrute]
8188/// - [AbstractRaider]
8189///   - [Pillager]
8190///   - [Ravager]
8191///   - [Vindicator]
8192///   - [Witch]
8193///   - [AbstractSpellcasterIllager]
8194///     - [Evoker]
8195///     - [Illusioner]
8196#[derive(Component)]
8197pub struct AbstractMonster;
8198impl AbstractMonster {
8199    fn apply_metadata(
8200        entity: &mut bevy_ecs::system::EntityCommands,
8201        d: EntityDataItem,
8202    ) -> Result<(), UpdateMetadataError> {
8203        match d.index {
8204            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
8205            _ => {}
8206        }
8207        Ok(())
8208    }
8209}
8210
8211/// The metadata bundle for [AbstractMonster].
8212///
8213/// This type should generally not be used directly.
8214#[derive(Bundle)]
8215pub struct AbstractMonsterMetadataBundle {
8216    _marker: AbstractMonster,
8217    parent: AbstractCreatureMetadataBundle,
8218}
8219impl Default for AbstractMonsterMetadataBundle {
8220    fn default() -> Self {
8221        Self {
8222            _marker: AbstractMonster,
8223            parent: Default::default(),
8224        }
8225    }
8226}
8227
8228#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8229/// A metadata field for [Blaze].
8230pub struct Charged(pub bool);
8231/// The marker component for entities of type `minecraft:blaze`.
8232///
8233/// # Metadata
8234///
8235/// These are the metadata components that all `Blaze` entities are guaranteed
8236/// to have, in addition to the metadata components from parent types:
8237///
8238/// - [Charged]
8239///
8240/// # Parents
8241///
8242/// Entities with `Blaze` will also have the following marker components and
8243/// their metadata fields:
8244///
8245/// - [AbstractMonster]
8246/// - [AbstractCreature]
8247/// - [AbstractInsentient]
8248/// - [AbstractLiving]
8249/// - [AbstractEntity]
8250///
8251/// # Children
8252///
8253/// This entity type has no children types.
8254#[derive(Component)]
8255pub struct Blaze;
8256impl Blaze {
8257    fn apply_metadata(
8258        entity: &mut bevy_ecs::system::EntityCommands,
8259        d: EntityDataItem,
8260    ) -> Result<(), UpdateMetadataError> {
8261        match d.index {
8262            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8263            16 => {
8264                let bitfield = d.value.into_byte()?;
8265                entity.insert(Charged(bitfield & 0x1 != 0));
8266            }
8267            _ => {}
8268        }
8269        Ok(())
8270    }
8271}
8272
8273/// The metadata bundle for [Blaze].
8274///
8275/// This type should generally not be used directly.
8276#[derive(Bundle)]
8277pub struct BlazeMetadataBundle {
8278    _marker: Blaze,
8279    parent: AbstractMonsterMetadataBundle,
8280    charged: Charged,
8281}
8282impl Default for BlazeMetadataBundle {
8283    fn default() -> Self {
8284        Self {
8285            _marker: Blaze,
8286            parent: Default::default(),
8287            charged: Charged(false),
8288        }
8289    }
8290}
8291
8292/// A metadata field for [Bogged].
8293#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8294pub struct BoggedSheared(pub bool);
8295/// The marker component for entities of type `minecraft:bogged`.
8296///
8297/// # Metadata
8298///
8299/// These are the metadata components that all `Bogged` entities are guaranteed
8300/// to have, in addition to the metadata components from parent types:
8301///
8302/// - [BoggedSheared]
8303///
8304/// # Parents
8305///
8306/// Entities with `Bogged` will also have the following marker components and
8307/// their metadata fields:
8308///
8309/// - [AbstractMonster]
8310/// - [AbstractCreature]
8311/// - [AbstractInsentient]
8312/// - [AbstractLiving]
8313/// - [AbstractEntity]
8314///
8315/// # Children
8316///
8317/// This entity type has no children types.
8318#[derive(Component)]
8319pub struct Bogged;
8320impl Bogged {
8321    fn apply_metadata(
8322        entity: &mut bevy_ecs::system::EntityCommands,
8323        d: EntityDataItem,
8324    ) -> Result<(), UpdateMetadataError> {
8325        match d.index {
8326            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8327            16 => {
8328                entity.insert(BoggedSheared(d.value.into_boolean()?));
8329            }
8330            _ => {}
8331        }
8332        Ok(())
8333    }
8334}
8335
8336/// The metadata bundle for [Bogged].
8337///
8338/// This type should generally not be used directly.
8339#[derive(Bundle)]
8340pub struct BoggedMetadataBundle {
8341    _marker: Bogged,
8342    parent: AbstractMonsterMetadataBundle,
8343    bogged_sheared: BoggedSheared,
8344}
8345impl Default for BoggedMetadataBundle {
8346    fn default() -> Self {
8347        Self {
8348            _marker: Bogged,
8349            parent: Default::default(),
8350            bogged_sheared: BoggedSheared(false),
8351        }
8352    }
8353}
8354
8355/// The marker component for entities of type `minecraft:breeze`.
8356///
8357/// # Metadata
8358///
8359/// This entity type does not add any additional metadata. It will still have
8360/// metadata from parent types.
8361///
8362/// # Parents
8363///
8364/// Entities with `Breeze` will also have the following marker components and
8365/// their metadata fields:
8366///
8367/// - [AbstractMonster]
8368/// - [AbstractCreature]
8369/// - [AbstractInsentient]
8370/// - [AbstractLiving]
8371/// - [AbstractEntity]
8372///
8373/// # Children
8374///
8375/// This entity type has no children types.
8376#[derive(Component)]
8377pub struct Breeze;
8378impl Breeze {
8379    fn apply_metadata(
8380        entity: &mut bevy_ecs::system::EntityCommands,
8381        d: EntityDataItem,
8382    ) -> Result<(), UpdateMetadataError> {
8383        match d.index {
8384            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8385            _ => {}
8386        }
8387        Ok(())
8388    }
8389}
8390
8391/// The metadata bundle for [Breeze].
8392///
8393/// This type should generally not be used directly.
8394#[derive(Bundle)]
8395pub struct BreezeMetadataBundle {
8396    _marker: Breeze,
8397    parent: AbstractMonsterMetadataBundle,
8398}
8399impl Default for BreezeMetadataBundle {
8400    fn default() -> Self {
8401        Self {
8402            _marker: Breeze,
8403            parent: Default::default(),
8404        }
8405    }
8406}
8407
8408/// A metadata field for [Creaking].
8409#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8410pub struct CanMove(pub bool);
8411/// A metadata field for [Creaking].
8412#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8413pub struct IsActive(pub bool);
8414/// A metadata field for [Creaking].
8415#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8416pub struct IsTearingDown(pub bool);
8417/// A metadata field for [Creaking].
8418#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8419pub struct HomePos(pub Option<BlockPos>);
8420/// The marker component for entities of type `minecraft:creaking`.
8421///
8422/// # Metadata
8423///
8424/// These are the metadata components that all `Creaking` entities are
8425/// guaranteed to have, in addition to the metadata components from parent
8426/// types:
8427///
8428/// - [CanMove]
8429/// - [IsActive]
8430/// - [IsTearingDown]
8431/// - [HomePos]
8432///
8433/// # Parents
8434///
8435/// Entities with `Creaking` will also have the following marker components and
8436/// their metadata fields:
8437///
8438/// - [AbstractMonster]
8439/// - [AbstractCreature]
8440/// - [AbstractInsentient]
8441/// - [AbstractLiving]
8442/// - [AbstractEntity]
8443///
8444/// # Children
8445///
8446/// This entity type has no children types.
8447#[derive(Component)]
8448pub struct Creaking;
8449impl Creaking {
8450    fn apply_metadata(
8451        entity: &mut bevy_ecs::system::EntityCommands,
8452        d: EntityDataItem,
8453    ) -> Result<(), UpdateMetadataError> {
8454        match d.index {
8455            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8456            16 => {
8457                entity.insert(CanMove(d.value.into_boolean()?));
8458            }
8459            17 => {
8460                entity.insert(IsActive(d.value.into_boolean()?));
8461            }
8462            18 => {
8463                entity.insert(IsTearingDown(d.value.into_boolean()?));
8464            }
8465            19 => {
8466                entity.insert(HomePos(d.value.into_optional_block_pos()?));
8467            }
8468            _ => {}
8469        }
8470        Ok(())
8471    }
8472}
8473
8474/// The metadata bundle for [Creaking].
8475///
8476/// This type should generally not be used directly.
8477#[derive(Bundle)]
8478pub struct CreakingMetadataBundle {
8479    _marker: Creaking,
8480    parent: AbstractMonsterMetadataBundle,
8481    can_move: CanMove,
8482    is_active: IsActive,
8483    is_tearing_down: IsTearingDown,
8484    home_pos: HomePos,
8485}
8486impl Default for CreakingMetadataBundle {
8487    fn default() -> Self {
8488        Self {
8489            _marker: Creaking,
8490            parent: Default::default(),
8491            can_move: CanMove(true),
8492            is_active: IsActive(false),
8493            is_tearing_down: IsTearingDown(false),
8494            home_pos: HomePos(None),
8495        }
8496    }
8497}
8498
8499/// A metadata field for [Creeper].
8500#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8501pub struct SwellDir(pub i32);
8502/// A metadata field for [Creeper].
8503#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8504pub struct IsPowered(pub bool);
8505/// A metadata field for [Creeper].
8506#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8507pub struct IsIgnited(pub bool);
8508/// The marker component for entities of type `minecraft:creeper`.
8509///
8510/// # Metadata
8511///
8512/// These are the metadata components that all `Creeper` entities are guaranteed
8513/// to have, in addition to the metadata components from parent types:
8514///
8515/// - [SwellDir]
8516/// - [IsPowered]
8517/// - [IsIgnited]
8518///
8519/// # Parents
8520///
8521/// Entities with `Creeper` will also have the following marker components and
8522/// their metadata fields:
8523///
8524/// - [AbstractMonster]
8525/// - [AbstractCreature]
8526/// - [AbstractInsentient]
8527/// - [AbstractLiving]
8528/// - [AbstractEntity]
8529///
8530/// # Children
8531///
8532/// This entity type has no children types.
8533#[derive(Component)]
8534pub struct Creeper;
8535impl Creeper {
8536    fn apply_metadata(
8537        entity: &mut bevy_ecs::system::EntityCommands,
8538        d: EntityDataItem,
8539    ) -> Result<(), UpdateMetadataError> {
8540        match d.index {
8541            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8542            16 => {
8543                entity.insert(SwellDir(d.value.into_int()?));
8544            }
8545            17 => {
8546                entity.insert(IsPowered(d.value.into_boolean()?));
8547            }
8548            18 => {
8549                entity.insert(IsIgnited(d.value.into_boolean()?));
8550            }
8551            _ => {}
8552        }
8553        Ok(())
8554    }
8555}
8556
8557/// The metadata bundle for [Creeper].
8558///
8559/// This type should generally not be used directly.
8560#[derive(Bundle)]
8561pub struct CreeperMetadataBundle {
8562    _marker: Creeper,
8563    parent: AbstractMonsterMetadataBundle,
8564    swell_dir: SwellDir,
8565    is_powered: IsPowered,
8566    is_ignited: IsIgnited,
8567}
8568impl Default for CreeperMetadataBundle {
8569    fn default() -> Self {
8570        Self {
8571            _marker: Creeper,
8572            parent: Default::default(),
8573            swell_dir: SwellDir(-1),
8574            is_powered: IsPowered(false),
8575            is_ignited: IsIgnited(false),
8576        }
8577    }
8578}
8579
8580/// A metadata field for [Enderman].
8581#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8582pub struct CarryState(pub azalea_block::BlockState);
8583/// A metadata field for [Enderman].
8584#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8585pub struct Creepy(pub bool);
8586/// A metadata field for [Enderman].
8587#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8588pub struct StaredAt(pub bool);
8589/// The marker component for entities of type `minecraft:enderman`.
8590///
8591/// # Metadata
8592///
8593/// These are the metadata components that all `Enderman` entities are
8594/// guaranteed to have, in addition to the metadata components from parent
8595/// types:
8596///
8597/// - [CarryState]
8598/// - [Creepy]
8599/// - [StaredAt]
8600///
8601/// # Parents
8602///
8603/// Entities with `Enderman` will also have the following marker components and
8604/// their metadata fields:
8605///
8606/// - [AbstractMonster]
8607/// - [AbstractCreature]
8608/// - [AbstractInsentient]
8609/// - [AbstractLiving]
8610/// - [AbstractEntity]
8611///
8612/// # Children
8613///
8614/// This entity type has no children types.
8615#[derive(Component)]
8616pub struct Enderman;
8617impl Enderman {
8618    fn apply_metadata(
8619        entity: &mut bevy_ecs::system::EntityCommands,
8620        d: EntityDataItem,
8621    ) -> Result<(), UpdateMetadataError> {
8622        match d.index {
8623            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8624            16 => {
8625                entity.insert(CarryState(d.value.into_optional_block_state()?));
8626            }
8627            17 => {
8628                entity.insert(Creepy(d.value.into_boolean()?));
8629            }
8630            18 => {
8631                entity.insert(StaredAt(d.value.into_boolean()?));
8632            }
8633            _ => {}
8634        }
8635        Ok(())
8636    }
8637}
8638
8639/// The metadata bundle for [Enderman].
8640///
8641/// This type should generally not be used directly.
8642#[derive(Bundle)]
8643pub struct EndermanMetadataBundle {
8644    _marker: Enderman,
8645    parent: AbstractMonsterMetadataBundle,
8646    carry_state: CarryState,
8647    creepy: Creepy,
8648    stared_at: StaredAt,
8649}
8650impl Default for EndermanMetadataBundle {
8651    fn default() -> Self {
8652        Self {
8653            _marker: Enderman,
8654            parent: Default::default(),
8655            carry_state: CarryState(azalea_block::BlockState::AIR),
8656            creepy: Creepy(false),
8657            stared_at: StaredAt(false),
8658        }
8659    }
8660}
8661
8662/// The marker component for entities of type `minecraft:endermite`.
8663///
8664/// # Metadata
8665///
8666/// This entity type does not add any additional metadata. It will still have
8667/// metadata from parent types.
8668///
8669/// # Parents
8670///
8671/// Entities with `Endermite` will also have the following marker components and
8672/// their metadata fields:
8673///
8674/// - [AbstractMonster]
8675/// - [AbstractCreature]
8676/// - [AbstractInsentient]
8677/// - [AbstractLiving]
8678/// - [AbstractEntity]
8679///
8680/// # Children
8681///
8682/// This entity type has no children types.
8683#[derive(Component)]
8684pub struct Endermite;
8685impl Endermite {
8686    fn apply_metadata(
8687        entity: &mut bevy_ecs::system::EntityCommands,
8688        d: EntityDataItem,
8689    ) -> Result<(), UpdateMetadataError> {
8690        match d.index {
8691            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8692            _ => {}
8693        }
8694        Ok(())
8695    }
8696}
8697
8698/// The metadata bundle for [Endermite].
8699///
8700/// This type should generally not be used directly.
8701#[derive(Bundle)]
8702pub struct EndermiteMetadataBundle {
8703    _marker: Endermite,
8704    parent: AbstractMonsterMetadataBundle,
8705}
8706impl Default for EndermiteMetadataBundle {
8707    fn default() -> Self {
8708        Self {
8709            _marker: Endermite,
8710            parent: Default::default(),
8711        }
8712    }
8713}
8714
8715/// The marker component for entities of type `minecraft:giant`.
8716///
8717/// # Metadata
8718///
8719/// This entity type does not add any additional metadata. It will still have
8720/// metadata from parent types.
8721///
8722/// # Parents
8723///
8724/// Entities with `Giant` will also have the following marker components and
8725/// their metadata fields:
8726///
8727/// - [AbstractMonster]
8728/// - [AbstractCreature]
8729/// - [AbstractInsentient]
8730/// - [AbstractLiving]
8731/// - [AbstractEntity]
8732///
8733/// # Children
8734///
8735/// This entity type has no children types.
8736#[derive(Component)]
8737pub struct Giant;
8738impl Giant {
8739    fn apply_metadata(
8740        entity: &mut bevy_ecs::system::EntityCommands,
8741        d: EntityDataItem,
8742    ) -> Result<(), UpdateMetadataError> {
8743        match d.index {
8744            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8745            _ => {}
8746        }
8747        Ok(())
8748    }
8749}
8750
8751/// The metadata bundle for [Giant].
8752///
8753/// This type should generally not be used directly.
8754#[derive(Bundle)]
8755pub struct GiantMetadataBundle {
8756    _marker: Giant,
8757    parent: AbstractMonsterMetadataBundle,
8758}
8759impl Default for GiantMetadataBundle {
8760    fn default() -> Self {
8761        Self {
8762            _marker: Giant,
8763            parent: Default::default(),
8764        }
8765    }
8766}
8767
8768/// A metadata field for [Guardian].
8769#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8770pub struct Moving(pub bool);
8771/// A metadata field for [Guardian].
8772#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8773pub struct AttackTarget(pub i32);
8774/// The marker component for entities of type `minecraft:guardian`.
8775///
8776/// # Metadata
8777///
8778/// These are the metadata components that all `Guardian` entities are
8779/// guaranteed to have, in addition to the metadata components from parent
8780/// types:
8781///
8782/// - [Moving]
8783/// - [AttackTarget]
8784///
8785/// # Parents
8786///
8787/// Entities with `Guardian` will also have the following marker components and
8788/// their metadata fields:
8789///
8790/// - [AbstractMonster]
8791/// - [AbstractCreature]
8792/// - [AbstractInsentient]
8793/// - [AbstractLiving]
8794/// - [AbstractEntity]
8795///
8796/// # Children
8797///
8798/// - [ElderGuardian]
8799#[derive(Component)]
8800pub struct Guardian;
8801impl Guardian {
8802    fn apply_metadata(
8803        entity: &mut bevy_ecs::system::EntityCommands,
8804        d: EntityDataItem,
8805    ) -> Result<(), UpdateMetadataError> {
8806        match d.index {
8807            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8808            16 => {
8809                entity.insert(Moving(d.value.into_boolean()?));
8810            }
8811            17 => {
8812                entity.insert(AttackTarget(d.value.into_int()?));
8813            }
8814            _ => {}
8815        }
8816        Ok(())
8817    }
8818}
8819
8820/// The metadata bundle for [Guardian].
8821///
8822/// This type should generally not be used directly.
8823#[derive(Bundle)]
8824pub struct GuardianMetadataBundle {
8825    _marker: Guardian,
8826    parent: AbstractMonsterMetadataBundle,
8827    moving: Moving,
8828    attack_target: AttackTarget,
8829}
8830impl Default for GuardianMetadataBundle {
8831    fn default() -> Self {
8832        Self {
8833            _marker: Guardian,
8834            parent: Default::default(),
8835            moving: Moving(false),
8836            attack_target: AttackTarget(0),
8837        }
8838    }
8839}
8840
8841/// The marker component for entities of type `minecraft:elder_guardian`.
8842///
8843/// # Metadata
8844///
8845/// This entity type does not add any additional metadata. It will still have
8846/// metadata from parent types.
8847///
8848/// # Parents
8849///
8850/// Entities with `ElderGuardian` will also have the following marker components
8851/// and their metadata fields:
8852///
8853/// - [Guardian]
8854/// - [AbstractMonster]
8855/// - [AbstractCreature]
8856/// - [AbstractInsentient]
8857/// - [AbstractLiving]
8858/// - [AbstractEntity]
8859///
8860/// # Children
8861///
8862/// This entity type has no children types.
8863#[derive(Component)]
8864pub struct ElderGuardian;
8865impl ElderGuardian {
8866    fn apply_metadata(
8867        entity: &mut bevy_ecs::system::EntityCommands,
8868        d: EntityDataItem,
8869    ) -> Result<(), UpdateMetadataError> {
8870        match d.index {
8871            0..=17 => Guardian::apply_metadata(entity, d)?,
8872            _ => {}
8873        }
8874        Ok(())
8875    }
8876}
8877
8878/// The metadata bundle for [ElderGuardian].
8879///
8880/// This type should generally not be used directly.
8881#[derive(Bundle)]
8882pub struct ElderGuardianMetadataBundle {
8883    _marker: ElderGuardian,
8884    parent: GuardianMetadataBundle,
8885}
8886impl Default for ElderGuardianMetadataBundle {
8887    fn default() -> Self {
8888        Self {
8889            _marker: ElderGuardian,
8890            parent: Default::default(),
8891        }
8892    }
8893}
8894
8895/// The marker component for entities of type `minecraft:parched`.
8896///
8897/// # Metadata
8898///
8899/// This entity type does not add any additional metadata. It will still have
8900/// metadata from parent types.
8901///
8902/// # Parents
8903///
8904/// Entities with `Parched` will also have the following marker components and
8905/// their metadata fields:
8906///
8907/// - [AbstractMonster]
8908/// - [AbstractCreature]
8909/// - [AbstractInsentient]
8910/// - [AbstractLiving]
8911/// - [AbstractEntity]
8912///
8913/// # Children
8914///
8915/// This entity type has no children types.
8916#[derive(Component)]
8917pub struct Parched;
8918impl Parched {
8919    fn apply_metadata(
8920        entity: &mut bevy_ecs::system::EntityCommands,
8921        d: EntityDataItem,
8922    ) -> Result<(), UpdateMetadataError> {
8923        match d.index {
8924            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8925            _ => {}
8926        }
8927        Ok(())
8928    }
8929}
8930
8931/// The metadata bundle for [Parched].
8932///
8933/// This type should generally not be used directly.
8934#[derive(Bundle)]
8935pub struct ParchedMetadataBundle {
8936    _marker: Parched,
8937    parent: AbstractMonsterMetadataBundle,
8938}
8939impl Default for ParchedMetadataBundle {
8940    fn default() -> Self {
8941        Self {
8942            _marker: Parched,
8943            parent: Default::default(),
8944        }
8945    }
8946}
8947
8948/// The marker component for entities of type `minecraft:silverfish`.
8949///
8950/// # Metadata
8951///
8952/// This entity type does not add any additional metadata. It will still have
8953/// metadata from parent types.
8954///
8955/// # Parents
8956///
8957/// Entities with `Silverfish` will also have the following marker components
8958/// and their metadata fields:
8959///
8960/// - [AbstractMonster]
8961/// - [AbstractCreature]
8962/// - [AbstractInsentient]
8963/// - [AbstractLiving]
8964/// - [AbstractEntity]
8965///
8966/// # Children
8967///
8968/// This entity type has no children types.
8969#[derive(Component)]
8970pub struct Silverfish;
8971impl Silverfish {
8972    fn apply_metadata(
8973        entity: &mut bevy_ecs::system::EntityCommands,
8974        d: EntityDataItem,
8975    ) -> Result<(), UpdateMetadataError> {
8976        match d.index {
8977            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
8978            _ => {}
8979        }
8980        Ok(())
8981    }
8982}
8983
8984/// The metadata bundle for [Silverfish].
8985///
8986/// This type should generally not be used directly.
8987#[derive(Bundle)]
8988pub struct SilverfishMetadataBundle {
8989    _marker: Silverfish,
8990    parent: AbstractMonsterMetadataBundle,
8991}
8992impl Default for SilverfishMetadataBundle {
8993    fn default() -> Self {
8994        Self {
8995            _marker: Silverfish,
8996            parent: Default::default(),
8997        }
8998    }
8999}
9000
9001/// A metadata field for [Skeleton].
9002#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9003pub struct StrayConversion(pub bool);
9004/// The marker component for entities of type `minecraft:skeleton`.
9005///
9006/// # Metadata
9007///
9008/// These are the metadata components that all `Skeleton` entities are
9009/// guaranteed to have, in addition to the metadata components from parent
9010/// types:
9011///
9012/// - [StrayConversion]
9013///
9014/// # Parents
9015///
9016/// Entities with `Skeleton` will also have the following marker components and
9017/// their metadata fields:
9018///
9019/// - [AbstractMonster]
9020/// - [AbstractCreature]
9021/// - [AbstractInsentient]
9022/// - [AbstractLiving]
9023/// - [AbstractEntity]
9024///
9025/// # Children
9026///
9027/// This entity type has no children types.
9028#[derive(Component)]
9029pub struct Skeleton;
9030impl Skeleton {
9031    fn apply_metadata(
9032        entity: &mut bevy_ecs::system::EntityCommands,
9033        d: EntityDataItem,
9034    ) -> Result<(), UpdateMetadataError> {
9035        match d.index {
9036            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9037            16 => {
9038                entity.insert(StrayConversion(d.value.into_boolean()?));
9039            }
9040            _ => {}
9041        }
9042        Ok(())
9043    }
9044}
9045
9046/// The metadata bundle for [Skeleton].
9047///
9048/// This type should generally not be used directly.
9049#[derive(Bundle)]
9050pub struct SkeletonMetadataBundle {
9051    _marker: Skeleton,
9052    parent: AbstractMonsterMetadataBundle,
9053    stray_conversion: StrayConversion,
9054}
9055impl Default for SkeletonMetadataBundle {
9056    fn default() -> Self {
9057        Self {
9058            _marker: Skeleton,
9059            parent: Default::default(),
9060            stray_conversion: StrayConversion(false),
9061        }
9062    }
9063}
9064
9065#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
9066/// A metadata field for [Spider].
9067pub struct Climbing(pub bool);
9068/// The marker component for entities of type `minecraft:spider`.
9069///
9070/// # Metadata
9071///
9072/// These are the metadata components that all `Spider` entities are guaranteed
9073/// to have, in addition to the metadata components from parent types:
9074///
9075/// - [Climbing]
9076///
9077/// # Parents
9078///
9079/// Entities with `Spider` will also have the following marker components and
9080/// their metadata fields:
9081///
9082/// - [AbstractMonster]
9083/// - [AbstractCreature]
9084/// - [AbstractInsentient]
9085/// - [AbstractLiving]
9086/// - [AbstractEntity]
9087///
9088/// # Children
9089///
9090/// - [CaveSpider]
9091#[derive(Component)]
9092pub struct Spider;
9093impl Spider {
9094    fn apply_metadata(
9095        entity: &mut bevy_ecs::system::EntityCommands,
9096        d: EntityDataItem,
9097    ) -> Result<(), UpdateMetadataError> {
9098        match d.index {
9099            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9100            16 => {
9101                let bitfield = d.value.into_byte()?;
9102                entity.insert(Climbing(bitfield & 0x1 != 0));
9103            }
9104            _ => {}
9105        }
9106        Ok(())
9107    }
9108}
9109
9110/// The metadata bundle for [Spider].
9111///
9112/// This type should generally not be used directly.
9113#[derive(Bundle)]
9114pub struct SpiderMetadataBundle {
9115    _marker: Spider,
9116    parent: AbstractMonsterMetadataBundle,
9117    climbing: Climbing,
9118}
9119impl Default for SpiderMetadataBundle {
9120    fn default() -> Self {
9121        Self {
9122            _marker: Spider,
9123            parent: Default::default(),
9124            climbing: Climbing(false),
9125        }
9126    }
9127}
9128
9129/// The marker component for entities of type `minecraft:cave_spider`.
9130///
9131/// # Metadata
9132///
9133/// This entity type does not add any additional metadata. It will still have
9134/// metadata from parent types.
9135///
9136/// # Parents
9137///
9138/// Entities with `CaveSpider` will also have the following marker components
9139/// and their metadata fields:
9140///
9141/// - [Spider]
9142/// - [AbstractMonster]
9143/// - [AbstractCreature]
9144/// - [AbstractInsentient]
9145/// - [AbstractLiving]
9146/// - [AbstractEntity]
9147///
9148/// # Children
9149///
9150/// This entity type has no children types.
9151#[derive(Component)]
9152pub struct CaveSpider;
9153impl CaveSpider {
9154    fn apply_metadata(
9155        entity: &mut bevy_ecs::system::EntityCommands,
9156        d: EntityDataItem,
9157    ) -> Result<(), UpdateMetadataError> {
9158        match d.index {
9159            0..=16 => Spider::apply_metadata(entity, d)?,
9160            _ => {}
9161        }
9162        Ok(())
9163    }
9164}
9165
9166/// The metadata bundle for [CaveSpider].
9167///
9168/// This type should generally not be used directly.
9169#[derive(Bundle)]
9170pub struct CaveSpiderMetadataBundle {
9171    _marker: CaveSpider,
9172    parent: SpiderMetadataBundle,
9173}
9174impl Default for CaveSpiderMetadataBundle {
9175    fn default() -> Self {
9176        Self {
9177            _marker: CaveSpider,
9178            parent: Default::default(),
9179        }
9180    }
9181}
9182
9183/// The marker component for entities of type `minecraft:stray`.
9184///
9185/// # Metadata
9186///
9187/// This entity type does not add any additional metadata. It will still have
9188/// metadata from parent types.
9189///
9190/// # Parents
9191///
9192/// Entities with `Stray` will also have the following marker components and
9193/// their metadata fields:
9194///
9195/// - [AbstractMonster]
9196/// - [AbstractCreature]
9197/// - [AbstractInsentient]
9198/// - [AbstractLiving]
9199/// - [AbstractEntity]
9200///
9201/// # Children
9202///
9203/// This entity type has no children types.
9204#[derive(Component)]
9205pub struct Stray;
9206impl Stray {
9207    fn apply_metadata(
9208        entity: &mut bevy_ecs::system::EntityCommands,
9209        d: EntityDataItem,
9210    ) -> Result<(), UpdateMetadataError> {
9211        match d.index {
9212            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9213            _ => {}
9214        }
9215        Ok(())
9216    }
9217}
9218
9219/// The metadata bundle for [Stray].
9220///
9221/// This type should generally not be used directly.
9222#[derive(Bundle)]
9223pub struct StrayMetadataBundle {
9224    _marker: Stray,
9225    parent: AbstractMonsterMetadataBundle,
9226}
9227impl Default for StrayMetadataBundle {
9228    fn default() -> Self {
9229        Self {
9230            _marker: Stray,
9231            parent: Default::default(),
9232        }
9233    }
9234}
9235
9236/// A metadata field for [Vex].
9237#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9238pub struct VexFlags(pub u8);
9239/// The marker component for entities of type `minecraft:vex`.
9240///
9241/// # Metadata
9242///
9243/// These are the metadata components that all `Vex` entities are guaranteed to
9244/// have, in addition to the metadata components from parent types:
9245///
9246/// - [VexFlags]
9247///
9248/// # Parents
9249///
9250/// Entities with `Vex` will also have the following marker components and their
9251/// metadata fields:
9252///
9253/// - [AbstractMonster]
9254/// - [AbstractCreature]
9255/// - [AbstractInsentient]
9256/// - [AbstractLiving]
9257/// - [AbstractEntity]
9258///
9259/// # Children
9260///
9261/// This entity type has no children types.
9262#[derive(Component)]
9263pub struct Vex;
9264impl Vex {
9265    fn apply_metadata(
9266        entity: &mut bevy_ecs::system::EntityCommands,
9267        d: EntityDataItem,
9268    ) -> Result<(), UpdateMetadataError> {
9269        match d.index {
9270            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9271            16 => {
9272                entity.insert(VexFlags(d.value.into_byte()?));
9273            }
9274            _ => {}
9275        }
9276        Ok(())
9277    }
9278}
9279
9280/// The metadata bundle for [Vex].
9281///
9282/// This type should generally not be used directly.
9283#[derive(Bundle)]
9284pub struct VexMetadataBundle {
9285    _marker: Vex,
9286    parent: AbstractMonsterMetadataBundle,
9287    vex_flags: VexFlags,
9288}
9289impl Default for VexMetadataBundle {
9290    fn default() -> Self {
9291        Self {
9292            _marker: Vex,
9293            parent: Default::default(),
9294            vex_flags: VexFlags(0),
9295        }
9296    }
9297}
9298
9299/// A metadata field for [Warden].
9300#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9301pub struct ClientAngerLevel(pub i32);
9302/// The marker component for entities of type `minecraft:warden`.
9303///
9304/// # Metadata
9305///
9306/// These are the metadata components that all `Warden` entities are guaranteed
9307/// to have, in addition to the metadata components from parent types:
9308///
9309/// - [ClientAngerLevel]
9310///
9311/// # Parents
9312///
9313/// Entities with `Warden` will also have the following marker components and
9314/// their metadata fields:
9315///
9316/// - [AbstractMonster]
9317/// - [AbstractCreature]
9318/// - [AbstractInsentient]
9319/// - [AbstractLiving]
9320/// - [AbstractEntity]
9321///
9322/// # Children
9323///
9324/// This entity type has no children types.
9325#[derive(Component)]
9326pub struct Warden;
9327impl Warden {
9328    fn apply_metadata(
9329        entity: &mut bevy_ecs::system::EntityCommands,
9330        d: EntityDataItem,
9331    ) -> Result<(), UpdateMetadataError> {
9332        match d.index {
9333            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9334            16 => {
9335                entity.insert(ClientAngerLevel(d.value.into_int()?));
9336            }
9337            _ => {}
9338        }
9339        Ok(())
9340    }
9341}
9342
9343/// The metadata bundle for [Warden].
9344///
9345/// This type should generally not be used directly.
9346#[derive(Bundle)]
9347pub struct WardenMetadataBundle {
9348    _marker: Warden,
9349    parent: AbstractMonsterMetadataBundle,
9350    client_anger_level: ClientAngerLevel,
9351}
9352impl Default for WardenMetadataBundle {
9353    fn default() -> Self {
9354        Self {
9355            _marker: Warden,
9356            parent: Default::default(),
9357            client_anger_level: ClientAngerLevel(0),
9358        }
9359    }
9360}
9361
9362/// A metadata field for [Wither].
9363#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9364pub struct TargetA(pub i32);
9365/// A metadata field for [Wither].
9366#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9367pub struct TargetB(pub i32);
9368/// A metadata field for [Wither].
9369#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9370pub struct TargetC(pub i32);
9371/// A metadata field for [Wither].
9372#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9373pub struct Inv(pub i32);
9374/// The marker component for entities of type `minecraft:wither`.
9375///
9376/// # Metadata
9377///
9378/// These are the metadata components that all `Wither` entities are guaranteed
9379/// to have, in addition to the metadata components from parent types:
9380///
9381/// - [TargetA]
9382/// - [TargetB]
9383/// - [TargetC]
9384/// - [Inv]
9385///
9386/// # Parents
9387///
9388/// Entities with `Wither` will also have the following marker components and
9389/// their metadata fields:
9390///
9391/// - [AbstractMonster]
9392/// - [AbstractCreature]
9393/// - [AbstractInsentient]
9394/// - [AbstractLiving]
9395/// - [AbstractEntity]
9396///
9397/// # Children
9398///
9399/// This entity type has no children types.
9400#[derive(Component)]
9401pub struct Wither;
9402impl Wither {
9403    fn apply_metadata(
9404        entity: &mut bevy_ecs::system::EntityCommands,
9405        d: EntityDataItem,
9406    ) -> Result<(), UpdateMetadataError> {
9407        match d.index {
9408            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9409            16 => {
9410                entity.insert(TargetA(d.value.into_int()?));
9411            }
9412            17 => {
9413                entity.insert(TargetB(d.value.into_int()?));
9414            }
9415            18 => {
9416                entity.insert(TargetC(d.value.into_int()?));
9417            }
9418            19 => {
9419                entity.insert(Inv(d.value.into_int()?));
9420            }
9421            _ => {}
9422        }
9423        Ok(())
9424    }
9425}
9426
9427/// The metadata bundle for [Wither].
9428///
9429/// This type should generally not be used directly.
9430#[derive(Bundle)]
9431pub struct WitherMetadataBundle {
9432    _marker: Wither,
9433    parent: AbstractMonsterMetadataBundle,
9434    target_a: TargetA,
9435    target_b: TargetB,
9436    target_c: TargetC,
9437    inv: Inv,
9438}
9439impl Default for WitherMetadataBundle {
9440    fn default() -> Self {
9441        Self {
9442            _marker: Wither,
9443            parent: Default::default(),
9444            target_a: TargetA(0),
9445            target_b: TargetB(0),
9446            target_c: TargetC(0),
9447            inv: Inv(0),
9448        }
9449    }
9450}
9451
9452/// The marker component for entities of type `minecraft:wither_skeleton`.
9453///
9454/// # Metadata
9455///
9456/// This entity type does not add any additional metadata. It will still have
9457/// metadata from parent types.
9458///
9459/// # Parents
9460///
9461/// Entities with `WitherSkeleton` will also have the following marker
9462/// components and their metadata fields:
9463///
9464/// - [AbstractMonster]
9465/// - [AbstractCreature]
9466/// - [AbstractInsentient]
9467/// - [AbstractLiving]
9468/// - [AbstractEntity]
9469///
9470/// # Children
9471///
9472/// This entity type has no children types.
9473#[derive(Component)]
9474pub struct WitherSkeleton;
9475impl WitherSkeleton {
9476    fn apply_metadata(
9477        entity: &mut bevy_ecs::system::EntityCommands,
9478        d: EntityDataItem,
9479    ) -> Result<(), UpdateMetadataError> {
9480        match d.index {
9481            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9482            _ => {}
9483        }
9484        Ok(())
9485    }
9486}
9487
9488/// The metadata bundle for [WitherSkeleton].
9489///
9490/// This type should generally not be used directly.
9491#[derive(Bundle)]
9492pub struct WitherSkeletonMetadataBundle {
9493    _marker: WitherSkeleton,
9494    parent: AbstractMonsterMetadataBundle,
9495}
9496impl Default for WitherSkeletonMetadataBundle {
9497    fn default() -> Self {
9498        Self {
9499            _marker: WitherSkeleton,
9500            parent: Default::default(),
9501        }
9502    }
9503}
9504
9505/// A metadata field for [Zoglin].
9506#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9507pub struct ZoglinBaby(pub bool);
9508/// The marker component for entities of type `minecraft:zoglin`.
9509///
9510/// # Metadata
9511///
9512/// These are the metadata components that all `Zoglin` entities are guaranteed
9513/// to have, in addition to the metadata components from parent types:
9514///
9515/// - [ZoglinBaby]
9516///
9517/// # Parents
9518///
9519/// Entities with `Zoglin` will also have the following marker components and
9520/// their metadata fields:
9521///
9522/// - [AbstractMonster]
9523/// - [AbstractCreature]
9524/// - [AbstractInsentient]
9525/// - [AbstractLiving]
9526/// - [AbstractEntity]
9527///
9528/// # Children
9529///
9530/// This entity type has no children types.
9531#[derive(Component)]
9532pub struct Zoglin;
9533impl Zoglin {
9534    fn apply_metadata(
9535        entity: &mut bevy_ecs::system::EntityCommands,
9536        d: EntityDataItem,
9537    ) -> Result<(), UpdateMetadataError> {
9538        match d.index {
9539            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9540            16 => {
9541                entity.insert(ZoglinBaby(d.value.into_boolean()?));
9542            }
9543            _ => {}
9544        }
9545        Ok(())
9546    }
9547}
9548
9549/// The metadata bundle for [Zoglin].
9550///
9551/// This type should generally not be used directly.
9552#[derive(Bundle)]
9553pub struct ZoglinMetadataBundle {
9554    _marker: Zoglin,
9555    parent: AbstractMonsterMetadataBundle,
9556    zoglin_baby: ZoglinBaby,
9557}
9558impl Default for ZoglinMetadataBundle {
9559    fn default() -> Self {
9560        Self {
9561            _marker: Zoglin,
9562            parent: Default::default(),
9563            zoglin_baby: ZoglinBaby(false),
9564        }
9565    }
9566}
9567
9568/// A metadata field for [Zombie].
9569#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9570pub struct ZombieBaby(pub bool);
9571/// A metadata field for [Zombie].
9572#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9573pub struct SpecialType(pub i32);
9574/// A metadata field for [Zombie].
9575#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9576pub struct DrownedConversion(pub bool);
9577/// The marker component for entities of type `minecraft:zombie`.
9578///
9579/// # Metadata
9580///
9581/// These are the metadata components that all `Zombie` entities are guaranteed
9582/// to have, in addition to the metadata components from parent types:
9583///
9584/// - [ZombieBaby]
9585/// - [SpecialType]
9586/// - [DrownedConversion]
9587///
9588/// # Parents
9589///
9590/// Entities with `Zombie` will also have the following marker components and
9591/// their metadata fields:
9592///
9593/// - [AbstractMonster]
9594/// - [AbstractCreature]
9595/// - [AbstractInsentient]
9596/// - [AbstractLiving]
9597/// - [AbstractEntity]
9598///
9599/// # Children
9600///
9601/// - [Drowned]
9602/// - [Husk]
9603/// - [ZombieVillager]
9604/// - [ZombifiedPiglin]
9605#[derive(Component)]
9606pub struct Zombie;
9607impl Zombie {
9608    fn apply_metadata(
9609        entity: &mut bevy_ecs::system::EntityCommands,
9610        d: EntityDataItem,
9611    ) -> Result<(), UpdateMetadataError> {
9612        match d.index {
9613            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9614            16 => {
9615                entity.insert(ZombieBaby(d.value.into_boolean()?));
9616            }
9617            17 => {
9618                entity.insert(SpecialType(d.value.into_int()?));
9619            }
9620            18 => {
9621                entity.insert(DrownedConversion(d.value.into_boolean()?));
9622            }
9623            _ => {}
9624        }
9625        Ok(())
9626    }
9627}
9628
9629/// The metadata bundle for [Zombie].
9630///
9631/// This type should generally not be used directly.
9632#[derive(Bundle)]
9633pub struct ZombieMetadataBundle {
9634    _marker: Zombie,
9635    parent: AbstractMonsterMetadataBundle,
9636    zombie_baby: ZombieBaby,
9637    special_type: SpecialType,
9638    drowned_conversion: DrownedConversion,
9639}
9640impl Default for ZombieMetadataBundle {
9641    fn default() -> Self {
9642        Self {
9643            _marker: Zombie,
9644            parent: Default::default(),
9645            zombie_baby: ZombieBaby(false),
9646            special_type: SpecialType(0),
9647            drowned_conversion: DrownedConversion(false),
9648        }
9649    }
9650}
9651
9652/// The marker component for entities of type `minecraft:drowned`.
9653///
9654/// # Metadata
9655///
9656/// This entity type does not add any additional metadata. It will still have
9657/// metadata from parent types.
9658///
9659/// # Parents
9660///
9661/// Entities with `Drowned` will also have the following marker components and
9662/// their metadata fields:
9663///
9664/// - [Zombie]
9665/// - [AbstractMonster]
9666/// - [AbstractCreature]
9667/// - [AbstractInsentient]
9668/// - [AbstractLiving]
9669/// - [AbstractEntity]
9670///
9671/// # Children
9672///
9673/// This entity type has no children types.
9674#[derive(Component)]
9675pub struct Drowned;
9676impl Drowned {
9677    fn apply_metadata(
9678        entity: &mut bevy_ecs::system::EntityCommands,
9679        d: EntityDataItem,
9680    ) -> Result<(), UpdateMetadataError> {
9681        match d.index {
9682            0..=18 => Zombie::apply_metadata(entity, d)?,
9683            _ => {}
9684        }
9685        Ok(())
9686    }
9687}
9688
9689/// The metadata bundle for [Drowned].
9690///
9691/// This type should generally not be used directly.
9692#[derive(Bundle)]
9693pub struct DrownedMetadataBundle {
9694    _marker: Drowned,
9695    parent: ZombieMetadataBundle,
9696}
9697impl Default for DrownedMetadataBundle {
9698    fn default() -> Self {
9699        Self {
9700            _marker: Drowned,
9701            parent: Default::default(),
9702        }
9703    }
9704}
9705
9706/// The marker component for entities of type `minecraft:husk`.
9707///
9708/// # Metadata
9709///
9710/// This entity type does not add any additional metadata. It will still have
9711/// metadata from parent types.
9712///
9713/// # Parents
9714///
9715/// Entities with `Husk` will also have the following marker components and
9716/// their metadata fields:
9717///
9718/// - [Zombie]
9719/// - [AbstractMonster]
9720/// - [AbstractCreature]
9721/// - [AbstractInsentient]
9722/// - [AbstractLiving]
9723/// - [AbstractEntity]
9724///
9725/// # Children
9726///
9727/// This entity type has no children types.
9728#[derive(Component)]
9729pub struct Husk;
9730impl Husk {
9731    fn apply_metadata(
9732        entity: &mut bevy_ecs::system::EntityCommands,
9733        d: EntityDataItem,
9734    ) -> Result<(), UpdateMetadataError> {
9735        match d.index {
9736            0..=18 => Zombie::apply_metadata(entity, d)?,
9737            _ => {}
9738        }
9739        Ok(())
9740    }
9741}
9742
9743/// The metadata bundle for [Husk].
9744///
9745/// This type should generally not be used directly.
9746#[derive(Bundle)]
9747pub struct HuskMetadataBundle {
9748    _marker: Husk,
9749    parent: ZombieMetadataBundle,
9750}
9751impl Default for HuskMetadataBundle {
9752    fn default() -> Self {
9753        Self {
9754            _marker: Husk,
9755            parent: Default::default(),
9756        }
9757    }
9758}
9759
9760/// A metadata field for [ZombieVillager].
9761#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9762pub struct Converting(pub bool);
9763/// A metadata field for [ZombieVillager].
9764#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9765pub struct ZombieVillagerVillagerData(pub VillagerData);
9766/// The marker component for entities of type `minecraft:zombie_villager`.
9767///
9768/// # Metadata
9769///
9770/// These are the metadata components that all `ZombieVillager` entities are
9771/// guaranteed to have, in addition to the metadata components from parent
9772/// types:
9773///
9774/// - [Converting]
9775/// - [ZombieVillagerVillagerData]
9776///
9777/// # Parents
9778///
9779/// Entities with `ZombieVillager` will also have the following marker
9780/// components and their metadata fields:
9781///
9782/// - [Zombie]
9783/// - [AbstractMonster]
9784/// - [AbstractCreature]
9785/// - [AbstractInsentient]
9786/// - [AbstractLiving]
9787/// - [AbstractEntity]
9788///
9789/// # Children
9790///
9791/// This entity type has no children types.
9792#[derive(Component)]
9793pub struct ZombieVillager;
9794impl ZombieVillager {
9795    fn apply_metadata(
9796        entity: &mut bevy_ecs::system::EntityCommands,
9797        d: EntityDataItem,
9798    ) -> Result<(), UpdateMetadataError> {
9799        match d.index {
9800            0..=18 => Zombie::apply_metadata(entity, d)?,
9801            19 => {
9802                entity.insert(Converting(d.value.into_boolean()?));
9803            }
9804            20 => {
9805                entity.insert(ZombieVillagerVillagerData(d.value.into_villager_data()?));
9806            }
9807            _ => {}
9808        }
9809        Ok(())
9810    }
9811}
9812
9813/// The metadata bundle for [ZombieVillager].
9814///
9815/// This type should generally not be used directly.
9816#[derive(Bundle)]
9817pub struct ZombieVillagerMetadataBundle {
9818    _marker: ZombieVillager,
9819    parent: ZombieMetadataBundle,
9820    converting: Converting,
9821    zombie_villager_villager_data: ZombieVillagerVillagerData,
9822}
9823impl Default for ZombieVillagerMetadataBundle {
9824    fn default() -> Self {
9825        Self {
9826            _marker: ZombieVillager,
9827            parent: Default::default(),
9828            converting: Converting(false),
9829            zombie_villager_villager_data: ZombieVillagerVillagerData(VillagerData {
9830                kind: azalea_registry::builtin::VillagerKind::Plains,
9831                profession: azalea_registry::builtin::VillagerProfession::None,
9832                level: 0,
9833            }),
9834        }
9835    }
9836}
9837
9838/// The marker component for entities of type `minecraft:zombified_piglin`.
9839///
9840/// # Metadata
9841///
9842/// This entity type does not add any additional metadata. It will still have
9843/// metadata from parent types.
9844///
9845/// # Parents
9846///
9847/// Entities with `ZombifiedPiglin` will also have the following marker
9848/// components and their metadata fields:
9849///
9850/// - [Zombie]
9851/// - [AbstractMonster]
9852/// - [AbstractCreature]
9853/// - [AbstractInsentient]
9854/// - [AbstractLiving]
9855/// - [AbstractEntity]
9856///
9857/// # Children
9858///
9859/// This entity type has no children types.
9860#[derive(Component)]
9861pub struct ZombifiedPiglin;
9862impl ZombifiedPiglin {
9863    fn apply_metadata(
9864        entity: &mut bevy_ecs::system::EntityCommands,
9865        d: EntityDataItem,
9866    ) -> Result<(), UpdateMetadataError> {
9867        match d.index {
9868            0..=18 => Zombie::apply_metadata(entity, d)?,
9869            _ => {}
9870        }
9871        Ok(())
9872    }
9873}
9874
9875/// The metadata bundle for [ZombifiedPiglin].
9876///
9877/// This type should generally not be used directly.
9878#[derive(Bundle)]
9879pub struct ZombifiedPiglinMetadataBundle {
9880    _marker: ZombifiedPiglin,
9881    parent: ZombieMetadataBundle,
9882}
9883impl Default for ZombifiedPiglinMetadataBundle {
9884    fn default() -> Self {
9885        Self {
9886            _marker: ZombifiedPiglin,
9887            parent: Default::default(),
9888        }
9889    }
9890}
9891
9892/// A metadata field for [AbstractPiglin].
9893#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9894pub struct AbstractPiglinImmuneToZombification(pub bool);
9895/// An abstract entity marker component.
9896///
9897/// # Metadata
9898///
9899/// These are the metadata components that all `AbstractPiglin` entities are
9900/// guaranteed to have, in addition to the metadata components from parent
9901/// types:
9902///
9903/// - [AbstractPiglinImmuneToZombification]
9904///
9905/// # Parents
9906///
9907/// Entities with `AbstractPiglin` will also have the following marker
9908/// components and their metadata fields:
9909///
9910/// - [AbstractMonster]
9911/// - [AbstractCreature]
9912/// - [AbstractInsentient]
9913/// - [AbstractLiving]
9914/// - [AbstractEntity]
9915///
9916/// # Children
9917///
9918/// - [Piglin]
9919/// - [PiglinBrute]
9920#[derive(Component)]
9921pub struct AbstractPiglin;
9922impl AbstractPiglin {
9923    fn apply_metadata(
9924        entity: &mut bevy_ecs::system::EntityCommands,
9925        d: EntityDataItem,
9926    ) -> Result<(), UpdateMetadataError> {
9927        match d.index {
9928            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9929            16 => {
9930                entity.insert(AbstractPiglinImmuneToZombification(d.value.into_boolean()?));
9931            }
9932            _ => {}
9933        }
9934        Ok(())
9935    }
9936}
9937
9938/// The metadata bundle for [AbstractPiglin].
9939///
9940/// This type should generally not be used directly.
9941#[derive(Bundle)]
9942pub struct AbstractPiglinMetadataBundle {
9943    _marker: AbstractPiglin,
9944    parent: AbstractMonsterMetadataBundle,
9945    abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification,
9946}
9947impl Default for AbstractPiglinMetadataBundle {
9948    fn default() -> Self {
9949        Self {
9950            _marker: AbstractPiglin,
9951            parent: Default::default(),
9952            abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
9953        }
9954    }
9955}
9956
9957/// A metadata field for [Piglin].
9958#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9959pub struct PiglinBaby(pub bool);
9960/// A metadata field for [Piglin].
9961#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9962pub struct PiglinIsChargingCrossbow(pub bool);
9963/// A metadata field for [Piglin].
9964#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9965pub struct IsDancing(pub bool);
9966/// The marker component for entities of type `minecraft:piglin`.
9967///
9968/// # Metadata
9969///
9970/// These are the metadata components that all `Piglin` entities are guaranteed
9971/// to have, in addition to the metadata components from parent types:
9972///
9973/// - [PiglinBaby]
9974/// - [PiglinIsChargingCrossbow]
9975/// - [IsDancing]
9976///
9977/// # Parents
9978///
9979/// Entities with `Piglin` will also have the following marker components and
9980/// their metadata fields:
9981///
9982/// - [AbstractPiglin]
9983/// - [AbstractMonster]
9984/// - [AbstractCreature]
9985/// - [AbstractInsentient]
9986/// - [AbstractLiving]
9987/// - [AbstractEntity]
9988///
9989/// # Children
9990///
9991/// This entity type has no children types.
9992#[derive(Component)]
9993pub struct Piglin;
9994impl Piglin {
9995    fn apply_metadata(
9996        entity: &mut bevy_ecs::system::EntityCommands,
9997        d: EntityDataItem,
9998    ) -> Result<(), UpdateMetadataError> {
9999        match d.index {
10000            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
10001            17 => {
10002                entity.insert(PiglinBaby(d.value.into_boolean()?));
10003            }
10004            18 => {
10005                entity.insert(PiglinIsChargingCrossbow(d.value.into_boolean()?));
10006            }
10007            19 => {
10008                entity.insert(IsDancing(d.value.into_boolean()?));
10009            }
10010            _ => {}
10011        }
10012        Ok(())
10013    }
10014}
10015
10016/// The metadata bundle for [Piglin].
10017///
10018/// This type should generally not be used directly.
10019#[derive(Bundle)]
10020pub struct PiglinMetadataBundle {
10021    _marker: Piglin,
10022    parent: AbstractPiglinMetadataBundle,
10023    piglin_baby: PiglinBaby,
10024    piglin_is_charging_crossbow: PiglinIsChargingCrossbow,
10025    is_dancing: IsDancing,
10026}
10027impl Default for PiglinMetadataBundle {
10028    fn default() -> Self {
10029        Self {
10030            _marker: Piglin,
10031            parent: Default::default(),
10032            piglin_baby: PiglinBaby(false),
10033            piglin_is_charging_crossbow: PiglinIsChargingCrossbow(false),
10034            is_dancing: IsDancing(false),
10035        }
10036    }
10037}
10038
10039/// The marker component for entities of type `minecraft:piglin_brute`.
10040///
10041/// # Metadata
10042///
10043/// This entity type does not add any additional metadata. It will still have
10044/// metadata from parent types.
10045///
10046/// # Parents
10047///
10048/// Entities with `PiglinBrute` will also have the following marker components
10049/// and their metadata fields:
10050///
10051/// - [AbstractPiglin]
10052/// - [AbstractMonster]
10053/// - [AbstractCreature]
10054/// - [AbstractInsentient]
10055/// - [AbstractLiving]
10056/// - [AbstractEntity]
10057///
10058/// # Children
10059///
10060/// This entity type has no children types.
10061#[derive(Component)]
10062pub struct PiglinBrute;
10063impl PiglinBrute {
10064    fn apply_metadata(
10065        entity: &mut bevy_ecs::system::EntityCommands,
10066        d: EntityDataItem,
10067    ) -> Result<(), UpdateMetadataError> {
10068        match d.index {
10069            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
10070            _ => {}
10071        }
10072        Ok(())
10073    }
10074}
10075
10076/// The metadata bundle for [PiglinBrute].
10077///
10078/// This type should generally not be used directly.
10079#[derive(Bundle)]
10080pub struct PiglinBruteMetadataBundle {
10081    _marker: PiglinBrute,
10082    parent: AbstractPiglinMetadataBundle,
10083}
10084impl Default for PiglinBruteMetadataBundle {
10085    fn default() -> Self {
10086        Self {
10087            _marker: PiglinBrute,
10088            parent: Default::default(),
10089        }
10090    }
10091}
10092
10093/// A metadata field for [AbstractRaider].
10094#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10095pub struct IsCelebrating(pub bool);
10096/// An abstract entity marker component.
10097///
10098/// # Metadata
10099///
10100/// These are the metadata components that all `AbstractRaider` entities are
10101/// guaranteed to have, in addition to the metadata components from parent
10102/// types:
10103///
10104/// - [IsCelebrating]
10105///
10106/// # Parents
10107///
10108/// Entities with `AbstractRaider` will also have the following marker
10109/// components and their metadata fields:
10110///
10111/// - [AbstractMonster]
10112/// - [AbstractCreature]
10113/// - [AbstractInsentient]
10114/// - [AbstractLiving]
10115/// - [AbstractEntity]
10116///
10117/// # Children
10118///
10119/// - [Pillager]
10120/// - [Ravager]
10121/// - [Vindicator]
10122/// - [Witch]
10123/// - [AbstractSpellcasterIllager]
10124///   - [Evoker]
10125///   - [Illusioner]
10126#[derive(Component)]
10127pub struct AbstractRaider;
10128impl AbstractRaider {
10129    fn apply_metadata(
10130        entity: &mut bevy_ecs::system::EntityCommands,
10131        d: EntityDataItem,
10132    ) -> Result<(), UpdateMetadataError> {
10133        match d.index {
10134            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10135            16 => {
10136                entity.insert(IsCelebrating(d.value.into_boolean()?));
10137            }
10138            _ => {}
10139        }
10140        Ok(())
10141    }
10142}
10143
10144/// The metadata bundle for [AbstractRaider].
10145///
10146/// This type should generally not be used directly.
10147#[derive(Bundle)]
10148pub struct AbstractRaiderMetadataBundle {
10149    _marker: AbstractRaider,
10150    parent: AbstractMonsterMetadataBundle,
10151    is_celebrating: IsCelebrating,
10152}
10153impl Default for AbstractRaiderMetadataBundle {
10154    fn default() -> Self {
10155        Self {
10156            _marker: AbstractRaider,
10157            parent: Default::default(),
10158            is_celebrating: IsCelebrating(false),
10159        }
10160    }
10161}
10162
10163/// A metadata field for [Pillager].
10164#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10165pub struct PillagerIsChargingCrossbow(pub bool);
10166/// The marker component for entities of type `minecraft:pillager`.
10167///
10168/// # Metadata
10169///
10170/// These are the metadata components that all `Pillager` entities are
10171/// guaranteed to have, in addition to the metadata components from parent
10172/// types:
10173///
10174/// - [PillagerIsChargingCrossbow]
10175///
10176/// # Parents
10177///
10178/// Entities with `Pillager` will also have the following marker components and
10179/// their metadata fields:
10180///
10181/// - [AbstractRaider]
10182/// - [AbstractMonster]
10183/// - [AbstractCreature]
10184/// - [AbstractInsentient]
10185/// - [AbstractLiving]
10186/// - [AbstractEntity]
10187///
10188/// # Children
10189///
10190/// This entity type has no children types.
10191#[derive(Component)]
10192pub struct Pillager;
10193impl Pillager {
10194    fn apply_metadata(
10195        entity: &mut bevy_ecs::system::EntityCommands,
10196        d: EntityDataItem,
10197    ) -> Result<(), UpdateMetadataError> {
10198        match d.index {
10199            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10200            17 => {
10201                entity.insert(PillagerIsChargingCrossbow(d.value.into_boolean()?));
10202            }
10203            _ => {}
10204        }
10205        Ok(())
10206    }
10207}
10208
10209/// The metadata bundle for [Pillager].
10210///
10211/// This type should generally not be used directly.
10212#[derive(Bundle)]
10213pub struct PillagerMetadataBundle {
10214    _marker: Pillager,
10215    parent: AbstractRaiderMetadataBundle,
10216    pillager_is_charging_crossbow: PillagerIsChargingCrossbow,
10217}
10218impl Default for PillagerMetadataBundle {
10219    fn default() -> Self {
10220        Self {
10221            _marker: Pillager,
10222            parent: Default::default(),
10223            pillager_is_charging_crossbow: PillagerIsChargingCrossbow(false),
10224        }
10225    }
10226}
10227
10228/// The marker component for entities of type `minecraft:ravager`.
10229///
10230/// # Metadata
10231///
10232/// This entity type does not add any additional metadata. It will still have
10233/// metadata from parent types.
10234///
10235/// # Parents
10236///
10237/// Entities with `Ravager` will also have the following marker components and
10238/// their metadata fields:
10239///
10240/// - [AbstractRaider]
10241/// - [AbstractMonster]
10242/// - [AbstractCreature]
10243/// - [AbstractInsentient]
10244/// - [AbstractLiving]
10245/// - [AbstractEntity]
10246///
10247/// # Children
10248///
10249/// This entity type has no children types.
10250#[derive(Component)]
10251pub struct Ravager;
10252impl Ravager {
10253    fn apply_metadata(
10254        entity: &mut bevy_ecs::system::EntityCommands,
10255        d: EntityDataItem,
10256    ) -> Result<(), UpdateMetadataError> {
10257        match d.index {
10258            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10259            _ => {}
10260        }
10261        Ok(())
10262    }
10263}
10264
10265/// The metadata bundle for [Ravager].
10266///
10267/// This type should generally not be used directly.
10268#[derive(Bundle)]
10269pub struct RavagerMetadataBundle {
10270    _marker: Ravager,
10271    parent: AbstractRaiderMetadataBundle,
10272}
10273impl Default for RavagerMetadataBundle {
10274    fn default() -> Self {
10275        Self {
10276            _marker: Ravager,
10277            parent: Default::default(),
10278        }
10279    }
10280}
10281
10282/// The marker component for entities of type `minecraft:vindicator`.
10283///
10284/// # Metadata
10285///
10286/// This entity type does not add any additional metadata. It will still have
10287/// metadata from parent types.
10288///
10289/// # Parents
10290///
10291/// Entities with `Vindicator` will also have the following marker components
10292/// and their metadata fields:
10293///
10294/// - [AbstractRaider]
10295/// - [AbstractMonster]
10296/// - [AbstractCreature]
10297/// - [AbstractInsentient]
10298/// - [AbstractLiving]
10299/// - [AbstractEntity]
10300///
10301/// # Children
10302///
10303/// This entity type has no children types.
10304#[derive(Component)]
10305pub struct Vindicator;
10306impl Vindicator {
10307    fn apply_metadata(
10308        entity: &mut bevy_ecs::system::EntityCommands,
10309        d: EntityDataItem,
10310    ) -> Result<(), UpdateMetadataError> {
10311        match d.index {
10312            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10313            _ => {}
10314        }
10315        Ok(())
10316    }
10317}
10318
10319/// The metadata bundle for [Vindicator].
10320///
10321/// This type should generally not be used directly.
10322#[derive(Bundle)]
10323pub struct VindicatorMetadataBundle {
10324    _marker: Vindicator,
10325    parent: AbstractRaiderMetadataBundle,
10326}
10327impl Default for VindicatorMetadataBundle {
10328    fn default() -> Self {
10329        Self {
10330            _marker: Vindicator,
10331            parent: Default::default(),
10332        }
10333    }
10334}
10335
10336/// A metadata field for [Witch].
10337#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10338pub struct WitchUsingItem(pub bool);
10339/// The marker component for entities of type `minecraft:witch`.
10340///
10341/// # Metadata
10342///
10343/// These are the metadata components that all `Witch` entities are guaranteed
10344/// to have, in addition to the metadata components from parent types:
10345///
10346/// - [WitchUsingItem]
10347///
10348/// # Parents
10349///
10350/// Entities with `Witch` will also have the following marker components and
10351/// their metadata fields:
10352///
10353/// - [AbstractRaider]
10354/// - [AbstractMonster]
10355/// - [AbstractCreature]
10356/// - [AbstractInsentient]
10357/// - [AbstractLiving]
10358/// - [AbstractEntity]
10359///
10360/// # Children
10361///
10362/// This entity type has no children types.
10363#[derive(Component)]
10364pub struct Witch;
10365impl Witch {
10366    fn apply_metadata(
10367        entity: &mut bevy_ecs::system::EntityCommands,
10368        d: EntityDataItem,
10369    ) -> Result<(), UpdateMetadataError> {
10370        match d.index {
10371            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10372            17 => {
10373                entity.insert(WitchUsingItem(d.value.into_boolean()?));
10374            }
10375            _ => {}
10376        }
10377        Ok(())
10378    }
10379}
10380
10381/// The metadata bundle for [Witch].
10382///
10383/// This type should generally not be used directly.
10384#[derive(Bundle)]
10385pub struct WitchMetadataBundle {
10386    _marker: Witch,
10387    parent: AbstractRaiderMetadataBundle,
10388    witch_using_item: WitchUsingItem,
10389}
10390impl Default for WitchMetadataBundle {
10391    fn default() -> Self {
10392        Self {
10393            _marker: Witch,
10394            parent: Default::default(),
10395            witch_using_item: WitchUsingItem(false),
10396        }
10397    }
10398}
10399
10400/// A metadata field for [AbstractSpellcasterIllager].
10401#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10402pub struct SpellCasting(pub u8);
10403/// An abstract entity marker component.
10404///
10405/// # Metadata
10406///
10407/// These are the metadata components that all `AbstractSpellcasterIllager`
10408/// entities are guaranteed to have, in addition to the metadata components from
10409/// parent types:
10410///
10411/// - [SpellCasting]
10412///
10413/// # Parents
10414///
10415/// Entities with `AbstractSpellcasterIllager` will also have the following
10416/// marker components and their metadata fields:
10417///
10418/// - [AbstractRaider]
10419/// - [AbstractMonster]
10420/// - [AbstractCreature]
10421/// - [AbstractInsentient]
10422/// - [AbstractLiving]
10423/// - [AbstractEntity]
10424///
10425/// # Children
10426///
10427/// - [Evoker]
10428/// - [Illusioner]
10429#[derive(Component)]
10430pub struct AbstractSpellcasterIllager;
10431impl AbstractSpellcasterIllager {
10432    fn apply_metadata(
10433        entity: &mut bevy_ecs::system::EntityCommands,
10434        d: EntityDataItem,
10435    ) -> Result<(), UpdateMetadataError> {
10436        match d.index {
10437            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
10438            17 => {
10439                entity.insert(SpellCasting(d.value.into_byte()?));
10440            }
10441            _ => {}
10442        }
10443        Ok(())
10444    }
10445}
10446
10447/// The metadata bundle for [AbstractSpellcasterIllager].
10448///
10449/// This type should generally not be used directly.
10450#[derive(Bundle)]
10451pub struct AbstractSpellcasterIllagerMetadataBundle {
10452    _marker: AbstractSpellcasterIllager,
10453    parent: AbstractRaiderMetadataBundle,
10454    spell_casting: SpellCasting,
10455}
10456impl Default for AbstractSpellcasterIllagerMetadataBundle {
10457    fn default() -> Self {
10458        Self {
10459            _marker: AbstractSpellcasterIllager,
10460            parent: Default::default(),
10461            spell_casting: SpellCasting(0),
10462        }
10463    }
10464}
10465
10466/// The marker component for entities of type `minecraft:evoker`.
10467///
10468/// # Metadata
10469///
10470/// This entity type does not add any additional metadata. It will still have
10471/// metadata from parent types.
10472///
10473/// # Parents
10474///
10475/// Entities with `Evoker` will also have the following marker components and
10476/// their metadata fields:
10477///
10478/// - [AbstractSpellcasterIllager]
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 Evoker;
10491impl Evoker {
10492    fn apply_metadata(
10493        entity: &mut bevy_ecs::system::EntityCommands,
10494        d: EntityDataItem,
10495    ) -> Result<(), UpdateMetadataError> {
10496        match d.index {
10497            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
10498            _ => {}
10499        }
10500        Ok(())
10501    }
10502}
10503
10504/// The metadata bundle for [Evoker].
10505///
10506/// This type should generally not be used directly.
10507#[derive(Bundle)]
10508pub struct EvokerMetadataBundle {
10509    _marker: Evoker,
10510    parent: AbstractSpellcasterIllagerMetadataBundle,
10511}
10512impl Default for EvokerMetadataBundle {
10513    fn default() -> Self {
10514        Self {
10515            _marker: Evoker,
10516            parent: Default::default(),
10517        }
10518    }
10519}
10520
10521/// The marker component for entities of type `minecraft:illusioner`.
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 `Illusioner` will also have the following marker components
10531/// and their metadata fields:
10532///
10533/// - [AbstractSpellcasterIllager]
10534/// - [AbstractRaider]
10535/// - [AbstractMonster]
10536/// - [AbstractCreature]
10537/// - [AbstractInsentient]
10538/// - [AbstractLiving]
10539/// - [AbstractEntity]
10540///
10541/// # Children
10542///
10543/// This entity type has no children types.
10544#[derive(Component)]
10545pub struct Illusioner;
10546impl Illusioner {
10547    fn apply_metadata(
10548        entity: &mut bevy_ecs::system::EntityCommands,
10549        d: EntityDataItem,
10550    ) -> Result<(), UpdateMetadataError> {
10551        match d.index {
10552            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
10553            _ => {}
10554        }
10555        Ok(())
10556    }
10557}
10558
10559/// The metadata bundle for [Illusioner].
10560///
10561/// This type should generally not be used directly.
10562#[derive(Bundle)]
10563pub struct IllusionerMetadataBundle {
10564    _marker: Illusioner,
10565    parent: AbstractSpellcasterIllagerMetadataBundle,
10566}
10567impl Default for IllusionerMetadataBundle {
10568    fn default() -> Self {
10569        Self {
10570            _marker: Illusioner,
10571            parent: Default::default(),
10572        }
10573    }
10574}
10575
10576/// A metadata field for [AbstractThrownItemProjectile].
10577#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10578pub struct AbstractThrownItemProjectileItemStack(pub ItemStack);
10579/// An abstract entity marker component.
10580///
10581/// # Metadata
10582///
10583/// These are the metadata components that all `AbstractThrownItemProjectile`
10584/// entities are guaranteed to have, in addition to the metadata components from
10585/// parent types:
10586///
10587/// - [AbstractThrownItemProjectileItemStack]
10588///
10589/// # Parents
10590///
10591/// Entities with `AbstractThrownItemProjectile` will also have the following
10592/// marker components and their metadata fields:
10593///
10594/// - [AbstractEntity]
10595///
10596/// # Children
10597///
10598/// - [Egg]
10599/// - [EnderPearl]
10600/// - [ExperienceBottle]
10601/// - [LingeringPotion]
10602/// - [Snowball]
10603/// - [SplashPotion]
10604#[derive(Component)]
10605pub struct AbstractThrownItemProjectile;
10606impl AbstractThrownItemProjectile {
10607    fn apply_metadata(
10608        entity: &mut bevy_ecs::system::EntityCommands,
10609        d: EntityDataItem,
10610    ) -> Result<(), UpdateMetadataError> {
10611        match d.index {
10612            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
10613            8 => {
10614                entity.insert(AbstractThrownItemProjectileItemStack(
10615                    d.value.into_item_stack()?,
10616                ));
10617            }
10618            _ => {}
10619        }
10620        Ok(())
10621    }
10622}
10623
10624/// The metadata bundle for [AbstractThrownItemProjectile].
10625///
10626/// This type should generally not be used directly.
10627#[derive(Bundle)]
10628pub struct AbstractThrownItemProjectileMetadataBundle {
10629    _marker: AbstractThrownItemProjectile,
10630    parent: AbstractEntityMetadataBundle,
10631    abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack,
10632}
10633impl Default for AbstractThrownItemProjectileMetadataBundle {
10634    fn default() -> Self {
10635        Self {
10636            _marker: AbstractThrownItemProjectile,
10637            parent: Default::default(),
10638            abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
10639                Default::default(),
10640            ),
10641        }
10642    }
10643}
10644
10645/// The marker component for entities of type `minecraft:egg`.
10646///
10647/// # Metadata
10648///
10649/// This entity type does not add any additional metadata. It will still have
10650/// metadata from parent types.
10651///
10652/// # Parents
10653///
10654/// Entities with `Egg` will also have the following marker components and their
10655/// metadata fields:
10656///
10657/// - [AbstractThrownItemProjectile]
10658/// - [AbstractEntity]
10659///
10660/// # Children
10661///
10662/// This entity type has no children types.
10663#[derive(Component)]
10664pub struct Egg;
10665impl Egg {
10666    fn apply_metadata(
10667        entity: &mut bevy_ecs::system::EntityCommands,
10668        d: EntityDataItem,
10669    ) -> Result<(), UpdateMetadataError> {
10670        match d.index {
10671            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10672            _ => {}
10673        }
10674        Ok(())
10675    }
10676}
10677
10678/// The metadata bundle for [Egg].
10679///
10680/// This type should generally not be used directly.
10681#[derive(Bundle)]
10682pub struct EggMetadataBundle {
10683    _marker: Egg,
10684    parent: AbstractThrownItemProjectileMetadataBundle,
10685}
10686impl Default for EggMetadataBundle {
10687    fn default() -> Self {
10688        Self {
10689            _marker: Egg,
10690            parent: Default::default(),
10691        }
10692    }
10693}
10694
10695/// The marker component for entities of type `minecraft:ender_pearl`.
10696///
10697/// # Metadata
10698///
10699/// This entity type does not add any additional metadata. It will still have
10700/// metadata from parent types.
10701///
10702/// # Parents
10703///
10704/// Entities with `EnderPearl` will also have the following marker components
10705/// and their metadata fields:
10706///
10707/// - [AbstractThrownItemProjectile]
10708/// - [AbstractEntity]
10709///
10710/// # Children
10711///
10712/// This entity type has no children types.
10713#[derive(Component)]
10714pub struct EnderPearl;
10715impl EnderPearl {
10716    fn apply_metadata(
10717        entity: &mut bevy_ecs::system::EntityCommands,
10718        d: EntityDataItem,
10719    ) -> Result<(), UpdateMetadataError> {
10720        match d.index {
10721            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10722            _ => {}
10723        }
10724        Ok(())
10725    }
10726}
10727
10728/// The metadata bundle for [EnderPearl].
10729///
10730/// This type should generally not be used directly.
10731#[derive(Bundle)]
10732pub struct EnderPearlMetadataBundle {
10733    _marker: EnderPearl,
10734    parent: AbstractThrownItemProjectileMetadataBundle,
10735}
10736impl Default for EnderPearlMetadataBundle {
10737    fn default() -> Self {
10738        Self {
10739            _marker: EnderPearl,
10740            parent: Default::default(),
10741        }
10742    }
10743}
10744
10745/// The marker component for entities of type `minecraft:experience_bottle`.
10746///
10747/// # Metadata
10748///
10749/// This entity type does not add any additional metadata. It will still have
10750/// metadata from parent types.
10751///
10752/// # Parents
10753///
10754/// Entities with `ExperienceBottle` will also have the following marker
10755/// components and their metadata fields:
10756///
10757/// - [AbstractThrownItemProjectile]
10758/// - [AbstractEntity]
10759///
10760/// # Children
10761///
10762/// This entity type has no children types.
10763#[derive(Component)]
10764pub struct ExperienceBottle;
10765impl ExperienceBottle {
10766    fn apply_metadata(
10767        entity: &mut bevy_ecs::system::EntityCommands,
10768        d: EntityDataItem,
10769    ) -> Result<(), UpdateMetadataError> {
10770        match d.index {
10771            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10772            _ => {}
10773        }
10774        Ok(())
10775    }
10776}
10777
10778/// The metadata bundle for [ExperienceBottle].
10779///
10780/// This type should generally not be used directly.
10781#[derive(Bundle)]
10782pub struct ExperienceBottleMetadataBundle {
10783    _marker: ExperienceBottle,
10784    parent: AbstractThrownItemProjectileMetadataBundle,
10785}
10786impl Default for ExperienceBottleMetadataBundle {
10787    fn default() -> Self {
10788        Self {
10789            _marker: ExperienceBottle,
10790            parent: Default::default(),
10791        }
10792    }
10793}
10794
10795/// The marker component for entities of type `minecraft:lingering_potion`.
10796///
10797/// # Metadata
10798///
10799/// This entity type does not add any additional metadata. It will still have
10800/// metadata from parent types.
10801///
10802/// # Parents
10803///
10804/// Entities with `LingeringPotion` will also have the following marker
10805/// components and their metadata fields:
10806///
10807/// - [AbstractThrownItemProjectile]
10808/// - [AbstractEntity]
10809///
10810/// # Children
10811///
10812/// This entity type has no children types.
10813#[derive(Component)]
10814pub struct LingeringPotion;
10815impl LingeringPotion {
10816    fn apply_metadata(
10817        entity: &mut bevy_ecs::system::EntityCommands,
10818        d: EntityDataItem,
10819    ) -> Result<(), UpdateMetadataError> {
10820        match d.index {
10821            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10822            _ => {}
10823        }
10824        Ok(())
10825    }
10826}
10827
10828/// The metadata bundle for [LingeringPotion].
10829///
10830/// This type should generally not be used directly.
10831#[derive(Bundle)]
10832pub struct LingeringPotionMetadataBundle {
10833    _marker: LingeringPotion,
10834    parent: AbstractThrownItemProjectileMetadataBundle,
10835}
10836impl Default for LingeringPotionMetadataBundle {
10837    fn default() -> Self {
10838        Self {
10839            _marker: LingeringPotion,
10840            parent: Default::default(),
10841        }
10842    }
10843}
10844
10845/// The marker component for entities of type `minecraft:snowball`.
10846///
10847/// # Metadata
10848///
10849/// This entity type does not add any additional metadata. It will still have
10850/// metadata from parent types.
10851///
10852/// # Parents
10853///
10854/// Entities with `Snowball` will also have the following marker components and
10855/// their metadata fields:
10856///
10857/// - [AbstractThrownItemProjectile]
10858/// - [AbstractEntity]
10859///
10860/// # Children
10861///
10862/// This entity type has no children types.
10863#[derive(Component)]
10864pub struct Snowball;
10865impl Snowball {
10866    fn apply_metadata(
10867        entity: &mut bevy_ecs::system::EntityCommands,
10868        d: EntityDataItem,
10869    ) -> Result<(), UpdateMetadataError> {
10870        match d.index {
10871            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10872            _ => {}
10873        }
10874        Ok(())
10875    }
10876}
10877
10878/// The metadata bundle for [Snowball].
10879///
10880/// This type should generally not be used directly.
10881#[derive(Bundle)]
10882pub struct SnowballMetadataBundle {
10883    _marker: Snowball,
10884    parent: AbstractThrownItemProjectileMetadataBundle,
10885}
10886impl Default for SnowballMetadataBundle {
10887    fn default() -> Self {
10888        Self {
10889            _marker: Snowball,
10890            parent: Default::default(),
10891        }
10892    }
10893}
10894
10895/// The marker component for entities of type `minecraft:splash_potion`.
10896///
10897/// # Metadata
10898///
10899/// This entity type does not add any additional metadata. It will still have
10900/// metadata from parent types.
10901///
10902/// # Parents
10903///
10904/// Entities with `SplashPotion` will also have the following marker components
10905/// and their metadata fields:
10906///
10907/// - [AbstractThrownItemProjectile]
10908/// - [AbstractEntity]
10909///
10910/// # Children
10911///
10912/// This entity type has no children types.
10913#[derive(Component)]
10914pub struct SplashPotion;
10915impl SplashPotion {
10916    fn apply_metadata(
10917        entity: &mut bevy_ecs::system::EntityCommands,
10918        d: EntityDataItem,
10919    ) -> Result<(), UpdateMetadataError> {
10920        match d.index {
10921            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
10922            _ => {}
10923        }
10924        Ok(())
10925    }
10926}
10927
10928/// The metadata bundle for [SplashPotion].
10929///
10930/// This type should generally not be used directly.
10931#[derive(Bundle)]
10932pub struct SplashPotionMetadataBundle {
10933    _marker: SplashPotion,
10934    parent: AbstractThrownItemProjectileMetadataBundle,
10935}
10936impl Default for SplashPotionMetadataBundle {
10937    fn default() -> Self {
10938        Self {
10939            _marker: SplashPotion,
10940            parent: Default::default(),
10941        }
10942    }
10943}
10944
10945/// A metadata field for [AbstractVehicle].
10946#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10947pub struct Hurt(pub i32);
10948/// A metadata field for [AbstractVehicle].
10949#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10950pub struct Hurtdir(pub i32);
10951/// A metadata field for [AbstractVehicle].
10952#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10953pub struct Damage(pub f32);
10954/// An abstract entity marker component.
10955///
10956/// # Metadata
10957///
10958/// These are the metadata components that all `AbstractVehicle` entities are
10959/// guaranteed to have, in addition to the metadata components from parent
10960/// types:
10961///
10962/// - [Hurt]
10963/// - [Hurtdir]
10964/// - [Damage]
10965///
10966/// # Parents
10967///
10968/// Entities with `AbstractVehicle` will also have the following marker
10969/// components and their metadata fields:
10970///
10971/// - [AbstractEntity]
10972///
10973/// # Children
10974///
10975/// - [AbstractBoat]
10976///   - [AcaciaBoat]
10977///   - [AcaciaChestBoat]
10978///   - [BambooChestRaft]
10979///   - [BambooRaft]
10980///   - [BirchBoat]
10981///   - [BirchChestBoat]
10982///   - [CherryBoat]
10983///   - [CherryChestBoat]
10984///   - [DarkOakBoat]
10985///   - [DarkOakChestBoat]
10986///   - [JungleBoat]
10987///   - [JungleChestBoat]
10988///   - [MangroveBoat]
10989///   - [MangroveChestBoat]
10990///   - [OakBoat]
10991///   - [OakChestBoat]
10992///   - [PaleOakBoat]
10993///   - [PaleOakChestBoat]
10994///   - [SpruceBoat]
10995///   - [SpruceChestBoat]
10996/// - [AbstractMinecart]
10997///   - [ChestMinecart]
10998///   - [CommandBlockMinecart]
10999///   - [FurnaceMinecart]
11000///   - [HopperMinecart]
11001///   - [Minecart]
11002///   - [SpawnerMinecart]
11003///   - [TntMinecart]
11004#[derive(Component)]
11005pub struct AbstractVehicle;
11006impl AbstractVehicle {
11007    fn apply_metadata(
11008        entity: &mut bevy_ecs::system::EntityCommands,
11009        d: EntityDataItem,
11010    ) -> Result<(), UpdateMetadataError> {
11011        match d.index {
11012            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
11013            8 => {
11014                entity.insert(Hurt(d.value.into_int()?));
11015            }
11016            9 => {
11017                entity.insert(Hurtdir(d.value.into_int()?));
11018            }
11019            10 => {
11020                entity.insert(Damage(d.value.into_float()?));
11021            }
11022            _ => {}
11023        }
11024        Ok(())
11025    }
11026}
11027
11028/// The metadata bundle for [AbstractVehicle].
11029///
11030/// This type should generally not be used directly.
11031#[derive(Bundle)]
11032pub struct AbstractVehicleMetadataBundle {
11033    _marker: AbstractVehicle,
11034    parent: AbstractEntityMetadataBundle,
11035    hurt: Hurt,
11036    hurtdir: Hurtdir,
11037    damage: Damage,
11038}
11039impl Default for AbstractVehicleMetadataBundle {
11040    fn default() -> Self {
11041        Self {
11042            _marker: AbstractVehicle,
11043            parent: Default::default(),
11044            hurt: Hurt(0),
11045            hurtdir: Hurtdir(1),
11046            damage: Damage(0.0),
11047        }
11048    }
11049}
11050
11051/// A metadata field for [AbstractBoat].
11052#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11053pub struct PaddleLeft(pub bool);
11054/// A metadata field for [AbstractBoat].
11055#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11056pub struct PaddleRight(pub bool);
11057/// A metadata field for [AbstractBoat].
11058#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11059pub struct BubbleTime(pub i32);
11060/// An abstract entity marker component.
11061///
11062/// # Metadata
11063///
11064/// These are the metadata components that all `AbstractBoat` entities are
11065/// guaranteed to have, in addition to the metadata components from parent
11066/// types:
11067///
11068/// - [PaddleLeft]
11069/// - [PaddleRight]
11070/// - [BubbleTime]
11071///
11072/// # Parents
11073///
11074/// Entities with `AbstractBoat` will also have the following marker components
11075/// and their metadata fields:
11076///
11077/// - [AbstractVehicle]
11078/// - [AbstractEntity]
11079///
11080/// # Children
11081///
11082/// - [AcaciaBoat]
11083/// - [AcaciaChestBoat]
11084/// - [BambooChestRaft]
11085/// - [BambooRaft]
11086/// - [BirchBoat]
11087/// - [BirchChestBoat]
11088/// - [CherryBoat]
11089/// - [CherryChestBoat]
11090/// - [DarkOakBoat]
11091/// - [DarkOakChestBoat]
11092/// - [JungleBoat]
11093/// - [JungleChestBoat]
11094/// - [MangroveBoat]
11095/// - [MangroveChestBoat]
11096/// - [OakBoat]
11097/// - [OakChestBoat]
11098/// - [PaleOakBoat]
11099/// - [PaleOakChestBoat]
11100/// - [SpruceBoat]
11101/// - [SpruceChestBoat]
11102#[derive(Component)]
11103pub struct AbstractBoat;
11104impl AbstractBoat {
11105    fn apply_metadata(
11106        entity: &mut bevy_ecs::system::EntityCommands,
11107        d: EntityDataItem,
11108    ) -> Result<(), UpdateMetadataError> {
11109        match d.index {
11110            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
11111            11 => {
11112                entity.insert(PaddleLeft(d.value.into_boolean()?));
11113            }
11114            12 => {
11115                entity.insert(PaddleRight(d.value.into_boolean()?));
11116            }
11117            13 => {
11118                entity.insert(BubbleTime(d.value.into_int()?));
11119            }
11120            _ => {}
11121        }
11122        Ok(())
11123    }
11124}
11125
11126/// The metadata bundle for [AbstractBoat].
11127///
11128/// This type should generally not be used directly.
11129#[derive(Bundle)]
11130pub struct AbstractBoatMetadataBundle {
11131    _marker: AbstractBoat,
11132    parent: AbstractVehicleMetadataBundle,
11133    paddle_left: PaddleLeft,
11134    paddle_right: PaddleRight,
11135    bubble_time: BubbleTime,
11136}
11137impl Default for AbstractBoatMetadataBundle {
11138    fn default() -> Self {
11139        Self {
11140            _marker: AbstractBoat,
11141            parent: Default::default(),
11142            paddle_left: PaddleLeft(false),
11143            paddle_right: PaddleRight(false),
11144            bubble_time: BubbleTime(0),
11145        }
11146    }
11147}
11148
11149/// The marker component for entities of type `minecraft:acacia_boat`.
11150///
11151/// # Metadata
11152///
11153/// This entity type does not add any additional metadata. It will still have
11154/// metadata from parent types.
11155///
11156/// # Parents
11157///
11158/// Entities with `AcaciaBoat` will also have the following marker components
11159/// and their metadata fields:
11160///
11161/// - [AbstractBoat]
11162/// - [AbstractVehicle]
11163/// - [AbstractEntity]
11164///
11165/// # Children
11166///
11167/// This entity type has no children types.
11168#[derive(Component)]
11169pub struct AcaciaBoat;
11170impl AcaciaBoat {
11171    fn apply_metadata(
11172        entity: &mut bevy_ecs::system::EntityCommands,
11173        d: EntityDataItem,
11174    ) -> Result<(), UpdateMetadataError> {
11175        match d.index {
11176            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11177            _ => {}
11178        }
11179        Ok(())
11180    }
11181}
11182
11183/// The metadata bundle for [AcaciaBoat].
11184///
11185/// This type should generally not be used directly.
11186#[derive(Bundle)]
11187pub struct AcaciaBoatMetadataBundle {
11188    _marker: AcaciaBoat,
11189    parent: AbstractBoatMetadataBundle,
11190}
11191impl Default for AcaciaBoatMetadataBundle {
11192    fn default() -> Self {
11193        Self {
11194            _marker: AcaciaBoat,
11195            parent: Default::default(),
11196        }
11197    }
11198}
11199
11200/// The marker component for entities of type `minecraft:acacia_chest_boat`.
11201///
11202/// # Metadata
11203///
11204/// This entity type does not add any additional metadata. It will still have
11205/// metadata from parent types.
11206///
11207/// # Parents
11208///
11209/// Entities with `AcaciaChestBoat` will also have the following marker
11210/// components and their metadata fields:
11211///
11212/// - [AbstractBoat]
11213/// - [AbstractVehicle]
11214/// - [AbstractEntity]
11215///
11216/// # Children
11217///
11218/// This entity type has no children types.
11219#[derive(Component)]
11220pub struct AcaciaChestBoat;
11221impl AcaciaChestBoat {
11222    fn apply_metadata(
11223        entity: &mut bevy_ecs::system::EntityCommands,
11224        d: EntityDataItem,
11225    ) -> Result<(), UpdateMetadataError> {
11226        match d.index {
11227            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11228            _ => {}
11229        }
11230        Ok(())
11231    }
11232}
11233
11234/// The metadata bundle for [AcaciaChestBoat].
11235///
11236/// This type should generally not be used directly.
11237#[derive(Bundle)]
11238pub struct AcaciaChestBoatMetadataBundle {
11239    _marker: AcaciaChestBoat,
11240    parent: AbstractBoatMetadataBundle,
11241}
11242impl Default for AcaciaChestBoatMetadataBundle {
11243    fn default() -> Self {
11244        Self {
11245            _marker: AcaciaChestBoat,
11246            parent: Default::default(),
11247        }
11248    }
11249}
11250
11251/// The marker component for entities of type `minecraft:bamboo_chest_raft`.
11252///
11253/// # Metadata
11254///
11255/// This entity type does not add any additional metadata. It will still have
11256/// metadata from parent types.
11257///
11258/// # Parents
11259///
11260/// Entities with `BambooChestRaft` will also have the following marker
11261/// components and their metadata fields:
11262///
11263/// - [AbstractBoat]
11264/// - [AbstractVehicle]
11265/// - [AbstractEntity]
11266///
11267/// # Children
11268///
11269/// This entity type has no children types.
11270#[derive(Component)]
11271pub struct BambooChestRaft;
11272impl BambooChestRaft {
11273    fn apply_metadata(
11274        entity: &mut bevy_ecs::system::EntityCommands,
11275        d: EntityDataItem,
11276    ) -> Result<(), UpdateMetadataError> {
11277        match d.index {
11278            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11279            _ => {}
11280        }
11281        Ok(())
11282    }
11283}
11284
11285/// The metadata bundle for [BambooChestRaft].
11286///
11287/// This type should generally not be used directly.
11288#[derive(Bundle)]
11289pub struct BambooChestRaftMetadataBundle {
11290    _marker: BambooChestRaft,
11291    parent: AbstractBoatMetadataBundle,
11292}
11293impl Default for BambooChestRaftMetadataBundle {
11294    fn default() -> Self {
11295        Self {
11296            _marker: BambooChestRaft,
11297            parent: Default::default(),
11298        }
11299    }
11300}
11301
11302/// The marker component for entities of type `minecraft:bamboo_raft`.
11303///
11304/// # Metadata
11305///
11306/// This entity type does not add any additional metadata. It will still have
11307/// metadata from parent types.
11308///
11309/// # Parents
11310///
11311/// Entities with `BambooRaft` will also have the following marker components
11312/// and their metadata fields:
11313///
11314/// - [AbstractBoat]
11315/// - [AbstractVehicle]
11316/// - [AbstractEntity]
11317///
11318/// # Children
11319///
11320/// This entity type has no children types.
11321#[derive(Component)]
11322pub struct BambooRaft;
11323impl BambooRaft {
11324    fn apply_metadata(
11325        entity: &mut bevy_ecs::system::EntityCommands,
11326        d: EntityDataItem,
11327    ) -> Result<(), UpdateMetadataError> {
11328        match d.index {
11329            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11330            _ => {}
11331        }
11332        Ok(())
11333    }
11334}
11335
11336/// The metadata bundle for [BambooRaft].
11337///
11338/// This type should generally not be used directly.
11339#[derive(Bundle)]
11340pub struct BambooRaftMetadataBundle {
11341    _marker: BambooRaft,
11342    parent: AbstractBoatMetadataBundle,
11343}
11344impl Default for BambooRaftMetadataBundle {
11345    fn default() -> Self {
11346        Self {
11347            _marker: BambooRaft,
11348            parent: Default::default(),
11349        }
11350    }
11351}
11352
11353/// The marker component for entities of type `minecraft:birch_boat`.
11354///
11355/// # Metadata
11356///
11357/// This entity type does not add any additional metadata. It will still have
11358/// metadata from parent types.
11359///
11360/// # Parents
11361///
11362/// Entities with `BirchBoat` will also have the following marker components and
11363/// their metadata fields:
11364///
11365/// - [AbstractBoat]
11366/// - [AbstractVehicle]
11367/// - [AbstractEntity]
11368///
11369/// # Children
11370///
11371/// This entity type has no children types.
11372#[derive(Component)]
11373pub struct BirchBoat;
11374impl BirchBoat {
11375    fn apply_metadata(
11376        entity: &mut bevy_ecs::system::EntityCommands,
11377        d: EntityDataItem,
11378    ) -> Result<(), UpdateMetadataError> {
11379        match d.index {
11380            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11381            _ => {}
11382        }
11383        Ok(())
11384    }
11385}
11386
11387/// The metadata bundle for [BirchBoat].
11388///
11389/// This type should generally not be used directly.
11390#[derive(Bundle)]
11391pub struct BirchBoatMetadataBundle {
11392    _marker: BirchBoat,
11393    parent: AbstractBoatMetadataBundle,
11394}
11395impl Default for BirchBoatMetadataBundle {
11396    fn default() -> Self {
11397        Self {
11398            _marker: BirchBoat,
11399            parent: Default::default(),
11400        }
11401    }
11402}
11403
11404/// The marker component for entities of type `minecraft:birch_chest_boat`.
11405///
11406/// # Metadata
11407///
11408/// This entity type does not add any additional metadata. It will still have
11409/// metadata from parent types.
11410///
11411/// # Parents
11412///
11413/// Entities with `BirchChestBoat` will also have the following marker
11414/// components and their metadata fields:
11415///
11416/// - [AbstractBoat]
11417/// - [AbstractVehicle]
11418/// - [AbstractEntity]
11419///
11420/// # Children
11421///
11422/// This entity type has no children types.
11423#[derive(Component)]
11424pub struct BirchChestBoat;
11425impl BirchChestBoat {
11426    fn apply_metadata(
11427        entity: &mut bevy_ecs::system::EntityCommands,
11428        d: EntityDataItem,
11429    ) -> Result<(), UpdateMetadataError> {
11430        match d.index {
11431            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11432            _ => {}
11433        }
11434        Ok(())
11435    }
11436}
11437
11438/// The metadata bundle for [BirchChestBoat].
11439///
11440/// This type should generally not be used directly.
11441#[derive(Bundle)]
11442pub struct BirchChestBoatMetadataBundle {
11443    _marker: BirchChestBoat,
11444    parent: AbstractBoatMetadataBundle,
11445}
11446impl Default for BirchChestBoatMetadataBundle {
11447    fn default() -> Self {
11448        Self {
11449            _marker: BirchChestBoat,
11450            parent: Default::default(),
11451        }
11452    }
11453}
11454
11455/// The marker component for entities of type `minecraft:cherry_boat`.
11456///
11457/// # Metadata
11458///
11459/// This entity type does not add any additional metadata. It will still have
11460/// metadata from parent types.
11461///
11462/// # Parents
11463///
11464/// Entities with `CherryBoat` will also have the following marker components
11465/// and their metadata fields:
11466///
11467/// - [AbstractBoat]
11468/// - [AbstractVehicle]
11469/// - [AbstractEntity]
11470///
11471/// # Children
11472///
11473/// This entity type has no children types.
11474#[derive(Component)]
11475pub struct CherryBoat;
11476impl CherryBoat {
11477    fn apply_metadata(
11478        entity: &mut bevy_ecs::system::EntityCommands,
11479        d: EntityDataItem,
11480    ) -> Result<(), UpdateMetadataError> {
11481        match d.index {
11482            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11483            _ => {}
11484        }
11485        Ok(())
11486    }
11487}
11488
11489/// The metadata bundle for [CherryBoat].
11490///
11491/// This type should generally not be used directly.
11492#[derive(Bundle)]
11493pub struct CherryBoatMetadataBundle {
11494    _marker: CherryBoat,
11495    parent: AbstractBoatMetadataBundle,
11496}
11497impl Default for CherryBoatMetadataBundle {
11498    fn default() -> Self {
11499        Self {
11500            _marker: CherryBoat,
11501            parent: Default::default(),
11502        }
11503    }
11504}
11505
11506/// The marker component for entities of type `minecraft:cherry_chest_boat`.
11507///
11508/// # Metadata
11509///
11510/// This entity type does not add any additional metadata. It will still have
11511/// metadata from parent types.
11512///
11513/// # Parents
11514///
11515/// Entities with `CherryChestBoat` will also have the following marker
11516/// components and their metadata fields:
11517///
11518/// - [AbstractBoat]
11519/// - [AbstractVehicle]
11520/// - [AbstractEntity]
11521///
11522/// # Children
11523///
11524/// This entity type has no children types.
11525#[derive(Component)]
11526pub struct CherryChestBoat;
11527impl CherryChestBoat {
11528    fn apply_metadata(
11529        entity: &mut bevy_ecs::system::EntityCommands,
11530        d: EntityDataItem,
11531    ) -> Result<(), UpdateMetadataError> {
11532        match d.index {
11533            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11534            _ => {}
11535        }
11536        Ok(())
11537    }
11538}
11539
11540/// The metadata bundle for [CherryChestBoat].
11541///
11542/// This type should generally not be used directly.
11543#[derive(Bundle)]
11544pub struct CherryChestBoatMetadataBundle {
11545    _marker: CherryChestBoat,
11546    parent: AbstractBoatMetadataBundle,
11547}
11548impl Default for CherryChestBoatMetadataBundle {
11549    fn default() -> Self {
11550        Self {
11551            _marker: CherryChestBoat,
11552            parent: Default::default(),
11553        }
11554    }
11555}
11556
11557/// The marker component for entities of type `minecraft:dark_oak_boat`.
11558///
11559/// # Metadata
11560///
11561/// This entity type does not add any additional metadata. It will still have
11562/// metadata from parent types.
11563///
11564/// # Parents
11565///
11566/// Entities with `DarkOakBoat` will also have the following marker components
11567/// and their metadata fields:
11568///
11569/// - [AbstractBoat]
11570/// - [AbstractVehicle]
11571/// - [AbstractEntity]
11572///
11573/// # Children
11574///
11575/// This entity type has no children types.
11576#[derive(Component)]
11577pub struct DarkOakBoat;
11578impl DarkOakBoat {
11579    fn apply_metadata(
11580        entity: &mut bevy_ecs::system::EntityCommands,
11581        d: EntityDataItem,
11582    ) -> Result<(), UpdateMetadataError> {
11583        match d.index {
11584            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11585            _ => {}
11586        }
11587        Ok(())
11588    }
11589}
11590
11591/// The metadata bundle for [DarkOakBoat].
11592///
11593/// This type should generally not be used directly.
11594#[derive(Bundle)]
11595pub struct DarkOakBoatMetadataBundle {
11596    _marker: DarkOakBoat,
11597    parent: AbstractBoatMetadataBundle,
11598}
11599impl Default for DarkOakBoatMetadataBundle {
11600    fn default() -> Self {
11601        Self {
11602            _marker: DarkOakBoat,
11603            parent: Default::default(),
11604        }
11605    }
11606}
11607
11608/// The marker component for entities of type `minecraft:dark_oak_chest_boat`.
11609///
11610/// # Metadata
11611///
11612/// This entity type does not add any additional metadata. It will still have
11613/// metadata from parent types.
11614///
11615/// # Parents
11616///
11617/// Entities with `DarkOakChestBoat` will also have the following marker
11618/// components and their metadata fields:
11619///
11620/// - [AbstractBoat]
11621/// - [AbstractVehicle]
11622/// - [AbstractEntity]
11623///
11624/// # Children
11625///
11626/// This entity type has no children types.
11627#[derive(Component)]
11628pub struct DarkOakChestBoat;
11629impl DarkOakChestBoat {
11630    fn apply_metadata(
11631        entity: &mut bevy_ecs::system::EntityCommands,
11632        d: EntityDataItem,
11633    ) -> Result<(), UpdateMetadataError> {
11634        match d.index {
11635            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11636            _ => {}
11637        }
11638        Ok(())
11639    }
11640}
11641
11642/// The metadata bundle for [DarkOakChestBoat].
11643///
11644/// This type should generally not be used directly.
11645#[derive(Bundle)]
11646pub struct DarkOakChestBoatMetadataBundle {
11647    _marker: DarkOakChestBoat,
11648    parent: AbstractBoatMetadataBundle,
11649}
11650impl Default for DarkOakChestBoatMetadataBundle {
11651    fn default() -> Self {
11652        Self {
11653            _marker: DarkOakChestBoat,
11654            parent: Default::default(),
11655        }
11656    }
11657}
11658
11659/// The marker component for entities of type `minecraft:jungle_boat`.
11660///
11661/// # Metadata
11662///
11663/// This entity type does not add any additional metadata. It will still have
11664/// metadata from parent types.
11665///
11666/// # Parents
11667///
11668/// Entities with `JungleBoat` will also have the following marker components
11669/// and their metadata fields:
11670///
11671/// - [AbstractBoat]
11672/// - [AbstractVehicle]
11673/// - [AbstractEntity]
11674///
11675/// # Children
11676///
11677/// This entity type has no children types.
11678#[derive(Component)]
11679pub struct JungleBoat;
11680impl JungleBoat {
11681    fn apply_metadata(
11682        entity: &mut bevy_ecs::system::EntityCommands,
11683        d: EntityDataItem,
11684    ) -> Result<(), UpdateMetadataError> {
11685        match d.index {
11686            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11687            _ => {}
11688        }
11689        Ok(())
11690    }
11691}
11692
11693/// The metadata bundle for [JungleBoat].
11694///
11695/// This type should generally not be used directly.
11696#[derive(Bundle)]
11697pub struct JungleBoatMetadataBundle {
11698    _marker: JungleBoat,
11699    parent: AbstractBoatMetadataBundle,
11700}
11701impl Default for JungleBoatMetadataBundle {
11702    fn default() -> Self {
11703        Self {
11704            _marker: JungleBoat,
11705            parent: Default::default(),
11706        }
11707    }
11708}
11709
11710/// The marker component for entities of type `minecraft:jungle_chest_boat`.
11711///
11712/// # Metadata
11713///
11714/// This entity type does not add any additional metadata. It will still have
11715/// metadata from parent types.
11716///
11717/// # Parents
11718///
11719/// Entities with `JungleChestBoat` will also have the following marker
11720/// components and their metadata fields:
11721///
11722/// - [AbstractBoat]
11723/// - [AbstractVehicle]
11724/// - [AbstractEntity]
11725///
11726/// # Children
11727///
11728/// This entity type has no children types.
11729#[derive(Component)]
11730pub struct JungleChestBoat;
11731impl JungleChestBoat {
11732    fn apply_metadata(
11733        entity: &mut bevy_ecs::system::EntityCommands,
11734        d: EntityDataItem,
11735    ) -> Result<(), UpdateMetadataError> {
11736        match d.index {
11737            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11738            _ => {}
11739        }
11740        Ok(())
11741    }
11742}
11743
11744/// The metadata bundle for [JungleChestBoat].
11745///
11746/// This type should generally not be used directly.
11747#[derive(Bundle)]
11748pub struct JungleChestBoatMetadataBundle {
11749    _marker: JungleChestBoat,
11750    parent: AbstractBoatMetadataBundle,
11751}
11752impl Default for JungleChestBoatMetadataBundle {
11753    fn default() -> Self {
11754        Self {
11755            _marker: JungleChestBoat,
11756            parent: Default::default(),
11757        }
11758    }
11759}
11760
11761/// The marker component for entities of type `minecraft:mangrove_boat`.
11762///
11763/// # Metadata
11764///
11765/// This entity type does not add any additional metadata. It will still have
11766/// metadata from parent types.
11767///
11768/// # Parents
11769///
11770/// Entities with `MangroveBoat` will also have the following marker components
11771/// and their metadata fields:
11772///
11773/// - [AbstractBoat]
11774/// - [AbstractVehicle]
11775/// - [AbstractEntity]
11776///
11777/// # Children
11778///
11779/// This entity type has no children types.
11780#[derive(Component)]
11781pub struct MangroveBoat;
11782impl MangroveBoat {
11783    fn apply_metadata(
11784        entity: &mut bevy_ecs::system::EntityCommands,
11785        d: EntityDataItem,
11786    ) -> Result<(), UpdateMetadataError> {
11787        match d.index {
11788            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11789            _ => {}
11790        }
11791        Ok(())
11792    }
11793}
11794
11795/// The metadata bundle for [MangroveBoat].
11796///
11797/// This type should generally not be used directly.
11798#[derive(Bundle)]
11799pub struct MangroveBoatMetadataBundle {
11800    _marker: MangroveBoat,
11801    parent: AbstractBoatMetadataBundle,
11802}
11803impl Default for MangroveBoatMetadataBundle {
11804    fn default() -> Self {
11805        Self {
11806            _marker: MangroveBoat,
11807            parent: Default::default(),
11808        }
11809    }
11810}
11811
11812/// The marker component for entities of type `minecraft:mangrove_chest_boat`.
11813///
11814/// # Metadata
11815///
11816/// This entity type does not add any additional metadata. It will still have
11817/// metadata from parent types.
11818///
11819/// # Parents
11820///
11821/// Entities with `MangroveChestBoat` will also have the following marker
11822/// components and their metadata fields:
11823///
11824/// - [AbstractBoat]
11825/// - [AbstractVehicle]
11826/// - [AbstractEntity]
11827///
11828/// # Children
11829///
11830/// This entity type has no children types.
11831#[derive(Component)]
11832pub struct MangroveChestBoat;
11833impl MangroveChestBoat {
11834    fn apply_metadata(
11835        entity: &mut bevy_ecs::system::EntityCommands,
11836        d: EntityDataItem,
11837    ) -> Result<(), UpdateMetadataError> {
11838        match d.index {
11839            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11840            _ => {}
11841        }
11842        Ok(())
11843    }
11844}
11845
11846/// The metadata bundle for [MangroveChestBoat].
11847///
11848/// This type should generally not be used directly.
11849#[derive(Bundle)]
11850pub struct MangroveChestBoatMetadataBundle {
11851    _marker: MangroveChestBoat,
11852    parent: AbstractBoatMetadataBundle,
11853}
11854impl Default for MangroveChestBoatMetadataBundle {
11855    fn default() -> Self {
11856        Self {
11857            _marker: MangroveChestBoat,
11858            parent: Default::default(),
11859        }
11860    }
11861}
11862
11863/// The marker component for entities of type `minecraft:oak_boat`.
11864///
11865/// # Metadata
11866///
11867/// This entity type does not add any additional metadata. It will still have
11868/// metadata from parent types.
11869///
11870/// # Parents
11871///
11872/// Entities with `OakBoat` will also have the following marker components and
11873/// their metadata fields:
11874///
11875/// - [AbstractBoat]
11876/// - [AbstractVehicle]
11877/// - [AbstractEntity]
11878///
11879/// # Children
11880///
11881/// This entity type has no children types.
11882#[derive(Component)]
11883pub struct OakBoat;
11884impl OakBoat {
11885    fn apply_metadata(
11886        entity: &mut bevy_ecs::system::EntityCommands,
11887        d: EntityDataItem,
11888    ) -> Result<(), UpdateMetadataError> {
11889        match d.index {
11890            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11891            _ => {}
11892        }
11893        Ok(())
11894    }
11895}
11896
11897/// The metadata bundle for [OakBoat].
11898///
11899/// This type should generally not be used directly.
11900#[derive(Bundle)]
11901pub struct OakBoatMetadataBundle {
11902    _marker: OakBoat,
11903    parent: AbstractBoatMetadataBundle,
11904}
11905impl Default for OakBoatMetadataBundle {
11906    fn default() -> Self {
11907        Self {
11908            _marker: OakBoat,
11909            parent: Default::default(),
11910        }
11911    }
11912}
11913
11914/// The marker component for entities of type `minecraft:oak_chest_boat`.
11915///
11916/// # Metadata
11917///
11918/// This entity type does not add any additional metadata. It will still have
11919/// metadata from parent types.
11920///
11921/// # Parents
11922///
11923/// Entities with `OakChestBoat` will also have the following marker components
11924/// and their metadata fields:
11925///
11926/// - [AbstractBoat]
11927/// - [AbstractVehicle]
11928/// - [AbstractEntity]
11929///
11930/// # Children
11931///
11932/// This entity type has no children types.
11933#[derive(Component)]
11934pub struct OakChestBoat;
11935impl OakChestBoat {
11936    fn apply_metadata(
11937        entity: &mut bevy_ecs::system::EntityCommands,
11938        d: EntityDataItem,
11939    ) -> Result<(), UpdateMetadataError> {
11940        match d.index {
11941            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11942            _ => {}
11943        }
11944        Ok(())
11945    }
11946}
11947
11948/// The metadata bundle for [OakChestBoat].
11949///
11950/// This type should generally not be used directly.
11951#[derive(Bundle)]
11952pub struct OakChestBoatMetadataBundle {
11953    _marker: OakChestBoat,
11954    parent: AbstractBoatMetadataBundle,
11955}
11956impl Default for OakChestBoatMetadataBundle {
11957    fn default() -> Self {
11958        Self {
11959            _marker: OakChestBoat,
11960            parent: Default::default(),
11961        }
11962    }
11963}
11964
11965/// The marker component for entities of type `minecraft:pale_oak_boat`.
11966///
11967/// # Metadata
11968///
11969/// This entity type does not add any additional metadata. It will still have
11970/// metadata from parent types.
11971///
11972/// # Parents
11973///
11974/// Entities with `PaleOakBoat` will also have the following marker components
11975/// and their metadata fields:
11976///
11977/// - [AbstractBoat]
11978/// - [AbstractVehicle]
11979/// - [AbstractEntity]
11980///
11981/// # Children
11982///
11983/// This entity type has no children types.
11984#[derive(Component)]
11985pub struct PaleOakBoat;
11986impl PaleOakBoat {
11987    fn apply_metadata(
11988        entity: &mut bevy_ecs::system::EntityCommands,
11989        d: EntityDataItem,
11990    ) -> Result<(), UpdateMetadataError> {
11991        match d.index {
11992            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
11993            _ => {}
11994        }
11995        Ok(())
11996    }
11997}
11998
11999/// The metadata bundle for [PaleOakBoat].
12000///
12001/// This type should generally not be used directly.
12002#[derive(Bundle)]
12003pub struct PaleOakBoatMetadataBundle {
12004    _marker: PaleOakBoat,
12005    parent: AbstractBoatMetadataBundle,
12006}
12007impl Default for PaleOakBoatMetadataBundle {
12008    fn default() -> Self {
12009        Self {
12010            _marker: PaleOakBoat,
12011            parent: Default::default(),
12012        }
12013    }
12014}
12015
12016/// The marker component for entities of type `minecraft:pale_oak_chest_boat`.
12017///
12018/// # Metadata
12019///
12020/// This entity type does not add any additional metadata. It will still have
12021/// metadata from parent types.
12022///
12023/// # Parents
12024///
12025/// Entities with `PaleOakChestBoat` will also have the following marker
12026/// components and their metadata fields:
12027///
12028/// - [AbstractBoat]
12029/// - [AbstractVehicle]
12030/// - [AbstractEntity]
12031///
12032/// # Children
12033///
12034/// This entity type has no children types.
12035#[derive(Component)]
12036pub struct PaleOakChestBoat;
12037impl PaleOakChestBoat {
12038    fn apply_metadata(
12039        entity: &mut bevy_ecs::system::EntityCommands,
12040        d: EntityDataItem,
12041    ) -> Result<(), UpdateMetadataError> {
12042        match d.index {
12043            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12044            _ => {}
12045        }
12046        Ok(())
12047    }
12048}
12049
12050/// The metadata bundle for [PaleOakChestBoat].
12051///
12052/// This type should generally not be used directly.
12053#[derive(Bundle)]
12054pub struct PaleOakChestBoatMetadataBundle {
12055    _marker: PaleOakChestBoat,
12056    parent: AbstractBoatMetadataBundle,
12057}
12058impl Default for PaleOakChestBoatMetadataBundle {
12059    fn default() -> Self {
12060        Self {
12061            _marker: PaleOakChestBoat,
12062            parent: Default::default(),
12063        }
12064    }
12065}
12066
12067/// The marker component for entities of type `minecraft:spruce_boat`.
12068///
12069/// # Metadata
12070///
12071/// This entity type does not add any additional metadata. It will still have
12072/// metadata from parent types.
12073///
12074/// # Parents
12075///
12076/// Entities with `SpruceBoat` will also have the following marker components
12077/// and their metadata fields:
12078///
12079/// - [AbstractBoat]
12080/// - [AbstractVehicle]
12081/// - [AbstractEntity]
12082///
12083/// # Children
12084///
12085/// This entity type has no children types.
12086#[derive(Component)]
12087pub struct SpruceBoat;
12088impl SpruceBoat {
12089    fn apply_metadata(
12090        entity: &mut bevy_ecs::system::EntityCommands,
12091        d: EntityDataItem,
12092    ) -> Result<(), UpdateMetadataError> {
12093        match d.index {
12094            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12095            _ => {}
12096        }
12097        Ok(())
12098    }
12099}
12100
12101/// The metadata bundle for [SpruceBoat].
12102///
12103/// This type should generally not be used directly.
12104#[derive(Bundle)]
12105pub struct SpruceBoatMetadataBundle {
12106    _marker: SpruceBoat,
12107    parent: AbstractBoatMetadataBundle,
12108}
12109impl Default for SpruceBoatMetadataBundle {
12110    fn default() -> Self {
12111        Self {
12112            _marker: SpruceBoat,
12113            parent: Default::default(),
12114        }
12115    }
12116}
12117
12118/// The marker component for entities of type `minecraft:spruce_chest_boat`.
12119///
12120/// # Metadata
12121///
12122/// This entity type does not add any additional metadata. It will still have
12123/// metadata from parent types.
12124///
12125/// # Parents
12126///
12127/// Entities with `SpruceChestBoat` will also have the following marker
12128/// components and their metadata fields:
12129///
12130/// - [AbstractBoat]
12131/// - [AbstractVehicle]
12132/// - [AbstractEntity]
12133///
12134/// # Children
12135///
12136/// This entity type has no children types.
12137#[derive(Component)]
12138pub struct SpruceChestBoat;
12139impl SpruceChestBoat {
12140    fn apply_metadata(
12141        entity: &mut bevy_ecs::system::EntityCommands,
12142        d: EntityDataItem,
12143    ) -> Result<(), UpdateMetadataError> {
12144        match d.index {
12145            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12146            _ => {}
12147        }
12148        Ok(())
12149    }
12150}
12151
12152/// The metadata bundle for [SpruceChestBoat].
12153///
12154/// This type should generally not be used directly.
12155#[derive(Bundle)]
12156pub struct SpruceChestBoatMetadataBundle {
12157    _marker: SpruceChestBoat,
12158    parent: AbstractBoatMetadataBundle,
12159}
12160impl Default for SpruceChestBoatMetadataBundle {
12161    fn default() -> Self {
12162        Self {
12163            _marker: SpruceChestBoat,
12164            parent: Default::default(),
12165        }
12166    }
12167}
12168
12169/// A metadata field for [AbstractMinecart].
12170#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12171pub struct CustomDisplayBlock(pub azalea_block::BlockState);
12172/// A metadata field for [AbstractMinecart].
12173#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12174pub struct DisplayOffset(pub i32);
12175/// An abstract entity marker component.
12176///
12177/// # Metadata
12178///
12179/// These are the metadata components that all `AbstractMinecart` entities are
12180/// guaranteed to have, in addition to the metadata components from parent
12181/// types:
12182///
12183/// - [CustomDisplayBlock]
12184/// - [DisplayOffset]
12185///
12186/// # Parents
12187///
12188/// Entities with `AbstractMinecart` will also have the following marker
12189/// components and their metadata fields:
12190///
12191/// - [AbstractVehicle]
12192/// - [AbstractEntity]
12193///
12194/// # Children
12195///
12196/// - [ChestMinecart]
12197/// - [CommandBlockMinecart]
12198/// - [FurnaceMinecart]
12199/// - [HopperMinecart]
12200/// - [Minecart]
12201/// - [SpawnerMinecart]
12202/// - [TntMinecart]
12203#[derive(Component)]
12204pub struct AbstractMinecart;
12205impl AbstractMinecart {
12206    fn apply_metadata(
12207        entity: &mut bevy_ecs::system::EntityCommands,
12208        d: EntityDataItem,
12209    ) -> Result<(), UpdateMetadataError> {
12210        match d.index {
12211            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
12212            11 => {
12213                entity.insert(CustomDisplayBlock(d.value.into_optional_block_state()?));
12214            }
12215            12 => {
12216                entity.insert(DisplayOffset(d.value.into_int()?));
12217            }
12218            _ => {}
12219        }
12220        Ok(())
12221    }
12222}
12223
12224/// The metadata bundle for [AbstractMinecart].
12225///
12226/// This type should generally not be used directly.
12227#[derive(Bundle)]
12228pub struct AbstractMinecartMetadataBundle {
12229    _marker: AbstractMinecart,
12230    parent: AbstractVehicleMetadataBundle,
12231    custom_display_block: CustomDisplayBlock,
12232    display_offset: DisplayOffset,
12233}
12234impl Default for AbstractMinecartMetadataBundle {
12235    fn default() -> Self {
12236        Self {
12237            _marker: AbstractMinecart,
12238            parent: Default::default(),
12239            custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
12240            display_offset: DisplayOffset(Default::default()),
12241        }
12242    }
12243}
12244
12245/// The marker component for entities of type `minecraft:chest_minecart`.
12246///
12247/// # Metadata
12248///
12249/// This entity type does not add any additional metadata. It will still have
12250/// metadata from parent types.
12251///
12252/// # Parents
12253///
12254/// Entities with `ChestMinecart` will also have the following marker components
12255/// and their metadata fields:
12256///
12257/// - [AbstractMinecart]
12258/// - [AbstractVehicle]
12259/// - [AbstractEntity]
12260///
12261/// # Children
12262///
12263/// This entity type has no children types.
12264#[derive(Component)]
12265pub struct ChestMinecart;
12266impl ChestMinecart {
12267    fn apply_metadata(
12268        entity: &mut bevy_ecs::system::EntityCommands,
12269        d: EntityDataItem,
12270    ) -> Result<(), UpdateMetadataError> {
12271        match d.index {
12272            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12273            _ => {}
12274        }
12275        Ok(())
12276    }
12277}
12278
12279/// The metadata bundle for [ChestMinecart].
12280///
12281/// This type should generally not be used directly.
12282#[derive(Bundle)]
12283pub struct ChestMinecartMetadataBundle {
12284    _marker: ChestMinecart,
12285    parent: AbstractMinecartMetadataBundle,
12286}
12287impl Default for ChestMinecartMetadataBundle {
12288    fn default() -> Self {
12289        Self {
12290            _marker: ChestMinecart,
12291            parent: Default::default(),
12292        }
12293    }
12294}
12295
12296/// A metadata field for [CommandBlockMinecart].
12297#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12298pub struct CommandName(pub Box<str>);
12299/// A metadata field for [CommandBlockMinecart].
12300#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12301pub struct LastOutput(pub Box<FormattedText>);
12302/// The marker component for entities of type
12303/// `minecraft:command_block_minecart`.
12304///
12305/// # Metadata
12306///
12307/// These are the metadata components that all `CommandBlockMinecart` entities
12308/// are guaranteed to have, in addition to the metadata components from parent
12309/// types:
12310///
12311/// - [CommandName]
12312/// - [LastOutput]
12313///
12314/// # Parents
12315///
12316/// Entities with `CommandBlockMinecart` will also have the following marker
12317/// components and their metadata fields:
12318///
12319/// - [AbstractMinecart]
12320/// - [AbstractVehicle]
12321/// - [AbstractEntity]
12322///
12323/// # Children
12324///
12325/// This entity type has no children types.
12326#[derive(Component)]
12327pub struct CommandBlockMinecart;
12328impl CommandBlockMinecart {
12329    fn apply_metadata(
12330        entity: &mut bevy_ecs::system::EntityCommands,
12331        d: EntityDataItem,
12332    ) -> Result<(), UpdateMetadataError> {
12333        match d.index {
12334            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12335            13 => {
12336                entity.insert(CommandName(d.value.into_string()?));
12337            }
12338            14 => {
12339                entity.insert(LastOutput(d.value.into_formatted_text()?));
12340            }
12341            _ => {}
12342        }
12343        Ok(())
12344    }
12345}
12346
12347/// The metadata bundle for [CommandBlockMinecart].
12348///
12349/// This type should generally not be used directly.
12350#[derive(Bundle)]
12351pub struct CommandBlockMinecartMetadataBundle {
12352    _marker: CommandBlockMinecart,
12353    parent: AbstractMinecartMetadataBundle,
12354    command_name: CommandName,
12355    last_output: LastOutput,
12356}
12357impl Default for CommandBlockMinecartMetadataBundle {
12358    fn default() -> Self {
12359        Self {
12360            _marker: CommandBlockMinecart,
12361            parent: Default::default(),
12362            command_name: CommandName("".into()),
12363            last_output: LastOutput(Default::default()),
12364        }
12365    }
12366}
12367
12368/// A metadata field for [FurnaceMinecart].
12369#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12370pub struct Fuel(pub bool);
12371/// The marker component for entities of type `minecraft:furnace_minecart`.
12372///
12373/// # Metadata
12374///
12375/// These are the metadata components that all `FurnaceMinecart` entities are
12376/// guaranteed to have, in addition to the metadata components from parent
12377/// types:
12378///
12379/// - [Fuel]
12380///
12381/// # Parents
12382///
12383/// Entities with `FurnaceMinecart` will also have the following marker
12384/// components and their metadata fields:
12385///
12386/// - [AbstractMinecart]
12387/// - [AbstractVehicle]
12388/// - [AbstractEntity]
12389///
12390/// # Children
12391///
12392/// This entity type has no children types.
12393#[derive(Component)]
12394pub struct FurnaceMinecart;
12395impl FurnaceMinecart {
12396    fn apply_metadata(
12397        entity: &mut bevy_ecs::system::EntityCommands,
12398        d: EntityDataItem,
12399    ) -> Result<(), UpdateMetadataError> {
12400        match d.index {
12401            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12402            13 => {
12403                entity.insert(Fuel(d.value.into_boolean()?));
12404            }
12405            _ => {}
12406        }
12407        Ok(())
12408    }
12409}
12410
12411/// The metadata bundle for [FurnaceMinecart].
12412///
12413/// This type should generally not be used directly.
12414#[derive(Bundle)]
12415pub struct FurnaceMinecartMetadataBundle {
12416    _marker: FurnaceMinecart,
12417    parent: AbstractMinecartMetadataBundle,
12418    fuel: Fuel,
12419}
12420impl Default for FurnaceMinecartMetadataBundle {
12421    fn default() -> Self {
12422        Self {
12423            _marker: FurnaceMinecart,
12424            parent: Default::default(),
12425            fuel: Fuel(false),
12426        }
12427    }
12428}
12429
12430/// The marker component for entities of type `minecraft:hopper_minecart`.
12431///
12432/// # Metadata
12433///
12434/// This entity type does not add any additional metadata. It will still have
12435/// metadata from parent types.
12436///
12437/// # Parents
12438///
12439/// Entities with `HopperMinecart` will also have the following marker
12440/// components and their metadata fields:
12441///
12442/// - [AbstractMinecart]
12443/// - [AbstractVehicle]
12444/// - [AbstractEntity]
12445///
12446/// # Children
12447///
12448/// This entity type has no children types.
12449#[derive(Component)]
12450pub struct HopperMinecart;
12451impl HopperMinecart {
12452    fn apply_metadata(
12453        entity: &mut bevy_ecs::system::EntityCommands,
12454        d: EntityDataItem,
12455    ) -> Result<(), UpdateMetadataError> {
12456        match d.index {
12457            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12458            _ => {}
12459        }
12460        Ok(())
12461    }
12462}
12463
12464/// The metadata bundle for [HopperMinecart].
12465///
12466/// This type should generally not be used directly.
12467#[derive(Bundle)]
12468pub struct HopperMinecartMetadataBundle {
12469    _marker: HopperMinecart,
12470    parent: AbstractMinecartMetadataBundle,
12471}
12472impl Default for HopperMinecartMetadataBundle {
12473    fn default() -> Self {
12474        Self {
12475            _marker: HopperMinecart,
12476            parent: Default::default(),
12477        }
12478    }
12479}
12480
12481/// The marker component for entities of type `minecraft:minecart`.
12482///
12483/// # Metadata
12484///
12485/// This entity type does not add any additional metadata. It will still have
12486/// metadata from parent types.
12487///
12488/// # Parents
12489///
12490/// Entities with `Minecart` will also have the following marker components and
12491/// their metadata fields:
12492///
12493/// - [AbstractMinecart]
12494/// - [AbstractVehicle]
12495/// - [AbstractEntity]
12496///
12497/// # Children
12498///
12499/// This entity type has no children types.
12500#[derive(Component)]
12501pub struct Minecart;
12502impl Minecart {
12503    fn apply_metadata(
12504        entity: &mut bevy_ecs::system::EntityCommands,
12505        d: EntityDataItem,
12506    ) -> Result<(), UpdateMetadataError> {
12507        match d.index {
12508            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12509            _ => {}
12510        }
12511        Ok(())
12512    }
12513}
12514
12515/// The metadata bundle for [Minecart].
12516///
12517/// This type should generally not be used directly.
12518#[derive(Bundle)]
12519pub struct MinecartMetadataBundle {
12520    _marker: Minecart,
12521    parent: AbstractMinecartMetadataBundle,
12522}
12523impl Default for MinecartMetadataBundle {
12524    fn default() -> Self {
12525        Self {
12526            _marker: Minecart,
12527            parent: Default::default(),
12528        }
12529    }
12530}
12531
12532/// The marker component for entities of type `minecraft:spawner_minecart`.
12533///
12534/// # Metadata
12535///
12536/// This entity type does not add any additional metadata. It will still have
12537/// metadata from parent types.
12538///
12539/// # Parents
12540///
12541/// Entities with `SpawnerMinecart` will also have the following marker
12542/// components and their metadata fields:
12543///
12544/// - [AbstractMinecart]
12545/// - [AbstractVehicle]
12546/// - [AbstractEntity]
12547///
12548/// # Children
12549///
12550/// This entity type has no children types.
12551#[derive(Component)]
12552pub struct SpawnerMinecart;
12553impl SpawnerMinecart {
12554    fn apply_metadata(
12555        entity: &mut bevy_ecs::system::EntityCommands,
12556        d: EntityDataItem,
12557    ) -> Result<(), UpdateMetadataError> {
12558        match d.index {
12559            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12560            _ => {}
12561        }
12562        Ok(())
12563    }
12564}
12565
12566/// The metadata bundle for [SpawnerMinecart].
12567///
12568/// This type should generally not be used directly.
12569#[derive(Bundle)]
12570pub struct SpawnerMinecartMetadataBundle {
12571    _marker: SpawnerMinecart,
12572    parent: AbstractMinecartMetadataBundle,
12573}
12574impl Default for SpawnerMinecartMetadataBundle {
12575    fn default() -> Self {
12576        Self {
12577            _marker: SpawnerMinecart,
12578            parent: Default::default(),
12579        }
12580    }
12581}
12582
12583/// The marker component for entities of type `minecraft:tnt_minecart`.
12584///
12585/// # Metadata
12586///
12587/// This entity type does not add any additional metadata. It will still have
12588/// metadata from parent types.
12589///
12590/// # Parents
12591///
12592/// Entities with `TntMinecart` will also have the following marker components
12593/// and their metadata fields:
12594///
12595/// - [AbstractMinecart]
12596/// - [AbstractVehicle]
12597/// - [AbstractEntity]
12598///
12599/// # Children
12600///
12601/// This entity type has no children types.
12602#[derive(Component)]
12603pub struct TntMinecart;
12604impl TntMinecart {
12605    fn apply_metadata(
12606        entity: &mut bevy_ecs::system::EntityCommands,
12607        d: EntityDataItem,
12608    ) -> Result<(), UpdateMetadataError> {
12609        match d.index {
12610            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
12611            _ => {}
12612        }
12613        Ok(())
12614    }
12615}
12616
12617/// The metadata bundle for [TntMinecart].
12618///
12619/// This type should generally not be used directly.
12620#[derive(Bundle)]
12621pub struct TntMinecartMetadataBundle {
12622    _marker: TntMinecart,
12623    parent: AbstractMinecartMetadataBundle,
12624}
12625impl Default for TntMinecartMetadataBundle {
12626    fn default() -> Self {
12627        Self {
12628            _marker: TntMinecart,
12629            parent: Default::default(),
12630        }
12631    }
12632}
12633
12634pub fn apply_metadata(
12635    entity: &mut bevy_ecs::system::EntityCommands,
12636    entity_kind: EntityKind,
12637    items: Vec<EntityDataItem>,
12638) -> Result<(), UpdateMetadataError> {
12639    match entity_kind {
12640        EntityKind::AcaciaBoat => {
12641            for d in items {
12642                AcaciaBoat::apply_metadata(entity, d)?;
12643            }
12644        }
12645        EntityKind::AcaciaChestBoat => {
12646            for d in items {
12647                AcaciaChestBoat::apply_metadata(entity, d)?;
12648            }
12649        }
12650        EntityKind::Allay => {
12651            for d in items {
12652                Allay::apply_metadata(entity, d)?;
12653            }
12654        }
12655        EntityKind::AreaEffectCloud => {
12656            for d in items {
12657                AreaEffectCloud::apply_metadata(entity, d)?;
12658            }
12659        }
12660        EntityKind::Armadillo => {
12661            for d in items {
12662                Armadillo::apply_metadata(entity, d)?;
12663            }
12664        }
12665        EntityKind::ArmorStand => {
12666            for d in items {
12667                ArmorStand::apply_metadata(entity, d)?;
12668            }
12669        }
12670        EntityKind::Arrow => {
12671            for d in items {
12672                Arrow::apply_metadata(entity, d)?;
12673            }
12674        }
12675        EntityKind::Axolotl => {
12676            for d in items {
12677                Axolotl::apply_metadata(entity, d)?;
12678            }
12679        }
12680        EntityKind::BambooChestRaft => {
12681            for d in items {
12682                BambooChestRaft::apply_metadata(entity, d)?;
12683            }
12684        }
12685        EntityKind::BambooRaft => {
12686            for d in items {
12687                BambooRaft::apply_metadata(entity, d)?;
12688            }
12689        }
12690        EntityKind::Bat => {
12691            for d in items {
12692                Bat::apply_metadata(entity, d)?;
12693            }
12694        }
12695        EntityKind::Bee => {
12696            for d in items {
12697                Bee::apply_metadata(entity, d)?;
12698            }
12699        }
12700        EntityKind::BirchBoat => {
12701            for d in items {
12702                BirchBoat::apply_metadata(entity, d)?;
12703            }
12704        }
12705        EntityKind::BirchChestBoat => {
12706            for d in items {
12707                BirchChestBoat::apply_metadata(entity, d)?;
12708            }
12709        }
12710        EntityKind::Blaze => {
12711            for d in items {
12712                Blaze::apply_metadata(entity, d)?;
12713            }
12714        }
12715        EntityKind::BlockDisplay => {
12716            for d in items {
12717                BlockDisplay::apply_metadata(entity, d)?;
12718            }
12719        }
12720        EntityKind::Bogged => {
12721            for d in items {
12722                Bogged::apply_metadata(entity, d)?;
12723            }
12724        }
12725        EntityKind::Breeze => {
12726            for d in items {
12727                Breeze::apply_metadata(entity, d)?;
12728            }
12729        }
12730        EntityKind::BreezeWindCharge => {
12731            for d in items {
12732                BreezeWindCharge::apply_metadata(entity, d)?;
12733            }
12734        }
12735        EntityKind::Camel => {
12736            for d in items {
12737                Camel::apply_metadata(entity, d)?;
12738            }
12739        }
12740        EntityKind::CamelHusk => {
12741            for d in items {
12742                CamelHusk::apply_metadata(entity, d)?;
12743            }
12744        }
12745        EntityKind::Cat => {
12746            for d in items {
12747                Cat::apply_metadata(entity, d)?;
12748            }
12749        }
12750        EntityKind::CaveSpider => {
12751            for d in items {
12752                CaveSpider::apply_metadata(entity, d)?;
12753            }
12754        }
12755        EntityKind::CherryBoat => {
12756            for d in items {
12757                CherryBoat::apply_metadata(entity, d)?;
12758            }
12759        }
12760        EntityKind::CherryChestBoat => {
12761            for d in items {
12762                CherryChestBoat::apply_metadata(entity, d)?;
12763            }
12764        }
12765        EntityKind::ChestMinecart => {
12766            for d in items {
12767                ChestMinecart::apply_metadata(entity, d)?;
12768            }
12769        }
12770        EntityKind::Chicken => {
12771            for d in items {
12772                Chicken::apply_metadata(entity, d)?;
12773            }
12774        }
12775        EntityKind::Cod => {
12776            for d in items {
12777                Cod::apply_metadata(entity, d)?;
12778            }
12779        }
12780        EntityKind::CommandBlockMinecart => {
12781            for d in items {
12782                CommandBlockMinecart::apply_metadata(entity, d)?;
12783            }
12784        }
12785        EntityKind::CopperGolem => {
12786            for d in items {
12787                CopperGolem::apply_metadata(entity, d)?;
12788            }
12789        }
12790        EntityKind::Cow => {
12791            for d in items {
12792                Cow::apply_metadata(entity, d)?;
12793            }
12794        }
12795        EntityKind::Creaking => {
12796            for d in items {
12797                Creaking::apply_metadata(entity, d)?;
12798            }
12799        }
12800        EntityKind::Creeper => {
12801            for d in items {
12802                Creeper::apply_metadata(entity, d)?;
12803            }
12804        }
12805        EntityKind::DarkOakBoat => {
12806            for d in items {
12807                DarkOakBoat::apply_metadata(entity, d)?;
12808            }
12809        }
12810        EntityKind::DarkOakChestBoat => {
12811            for d in items {
12812                DarkOakChestBoat::apply_metadata(entity, d)?;
12813            }
12814        }
12815        EntityKind::Dolphin => {
12816            for d in items {
12817                Dolphin::apply_metadata(entity, d)?;
12818            }
12819        }
12820        EntityKind::Donkey => {
12821            for d in items {
12822                Donkey::apply_metadata(entity, d)?;
12823            }
12824        }
12825        EntityKind::DragonFireball => {
12826            for d in items {
12827                DragonFireball::apply_metadata(entity, d)?;
12828            }
12829        }
12830        EntityKind::Drowned => {
12831            for d in items {
12832                Drowned::apply_metadata(entity, d)?;
12833            }
12834        }
12835        EntityKind::Egg => {
12836            for d in items {
12837                Egg::apply_metadata(entity, d)?;
12838            }
12839        }
12840        EntityKind::ElderGuardian => {
12841            for d in items {
12842                ElderGuardian::apply_metadata(entity, d)?;
12843            }
12844        }
12845        EntityKind::EndCrystal => {
12846            for d in items {
12847                EndCrystal::apply_metadata(entity, d)?;
12848            }
12849        }
12850        EntityKind::EnderDragon => {
12851            for d in items {
12852                EnderDragon::apply_metadata(entity, d)?;
12853            }
12854        }
12855        EntityKind::EnderPearl => {
12856            for d in items {
12857                EnderPearl::apply_metadata(entity, d)?;
12858            }
12859        }
12860        EntityKind::Enderman => {
12861            for d in items {
12862                Enderman::apply_metadata(entity, d)?;
12863            }
12864        }
12865        EntityKind::Endermite => {
12866            for d in items {
12867                Endermite::apply_metadata(entity, d)?;
12868            }
12869        }
12870        EntityKind::Evoker => {
12871            for d in items {
12872                Evoker::apply_metadata(entity, d)?;
12873            }
12874        }
12875        EntityKind::EvokerFangs => {
12876            for d in items {
12877                EvokerFangs::apply_metadata(entity, d)?;
12878            }
12879        }
12880        EntityKind::ExperienceBottle => {
12881            for d in items {
12882                ExperienceBottle::apply_metadata(entity, d)?;
12883            }
12884        }
12885        EntityKind::ExperienceOrb => {
12886            for d in items {
12887                ExperienceOrb::apply_metadata(entity, d)?;
12888            }
12889        }
12890        EntityKind::EyeOfEnder => {
12891            for d in items {
12892                EyeOfEnder::apply_metadata(entity, d)?;
12893            }
12894        }
12895        EntityKind::FallingBlock => {
12896            for d in items {
12897                FallingBlock::apply_metadata(entity, d)?;
12898            }
12899        }
12900        EntityKind::Fireball => {
12901            for d in items {
12902                Fireball::apply_metadata(entity, d)?;
12903            }
12904        }
12905        EntityKind::FireworkRocket => {
12906            for d in items {
12907                FireworkRocket::apply_metadata(entity, d)?;
12908            }
12909        }
12910        EntityKind::FishingBobber => {
12911            for d in items {
12912                FishingBobber::apply_metadata(entity, d)?;
12913            }
12914        }
12915        EntityKind::Fox => {
12916            for d in items {
12917                Fox::apply_metadata(entity, d)?;
12918            }
12919        }
12920        EntityKind::Frog => {
12921            for d in items {
12922                Frog::apply_metadata(entity, d)?;
12923            }
12924        }
12925        EntityKind::FurnaceMinecart => {
12926            for d in items {
12927                FurnaceMinecart::apply_metadata(entity, d)?;
12928            }
12929        }
12930        EntityKind::Ghast => {
12931            for d in items {
12932                Ghast::apply_metadata(entity, d)?;
12933            }
12934        }
12935        EntityKind::Giant => {
12936            for d in items {
12937                Giant::apply_metadata(entity, d)?;
12938            }
12939        }
12940        EntityKind::GlowItemFrame => {
12941            for d in items {
12942                GlowItemFrame::apply_metadata(entity, d)?;
12943            }
12944        }
12945        EntityKind::GlowSquid => {
12946            for d in items {
12947                GlowSquid::apply_metadata(entity, d)?;
12948            }
12949        }
12950        EntityKind::Goat => {
12951            for d in items {
12952                Goat::apply_metadata(entity, d)?;
12953            }
12954        }
12955        EntityKind::Guardian => {
12956            for d in items {
12957                Guardian::apply_metadata(entity, d)?;
12958            }
12959        }
12960        EntityKind::HappyGhast => {
12961            for d in items {
12962                HappyGhast::apply_metadata(entity, d)?;
12963            }
12964        }
12965        EntityKind::Hoglin => {
12966            for d in items {
12967                Hoglin::apply_metadata(entity, d)?;
12968            }
12969        }
12970        EntityKind::HopperMinecart => {
12971            for d in items {
12972                HopperMinecart::apply_metadata(entity, d)?;
12973            }
12974        }
12975        EntityKind::Horse => {
12976            for d in items {
12977                Horse::apply_metadata(entity, d)?;
12978            }
12979        }
12980        EntityKind::Husk => {
12981            for d in items {
12982                Husk::apply_metadata(entity, d)?;
12983            }
12984        }
12985        EntityKind::Illusioner => {
12986            for d in items {
12987                Illusioner::apply_metadata(entity, d)?;
12988            }
12989        }
12990        EntityKind::Interaction => {
12991            for d in items {
12992                Interaction::apply_metadata(entity, d)?;
12993            }
12994        }
12995        EntityKind::IronGolem => {
12996            for d in items {
12997                IronGolem::apply_metadata(entity, d)?;
12998            }
12999        }
13000        EntityKind::Item => {
13001            for d in items {
13002                Item::apply_metadata(entity, d)?;
13003            }
13004        }
13005        EntityKind::ItemDisplay => {
13006            for d in items {
13007                ItemDisplay::apply_metadata(entity, d)?;
13008            }
13009        }
13010        EntityKind::ItemFrame => {
13011            for d in items {
13012                ItemFrame::apply_metadata(entity, d)?;
13013            }
13014        }
13015        EntityKind::JungleBoat => {
13016            for d in items {
13017                JungleBoat::apply_metadata(entity, d)?;
13018            }
13019        }
13020        EntityKind::JungleChestBoat => {
13021            for d in items {
13022                JungleChestBoat::apply_metadata(entity, d)?;
13023            }
13024        }
13025        EntityKind::LeashKnot => {
13026            for d in items {
13027                LeashKnot::apply_metadata(entity, d)?;
13028            }
13029        }
13030        EntityKind::LightningBolt => {
13031            for d in items {
13032                LightningBolt::apply_metadata(entity, d)?;
13033            }
13034        }
13035        EntityKind::LingeringPotion => {
13036            for d in items {
13037                LingeringPotion::apply_metadata(entity, d)?;
13038            }
13039        }
13040        EntityKind::Llama => {
13041            for d in items {
13042                Llama::apply_metadata(entity, d)?;
13043            }
13044        }
13045        EntityKind::LlamaSpit => {
13046            for d in items {
13047                LlamaSpit::apply_metadata(entity, d)?;
13048            }
13049        }
13050        EntityKind::MagmaCube => {
13051            for d in items {
13052                MagmaCube::apply_metadata(entity, d)?;
13053            }
13054        }
13055        EntityKind::MangroveBoat => {
13056            for d in items {
13057                MangroveBoat::apply_metadata(entity, d)?;
13058            }
13059        }
13060        EntityKind::MangroveChestBoat => {
13061            for d in items {
13062                MangroveChestBoat::apply_metadata(entity, d)?;
13063            }
13064        }
13065        EntityKind::Mannequin => {
13066            for d in items {
13067                Mannequin::apply_metadata(entity, d)?;
13068            }
13069        }
13070        EntityKind::Marker => {
13071            for d in items {
13072                Marker::apply_metadata(entity, d)?;
13073            }
13074        }
13075        EntityKind::Minecart => {
13076            for d in items {
13077                Minecart::apply_metadata(entity, d)?;
13078            }
13079        }
13080        EntityKind::Mooshroom => {
13081            for d in items {
13082                Mooshroom::apply_metadata(entity, d)?;
13083            }
13084        }
13085        EntityKind::Mule => {
13086            for d in items {
13087                Mule::apply_metadata(entity, d)?;
13088            }
13089        }
13090        EntityKind::Nautilus => {
13091            for d in items {
13092                Nautilus::apply_metadata(entity, d)?;
13093            }
13094        }
13095        EntityKind::OakBoat => {
13096            for d in items {
13097                OakBoat::apply_metadata(entity, d)?;
13098            }
13099        }
13100        EntityKind::OakChestBoat => {
13101            for d in items {
13102                OakChestBoat::apply_metadata(entity, d)?;
13103            }
13104        }
13105        EntityKind::Ocelot => {
13106            for d in items {
13107                Ocelot::apply_metadata(entity, d)?;
13108            }
13109        }
13110        EntityKind::OminousItemSpawner => {
13111            for d in items {
13112                OminousItemSpawner::apply_metadata(entity, d)?;
13113            }
13114        }
13115        EntityKind::Painting => {
13116            for d in items {
13117                Painting::apply_metadata(entity, d)?;
13118            }
13119        }
13120        EntityKind::PaleOakBoat => {
13121            for d in items {
13122                PaleOakBoat::apply_metadata(entity, d)?;
13123            }
13124        }
13125        EntityKind::PaleOakChestBoat => {
13126            for d in items {
13127                PaleOakChestBoat::apply_metadata(entity, d)?;
13128            }
13129        }
13130        EntityKind::Panda => {
13131            for d in items {
13132                Panda::apply_metadata(entity, d)?;
13133            }
13134        }
13135        EntityKind::Parched => {
13136            for d in items {
13137                Parched::apply_metadata(entity, d)?;
13138            }
13139        }
13140        EntityKind::Parrot => {
13141            for d in items {
13142                Parrot::apply_metadata(entity, d)?;
13143            }
13144        }
13145        EntityKind::Phantom => {
13146            for d in items {
13147                Phantom::apply_metadata(entity, d)?;
13148            }
13149        }
13150        EntityKind::Pig => {
13151            for d in items {
13152                Pig::apply_metadata(entity, d)?;
13153            }
13154        }
13155        EntityKind::Piglin => {
13156            for d in items {
13157                Piglin::apply_metadata(entity, d)?;
13158            }
13159        }
13160        EntityKind::PiglinBrute => {
13161            for d in items {
13162                PiglinBrute::apply_metadata(entity, d)?;
13163            }
13164        }
13165        EntityKind::Pillager => {
13166            for d in items {
13167                Pillager::apply_metadata(entity, d)?;
13168            }
13169        }
13170        EntityKind::Player => {
13171            for d in items {
13172                Player::apply_metadata(entity, d)?;
13173            }
13174        }
13175        EntityKind::PolarBear => {
13176            for d in items {
13177                PolarBear::apply_metadata(entity, d)?;
13178            }
13179        }
13180        EntityKind::Pufferfish => {
13181            for d in items {
13182                Pufferfish::apply_metadata(entity, d)?;
13183            }
13184        }
13185        EntityKind::Rabbit => {
13186            for d in items {
13187                Rabbit::apply_metadata(entity, d)?;
13188            }
13189        }
13190        EntityKind::Ravager => {
13191            for d in items {
13192                Ravager::apply_metadata(entity, d)?;
13193            }
13194        }
13195        EntityKind::Salmon => {
13196            for d in items {
13197                Salmon::apply_metadata(entity, d)?;
13198            }
13199        }
13200        EntityKind::Sheep => {
13201            for d in items {
13202                Sheep::apply_metadata(entity, d)?;
13203            }
13204        }
13205        EntityKind::Shulker => {
13206            for d in items {
13207                Shulker::apply_metadata(entity, d)?;
13208            }
13209        }
13210        EntityKind::ShulkerBullet => {
13211            for d in items {
13212                ShulkerBullet::apply_metadata(entity, d)?;
13213            }
13214        }
13215        EntityKind::Silverfish => {
13216            for d in items {
13217                Silverfish::apply_metadata(entity, d)?;
13218            }
13219        }
13220        EntityKind::Skeleton => {
13221            for d in items {
13222                Skeleton::apply_metadata(entity, d)?;
13223            }
13224        }
13225        EntityKind::SkeletonHorse => {
13226            for d in items {
13227                SkeletonHorse::apply_metadata(entity, d)?;
13228            }
13229        }
13230        EntityKind::Slime => {
13231            for d in items {
13232                Slime::apply_metadata(entity, d)?;
13233            }
13234        }
13235        EntityKind::SmallFireball => {
13236            for d in items {
13237                SmallFireball::apply_metadata(entity, d)?;
13238            }
13239        }
13240        EntityKind::Sniffer => {
13241            for d in items {
13242                Sniffer::apply_metadata(entity, d)?;
13243            }
13244        }
13245        EntityKind::SnowGolem => {
13246            for d in items {
13247                SnowGolem::apply_metadata(entity, d)?;
13248            }
13249        }
13250        EntityKind::Snowball => {
13251            for d in items {
13252                Snowball::apply_metadata(entity, d)?;
13253            }
13254        }
13255        EntityKind::SpawnerMinecart => {
13256            for d in items {
13257                SpawnerMinecart::apply_metadata(entity, d)?;
13258            }
13259        }
13260        EntityKind::SpectralArrow => {
13261            for d in items {
13262                SpectralArrow::apply_metadata(entity, d)?;
13263            }
13264        }
13265        EntityKind::Spider => {
13266            for d in items {
13267                Spider::apply_metadata(entity, d)?;
13268            }
13269        }
13270        EntityKind::SplashPotion => {
13271            for d in items {
13272                SplashPotion::apply_metadata(entity, d)?;
13273            }
13274        }
13275        EntityKind::SpruceBoat => {
13276            for d in items {
13277                SpruceBoat::apply_metadata(entity, d)?;
13278            }
13279        }
13280        EntityKind::SpruceChestBoat => {
13281            for d in items {
13282                SpruceChestBoat::apply_metadata(entity, d)?;
13283            }
13284        }
13285        EntityKind::Squid => {
13286            for d in items {
13287                Squid::apply_metadata(entity, d)?;
13288            }
13289        }
13290        EntityKind::Stray => {
13291            for d in items {
13292                Stray::apply_metadata(entity, d)?;
13293            }
13294        }
13295        EntityKind::Strider => {
13296            for d in items {
13297                Strider::apply_metadata(entity, d)?;
13298            }
13299        }
13300        EntityKind::Tadpole => {
13301            for d in items {
13302                Tadpole::apply_metadata(entity, d)?;
13303            }
13304        }
13305        EntityKind::TextDisplay => {
13306            for d in items {
13307                TextDisplay::apply_metadata(entity, d)?;
13308            }
13309        }
13310        EntityKind::Tnt => {
13311            for d in items {
13312                Tnt::apply_metadata(entity, d)?;
13313            }
13314        }
13315        EntityKind::TntMinecart => {
13316            for d in items {
13317                TntMinecart::apply_metadata(entity, d)?;
13318            }
13319        }
13320        EntityKind::TraderLlama => {
13321            for d in items {
13322                TraderLlama::apply_metadata(entity, d)?;
13323            }
13324        }
13325        EntityKind::Trident => {
13326            for d in items {
13327                Trident::apply_metadata(entity, d)?;
13328            }
13329        }
13330        EntityKind::TropicalFish => {
13331            for d in items {
13332                TropicalFish::apply_metadata(entity, d)?;
13333            }
13334        }
13335        EntityKind::Turtle => {
13336            for d in items {
13337                Turtle::apply_metadata(entity, d)?;
13338            }
13339        }
13340        EntityKind::Vex => {
13341            for d in items {
13342                Vex::apply_metadata(entity, d)?;
13343            }
13344        }
13345        EntityKind::Villager => {
13346            for d in items {
13347                Villager::apply_metadata(entity, d)?;
13348            }
13349        }
13350        EntityKind::Vindicator => {
13351            for d in items {
13352                Vindicator::apply_metadata(entity, d)?;
13353            }
13354        }
13355        EntityKind::WanderingTrader => {
13356            for d in items {
13357                WanderingTrader::apply_metadata(entity, d)?;
13358            }
13359        }
13360        EntityKind::Warden => {
13361            for d in items {
13362                Warden::apply_metadata(entity, d)?;
13363            }
13364        }
13365        EntityKind::WindCharge => {
13366            for d in items {
13367                WindCharge::apply_metadata(entity, d)?;
13368            }
13369        }
13370        EntityKind::Witch => {
13371            for d in items {
13372                Witch::apply_metadata(entity, d)?;
13373            }
13374        }
13375        EntityKind::Wither => {
13376            for d in items {
13377                Wither::apply_metadata(entity, d)?;
13378            }
13379        }
13380        EntityKind::WitherSkeleton => {
13381            for d in items {
13382                WitherSkeleton::apply_metadata(entity, d)?;
13383            }
13384        }
13385        EntityKind::WitherSkull => {
13386            for d in items {
13387                WitherSkull::apply_metadata(entity, d)?;
13388            }
13389        }
13390        EntityKind::Wolf => {
13391            for d in items {
13392                Wolf::apply_metadata(entity, d)?;
13393            }
13394        }
13395        EntityKind::Zoglin => {
13396            for d in items {
13397                Zoglin::apply_metadata(entity, d)?;
13398            }
13399        }
13400        EntityKind::Zombie => {
13401            for d in items {
13402                Zombie::apply_metadata(entity, d)?;
13403            }
13404        }
13405        EntityKind::ZombieHorse => {
13406            for d in items {
13407                ZombieHorse::apply_metadata(entity, d)?;
13408            }
13409        }
13410        EntityKind::ZombieNautilus => {
13411            for d in items {
13412                ZombieNautilus::apply_metadata(entity, d)?;
13413            }
13414        }
13415        EntityKind::ZombieVillager => {
13416            for d in items {
13417                ZombieVillager::apply_metadata(entity, d)?;
13418            }
13419        }
13420        EntityKind::ZombifiedPiglin => {
13421            for d in items {
13422                ZombifiedPiglin::apply_metadata(entity, d)?;
13423            }
13424        }
13425    }
13426    Ok(())
13427}
13428
13429pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: EntityKind) {
13430    match kind {
13431        EntityKind::AcaciaBoat => {
13432            entity.insert(AcaciaBoatMetadataBundle::default());
13433        }
13434        EntityKind::AcaciaChestBoat => {
13435            entity.insert(AcaciaChestBoatMetadataBundle::default());
13436        }
13437        EntityKind::Allay => {
13438            entity.insert(AllayMetadataBundle::default());
13439        }
13440        EntityKind::AreaEffectCloud => {
13441            entity.insert(AreaEffectCloudMetadataBundle::default());
13442        }
13443        EntityKind::Armadillo => {
13444            entity.insert(ArmadilloMetadataBundle::default());
13445        }
13446        EntityKind::ArmorStand => {
13447            entity.insert(ArmorStandMetadataBundle::default());
13448        }
13449        EntityKind::Arrow => {
13450            entity.insert(ArrowMetadataBundle::default());
13451        }
13452        EntityKind::Axolotl => {
13453            entity.insert(AxolotlMetadataBundle::default());
13454        }
13455        EntityKind::BambooChestRaft => {
13456            entity.insert(BambooChestRaftMetadataBundle::default());
13457        }
13458        EntityKind::BambooRaft => {
13459            entity.insert(BambooRaftMetadataBundle::default());
13460        }
13461        EntityKind::Bat => {
13462            entity.insert(BatMetadataBundle::default());
13463        }
13464        EntityKind::Bee => {
13465            entity.insert(BeeMetadataBundle::default());
13466        }
13467        EntityKind::BirchBoat => {
13468            entity.insert(BirchBoatMetadataBundle::default());
13469        }
13470        EntityKind::BirchChestBoat => {
13471            entity.insert(BirchChestBoatMetadataBundle::default());
13472        }
13473        EntityKind::Blaze => {
13474            entity.insert(BlazeMetadataBundle::default());
13475        }
13476        EntityKind::BlockDisplay => {
13477            entity.insert(BlockDisplayMetadataBundle::default());
13478        }
13479        EntityKind::Bogged => {
13480            entity.insert(BoggedMetadataBundle::default());
13481        }
13482        EntityKind::Breeze => {
13483            entity.insert(BreezeMetadataBundle::default());
13484        }
13485        EntityKind::BreezeWindCharge => {
13486            entity.insert(BreezeWindChargeMetadataBundle::default());
13487        }
13488        EntityKind::Camel => {
13489            entity.insert(CamelMetadataBundle::default());
13490        }
13491        EntityKind::CamelHusk => {
13492            entity.insert(CamelHuskMetadataBundle::default());
13493        }
13494        EntityKind::Cat => {
13495            entity.insert(CatMetadataBundle::default());
13496        }
13497        EntityKind::CaveSpider => {
13498            entity.insert(CaveSpiderMetadataBundle::default());
13499        }
13500        EntityKind::CherryBoat => {
13501            entity.insert(CherryBoatMetadataBundle::default());
13502        }
13503        EntityKind::CherryChestBoat => {
13504            entity.insert(CherryChestBoatMetadataBundle::default());
13505        }
13506        EntityKind::ChestMinecart => {
13507            entity.insert(ChestMinecartMetadataBundle::default());
13508        }
13509        EntityKind::Chicken => {
13510            entity.insert(ChickenMetadataBundle::default());
13511        }
13512        EntityKind::Cod => {
13513            entity.insert(CodMetadataBundle::default());
13514        }
13515        EntityKind::CommandBlockMinecart => {
13516            entity.insert(CommandBlockMinecartMetadataBundle::default());
13517        }
13518        EntityKind::CopperGolem => {
13519            entity.insert(CopperGolemMetadataBundle::default());
13520        }
13521        EntityKind::Cow => {
13522            entity.insert(CowMetadataBundle::default());
13523        }
13524        EntityKind::Creaking => {
13525            entity.insert(CreakingMetadataBundle::default());
13526        }
13527        EntityKind::Creeper => {
13528            entity.insert(CreeperMetadataBundle::default());
13529        }
13530        EntityKind::DarkOakBoat => {
13531            entity.insert(DarkOakBoatMetadataBundle::default());
13532        }
13533        EntityKind::DarkOakChestBoat => {
13534            entity.insert(DarkOakChestBoatMetadataBundle::default());
13535        }
13536        EntityKind::Dolphin => {
13537            entity.insert(DolphinMetadataBundle::default());
13538        }
13539        EntityKind::Donkey => {
13540            entity.insert(DonkeyMetadataBundle::default());
13541        }
13542        EntityKind::DragonFireball => {
13543            entity.insert(DragonFireballMetadataBundle::default());
13544        }
13545        EntityKind::Drowned => {
13546            entity.insert(DrownedMetadataBundle::default());
13547        }
13548        EntityKind::Egg => {
13549            entity.insert(EggMetadataBundle::default());
13550        }
13551        EntityKind::ElderGuardian => {
13552            entity.insert(ElderGuardianMetadataBundle::default());
13553        }
13554        EntityKind::EndCrystal => {
13555            entity.insert(EndCrystalMetadataBundle::default());
13556        }
13557        EntityKind::EnderDragon => {
13558            entity.insert(EnderDragonMetadataBundle::default());
13559        }
13560        EntityKind::EnderPearl => {
13561            entity.insert(EnderPearlMetadataBundle::default());
13562        }
13563        EntityKind::Enderman => {
13564            entity.insert(EndermanMetadataBundle::default());
13565        }
13566        EntityKind::Endermite => {
13567            entity.insert(EndermiteMetadataBundle::default());
13568        }
13569        EntityKind::Evoker => {
13570            entity.insert(EvokerMetadataBundle::default());
13571        }
13572        EntityKind::EvokerFangs => {
13573            entity.insert(EvokerFangsMetadataBundle::default());
13574        }
13575        EntityKind::ExperienceBottle => {
13576            entity.insert(ExperienceBottleMetadataBundle::default());
13577        }
13578        EntityKind::ExperienceOrb => {
13579            entity.insert(ExperienceOrbMetadataBundle::default());
13580        }
13581        EntityKind::EyeOfEnder => {
13582            entity.insert(EyeOfEnderMetadataBundle::default());
13583        }
13584        EntityKind::FallingBlock => {
13585            entity.insert(FallingBlockMetadataBundle::default());
13586        }
13587        EntityKind::Fireball => {
13588            entity.insert(FireballMetadataBundle::default());
13589        }
13590        EntityKind::FireworkRocket => {
13591            entity.insert(FireworkRocketMetadataBundle::default());
13592        }
13593        EntityKind::FishingBobber => {
13594            entity.insert(FishingBobberMetadataBundle::default());
13595        }
13596        EntityKind::Fox => {
13597            entity.insert(FoxMetadataBundle::default());
13598        }
13599        EntityKind::Frog => {
13600            entity.insert(FrogMetadataBundle::default());
13601        }
13602        EntityKind::FurnaceMinecart => {
13603            entity.insert(FurnaceMinecartMetadataBundle::default());
13604        }
13605        EntityKind::Ghast => {
13606            entity.insert(GhastMetadataBundle::default());
13607        }
13608        EntityKind::Giant => {
13609            entity.insert(GiantMetadataBundle::default());
13610        }
13611        EntityKind::GlowItemFrame => {
13612            entity.insert(GlowItemFrameMetadataBundle::default());
13613        }
13614        EntityKind::GlowSquid => {
13615            entity.insert(GlowSquidMetadataBundle::default());
13616        }
13617        EntityKind::Goat => {
13618            entity.insert(GoatMetadataBundle::default());
13619        }
13620        EntityKind::Guardian => {
13621            entity.insert(GuardianMetadataBundle::default());
13622        }
13623        EntityKind::HappyGhast => {
13624            entity.insert(HappyGhastMetadataBundle::default());
13625        }
13626        EntityKind::Hoglin => {
13627            entity.insert(HoglinMetadataBundle::default());
13628        }
13629        EntityKind::HopperMinecart => {
13630            entity.insert(HopperMinecartMetadataBundle::default());
13631        }
13632        EntityKind::Horse => {
13633            entity.insert(HorseMetadataBundle::default());
13634        }
13635        EntityKind::Husk => {
13636            entity.insert(HuskMetadataBundle::default());
13637        }
13638        EntityKind::Illusioner => {
13639            entity.insert(IllusionerMetadataBundle::default());
13640        }
13641        EntityKind::Interaction => {
13642            entity.insert(InteractionMetadataBundle::default());
13643        }
13644        EntityKind::IronGolem => {
13645            entity.insert(IronGolemMetadataBundle::default());
13646        }
13647        EntityKind::Item => {
13648            entity.insert(ItemMetadataBundle::default());
13649        }
13650        EntityKind::ItemDisplay => {
13651            entity.insert(ItemDisplayMetadataBundle::default());
13652        }
13653        EntityKind::ItemFrame => {
13654            entity.insert(ItemFrameMetadataBundle::default());
13655        }
13656        EntityKind::JungleBoat => {
13657            entity.insert(JungleBoatMetadataBundle::default());
13658        }
13659        EntityKind::JungleChestBoat => {
13660            entity.insert(JungleChestBoatMetadataBundle::default());
13661        }
13662        EntityKind::LeashKnot => {
13663            entity.insert(LeashKnotMetadataBundle::default());
13664        }
13665        EntityKind::LightningBolt => {
13666            entity.insert(LightningBoltMetadataBundle::default());
13667        }
13668        EntityKind::LingeringPotion => {
13669            entity.insert(LingeringPotionMetadataBundle::default());
13670        }
13671        EntityKind::Llama => {
13672            entity.insert(LlamaMetadataBundle::default());
13673        }
13674        EntityKind::LlamaSpit => {
13675            entity.insert(LlamaSpitMetadataBundle::default());
13676        }
13677        EntityKind::MagmaCube => {
13678            entity.insert(MagmaCubeMetadataBundle::default());
13679        }
13680        EntityKind::MangroveBoat => {
13681            entity.insert(MangroveBoatMetadataBundle::default());
13682        }
13683        EntityKind::MangroveChestBoat => {
13684            entity.insert(MangroveChestBoatMetadataBundle::default());
13685        }
13686        EntityKind::Mannequin => {
13687            entity.insert(MannequinMetadataBundle::default());
13688        }
13689        EntityKind::Marker => {
13690            entity.insert(MarkerMetadataBundle::default());
13691        }
13692        EntityKind::Minecart => {
13693            entity.insert(MinecartMetadataBundle::default());
13694        }
13695        EntityKind::Mooshroom => {
13696            entity.insert(MooshroomMetadataBundle::default());
13697        }
13698        EntityKind::Mule => {
13699            entity.insert(MuleMetadataBundle::default());
13700        }
13701        EntityKind::Nautilus => {
13702            entity.insert(NautilusMetadataBundle::default());
13703        }
13704        EntityKind::OakBoat => {
13705            entity.insert(OakBoatMetadataBundle::default());
13706        }
13707        EntityKind::OakChestBoat => {
13708            entity.insert(OakChestBoatMetadataBundle::default());
13709        }
13710        EntityKind::Ocelot => {
13711            entity.insert(OcelotMetadataBundle::default());
13712        }
13713        EntityKind::OminousItemSpawner => {
13714            entity.insert(OminousItemSpawnerMetadataBundle::default());
13715        }
13716        EntityKind::Painting => {
13717            entity.insert(PaintingMetadataBundle::default());
13718        }
13719        EntityKind::PaleOakBoat => {
13720            entity.insert(PaleOakBoatMetadataBundle::default());
13721        }
13722        EntityKind::PaleOakChestBoat => {
13723            entity.insert(PaleOakChestBoatMetadataBundle::default());
13724        }
13725        EntityKind::Panda => {
13726            entity.insert(PandaMetadataBundle::default());
13727        }
13728        EntityKind::Parched => {
13729            entity.insert(ParchedMetadataBundle::default());
13730        }
13731        EntityKind::Parrot => {
13732            entity.insert(ParrotMetadataBundle::default());
13733        }
13734        EntityKind::Phantom => {
13735            entity.insert(PhantomMetadataBundle::default());
13736        }
13737        EntityKind::Pig => {
13738            entity.insert(PigMetadataBundle::default());
13739        }
13740        EntityKind::Piglin => {
13741            entity.insert(PiglinMetadataBundle::default());
13742        }
13743        EntityKind::PiglinBrute => {
13744            entity.insert(PiglinBruteMetadataBundle::default());
13745        }
13746        EntityKind::Pillager => {
13747            entity.insert(PillagerMetadataBundle::default());
13748        }
13749        EntityKind::Player => {
13750            entity.insert(PlayerMetadataBundle::default());
13751        }
13752        EntityKind::PolarBear => {
13753            entity.insert(PolarBearMetadataBundle::default());
13754        }
13755        EntityKind::Pufferfish => {
13756            entity.insert(PufferfishMetadataBundle::default());
13757        }
13758        EntityKind::Rabbit => {
13759            entity.insert(RabbitMetadataBundle::default());
13760        }
13761        EntityKind::Ravager => {
13762            entity.insert(RavagerMetadataBundle::default());
13763        }
13764        EntityKind::Salmon => {
13765            entity.insert(SalmonMetadataBundle::default());
13766        }
13767        EntityKind::Sheep => {
13768            entity.insert(SheepMetadataBundle::default());
13769        }
13770        EntityKind::Shulker => {
13771            entity.insert(ShulkerMetadataBundle::default());
13772        }
13773        EntityKind::ShulkerBullet => {
13774            entity.insert(ShulkerBulletMetadataBundle::default());
13775        }
13776        EntityKind::Silverfish => {
13777            entity.insert(SilverfishMetadataBundle::default());
13778        }
13779        EntityKind::Skeleton => {
13780            entity.insert(SkeletonMetadataBundle::default());
13781        }
13782        EntityKind::SkeletonHorse => {
13783            entity.insert(SkeletonHorseMetadataBundle::default());
13784        }
13785        EntityKind::Slime => {
13786            entity.insert(SlimeMetadataBundle::default());
13787        }
13788        EntityKind::SmallFireball => {
13789            entity.insert(SmallFireballMetadataBundle::default());
13790        }
13791        EntityKind::Sniffer => {
13792            entity.insert(SnifferMetadataBundle::default());
13793        }
13794        EntityKind::SnowGolem => {
13795            entity.insert(SnowGolemMetadataBundle::default());
13796        }
13797        EntityKind::Snowball => {
13798            entity.insert(SnowballMetadataBundle::default());
13799        }
13800        EntityKind::SpawnerMinecart => {
13801            entity.insert(SpawnerMinecartMetadataBundle::default());
13802        }
13803        EntityKind::SpectralArrow => {
13804            entity.insert(SpectralArrowMetadataBundle::default());
13805        }
13806        EntityKind::Spider => {
13807            entity.insert(SpiderMetadataBundle::default());
13808        }
13809        EntityKind::SplashPotion => {
13810            entity.insert(SplashPotionMetadataBundle::default());
13811        }
13812        EntityKind::SpruceBoat => {
13813            entity.insert(SpruceBoatMetadataBundle::default());
13814        }
13815        EntityKind::SpruceChestBoat => {
13816            entity.insert(SpruceChestBoatMetadataBundle::default());
13817        }
13818        EntityKind::Squid => {
13819            entity.insert(SquidMetadataBundle::default());
13820        }
13821        EntityKind::Stray => {
13822            entity.insert(StrayMetadataBundle::default());
13823        }
13824        EntityKind::Strider => {
13825            entity.insert(StriderMetadataBundle::default());
13826        }
13827        EntityKind::Tadpole => {
13828            entity.insert(TadpoleMetadataBundle::default());
13829        }
13830        EntityKind::TextDisplay => {
13831            entity.insert(TextDisplayMetadataBundle::default());
13832        }
13833        EntityKind::Tnt => {
13834            entity.insert(TntMetadataBundle::default());
13835        }
13836        EntityKind::TntMinecart => {
13837            entity.insert(TntMinecartMetadataBundle::default());
13838        }
13839        EntityKind::TraderLlama => {
13840            entity.insert(TraderLlamaMetadataBundle::default());
13841        }
13842        EntityKind::Trident => {
13843            entity.insert(TridentMetadataBundle::default());
13844        }
13845        EntityKind::TropicalFish => {
13846            entity.insert(TropicalFishMetadataBundle::default());
13847        }
13848        EntityKind::Turtle => {
13849            entity.insert(TurtleMetadataBundle::default());
13850        }
13851        EntityKind::Vex => {
13852            entity.insert(VexMetadataBundle::default());
13853        }
13854        EntityKind::Villager => {
13855            entity.insert(VillagerMetadataBundle::default());
13856        }
13857        EntityKind::Vindicator => {
13858            entity.insert(VindicatorMetadataBundle::default());
13859        }
13860        EntityKind::WanderingTrader => {
13861            entity.insert(WanderingTraderMetadataBundle::default());
13862        }
13863        EntityKind::Warden => {
13864            entity.insert(WardenMetadataBundle::default());
13865        }
13866        EntityKind::WindCharge => {
13867            entity.insert(WindChargeMetadataBundle::default());
13868        }
13869        EntityKind::Witch => {
13870            entity.insert(WitchMetadataBundle::default());
13871        }
13872        EntityKind::Wither => {
13873            entity.insert(WitherMetadataBundle::default());
13874        }
13875        EntityKind::WitherSkeleton => {
13876            entity.insert(WitherSkeletonMetadataBundle::default());
13877        }
13878        EntityKind::WitherSkull => {
13879            entity.insert(WitherSkullMetadataBundle::default());
13880        }
13881        EntityKind::Wolf => {
13882            entity.insert(WolfMetadataBundle::default());
13883        }
13884        EntityKind::Zoglin => {
13885            entity.insert(ZoglinMetadataBundle::default());
13886        }
13887        EntityKind::Zombie => {
13888            entity.insert(ZombieMetadataBundle::default());
13889        }
13890        EntityKind::ZombieHorse => {
13891            entity.insert(ZombieHorseMetadataBundle::default());
13892        }
13893        EntityKind::ZombieNautilus => {
13894            entity.insert(ZombieNautilusMetadataBundle::default());
13895        }
13896        EntityKind::ZombieVillager => {
13897            entity.insert(ZombieVillagerMetadataBundle::default());
13898        }
13899        EntityKind::ZombifiedPiglin => {
13900            entity.insert(ZombifiedPiglinMetadataBundle::default());
13901        }
13902    }
13903}