Skip to main content

azalea_entity/
metadata.rs

1// This file is @generated from codegen/lib/code/entity.py.
2// Don't change it manually!
3
4//! Metadata fields stored on entities.
5//!
6//! Also see the [protocol wiki documentation](https://minecraft.wiki/w/Java_Edition_protocol/Entity_metadata).
7//!
8//! # Entities
9//!
10//! Azalea creates a marker ECS component for every entity and abstract entity.
11//! You can use these to check if an entity is of a given type with an ECS
12//! filter, such as `With<AbstractMonster>`.
13//!
14//! All marker components are shown as a tree structure below:
15//!
16//! - [AbstractEntity]
17//!   - [AreaEffectCloud]
18//!   - [BreezeWindCharge]
19//!   - [Cushion]
20//!   - [DragonFireball]
21//!   - [EndCrystal]
22//!   - [EvokerFangs]
23//!   - [ExperienceOrb]
24//!   - [EyeOfEnder]
25//!   - [FallingBlock]
26//!   - [Fireball]
27//!   - [FireworkRocket]
28//!   - [FishingBobber]
29//!   - [Interaction]
30//!   - [Item]
31//!   - [ItemFrame]
32//!     - [GlowItemFrame]
33//!   - [LeashKnot]
34//!   - [LightningBolt]
35//!   - [LlamaSpit]
36//!   - [Marker]
37//!   - [OminousItemSpawner]
38//!   - [Painting]
39//!   - [ShulkerBullet]
40//!   - [SmallFireball]
41//!   - [Tnt]
42//!   - [WindCharge]
43//!   - [WitherSkull]
44//!   - [AbstractArrow]
45//!     - [Arrow]
46//!     - [SpectralArrow]
47//!     - [Trident]
48//!   - [AbstractDisplay]
49//!     - [BlockDisplay]
50//!     - [ItemDisplay]
51//!     - [TextDisplay]
52//!   - [AbstractLiving]
53//!     - [ArmorStand]
54//!     - [AbstractAvatar]
55//!       - [Mannequin]
56//!       - [Player]
57//!     - [AbstractInsentient]
58//!       - [Bat]
59//!       - [EnderDragon]
60//!       - [Ghast]
61//!       - [Phantom]
62//!       - [AbstractCreature]
63//!         - [Allay]
64//!         - [CopperGolem]
65//!         - [IronGolem]
66//!         - [Pufferfish]
67//!         - [Shulker]
68//!         - [SnowGolem]
69//!         - [Tadpole]
70//!         - [AbstractAgeable]
71//!           - [Dolphin]
72//!           - [Squid]
73//!             - [GlowSquid]
74//!           - [AbstractAnimal]
75//!             - [Armadillo]
76//!             - [Axolotl]
77//!             - [Bee]
78//!             - [Chicken]
79//!             - [Cow]
80//!             - [Fox]
81//!             - [Frog]
82//!             - [Goat]
83//!             - [HappyGhast]
84//!             - [Hoglin]
85//!             - [Mooshroom]
86//!             - [Ocelot]
87//!             - [Panda]
88//!             - [Pig]
89//!             - [PolarBear]
90//!             - [Rabbit]
91//!             - [Sheep]
92//!             - [Sniffer]
93//!             - [Strider]
94//!             - [Turtle]
95//!             - [AbstractHorse]
96//!               - [Camel]
97//!                 - [CamelHusk]
98//!               - [Horse]
99//!               - [SkeletonHorse]
100//!               - [ZombieHorse]
101//!               - [AbstractChestedHorse]
102//!                 - [Donkey]
103//!                 - [Llama]
104//!                   - [TraderLlama]
105//!                 - [Mule]
106//!             - [AbstractTameable]
107//!               - [Cat]
108//!               - [Parrot]
109//!               - [Wolf]
110//!               - [AbstractNautilus]
111//!                 - [Nautilus]
112//!                 - [ZombieNautilus]
113//!           - [AbstractCubeMob]
114//!             - [MagmaCube]
115//!             - [Slime]
116//!             - [SulfurCube]
117//!           - [AbstractVillager]
118//!             - [Villager]
119//!             - [WanderingTrader]
120//!         - [AbstractFish]
121//!           - [Cod]
122//!           - [Salmon]
123//!           - [TropicalFish]
124//!         - [AbstractMonster]
125//!           - [Blaze]
126//!           - [Bogged]
127//!           - [Breeze]
128//!           - [Creaking]
129//!           - [Creeper]
130//!           - [Enderman]
131//!           - [Endermite]
132//!           - [Giant]
133//!           - [Guardian]
134//!             - [ElderGuardian]
135//!           - [Parched]
136//!           - [Silverfish]
137//!           - [Skeleton]
138//!           - [Spider]
139//!             - [CaveSpider]
140//!           - [Stray]
141//!           - [Vex]
142//!           - [Warden]
143//!           - [Wither]
144//!           - [WitherSkeleton]
145//!           - [Zoglin]
146//!           - [Zombie]
147//!             - [Drowned]
148//!             - [Husk]
149//!             - [ZombieVillager]
150//!             - [ZombifiedPiglin]
151//!           - [AbstractPiglin]
152//!             - [Piglin]
153//!             - [PiglinBrute]
154//!           - [AbstractRaider]
155//!             - [Pillager]
156//!             - [Ravager]
157//!             - [Vindicator]
158//!             - [Witch]
159//!             - [AbstractSpellcasterIllager]
160//!               - [Evoker]
161//!               - [Illusioner]
162//!   - [AbstractThrownItemProjectile]
163//!     - [Egg]
164//!     - [EnderPearl]
165//!     - [ExperienceBottle]
166//!     - [LingeringPotion]
167//!     - [Snowball]
168//!     - [SplashPotion]
169//!   - [AbstractVehicle]
170//!     - [AbstractBoat]
171//!       - [AcaciaBoat]
172//!       - [AcaciaChestBoat]
173//!       - [BambooChestRaft]
174//!       - [BambooRaft]
175//!       - [BirchBoat]
176//!       - [BirchChestBoat]
177//!       - [CherryBoat]
178//!       - [CherryChestBoat]
179//!       - [DarkOakBoat]
180//!       - [DarkOakChestBoat]
181//!       - [JungleBoat]
182//!       - [JungleChestBoat]
183//!       - [MangroveBoat]
184//!       - [MangroveChestBoat]
185//!       - [OakBoat]
186//!       - [OakChestBoat]
187//!       - [PaleOakBoat]
188//!       - [PaleOakChestBoat]
189//!       - [PoplarBoat]
190//!       - [PoplarChestBoat]
191//!       - [SpruceBoat]
192//!       - [SpruceChestBoat]
193//!     - [AbstractMinecart]
194//!       - [ChestMinecart]
195//!       - [CommandBlockMinecart]
196//!       - [FurnaceMinecart]
197//!       - [HopperMinecart]
198//!       - [Minecart]
199//!       - [SpawnerMinecart]
200//!       - [TntMinecart]
201
202#![allow(clippy::single_match, non_snake_case)]
203
204use azalea_chat::FormattedText;
205use azalea_core::{
206    direction::Direction,
207    position::{BlockPos, Vec3f32},
208};
209use azalea_registry::{
210    builtin::EntityKind,
211    item::{
212        ItemStack,
213        components::{self, DyeColor},
214    },
215};
216use bevy_ecs::{bundle::Bundle, component::Component};
217use derive_more::{Deref, DerefMut};
218use thiserror::Error;
219use uuid::Uuid;
220
221use super::{
222    ArmadilloStateKind, CopperGolemStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt,
223    Pose, Quaternion, Rotations, SnifferStateKind, VillagerData, WeatheringCopperStateKind,
224};
225use crate::{EntityParticle, HumanoidArm};
226
227#[derive(Error, Debug)]
228pub enum UpdateMetadataError {
229    #[error("Wrong type ({0:?})")]
230    WrongType(Box<WrongTypeError>),
231}
232#[derive(Debug)]
233pub struct WrongTypeError {
234    pub v: EntityDataValue,
235    pub id: u8,
236    pub struct_name: String,
237}
238fn e(v: EntityDataValue, id: u8, struct_name: &str) -> UpdateMetadataError {
239    UpdateMetadataError::WrongType(Box::new(WrongTypeError {
240        v,
241        id,
242        struct_name: struct_name.to_owned(),
243    }))
244}
245
246#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
247/// A metadata field for [AbstractEntity].
248pub struct OnFire(pub bool);
249#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
250/// A metadata field for [AbstractEntity].
251pub struct AbstractEntityShiftKeyDown(pub bool);
252#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
253/// A metadata field for [AbstractEntity].
254pub struct Sprinting(pub bool);
255#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
256/// A metadata field for [AbstractEntity].
257pub struct Swimming(pub bool);
258#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
259/// A metadata field for [AbstractEntity].
260pub struct CurrentlyGlowing(pub bool);
261#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
262/// A metadata field for [AbstractEntity].
263pub struct Invisible(pub bool);
264#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
265/// A metadata field for [AbstractEntity].
266pub struct FallFlying(pub bool);
267/// A metadata field for [AbstractEntity].
268#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
269pub struct AirSupply(pub i32);
270/// A metadata field for [AbstractEntity].
271#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
272pub struct CustomName(pub Option<Box<FormattedText>>);
273/// A metadata field for [AbstractEntity].
274#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
275pub struct CustomNameVisible(pub bool);
276/// A metadata field for [AbstractEntity].
277#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
278pub struct Silent(pub bool);
279/// A metadata field for [AbstractEntity].
280#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
281pub struct NoGravity(pub bool);
282/// A metadata field for [AbstractEntity].
283#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
284pub struct TicksFrozen(pub i32);
285/// The root entity marker component.
286///
287/// All entities that have had their metadata sent by the server will have this
288/// component.
289///
290/// # Metadata
291///
292/// These are the metadata components that all `AbstractEntity` entities are
293/// guaranteed to have, in addition to the metadata components from parent
294/// types:
295///
296/// - [OnFire]
297/// - [AbstractEntityShiftKeyDown]
298/// - [Sprinting]
299/// - [Swimming]
300/// - [CurrentlyGlowing]
301/// - [Invisible]
302/// - [FallFlying]
303/// - [AirSupply]
304/// - [CustomName]
305/// - [CustomNameVisible]
306/// - [Silent]
307/// - [NoGravity]
308/// - [TicksFrozen]
309///
310/// # Children
311///
312/// - [AreaEffectCloud]
313/// - [BreezeWindCharge]
314/// - [Cushion]
315/// - [DragonFireball]
316/// - [EndCrystal]
317/// - [EvokerFangs]
318/// - [ExperienceOrb]
319/// - [EyeOfEnder]
320/// - [FallingBlock]
321/// - [Fireball]
322/// - [FireworkRocket]
323/// - [FishingBobber]
324/// - [Interaction]
325/// - [Item]
326/// - [ItemFrame]
327///   - [GlowItemFrame]
328/// - [LeashKnot]
329/// - [LightningBolt]
330/// - [LlamaSpit]
331/// - [Marker]
332/// - [OminousItemSpawner]
333/// - [Painting]
334/// - [ShulkerBullet]
335/// - [SmallFireball]
336/// - [Tnt]
337/// - [WindCharge]
338/// - [WitherSkull]
339/// - [AbstractArrow]
340///   - [Arrow]
341///   - [SpectralArrow]
342///   - [Trident]
343/// - [AbstractDisplay]
344///   - [BlockDisplay]
345///   - [ItemDisplay]
346///   - [TextDisplay]
347/// - [AbstractLiving]
348///   - [ArmorStand]
349///   - [AbstractAvatar]
350///     - [Mannequin]
351///     - [Player]
352///   - [AbstractInsentient]
353///     - [Bat]
354///     - [EnderDragon]
355///     - [Ghast]
356///     - [Phantom]
357///     - [AbstractCreature]
358///       - [Allay]
359///       - [CopperGolem]
360///       - [IronGolem]
361///       - [Pufferfish]
362///       - [Shulker]
363///       - [SnowGolem]
364///       - [Tadpole]
365///       - [AbstractAgeable]
366///         - [Dolphin]
367///         - [Squid]
368///           - [GlowSquid]
369///         - [AbstractAnimal]
370///           - [Armadillo]
371///           - [Axolotl]
372///           - [Bee]
373///           - [Chicken]
374///           - [Cow]
375///           - [Fox]
376///           - [Frog]
377///           - [Goat]
378///           - [HappyGhast]
379///           - [Hoglin]
380///           - [Mooshroom]
381///           - [Ocelot]
382///           - [Panda]
383///           - [Pig]
384///           - [PolarBear]
385///           - [Rabbit]
386///           - [Sheep]
387///           - [Sniffer]
388///           - [Strider]
389///           - [Turtle]
390///           - [AbstractHorse]
391///             - [Camel]
392///               - [CamelHusk]
393///             - [Horse]
394///             - [SkeletonHorse]
395///             - [ZombieHorse]
396///             - [AbstractChestedHorse]
397///               - [Donkey]
398///               - [Llama]
399///                 - [TraderLlama]
400///               - [Mule]
401///           - [AbstractTameable]
402///             - [Cat]
403///             - [Parrot]
404///             - [Wolf]
405///             - [AbstractNautilus]
406///               - [Nautilus]
407///               - [ZombieNautilus]
408///         - [AbstractCubeMob]
409///           - [MagmaCube]
410///           - [Slime]
411///           - [SulfurCube]
412///         - [AbstractVillager]
413///           - [Villager]
414///           - [WanderingTrader]
415///       - [AbstractFish]
416///         - [Cod]
417///         - [Salmon]
418///         - [TropicalFish]
419///       - [AbstractMonster]
420///         - [Blaze]
421///         - [Bogged]
422///         - [Breeze]
423///         - [Creaking]
424///         - [Creeper]
425///         - [Enderman]
426///         - [Endermite]
427///         - [Giant]
428///         - [Guardian]
429///           - [ElderGuardian]
430///         - [Parched]
431///         - [Silverfish]
432///         - [Skeleton]
433///         - [Spider]
434///           - [CaveSpider]
435///         - [Stray]
436///         - [Vex]
437///         - [Warden]
438///         - [Wither]
439///         - [WitherSkeleton]
440///         - [Zoglin]
441///         - [Zombie]
442///           - [Drowned]
443///           - [Husk]
444///           - [ZombieVillager]
445///           - [ZombifiedPiglin]
446///         - [AbstractPiglin]
447///           - [Piglin]
448///           - [PiglinBrute]
449///         - [AbstractRaider]
450///           - [Pillager]
451///           - [Ravager]
452///           - [Vindicator]
453///           - [Witch]
454///           - [AbstractSpellcasterIllager]
455///             - [Evoker]
456///             - [Illusioner]
457/// - [AbstractThrownItemProjectile]
458///   - [Egg]
459///   - [EnderPearl]
460///   - [ExperienceBottle]
461///   - [LingeringPotion]
462///   - [Snowball]
463///   - [SplashPotion]
464/// - [AbstractVehicle]
465///   - [AbstractBoat]
466///     - [AcaciaBoat]
467///     - [AcaciaChestBoat]
468///     - [BambooChestRaft]
469///     - [BambooRaft]
470///     - [BirchBoat]
471///     - [BirchChestBoat]
472///     - [CherryBoat]
473///     - [CherryChestBoat]
474///     - [DarkOakBoat]
475///     - [DarkOakChestBoat]
476///     - [JungleBoat]
477///     - [JungleChestBoat]
478///     - [MangroveBoat]
479///     - [MangroveChestBoat]
480///     - [OakBoat]
481///     - [OakChestBoat]
482///     - [PaleOakBoat]
483///     - [PaleOakChestBoat]
484///     - [PoplarBoat]
485///     - [PoplarChestBoat]
486///     - [SpruceBoat]
487///     - [SpruceChestBoat]
488///   - [AbstractMinecart]
489///     - [ChestMinecart]
490///     - [CommandBlockMinecart]
491///     - [FurnaceMinecart]
492///     - [HopperMinecart]
493///     - [Minecart]
494///     - [SpawnerMinecart]
495///     - [TntMinecart]
496#[derive(Component)]
497pub struct AbstractEntity;
498impl AbstractEntity {
499    fn apply_metadata(
500        entity: &mut bevy_ecs::system::EntityCommands,
501        d: EntityDataItem,
502    ) -> Result<(), UpdateMetadataError> {
503        match d.index {
504            0 => {
505                let bitfield = d
506                    .value
507                    .into_byte()
508                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
509                entity.insert(OnFire(bitfield & 0x1 != 0));
510                entity.insert(AbstractEntityShiftKeyDown(bitfield & 0x2 != 0));
511                entity.insert(Sprinting(bitfield & 0x8 != 0));
512                entity.insert(Swimming(bitfield & 0x10 != 0));
513                entity.insert(CurrentlyGlowing(bitfield & 0x40 != 0));
514                entity.insert(Invisible(bitfield & 0x20 != 0));
515                entity.insert(FallFlying(bitfield & 0x80 != 0));
516            }
517            1 => {
518                entity.insert(AirSupply(
519                    d.value.into_int().map_err(|v| e(v, d.index, "AirSupply"))?,
520                ));
521            }
522            2 => {
523                entity.insert(CustomName(
524                    d.value
525                        .into_optional_formatted_text()
526                        .map_err(|v| e(v, d.index, "CustomName"))?,
527                ));
528            }
529            3 => {
530                entity.insert(CustomNameVisible(
531                    d.value
532                        .into_boolean()
533                        .map_err(|v| e(v, d.index, "CustomNameVisible"))?,
534                ));
535            }
536            4 => {
537                entity.insert(Silent(
538                    d.value
539                        .into_boolean()
540                        .map_err(|v| e(v, d.index, "Silent"))?,
541                ));
542            }
543            5 => {
544                entity.insert(NoGravity(
545                    d.value
546                        .into_boolean()
547                        .map_err(|v| e(v, d.index, "NoGravity"))?,
548                ));
549            }
550            6 => {
551                entity.insert(d.value.into_pose().map_err(|v| e(v, d.index, ""))?);
552            }
553            7 => {
554                entity.insert(TicksFrozen(
555                    d.value
556                        .into_int()
557                        .map_err(|v| e(v, d.index, "TicksFrozen"))?,
558                ));
559            }
560            _ => {}
561        }
562        Ok(())
563    }
564}
565
566/// The metadata bundle for [AbstractEntity].
567///
568/// This type should generally not be used directly.
569#[derive(Bundle)]
570pub struct AbstractEntityMetadataBundle {
571    _marker: AbstractEntity,
572    on_fire: OnFire,
573    abstract_entity_shift_key_down: AbstractEntityShiftKeyDown,
574    sprinting: Sprinting,
575    swimming: Swimming,
576    currently_glowing: CurrentlyGlowing,
577    invisible: Invisible,
578    fall_flying: FallFlying,
579    air_supply: AirSupply,
580    custom_name: CustomName,
581    custom_name_visible: CustomNameVisible,
582    silent: Silent,
583    no_gravity: NoGravity,
584    pose: Pose,
585    ticks_frozen: TicksFrozen,
586}
587impl Default for AbstractEntityMetadataBundle {
588    fn default() -> Self {
589        Self {
590            _marker: AbstractEntity,
591            on_fire: OnFire(false),
592            abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
593            sprinting: Sprinting(false),
594            swimming: Swimming(false),
595            currently_glowing: CurrentlyGlowing(false),
596            invisible: Invisible(false),
597            fall_flying: FallFlying(false),
598            air_supply: AirSupply(300),
599            custom_name: CustomName(None),
600            custom_name_visible: CustomNameVisible(false),
601            silent: Silent(false),
602            no_gravity: NoGravity(false),
603            pose: Pose::default(),
604            ticks_frozen: TicksFrozen(0),
605        }
606    }
607}
608
609/// A metadata field for [AreaEffectCloud].
610#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
611pub struct Radius(pub f32);
612/// A metadata field for [AreaEffectCloud].
613#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
614pub struct Waiting(pub bool);
615/// A metadata field for [AreaEffectCloud].
616#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
617pub struct Particle(pub EntityParticle);
618/// The marker component for entities of type `minecraft:area_effect_cloud`.
619///
620/// # Metadata
621///
622/// These are the metadata components that all `AreaEffectCloud` entities are
623/// guaranteed to have, in addition to the metadata components from parent
624/// types:
625///
626/// - [Radius]
627/// - [Waiting]
628/// - [Particle]
629///
630/// # Parents
631///
632/// Entities with `AreaEffectCloud` will also have the following marker
633/// components and their metadata fields:
634///
635/// - [AbstractEntity]
636///
637/// # Children
638///
639/// This entity type has no children types.
640#[derive(Component)]
641pub struct AreaEffectCloud;
642impl AreaEffectCloud {
643    fn apply_metadata(
644        entity: &mut bevy_ecs::system::EntityCommands,
645        d: EntityDataItem,
646    ) -> Result<(), UpdateMetadataError> {
647        match d.index {
648            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
649            8 => {
650                entity.insert(Radius(
651                    d.value.into_float().map_err(|v| e(v, d.index, "Radius"))?,
652                ));
653            }
654            9 => {
655                entity.insert(Waiting(
656                    d.value
657                        .into_boolean()
658                        .map_err(|v| e(v, d.index, "Waiting"))?,
659                ));
660            }
661            10 => {
662                entity.insert(Particle(
663                    d.value
664                        .into_particle()
665                        .map_err(|v| e(v, d.index, "Particle"))?,
666                ));
667            }
668            _ => {}
669        }
670        Ok(())
671    }
672}
673
674/// The metadata bundle for [AreaEffectCloud].
675///
676/// This type should generally not be used directly.
677#[derive(Bundle)]
678pub struct AreaEffectCloudMetadataBundle {
679    _marker: AreaEffectCloud,
680    parent: AbstractEntityMetadataBundle,
681    radius: Radius,
682    waiting: Waiting,
683    particle: Particle,
684}
685impl Default for AreaEffectCloudMetadataBundle {
686    fn default() -> Self {
687        Self {
688            _marker: AreaEffectCloud,
689            parent: Default::default(),
690            radius: Radius(3.0),
691            waiting: Waiting(false),
692            particle: Particle(Default::default()),
693        }
694    }
695}
696
697/// The marker component for entities of type `minecraft:breeze_wind_charge`.
698///
699/// # Metadata
700///
701/// This entity type does not add any additional metadata. It will still have
702/// metadata from parent types.
703///
704/// # Parents
705///
706/// Entities with `BreezeWindCharge` will also have the following marker
707/// components and their metadata fields:
708///
709/// - [AbstractEntity]
710///
711/// # Children
712///
713/// This entity type has no children types.
714#[derive(Component)]
715pub struct BreezeWindCharge;
716impl BreezeWindCharge {
717    fn apply_metadata(
718        entity: &mut bevy_ecs::system::EntityCommands,
719        d: EntityDataItem,
720    ) -> Result<(), UpdateMetadataError> {
721        match d.index {
722            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
723            _ => {}
724        }
725        Ok(())
726    }
727}
728
729/// The metadata bundle for [BreezeWindCharge].
730///
731/// This type should generally not be used directly.
732#[derive(Bundle)]
733pub struct BreezeWindChargeMetadataBundle {
734    _marker: BreezeWindCharge,
735    parent: AbstractEntityMetadataBundle,
736}
737impl Default for BreezeWindChargeMetadataBundle {
738    fn default() -> Self {
739        Self {
740            _marker: BreezeWindCharge,
741            parent: Default::default(),
742        }
743    }
744}
745
746/// A metadata field for [Cushion].
747#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
748pub struct CushionColor(pub DyeColor);
749/// The marker component for entities of type `minecraft:cushion`.
750///
751/// # Metadata
752///
753/// These are the metadata components that all `Cushion` entities are guaranteed
754/// to have, in addition to the metadata components from parent types:
755///
756/// - [CushionColor]
757///
758/// # Parents
759///
760/// Entities with `Cushion` will also have the following marker components and
761/// their metadata fields:
762///
763/// - [AbstractEntity]
764///
765/// # Children
766///
767/// This entity type has no children types.
768#[derive(Component)]
769pub struct Cushion;
770impl Cushion {
771    fn apply_metadata(
772        entity: &mut bevy_ecs::system::EntityCommands,
773        d: EntityDataItem,
774    ) -> Result<(), UpdateMetadataError> {
775        match d.index {
776            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
777            8 => {
778                entity.insert(CushionColor(
779                    d.value
780                        .into_dye_color()
781                        .map_err(|v| e(v, d.index, "CushionColor"))?,
782                ));
783            }
784            _ => {}
785        }
786        Ok(())
787    }
788}
789
790/// The metadata bundle for [Cushion].
791///
792/// This type should generally not be used directly.
793#[derive(Bundle)]
794pub struct CushionMetadataBundle {
795    _marker: Cushion,
796    parent: AbstractEntityMetadataBundle,
797    cushion_color: CushionColor,
798}
799impl Default for CushionMetadataBundle {
800    fn default() -> Self {
801        Self {
802            _marker: Cushion,
803            parent: Default::default(),
804            cushion_color: CushionColor(Default::default()),
805        }
806    }
807}
808
809/// The marker component for entities of type `minecraft:dragon_fireball`.
810///
811/// # Metadata
812///
813/// This entity type does not add any additional metadata. It will still have
814/// metadata from parent types.
815///
816/// # Parents
817///
818/// Entities with `DragonFireball` will also have the following marker
819/// components and their metadata fields:
820///
821/// - [AbstractEntity]
822///
823/// # Children
824///
825/// This entity type has no children types.
826#[derive(Component)]
827pub struct DragonFireball;
828impl DragonFireball {
829    fn apply_metadata(
830        entity: &mut bevy_ecs::system::EntityCommands,
831        d: EntityDataItem,
832    ) -> Result<(), UpdateMetadataError> {
833        match d.index {
834            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
835            _ => {}
836        }
837        Ok(())
838    }
839}
840
841/// The metadata bundle for [DragonFireball].
842///
843/// This type should generally not be used directly.
844#[derive(Bundle)]
845pub struct DragonFireballMetadataBundle {
846    _marker: DragonFireball,
847    parent: AbstractEntityMetadataBundle,
848}
849impl Default for DragonFireballMetadataBundle {
850    fn default() -> Self {
851        Self {
852            _marker: DragonFireball,
853            parent: Default::default(),
854        }
855    }
856}
857
858/// A metadata field for [EndCrystal].
859#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
860pub struct BeamTarget(pub Option<BlockPos>);
861/// A metadata field for [EndCrystal].
862#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
863pub struct ShowBottom(pub bool);
864/// The marker component for entities of type `minecraft:end_crystal`.
865///
866/// # Metadata
867///
868/// These are the metadata components that all `EndCrystal` entities are
869/// guaranteed to have, in addition to the metadata components from parent
870/// types:
871///
872/// - [BeamTarget]
873/// - [ShowBottom]
874///
875/// # Parents
876///
877/// Entities with `EndCrystal` will also have the following marker components
878/// and their metadata fields:
879///
880/// - [AbstractEntity]
881///
882/// # Children
883///
884/// This entity type has no children types.
885#[derive(Component)]
886pub struct EndCrystal;
887impl EndCrystal {
888    fn apply_metadata(
889        entity: &mut bevy_ecs::system::EntityCommands,
890        d: EntityDataItem,
891    ) -> Result<(), UpdateMetadataError> {
892        match d.index {
893            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
894            8 => {
895                entity.insert(BeamTarget(
896                    d.value
897                        .into_optional_block_pos()
898                        .map_err(|v| e(v, d.index, "BeamTarget"))?,
899                ));
900            }
901            9 => {
902                entity.insert(ShowBottom(
903                    d.value
904                        .into_boolean()
905                        .map_err(|v| e(v, d.index, "ShowBottom"))?,
906                ));
907            }
908            _ => {}
909        }
910        Ok(())
911    }
912}
913
914/// The metadata bundle for [EndCrystal].
915///
916/// This type should generally not be used directly.
917#[derive(Bundle)]
918pub struct EndCrystalMetadataBundle {
919    _marker: EndCrystal,
920    parent: AbstractEntityMetadataBundle,
921    beam_target: BeamTarget,
922    show_bottom: ShowBottom,
923}
924impl Default for EndCrystalMetadataBundle {
925    fn default() -> Self {
926        Self {
927            _marker: EndCrystal,
928            parent: Default::default(),
929            beam_target: BeamTarget(None),
930            show_bottom: ShowBottom(true),
931        }
932    }
933}
934
935/// The marker component for entities of type `minecraft:evoker_fangs`.
936///
937/// # Metadata
938///
939/// This entity type does not add any additional metadata. It will still have
940/// metadata from parent types.
941///
942/// # Parents
943///
944/// Entities with `EvokerFangs` will also have the following marker components
945/// and their metadata fields:
946///
947/// - [AbstractEntity]
948///
949/// # Children
950///
951/// This entity type has no children types.
952#[derive(Component)]
953pub struct EvokerFangs;
954impl EvokerFangs {
955    fn apply_metadata(
956        entity: &mut bevy_ecs::system::EntityCommands,
957        d: EntityDataItem,
958    ) -> Result<(), UpdateMetadataError> {
959        match d.index {
960            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
961            _ => {}
962        }
963        Ok(())
964    }
965}
966
967/// The metadata bundle for [EvokerFangs].
968///
969/// This type should generally not be used directly.
970#[derive(Bundle)]
971pub struct EvokerFangsMetadataBundle {
972    _marker: EvokerFangs,
973    parent: AbstractEntityMetadataBundle,
974}
975impl Default for EvokerFangsMetadataBundle {
976    fn default() -> Self {
977        Self {
978            _marker: EvokerFangs,
979            parent: Default::default(),
980        }
981    }
982}
983
984/// A metadata field for [ExperienceOrb].
985#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
986pub struct Value(pub i32);
987/// The marker component for entities of type `minecraft:experience_orb`.
988///
989/// # Metadata
990///
991/// These are the metadata components that all `ExperienceOrb` entities are
992/// guaranteed to have, in addition to the metadata components from parent
993/// types:
994///
995/// - [Value]
996///
997/// # Parents
998///
999/// Entities with `ExperienceOrb` will also have the following marker components
1000/// and their metadata fields:
1001///
1002/// - [AbstractEntity]
1003///
1004/// # Children
1005///
1006/// This entity type has no children types.
1007#[derive(Component)]
1008pub struct ExperienceOrb;
1009impl ExperienceOrb {
1010    fn apply_metadata(
1011        entity: &mut bevy_ecs::system::EntityCommands,
1012        d: EntityDataItem,
1013    ) -> Result<(), UpdateMetadataError> {
1014        match d.index {
1015            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1016            8 => {
1017                entity.insert(Value(
1018                    d.value.into_int().map_err(|v| e(v, d.index, "Value"))?,
1019                ));
1020            }
1021            _ => {}
1022        }
1023        Ok(())
1024    }
1025}
1026
1027/// The metadata bundle for [ExperienceOrb].
1028///
1029/// This type should generally not be used directly.
1030#[derive(Bundle)]
1031pub struct ExperienceOrbMetadataBundle {
1032    _marker: ExperienceOrb,
1033    parent: AbstractEntityMetadataBundle,
1034    value: Value,
1035}
1036impl Default for ExperienceOrbMetadataBundle {
1037    fn default() -> Self {
1038        Self {
1039            _marker: ExperienceOrb,
1040            parent: Default::default(),
1041            value: Value(0),
1042        }
1043    }
1044}
1045
1046/// A metadata field for [EyeOfEnder].
1047#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1048pub struct EyeOfEnderItemStack(pub ItemStack);
1049/// The marker component for entities of type `minecraft:eye_of_ender`.
1050///
1051/// # Metadata
1052///
1053/// These are the metadata components that all `EyeOfEnder` entities are
1054/// guaranteed to have, in addition to the metadata components from parent
1055/// types:
1056///
1057/// - [EyeOfEnderItemStack]
1058///
1059/// # Parents
1060///
1061/// Entities with `EyeOfEnder` will also have the following marker components
1062/// and their metadata fields:
1063///
1064/// - [AbstractEntity]
1065///
1066/// # Children
1067///
1068/// This entity type has no children types.
1069#[derive(Component)]
1070pub struct EyeOfEnder;
1071impl EyeOfEnder {
1072    fn apply_metadata(
1073        entity: &mut bevy_ecs::system::EntityCommands,
1074        d: EntityDataItem,
1075    ) -> Result<(), UpdateMetadataError> {
1076        match d.index {
1077            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1078            8 => {
1079                entity.insert(EyeOfEnderItemStack(
1080                    d.value
1081                        .into_item_stack()
1082                        .map_err(|v| e(v, d.index, "EyeOfEnderItemStack"))?,
1083                ));
1084            }
1085            _ => {}
1086        }
1087        Ok(())
1088    }
1089}
1090
1091/// The metadata bundle for [EyeOfEnder].
1092///
1093/// This type should generally not be used directly.
1094#[derive(Bundle)]
1095pub struct EyeOfEnderMetadataBundle {
1096    _marker: EyeOfEnder,
1097    parent: AbstractEntityMetadataBundle,
1098    eye_of_ender_item_stack: EyeOfEnderItemStack,
1099}
1100impl Default for EyeOfEnderMetadataBundle {
1101    fn default() -> Self {
1102        Self {
1103            _marker: EyeOfEnder,
1104            parent: Default::default(),
1105            eye_of_ender_item_stack: EyeOfEnderItemStack(Default::default()),
1106        }
1107    }
1108}
1109
1110/// A metadata field for [FallingBlock].
1111#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1112pub struct StartPos(pub BlockPos);
1113/// The marker component for entities of type `minecraft:falling_block`.
1114///
1115/// # Metadata
1116///
1117/// These are the metadata components that all `FallingBlock` entities are
1118/// guaranteed to have, in addition to the metadata components from parent
1119/// types:
1120///
1121/// - [StartPos]
1122///
1123/// # Parents
1124///
1125/// Entities with `FallingBlock` will also have the following marker components
1126/// and their metadata fields:
1127///
1128/// - [AbstractEntity]
1129///
1130/// # Children
1131///
1132/// This entity type has no children types.
1133#[derive(Component)]
1134pub struct FallingBlock;
1135impl FallingBlock {
1136    fn apply_metadata(
1137        entity: &mut bevy_ecs::system::EntityCommands,
1138        d: EntityDataItem,
1139    ) -> Result<(), UpdateMetadataError> {
1140        match d.index {
1141            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1142            8 => {
1143                entity.insert(StartPos(
1144                    d.value
1145                        .into_block_pos()
1146                        .map_err(|v| e(v, d.index, "StartPos"))?,
1147                ));
1148            }
1149            _ => {}
1150        }
1151        Ok(())
1152    }
1153}
1154
1155/// The metadata bundle for [FallingBlock].
1156///
1157/// This type should generally not be used directly.
1158#[derive(Bundle)]
1159pub struct FallingBlockMetadataBundle {
1160    _marker: FallingBlock,
1161    parent: AbstractEntityMetadataBundle,
1162    start_pos: StartPos,
1163}
1164impl Default for FallingBlockMetadataBundle {
1165    fn default() -> Self {
1166        Self {
1167            _marker: FallingBlock,
1168            parent: Default::default(),
1169            start_pos: StartPos(BlockPos::new(0, 0, 0)),
1170        }
1171    }
1172}
1173
1174/// A metadata field for [Fireball].
1175#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1176pub struct FireballItemStack(pub ItemStack);
1177/// The marker component for entities of type `minecraft:fireball`.
1178///
1179/// # Metadata
1180///
1181/// These are the metadata components that all `Fireball` entities are
1182/// guaranteed to have, in addition to the metadata components from parent
1183/// types:
1184///
1185/// - [FireballItemStack]
1186///
1187/// # Parents
1188///
1189/// Entities with `Fireball` will also have the following marker components and
1190/// their metadata fields:
1191///
1192/// - [AbstractEntity]
1193///
1194/// # Children
1195///
1196/// This entity type has no children types.
1197#[derive(Component)]
1198pub struct Fireball;
1199impl Fireball {
1200    fn apply_metadata(
1201        entity: &mut bevy_ecs::system::EntityCommands,
1202        d: EntityDataItem,
1203    ) -> Result<(), UpdateMetadataError> {
1204        match d.index {
1205            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1206            8 => {
1207                entity.insert(FireballItemStack(
1208                    d.value
1209                        .into_item_stack()
1210                        .map_err(|v| e(v, d.index, "FireballItemStack"))?,
1211                ));
1212            }
1213            _ => {}
1214        }
1215        Ok(())
1216    }
1217}
1218
1219/// The metadata bundle for [Fireball].
1220///
1221/// This type should generally not be used directly.
1222#[derive(Bundle)]
1223pub struct FireballMetadataBundle {
1224    _marker: Fireball,
1225    parent: AbstractEntityMetadataBundle,
1226    fireball_item_stack: FireballItemStack,
1227}
1228impl Default for FireballMetadataBundle {
1229    fn default() -> Self {
1230        Self {
1231            _marker: Fireball,
1232            parent: Default::default(),
1233            fireball_item_stack: FireballItemStack(Default::default()),
1234        }
1235    }
1236}
1237
1238/// A metadata field for [FireworkRocket].
1239#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1240pub struct FireworksItem(pub ItemStack);
1241/// A metadata field for [FireworkRocket].
1242#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1243pub struct AttachedToTarget(pub OptionalUnsignedInt);
1244/// A metadata field for [FireworkRocket].
1245#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1246pub struct ShotAtAngle(pub bool);
1247/// The marker component for entities of type `minecraft:firework_rocket`.
1248///
1249/// # Metadata
1250///
1251/// These are the metadata components that all `FireworkRocket` entities are
1252/// guaranteed to have, in addition to the metadata components from parent
1253/// types:
1254///
1255/// - [FireworksItem]
1256/// - [AttachedToTarget]
1257/// - [ShotAtAngle]
1258///
1259/// # Parents
1260///
1261/// Entities with `FireworkRocket` will also have the following marker
1262/// components and their metadata fields:
1263///
1264/// - [AbstractEntity]
1265///
1266/// # Children
1267///
1268/// This entity type has no children types.
1269#[derive(Component)]
1270pub struct FireworkRocket;
1271impl FireworkRocket {
1272    fn apply_metadata(
1273        entity: &mut bevy_ecs::system::EntityCommands,
1274        d: EntityDataItem,
1275    ) -> Result<(), UpdateMetadataError> {
1276        match d.index {
1277            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1278            8 => {
1279                entity.insert(FireworksItem(
1280                    d.value
1281                        .into_item_stack()
1282                        .map_err(|v| e(v, d.index, "FireworksItem"))?,
1283                ));
1284            }
1285            9 => {
1286                entity.insert(AttachedToTarget(
1287                    d.value
1288                        .into_optional_unsigned_int()
1289                        .map_err(|v| e(v, d.index, "AttachedToTarget"))?,
1290                ));
1291            }
1292            10 => {
1293                entity.insert(ShotAtAngle(
1294                    d.value
1295                        .into_boolean()
1296                        .map_err(|v| e(v, d.index, "ShotAtAngle"))?,
1297                ));
1298            }
1299            _ => {}
1300        }
1301        Ok(())
1302    }
1303}
1304
1305/// The metadata bundle for [FireworkRocket].
1306///
1307/// This type should generally not be used directly.
1308#[derive(Bundle)]
1309pub struct FireworkRocketMetadataBundle {
1310    _marker: FireworkRocket,
1311    parent: AbstractEntityMetadataBundle,
1312    fireworks_item: FireworksItem,
1313    attached_to_target: AttachedToTarget,
1314    shot_at_angle: ShotAtAngle,
1315}
1316impl Default for FireworkRocketMetadataBundle {
1317    fn default() -> Self {
1318        Self {
1319            _marker: FireworkRocket,
1320            parent: Default::default(),
1321            fireworks_item: FireworksItem(Default::default()),
1322            attached_to_target: AttachedToTarget(OptionalUnsignedInt(None)),
1323            shot_at_angle: ShotAtAngle(false),
1324        }
1325    }
1326}
1327
1328/// A metadata field for [FishingBobber].
1329#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1330pub struct HookedEntity(pub i32);
1331/// A metadata field for [FishingBobber].
1332#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1333pub struct Biting(pub bool);
1334/// The marker component for entities of type `minecraft:fishing_bobber`.
1335///
1336/// # Metadata
1337///
1338/// These are the metadata components that all `FishingBobber` entities are
1339/// guaranteed to have, in addition to the metadata components from parent
1340/// types:
1341///
1342/// - [HookedEntity]
1343/// - [Biting]
1344///
1345/// # Parents
1346///
1347/// Entities with `FishingBobber` will also have the following marker components
1348/// and their metadata fields:
1349///
1350/// - [AbstractEntity]
1351///
1352/// # Children
1353///
1354/// This entity type has no children types.
1355#[derive(Component)]
1356pub struct FishingBobber;
1357impl FishingBobber {
1358    fn apply_metadata(
1359        entity: &mut bevy_ecs::system::EntityCommands,
1360        d: EntityDataItem,
1361    ) -> Result<(), UpdateMetadataError> {
1362        match d.index {
1363            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1364            8 => {
1365                entity.insert(HookedEntity(
1366                    d.value
1367                        .into_int()
1368                        .map_err(|v| e(v, d.index, "HookedEntity"))?,
1369                ));
1370            }
1371            9 => {
1372                entity.insert(Biting(
1373                    d.value
1374                        .into_boolean()
1375                        .map_err(|v| e(v, d.index, "Biting"))?,
1376                ));
1377            }
1378            _ => {}
1379        }
1380        Ok(())
1381    }
1382}
1383
1384/// The metadata bundle for [FishingBobber].
1385///
1386/// This type should generally not be used directly.
1387#[derive(Bundle)]
1388pub struct FishingBobberMetadataBundle {
1389    _marker: FishingBobber,
1390    parent: AbstractEntityMetadataBundle,
1391    hooked_entity: HookedEntity,
1392    biting: Biting,
1393}
1394impl Default for FishingBobberMetadataBundle {
1395    fn default() -> Self {
1396        Self {
1397            _marker: FishingBobber,
1398            parent: Default::default(),
1399            hooked_entity: HookedEntity(0),
1400            biting: Biting(false),
1401        }
1402    }
1403}
1404
1405/// A metadata field for [Interaction].
1406#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1407pub struct InteractionWidth(pub f32);
1408/// A metadata field for [Interaction].
1409#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1410pub struct InteractionHeight(pub f32);
1411/// A metadata field for [Interaction].
1412#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1413pub struct Response(pub bool);
1414/// The marker component for entities of type `minecraft:interaction`.
1415///
1416/// # Metadata
1417///
1418/// These are the metadata components that all `Interaction` entities are
1419/// guaranteed to have, in addition to the metadata components from parent
1420/// types:
1421///
1422/// - [InteractionWidth]
1423/// - [InteractionHeight]
1424/// - [Response]
1425///
1426/// # Parents
1427///
1428/// Entities with `Interaction` will also have the following marker components
1429/// and their metadata fields:
1430///
1431/// - [AbstractEntity]
1432///
1433/// # Children
1434///
1435/// This entity type has no children types.
1436#[derive(Component)]
1437pub struct Interaction;
1438impl Interaction {
1439    fn apply_metadata(
1440        entity: &mut bevy_ecs::system::EntityCommands,
1441        d: EntityDataItem,
1442    ) -> Result<(), UpdateMetadataError> {
1443        match d.index {
1444            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1445            8 => {
1446                entity.insert(InteractionWidth(
1447                    d.value
1448                        .into_float()
1449                        .map_err(|v| e(v, d.index, "InteractionWidth"))?,
1450                ));
1451            }
1452            9 => {
1453                entity.insert(InteractionHeight(
1454                    d.value
1455                        .into_float()
1456                        .map_err(|v| e(v, d.index, "InteractionHeight"))?,
1457                ));
1458            }
1459            10 => {
1460                entity.insert(Response(
1461                    d.value
1462                        .into_boolean()
1463                        .map_err(|v| e(v, d.index, "Response"))?,
1464                ));
1465            }
1466            _ => {}
1467        }
1468        Ok(())
1469    }
1470}
1471
1472/// The metadata bundle for [Interaction].
1473///
1474/// This type should generally not be used directly.
1475#[derive(Bundle)]
1476pub struct InteractionMetadataBundle {
1477    _marker: Interaction,
1478    parent: AbstractEntityMetadataBundle,
1479    interaction_width: InteractionWidth,
1480    interaction_height: InteractionHeight,
1481    response: Response,
1482}
1483impl Default for InteractionMetadataBundle {
1484    fn default() -> Self {
1485        Self {
1486            _marker: Interaction,
1487            parent: Default::default(),
1488            interaction_width: InteractionWidth(1.0),
1489            interaction_height: InteractionHeight(1.0),
1490            response: Response(false),
1491        }
1492    }
1493}
1494
1495/// A metadata field for [Item].
1496#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1497pub struct ItemItem(pub ItemStack);
1498/// The marker component for entities of type `minecraft:item`.
1499///
1500/// # Metadata
1501///
1502/// These are the metadata components that all `Item` entities are guaranteed to
1503/// have, in addition to the metadata components from parent types:
1504///
1505/// - [ItemItem]
1506///
1507/// # Parents
1508///
1509/// Entities with `Item` will also have the following marker components and
1510/// their metadata fields:
1511///
1512/// - [AbstractEntity]
1513///
1514/// # Children
1515///
1516/// This entity type has no children types.
1517#[derive(Component)]
1518pub struct Item;
1519impl Item {
1520    fn apply_metadata(
1521        entity: &mut bevy_ecs::system::EntityCommands,
1522        d: EntityDataItem,
1523    ) -> Result<(), UpdateMetadataError> {
1524        match d.index {
1525            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1526            8 => {
1527                entity.insert(ItemItem(
1528                    d.value
1529                        .into_item_stack()
1530                        .map_err(|v| e(v, d.index, "ItemItem"))?,
1531                ));
1532            }
1533            _ => {}
1534        }
1535        Ok(())
1536    }
1537}
1538
1539/// The metadata bundle for [Item].
1540///
1541/// This type should generally not be used directly.
1542#[derive(Bundle)]
1543pub struct ItemMetadataBundle {
1544    _marker: Item,
1545    parent: AbstractEntityMetadataBundle,
1546    item_item: ItemItem,
1547}
1548impl Default for ItemMetadataBundle {
1549    fn default() -> Self {
1550        Self {
1551            _marker: Item,
1552            parent: Default::default(),
1553            item_item: ItemItem(Default::default()),
1554        }
1555    }
1556}
1557
1558/// A metadata field for [ItemFrame].
1559#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1560pub struct ItemFrameDirection(pub Direction);
1561/// A metadata field for [ItemFrame].
1562#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1563pub struct ItemFrameItem(pub ItemStack);
1564/// A metadata field for [ItemFrame].
1565#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1566pub struct Rotation(pub i32);
1567/// The marker component for entities of type `minecraft:item_frame`.
1568///
1569/// # Metadata
1570///
1571/// These are the metadata components that all `ItemFrame` entities are
1572/// guaranteed to have, in addition to the metadata components from parent
1573/// types:
1574///
1575/// - [ItemFrameDirection]
1576/// - [ItemFrameItem]
1577/// - [Rotation]
1578///
1579/// # Parents
1580///
1581/// Entities with `ItemFrame` will also have the following marker components and
1582/// their metadata fields:
1583///
1584/// - [AbstractEntity]
1585///
1586/// # Children
1587///
1588/// - [GlowItemFrame]
1589#[derive(Component)]
1590pub struct ItemFrame;
1591impl ItemFrame {
1592    fn apply_metadata(
1593        entity: &mut bevy_ecs::system::EntityCommands,
1594        d: EntityDataItem,
1595    ) -> Result<(), UpdateMetadataError> {
1596        match d.index {
1597            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1598            8 => {
1599                entity.insert(ItemFrameDirection(
1600                    d.value
1601                        .into_direction()
1602                        .map_err(|v| e(v, d.index, "ItemFrameDirection"))?,
1603                ));
1604            }
1605            9 => {
1606                entity.insert(ItemFrameItem(
1607                    d.value
1608                        .into_item_stack()
1609                        .map_err(|v| e(v, d.index, "ItemFrameItem"))?,
1610                ));
1611            }
1612            10 => {
1613                entity.insert(Rotation(
1614                    d.value.into_int().map_err(|v| e(v, d.index, "Rotation"))?,
1615                ));
1616            }
1617            _ => {}
1618        }
1619        Ok(())
1620    }
1621}
1622
1623/// The metadata bundle for [ItemFrame].
1624///
1625/// This type should generally not be used directly.
1626#[derive(Bundle)]
1627pub struct ItemFrameMetadataBundle {
1628    _marker: ItemFrame,
1629    parent: AbstractEntityMetadataBundle,
1630    item_frame_direction: ItemFrameDirection,
1631    item_frame_item: ItemFrameItem,
1632    rotation: Rotation,
1633}
1634impl Default for ItemFrameMetadataBundle {
1635    fn default() -> Self {
1636        Self {
1637            _marker: ItemFrame,
1638            parent: Default::default(),
1639            item_frame_direction: ItemFrameDirection(Default::default()),
1640            item_frame_item: ItemFrameItem(Default::default()),
1641            rotation: Rotation(0),
1642        }
1643    }
1644}
1645
1646/// The marker component for entities of type `minecraft:glow_item_frame`.
1647///
1648/// # Metadata
1649///
1650/// This entity type does not add any additional metadata. It will still have
1651/// metadata from parent types.
1652///
1653/// # Parents
1654///
1655/// Entities with `GlowItemFrame` will also have the following marker components
1656/// and their metadata fields:
1657///
1658/// - [ItemFrame]
1659/// - [AbstractEntity]
1660///
1661/// # Children
1662///
1663/// This entity type has no children types.
1664#[derive(Component)]
1665pub struct GlowItemFrame;
1666impl GlowItemFrame {
1667    fn apply_metadata(
1668        entity: &mut bevy_ecs::system::EntityCommands,
1669        d: EntityDataItem,
1670    ) -> Result<(), UpdateMetadataError> {
1671        match d.index {
1672            0..=10 => ItemFrame::apply_metadata(entity, d)?,
1673            _ => {}
1674        }
1675        Ok(())
1676    }
1677}
1678
1679/// The metadata bundle for [GlowItemFrame].
1680///
1681/// This type should generally not be used directly.
1682#[derive(Bundle)]
1683pub struct GlowItemFrameMetadataBundle {
1684    _marker: GlowItemFrame,
1685    parent: ItemFrameMetadataBundle,
1686}
1687impl Default for GlowItemFrameMetadataBundle {
1688    fn default() -> Self {
1689        Self {
1690            _marker: GlowItemFrame,
1691            parent: Default::default(),
1692        }
1693    }
1694}
1695
1696/// The marker component for entities of type `minecraft:leash_knot`.
1697///
1698/// # Metadata
1699///
1700/// This entity type does not add any additional metadata. It will still have
1701/// metadata from parent types.
1702///
1703/// # Parents
1704///
1705/// Entities with `LeashKnot` will also have the following marker components and
1706/// their metadata fields:
1707///
1708/// - [AbstractEntity]
1709///
1710/// # Children
1711///
1712/// This entity type has no children types.
1713#[derive(Component)]
1714pub struct LeashKnot;
1715impl LeashKnot {
1716    fn apply_metadata(
1717        entity: &mut bevy_ecs::system::EntityCommands,
1718        d: EntityDataItem,
1719    ) -> Result<(), UpdateMetadataError> {
1720        match d.index {
1721            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1722            _ => {}
1723        }
1724        Ok(())
1725    }
1726}
1727
1728/// The metadata bundle for [LeashKnot].
1729///
1730/// This type should generally not be used directly.
1731#[derive(Bundle)]
1732pub struct LeashKnotMetadataBundle {
1733    _marker: LeashKnot,
1734    parent: AbstractEntityMetadataBundle,
1735}
1736impl Default for LeashKnotMetadataBundle {
1737    fn default() -> Self {
1738        Self {
1739            _marker: LeashKnot,
1740            parent: Default::default(),
1741        }
1742    }
1743}
1744
1745/// The marker component for entities of type `minecraft:lightning_bolt`.
1746///
1747/// # Metadata
1748///
1749/// This entity type does not add any additional metadata. It will still have
1750/// metadata from parent types.
1751///
1752/// # Parents
1753///
1754/// Entities with `LightningBolt` will also have the following marker components
1755/// and their metadata fields:
1756///
1757/// - [AbstractEntity]
1758///
1759/// # Children
1760///
1761/// This entity type has no children types.
1762#[derive(Component)]
1763pub struct LightningBolt;
1764impl LightningBolt {
1765    fn apply_metadata(
1766        entity: &mut bevy_ecs::system::EntityCommands,
1767        d: EntityDataItem,
1768    ) -> Result<(), UpdateMetadataError> {
1769        match d.index {
1770            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1771            _ => {}
1772        }
1773        Ok(())
1774    }
1775}
1776
1777/// The metadata bundle for [LightningBolt].
1778///
1779/// This type should generally not be used directly.
1780#[derive(Bundle)]
1781pub struct LightningBoltMetadataBundle {
1782    _marker: LightningBolt,
1783    parent: AbstractEntityMetadataBundle,
1784}
1785impl Default for LightningBoltMetadataBundle {
1786    fn default() -> Self {
1787        Self {
1788            _marker: LightningBolt,
1789            parent: Default::default(),
1790        }
1791    }
1792}
1793
1794/// The marker component for entities of type `minecraft:llama_spit`.
1795///
1796/// # Metadata
1797///
1798/// This entity type does not add any additional metadata. It will still have
1799/// metadata from parent types.
1800///
1801/// # Parents
1802///
1803/// Entities with `LlamaSpit` will also have the following marker components and
1804/// their metadata fields:
1805///
1806/// - [AbstractEntity]
1807///
1808/// # Children
1809///
1810/// This entity type has no children types.
1811#[derive(Component)]
1812pub struct LlamaSpit;
1813impl LlamaSpit {
1814    fn apply_metadata(
1815        entity: &mut bevy_ecs::system::EntityCommands,
1816        d: EntityDataItem,
1817    ) -> Result<(), UpdateMetadataError> {
1818        match d.index {
1819            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1820            _ => {}
1821        }
1822        Ok(())
1823    }
1824}
1825
1826/// The metadata bundle for [LlamaSpit].
1827///
1828/// This type should generally not be used directly.
1829#[derive(Bundle)]
1830pub struct LlamaSpitMetadataBundle {
1831    _marker: LlamaSpit,
1832    parent: AbstractEntityMetadataBundle,
1833}
1834impl Default for LlamaSpitMetadataBundle {
1835    fn default() -> Self {
1836        Self {
1837            _marker: LlamaSpit,
1838            parent: Default::default(),
1839        }
1840    }
1841}
1842
1843/// The marker component for entities of type `minecraft:marker`.
1844///
1845/// # Metadata
1846///
1847/// This entity type does not add any additional metadata. It will still have
1848/// metadata from parent types.
1849///
1850/// # Parents
1851///
1852/// Entities with `Marker` will also have the following marker components and
1853/// their metadata fields:
1854///
1855/// - [AbstractEntity]
1856///
1857/// # Children
1858///
1859/// This entity type has no children types.
1860#[derive(Component)]
1861pub struct Marker;
1862impl Marker {
1863    fn apply_metadata(
1864        entity: &mut bevy_ecs::system::EntityCommands,
1865        d: EntityDataItem,
1866    ) -> Result<(), UpdateMetadataError> {
1867        match d.index {
1868            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1869            _ => {}
1870        }
1871        Ok(())
1872    }
1873}
1874
1875/// The metadata bundle for [Marker].
1876///
1877/// This type should generally not be used directly.
1878#[derive(Bundle)]
1879pub struct MarkerMetadataBundle {
1880    _marker: Marker,
1881    parent: AbstractEntityMetadataBundle,
1882}
1883impl Default for MarkerMetadataBundle {
1884    fn default() -> Self {
1885        Self {
1886            _marker: Marker,
1887            parent: Default::default(),
1888        }
1889    }
1890}
1891
1892/// A metadata field for [OminousItemSpawner].
1893#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1894pub struct OminousItemSpawnerItem(pub ItemStack);
1895/// The marker component for entities of type `minecraft:ominous_item_spawner`.
1896///
1897/// # Metadata
1898///
1899/// These are the metadata components that all `OminousItemSpawner` entities are
1900/// guaranteed to have, in addition to the metadata components from parent
1901/// types:
1902///
1903/// - [OminousItemSpawnerItem]
1904///
1905/// # Parents
1906///
1907/// Entities with `OminousItemSpawner` will also have the following marker
1908/// components and their metadata fields:
1909///
1910/// - [AbstractEntity]
1911///
1912/// # Children
1913///
1914/// This entity type has no children types.
1915#[derive(Component)]
1916pub struct OminousItemSpawner;
1917impl OminousItemSpawner {
1918    fn apply_metadata(
1919        entity: &mut bevy_ecs::system::EntityCommands,
1920        d: EntityDataItem,
1921    ) -> Result<(), UpdateMetadataError> {
1922        match d.index {
1923            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1924            8 => {
1925                entity.insert(OminousItemSpawnerItem(
1926                    d.value
1927                        .into_item_stack()
1928                        .map_err(|v| e(v, d.index, "OminousItemSpawnerItem"))?,
1929                ));
1930            }
1931            _ => {}
1932        }
1933        Ok(())
1934    }
1935}
1936
1937/// The metadata bundle for [OminousItemSpawner].
1938///
1939/// This type should generally not be used directly.
1940#[derive(Bundle)]
1941pub struct OminousItemSpawnerMetadataBundle {
1942    _marker: OminousItemSpawner,
1943    parent: AbstractEntityMetadataBundle,
1944    ominous_item_spawner_item: OminousItemSpawnerItem,
1945}
1946impl Default for OminousItemSpawnerMetadataBundle {
1947    fn default() -> Self {
1948        Self {
1949            _marker: OminousItemSpawner,
1950            parent: Default::default(),
1951            ominous_item_spawner_item: OminousItemSpawnerItem(Default::default()),
1952        }
1953    }
1954}
1955
1956/// A metadata field for [Painting].
1957#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1958pub struct PaintingDirection(pub Direction);
1959/// A metadata field for [Painting].
1960#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1961pub struct PaintingVariant(pub azalea_registry::data::PaintingVariant);
1962/// The marker component for entities of type `minecraft:painting`.
1963///
1964/// # Metadata
1965///
1966/// These are the metadata components that all `Painting` entities are
1967/// guaranteed to have, in addition to the metadata components from parent
1968/// types:
1969///
1970/// - [PaintingDirection]
1971/// - [PaintingVariant]
1972///
1973/// # Parents
1974///
1975/// Entities with `Painting` will also have the following marker components and
1976/// their metadata fields:
1977///
1978/// - [AbstractEntity]
1979///
1980/// # Children
1981///
1982/// This entity type has no children types.
1983#[derive(Component)]
1984pub struct Painting;
1985impl Painting {
1986    fn apply_metadata(
1987        entity: &mut bevy_ecs::system::EntityCommands,
1988        d: EntityDataItem,
1989    ) -> Result<(), UpdateMetadataError> {
1990        match d.index {
1991            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1992            8 => {
1993                entity.insert(PaintingDirection(
1994                    d.value
1995                        .into_direction()
1996                        .map_err(|v| e(v, d.index, "PaintingDirection"))?,
1997                ));
1998            }
1999            9 => {
2000                entity.insert(PaintingVariant(
2001                    d.value
2002                        .into_painting_variant()
2003                        .map_err(|v| e(v, d.index, "PaintingVariant"))?,
2004                ));
2005            }
2006            _ => {}
2007        }
2008        Ok(())
2009    }
2010}
2011
2012/// The metadata bundle for [Painting].
2013///
2014/// This type should generally not be used directly.
2015#[derive(Bundle)]
2016pub struct PaintingMetadataBundle {
2017    _marker: Painting,
2018    parent: AbstractEntityMetadataBundle,
2019    painting_direction: PaintingDirection,
2020    painting_variant: PaintingVariant,
2021}
2022impl Default for PaintingMetadataBundle {
2023    fn default() -> Self {
2024        Self {
2025            _marker: Painting,
2026            parent: Default::default(),
2027            painting_direction: PaintingDirection(Default::default()),
2028            painting_variant: PaintingVariant(azalea_registry::data::PaintingVariant::default()),
2029        }
2030    }
2031}
2032
2033/// The marker component for entities of type `minecraft:shulker_bullet`.
2034///
2035/// # Metadata
2036///
2037/// This entity type does not add any additional metadata. It will still have
2038/// metadata from parent types.
2039///
2040/// # Parents
2041///
2042/// Entities with `ShulkerBullet` will also have the following marker components
2043/// and their metadata fields:
2044///
2045/// - [AbstractEntity]
2046///
2047/// # Children
2048///
2049/// This entity type has no children types.
2050#[derive(Component)]
2051pub struct ShulkerBullet;
2052impl ShulkerBullet {
2053    fn apply_metadata(
2054        entity: &mut bevy_ecs::system::EntityCommands,
2055        d: EntityDataItem,
2056    ) -> Result<(), UpdateMetadataError> {
2057        match d.index {
2058            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2059            _ => {}
2060        }
2061        Ok(())
2062    }
2063}
2064
2065/// The metadata bundle for [ShulkerBullet].
2066///
2067/// This type should generally not be used directly.
2068#[derive(Bundle)]
2069pub struct ShulkerBulletMetadataBundle {
2070    _marker: ShulkerBullet,
2071    parent: AbstractEntityMetadataBundle,
2072}
2073impl Default for ShulkerBulletMetadataBundle {
2074    fn default() -> Self {
2075        Self {
2076            _marker: ShulkerBullet,
2077            parent: Default::default(),
2078        }
2079    }
2080}
2081
2082/// A metadata field for [SmallFireball].
2083#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2084pub struct SmallFireballItemStack(pub ItemStack);
2085/// The marker component for entities of type `minecraft:small_fireball`.
2086///
2087/// # Metadata
2088///
2089/// These are the metadata components that all `SmallFireball` entities are
2090/// guaranteed to have, in addition to the metadata components from parent
2091/// types:
2092///
2093/// - [SmallFireballItemStack]
2094///
2095/// # Parents
2096///
2097/// Entities with `SmallFireball` will also have the following marker components
2098/// and their metadata fields:
2099///
2100/// - [AbstractEntity]
2101///
2102/// # Children
2103///
2104/// This entity type has no children types.
2105#[derive(Component)]
2106pub struct SmallFireball;
2107impl SmallFireball {
2108    fn apply_metadata(
2109        entity: &mut bevy_ecs::system::EntityCommands,
2110        d: EntityDataItem,
2111    ) -> Result<(), UpdateMetadataError> {
2112        match d.index {
2113            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2114            8 => {
2115                entity.insert(SmallFireballItemStack(
2116                    d.value
2117                        .into_item_stack()
2118                        .map_err(|v| e(v, d.index, "SmallFireballItemStack"))?,
2119                ));
2120            }
2121            _ => {}
2122        }
2123        Ok(())
2124    }
2125}
2126
2127/// The metadata bundle for [SmallFireball].
2128///
2129/// This type should generally not be used directly.
2130#[derive(Bundle)]
2131pub struct SmallFireballMetadataBundle {
2132    _marker: SmallFireball,
2133    parent: AbstractEntityMetadataBundle,
2134    small_fireball_item_stack: SmallFireballItemStack,
2135}
2136impl Default for SmallFireballMetadataBundle {
2137    fn default() -> Self {
2138        Self {
2139            _marker: SmallFireball,
2140            parent: Default::default(),
2141            small_fireball_item_stack: SmallFireballItemStack(Default::default()),
2142        }
2143    }
2144}
2145
2146/// A metadata field for [Tnt].
2147#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2148pub struct Fuse(pub i32);
2149/// A metadata field for [Tnt].
2150#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2151pub struct TntBlockState(pub azalea_block::BlockState);
2152/// The marker component for entities of type `minecraft:tnt`.
2153///
2154/// # Metadata
2155///
2156/// These are the metadata components that all `Tnt` entities are guaranteed to
2157/// have, in addition to the metadata components from parent types:
2158///
2159/// - [Fuse]
2160/// - [TntBlockState]
2161///
2162/// # Parents
2163///
2164/// Entities with `Tnt` will also have the following marker components and their
2165/// metadata fields:
2166///
2167/// - [AbstractEntity]
2168///
2169/// # Children
2170///
2171/// This entity type has no children types.
2172#[derive(Component)]
2173pub struct Tnt;
2174impl Tnt {
2175    fn apply_metadata(
2176        entity: &mut bevy_ecs::system::EntityCommands,
2177        d: EntityDataItem,
2178    ) -> Result<(), UpdateMetadataError> {
2179        match d.index {
2180            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2181            8 => {
2182                entity.insert(Fuse(d.value.into_int().map_err(|v| e(v, d.index, "Fuse"))?));
2183            }
2184            9 => {
2185                entity.insert(TntBlockState(
2186                    d.value
2187                        .into_block_state()
2188                        .map_err(|v| e(v, d.index, "TntBlockState"))?,
2189                ));
2190            }
2191            _ => {}
2192        }
2193        Ok(())
2194    }
2195}
2196
2197/// The metadata bundle for [Tnt].
2198///
2199/// This type should generally not be used directly.
2200#[derive(Bundle)]
2201pub struct TntMetadataBundle {
2202    _marker: Tnt,
2203    parent: AbstractEntityMetadataBundle,
2204    fuse: Fuse,
2205    tnt_block_state: TntBlockState,
2206}
2207impl Default for TntMetadataBundle {
2208    fn default() -> Self {
2209        Self {
2210            _marker: Tnt,
2211            parent: Default::default(),
2212            fuse: Fuse(80),
2213            tnt_block_state: TntBlockState(Default::default()),
2214        }
2215    }
2216}
2217
2218/// The marker component for entities of type `minecraft:wind_charge`.
2219///
2220/// # Metadata
2221///
2222/// This entity type does not add any additional metadata. It will still have
2223/// metadata from parent types.
2224///
2225/// # Parents
2226///
2227/// Entities with `WindCharge` will also have the following marker components
2228/// and their metadata fields:
2229///
2230/// - [AbstractEntity]
2231///
2232/// # Children
2233///
2234/// This entity type has no children types.
2235#[derive(Component)]
2236pub struct WindCharge;
2237impl WindCharge {
2238    fn apply_metadata(
2239        entity: &mut bevy_ecs::system::EntityCommands,
2240        d: EntityDataItem,
2241    ) -> Result<(), UpdateMetadataError> {
2242        match d.index {
2243            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2244            _ => {}
2245        }
2246        Ok(())
2247    }
2248}
2249
2250/// The metadata bundle for [WindCharge].
2251///
2252/// This type should generally not be used directly.
2253#[derive(Bundle)]
2254pub struct WindChargeMetadataBundle {
2255    _marker: WindCharge,
2256    parent: AbstractEntityMetadataBundle,
2257}
2258impl Default for WindChargeMetadataBundle {
2259    fn default() -> Self {
2260        Self {
2261            _marker: WindCharge,
2262            parent: Default::default(),
2263        }
2264    }
2265}
2266
2267/// A metadata field for [WitherSkull].
2268#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2269pub struct Dangerous(pub bool);
2270/// The marker component for entities of type `minecraft:wither_skull`.
2271///
2272/// # Metadata
2273///
2274/// These are the metadata components that all `WitherSkull` entities are
2275/// guaranteed to have, in addition to the metadata components from parent
2276/// types:
2277///
2278/// - [Dangerous]
2279///
2280/// # Parents
2281///
2282/// Entities with `WitherSkull` will also have the following marker components
2283/// and their metadata fields:
2284///
2285/// - [AbstractEntity]
2286///
2287/// # Children
2288///
2289/// This entity type has no children types.
2290#[derive(Component)]
2291pub struct WitherSkull;
2292impl WitherSkull {
2293    fn apply_metadata(
2294        entity: &mut bevy_ecs::system::EntityCommands,
2295        d: EntityDataItem,
2296    ) -> Result<(), UpdateMetadataError> {
2297        match d.index {
2298            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2299            8 => {
2300                entity.insert(Dangerous(
2301                    d.value
2302                        .into_boolean()
2303                        .map_err(|v| e(v, d.index, "Dangerous"))?,
2304                ));
2305            }
2306            _ => {}
2307        }
2308        Ok(())
2309    }
2310}
2311
2312/// The metadata bundle for [WitherSkull].
2313///
2314/// This type should generally not be used directly.
2315#[derive(Bundle)]
2316pub struct WitherSkullMetadataBundle {
2317    _marker: WitherSkull,
2318    parent: AbstractEntityMetadataBundle,
2319    dangerous: Dangerous,
2320}
2321impl Default for WitherSkullMetadataBundle {
2322    fn default() -> Self {
2323        Self {
2324            _marker: WitherSkull,
2325            parent: Default::default(),
2326            dangerous: Dangerous(false),
2327        }
2328    }
2329}
2330
2331#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2332/// A metadata field for [AbstractArrow].
2333pub struct CritArrow(pub bool);
2334#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2335/// A metadata field for [AbstractArrow].
2336pub struct NoPhysics(pub bool);
2337/// A metadata field for [AbstractArrow].
2338#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2339pub struct PierceLevel(pub u8);
2340/// A metadata field for [AbstractArrow].
2341#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2342pub struct InGround(pub bool);
2343/// An abstract entity marker component.
2344///
2345/// # Metadata
2346///
2347/// These are the metadata components that all `AbstractArrow` entities are
2348/// guaranteed to have, in addition to the metadata components from parent
2349/// types:
2350///
2351/// - [CritArrow]
2352/// - [NoPhysics]
2353/// - [PierceLevel]
2354/// - [InGround]
2355///
2356/// # Parents
2357///
2358/// Entities with `AbstractArrow` will also have the following marker components
2359/// and their metadata fields:
2360///
2361/// - [AbstractEntity]
2362///
2363/// # Children
2364///
2365/// - [Arrow]
2366/// - [SpectralArrow]
2367/// - [Trident]
2368#[derive(Component)]
2369pub struct AbstractArrow;
2370impl AbstractArrow {
2371    fn apply_metadata(
2372        entity: &mut bevy_ecs::system::EntityCommands,
2373        d: EntityDataItem,
2374    ) -> Result<(), UpdateMetadataError> {
2375        match d.index {
2376            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2377            8 => {
2378                let bitfield = d
2379                    .value
2380                    .into_byte()
2381                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
2382                entity.insert(CritArrow(bitfield & 0x1 != 0));
2383                entity.insert(NoPhysics(bitfield & 0x2 != 0));
2384            }
2385            9 => {
2386                entity.insert(PierceLevel(
2387                    d.value
2388                        .into_byte()
2389                        .map_err(|v| e(v, d.index, "PierceLevel"))?,
2390                ));
2391            }
2392            10 => {
2393                entity.insert(InGround(
2394                    d.value
2395                        .into_boolean()
2396                        .map_err(|v| e(v, d.index, "InGround"))?,
2397                ));
2398            }
2399            _ => {}
2400        }
2401        Ok(())
2402    }
2403}
2404
2405/// The metadata bundle for [AbstractArrow].
2406///
2407/// This type should generally not be used directly.
2408#[derive(Bundle)]
2409pub struct AbstractArrowMetadataBundle {
2410    _marker: AbstractArrow,
2411    parent: AbstractEntityMetadataBundle,
2412    crit_arrow: CritArrow,
2413    no_physics: NoPhysics,
2414    pierce_level: PierceLevel,
2415    in_ground: InGround,
2416}
2417impl Default for AbstractArrowMetadataBundle {
2418    fn default() -> Self {
2419        Self {
2420            _marker: AbstractArrow,
2421            parent: Default::default(),
2422            crit_arrow: CritArrow(false),
2423            no_physics: NoPhysics(false),
2424            pierce_level: PierceLevel(0),
2425            in_ground: InGround(false),
2426        }
2427    }
2428}
2429
2430/// A metadata field for [Arrow].
2431#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2432pub struct EffectColor(pub i32);
2433/// The marker component for entities of type `minecraft:arrow`.
2434///
2435/// # Metadata
2436///
2437/// These are the metadata components that all `Arrow` entities are guaranteed
2438/// to have, in addition to the metadata components from parent types:
2439///
2440/// - [EffectColor]
2441///
2442/// # Parents
2443///
2444/// Entities with `Arrow` will also have the following marker components and
2445/// their metadata fields:
2446///
2447/// - [AbstractArrow]
2448/// - [AbstractEntity]
2449///
2450/// # Children
2451///
2452/// This entity type has no children types.
2453#[derive(Component)]
2454pub struct Arrow;
2455impl Arrow {
2456    fn apply_metadata(
2457        entity: &mut bevy_ecs::system::EntityCommands,
2458        d: EntityDataItem,
2459    ) -> Result<(), UpdateMetadataError> {
2460        match d.index {
2461            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2462            11 => {
2463                entity.insert(EffectColor(
2464                    d.value
2465                        .into_int()
2466                        .map_err(|v| e(v, d.index, "EffectColor"))?,
2467                ));
2468            }
2469            _ => {}
2470        }
2471        Ok(())
2472    }
2473}
2474
2475/// The metadata bundle for [Arrow].
2476///
2477/// This type should generally not be used directly.
2478#[derive(Bundle)]
2479pub struct ArrowMetadataBundle {
2480    _marker: Arrow,
2481    parent: AbstractArrowMetadataBundle,
2482    effect_color: EffectColor,
2483}
2484impl Default for ArrowMetadataBundle {
2485    fn default() -> Self {
2486        Self {
2487            _marker: Arrow,
2488            parent: Default::default(),
2489            effect_color: EffectColor(-1),
2490        }
2491    }
2492}
2493
2494/// The marker component for entities of type `minecraft:spectral_arrow`.
2495///
2496/// # Metadata
2497///
2498/// This entity type does not add any additional metadata. It will still have
2499/// metadata from parent types.
2500///
2501/// # Parents
2502///
2503/// Entities with `SpectralArrow` will also have the following marker components
2504/// and their metadata fields:
2505///
2506/// - [AbstractArrow]
2507/// - [AbstractEntity]
2508///
2509/// # Children
2510///
2511/// This entity type has no children types.
2512#[derive(Component)]
2513pub struct SpectralArrow;
2514impl SpectralArrow {
2515    fn apply_metadata(
2516        entity: &mut bevy_ecs::system::EntityCommands,
2517        d: EntityDataItem,
2518    ) -> Result<(), UpdateMetadataError> {
2519        match d.index {
2520            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2521            _ => {}
2522        }
2523        Ok(())
2524    }
2525}
2526
2527/// The metadata bundle for [SpectralArrow].
2528///
2529/// This type should generally not be used directly.
2530#[derive(Bundle)]
2531pub struct SpectralArrowMetadataBundle {
2532    _marker: SpectralArrow,
2533    parent: AbstractArrowMetadataBundle,
2534}
2535impl Default for SpectralArrowMetadataBundle {
2536    fn default() -> Self {
2537        Self {
2538            _marker: SpectralArrow,
2539            parent: Default::default(),
2540        }
2541    }
2542}
2543
2544/// A metadata field for [Trident].
2545#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2546pub struct Loyalty(pub u8);
2547/// A metadata field for [Trident].
2548#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2549pub struct Foil(pub bool);
2550/// The marker component for entities of type `minecraft:trident`.
2551///
2552/// # Metadata
2553///
2554/// These are the metadata components that all `Trident` entities are guaranteed
2555/// to have, in addition to the metadata components from parent types:
2556///
2557/// - [Loyalty]
2558/// - [Foil]
2559///
2560/// # Parents
2561///
2562/// Entities with `Trident` will also have the following marker components and
2563/// their metadata fields:
2564///
2565/// - [AbstractArrow]
2566/// - [AbstractEntity]
2567///
2568/// # Children
2569///
2570/// This entity type has no children types.
2571#[derive(Component)]
2572pub struct Trident;
2573impl Trident {
2574    fn apply_metadata(
2575        entity: &mut bevy_ecs::system::EntityCommands,
2576        d: EntityDataItem,
2577    ) -> Result<(), UpdateMetadataError> {
2578        match d.index {
2579            0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2580            11 => {
2581                entity.insert(Loyalty(
2582                    d.value.into_byte().map_err(|v| e(v, d.index, "Loyalty"))?,
2583                ));
2584            }
2585            12 => {
2586                entity.insert(Foil(
2587                    d.value.into_boolean().map_err(|v| e(v, d.index, "Foil"))?,
2588                ));
2589            }
2590            _ => {}
2591        }
2592        Ok(())
2593    }
2594}
2595
2596/// The metadata bundle for [Trident].
2597///
2598/// This type should generally not be used directly.
2599#[derive(Bundle)]
2600pub struct TridentMetadataBundle {
2601    _marker: Trident,
2602    parent: AbstractArrowMetadataBundle,
2603    loyalty: Loyalty,
2604    foil: Foil,
2605}
2606impl Default for TridentMetadataBundle {
2607    fn default() -> Self {
2608        Self {
2609            _marker: Trident,
2610            parent: Default::default(),
2611            loyalty: Loyalty(0),
2612            foil: Foil(false),
2613        }
2614    }
2615}
2616
2617/// A metadata field for [AbstractDisplay].
2618#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2619pub struct TransformationInterpolationStartDeltaTicks(pub i32);
2620/// A metadata field for [AbstractDisplay].
2621#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2622pub struct TransformationInterpolationDuration(pub i32);
2623/// A metadata field for [AbstractDisplay].
2624#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2625pub struct PosRotInterpolationDuration(pub i32);
2626/// A metadata field for [AbstractDisplay].
2627#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2628pub struct Translation(pub Vec3f32);
2629/// A metadata field for [AbstractDisplay].
2630#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2631pub struct Scale(pub Vec3f32);
2632/// A metadata field for [AbstractDisplay].
2633#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2634pub struct LeftRotation(pub Quaternion);
2635/// A metadata field for [AbstractDisplay].
2636#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2637pub struct RightRotation(pub Quaternion);
2638/// A metadata field for [AbstractDisplay].
2639#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2640pub struct BillboardRenderConstraints(pub u8);
2641/// A metadata field for [AbstractDisplay].
2642#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2643pub struct BrightnessOverride(pub i32);
2644/// A metadata field for [AbstractDisplay].
2645#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2646pub struct ViewRange(pub f32);
2647/// A metadata field for [AbstractDisplay].
2648#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2649pub struct ShadowRadius(pub f32);
2650/// A metadata field for [AbstractDisplay].
2651#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2652pub struct ShadowStrength(pub f32);
2653/// A metadata field for [AbstractDisplay].
2654#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2655pub struct AbstractDisplayWidth(pub f32);
2656/// A metadata field for [AbstractDisplay].
2657#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2658pub struct AbstractDisplayHeight(pub f32);
2659/// A metadata field for [AbstractDisplay].
2660#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2661pub struct GlowColorOverride(pub i32);
2662/// An abstract entity marker component.
2663///
2664/// # Metadata
2665///
2666/// These are the metadata components that all `AbstractDisplay` entities are
2667/// guaranteed to have, in addition to the metadata components from parent
2668/// types:
2669///
2670/// - [TransformationInterpolationStartDeltaTicks]
2671/// - [TransformationInterpolationDuration]
2672/// - [PosRotInterpolationDuration]
2673/// - [Translation]
2674/// - [Scale]
2675/// - [LeftRotation]
2676/// - [RightRotation]
2677/// - [BillboardRenderConstraints]
2678/// - [BrightnessOverride]
2679/// - [ViewRange]
2680/// - [ShadowRadius]
2681/// - [ShadowStrength]
2682/// - [AbstractDisplayWidth]
2683/// - [AbstractDisplayHeight]
2684/// - [GlowColorOverride]
2685///
2686/// # Parents
2687///
2688/// Entities with `AbstractDisplay` will also have the following marker
2689/// components and their metadata fields:
2690///
2691/// - [AbstractEntity]
2692///
2693/// # Children
2694///
2695/// - [BlockDisplay]
2696/// - [ItemDisplay]
2697/// - [TextDisplay]
2698#[derive(Component)]
2699pub struct AbstractDisplay;
2700impl AbstractDisplay {
2701    fn apply_metadata(
2702        entity: &mut bevy_ecs::system::EntityCommands,
2703        d: EntityDataItem,
2704    ) -> Result<(), UpdateMetadataError> {
2705        match d.index {
2706            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2707            8 => {
2708                entity.insert(TransformationInterpolationStartDeltaTicks(
2709                    d.value
2710                        .into_int()
2711                        .map_err(|v| e(v, d.index, "TransformationInterpolationStartDeltaTicks"))?,
2712                ));
2713            }
2714            9 => {
2715                entity.insert(TransformationInterpolationDuration(
2716                    d.value
2717                        .into_int()
2718                        .map_err(|v| e(v, d.index, "TransformationInterpolationDuration"))?,
2719                ));
2720            }
2721            10 => {
2722                entity.insert(PosRotInterpolationDuration(
2723                    d.value
2724                        .into_int()
2725                        .map_err(|v| e(v, d.index, "PosRotInterpolationDuration"))?,
2726                ));
2727            }
2728            11 => {
2729                entity.insert(Translation(
2730                    d.value
2731                        .into_vector3()
2732                        .map_err(|v| e(v, d.index, "Translation"))?,
2733                ));
2734            }
2735            12 => {
2736                entity.insert(Scale(
2737                    d.value.into_vector3().map_err(|v| e(v, d.index, "Scale"))?,
2738                ));
2739            }
2740            13 => {
2741                entity.insert(LeftRotation(
2742                    d.value
2743                        .into_quaternion()
2744                        .map_err(|v| e(v, d.index, "LeftRotation"))?,
2745                ));
2746            }
2747            14 => {
2748                entity.insert(RightRotation(
2749                    d.value
2750                        .into_quaternion()
2751                        .map_err(|v| e(v, d.index, "RightRotation"))?,
2752                ));
2753            }
2754            15 => {
2755                entity.insert(BillboardRenderConstraints(
2756                    d.value
2757                        .into_byte()
2758                        .map_err(|v| e(v, d.index, "BillboardRenderConstraints"))?,
2759                ));
2760            }
2761            16 => {
2762                entity.insert(BrightnessOverride(
2763                    d.value
2764                        .into_int()
2765                        .map_err(|v| e(v, d.index, "BrightnessOverride"))?,
2766                ));
2767            }
2768            17 => {
2769                entity.insert(ViewRange(
2770                    d.value
2771                        .into_float()
2772                        .map_err(|v| e(v, d.index, "ViewRange"))?,
2773                ));
2774            }
2775            18 => {
2776                entity.insert(ShadowRadius(
2777                    d.value
2778                        .into_float()
2779                        .map_err(|v| e(v, d.index, "ShadowRadius"))?,
2780                ));
2781            }
2782            19 => {
2783                entity.insert(ShadowStrength(
2784                    d.value
2785                        .into_float()
2786                        .map_err(|v| e(v, d.index, "ShadowStrength"))?,
2787                ));
2788            }
2789            20 => {
2790                entity.insert(AbstractDisplayWidth(
2791                    d.value
2792                        .into_float()
2793                        .map_err(|v| e(v, d.index, "AbstractDisplayWidth"))?,
2794                ));
2795            }
2796            21 => {
2797                entity.insert(AbstractDisplayHeight(
2798                    d.value
2799                        .into_float()
2800                        .map_err(|v| e(v, d.index, "AbstractDisplayHeight"))?,
2801                ));
2802            }
2803            22 => {
2804                entity.insert(GlowColorOverride(
2805                    d.value
2806                        .into_int()
2807                        .map_err(|v| e(v, d.index, "GlowColorOverride"))?,
2808                ));
2809            }
2810            _ => {}
2811        }
2812        Ok(())
2813    }
2814}
2815
2816/// The metadata bundle for [AbstractDisplay].
2817///
2818/// This type should generally not be used directly.
2819#[derive(Bundle)]
2820pub struct AbstractDisplayMetadataBundle {
2821    _marker: AbstractDisplay,
2822    parent: AbstractEntityMetadataBundle,
2823    transformation_interpolation_start_delta_ticks: TransformationInterpolationStartDeltaTicks,
2824    transformation_interpolation_duration: TransformationInterpolationDuration,
2825    pos_rot_interpolation_duration: PosRotInterpolationDuration,
2826    translation: Translation,
2827    scale: Scale,
2828    left_rotation: LeftRotation,
2829    right_rotation: RightRotation,
2830    billboard_render_constraints: BillboardRenderConstraints,
2831    brightness_override: BrightnessOverride,
2832    view_range: ViewRange,
2833    shadow_radius: ShadowRadius,
2834    shadow_strength: ShadowStrength,
2835    abstract_display_width: AbstractDisplayWidth,
2836    abstract_display_height: AbstractDisplayHeight,
2837    glow_color_override: GlowColorOverride,
2838}
2839impl Default for AbstractDisplayMetadataBundle {
2840    fn default() -> Self {
2841        Self {
2842            _marker: AbstractDisplay,
2843            parent: Default::default(),
2844            transformation_interpolation_start_delta_ticks:
2845                TransformationInterpolationStartDeltaTicks(0),
2846            transformation_interpolation_duration: TransformationInterpolationDuration(0),
2847            pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
2848            translation: Translation(Vec3f32 {
2849                x: 0.0,
2850                y: 0.0,
2851                z: 0.0,
2852            }),
2853            scale: Scale(Vec3f32 {
2854                x: 1.0,
2855                y: 1.0,
2856                z: 1.0,
2857            }),
2858            left_rotation: LeftRotation(Quaternion {
2859                x: 0.0,
2860                y: 0.0,
2861                z: 0.0,
2862                w: 1.0,
2863            }),
2864            right_rotation: RightRotation(Quaternion {
2865                x: 0.0,
2866                y: 0.0,
2867                z: 0.0,
2868                w: 1.0,
2869            }),
2870            billboard_render_constraints: BillboardRenderConstraints(Default::default()),
2871            brightness_override: BrightnessOverride(-1),
2872            view_range: ViewRange(1.0),
2873            shadow_radius: ShadowRadius(0.0),
2874            shadow_strength: ShadowStrength(1.0),
2875            abstract_display_width: AbstractDisplayWidth(0.0),
2876            abstract_display_height: AbstractDisplayHeight(0.0),
2877            glow_color_override: GlowColorOverride(-1),
2878        }
2879    }
2880}
2881
2882/// A metadata field for [BlockDisplay].
2883#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2884pub struct BlockDisplayBlockState(pub azalea_block::BlockState);
2885/// The marker component for entities of type `minecraft:block_display`.
2886///
2887/// # Metadata
2888///
2889/// These are the metadata components that all `BlockDisplay` entities are
2890/// guaranteed to have, in addition to the metadata components from parent
2891/// types:
2892///
2893/// - [BlockDisplayBlockState]
2894///
2895/// # Parents
2896///
2897/// Entities with `BlockDisplay` will also have the following marker components
2898/// and their metadata fields:
2899///
2900/// - [AbstractDisplay]
2901/// - [AbstractEntity]
2902///
2903/// # Children
2904///
2905/// This entity type has no children types.
2906#[derive(Component)]
2907pub struct BlockDisplay;
2908impl BlockDisplay {
2909    fn apply_metadata(
2910        entity: &mut bevy_ecs::system::EntityCommands,
2911        d: EntityDataItem,
2912    ) -> Result<(), UpdateMetadataError> {
2913        match d.index {
2914            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2915            23 => {
2916                entity.insert(BlockDisplayBlockState(
2917                    d.value
2918                        .into_block_state()
2919                        .map_err(|v| e(v, d.index, "BlockDisplayBlockState"))?,
2920                ));
2921            }
2922            _ => {}
2923        }
2924        Ok(())
2925    }
2926}
2927
2928/// The metadata bundle for [BlockDisplay].
2929///
2930/// This type should generally not be used directly.
2931#[derive(Bundle)]
2932pub struct BlockDisplayMetadataBundle {
2933    _marker: BlockDisplay,
2934    parent: AbstractDisplayMetadataBundle,
2935    block_display_block_state: BlockDisplayBlockState,
2936}
2937impl Default for BlockDisplayMetadataBundle {
2938    fn default() -> Self {
2939        Self {
2940            _marker: BlockDisplay,
2941            parent: Default::default(),
2942            block_display_block_state: BlockDisplayBlockState(Default::default()),
2943        }
2944    }
2945}
2946
2947/// A metadata field for [ItemDisplay].
2948#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2949pub struct ItemDisplayItemStack(pub ItemStack);
2950/// A metadata field for [ItemDisplay].
2951#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2952pub struct ItemDisplayItemDisplay(pub u8);
2953/// The marker component for entities of type `minecraft:item_display`.
2954///
2955/// # Metadata
2956///
2957/// These are the metadata components that all `ItemDisplay` entities are
2958/// guaranteed to have, in addition to the metadata components from parent
2959/// types:
2960///
2961/// - [ItemDisplayItemStack]
2962/// - [ItemDisplayItemDisplay]
2963///
2964/// # Parents
2965///
2966/// Entities with `ItemDisplay` will also have the following marker components
2967/// and their metadata fields:
2968///
2969/// - [AbstractDisplay]
2970/// - [AbstractEntity]
2971///
2972/// # Children
2973///
2974/// This entity type has no children types.
2975#[derive(Component)]
2976pub struct ItemDisplay;
2977impl ItemDisplay {
2978    fn apply_metadata(
2979        entity: &mut bevy_ecs::system::EntityCommands,
2980        d: EntityDataItem,
2981    ) -> Result<(), UpdateMetadataError> {
2982        match d.index {
2983            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
2984            23 => {
2985                entity.insert(ItemDisplayItemStack(
2986                    d.value
2987                        .into_item_stack()
2988                        .map_err(|v| e(v, d.index, "ItemDisplayItemStack"))?,
2989                ));
2990            }
2991            24 => {
2992                entity.insert(ItemDisplayItemDisplay(
2993                    d.value
2994                        .into_byte()
2995                        .map_err(|v| e(v, d.index, "ItemDisplayItemDisplay"))?,
2996                ));
2997            }
2998            _ => {}
2999        }
3000        Ok(())
3001    }
3002}
3003
3004/// The metadata bundle for [ItemDisplay].
3005///
3006/// This type should generally not be used directly.
3007#[derive(Bundle)]
3008pub struct ItemDisplayMetadataBundle {
3009    _marker: ItemDisplay,
3010    parent: AbstractDisplayMetadataBundle,
3011    item_display_item_stack: ItemDisplayItemStack,
3012    item_display_item_display: ItemDisplayItemDisplay,
3013}
3014impl Default for ItemDisplayMetadataBundle {
3015    fn default() -> Self {
3016        Self {
3017            _marker: ItemDisplay,
3018            parent: Default::default(),
3019            item_display_item_stack: ItemDisplayItemStack(Default::default()),
3020            item_display_item_display: ItemDisplayItemDisplay(Default::default()),
3021        }
3022    }
3023}
3024
3025/// A metadata field for [TextDisplay].
3026#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3027pub struct Text(pub Box<FormattedText>);
3028/// A metadata field for [TextDisplay].
3029#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3030pub struct LineWidth(pub i32);
3031/// A metadata field for [TextDisplay].
3032#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3033pub struct BackgroundColor(pub i32);
3034/// A metadata field for [TextDisplay].
3035#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3036pub struct TextOpacity(pub u8);
3037/// A metadata field for [TextDisplay].
3038#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3039pub struct StyleFlags(pub u8);
3040/// The marker component for entities of type `minecraft:text_display`.
3041///
3042/// # Metadata
3043///
3044/// These are the metadata components that all `TextDisplay` entities are
3045/// guaranteed to have, in addition to the metadata components from parent
3046/// types:
3047///
3048/// - [Text]
3049/// - [LineWidth]
3050/// - [BackgroundColor]
3051/// - [TextOpacity]
3052/// - [StyleFlags]
3053///
3054/// # Parents
3055///
3056/// Entities with `TextDisplay` will also have the following marker components
3057/// and their metadata fields:
3058///
3059/// - [AbstractDisplay]
3060/// - [AbstractEntity]
3061///
3062/// # Children
3063///
3064/// This entity type has no children types.
3065#[derive(Component)]
3066pub struct TextDisplay;
3067impl TextDisplay {
3068    fn apply_metadata(
3069        entity: &mut bevy_ecs::system::EntityCommands,
3070        d: EntityDataItem,
3071    ) -> Result<(), UpdateMetadataError> {
3072        match d.index {
3073            0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
3074            23 => {
3075                entity.insert(Text(
3076                    d.value
3077                        .into_formatted_text()
3078                        .map_err(|v| e(v, d.index, "Text"))?,
3079                ));
3080            }
3081            24 => {
3082                entity.insert(LineWidth(
3083                    d.value.into_int().map_err(|v| e(v, d.index, "LineWidth"))?,
3084                ));
3085            }
3086            25 => {
3087                entity.insert(BackgroundColor(
3088                    d.value
3089                        .into_int()
3090                        .map_err(|v| e(v, d.index, "BackgroundColor"))?,
3091                ));
3092            }
3093            26 => {
3094                entity.insert(TextOpacity(
3095                    d.value
3096                        .into_byte()
3097                        .map_err(|v| e(v, d.index, "TextOpacity"))?,
3098                ));
3099            }
3100            27 => {
3101                entity.insert(StyleFlags(
3102                    d.value
3103                        .into_byte()
3104                        .map_err(|v| e(v, d.index, "StyleFlags"))?,
3105                ));
3106            }
3107            _ => {}
3108        }
3109        Ok(())
3110    }
3111}
3112
3113/// The metadata bundle for [TextDisplay].
3114///
3115/// This type should generally not be used directly.
3116#[derive(Bundle)]
3117pub struct TextDisplayMetadataBundle {
3118    _marker: TextDisplay,
3119    parent: AbstractDisplayMetadataBundle,
3120    text: Text,
3121    line_width: LineWidth,
3122    background_color: BackgroundColor,
3123    text_opacity: TextOpacity,
3124    style_flags: StyleFlags,
3125}
3126impl Default for TextDisplayMetadataBundle {
3127    fn default() -> Self {
3128        Self {
3129            _marker: TextDisplay,
3130            parent: Default::default(),
3131            text: Text(Default::default()),
3132            line_width: LineWidth(200),
3133            background_color: BackgroundColor(1073741824),
3134            text_opacity: TextOpacity(127),
3135            style_flags: StyleFlags(0),
3136        }
3137    }
3138}
3139
3140#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3141/// A metadata field for [AbstractLiving].
3142pub struct AutoSpinAttack(pub bool);
3143#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3144/// A metadata field for [AbstractLiving].
3145pub struct AbstractLivingUsingItem(pub bool);
3146/// A metadata field for [AbstractLiving].
3147#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3148pub struct Health(pub f32);
3149/// A metadata field for [AbstractLiving].
3150#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3151pub struct EffectParticles(pub Box<[EntityParticle]>);
3152/// A metadata field for [AbstractLiving].
3153#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3154pub struct EffectAmbience(pub bool);
3155/// A metadata field for [AbstractLiving].
3156#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3157pub struct ArrowCount(pub i32);
3158/// A metadata field for [AbstractLiving].
3159#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3160pub struct StingerCount(pub i32);
3161/// A metadata field for [AbstractLiving].
3162#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3163pub struct SleepingPos(pub Option<BlockPos>);
3164/// An abstract entity marker component.
3165///
3166/// # Metadata
3167///
3168/// These are the metadata components that all `AbstractLiving` entities are
3169/// guaranteed to have, in addition to the metadata components from parent
3170/// types:
3171///
3172/// - [AutoSpinAttack]
3173/// - [AbstractLivingUsingItem]
3174/// - [Health]
3175/// - [EffectParticles]
3176/// - [EffectAmbience]
3177/// - [ArrowCount]
3178/// - [StingerCount]
3179/// - [SleepingPos]
3180///
3181/// # Parents
3182///
3183/// Entities with `AbstractLiving` will also have the following marker
3184/// components and their metadata fields:
3185///
3186/// - [AbstractEntity]
3187///
3188/// # Children
3189///
3190/// - [ArmorStand]
3191/// - [AbstractAvatar]
3192///   - [Mannequin]
3193///   - [Player]
3194/// - [AbstractInsentient]
3195///   - [Bat]
3196///   - [EnderDragon]
3197///   - [Ghast]
3198///   - [Phantom]
3199///   - [AbstractCreature]
3200///     - [Allay]
3201///     - [CopperGolem]
3202///     - [IronGolem]
3203///     - [Pufferfish]
3204///     - [Shulker]
3205///     - [SnowGolem]
3206///     - [Tadpole]
3207///     - [AbstractAgeable]
3208///       - [Dolphin]
3209///       - [Squid]
3210///         - [GlowSquid]
3211///       - [AbstractAnimal]
3212///         - [Armadillo]
3213///         - [Axolotl]
3214///         - [Bee]
3215///         - [Chicken]
3216///         - [Cow]
3217///         - [Fox]
3218///         - [Frog]
3219///         - [Goat]
3220///         - [HappyGhast]
3221///         - [Hoglin]
3222///         - [Mooshroom]
3223///         - [Ocelot]
3224///         - [Panda]
3225///         - [Pig]
3226///         - [PolarBear]
3227///         - [Rabbit]
3228///         - [Sheep]
3229///         - [Sniffer]
3230///         - [Strider]
3231///         - [Turtle]
3232///         - [AbstractHorse]
3233///           - [Camel]
3234///             - [CamelHusk]
3235///           - [Horse]
3236///           - [SkeletonHorse]
3237///           - [ZombieHorse]
3238///           - [AbstractChestedHorse]
3239///             - [Donkey]
3240///             - [Llama]
3241///               - [TraderLlama]
3242///             - [Mule]
3243///         - [AbstractTameable]
3244///           - [Cat]
3245///           - [Parrot]
3246///           - [Wolf]
3247///           - [AbstractNautilus]
3248///             - [Nautilus]
3249///             - [ZombieNautilus]
3250///       - [AbstractCubeMob]
3251///         - [MagmaCube]
3252///         - [Slime]
3253///         - [SulfurCube]
3254///       - [AbstractVillager]
3255///         - [Villager]
3256///         - [WanderingTrader]
3257///     - [AbstractFish]
3258///       - [Cod]
3259///       - [Salmon]
3260///       - [TropicalFish]
3261///     - [AbstractMonster]
3262///       - [Blaze]
3263///       - [Bogged]
3264///       - [Breeze]
3265///       - [Creaking]
3266///       - [Creeper]
3267///       - [Enderman]
3268///       - [Endermite]
3269///       - [Giant]
3270///       - [Guardian]
3271///         - [ElderGuardian]
3272///       - [Parched]
3273///       - [Silverfish]
3274///       - [Skeleton]
3275///       - [Spider]
3276///         - [CaveSpider]
3277///       - [Stray]
3278///       - [Vex]
3279///       - [Warden]
3280///       - [Wither]
3281///       - [WitherSkeleton]
3282///       - [Zoglin]
3283///       - [Zombie]
3284///         - [Drowned]
3285///         - [Husk]
3286///         - [ZombieVillager]
3287///         - [ZombifiedPiglin]
3288///       - [AbstractPiglin]
3289///         - [Piglin]
3290///         - [PiglinBrute]
3291///       - [AbstractRaider]
3292///         - [Pillager]
3293///         - [Ravager]
3294///         - [Vindicator]
3295///         - [Witch]
3296///         - [AbstractSpellcasterIllager]
3297///           - [Evoker]
3298///           - [Illusioner]
3299#[derive(Component)]
3300pub struct AbstractLiving;
3301impl AbstractLiving {
3302    fn apply_metadata(
3303        entity: &mut bevy_ecs::system::EntityCommands,
3304        d: EntityDataItem,
3305    ) -> Result<(), UpdateMetadataError> {
3306        match d.index {
3307            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
3308            8 => {
3309                let bitfield = d
3310                    .value
3311                    .into_byte()
3312                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
3313                entity.insert(AutoSpinAttack(bitfield & 0x4 != 0));
3314                entity.insert(AbstractLivingUsingItem(bitfield & 0x1 != 0));
3315            }
3316            9 => {
3317                entity.insert(Health(
3318                    d.value.into_float().map_err(|v| e(v, d.index, "Health"))?,
3319                ));
3320            }
3321            10 => {
3322                entity.insert(EffectParticles(
3323                    d.value
3324                        .into_particles()
3325                        .map_err(|v| e(v, d.index, "EffectParticles"))?,
3326                ));
3327            }
3328            11 => {
3329                entity.insert(EffectAmbience(
3330                    d.value
3331                        .into_boolean()
3332                        .map_err(|v| e(v, d.index, "EffectAmbience"))?,
3333                ));
3334            }
3335            12 => {
3336                entity.insert(ArrowCount(
3337                    d.value
3338                        .into_int()
3339                        .map_err(|v| e(v, d.index, "ArrowCount"))?,
3340                ));
3341            }
3342            13 => {
3343                entity.insert(StingerCount(
3344                    d.value
3345                        .into_int()
3346                        .map_err(|v| e(v, d.index, "StingerCount"))?,
3347                ));
3348            }
3349            14 => {
3350                entity.insert(SleepingPos(
3351                    d.value
3352                        .into_optional_block_pos()
3353                        .map_err(|v| e(v, d.index, "SleepingPos"))?,
3354                ));
3355            }
3356            _ => {}
3357        }
3358        Ok(())
3359    }
3360}
3361
3362/// The metadata bundle for [AbstractLiving].
3363///
3364/// This type should generally not be used directly.
3365#[derive(Bundle)]
3366pub struct AbstractLivingMetadataBundle {
3367    _marker: AbstractLiving,
3368    parent: AbstractEntityMetadataBundle,
3369    auto_spin_attack: AutoSpinAttack,
3370    abstract_living_using_item: AbstractLivingUsingItem,
3371    health: Health,
3372    effect_particles: EffectParticles,
3373    effect_ambience: EffectAmbience,
3374    arrow_count: ArrowCount,
3375    stinger_count: StingerCount,
3376    sleeping_pos: SleepingPos,
3377}
3378impl Default for AbstractLivingMetadataBundle {
3379    fn default() -> Self {
3380        Self {
3381            _marker: AbstractLiving,
3382            parent: Default::default(),
3383            auto_spin_attack: AutoSpinAttack(false),
3384            abstract_living_using_item: AbstractLivingUsingItem(false),
3385            health: Health(1.0),
3386            effect_particles: EffectParticles(Default::default()),
3387            effect_ambience: EffectAmbience(false),
3388            arrow_count: ArrowCount(0),
3389            stinger_count: StingerCount(0),
3390            sleeping_pos: SleepingPos(None),
3391        }
3392    }
3393}
3394
3395#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3396/// A metadata field for [ArmorStand].
3397pub struct Small(pub bool);
3398#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3399/// A metadata field for [ArmorStand].
3400pub struct ShowArms(pub bool);
3401#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3402/// A metadata field for [ArmorStand].
3403pub struct ShowBasePlate(pub bool);
3404#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3405/// A metadata field for [ArmorStand].
3406pub struct ArmorStandMarker(pub bool);
3407/// A metadata field for [ArmorStand].
3408#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3409pub struct HeadPose(pub Rotations);
3410/// A metadata field for [ArmorStand].
3411#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3412pub struct BodyPose(pub Rotations);
3413/// A metadata field for [ArmorStand].
3414#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3415pub struct LeftArmPose(pub Rotations);
3416/// A metadata field for [ArmorStand].
3417#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3418pub struct RightArmPose(pub Rotations);
3419/// A metadata field for [ArmorStand].
3420#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3421pub struct LeftLegPose(pub Rotations);
3422/// A metadata field for [ArmorStand].
3423#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3424pub struct RightLegPose(pub Rotations);
3425/// The marker component for entities of type `minecraft:armor_stand`.
3426///
3427/// # Metadata
3428///
3429/// These are the metadata components that all `ArmorStand` entities are
3430/// guaranteed to have, in addition to the metadata components from parent
3431/// types:
3432///
3433/// - [Small]
3434/// - [ShowArms]
3435/// - [ShowBasePlate]
3436/// - [ArmorStandMarker]
3437/// - [HeadPose]
3438/// - [BodyPose]
3439/// - [LeftArmPose]
3440/// - [RightArmPose]
3441/// - [LeftLegPose]
3442/// - [RightLegPose]
3443///
3444/// # Parents
3445///
3446/// Entities with `ArmorStand` will also have the following marker components
3447/// and their metadata fields:
3448///
3449/// - [AbstractLiving]
3450/// - [AbstractEntity]
3451///
3452/// # Children
3453///
3454/// This entity type has no children types.
3455#[derive(Component)]
3456pub struct ArmorStand;
3457impl ArmorStand {
3458    fn apply_metadata(
3459        entity: &mut bevy_ecs::system::EntityCommands,
3460        d: EntityDataItem,
3461    ) -> Result<(), UpdateMetadataError> {
3462        match d.index {
3463            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3464            15 => {
3465                let bitfield = d
3466                    .value
3467                    .into_byte()
3468                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
3469                entity.insert(Small(bitfield & 0x1 != 0));
3470                entity.insert(ShowArms(bitfield & 0x4 != 0));
3471                entity.insert(ShowBasePlate(bitfield & 0x8 != 0));
3472                entity.insert(ArmorStandMarker(bitfield & 0x10 != 0));
3473            }
3474            16 => {
3475                entity.insert(HeadPose(
3476                    d.value
3477                        .into_rotations()
3478                        .map_err(|v| e(v, d.index, "HeadPose"))?,
3479                ));
3480            }
3481            17 => {
3482                entity.insert(BodyPose(
3483                    d.value
3484                        .into_rotations()
3485                        .map_err(|v| e(v, d.index, "BodyPose"))?,
3486                ));
3487            }
3488            18 => {
3489                entity.insert(LeftArmPose(
3490                    d.value
3491                        .into_rotations()
3492                        .map_err(|v| e(v, d.index, "LeftArmPose"))?,
3493                ));
3494            }
3495            19 => {
3496                entity.insert(RightArmPose(
3497                    d.value
3498                        .into_rotations()
3499                        .map_err(|v| e(v, d.index, "RightArmPose"))?,
3500                ));
3501            }
3502            20 => {
3503                entity.insert(LeftLegPose(
3504                    d.value
3505                        .into_rotations()
3506                        .map_err(|v| e(v, d.index, "LeftLegPose"))?,
3507                ));
3508            }
3509            21 => {
3510                entity.insert(RightLegPose(
3511                    d.value
3512                        .into_rotations()
3513                        .map_err(|v| e(v, d.index, "RightLegPose"))?,
3514                ));
3515            }
3516            _ => {}
3517        }
3518        Ok(())
3519    }
3520}
3521
3522/// The metadata bundle for [ArmorStand].
3523///
3524/// This type should generally not be used directly.
3525#[derive(Bundle)]
3526pub struct ArmorStandMetadataBundle {
3527    _marker: ArmorStand,
3528    parent: AbstractLivingMetadataBundle,
3529    small: Small,
3530    show_arms: ShowArms,
3531    show_base_plate: ShowBasePlate,
3532    armor_stand_marker: ArmorStandMarker,
3533    head_pose: HeadPose,
3534    body_pose: BodyPose,
3535    left_arm_pose: LeftArmPose,
3536    right_arm_pose: RightArmPose,
3537    left_leg_pose: LeftLegPose,
3538    right_leg_pose: RightLegPose,
3539}
3540impl Default for ArmorStandMetadataBundle {
3541    fn default() -> Self {
3542        Self {
3543            _marker: ArmorStand,
3544            parent: Default::default(),
3545            small: Small(false),
3546            show_arms: ShowArms(false),
3547            show_base_plate: ShowBasePlate(false),
3548            armor_stand_marker: ArmorStandMarker(false),
3549            head_pose: HeadPose(Default::default()),
3550            body_pose: BodyPose(Default::default()),
3551            left_arm_pose: LeftArmPose(Default::default()),
3552            right_arm_pose: RightArmPose(Default::default()),
3553            left_leg_pose: LeftLegPose(Default::default()),
3554            right_leg_pose: RightLegPose(Default::default()),
3555        }
3556    }
3557}
3558
3559/// A metadata field for [AbstractAvatar].
3560#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3561pub struct PlayerMainHand(pub HumanoidArm);
3562/// A metadata field for [AbstractAvatar].
3563#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3564pub struct PlayerModeCustomisation(pub u8);
3565/// An abstract entity marker component.
3566///
3567/// # Metadata
3568///
3569/// These are the metadata components that all `AbstractAvatar` entities are
3570/// guaranteed to have, in addition to the metadata components from parent
3571/// types:
3572///
3573/// - [PlayerMainHand]
3574/// - [PlayerModeCustomisation]
3575///
3576/// # Parents
3577///
3578/// Entities with `AbstractAvatar` will also have the following marker
3579/// components and their metadata fields:
3580///
3581/// - [AbstractLiving]
3582/// - [AbstractEntity]
3583///
3584/// # Children
3585///
3586/// - [Mannequin]
3587/// - [Player]
3588#[derive(Component)]
3589pub struct AbstractAvatar;
3590impl AbstractAvatar {
3591    fn apply_metadata(
3592        entity: &mut bevy_ecs::system::EntityCommands,
3593        d: EntityDataItem,
3594    ) -> Result<(), UpdateMetadataError> {
3595        match d.index {
3596            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3597            15 => {
3598                entity.insert(PlayerMainHand(
3599                    d.value
3600                        .into_humanoid_arm()
3601                        .map_err(|v| e(v, d.index, "PlayerMainHand"))?,
3602                ));
3603            }
3604            16 => {
3605                entity.insert(PlayerModeCustomisation(
3606                    d.value
3607                        .into_byte()
3608                        .map_err(|v| e(v, d.index, "PlayerModeCustomisation"))?,
3609                ));
3610            }
3611            _ => {}
3612        }
3613        Ok(())
3614    }
3615}
3616
3617/// The metadata bundle for [AbstractAvatar].
3618///
3619/// This type should generally not be used directly.
3620#[derive(Bundle)]
3621pub struct AbstractAvatarMetadataBundle {
3622    _marker: AbstractAvatar,
3623    parent: AbstractLivingMetadataBundle,
3624    player_main_hand: PlayerMainHand,
3625    player_mode_customisation: PlayerModeCustomisation,
3626}
3627impl Default for AbstractAvatarMetadataBundle {
3628    fn default() -> Self {
3629        Self {
3630            _marker: AbstractAvatar,
3631            parent: Default::default(),
3632            player_main_hand: PlayerMainHand(Default::default()),
3633            player_mode_customisation: PlayerModeCustomisation(0),
3634        }
3635    }
3636}
3637
3638/// A metadata field for [Mannequin].
3639#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3640pub struct Profile(pub components::Profile);
3641/// A metadata field for [Mannequin].
3642#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3643pub struct Immovable(pub bool);
3644/// A metadata field for [Mannequin].
3645#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3646pub struct Description(pub Option<Box<FormattedText>>);
3647/// The marker component for entities of type `minecraft:mannequin`.
3648///
3649/// # Metadata
3650///
3651/// These are the metadata components that all `Mannequin` entities are
3652/// guaranteed to have, in addition to the metadata components from parent
3653/// types:
3654///
3655/// - [Profile]
3656/// - [Immovable]
3657/// - [Description]
3658///
3659/// # Parents
3660///
3661/// Entities with `Mannequin` will also have the following marker components and
3662/// their metadata fields:
3663///
3664/// - [AbstractAvatar]
3665/// - [AbstractLiving]
3666/// - [AbstractEntity]
3667///
3668/// # Children
3669///
3670/// This entity type has no children types.
3671#[derive(Component)]
3672pub struct Mannequin;
3673impl Mannequin {
3674    fn apply_metadata(
3675        entity: &mut bevy_ecs::system::EntityCommands,
3676        d: EntityDataItem,
3677    ) -> Result<(), UpdateMetadataError> {
3678        match d.index {
3679            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3680            17 => {
3681                entity.insert(Profile(
3682                    d.value
3683                        .into_resolvable_profile()
3684                        .map_err(|v| e(v, d.index, "Profile"))?,
3685                ));
3686            }
3687            18 => {
3688                entity.insert(Immovable(
3689                    d.value
3690                        .into_boolean()
3691                        .map_err(|v| e(v, d.index, "Immovable"))?,
3692                ));
3693            }
3694            19 => {
3695                entity.insert(Description(
3696                    d.value
3697                        .into_optional_formatted_text()
3698                        .map_err(|v| e(v, d.index, "Description"))?,
3699                ));
3700            }
3701            _ => {}
3702        }
3703        Ok(())
3704    }
3705}
3706
3707/// The metadata bundle for [Mannequin].
3708///
3709/// This type should generally not be used directly.
3710#[derive(Bundle)]
3711pub struct MannequinMetadataBundle {
3712    _marker: Mannequin,
3713    parent: AbstractAvatarMetadataBundle,
3714    profile: Profile,
3715    immovable: Immovable,
3716    description: Description,
3717}
3718impl Default for MannequinMetadataBundle {
3719    fn default() -> Self {
3720        Self {
3721            _marker: Mannequin,
3722            parent: Default::default(),
3723            profile: Profile(Default::default()),
3724            immovable: Immovable(false),
3725            description: Description(Default::default()),
3726        }
3727    }
3728}
3729
3730/// A metadata field for [Player].
3731#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3732pub struct PlayerAbsorption(pub f32);
3733/// A metadata field for [Player].
3734#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3735pub struct Score(pub i32);
3736/// A metadata field for [Player].
3737#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3738pub struct ShoulderParrotLeft(pub OptionalUnsignedInt);
3739/// A metadata field for [Player].
3740#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3741pub struct ShoulderParrotRight(pub OptionalUnsignedInt);
3742/// The marker component for entities of type `minecraft:player`.
3743///
3744/// # Metadata
3745///
3746/// These are the metadata components that all `Player` entities are guaranteed
3747/// to have, in addition to the metadata components from parent types:
3748///
3749/// - [PlayerAbsorption]
3750/// - [Score]
3751/// - [ShoulderParrotLeft]
3752/// - [ShoulderParrotRight]
3753///
3754/// # Parents
3755///
3756/// Entities with `Player` will also have the following marker components and
3757/// their metadata fields:
3758///
3759/// - [AbstractAvatar]
3760/// - [AbstractLiving]
3761/// - [AbstractEntity]
3762///
3763/// # Children
3764///
3765/// This entity type has no children types.
3766#[derive(Component)]
3767pub struct Player;
3768impl Player {
3769    fn apply_metadata(
3770        entity: &mut bevy_ecs::system::EntityCommands,
3771        d: EntityDataItem,
3772    ) -> Result<(), UpdateMetadataError> {
3773        match d.index {
3774            0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
3775            17 => {
3776                entity.insert(PlayerAbsorption(
3777                    d.value
3778                        .into_float()
3779                        .map_err(|v| e(v, d.index, "PlayerAbsorption"))?,
3780                ));
3781            }
3782            18 => {
3783                entity.insert(Score(
3784                    d.value.into_int().map_err(|v| e(v, d.index, "Score"))?,
3785                ));
3786            }
3787            19 => {
3788                entity.insert(ShoulderParrotLeft(
3789                    d.value
3790                        .into_optional_unsigned_int()
3791                        .map_err(|v| e(v, d.index, "ShoulderParrotLeft"))?,
3792                ));
3793            }
3794            20 => {
3795                entity.insert(ShoulderParrotRight(
3796                    d.value
3797                        .into_optional_unsigned_int()
3798                        .map_err(|v| e(v, d.index, "ShoulderParrotRight"))?,
3799                ));
3800            }
3801            _ => {}
3802        }
3803        Ok(())
3804    }
3805}
3806
3807/// The metadata bundle for [Player].
3808///
3809/// This type should generally not be used directly.
3810#[derive(Bundle)]
3811pub struct PlayerMetadataBundle {
3812    _marker: Player,
3813    parent: AbstractAvatarMetadataBundle,
3814    player_absorption: PlayerAbsorption,
3815    score: Score,
3816    shoulder_parrot_left: ShoulderParrotLeft,
3817    shoulder_parrot_right: ShoulderParrotRight,
3818}
3819impl Default for PlayerMetadataBundle {
3820    fn default() -> Self {
3821        Self {
3822            _marker: Player,
3823            parent: Default::default(),
3824            player_absorption: PlayerAbsorption(0.0),
3825            score: Score(0),
3826            shoulder_parrot_left: ShoulderParrotLeft(OptionalUnsignedInt(None)),
3827            shoulder_parrot_right: ShoulderParrotRight(OptionalUnsignedInt(None)),
3828        }
3829    }
3830}
3831
3832#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3833/// A metadata field for [AbstractInsentient].
3834pub struct NoAi(pub bool);
3835#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3836/// A metadata field for [AbstractInsentient].
3837pub struct LeftHanded(pub bool);
3838#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3839/// A metadata field for [AbstractInsentient].
3840pub struct Aggressive(pub bool);
3841/// An abstract entity marker component.
3842///
3843/// # Metadata
3844///
3845/// These are the metadata components that all `AbstractInsentient` entities are
3846/// guaranteed to have, in addition to the metadata components from parent
3847/// types:
3848///
3849/// - [NoAi]
3850/// - [LeftHanded]
3851/// - [Aggressive]
3852///
3853/// # Parents
3854///
3855/// Entities with `AbstractInsentient` will also have the following marker
3856/// components and their metadata fields:
3857///
3858/// - [AbstractLiving]
3859/// - [AbstractEntity]
3860///
3861/// # Children
3862///
3863/// - [Bat]
3864/// - [EnderDragon]
3865/// - [Ghast]
3866/// - [Phantom]
3867/// - [AbstractCreature]
3868///   - [Allay]
3869///   - [CopperGolem]
3870///   - [IronGolem]
3871///   - [Pufferfish]
3872///   - [Shulker]
3873///   - [SnowGolem]
3874///   - [Tadpole]
3875///   - [AbstractAgeable]
3876///     - [Dolphin]
3877///     - [Squid]
3878///       - [GlowSquid]
3879///     - [AbstractAnimal]
3880///       - [Armadillo]
3881///       - [Axolotl]
3882///       - [Bee]
3883///       - [Chicken]
3884///       - [Cow]
3885///       - [Fox]
3886///       - [Frog]
3887///       - [Goat]
3888///       - [HappyGhast]
3889///       - [Hoglin]
3890///       - [Mooshroom]
3891///       - [Ocelot]
3892///       - [Panda]
3893///       - [Pig]
3894///       - [PolarBear]
3895///       - [Rabbit]
3896///       - [Sheep]
3897///       - [Sniffer]
3898///       - [Strider]
3899///       - [Turtle]
3900///       - [AbstractHorse]
3901///         - [Camel]
3902///           - [CamelHusk]
3903///         - [Horse]
3904///         - [SkeletonHorse]
3905///         - [ZombieHorse]
3906///         - [AbstractChestedHorse]
3907///           - [Donkey]
3908///           - [Llama]
3909///             - [TraderLlama]
3910///           - [Mule]
3911///       - [AbstractTameable]
3912///         - [Cat]
3913///         - [Parrot]
3914///         - [Wolf]
3915///         - [AbstractNautilus]
3916///           - [Nautilus]
3917///           - [ZombieNautilus]
3918///     - [AbstractCubeMob]
3919///       - [MagmaCube]
3920///       - [Slime]
3921///       - [SulfurCube]
3922///     - [AbstractVillager]
3923///       - [Villager]
3924///       - [WanderingTrader]
3925///   - [AbstractFish]
3926///     - [Cod]
3927///     - [Salmon]
3928///     - [TropicalFish]
3929///   - [AbstractMonster]
3930///     - [Blaze]
3931///     - [Bogged]
3932///     - [Breeze]
3933///     - [Creaking]
3934///     - [Creeper]
3935///     - [Enderman]
3936///     - [Endermite]
3937///     - [Giant]
3938///     - [Guardian]
3939///       - [ElderGuardian]
3940///     - [Parched]
3941///     - [Silverfish]
3942///     - [Skeleton]
3943///     - [Spider]
3944///       - [CaveSpider]
3945///     - [Stray]
3946///     - [Vex]
3947///     - [Warden]
3948///     - [Wither]
3949///     - [WitherSkeleton]
3950///     - [Zoglin]
3951///     - [Zombie]
3952///       - [Drowned]
3953///       - [Husk]
3954///       - [ZombieVillager]
3955///       - [ZombifiedPiglin]
3956///     - [AbstractPiglin]
3957///       - [Piglin]
3958///       - [PiglinBrute]
3959///     - [AbstractRaider]
3960///       - [Pillager]
3961///       - [Ravager]
3962///       - [Vindicator]
3963///       - [Witch]
3964///       - [AbstractSpellcasterIllager]
3965///         - [Evoker]
3966///         - [Illusioner]
3967#[derive(Component)]
3968pub struct AbstractInsentient;
3969impl AbstractInsentient {
3970    fn apply_metadata(
3971        entity: &mut bevy_ecs::system::EntityCommands,
3972        d: EntityDataItem,
3973    ) -> Result<(), UpdateMetadataError> {
3974        match d.index {
3975            0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3976            15 => {
3977                let bitfield = d
3978                    .value
3979                    .into_byte()
3980                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
3981                entity.insert(NoAi(bitfield & 0x1 != 0));
3982                entity.insert(LeftHanded(bitfield & 0x2 != 0));
3983                entity.insert(Aggressive(bitfield & 0x4 != 0));
3984            }
3985            _ => {}
3986        }
3987        Ok(())
3988    }
3989}
3990
3991/// The metadata bundle for [AbstractInsentient].
3992///
3993/// This type should generally not be used directly.
3994#[derive(Bundle)]
3995pub struct AbstractInsentientMetadataBundle {
3996    _marker: AbstractInsentient,
3997    parent: AbstractLivingMetadataBundle,
3998    no_ai: NoAi,
3999    left_handed: LeftHanded,
4000    aggressive: Aggressive,
4001}
4002impl Default for AbstractInsentientMetadataBundle {
4003    fn default() -> Self {
4004        Self {
4005            _marker: AbstractInsentient,
4006            parent: Default::default(),
4007            no_ai: NoAi(false),
4008            left_handed: LeftHanded(false),
4009            aggressive: Aggressive(false),
4010        }
4011    }
4012}
4013
4014#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4015/// A metadata field for [Bat].
4016pub struct Resting(pub bool);
4017/// The marker component for entities of type `minecraft:bat`.
4018///
4019/// # Metadata
4020///
4021/// These are the metadata components that all `Bat` entities are guaranteed to
4022/// have, in addition to the metadata components from parent types:
4023///
4024/// - [Resting]
4025///
4026/// # Parents
4027///
4028/// Entities with `Bat` will also have the following marker components and their
4029/// metadata fields:
4030///
4031/// - [AbstractInsentient]
4032/// - [AbstractLiving]
4033/// - [AbstractEntity]
4034///
4035/// # Children
4036///
4037/// This entity type has no children types.
4038#[derive(Component)]
4039pub struct Bat;
4040impl Bat {
4041    fn apply_metadata(
4042        entity: &mut bevy_ecs::system::EntityCommands,
4043        d: EntityDataItem,
4044    ) -> Result<(), UpdateMetadataError> {
4045        match d.index {
4046            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4047            16 => {
4048                let bitfield = d
4049                    .value
4050                    .into_byte()
4051                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
4052                entity.insert(Resting(bitfield & 0x1 != 0));
4053            }
4054            _ => {}
4055        }
4056        Ok(())
4057    }
4058}
4059
4060/// The metadata bundle for [Bat].
4061///
4062/// This type should generally not be used directly.
4063#[derive(Bundle)]
4064pub struct BatMetadataBundle {
4065    _marker: Bat,
4066    parent: AbstractInsentientMetadataBundle,
4067    resting: Resting,
4068}
4069impl Default for BatMetadataBundle {
4070    fn default() -> Self {
4071        Self {
4072            _marker: Bat,
4073            parent: Default::default(),
4074            resting: Resting(false),
4075        }
4076    }
4077}
4078
4079/// A metadata field for [EnderDragon].
4080#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4081pub struct Phase(pub i32);
4082/// The marker component for entities of type `minecraft:ender_dragon`.
4083///
4084/// # Metadata
4085///
4086/// These are the metadata components that all `EnderDragon` entities are
4087/// guaranteed to have, in addition to the metadata components from parent
4088/// types:
4089///
4090/// - [Phase]
4091///
4092/// # Parents
4093///
4094/// Entities with `EnderDragon` will also have the following marker components
4095/// and their metadata fields:
4096///
4097/// - [AbstractInsentient]
4098/// - [AbstractLiving]
4099/// - [AbstractEntity]
4100///
4101/// # Children
4102///
4103/// This entity type has no children types.
4104#[derive(Component)]
4105pub struct EnderDragon;
4106impl EnderDragon {
4107    fn apply_metadata(
4108        entity: &mut bevy_ecs::system::EntityCommands,
4109        d: EntityDataItem,
4110    ) -> Result<(), UpdateMetadataError> {
4111        match d.index {
4112            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4113            16 => {
4114                entity.insert(Phase(
4115                    d.value.into_int().map_err(|v| e(v, d.index, "Phase"))?,
4116                ));
4117            }
4118            _ => {}
4119        }
4120        Ok(())
4121    }
4122}
4123
4124/// The metadata bundle for [EnderDragon].
4125///
4126/// This type should generally not be used directly.
4127#[derive(Bundle)]
4128pub struct EnderDragonMetadataBundle {
4129    _marker: EnderDragon,
4130    parent: AbstractInsentientMetadataBundle,
4131    phase: Phase,
4132}
4133impl Default for EnderDragonMetadataBundle {
4134    fn default() -> Self {
4135        Self {
4136            _marker: EnderDragon,
4137            parent: Default::default(),
4138            phase: Phase(Default::default()),
4139        }
4140    }
4141}
4142
4143/// A metadata field for [Ghast].
4144#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4145pub struct IsCharging(pub bool);
4146/// The marker component for entities of type `minecraft:ghast`.
4147///
4148/// # Metadata
4149///
4150/// These are the metadata components that all `Ghast` entities are guaranteed
4151/// to have, in addition to the metadata components from parent types:
4152///
4153/// - [IsCharging]
4154///
4155/// # Parents
4156///
4157/// Entities with `Ghast` will also have the following marker components and
4158/// their metadata fields:
4159///
4160/// - [AbstractInsentient]
4161/// - [AbstractLiving]
4162/// - [AbstractEntity]
4163///
4164/// # Children
4165///
4166/// This entity type has no children types.
4167#[derive(Component)]
4168pub struct Ghast;
4169impl Ghast {
4170    fn apply_metadata(
4171        entity: &mut bevy_ecs::system::EntityCommands,
4172        d: EntityDataItem,
4173    ) -> Result<(), UpdateMetadataError> {
4174        match d.index {
4175            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4176            16 => {
4177                entity.insert(IsCharging(
4178                    d.value
4179                        .into_boolean()
4180                        .map_err(|v| e(v, d.index, "IsCharging"))?,
4181                ));
4182            }
4183            _ => {}
4184        }
4185        Ok(())
4186    }
4187}
4188
4189/// The metadata bundle for [Ghast].
4190///
4191/// This type should generally not be used directly.
4192#[derive(Bundle)]
4193pub struct GhastMetadataBundle {
4194    _marker: Ghast,
4195    parent: AbstractInsentientMetadataBundle,
4196    is_charging: IsCharging,
4197}
4198impl Default for GhastMetadataBundle {
4199    fn default() -> Self {
4200        Self {
4201            _marker: Ghast,
4202            parent: Default::default(),
4203            is_charging: IsCharging(false),
4204        }
4205    }
4206}
4207
4208/// A metadata field for [Phantom].
4209#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4210pub struct PhantomSize(pub i32);
4211/// The marker component for entities of type `minecraft:phantom`.
4212///
4213/// # Metadata
4214///
4215/// These are the metadata components that all `Phantom` entities are guaranteed
4216/// to have, in addition to the metadata components from parent types:
4217///
4218/// - [PhantomSize]
4219///
4220/// # Parents
4221///
4222/// Entities with `Phantom` will also have the following marker components and
4223/// their metadata fields:
4224///
4225/// - [AbstractInsentient]
4226/// - [AbstractLiving]
4227/// - [AbstractEntity]
4228///
4229/// # Children
4230///
4231/// This entity type has no children types.
4232#[derive(Component)]
4233pub struct Phantom;
4234impl Phantom {
4235    fn apply_metadata(
4236        entity: &mut bevy_ecs::system::EntityCommands,
4237        d: EntityDataItem,
4238    ) -> Result<(), UpdateMetadataError> {
4239        match d.index {
4240            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4241            16 => {
4242                entity.insert(PhantomSize(
4243                    d.value
4244                        .into_int()
4245                        .map_err(|v| e(v, d.index, "PhantomSize"))?,
4246                ));
4247            }
4248            _ => {}
4249        }
4250        Ok(())
4251    }
4252}
4253
4254/// The metadata bundle for [Phantom].
4255///
4256/// This type should generally not be used directly.
4257#[derive(Bundle)]
4258pub struct PhantomMetadataBundle {
4259    _marker: Phantom,
4260    parent: AbstractInsentientMetadataBundle,
4261    phantom_size: PhantomSize,
4262}
4263impl Default for PhantomMetadataBundle {
4264    fn default() -> Self {
4265        Self {
4266            _marker: Phantom,
4267            parent: Default::default(),
4268            phantom_size: PhantomSize(0),
4269        }
4270    }
4271}
4272
4273/// An abstract entity marker component.
4274///
4275/// # Metadata
4276///
4277/// This entity type does not add any additional metadata. It will still have
4278/// metadata from parent types.
4279///
4280/// # Parents
4281///
4282/// Entities with `AbstractCreature` will also have the following marker
4283/// components and their metadata fields:
4284///
4285/// - [AbstractInsentient]
4286/// - [AbstractLiving]
4287/// - [AbstractEntity]
4288///
4289/// # Children
4290///
4291/// - [Allay]
4292/// - [CopperGolem]
4293/// - [IronGolem]
4294/// - [Pufferfish]
4295/// - [Shulker]
4296/// - [SnowGolem]
4297/// - [Tadpole]
4298/// - [AbstractAgeable]
4299///   - [Dolphin]
4300///   - [Squid]
4301///     - [GlowSquid]
4302///   - [AbstractAnimal]
4303///     - [Armadillo]
4304///     - [Axolotl]
4305///     - [Bee]
4306///     - [Chicken]
4307///     - [Cow]
4308///     - [Fox]
4309///     - [Frog]
4310///     - [Goat]
4311///     - [HappyGhast]
4312///     - [Hoglin]
4313///     - [Mooshroom]
4314///     - [Ocelot]
4315///     - [Panda]
4316///     - [Pig]
4317///     - [PolarBear]
4318///     - [Rabbit]
4319///     - [Sheep]
4320///     - [Sniffer]
4321///     - [Strider]
4322///     - [Turtle]
4323///     - [AbstractHorse]
4324///       - [Camel]
4325///         - [CamelHusk]
4326///       - [Horse]
4327///       - [SkeletonHorse]
4328///       - [ZombieHorse]
4329///       - [AbstractChestedHorse]
4330///         - [Donkey]
4331///         - [Llama]
4332///           - [TraderLlama]
4333///         - [Mule]
4334///     - [AbstractTameable]
4335///       - [Cat]
4336///       - [Parrot]
4337///       - [Wolf]
4338///       - [AbstractNautilus]
4339///         - [Nautilus]
4340///         - [ZombieNautilus]
4341///   - [AbstractCubeMob]
4342///     - [MagmaCube]
4343///     - [Slime]
4344///     - [SulfurCube]
4345///   - [AbstractVillager]
4346///     - [Villager]
4347///     - [WanderingTrader]
4348/// - [AbstractFish]
4349///   - [Cod]
4350///   - [Salmon]
4351///   - [TropicalFish]
4352/// - [AbstractMonster]
4353///   - [Blaze]
4354///   - [Bogged]
4355///   - [Breeze]
4356///   - [Creaking]
4357///   - [Creeper]
4358///   - [Enderman]
4359///   - [Endermite]
4360///   - [Giant]
4361///   - [Guardian]
4362///     - [ElderGuardian]
4363///   - [Parched]
4364///   - [Silverfish]
4365///   - [Skeleton]
4366///   - [Spider]
4367///     - [CaveSpider]
4368///   - [Stray]
4369///   - [Vex]
4370///   - [Warden]
4371///   - [Wither]
4372///   - [WitherSkeleton]
4373///   - [Zoglin]
4374///   - [Zombie]
4375///     - [Drowned]
4376///     - [Husk]
4377///     - [ZombieVillager]
4378///     - [ZombifiedPiglin]
4379///   - [AbstractPiglin]
4380///     - [Piglin]
4381///     - [PiglinBrute]
4382///   - [AbstractRaider]
4383///     - [Pillager]
4384///     - [Ravager]
4385///     - [Vindicator]
4386///     - [Witch]
4387///     - [AbstractSpellcasterIllager]
4388///       - [Evoker]
4389///       - [Illusioner]
4390#[derive(Component)]
4391pub struct AbstractCreature;
4392impl AbstractCreature {
4393    fn apply_metadata(
4394        entity: &mut bevy_ecs::system::EntityCommands,
4395        d: EntityDataItem,
4396    ) -> Result<(), UpdateMetadataError> {
4397        match d.index {
4398            0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4399            _ => {}
4400        }
4401        Ok(())
4402    }
4403}
4404
4405/// The metadata bundle for [AbstractCreature].
4406///
4407/// This type should generally not be used directly.
4408#[derive(Bundle)]
4409pub struct AbstractCreatureMetadataBundle {
4410    _marker: AbstractCreature,
4411    parent: AbstractInsentientMetadataBundle,
4412}
4413impl Default for AbstractCreatureMetadataBundle {
4414    fn default() -> Self {
4415        Self {
4416            _marker: AbstractCreature,
4417            parent: Default::default(),
4418        }
4419    }
4420}
4421
4422/// A metadata field for [Allay].
4423#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4424pub struct Dancing(pub bool);
4425/// A metadata field for [Allay].
4426#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4427pub struct CanDuplicate(pub bool);
4428/// The marker component for entities of type `minecraft:allay`.
4429///
4430/// # Metadata
4431///
4432/// These are the metadata components that all `Allay` entities are guaranteed
4433/// to have, in addition to the metadata components from parent types:
4434///
4435/// - [Dancing]
4436/// - [CanDuplicate]
4437///
4438/// # Parents
4439///
4440/// Entities with `Allay` will also have the following marker components and
4441/// their metadata fields:
4442///
4443/// - [AbstractCreature]
4444/// - [AbstractInsentient]
4445/// - [AbstractLiving]
4446/// - [AbstractEntity]
4447///
4448/// # Children
4449///
4450/// This entity type has no children types.
4451#[derive(Component)]
4452pub struct Allay;
4453impl Allay {
4454    fn apply_metadata(
4455        entity: &mut bevy_ecs::system::EntityCommands,
4456        d: EntityDataItem,
4457    ) -> Result<(), UpdateMetadataError> {
4458        match d.index {
4459            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4460            16 => {
4461                entity.insert(Dancing(
4462                    d.value
4463                        .into_boolean()
4464                        .map_err(|v| e(v, d.index, "Dancing"))?,
4465                ));
4466            }
4467            17 => {
4468                entity.insert(CanDuplicate(
4469                    d.value
4470                        .into_boolean()
4471                        .map_err(|v| e(v, d.index, "CanDuplicate"))?,
4472                ));
4473            }
4474            _ => {}
4475        }
4476        Ok(())
4477    }
4478}
4479
4480/// The metadata bundle for [Allay].
4481///
4482/// This type should generally not be used directly.
4483#[derive(Bundle)]
4484pub struct AllayMetadataBundle {
4485    _marker: Allay,
4486    parent: AbstractCreatureMetadataBundle,
4487    dancing: Dancing,
4488    can_duplicate: CanDuplicate,
4489}
4490impl Default for AllayMetadataBundle {
4491    fn default() -> Self {
4492        Self {
4493            _marker: Allay,
4494            parent: Default::default(),
4495            dancing: Dancing(false),
4496            can_duplicate: CanDuplicate(true),
4497        }
4498    }
4499}
4500
4501/// A metadata field for [CopperGolem].
4502#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4503pub struct WeatherState(pub WeatheringCopperStateKind);
4504/// A metadata field for [CopperGolem].
4505#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4506pub struct CopperGolemState(pub CopperGolemStateKind);
4507/// The marker component for entities of type `minecraft:copper_golem`.
4508///
4509/// # Metadata
4510///
4511/// These are the metadata components that all `CopperGolem` entities are
4512/// guaranteed to have, in addition to the metadata components from parent
4513/// types:
4514///
4515/// - [WeatherState]
4516/// - [CopperGolemState]
4517///
4518/// # Parents
4519///
4520/// Entities with `CopperGolem` will also have the following marker components
4521/// and their metadata fields:
4522///
4523/// - [AbstractCreature]
4524/// - [AbstractInsentient]
4525/// - [AbstractLiving]
4526/// - [AbstractEntity]
4527///
4528/// # Children
4529///
4530/// This entity type has no children types.
4531#[derive(Component)]
4532pub struct CopperGolem;
4533impl CopperGolem {
4534    fn apply_metadata(
4535        entity: &mut bevy_ecs::system::EntityCommands,
4536        d: EntityDataItem,
4537    ) -> Result<(), UpdateMetadataError> {
4538        match d.index {
4539            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4540            16 => {
4541                entity.insert(WeatherState(
4542                    d.value
4543                        .into_weathering_copper_state()
4544                        .map_err(|v| e(v, d.index, "WeatherState"))?,
4545                ));
4546            }
4547            17 => {
4548                entity.insert(CopperGolemState(
4549                    d.value
4550                        .into_copper_golem_state()
4551                        .map_err(|v| e(v, d.index, "CopperGolemState"))?,
4552                ));
4553            }
4554            _ => {}
4555        }
4556        Ok(())
4557    }
4558}
4559
4560/// The metadata bundle for [CopperGolem].
4561///
4562/// This type should generally not be used directly.
4563#[derive(Bundle)]
4564pub struct CopperGolemMetadataBundle {
4565    _marker: CopperGolem,
4566    parent: AbstractCreatureMetadataBundle,
4567    weather_state: WeatherState,
4568    copper_golem_state: CopperGolemState,
4569}
4570impl Default for CopperGolemMetadataBundle {
4571    fn default() -> Self {
4572        Self {
4573            _marker: CopperGolem,
4574            parent: Default::default(),
4575            weather_state: WeatherState(Default::default()),
4576            copper_golem_state: CopperGolemState(Default::default()),
4577        }
4578    }
4579}
4580
4581#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4582/// A metadata field for [IronGolem].
4583pub struct PlayerCreated(pub bool);
4584/// The marker component for entities of type `minecraft:iron_golem`.
4585///
4586/// # Metadata
4587///
4588/// These are the metadata components that all `IronGolem` entities are
4589/// guaranteed to have, in addition to the metadata components from parent
4590/// types:
4591///
4592/// - [PlayerCreated]
4593///
4594/// # Parents
4595///
4596/// Entities with `IronGolem` will also have the following marker components and
4597/// their metadata fields:
4598///
4599/// - [AbstractCreature]
4600/// - [AbstractInsentient]
4601/// - [AbstractLiving]
4602/// - [AbstractEntity]
4603///
4604/// # Children
4605///
4606/// This entity type has no children types.
4607#[derive(Component)]
4608pub struct IronGolem;
4609impl IronGolem {
4610    fn apply_metadata(
4611        entity: &mut bevy_ecs::system::EntityCommands,
4612        d: EntityDataItem,
4613    ) -> Result<(), UpdateMetadataError> {
4614        match d.index {
4615            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4616            16 => {
4617                let bitfield = d
4618                    .value
4619                    .into_byte()
4620                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
4621                entity.insert(PlayerCreated(bitfield & 0x1 != 0));
4622            }
4623            _ => {}
4624        }
4625        Ok(())
4626    }
4627}
4628
4629/// The metadata bundle for [IronGolem].
4630///
4631/// This type should generally not be used directly.
4632#[derive(Bundle)]
4633pub struct IronGolemMetadataBundle {
4634    _marker: IronGolem,
4635    parent: AbstractCreatureMetadataBundle,
4636    player_created: PlayerCreated,
4637}
4638impl Default for IronGolemMetadataBundle {
4639    fn default() -> Self {
4640        Self {
4641            _marker: IronGolem,
4642            parent: Default::default(),
4643            player_created: PlayerCreated(false),
4644        }
4645    }
4646}
4647
4648/// A metadata field for [Pufferfish].
4649#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4650pub struct PufferfishFromBucket(pub bool);
4651/// A metadata field for [Pufferfish].
4652#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4653pub struct PuffState(pub i32);
4654/// The marker component for entities of type `minecraft:pufferfish`.
4655///
4656/// # Metadata
4657///
4658/// These are the metadata components that all `Pufferfish` entities are
4659/// guaranteed to have, in addition to the metadata components from parent
4660/// types:
4661///
4662/// - [PufferfishFromBucket]
4663/// - [PuffState]
4664///
4665/// # Parents
4666///
4667/// Entities with `Pufferfish` will also have the following marker components
4668/// and their metadata fields:
4669///
4670/// - [AbstractCreature]
4671/// - [AbstractInsentient]
4672/// - [AbstractLiving]
4673/// - [AbstractEntity]
4674///
4675/// # Children
4676///
4677/// This entity type has no children types.
4678#[derive(Component)]
4679pub struct Pufferfish;
4680impl Pufferfish {
4681    fn apply_metadata(
4682        entity: &mut bevy_ecs::system::EntityCommands,
4683        d: EntityDataItem,
4684    ) -> Result<(), UpdateMetadataError> {
4685        match d.index {
4686            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4687            16 => {
4688                entity.insert(PufferfishFromBucket(
4689                    d.value
4690                        .into_boolean()
4691                        .map_err(|v| e(v, d.index, "PufferfishFromBucket"))?,
4692                ));
4693            }
4694            17 => {
4695                entity.insert(PuffState(
4696                    d.value.into_int().map_err(|v| e(v, d.index, "PuffState"))?,
4697                ));
4698            }
4699            _ => {}
4700        }
4701        Ok(())
4702    }
4703}
4704
4705/// The metadata bundle for [Pufferfish].
4706///
4707/// This type should generally not be used directly.
4708#[derive(Bundle)]
4709pub struct PufferfishMetadataBundle {
4710    _marker: Pufferfish,
4711    parent: AbstractCreatureMetadataBundle,
4712    pufferfish_from_bucket: PufferfishFromBucket,
4713    puff_state: PuffState,
4714}
4715impl Default for PufferfishMetadataBundle {
4716    fn default() -> Self {
4717        Self {
4718            _marker: Pufferfish,
4719            parent: Default::default(),
4720            pufferfish_from_bucket: PufferfishFromBucket(false),
4721            puff_state: PuffState(0),
4722        }
4723    }
4724}
4725
4726/// A metadata field for [Shulker].
4727#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4728pub struct AttachFace(pub Direction);
4729/// A metadata field for [Shulker].
4730#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4731pub struct Peek(pub u8);
4732/// A metadata field for [Shulker].
4733#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4734pub struct ShulkerColor(pub u8);
4735/// The marker component for entities of type `minecraft:shulker`.
4736///
4737/// # Metadata
4738///
4739/// These are the metadata components that all `Shulker` entities are guaranteed
4740/// to have, in addition to the metadata components from parent types:
4741///
4742/// - [AttachFace]
4743/// - [Peek]
4744/// - [ShulkerColor]
4745///
4746/// # Parents
4747///
4748/// Entities with `Shulker` will also have the following marker components and
4749/// their metadata fields:
4750///
4751/// - [AbstractCreature]
4752/// - [AbstractInsentient]
4753/// - [AbstractLiving]
4754/// - [AbstractEntity]
4755///
4756/// # Children
4757///
4758/// This entity type has no children types.
4759#[derive(Component)]
4760pub struct Shulker;
4761impl Shulker {
4762    fn apply_metadata(
4763        entity: &mut bevy_ecs::system::EntityCommands,
4764        d: EntityDataItem,
4765    ) -> Result<(), UpdateMetadataError> {
4766        match d.index {
4767            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4768            16 => {
4769                entity.insert(AttachFace(
4770                    d.value
4771                        .into_direction()
4772                        .map_err(|v| e(v, d.index, "AttachFace"))?,
4773                ));
4774            }
4775            17 => {
4776                entity.insert(Peek(
4777                    d.value.into_byte().map_err(|v| e(v, d.index, "Peek"))?,
4778                ));
4779            }
4780            18 => {
4781                entity.insert(ShulkerColor(
4782                    d.value
4783                        .into_byte()
4784                        .map_err(|v| e(v, d.index, "ShulkerColor"))?,
4785                ));
4786            }
4787            _ => {}
4788        }
4789        Ok(())
4790    }
4791}
4792
4793/// The metadata bundle for [Shulker].
4794///
4795/// This type should generally not be used directly.
4796#[derive(Bundle)]
4797pub struct ShulkerMetadataBundle {
4798    _marker: Shulker,
4799    parent: AbstractCreatureMetadataBundle,
4800    attach_face: AttachFace,
4801    peek: Peek,
4802    shulker_color: ShulkerColor,
4803}
4804impl Default for ShulkerMetadataBundle {
4805    fn default() -> Self {
4806        Self {
4807            _marker: Shulker,
4808            parent: Default::default(),
4809            attach_face: AttachFace(Default::default()),
4810            peek: Peek(0),
4811            shulker_color: ShulkerColor(16),
4812        }
4813    }
4814}
4815
4816#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4817/// A metadata field for [SnowGolem].
4818pub struct HasPumpkin(pub bool);
4819/// The marker component for entities of type `minecraft:snow_golem`.
4820///
4821/// # Metadata
4822///
4823/// These are the metadata components that all `SnowGolem` entities are
4824/// guaranteed to have, in addition to the metadata components from parent
4825/// types:
4826///
4827/// - [HasPumpkin]
4828///
4829/// # Parents
4830///
4831/// Entities with `SnowGolem` will also have the following marker components and
4832/// their metadata fields:
4833///
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 SnowGolem;
4844impl SnowGolem {
4845    fn apply_metadata(
4846        entity: &mut bevy_ecs::system::EntityCommands,
4847        d: EntityDataItem,
4848    ) -> Result<(), UpdateMetadataError> {
4849        match d.index {
4850            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4851            16 => {
4852                let bitfield = d
4853                    .value
4854                    .into_byte()
4855                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
4856                entity.insert(HasPumpkin(bitfield & 0x10 != 0));
4857            }
4858            _ => {}
4859        }
4860        Ok(())
4861    }
4862}
4863
4864/// The metadata bundle for [SnowGolem].
4865///
4866/// This type should generally not be used directly.
4867#[derive(Bundle)]
4868pub struct SnowGolemMetadataBundle {
4869    _marker: SnowGolem,
4870    parent: AbstractCreatureMetadataBundle,
4871    has_pumpkin: HasPumpkin,
4872}
4873impl Default for SnowGolemMetadataBundle {
4874    fn default() -> Self {
4875        Self {
4876            _marker: SnowGolem,
4877            parent: Default::default(),
4878            has_pumpkin: HasPumpkin(true),
4879        }
4880    }
4881}
4882
4883/// A metadata field for [Tadpole].
4884#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4885pub struct TadpoleFromBucket(pub bool);
4886/// A metadata field for [Tadpole].
4887#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4888pub struct TadpoleAgeLocked(pub bool);
4889/// The marker component for entities of type `minecraft:tadpole`.
4890///
4891/// # Metadata
4892///
4893/// These are the metadata components that all `Tadpole` entities are guaranteed
4894/// to have, in addition to the metadata components from parent types:
4895///
4896/// - [TadpoleFromBucket]
4897/// - [TadpoleAgeLocked]
4898///
4899/// # Parents
4900///
4901/// Entities with `Tadpole` will also have the following marker components and
4902/// their metadata fields:
4903///
4904/// - [AbstractCreature]
4905/// - [AbstractInsentient]
4906/// - [AbstractLiving]
4907/// - [AbstractEntity]
4908///
4909/// # Children
4910///
4911/// This entity type has no children types.
4912#[derive(Component)]
4913pub struct Tadpole;
4914impl Tadpole {
4915    fn apply_metadata(
4916        entity: &mut bevy_ecs::system::EntityCommands,
4917        d: EntityDataItem,
4918    ) -> Result<(), UpdateMetadataError> {
4919        match d.index {
4920            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
4921            16 => {
4922                entity.insert(TadpoleFromBucket(
4923                    d.value
4924                        .into_boolean()
4925                        .map_err(|v| e(v, d.index, "TadpoleFromBucket"))?,
4926                ));
4927            }
4928            17 => {
4929                entity.insert(TadpoleAgeLocked(
4930                    d.value
4931                        .into_boolean()
4932                        .map_err(|v| e(v, d.index, "TadpoleAgeLocked"))?,
4933                ));
4934            }
4935            _ => {}
4936        }
4937        Ok(())
4938    }
4939}
4940
4941/// The metadata bundle for [Tadpole].
4942///
4943/// This type should generally not be used directly.
4944#[derive(Bundle)]
4945pub struct TadpoleMetadataBundle {
4946    _marker: Tadpole,
4947    parent: AbstractCreatureMetadataBundle,
4948    tadpole_from_bucket: TadpoleFromBucket,
4949    tadpole_age_locked: TadpoleAgeLocked,
4950}
4951impl Default for TadpoleMetadataBundle {
4952    fn default() -> Self {
4953        Self {
4954            _marker: Tadpole,
4955            parent: Default::default(),
4956            tadpole_from_bucket: TadpoleFromBucket(false),
4957            tadpole_age_locked: TadpoleAgeLocked(false),
4958        }
4959    }
4960}
4961
4962/// A metadata field for [AbstractAgeable].
4963#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4964pub struct AbstractAgeableBaby(pub bool);
4965/// A metadata field for [AbstractAgeable].
4966#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4967pub struct AbstractAgeableAgeLocked(pub bool);
4968/// An abstract entity marker component.
4969///
4970/// # Metadata
4971///
4972/// These are the metadata components that all `AbstractAgeable` entities are
4973/// guaranteed to have, in addition to the metadata components from parent
4974/// types:
4975///
4976/// - [AbstractAgeableBaby]
4977/// - [AbstractAgeableAgeLocked]
4978///
4979/// # Parents
4980///
4981/// Entities with `AbstractAgeable` will also have the following marker
4982/// components and their metadata fields:
4983///
4984/// - [AbstractCreature]
4985/// - [AbstractInsentient]
4986/// - [AbstractLiving]
4987/// - [AbstractEntity]
4988///
4989/// # Children
4990///
4991/// - [Dolphin]
4992/// - [Squid]
4993///   - [GlowSquid]
4994/// - [AbstractAnimal]
4995///   - [Armadillo]
4996///   - [Axolotl]
4997///   - [Bee]
4998///   - [Chicken]
4999///   - [Cow]
5000///   - [Fox]
5001///   - [Frog]
5002///   - [Goat]
5003///   - [HappyGhast]
5004///   - [Hoglin]
5005///   - [Mooshroom]
5006///   - [Ocelot]
5007///   - [Panda]
5008///   - [Pig]
5009///   - [PolarBear]
5010///   - [Rabbit]
5011///   - [Sheep]
5012///   - [Sniffer]
5013///   - [Strider]
5014///   - [Turtle]
5015///   - [AbstractHorse]
5016///     - [Camel]
5017///       - [CamelHusk]
5018///     - [Horse]
5019///     - [SkeletonHorse]
5020///     - [ZombieHorse]
5021///     - [AbstractChestedHorse]
5022///       - [Donkey]
5023///       - [Llama]
5024///         - [TraderLlama]
5025///       - [Mule]
5026///   - [AbstractTameable]
5027///     - [Cat]
5028///     - [Parrot]
5029///     - [Wolf]
5030///     - [AbstractNautilus]
5031///       - [Nautilus]
5032///       - [ZombieNautilus]
5033/// - [AbstractCubeMob]
5034///   - [MagmaCube]
5035///   - [Slime]
5036///   - [SulfurCube]
5037/// - [AbstractVillager]
5038///   - [Villager]
5039///   - [WanderingTrader]
5040#[derive(Component)]
5041pub struct AbstractAgeable;
5042impl AbstractAgeable {
5043    fn apply_metadata(
5044        entity: &mut bevy_ecs::system::EntityCommands,
5045        d: EntityDataItem,
5046    ) -> Result<(), UpdateMetadataError> {
5047        match d.index {
5048            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5049            16 => {
5050                entity.insert(AbstractAgeableBaby(
5051                    d.value
5052                        .into_boolean()
5053                        .map_err(|v| e(v, d.index, "AbstractAgeableBaby"))?,
5054                ));
5055            }
5056            17 => {
5057                entity.insert(AbstractAgeableAgeLocked(
5058                    d.value
5059                        .into_boolean()
5060                        .map_err(|v| e(v, d.index, "AbstractAgeableAgeLocked"))?,
5061                ));
5062            }
5063            _ => {}
5064        }
5065        Ok(())
5066    }
5067}
5068
5069/// The metadata bundle for [AbstractAgeable].
5070///
5071/// This type should generally not be used directly.
5072#[derive(Bundle)]
5073pub struct AbstractAgeableMetadataBundle {
5074    _marker: AbstractAgeable,
5075    parent: AbstractCreatureMetadataBundle,
5076    abstract_ageable_baby: AbstractAgeableBaby,
5077    abstract_ageable_age_locked: AbstractAgeableAgeLocked,
5078}
5079impl Default for AbstractAgeableMetadataBundle {
5080    fn default() -> Self {
5081        Self {
5082            _marker: AbstractAgeable,
5083            parent: Default::default(),
5084            abstract_ageable_baby: AbstractAgeableBaby(false),
5085            abstract_ageable_age_locked: AbstractAgeableAgeLocked(false),
5086        }
5087    }
5088}
5089
5090/// A metadata field for [Dolphin].
5091#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5092pub struct GotFish(pub bool);
5093/// A metadata field for [Dolphin].
5094#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5095pub struct MoistnessLevel(pub i32);
5096/// The marker component for entities of type `minecraft:dolphin`.
5097///
5098/// # Metadata
5099///
5100/// These are the metadata components that all `Dolphin` entities are guaranteed
5101/// to have, in addition to the metadata components from parent types:
5102///
5103/// - [GotFish]
5104/// - [MoistnessLevel]
5105///
5106/// # Parents
5107///
5108/// Entities with `Dolphin` will also have the following marker components and
5109/// their metadata fields:
5110///
5111/// - [AbstractAgeable]
5112/// - [AbstractCreature]
5113/// - [AbstractInsentient]
5114/// - [AbstractLiving]
5115/// - [AbstractEntity]
5116///
5117/// # Children
5118///
5119/// This entity type has no children types.
5120#[derive(Component)]
5121pub struct Dolphin;
5122impl Dolphin {
5123    fn apply_metadata(
5124        entity: &mut bevy_ecs::system::EntityCommands,
5125        d: EntityDataItem,
5126    ) -> Result<(), UpdateMetadataError> {
5127        match d.index {
5128            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
5129            18 => {
5130                entity.insert(GotFish(
5131                    d.value
5132                        .into_boolean()
5133                        .map_err(|v| e(v, d.index, "GotFish"))?,
5134                ));
5135            }
5136            19 => {
5137                entity.insert(MoistnessLevel(
5138                    d.value
5139                        .into_int()
5140                        .map_err(|v| e(v, d.index, "MoistnessLevel"))?,
5141                ));
5142            }
5143            _ => {}
5144        }
5145        Ok(())
5146    }
5147}
5148
5149/// The metadata bundle for [Dolphin].
5150///
5151/// This type should generally not be used directly.
5152#[derive(Bundle)]
5153pub struct DolphinMetadataBundle {
5154    _marker: Dolphin,
5155    parent: AbstractAgeableMetadataBundle,
5156    got_fish: GotFish,
5157    moistness_level: MoistnessLevel,
5158}
5159impl Default for DolphinMetadataBundle {
5160    fn default() -> Self {
5161        Self {
5162            _marker: Dolphin,
5163            parent: Default::default(),
5164            got_fish: GotFish(false),
5165            moistness_level: MoistnessLevel(2400),
5166        }
5167    }
5168}
5169
5170/// The marker component for entities of type `minecraft:squid`.
5171///
5172/// # Metadata
5173///
5174/// This entity type does not add any additional metadata. It will still have
5175/// metadata from parent types.
5176///
5177/// # Parents
5178///
5179/// Entities with `Squid` will also have the following marker components and
5180/// their metadata fields:
5181///
5182/// - [AbstractAgeable]
5183/// - [AbstractCreature]
5184/// - [AbstractInsentient]
5185/// - [AbstractLiving]
5186/// - [AbstractEntity]
5187///
5188/// # Children
5189///
5190/// - [GlowSquid]
5191#[derive(Component)]
5192pub struct Squid;
5193impl Squid {
5194    fn apply_metadata(
5195        entity: &mut bevy_ecs::system::EntityCommands,
5196        d: EntityDataItem,
5197    ) -> Result<(), UpdateMetadataError> {
5198        match d.index {
5199            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
5200            _ => {}
5201        }
5202        Ok(())
5203    }
5204}
5205
5206/// The metadata bundle for [Squid].
5207///
5208/// This type should generally not be used directly.
5209#[derive(Bundle)]
5210pub struct SquidMetadataBundle {
5211    _marker: Squid,
5212    parent: AbstractAgeableMetadataBundle,
5213}
5214impl Default for SquidMetadataBundle {
5215    fn default() -> Self {
5216        Self {
5217            _marker: Squid,
5218            parent: Default::default(),
5219        }
5220    }
5221}
5222
5223/// A metadata field for [GlowSquid].
5224#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5225pub struct DarkTicksRemaining(pub i32);
5226/// The marker component for entities of type `minecraft:glow_squid`.
5227///
5228/// # Metadata
5229///
5230/// These are the metadata components that all `GlowSquid` entities are
5231/// guaranteed to have, in addition to the metadata components from parent
5232/// types:
5233///
5234/// - [DarkTicksRemaining]
5235///
5236/// # Parents
5237///
5238/// Entities with `GlowSquid` will also have the following marker components and
5239/// their metadata fields:
5240///
5241/// - [Squid]
5242/// - [AbstractAgeable]
5243/// - [AbstractCreature]
5244/// - [AbstractInsentient]
5245/// - [AbstractLiving]
5246/// - [AbstractEntity]
5247///
5248/// # Children
5249///
5250/// This entity type has no children types.
5251#[derive(Component)]
5252pub struct GlowSquid;
5253impl GlowSquid {
5254    fn apply_metadata(
5255        entity: &mut bevy_ecs::system::EntityCommands,
5256        d: EntityDataItem,
5257    ) -> Result<(), UpdateMetadataError> {
5258        match d.index {
5259            0..=17 => Squid::apply_metadata(entity, d)?,
5260            18 => {
5261                entity.insert(DarkTicksRemaining(
5262                    d.value
5263                        .into_int()
5264                        .map_err(|v| e(v, d.index, "DarkTicksRemaining"))?,
5265                ));
5266            }
5267            _ => {}
5268        }
5269        Ok(())
5270    }
5271}
5272
5273/// The metadata bundle for [GlowSquid].
5274///
5275/// This type should generally not be used directly.
5276#[derive(Bundle)]
5277pub struct GlowSquidMetadataBundle {
5278    _marker: GlowSquid,
5279    parent: SquidMetadataBundle,
5280    dark_ticks_remaining: DarkTicksRemaining,
5281}
5282impl Default for GlowSquidMetadataBundle {
5283    fn default() -> Self {
5284        Self {
5285            _marker: GlowSquid,
5286            parent: Default::default(),
5287            dark_ticks_remaining: DarkTicksRemaining(0),
5288        }
5289    }
5290}
5291
5292/// An abstract entity marker component.
5293///
5294/// # Metadata
5295///
5296/// This entity type does not add any additional metadata. It will still have
5297/// metadata from parent types.
5298///
5299/// # Parents
5300///
5301/// Entities with `AbstractAnimal` will also have the following marker
5302/// components and their metadata fields:
5303///
5304/// - [AbstractAgeable]
5305/// - [AbstractCreature]
5306/// - [AbstractInsentient]
5307/// - [AbstractLiving]
5308/// - [AbstractEntity]
5309///
5310/// # Children
5311///
5312/// - [Armadillo]
5313/// - [Axolotl]
5314/// - [Bee]
5315/// - [Chicken]
5316/// - [Cow]
5317/// - [Fox]
5318/// - [Frog]
5319/// - [Goat]
5320/// - [HappyGhast]
5321/// - [Hoglin]
5322/// - [Mooshroom]
5323/// - [Ocelot]
5324/// - [Panda]
5325/// - [Pig]
5326/// - [PolarBear]
5327/// - [Rabbit]
5328/// - [Sheep]
5329/// - [Sniffer]
5330/// - [Strider]
5331/// - [Turtle]
5332/// - [AbstractHorse]
5333///   - [Camel]
5334///     - [CamelHusk]
5335///   - [Horse]
5336///   - [SkeletonHorse]
5337///   - [ZombieHorse]
5338///   - [AbstractChestedHorse]
5339///     - [Donkey]
5340///     - [Llama]
5341///       - [TraderLlama]
5342///     - [Mule]
5343/// - [AbstractTameable]
5344///   - [Cat]
5345///   - [Parrot]
5346///   - [Wolf]
5347///   - [AbstractNautilus]
5348///     - [Nautilus]
5349///     - [ZombieNautilus]
5350#[derive(Component)]
5351pub struct AbstractAnimal;
5352impl AbstractAnimal {
5353    fn apply_metadata(
5354        entity: &mut bevy_ecs::system::EntityCommands,
5355        d: EntityDataItem,
5356    ) -> Result<(), UpdateMetadataError> {
5357        match d.index {
5358            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
5359            _ => {}
5360        }
5361        Ok(())
5362    }
5363}
5364
5365/// The metadata bundle for [AbstractAnimal].
5366///
5367/// This type should generally not be used directly.
5368#[derive(Bundle)]
5369pub struct AbstractAnimalMetadataBundle {
5370    _marker: AbstractAnimal,
5371    parent: AbstractAgeableMetadataBundle,
5372}
5373impl Default for AbstractAnimalMetadataBundle {
5374    fn default() -> Self {
5375        Self {
5376            _marker: AbstractAnimal,
5377            parent: Default::default(),
5378        }
5379    }
5380}
5381
5382/// A metadata field for [Armadillo].
5383#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5384pub struct ArmadilloState(pub ArmadilloStateKind);
5385/// The marker component for entities of type `minecraft:armadillo`.
5386///
5387/// # Metadata
5388///
5389/// These are the metadata components that all `Armadillo` entities are
5390/// guaranteed to have, in addition to the metadata components from parent
5391/// types:
5392///
5393/// - [ArmadilloState]
5394///
5395/// # Parents
5396///
5397/// Entities with `Armadillo` will also have the following marker components and
5398/// their metadata fields:
5399///
5400/// - [AbstractAnimal]
5401/// - [AbstractAgeable]
5402/// - [AbstractCreature]
5403/// - [AbstractInsentient]
5404/// - [AbstractLiving]
5405/// - [AbstractEntity]
5406///
5407/// # Children
5408///
5409/// This entity type has no children types.
5410#[derive(Component)]
5411pub struct Armadillo;
5412impl Armadillo {
5413    fn apply_metadata(
5414        entity: &mut bevy_ecs::system::EntityCommands,
5415        d: EntityDataItem,
5416    ) -> Result<(), UpdateMetadataError> {
5417        match d.index {
5418            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5419            18 => {
5420                entity.insert(ArmadilloState(
5421                    d.value
5422                        .into_armadillo_state()
5423                        .map_err(|v| e(v, d.index, "ArmadilloState"))?,
5424                ));
5425            }
5426            _ => {}
5427        }
5428        Ok(())
5429    }
5430}
5431
5432/// The metadata bundle for [Armadillo].
5433///
5434/// This type should generally not be used directly.
5435#[derive(Bundle)]
5436pub struct ArmadilloMetadataBundle {
5437    _marker: Armadillo,
5438    parent: AbstractAnimalMetadataBundle,
5439    armadillo_state: ArmadilloState,
5440}
5441impl Default for ArmadilloMetadataBundle {
5442    fn default() -> Self {
5443        Self {
5444            _marker: Armadillo,
5445            parent: Default::default(),
5446            armadillo_state: ArmadilloState(Default::default()),
5447        }
5448    }
5449}
5450
5451/// A metadata field for [Axolotl].
5452#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5453pub struct AxolotlVariant(pub i32);
5454/// A metadata field for [Axolotl].
5455#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5456pub struct PlayingDead(pub bool);
5457/// A metadata field for [Axolotl].
5458#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5459pub struct AxolotlFromBucket(pub bool);
5460/// The marker component for entities of type `minecraft:axolotl`.
5461///
5462/// # Metadata
5463///
5464/// These are the metadata components that all `Axolotl` entities are guaranteed
5465/// to have, in addition to the metadata components from parent types:
5466///
5467/// - [AxolotlVariant]
5468/// - [PlayingDead]
5469/// - [AxolotlFromBucket]
5470///
5471/// # Parents
5472///
5473/// Entities with `Axolotl` will also have the following marker components and
5474/// their metadata fields:
5475///
5476/// - [AbstractAnimal]
5477/// - [AbstractAgeable]
5478/// - [AbstractCreature]
5479/// - [AbstractInsentient]
5480/// - [AbstractLiving]
5481/// - [AbstractEntity]
5482///
5483/// # Children
5484///
5485/// This entity type has no children types.
5486#[derive(Component)]
5487pub struct Axolotl;
5488impl Axolotl {
5489    fn apply_metadata(
5490        entity: &mut bevy_ecs::system::EntityCommands,
5491        d: EntityDataItem,
5492    ) -> Result<(), UpdateMetadataError> {
5493        match d.index {
5494            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5495            18 => {
5496                entity.insert(AxolotlVariant(
5497                    d.value
5498                        .into_int()
5499                        .map_err(|v| e(v, d.index, "AxolotlVariant"))?,
5500                ));
5501            }
5502            19 => {
5503                entity.insert(PlayingDead(
5504                    d.value
5505                        .into_boolean()
5506                        .map_err(|v| e(v, d.index, "PlayingDead"))?,
5507                ));
5508            }
5509            20 => {
5510                entity.insert(AxolotlFromBucket(
5511                    d.value
5512                        .into_boolean()
5513                        .map_err(|v| e(v, d.index, "AxolotlFromBucket"))?,
5514                ));
5515            }
5516            _ => {}
5517        }
5518        Ok(())
5519    }
5520}
5521
5522/// The metadata bundle for [Axolotl].
5523///
5524/// This type should generally not be used directly.
5525#[derive(Bundle)]
5526pub struct AxolotlMetadataBundle {
5527    _marker: Axolotl,
5528    parent: AbstractAnimalMetadataBundle,
5529    axolotl_variant: AxolotlVariant,
5530    playing_dead: PlayingDead,
5531    axolotl_from_bucket: AxolotlFromBucket,
5532}
5533impl Default for AxolotlMetadataBundle {
5534    fn default() -> Self {
5535        Self {
5536            _marker: Axolotl,
5537            parent: Default::default(),
5538            axolotl_variant: AxolotlVariant(0),
5539            playing_dead: PlayingDead(false),
5540            axolotl_from_bucket: AxolotlFromBucket(false),
5541        }
5542    }
5543}
5544
5545#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5546/// A metadata field for [Bee].
5547pub struct HasNectar(pub bool);
5548#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5549/// A metadata field for [Bee].
5550pub struct HasStung(pub bool);
5551#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5552/// A metadata field for [Bee].
5553pub struct BeeRolling(pub bool);
5554/// A metadata field for [Bee].
5555#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5556pub struct BeeAngerEndTime(pub i64);
5557/// The marker component for entities of type `minecraft:bee`.
5558///
5559/// # Metadata
5560///
5561/// These are the metadata components that all `Bee` entities are guaranteed to
5562/// have, in addition to the metadata components from parent types:
5563///
5564/// - [HasNectar]
5565/// - [HasStung]
5566/// - [BeeRolling]
5567/// - [BeeAngerEndTime]
5568///
5569/// # Parents
5570///
5571/// Entities with `Bee` will also have the following marker components and their
5572/// metadata fields:
5573///
5574/// - [AbstractAnimal]
5575/// - [AbstractAgeable]
5576/// - [AbstractCreature]
5577/// - [AbstractInsentient]
5578/// - [AbstractLiving]
5579/// - [AbstractEntity]
5580///
5581/// # Children
5582///
5583/// This entity type has no children types.
5584#[derive(Component)]
5585pub struct Bee;
5586impl Bee {
5587    fn apply_metadata(
5588        entity: &mut bevy_ecs::system::EntityCommands,
5589        d: EntityDataItem,
5590    ) -> Result<(), UpdateMetadataError> {
5591        match d.index {
5592            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5593            18 => {
5594                let bitfield = d
5595                    .value
5596                    .into_byte()
5597                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
5598                entity.insert(HasNectar(bitfield & 0x8 != 0));
5599                entity.insert(HasStung(bitfield & 0x4 != 0));
5600                entity.insert(BeeRolling(bitfield & 0x2 != 0));
5601            }
5602            19 => {
5603                entity.insert(BeeAngerEndTime(
5604                    d.value
5605                        .into_long()
5606                        .map_err(|v| e(v, d.index, "BeeAngerEndTime"))?,
5607                ));
5608            }
5609            _ => {}
5610        }
5611        Ok(())
5612    }
5613}
5614
5615/// The metadata bundle for [Bee].
5616///
5617/// This type should generally not be used directly.
5618#[derive(Bundle)]
5619pub struct BeeMetadataBundle {
5620    _marker: Bee,
5621    parent: AbstractAnimalMetadataBundle,
5622    has_nectar: HasNectar,
5623    has_stung: HasStung,
5624    bee_rolling: BeeRolling,
5625    bee_anger_end_time: BeeAngerEndTime,
5626}
5627impl Default for BeeMetadataBundle {
5628    fn default() -> Self {
5629        Self {
5630            _marker: Bee,
5631            parent: Default::default(),
5632            has_nectar: HasNectar(false),
5633            has_stung: HasStung(false),
5634            bee_rolling: BeeRolling(false),
5635            bee_anger_end_time: BeeAngerEndTime(-1),
5636        }
5637    }
5638}
5639
5640/// A metadata field for [Chicken].
5641#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5642pub struct ChickenVariant(pub azalea_registry::data::ChickenVariant);
5643/// A metadata field for [Chicken].
5644#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5645pub struct ChickenSoundVariant(pub azalea_registry::data::ChickenSoundVariant);
5646/// The marker component for entities of type `minecraft:chicken`.
5647///
5648/// # Metadata
5649///
5650/// These are the metadata components that all `Chicken` entities are guaranteed
5651/// to have, in addition to the metadata components from parent types:
5652///
5653/// - [ChickenVariant]
5654/// - [ChickenSoundVariant]
5655///
5656/// # Parents
5657///
5658/// Entities with `Chicken` will also have the following marker components and
5659/// their metadata fields:
5660///
5661/// - [AbstractAnimal]
5662/// - [AbstractAgeable]
5663/// - [AbstractCreature]
5664/// - [AbstractInsentient]
5665/// - [AbstractLiving]
5666/// - [AbstractEntity]
5667///
5668/// # Children
5669///
5670/// This entity type has no children types.
5671#[derive(Component)]
5672pub struct Chicken;
5673impl Chicken {
5674    fn apply_metadata(
5675        entity: &mut bevy_ecs::system::EntityCommands,
5676        d: EntityDataItem,
5677    ) -> Result<(), UpdateMetadataError> {
5678        match d.index {
5679            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5680            18 => {
5681                entity.insert(ChickenVariant(
5682                    d.value
5683                        .into_chicken_variant()
5684                        .map_err(|v| e(v, d.index, "ChickenVariant"))?,
5685                ));
5686            }
5687            19 => {
5688                entity.insert(ChickenSoundVariant(
5689                    d.value
5690                        .into_chicken_sound_variant()
5691                        .map_err(|v| e(v, d.index, "ChickenSoundVariant"))?,
5692                ));
5693            }
5694            _ => {}
5695        }
5696        Ok(())
5697    }
5698}
5699
5700/// The metadata bundle for [Chicken].
5701///
5702/// This type should generally not be used directly.
5703#[derive(Bundle)]
5704pub struct ChickenMetadataBundle {
5705    _marker: Chicken,
5706    parent: AbstractAnimalMetadataBundle,
5707    chicken_variant: ChickenVariant,
5708    chicken_sound_variant: ChickenSoundVariant,
5709}
5710impl Default for ChickenMetadataBundle {
5711    fn default() -> Self {
5712        Self {
5713            _marker: Chicken,
5714            parent: Default::default(),
5715            chicken_variant: ChickenVariant(azalea_registry::data::ChickenVariant::default()),
5716            chicken_sound_variant: ChickenSoundVariant(
5717                azalea_registry::data::ChickenSoundVariant::default(),
5718            ),
5719        }
5720    }
5721}
5722
5723/// A metadata field for [Cow].
5724#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5725pub struct CowVariant(pub azalea_registry::data::CowVariant);
5726/// A metadata field for [Cow].
5727#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5728pub struct CowSoundVariant(pub azalea_registry::data::CowSoundVariant);
5729/// The marker component for entities of type `minecraft:cow`.
5730///
5731/// # Metadata
5732///
5733/// These are the metadata components that all `Cow` entities are guaranteed to
5734/// have, in addition to the metadata components from parent types:
5735///
5736/// - [CowVariant]
5737/// - [CowSoundVariant]
5738///
5739/// # Parents
5740///
5741/// Entities with `Cow` will also have the following marker components and their
5742/// metadata fields:
5743///
5744/// - [AbstractAnimal]
5745/// - [AbstractAgeable]
5746/// - [AbstractCreature]
5747/// - [AbstractInsentient]
5748/// - [AbstractLiving]
5749/// - [AbstractEntity]
5750///
5751/// # Children
5752///
5753/// This entity type has no children types.
5754#[derive(Component)]
5755pub struct Cow;
5756impl Cow {
5757    fn apply_metadata(
5758        entity: &mut bevy_ecs::system::EntityCommands,
5759        d: EntityDataItem,
5760    ) -> Result<(), UpdateMetadataError> {
5761        match d.index {
5762            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5763            18 => {
5764                entity.insert(CowVariant(
5765                    d.value
5766                        .into_cow_variant()
5767                        .map_err(|v| e(v, d.index, "CowVariant"))?,
5768                ));
5769            }
5770            19 => {
5771                entity.insert(CowSoundVariant(
5772                    d.value
5773                        .into_cow_sound_variant()
5774                        .map_err(|v| e(v, d.index, "CowSoundVariant"))?,
5775                ));
5776            }
5777            _ => {}
5778        }
5779        Ok(())
5780    }
5781}
5782
5783/// The metadata bundle for [Cow].
5784///
5785/// This type should generally not be used directly.
5786#[derive(Bundle)]
5787pub struct CowMetadataBundle {
5788    _marker: Cow,
5789    parent: AbstractAnimalMetadataBundle,
5790    cow_variant: CowVariant,
5791    cow_sound_variant: CowSoundVariant,
5792}
5793impl Default for CowMetadataBundle {
5794    fn default() -> Self {
5795        Self {
5796            _marker: Cow,
5797            parent: Default::default(),
5798            cow_variant: CowVariant(azalea_registry::data::CowVariant::default()),
5799            cow_sound_variant: CowSoundVariant(azalea_registry::data::CowSoundVariant::default()),
5800        }
5801    }
5802}
5803
5804/// A metadata field for [Fox].
5805#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5806pub struct FoxKind(pub i32);
5807#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5808/// A metadata field for [Fox].
5809pub struct FoxSitting(pub bool);
5810#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5811/// A metadata field for [Fox].
5812pub struct Faceplanted(pub bool);
5813#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5814/// A metadata field for [Fox].
5815pub struct Defending(pub bool);
5816#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5817/// A metadata field for [Fox].
5818pub struct Sleeping(pub bool);
5819#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5820/// A metadata field for [Fox].
5821pub struct Pouncing(pub bool);
5822#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5823/// A metadata field for [Fox].
5824pub struct FoxCrouching(pub bool);
5825#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5826/// A metadata field for [Fox].
5827pub struct FoxInterested(pub bool);
5828/// A metadata field for [Fox].
5829#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5830pub struct TrustedId0(pub Option<Uuid>);
5831/// A metadata field for [Fox].
5832#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5833pub struct TrustedId1(pub Option<Uuid>);
5834/// The marker component for entities of type `minecraft:fox`.
5835///
5836/// # Metadata
5837///
5838/// These are the metadata components that all `Fox` entities are guaranteed to
5839/// have, in addition to the metadata components from parent types:
5840///
5841/// - [FoxKind]
5842/// - [FoxSitting]
5843/// - [Faceplanted]
5844/// - [Defending]
5845/// - [Sleeping]
5846/// - [Pouncing]
5847/// - [FoxCrouching]
5848/// - [FoxInterested]
5849/// - [TrustedId0]
5850/// - [TrustedId1]
5851///
5852/// # Parents
5853///
5854/// Entities with `Fox` will also have the following marker components and their
5855/// metadata fields:
5856///
5857/// - [AbstractAnimal]
5858/// - [AbstractAgeable]
5859/// - [AbstractCreature]
5860/// - [AbstractInsentient]
5861/// - [AbstractLiving]
5862/// - [AbstractEntity]
5863///
5864/// # Children
5865///
5866/// This entity type has no children types.
5867#[derive(Component)]
5868pub struct Fox;
5869impl Fox {
5870    fn apply_metadata(
5871        entity: &mut bevy_ecs::system::EntityCommands,
5872        d: EntityDataItem,
5873    ) -> Result<(), UpdateMetadataError> {
5874        match d.index {
5875            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5876            18 => {
5877                entity.insert(FoxKind(
5878                    d.value.into_int().map_err(|v| e(v, d.index, "FoxKind"))?,
5879                ));
5880            }
5881            19 => {
5882                let bitfield = d
5883                    .value
5884                    .into_byte()
5885                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
5886                entity.insert(FoxSitting(bitfield & 0x1 != 0));
5887                entity.insert(Faceplanted(bitfield & 0x40 != 0));
5888                entity.insert(Defending(bitfield & 0x80 != 0));
5889                entity.insert(Sleeping(bitfield & 0x20 != 0));
5890                entity.insert(Pouncing(bitfield & 0x10 != 0));
5891                entity.insert(FoxCrouching(bitfield & 0x4 != 0));
5892                entity.insert(FoxInterested(bitfield & 0x8 != 0));
5893            }
5894            20 => {
5895                entity.insert(TrustedId0(
5896                    d.value
5897                        .into_optional_living_entity_reference()
5898                        .map_err(|v| e(v, d.index, "TrustedId0"))?,
5899                ));
5900            }
5901            21 => {
5902                entity.insert(TrustedId1(
5903                    d.value
5904                        .into_optional_living_entity_reference()
5905                        .map_err(|v| e(v, d.index, "TrustedId1"))?,
5906                ));
5907            }
5908            _ => {}
5909        }
5910        Ok(())
5911    }
5912}
5913
5914/// The metadata bundle for [Fox].
5915///
5916/// This type should generally not be used directly.
5917#[derive(Bundle)]
5918pub struct FoxMetadataBundle {
5919    _marker: Fox,
5920    parent: AbstractAnimalMetadataBundle,
5921    fox_kind: FoxKind,
5922    fox_sitting: FoxSitting,
5923    faceplanted: Faceplanted,
5924    defending: Defending,
5925    sleeping: Sleeping,
5926    pouncing: Pouncing,
5927    fox_crouching: FoxCrouching,
5928    fox_interested: FoxInterested,
5929    trusted_id_0: TrustedId0,
5930    trusted_id_1: TrustedId1,
5931}
5932impl Default for FoxMetadataBundle {
5933    fn default() -> Self {
5934        Self {
5935            _marker: Fox,
5936            parent: Default::default(),
5937            fox_kind: FoxKind(Default::default()),
5938            fox_sitting: FoxSitting(false),
5939            faceplanted: Faceplanted(false),
5940            defending: Defending(false),
5941            sleeping: Sleeping(false),
5942            pouncing: Pouncing(false),
5943            fox_crouching: FoxCrouching(false),
5944            fox_interested: FoxInterested(false),
5945            trusted_id_0: TrustedId0(None),
5946            trusted_id_1: TrustedId1(None),
5947        }
5948    }
5949}
5950
5951/// A metadata field for [Frog].
5952#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5953pub struct FrogVariant(pub azalea_registry::data::FrogVariant);
5954/// A metadata field for [Frog].
5955#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5956pub struct TongueTarget(pub OptionalUnsignedInt);
5957/// The marker component for entities of type `minecraft:frog`.
5958///
5959/// # Metadata
5960///
5961/// These are the metadata components that all `Frog` entities are guaranteed to
5962/// have, in addition to the metadata components from parent types:
5963///
5964/// - [FrogVariant]
5965/// - [TongueTarget]
5966///
5967/// # Parents
5968///
5969/// Entities with `Frog` will also have the following marker components and
5970/// their metadata fields:
5971///
5972/// - [AbstractAnimal]
5973/// - [AbstractAgeable]
5974/// - [AbstractCreature]
5975/// - [AbstractInsentient]
5976/// - [AbstractLiving]
5977/// - [AbstractEntity]
5978///
5979/// # Children
5980///
5981/// This entity type has no children types.
5982#[derive(Component)]
5983pub struct Frog;
5984impl Frog {
5985    fn apply_metadata(
5986        entity: &mut bevy_ecs::system::EntityCommands,
5987        d: EntityDataItem,
5988    ) -> Result<(), UpdateMetadataError> {
5989        match d.index {
5990            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
5991            18 => {
5992                entity.insert(FrogVariant(
5993                    d.value
5994                        .into_frog_variant()
5995                        .map_err(|v| e(v, d.index, "FrogVariant"))?,
5996                ));
5997            }
5998            19 => {
5999                entity.insert(TongueTarget(
6000                    d.value
6001                        .into_optional_unsigned_int()
6002                        .map_err(|v| e(v, d.index, "TongueTarget"))?,
6003                ));
6004            }
6005            _ => {}
6006        }
6007        Ok(())
6008    }
6009}
6010
6011/// The metadata bundle for [Frog].
6012///
6013/// This type should generally not be used directly.
6014#[derive(Bundle)]
6015pub struct FrogMetadataBundle {
6016    _marker: Frog,
6017    parent: AbstractAnimalMetadataBundle,
6018    frog_variant: FrogVariant,
6019    tongue_target: TongueTarget,
6020}
6021impl Default for FrogMetadataBundle {
6022    fn default() -> Self {
6023        Self {
6024            _marker: Frog,
6025            parent: Default::default(),
6026            frog_variant: FrogVariant(azalea_registry::data::FrogVariant::default()),
6027            tongue_target: TongueTarget(OptionalUnsignedInt(None)),
6028        }
6029    }
6030}
6031
6032/// A metadata field for [Goat].
6033#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6034pub struct IsScreamingGoat(pub bool);
6035/// A metadata field for [Goat].
6036#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6037pub struct HasLeftHorn(pub bool);
6038/// A metadata field for [Goat].
6039#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6040pub struct HasRightHorn(pub bool);
6041/// The marker component for entities of type `minecraft:goat`.
6042///
6043/// # Metadata
6044///
6045/// These are the metadata components that all `Goat` entities are guaranteed to
6046/// have, in addition to the metadata components from parent types:
6047///
6048/// - [IsScreamingGoat]
6049/// - [HasLeftHorn]
6050/// - [HasRightHorn]
6051///
6052/// # Parents
6053///
6054/// Entities with `Goat` will also have the following marker components and
6055/// their metadata fields:
6056///
6057/// - [AbstractAnimal]
6058/// - [AbstractAgeable]
6059/// - [AbstractCreature]
6060/// - [AbstractInsentient]
6061/// - [AbstractLiving]
6062/// - [AbstractEntity]
6063///
6064/// # Children
6065///
6066/// This entity type has no children types.
6067#[derive(Component)]
6068pub struct Goat;
6069impl Goat {
6070    fn apply_metadata(
6071        entity: &mut bevy_ecs::system::EntityCommands,
6072        d: EntityDataItem,
6073    ) -> Result<(), UpdateMetadataError> {
6074        match d.index {
6075            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6076            18 => {
6077                entity.insert(IsScreamingGoat(
6078                    d.value
6079                        .into_boolean()
6080                        .map_err(|v| e(v, d.index, "IsScreamingGoat"))?,
6081                ));
6082            }
6083            19 => {
6084                entity.insert(HasLeftHorn(
6085                    d.value
6086                        .into_boolean()
6087                        .map_err(|v| e(v, d.index, "HasLeftHorn"))?,
6088                ));
6089            }
6090            20 => {
6091                entity.insert(HasRightHorn(
6092                    d.value
6093                        .into_boolean()
6094                        .map_err(|v| e(v, d.index, "HasRightHorn"))?,
6095                ));
6096            }
6097            _ => {}
6098        }
6099        Ok(())
6100    }
6101}
6102
6103/// The metadata bundle for [Goat].
6104///
6105/// This type should generally not be used directly.
6106#[derive(Bundle)]
6107pub struct GoatMetadataBundle {
6108    _marker: Goat,
6109    parent: AbstractAnimalMetadataBundle,
6110    is_screaming_goat: IsScreamingGoat,
6111    has_left_horn: HasLeftHorn,
6112    has_right_horn: HasRightHorn,
6113}
6114impl Default for GoatMetadataBundle {
6115    fn default() -> Self {
6116        Self {
6117            _marker: Goat,
6118            parent: Default::default(),
6119            is_screaming_goat: IsScreamingGoat(false),
6120            has_left_horn: HasLeftHorn(true),
6121            has_right_horn: HasRightHorn(true),
6122        }
6123    }
6124}
6125
6126/// A metadata field for [HappyGhast].
6127#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6128pub struct IsLeashHolder(pub bool);
6129/// A metadata field for [HappyGhast].
6130#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6131pub struct StaysStill(pub bool);
6132/// The marker component for entities of type `minecraft:happy_ghast`.
6133///
6134/// # Metadata
6135///
6136/// These are the metadata components that all `HappyGhast` entities are
6137/// guaranteed to have, in addition to the metadata components from parent
6138/// types:
6139///
6140/// - [IsLeashHolder]
6141/// - [StaysStill]
6142///
6143/// # Parents
6144///
6145/// Entities with `HappyGhast` will also have the following marker components
6146/// and their metadata fields:
6147///
6148/// - [AbstractAnimal]
6149/// - [AbstractAgeable]
6150/// - [AbstractCreature]
6151/// - [AbstractInsentient]
6152/// - [AbstractLiving]
6153/// - [AbstractEntity]
6154///
6155/// # Children
6156///
6157/// This entity type has no children types.
6158#[derive(Component)]
6159pub struct HappyGhast;
6160impl HappyGhast {
6161    fn apply_metadata(
6162        entity: &mut bevy_ecs::system::EntityCommands,
6163        d: EntityDataItem,
6164    ) -> Result<(), UpdateMetadataError> {
6165        match d.index {
6166            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6167            18 => {
6168                entity.insert(IsLeashHolder(
6169                    d.value
6170                        .into_boolean()
6171                        .map_err(|v| e(v, d.index, "IsLeashHolder"))?,
6172                ));
6173            }
6174            19 => {
6175                entity.insert(StaysStill(
6176                    d.value
6177                        .into_boolean()
6178                        .map_err(|v| e(v, d.index, "StaysStill"))?,
6179                ));
6180            }
6181            _ => {}
6182        }
6183        Ok(())
6184    }
6185}
6186
6187/// The metadata bundle for [HappyGhast].
6188///
6189/// This type should generally not be used directly.
6190#[derive(Bundle)]
6191pub struct HappyGhastMetadataBundle {
6192    _marker: HappyGhast,
6193    parent: AbstractAnimalMetadataBundle,
6194    is_leash_holder: IsLeashHolder,
6195    stays_still: StaysStill,
6196}
6197impl Default for HappyGhastMetadataBundle {
6198    fn default() -> Self {
6199        Self {
6200            _marker: HappyGhast,
6201            parent: Default::default(),
6202            is_leash_holder: IsLeashHolder(false),
6203            stays_still: StaysStill(false),
6204        }
6205    }
6206}
6207
6208/// A metadata field for [Hoglin].
6209#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6210pub struct HoglinImmuneToZombification(pub bool);
6211/// The marker component for entities of type `minecraft:hoglin`.
6212///
6213/// # Metadata
6214///
6215/// These are the metadata components that all `Hoglin` entities are guaranteed
6216/// to have, in addition to the metadata components from parent types:
6217///
6218/// - [HoglinImmuneToZombification]
6219///
6220/// # Parents
6221///
6222/// Entities with `Hoglin` will also have the following marker components and
6223/// their metadata fields:
6224///
6225/// - [AbstractAnimal]
6226/// - [AbstractAgeable]
6227/// - [AbstractCreature]
6228/// - [AbstractInsentient]
6229/// - [AbstractLiving]
6230/// - [AbstractEntity]
6231///
6232/// # Children
6233///
6234/// This entity type has no children types.
6235#[derive(Component)]
6236pub struct Hoglin;
6237impl Hoglin {
6238    fn apply_metadata(
6239        entity: &mut bevy_ecs::system::EntityCommands,
6240        d: EntityDataItem,
6241    ) -> Result<(), UpdateMetadataError> {
6242        match d.index {
6243            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6244            18 => {
6245                entity.insert(HoglinImmuneToZombification(
6246                    d.value
6247                        .into_boolean()
6248                        .map_err(|v| e(v, d.index, "HoglinImmuneToZombification"))?,
6249                ));
6250            }
6251            _ => {}
6252        }
6253        Ok(())
6254    }
6255}
6256
6257/// The metadata bundle for [Hoglin].
6258///
6259/// This type should generally not be used directly.
6260#[derive(Bundle)]
6261pub struct HoglinMetadataBundle {
6262    _marker: Hoglin,
6263    parent: AbstractAnimalMetadataBundle,
6264    hoglin_immune_to_zombification: HoglinImmuneToZombification,
6265}
6266impl Default for HoglinMetadataBundle {
6267    fn default() -> Self {
6268        Self {
6269            _marker: Hoglin,
6270            parent: Default::default(),
6271            hoglin_immune_to_zombification: HoglinImmuneToZombification(false),
6272        }
6273    }
6274}
6275
6276/// A metadata field for [Mooshroom].
6277#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6278pub struct MooshroomKind(pub i32);
6279/// The marker component for entities of type `minecraft:mooshroom`.
6280///
6281/// # Metadata
6282///
6283/// These are the metadata components that all `Mooshroom` entities are
6284/// guaranteed to have, in addition to the metadata components from parent
6285/// types:
6286///
6287/// - [MooshroomKind]
6288///
6289/// # Parents
6290///
6291/// Entities with `Mooshroom` will also have the following marker components and
6292/// their metadata fields:
6293///
6294/// - [AbstractAnimal]
6295/// - [AbstractAgeable]
6296/// - [AbstractCreature]
6297/// - [AbstractInsentient]
6298/// - [AbstractLiving]
6299/// - [AbstractEntity]
6300///
6301/// # Children
6302///
6303/// This entity type has no children types.
6304#[derive(Component)]
6305pub struct Mooshroom;
6306impl Mooshroom {
6307    fn apply_metadata(
6308        entity: &mut bevy_ecs::system::EntityCommands,
6309        d: EntityDataItem,
6310    ) -> Result<(), UpdateMetadataError> {
6311        match d.index {
6312            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6313            18 => {
6314                entity.insert(MooshroomKind(
6315                    d.value
6316                        .into_int()
6317                        .map_err(|v| e(v, d.index, "MooshroomKind"))?,
6318                ));
6319            }
6320            _ => {}
6321        }
6322        Ok(())
6323    }
6324}
6325
6326/// The metadata bundle for [Mooshroom].
6327///
6328/// This type should generally not be used directly.
6329#[derive(Bundle)]
6330pub struct MooshroomMetadataBundle {
6331    _marker: Mooshroom,
6332    parent: AbstractAnimalMetadataBundle,
6333    mooshroom_kind: MooshroomKind,
6334}
6335impl Default for MooshroomMetadataBundle {
6336    fn default() -> Self {
6337        Self {
6338            _marker: Mooshroom,
6339            parent: Default::default(),
6340            mooshroom_kind: MooshroomKind(Default::default()),
6341        }
6342    }
6343}
6344
6345/// A metadata field for [Ocelot].
6346#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6347pub struct Trusting(pub bool);
6348/// The marker component for entities of type `minecraft:ocelot`.
6349///
6350/// # Metadata
6351///
6352/// These are the metadata components that all `Ocelot` entities are guaranteed
6353/// to have, in addition to the metadata components from parent types:
6354///
6355/// - [Trusting]
6356///
6357/// # Parents
6358///
6359/// Entities with `Ocelot` will also have the following marker components and
6360/// their metadata fields:
6361///
6362/// - [AbstractAnimal]
6363/// - [AbstractAgeable]
6364/// - [AbstractCreature]
6365/// - [AbstractInsentient]
6366/// - [AbstractLiving]
6367/// - [AbstractEntity]
6368///
6369/// # Children
6370///
6371/// This entity type has no children types.
6372#[derive(Component)]
6373pub struct Ocelot;
6374impl Ocelot {
6375    fn apply_metadata(
6376        entity: &mut bevy_ecs::system::EntityCommands,
6377        d: EntityDataItem,
6378    ) -> Result<(), UpdateMetadataError> {
6379        match d.index {
6380            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6381            18 => {
6382                entity.insert(Trusting(
6383                    d.value
6384                        .into_boolean()
6385                        .map_err(|v| e(v, d.index, "Trusting"))?,
6386                ));
6387            }
6388            _ => {}
6389        }
6390        Ok(())
6391    }
6392}
6393
6394/// The metadata bundle for [Ocelot].
6395///
6396/// This type should generally not be used directly.
6397#[derive(Bundle)]
6398pub struct OcelotMetadataBundle {
6399    _marker: Ocelot,
6400    parent: AbstractAnimalMetadataBundle,
6401    trusting: Trusting,
6402}
6403impl Default for OcelotMetadataBundle {
6404    fn default() -> Self {
6405        Self {
6406            _marker: Ocelot,
6407            parent: Default::default(),
6408            trusting: Trusting(false),
6409        }
6410    }
6411}
6412
6413/// A metadata field for [Panda].
6414#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6415pub struct PandaUnhappyCounter(pub i32);
6416/// A metadata field for [Panda].
6417#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6418pub struct SneezeCounter(pub i32);
6419/// A metadata field for [Panda].
6420#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6421pub struct EatCounter(pub i32);
6422#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6423/// A metadata field for [Panda].
6424pub struct Sneezing(pub bool);
6425#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6426/// A metadata field for [Panda].
6427pub struct PandaSitting(pub bool);
6428#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6429/// A metadata field for [Panda].
6430pub struct OnBack(pub bool);
6431#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6432/// A metadata field for [Panda].
6433pub struct PandaRolling(pub bool);
6434/// A metadata field for [Panda].
6435#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6436pub struct HiddenGene(pub u8);
6437/// A metadata field for [Panda].
6438#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6439pub struct PandaFlags(pub u8);
6440/// The marker component for entities of type `minecraft:panda`.
6441///
6442/// # Metadata
6443///
6444/// These are the metadata components that all `Panda` entities are guaranteed
6445/// to have, in addition to the metadata components from parent types:
6446///
6447/// - [PandaUnhappyCounter]
6448/// - [SneezeCounter]
6449/// - [EatCounter]
6450/// - [Sneezing]
6451/// - [PandaSitting]
6452/// - [OnBack]
6453/// - [PandaRolling]
6454/// - [HiddenGene]
6455/// - [PandaFlags]
6456///
6457/// # Parents
6458///
6459/// Entities with `Panda` will also have the following marker components and
6460/// their metadata fields:
6461///
6462/// - [AbstractAnimal]
6463/// - [AbstractAgeable]
6464/// - [AbstractCreature]
6465/// - [AbstractInsentient]
6466/// - [AbstractLiving]
6467/// - [AbstractEntity]
6468///
6469/// # Children
6470///
6471/// This entity type has no children types.
6472#[derive(Component)]
6473pub struct Panda;
6474impl Panda {
6475    fn apply_metadata(
6476        entity: &mut bevy_ecs::system::EntityCommands,
6477        d: EntityDataItem,
6478    ) -> Result<(), UpdateMetadataError> {
6479        match d.index {
6480            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6481            18 => {
6482                entity.insert(PandaUnhappyCounter(
6483                    d.value
6484                        .into_int()
6485                        .map_err(|v| e(v, d.index, "PandaUnhappyCounter"))?,
6486                ));
6487            }
6488            19 => {
6489                entity.insert(SneezeCounter(
6490                    d.value
6491                        .into_int()
6492                        .map_err(|v| e(v, d.index, "SneezeCounter"))?,
6493                ));
6494            }
6495            20 => {
6496                entity.insert(EatCounter(
6497                    d.value
6498                        .into_int()
6499                        .map_err(|v| e(v, d.index, "EatCounter"))?,
6500                ));
6501            }
6502            21 => {
6503                let bitfield = d
6504                    .value
6505                    .into_byte()
6506                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
6507                entity.insert(Sneezing(bitfield & 0x2 != 0));
6508                entity.insert(PandaSitting(bitfield & 0x8 != 0));
6509                entity.insert(OnBack(bitfield & 0x10 != 0));
6510                entity.insert(PandaRolling(bitfield & 0x4 != 0));
6511            }
6512            22 => {
6513                entity.insert(HiddenGene(
6514                    d.value
6515                        .into_byte()
6516                        .map_err(|v| e(v, d.index, "HiddenGene"))?,
6517                ));
6518            }
6519            23 => {
6520                entity.insert(PandaFlags(
6521                    d.value
6522                        .into_byte()
6523                        .map_err(|v| e(v, d.index, "PandaFlags"))?,
6524                ));
6525            }
6526            _ => {}
6527        }
6528        Ok(())
6529    }
6530}
6531
6532/// The metadata bundle for [Panda].
6533///
6534/// This type should generally not be used directly.
6535#[derive(Bundle)]
6536pub struct PandaMetadataBundle {
6537    _marker: Panda,
6538    parent: AbstractAnimalMetadataBundle,
6539    panda_unhappy_counter: PandaUnhappyCounter,
6540    sneeze_counter: SneezeCounter,
6541    eat_counter: EatCounter,
6542    sneezing: Sneezing,
6543    panda_sitting: PandaSitting,
6544    on_back: OnBack,
6545    panda_rolling: PandaRolling,
6546    hidden_gene: HiddenGene,
6547    panda_flags: PandaFlags,
6548}
6549impl Default for PandaMetadataBundle {
6550    fn default() -> Self {
6551        Self {
6552            _marker: Panda,
6553            parent: Default::default(),
6554            panda_unhappy_counter: PandaUnhappyCounter(0),
6555            sneeze_counter: SneezeCounter(0),
6556            eat_counter: EatCounter(0),
6557            sneezing: Sneezing(false),
6558            panda_sitting: PandaSitting(false),
6559            on_back: OnBack(false),
6560            panda_rolling: PandaRolling(false),
6561            hidden_gene: HiddenGene(0),
6562            panda_flags: PandaFlags(0),
6563        }
6564    }
6565}
6566
6567/// A metadata field for [Pig].
6568#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6569pub struct PigBoostTime(pub i32);
6570/// A metadata field for [Pig].
6571#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6572pub struct PigVariant(pub azalea_registry::data::PigVariant);
6573/// A metadata field for [Pig].
6574#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6575pub struct PigSoundVariant(pub azalea_registry::data::PigSoundVariant);
6576/// The marker component for entities of type `minecraft:pig`.
6577///
6578/// # Metadata
6579///
6580/// These are the metadata components that all `Pig` entities are guaranteed to
6581/// have, in addition to the metadata components from parent types:
6582///
6583/// - [PigBoostTime]
6584/// - [PigVariant]
6585/// - [PigSoundVariant]
6586///
6587/// # Parents
6588///
6589/// Entities with `Pig` will also have the following marker components and their
6590/// metadata fields:
6591///
6592/// - [AbstractAnimal]
6593/// - [AbstractAgeable]
6594/// - [AbstractCreature]
6595/// - [AbstractInsentient]
6596/// - [AbstractLiving]
6597/// - [AbstractEntity]
6598///
6599/// # Children
6600///
6601/// This entity type has no children types.
6602#[derive(Component)]
6603pub struct Pig;
6604impl Pig {
6605    fn apply_metadata(
6606        entity: &mut bevy_ecs::system::EntityCommands,
6607        d: EntityDataItem,
6608    ) -> Result<(), UpdateMetadataError> {
6609        match d.index {
6610            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6611            18 => {
6612                entity.insert(PigBoostTime(
6613                    d.value
6614                        .into_int()
6615                        .map_err(|v| e(v, d.index, "PigBoostTime"))?,
6616                ));
6617            }
6618            19 => {
6619                entity.insert(PigVariant(
6620                    d.value
6621                        .into_pig_variant()
6622                        .map_err(|v| e(v, d.index, "PigVariant"))?,
6623                ));
6624            }
6625            20 => {
6626                entity.insert(PigSoundVariant(
6627                    d.value
6628                        .into_pig_sound_variant()
6629                        .map_err(|v| e(v, d.index, "PigSoundVariant"))?,
6630                ));
6631            }
6632            _ => {}
6633        }
6634        Ok(())
6635    }
6636}
6637
6638/// The metadata bundle for [Pig].
6639///
6640/// This type should generally not be used directly.
6641#[derive(Bundle)]
6642pub struct PigMetadataBundle {
6643    _marker: Pig,
6644    parent: AbstractAnimalMetadataBundle,
6645    pig_boost_time: PigBoostTime,
6646    pig_variant: PigVariant,
6647    pig_sound_variant: PigSoundVariant,
6648}
6649impl Default for PigMetadataBundle {
6650    fn default() -> Self {
6651        Self {
6652            _marker: Pig,
6653            parent: Default::default(),
6654            pig_boost_time: PigBoostTime(0),
6655            pig_variant: PigVariant(azalea_registry::data::PigVariant::default()),
6656            pig_sound_variant: PigSoundVariant(azalea_registry::data::PigSoundVariant::default()),
6657        }
6658    }
6659}
6660
6661/// A metadata field for [PolarBear].
6662#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6663pub struct PolarBearStanding(pub bool);
6664/// The marker component for entities of type `minecraft:polar_bear`.
6665///
6666/// # Metadata
6667///
6668/// These are the metadata components that all `PolarBear` entities are
6669/// guaranteed to have, in addition to the metadata components from parent
6670/// types:
6671///
6672/// - [PolarBearStanding]
6673///
6674/// # Parents
6675///
6676/// Entities with `PolarBear` will also have the following marker components and
6677/// their metadata fields:
6678///
6679/// - [AbstractAnimal]
6680/// - [AbstractAgeable]
6681/// - [AbstractCreature]
6682/// - [AbstractInsentient]
6683/// - [AbstractLiving]
6684/// - [AbstractEntity]
6685///
6686/// # Children
6687///
6688/// This entity type has no children types.
6689#[derive(Component)]
6690pub struct PolarBear;
6691impl PolarBear {
6692    fn apply_metadata(
6693        entity: &mut bevy_ecs::system::EntityCommands,
6694        d: EntityDataItem,
6695    ) -> Result<(), UpdateMetadataError> {
6696        match d.index {
6697            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6698            18 => {
6699                entity.insert(PolarBearStanding(
6700                    d.value
6701                        .into_boolean()
6702                        .map_err(|v| e(v, d.index, "PolarBearStanding"))?,
6703                ));
6704            }
6705            _ => {}
6706        }
6707        Ok(())
6708    }
6709}
6710
6711/// The metadata bundle for [PolarBear].
6712///
6713/// This type should generally not be used directly.
6714#[derive(Bundle)]
6715pub struct PolarBearMetadataBundle {
6716    _marker: PolarBear,
6717    parent: AbstractAnimalMetadataBundle,
6718    polar_bear_standing: PolarBearStanding,
6719}
6720impl Default for PolarBearMetadataBundle {
6721    fn default() -> Self {
6722        Self {
6723            _marker: PolarBear,
6724            parent: Default::default(),
6725            polar_bear_standing: PolarBearStanding(false),
6726        }
6727    }
6728}
6729
6730/// A metadata field for [Rabbit].
6731#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6732pub struct RabbitKind(pub i32);
6733/// The marker component for entities of type `minecraft:rabbit`.
6734///
6735/// # Metadata
6736///
6737/// These are the metadata components that all `Rabbit` entities are guaranteed
6738/// to have, in addition to the metadata components from parent types:
6739///
6740/// - [RabbitKind]
6741///
6742/// # Parents
6743///
6744/// Entities with `Rabbit` will also have the following marker components and
6745/// their metadata fields:
6746///
6747/// - [AbstractAnimal]
6748/// - [AbstractAgeable]
6749/// - [AbstractCreature]
6750/// - [AbstractInsentient]
6751/// - [AbstractLiving]
6752/// - [AbstractEntity]
6753///
6754/// # Children
6755///
6756/// This entity type has no children types.
6757#[derive(Component)]
6758pub struct Rabbit;
6759impl Rabbit {
6760    fn apply_metadata(
6761        entity: &mut bevy_ecs::system::EntityCommands,
6762        d: EntityDataItem,
6763    ) -> Result<(), UpdateMetadataError> {
6764        match d.index {
6765            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6766            18 => {
6767                entity.insert(RabbitKind(
6768                    d.value
6769                        .into_int()
6770                        .map_err(|v| e(v, d.index, "RabbitKind"))?,
6771                ));
6772            }
6773            _ => {}
6774        }
6775        Ok(())
6776    }
6777}
6778
6779/// The metadata bundle for [Rabbit].
6780///
6781/// This type should generally not be used directly.
6782#[derive(Bundle)]
6783pub struct RabbitMetadataBundle {
6784    _marker: Rabbit,
6785    parent: AbstractAnimalMetadataBundle,
6786    rabbit_kind: RabbitKind,
6787}
6788impl Default for RabbitMetadataBundle {
6789    fn default() -> Self {
6790        Self {
6791            _marker: Rabbit,
6792            parent: Default::default(),
6793            rabbit_kind: RabbitKind(Default::default()),
6794        }
6795    }
6796}
6797
6798#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6799/// A metadata field for [Sheep].
6800pub struct SheepSheared(pub bool);
6801/// The marker component for entities of type `minecraft:sheep`.
6802///
6803/// # Metadata
6804///
6805/// These are the metadata components that all `Sheep` entities are guaranteed
6806/// to have, in addition to the metadata components from parent types:
6807///
6808/// - [SheepSheared]
6809///
6810/// # Parents
6811///
6812/// Entities with `Sheep` will also have the following marker components and
6813/// their metadata fields:
6814///
6815/// - [AbstractAnimal]
6816/// - [AbstractAgeable]
6817/// - [AbstractCreature]
6818/// - [AbstractInsentient]
6819/// - [AbstractLiving]
6820/// - [AbstractEntity]
6821///
6822/// # Children
6823///
6824/// This entity type has no children types.
6825#[derive(Component)]
6826pub struct Sheep;
6827impl Sheep {
6828    fn apply_metadata(
6829        entity: &mut bevy_ecs::system::EntityCommands,
6830        d: EntityDataItem,
6831    ) -> Result<(), UpdateMetadataError> {
6832        match d.index {
6833            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6834            18 => {
6835                let bitfield = d
6836                    .value
6837                    .into_byte()
6838                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
6839                entity.insert(SheepSheared(bitfield & 0x10 != 0));
6840            }
6841            _ => {}
6842        }
6843        Ok(())
6844    }
6845}
6846
6847/// The metadata bundle for [Sheep].
6848///
6849/// This type should generally not be used directly.
6850#[derive(Bundle)]
6851pub struct SheepMetadataBundle {
6852    _marker: Sheep,
6853    parent: AbstractAnimalMetadataBundle,
6854    sheep_sheared: SheepSheared,
6855}
6856impl Default for SheepMetadataBundle {
6857    fn default() -> Self {
6858        Self {
6859            _marker: Sheep,
6860            parent: Default::default(),
6861            sheep_sheared: SheepSheared(false),
6862        }
6863    }
6864}
6865
6866/// A metadata field for [Sniffer].
6867#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6868pub struct SnifferState(pub SnifferStateKind);
6869/// A metadata field for [Sniffer].
6870#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6871pub struct DropSeedAtTick(pub i32);
6872/// The marker component for entities of type `minecraft:sniffer`.
6873///
6874/// # Metadata
6875///
6876/// These are the metadata components that all `Sniffer` entities are guaranteed
6877/// to have, in addition to the metadata components from parent types:
6878///
6879/// - [SnifferState]
6880/// - [DropSeedAtTick]
6881///
6882/// # Parents
6883///
6884/// Entities with `Sniffer` will also have the following marker components and
6885/// their metadata fields:
6886///
6887/// - [AbstractAnimal]
6888/// - [AbstractAgeable]
6889/// - [AbstractCreature]
6890/// - [AbstractInsentient]
6891/// - [AbstractLiving]
6892/// - [AbstractEntity]
6893///
6894/// # Children
6895///
6896/// This entity type has no children types.
6897#[derive(Component)]
6898pub struct Sniffer;
6899impl Sniffer {
6900    fn apply_metadata(
6901        entity: &mut bevy_ecs::system::EntityCommands,
6902        d: EntityDataItem,
6903    ) -> Result<(), UpdateMetadataError> {
6904        match d.index {
6905            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6906            18 => {
6907                entity.insert(SnifferState(
6908                    d.value
6909                        .into_sniffer_state()
6910                        .map_err(|v| e(v, d.index, "SnifferState"))?,
6911                ));
6912            }
6913            19 => {
6914                entity.insert(DropSeedAtTick(
6915                    d.value
6916                        .into_int()
6917                        .map_err(|v| e(v, d.index, "DropSeedAtTick"))?,
6918                ));
6919            }
6920            _ => {}
6921        }
6922        Ok(())
6923    }
6924}
6925
6926/// The metadata bundle for [Sniffer].
6927///
6928/// This type should generally not be used directly.
6929#[derive(Bundle)]
6930pub struct SnifferMetadataBundle {
6931    _marker: Sniffer,
6932    parent: AbstractAnimalMetadataBundle,
6933    sniffer_state: SnifferState,
6934    drop_seed_at_tick: DropSeedAtTick,
6935}
6936impl Default for SnifferMetadataBundle {
6937    fn default() -> Self {
6938        Self {
6939            _marker: Sniffer,
6940            parent: Default::default(),
6941            sniffer_state: SnifferState(Default::default()),
6942            drop_seed_at_tick: DropSeedAtTick(0),
6943        }
6944    }
6945}
6946
6947/// A metadata field for [Strider].
6948#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6949pub struct StriderBoostTime(pub i32);
6950/// A metadata field for [Strider].
6951#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6952pub struct Suffocating(pub bool);
6953/// The marker component for entities of type `minecraft:strider`.
6954///
6955/// # Metadata
6956///
6957/// These are the metadata components that all `Strider` entities are guaranteed
6958/// to have, in addition to the metadata components from parent types:
6959///
6960/// - [StriderBoostTime]
6961/// - [Suffocating]
6962///
6963/// # Parents
6964///
6965/// Entities with `Strider` will also have the following marker components and
6966/// their metadata fields:
6967///
6968/// - [AbstractAnimal]
6969/// - [AbstractAgeable]
6970/// - [AbstractCreature]
6971/// - [AbstractInsentient]
6972/// - [AbstractLiving]
6973/// - [AbstractEntity]
6974///
6975/// # Children
6976///
6977/// This entity type has no children types.
6978#[derive(Component)]
6979pub struct Strider;
6980impl Strider {
6981    fn apply_metadata(
6982        entity: &mut bevy_ecs::system::EntityCommands,
6983        d: EntityDataItem,
6984    ) -> Result<(), UpdateMetadataError> {
6985        match d.index {
6986            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
6987            18 => {
6988                entity.insert(StriderBoostTime(
6989                    d.value
6990                        .into_int()
6991                        .map_err(|v| e(v, d.index, "StriderBoostTime"))?,
6992                ));
6993            }
6994            19 => {
6995                entity.insert(Suffocating(
6996                    d.value
6997                        .into_boolean()
6998                        .map_err(|v| e(v, d.index, "Suffocating"))?,
6999                ));
7000            }
7001            _ => {}
7002        }
7003        Ok(())
7004    }
7005}
7006
7007/// The metadata bundle for [Strider].
7008///
7009/// This type should generally not be used directly.
7010#[derive(Bundle)]
7011pub struct StriderMetadataBundle {
7012    _marker: Strider,
7013    parent: AbstractAnimalMetadataBundle,
7014    strider_boost_time: StriderBoostTime,
7015    suffocating: Suffocating,
7016}
7017impl Default for StriderMetadataBundle {
7018    fn default() -> Self {
7019        Self {
7020            _marker: Strider,
7021            parent: Default::default(),
7022            strider_boost_time: StriderBoostTime(0),
7023            suffocating: Suffocating(false),
7024        }
7025    }
7026}
7027
7028/// A metadata field for [Turtle].
7029#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7030pub struct HasEgg(pub bool);
7031/// A metadata field for [Turtle].
7032#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7033pub struct LayingEgg(pub bool);
7034/// The marker component for entities of type `minecraft:turtle`.
7035///
7036/// # Metadata
7037///
7038/// These are the metadata components that all `Turtle` entities are guaranteed
7039/// to have, in addition to the metadata components from parent types:
7040///
7041/// - [HasEgg]
7042/// - [LayingEgg]
7043///
7044/// # Parents
7045///
7046/// Entities with `Turtle` will also have the following marker components and
7047/// their metadata fields:
7048///
7049/// - [AbstractAnimal]
7050/// - [AbstractAgeable]
7051/// - [AbstractCreature]
7052/// - [AbstractInsentient]
7053/// - [AbstractLiving]
7054/// - [AbstractEntity]
7055///
7056/// # Children
7057///
7058/// This entity type has no children types.
7059#[derive(Component)]
7060pub struct Turtle;
7061impl Turtle {
7062    fn apply_metadata(
7063        entity: &mut bevy_ecs::system::EntityCommands,
7064        d: EntityDataItem,
7065    ) -> Result<(), UpdateMetadataError> {
7066        match d.index {
7067            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
7068            18 => {
7069                entity.insert(HasEgg(
7070                    d.value
7071                        .into_boolean()
7072                        .map_err(|v| e(v, d.index, "HasEgg"))?,
7073                ));
7074            }
7075            19 => {
7076                entity.insert(LayingEgg(
7077                    d.value
7078                        .into_boolean()
7079                        .map_err(|v| e(v, d.index, "LayingEgg"))?,
7080                ));
7081            }
7082            _ => {}
7083        }
7084        Ok(())
7085    }
7086}
7087
7088/// The metadata bundle for [Turtle].
7089///
7090/// This type should generally not be used directly.
7091#[derive(Bundle)]
7092pub struct TurtleMetadataBundle {
7093    _marker: Turtle,
7094    parent: AbstractAnimalMetadataBundle,
7095    has_egg: HasEgg,
7096    laying_egg: LayingEgg,
7097}
7098impl Default for TurtleMetadataBundle {
7099    fn default() -> Self {
7100        Self {
7101            _marker: Turtle,
7102            parent: Default::default(),
7103            has_egg: HasEgg(false),
7104            laying_egg: LayingEgg(false),
7105        }
7106    }
7107}
7108
7109#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7110/// A metadata field for [AbstractHorse].
7111pub struct Tamed(pub bool);
7112#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7113/// A metadata field for [AbstractHorse].
7114pub struct Eating(pub bool);
7115#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7116/// A metadata field for [AbstractHorse].
7117pub struct AbstractHorseStanding(pub bool);
7118#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7119/// A metadata field for [AbstractHorse].
7120pub struct Bred(pub bool);
7121/// An abstract entity marker component.
7122///
7123/// # Metadata
7124///
7125/// These are the metadata components that all `AbstractHorse` entities are
7126/// guaranteed to have, in addition to the metadata components from parent
7127/// types:
7128///
7129/// - [Tamed]
7130/// - [Eating]
7131/// - [AbstractHorseStanding]
7132/// - [Bred]
7133///
7134/// # Parents
7135///
7136/// Entities with `AbstractHorse` will also have the following marker components
7137/// and their metadata fields:
7138///
7139/// - [AbstractAnimal]
7140/// - [AbstractAgeable]
7141/// - [AbstractCreature]
7142/// - [AbstractInsentient]
7143/// - [AbstractLiving]
7144/// - [AbstractEntity]
7145///
7146/// # Children
7147///
7148/// - [Camel]
7149///   - [CamelHusk]
7150/// - [Horse]
7151/// - [SkeletonHorse]
7152/// - [ZombieHorse]
7153/// - [AbstractChestedHorse]
7154///   - [Donkey]
7155///   - [Llama]
7156///     - [TraderLlama]
7157///   - [Mule]
7158#[derive(Component)]
7159pub struct AbstractHorse;
7160impl AbstractHorse {
7161    fn apply_metadata(
7162        entity: &mut bevy_ecs::system::EntityCommands,
7163        d: EntityDataItem,
7164    ) -> Result<(), UpdateMetadataError> {
7165        match d.index {
7166            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
7167            18 => {
7168                let bitfield = d
7169                    .value
7170                    .into_byte()
7171                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
7172                entity.insert(Tamed(bitfield & 0x2 != 0));
7173                entity.insert(Eating(bitfield & 0x10 != 0));
7174                entity.insert(AbstractHorseStanding(bitfield & 0x20 != 0));
7175                entity.insert(Bred(bitfield & 0x8 != 0));
7176            }
7177            _ => {}
7178        }
7179        Ok(())
7180    }
7181}
7182
7183/// The metadata bundle for [AbstractHorse].
7184///
7185/// This type should generally not be used directly.
7186#[derive(Bundle)]
7187pub struct AbstractHorseMetadataBundle {
7188    _marker: AbstractHorse,
7189    parent: AbstractAnimalMetadataBundle,
7190    tamed: Tamed,
7191    eating: Eating,
7192    abstract_horse_standing: AbstractHorseStanding,
7193    bred: Bred,
7194}
7195impl Default for AbstractHorseMetadataBundle {
7196    fn default() -> Self {
7197        Self {
7198            _marker: AbstractHorse,
7199            parent: Default::default(),
7200            tamed: Tamed(false),
7201            eating: Eating(false),
7202            abstract_horse_standing: AbstractHorseStanding(false),
7203            bred: Bred(false),
7204        }
7205    }
7206}
7207
7208/// A metadata field for [Camel].
7209#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7210pub struct CamelDash(pub bool);
7211/// A metadata field for [Camel].
7212#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7213pub struct LastPoseChangeTick(pub i64);
7214/// The marker component for entities of type `minecraft:camel`.
7215///
7216/// # Metadata
7217///
7218/// These are the metadata components that all `Camel` entities are guaranteed
7219/// to have, in addition to the metadata components from parent types:
7220///
7221/// - [CamelDash]
7222/// - [LastPoseChangeTick]
7223///
7224/// # Parents
7225///
7226/// Entities with `Camel` will also have the following marker components and
7227/// their metadata fields:
7228///
7229/// - [AbstractHorse]
7230/// - [AbstractAnimal]
7231/// - [AbstractAgeable]
7232/// - [AbstractCreature]
7233/// - [AbstractInsentient]
7234/// - [AbstractLiving]
7235/// - [AbstractEntity]
7236///
7237/// # Children
7238///
7239/// - [CamelHusk]
7240#[derive(Component)]
7241pub struct Camel;
7242impl Camel {
7243    fn apply_metadata(
7244        entity: &mut bevy_ecs::system::EntityCommands,
7245        d: EntityDataItem,
7246    ) -> Result<(), UpdateMetadataError> {
7247        match d.index {
7248            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7249            19 => {
7250                entity.insert(CamelDash(
7251                    d.value
7252                        .into_boolean()
7253                        .map_err(|v| e(v, d.index, "CamelDash"))?,
7254                ));
7255            }
7256            20 => {
7257                entity.insert(LastPoseChangeTick(
7258                    d.value
7259                        .into_long()
7260                        .map_err(|v| e(v, d.index, "LastPoseChangeTick"))?,
7261                ));
7262            }
7263            _ => {}
7264        }
7265        Ok(())
7266    }
7267}
7268
7269/// The metadata bundle for [Camel].
7270///
7271/// This type should generally not be used directly.
7272#[derive(Bundle)]
7273pub struct CamelMetadataBundle {
7274    _marker: Camel,
7275    parent: AbstractHorseMetadataBundle,
7276    camel_dash: CamelDash,
7277    last_pose_change_tick: LastPoseChangeTick,
7278}
7279impl Default for CamelMetadataBundle {
7280    fn default() -> Self {
7281        Self {
7282            _marker: Camel,
7283            parent: Default::default(),
7284            camel_dash: CamelDash(false),
7285            last_pose_change_tick: LastPoseChangeTick(0),
7286        }
7287    }
7288}
7289
7290/// The marker component for entities of type `minecraft:camel_husk`.
7291///
7292/// # Metadata
7293///
7294/// This entity type does not add any additional metadata. It will still have
7295/// metadata from parent types.
7296///
7297/// # Parents
7298///
7299/// Entities with `CamelHusk` will also have the following marker components and
7300/// their metadata fields:
7301///
7302/// - [Camel]
7303/// - [AbstractHorse]
7304/// - [AbstractAnimal]
7305/// - [AbstractAgeable]
7306/// - [AbstractCreature]
7307/// - [AbstractInsentient]
7308/// - [AbstractLiving]
7309/// - [AbstractEntity]
7310///
7311/// # Children
7312///
7313/// This entity type has no children types.
7314#[derive(Component)]
7315pub struct CamelHusk;
7316impl CamelHusk {
7317    fn apply_metadata(
7318        entity: &mut bevy_ecs::system::EntityCommands,
7319        d: EntityDataItem,
7320    ) -> Result<(), UpdateMetadataError> {
7321        match d.index {
7322            0..=20 => Camel::apply_metadata(entity, d)?,
7323            _ => {}
7324        }
7325        Ok(())
7326    }
7327}
7328
7329/// The metadata bundle for [CamelHusk].
7330///
7331/// This type should generally not be used directly.
7332#[derive(Bundle)]
7333pub struct CamelHuskMetadataBundle {
7334    _marker: CamelHusk,
7335    parent: CamelMetadataBundle,
7336}
7337impl Default for CamelHuskMetadataBundle {
7338    fn default() -> Self {
7339        Self {
7340            _marker: CamelHusk,
7341            parent: Default::default(),
7342        }
7343    }
7344}
7345
7346/// A metadata field for [Horse].
7347#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7348pub struct HorseTypeVariant(pub i32);
7349/// The marker component for entities of type `minecraft:horse`.
7350///
7351/// # Metadata
7352///
7353/// These are the metadata components that all `Horse` entities are guaranteed
7354/// to have, in addition to the metadata components from parent types:
7355///
7356/// - [HorseTypeVariant]
7357///
7358/// # Parents
7359///
7360/// Entities with `Horse` will also have the following marker components and
7361/// their metadata fields:
7362///
7363/// - [AbstractHorse]
7364/// - [AbstractAnimal]
7365/// - [AbstractAgeable]
7366/// - [AbstractCreature]
7367/// - [AbstractInsentient]
7368/// - [AbstractLiving]
7369/// - [AbstractEntity]
7370///
7371/// # Children
7372///
7373/// This entity type has no children types.
7374#[derive(Component)]
7375pub struct Horse;
7376impl Horse {
7377    fn apply_metadata(
7378        entity: &mut bevy_ecs::system::EntityCommands,
7379        d: EntityDataItem,
7380    ) -> Result<(), UpdateMetadataError> {
7381        match d.index {
7382            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7383            19 => {
7384                entity.insert(HorseTypeVariant(
7385                    d.value
7386                        .into_int()
7387                        .map_err(|v| e(v, d.index, "HorseTypeVariant"))?,
7388                ));
7389            }
7390            _ => {}
7391        }
7392        Ok(())
7393    }
7394}
7395
7396/// The metadata bundle for [Horse].
7397///
7398/// This type should generally not be used directly.
7399#[derive(Bundle)]
7400pub struct HorseMetadataBundle {
7401    _marker: Horse,
7402    parent: AbstractHorseMetadataBundle,
7403    horse_type_variant: HorseTypeVariant,
7404}
7405impl Default for HorseMetadataBundle {
7406    fn default() -> Self {
7407        Self {
7408            _marker: Horse,
7409            parent: Default::default(),
7410            horse_type_variant: HorseTypeVariant(0),
7411        }
7412    }
7413}
7414
7415/// The marker component for entities of type `minecraft:skeleton_horse`.
7416///
7417/// # Metadata
7418///
7419/// This entity type does not add any additional metadata. It will still have
7420/// metadata from parent types.
7421///
7422/// # Parents
7423///
7424/// Entities with `SkeletonHorse` will also have the following marker components
7425/// and their metadata fields:
7426///
7427/// - [AbstractHorse]
7428/// - [AbstractAnimal]
7429/// - [AbstractAgeable]
7430/// - [AbstractCreature]
7431/// - [AbstractInsentient]
7432/// - [AbstractLiving]
7433/// - [AbstractEntity]
7434///
7435/// # Children
7436///
7437/// This entity type has no children types.
7438#[derive(Component)]
7439pub struct SkeletonHorse;
7440impl SkeletonHorse {
7441    fn apply_metadata(
7442        entity: &mut bevy_ecs::system::EntityCommands,
7443        d: EntityDataItem,
7444    ) -> Result<(), UpdateMetadataError> {
7445        match d.index {
7446            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7447            _ => {}
7448        }
7449        Ok(())
7450    }
7451}
7452
7453/// The metadata bundle for [SkeletonHorse].
7454///
7455/// This type should generally not be used directly.
7456#[derive(Bundle)]
7457pub struct SkeletonHorseMetadataBundle {
7458    _marker: SkeletonHorse,
7459    parent: AbstractHorseMetadataBundle,
7460}
7461impl Default for SkeletonHorseMetadataBundle {
7462    fn default() -> Self {
7463        Self {
7464            _marker: SkeletonHorse,
7465            parent: Default::default(),
7466        }
7467    }
7468}
7469
7470/// The marker component for entities of type `minecraft:zombie_horse`.
7471///
7472/// # Metadata
7473///
7474/// This entity type does not add any additional metadata. It will still have
7475/// metadata from parent types.
7476///
7477/// # Parents
7478///
7479/// Entities with `ZombieHorse` will also have the following marker components
7480/// and their metadata fields:
7481///
7482/// - [AbstractHorse]
7483/// - [AbstractAnimal]
7484/// - [AbstractAgeable]
7485/// - [AbstractCreature]
7486/// - [AbstractInsentient]
7487/// - [AbstractLiving]
7488/// - [AbstractEntity]
7489///
7490/// # Children
7491///
7492/// This entity type has no children types.
7493#[derive(Component)]
7494pub struct ZombieHorse;
7495impl ZombieHorse {
7496    fn apply_metadata(
7497        entity: &mut bevy_ecs::system::EntityCommands,
7498        d: EntityDataItem,
7499    ) -> Result<(), UpdateMetadataError> {
7500        match d.index {
7501            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7502            _ => {}
7503        }
7504        Ok(())
7505    }
7506}
7507
7508/// The metadata bundle for [ZombieHorse].
7509///
7510/// This type should generally not be used directly.
7511#[derive(Bundle)]
7512pub struct ZombieHorseMetadataBundle {
7513    _marker: ZombieHorse,
7514    parent: AbstractHorseMetadataBundle,
7515}
7516impl Default for ZombieHorseMetadataBundle {
7517    fn default() -> Self {
7518        Self {
7519            _marker: ZombieHorse,
7520            parent: Default::default(),
7521        }
7522    }
7523}
7524
7525/// A metadata field for [AbstractChestedHorse].
7526#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7527pub struct Chest(pub bool);
7528/// An abstract entity marker component.
7529///
7530/// # Metadata
7531///
7532/// These are the metadata components that all `AbstractChestedHorse` entities
7533/// are guaranteed to have, in addition to the metadata components from parent
7534/// types:
7535///
7536/// - [Chest]
7537///
7538/// # Parents
7539///
7540/// Entities with `AbstractChestedHorse` will also have the following marker
7541/// components and their metadata fields:
7542///
7543/// - [AbstractHorse]
7544/// - [AbstractAnimal]
7545/// - [AbstractAgeable]
7546/// - [AbstractCreature]
7547/// - [AbstractInsentient]
7548/// - [AbstractLiving]
7549/// - [AbstractEntity]
7550///
7551/// # Children
7552///
7553/// - [Donkey]
7554/// - [Llama]
7555///   - [TraderLlama]
7556/// - [Mule]
7557#[derive(Component)]
7558pub struct AbstractChestedHorse;
7559impl AbstractChestedHorse {
7560    fn apply_metadata(
7561        entity: &mut bevy_ecs::system::EntityCommands,
7562        d: EntityDataItem,
7563    ) -> Result<(), UpdateMetadataError> {
7564        match d.index {
7565            0..=18 => AbstractHorse::apply_metadata(entity, d)?,
7566            19 => {
7567                entity.insert(Chest(
7568                    d.value.into_boolean().map_err(|v| e(v, d.index, "Chest"))?,
7569                ));
7570            }
7571            _ => {}
7572        }
7573        Ok(())
7574    }
7575}
7576
7577/// The metadata bundle for [AbstractChestedHorse].
7578///
7579/// This type should generally not be used directly.
7580#[derive(Bundle)]
7581pub struct AbstractChestedHorseMetadataBundle {
7582    _marker: AbstractChestedHorse,
7583    parent: AbstractHorseMetadataBundle,
7584    chest: Chest,
7585}
7586impl Default for AbstractChestedHorseMetadataBundle {
7587    fn default() -> Self {
7588        Self {
7589            _marker: AbstractChestedHorse,
7590            parent: Default::default(),
7591            chest: Chest(false),
7592        }
7593    }
7594}
7595
7596/// The marker component for entities of type `minecraft:donkey`.
7597///
7598/// # Metadata
7599///
7600/// This entity type does not add any additional metadata. It will still have
7601/// metadata from parent types.
7602///
7603/// # Parents
7604///
7605/// Entities with `Donkey` will also have the following marker components and
7606/// their metadata fields:
7607///
7608/// - [AbstractChestedHorse]
7609/// - [AbstractHorse]
7610/// - [AbstractAnimal]
7611/// - [AbstractAgeable]
7612/// - [AbstractCreature]
7613/// - [AbstractInsentient]
7614/// - [AbstractLiving]
7615/// - [AbstractEntity]
7616///
7617/// # Children
7618///
7619/// This entity type has no children types.
7620#[derive(Component)]
7621pub struct Donkey;
7622impl Donkey {
7623    fn apply_metadata(
7624        entity: &mut bevy_ecs::system::EntityCommands,
7625        d: EntityDataItem,
7626    ) -> Result<(), UpdateMetadataError> {
7627        match d.index {
7628            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7629            _ => {}
7630        }
7631        Ok(())
7632    }
7633}
7634
7635/// The metadata bundle for [Donkey].
7636///
7637/// This type should generally not be used directly.
7638#[derive(Bundle)]
7639pub struct DonkeyMetadataBundle {
7640    _marker: Donkey,
7641    parent: AbstractChestedHorseMetadataBundle,
7642}
7643impl Default for DonkeyMetadataBundle {
7644    fn default() -> Self {
7645        Self {
7646            _marker: Donkey,
7647            parent: Default::default(),
7648        }
7649    }
7650}
7651
7652/// A metadata field for [Llama].
7653#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7654pub struct Strength(pub i32);
7655/// A metadata field for [Llama].
7656#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7657pub struct LlamaVariant(pub i32);
7658/// The marker component for entities of type `minecraft:llama`.
7659///
7660/// # Metadata
7661///
7662/// These are the metadata components that all `Llama` entities are guaranteed
7663/// to have, in addition to the metadata components from parent types:
7664///
7665/// - [Strength]
7666/// - [LlamaVariant]
7667///
7668/// # Parents
7669///
7670/// Entities with `Llama` will also have the following marker components and
7671/// their metadata fields:
7672///
7673/// - [AbstractChestedHorse]
7674/// - [AbstractHorse]
7675/// - [AbstractAnimal]
7676/// - [AbstractAgeable]
7677/// - [AbstractCreature]
7678/// - [AbstractInsentient]
7679/// - [AbstractLiving]
7680/// - [AbstractEntity]
7681///
7682/// # Children
7683///
7684/// - [TraderLlama]
7685#[derive(Component)]
7686pub struct Llama;
7687impl Llama {
7688    fn apply_metadata(
7689        entity: &mut bevy_ecs::system::EntityCommands,
7690        d: EntityDataItem,
7691    ) -> Result<(), UpdateMetadataError> {
7692        match d.index {
7693            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7694            20 => {
7695                entity.insert(Strength(
7696                    d.value.into_int().map_err(|v| e(v, d.index, "Strength"))?,
7697                ));
7698            }
7699            21 => {
7700                entity.insert(LlamaVariant(
7701                    d.value
7702                        .into_int()
7703                        .map_err(|v| e(v, d.index, "LlamaVariant"))?,
7704                ));
7705            }
7706            _ => {}
7707        }
7708        Ok(())
7709    }
7710}
7711
7712/// The metadata bundle for [Llama].
7713///
7714/// This type should generally not be used directly.
7715#[derive(Bundle)]
7716pub struct LlamaMetadataBundle {
7717    _marker: Llama,
7718    parent: AbstractChestedHorseMetadataBundle,
7719    strength: Strength,
7720    llama_variant: LlamaVariant,
7721}
7722impl Default for LlamaMetadataBundle {
7723    fn default() -> Self {
7724        Self {
7725            _marker: Llama,
7726            parent: Default::default(),
7727            strength: Strength(0),
7728            llama_variant: LlamaVariant(0),
7729        }
7730    }
7731}
7732
7733/// The marker component for entities of type `minecraft:trader_llama`.
7734///
7735/// # Metadata
7736///
7737/// This entity type does not add any additional metadata. It will still have
7738/// metadata from parent types.
7739///
7740/// # Parents
7741///
7742/// Entities with `TraderLlama` will also have the following marker components
7743/// and their metadata fields:
7744///
7745/// - [Llama]
7746/// - [AbstractChestedHorse]
7747/// - [AbstractHorse]
7748/// - [AbstractAnimal]
7749/// - [AbstractAgeable]
7750/// - [AbstractCreature]
7751/// - [AbstractInsentient]
7752/// - [AbstractLiving]
7753/// - [AbstractEntity]
7754///
7755/// # Children
7756///
7757/// This entity type has no children types.
7758#[derive(Component)]
7759pub struct TraderLlama;
7760impl TraderLlama {
7761    fn apply_metadata(
7762        entity: &mut bevy_ecs::system::EntityCommands,
7763        d: EntityDataItem,
7764    ) -> Result<(), UpdateMetadataError> {
7765        match d.index {
7766            0..=21 => Llama::apply_metadata(entity, d)?,
7767            _ => {}
7768        }
7769        Ok(())
7770    }
7771}
7772
7773/// The metadata bundle for [TraderLlama].
7774///
7775/// This type should generally not be used directly.
7776#[derive(Bundle)]
7777pub struct TraderLlamaMetadataBundle {
7778    _marker: TraderLlama,
7779    parent: LlamaMetadataBundle,
7780}
7781impl Default for TraderLlamaMetadataBundle {
7782    fn default() -> Self {
7783        Self {
7784            _marker: TraderLlama,
7785            parent: Default::default(),
7786        }
7787    }
7788}
7789
7790/// The marker component for entities of type `minecraft:mule`.
7791///
7792/// # Metadata
7793///
7794/// This entity type does not add any additional metadata. It will still have
7795/// metadata from parent types.
7796///
7797/// # Parents
7798///
7799/// Entities with `Mule` will also have the following marker components and
7800/// their metadata fields:
7801///
7802/// - [AbstractChestedHorse]
7803/// - [AbstractHorse]
7804/// - [AbstractAnimal]
7805/// - [AbstractAgeable]
7806/// - [AbstractCreature]
7807/// - [AbstractInsentient]
7808/// - [AbstractLiving]
7809/// - [AbstractEntity]
7810///
7811/// # Children
7812///
7813/// This entity type has no children types.
7814#[derive(Component)]
7815pub struct Mule;
7816impl Mule {
7817    fn apply_metadata(
7818        entity: &mut bevy_ecs::system::EntityCommands,
7819        d: EntityDataItem,
7820    ) -> Result<(), UpdateMetadataError> {
7821        match d.index {
7822            0..=19 => AbstractChestedHorse::apply_metadata(entity, d)?,
7823            _ => {}
7824        }
7825        Ok(())
7826    }
7827}
7828
7829/// The metadata bundle for [Mule].
7830///
7831/// This type should generally not be used directly.
7832#[derive(Bundle)]
7833pub struct MuleMetadataBundle {
7834    _marker: Mule,
7835    parent: AbstractChestedHorseMetadataBundle,
7836}
7837impl Default for MuleMetadataBundle {
7838    fn default() -> Self {
7839        Self {
7840            _marker: Mule,
7841            parent: Default::default(),
7842        }
7843    }
7844}
7845
7846#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7847/// A metadata field for [AbstractTameable].
7848pub struct Tame(pub bool);
7849#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7850/// A metadata field for [AbstractTameable].
7851pub struct InSittingPose(pub bool);
7852/// A metadata field for [AbstractTameable].
7853#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7854pub struct Owneruuid(pub Option<Uuid>);
7855/// An abstract entity marker component.
7856///
7857/// # Metadata
7858///
7859/// These are the metadata components that all `AbstractTameable` entities are
7860/// guaranteed to have, in addition to the metadata components from parent
7861/// types:
7862///
7863/// - [Tame]
7864/// - [InSittingPose]
7865/// - [Owneruuid]
7866///
7867/// # Parents
7868///
7869/// Entities with `AbstractTameable` will also have the following marker
7870/// components and their metadata fields:
7871///
7872/// - [AbstractAnimal]
7873/// - [AbstractAgeable]
7874/// - [AbstractCreature]
7875/// - [AbstractInsentient]
7876/// - [AbstractLiving]
7877/// - [AbstractEntity]
7878///
7879/// # Children
7880///
7881/// - [Cat]
7882/// - [Parrot]
7883/// - [Wolf]
7884/// - [AbstractNautilus]
7885///   - [Nautilus]
7886///   - [ZombieNautilus]
7887#[derive(Component)]
7888pub struct AbstractTameable;
7889impl AbstractTameable {
7890    fn apply_metadata(
7891        entity: &mut bevy_ecs::system::EntityCommands,
7892        d: EntityDataItem,
7893    ) -> Result<(), UpdateMetadataError> {
7894        match d.index {
7895            0..=17 => AbstractAnimal::apply_metadata(entity, d)?,
7896            18 => {
7897                let bitfield = d
7898                    .value
7899                    .into_byte()
7900                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
7901                entity.insert(Tame(bitfield & 0x4 != 0));
7902                entity.insert(InSittingPose(bitfield & 0x1 != 0));
7903            }
7904            19 => {
7905                entity.insert(Owneruuid(
7906                    d.value
7907                        .into_optional_living_entity_reference()
7908                        .map_err(|v| e(v, d.index, "Owneruuid"))?,
7909                ));
7910            }
7911            _ => {}
7912        }
7913        Ok(())
7914    }
7915}
7916
7917/// The metadata bundle for [AbstractTameable].
7918///
7919/// This type should generally not be used directly.
7920#[derive(Bundle)]
7921pub struct AbstractTameableMetadataBundle {
7922    _marker: AbstractTameable,
7923    parent: AbstractAnimalMetadataBundle,
7924    tame: Tame,
7925    in_sitting_pose: InSittingPose,
7926    owneruuid: Owneruuid,
7927}
7928impl Default for AbstractTameableMetadataBundle {
7929    fn default() -> Self {
7930        Self {
7931            _marker: AbstractTameable,
7932            parent: Default::default(),
7933            tame: Tame(false),
7934            in_sitting_pose: InSittingPose(false),
7935            owneruuid: Owneruuid(None),
7936        }
7937    }
7938}
7939
7940/// A metadata field for [Cat].
7941#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7942pub struct CatVariant(pub azalea_registry::data::CatVariant);
7943/// A metadata field for [Cat].
7944#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7945pub struct IsLying(pub bool);
7946/// A metadata field for [Cat].
7947#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7948pub struct RelaxStateOne(pub bool);
7949/// A metadata field for [Cat].
7950#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7951pub struct CatCollarColor(pub i32);
7952/// A metadata field for [Cat].
7953#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7954pub struct CatSoundVariant(pub azalea_registry::data::CatSoundVariant);
7955/// The marker component for entities of type `minecraft:cat`.
7956///
7957/// # Metadata
7958///
7959/// These are the metadata components that all `Cat` entities are guaranteed to
7960/// have, in addition to the metadata components from parent types:
7961///
7962/// - [CatVariant]
7963/// - [IsLying]
7964/// - [RelaxStateOne]
7965/// - [CatCollarColor]
7966/// - [CatSoundVariant]
7967///
7968/// # Parents
7969///
7970/// Entities with `Cat` will also have the following marker components and their
7971/// metadata fields:
7972///
7973/// - [AbstractTameable]
7974/// - [AbstractAnimal]
7975/// - [AbstractAgeable]
7976/// - [AbstractCreature]
7977/// - [AbstractInsentient]
7978/// - [AbstractLiving]
7979/// - [AbstractEntity]
7980///
7981/// # Children
7982///
7983/// This entity type has no children types.
7984#[derive(Component)]
7985pub struct Cat;
7986impl Cat {
7987    fn apply_metadata(
7988        entity: &mut bevy_ecs::system::EntityCommands,
7989        d: EntityDataItem,
7990    ) -> Result<(), UpdateMetadataError> {
7991        match d.index {
7992            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
7993            20 => {
7994                entity.insert(CatVariant(
7995                    d.value
7996                        .into_cat_variant()
7997                        .map_err(|v| e(v, d.index, "CatVariant"))?,
7998                ));
7999            }
8000            21 => {
8001                entity.insert(IsLying(
8002                    d.value
8003                        .into_boolean()
8004                        .map_err(|v| e(v, d.index, "IsLying"))?,
8005                ));
8006            }
8007            22 => {
8008                entity.insert(RelaxStateOne(
8009                    d.value
8010                        .into_boolean()
8011                        .map_err(|v| e(v, d.index, "RelaxStateOne"))?,
8012                ));
8013            }
8014            23 => {
8015                entity.insert(CatCollarColor(
8016                    d.value
8017                        .into_int()
8018                        .map_err(|v| e(v, d.index, "CatCollarColor"))?,
8019                ));
8020            }
8021            24 => {
8022                entity.insert(CatSoundVariant(
8023                    d.value
8024                        .into_cat_sound_variant()
8025                        .map_err(|v| e(v, d.index, "CatSoundVariant"))?,
8026                ));
8027            }
8028            _ => {}
8029        }
8030        Ok(())
8031    }
8032}
8033
8034/// The metadata bundle for [Cat].
8035///
8036/// This type should generally not be used directly.
8037#[derive(Bundle)]
8038pub struct CatMetadataBundle {
8039    _marker: Cat,
8040    parent: AbstractTameableMetadataBundle,
8041    cat_variant: CatVariant,
8042    is_lying: IsLying,
8043    relax_state_one: RelaxStateOne,
8044    cat_collar_color: CatCollarColor,
8045    cat_sound_variant: CatSoundVariant,
8046}
8047impl Default for CatMetadataBundle {
8048    fn default() -> Self {
8049        Self {
8050            _marker: Cat,
8051            parent: Default::default(),
8052            cat_variant: CatVariant(azalea_registry::data::CatVariant::default()),
8053            is_lying: IsLying(false),
8054            relax_state_one: RelaxStateOne(false),
8055            cat_collar_color: CatCollarColor(Default::default()),
8056            cat_sound_variant: CatSoundVariant(azalea_registry::data::CatSoundVariant::default()),
8057        }
8058    }
8059}
8060
8061/// A metadata field for [Parrot].
8062#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8063pub struct ParrotVariant(pub i32);
8064/// The marker component for entities of type `minecraft:parrot`.
8065///
8066/// # Metadata
8067///
8068/// These are the metadata components that all `Parrot` entities are guaranteed
8069/// to have, in addition to the metadata components from parent types:
8070///
8071/// - [ParrotVariant]
8072///
8073/// # Parents
8074///
8075/// Entities with `Parrot` will also have the following marker components and
8076/// their metadata fields:
8077///
8078/// - [AbstractTameable]
8079/// - [AbstractAnimal]
8080/// - [AbstractAgeable]
8081/// - [AbstractCreature]
8082/// - [AbstractInsentient]
8083/// - [AbstractLiving]
8084/// - [AbstractEntity]
8085///
8086/// # Children
8087///
8088/// This entity type has no children types.
8089#[derive(Component)]
8090pub struct Parrot;
8091impl Parrot {
8092    fn apply_metadata(
8093        entity: &mut bevy_ecs::system::EntityCommands,
8094        d: EntityDataItem,
8095    ) -> Result<(), UpdateMetadataError> {
8096        match d.index {
8097            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
8098            20 => {
8099                entity.insert(ParrotVariant(
8100                    d.value
8101                        .into_int()
8102                        .map_err(|v| e(v, d.index, "ParrotVariant"))?,
8103                ));
8104            }
8105            _ => {}
8106        }
8107        Ok(())
8108    }
8109}
8110
8111/// The metadata bundle for [Parrot].
8112///
8113/// This type should generally not be used directly.
8114#[derive(Bundle)]
8115pub struct ParrotMetadataBundle {
8116    _marker: Parrot,
8117    parent: AbstractTameableMetadataBundle,
8118    parrot_variant: ParrotVariant,
8119}
8120impl Default for ParrotMetadataBundle {
8121    fn default() -> Self {
8122        Self {
8123            _marker: Parrot,
8124            parent: Default::default(),
8125            parrot_variant: ParrotVariant(Default::default()),
8126        }
8127    }
8128}
8129
8130/// A metadata field for [Wolf].
8131#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8132pub struct WolfInterested(pub bool);
8133/// A metadata field for [Wolf].
8134#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8135pub struct WolfCollarColor(pub i32);
8136/// A metadata field for [Wolf].
8137#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8138pub struct WolfAngerEndTime(pub i64);
8139/// A metadata field for [Wolf].
8140#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8141pub struct WolfVariant(pub azalea_registry::data::WolfVariant);
8142/// A metadata field for [Wolf].
8143#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8144pub struct WolfSoundVariant(pub azalea_registry::data::WolfSoundVariant);
8145/// The marker component for entities of type `minecraft:wolf`.
8146///
8147/// # Metadata
8148///
8149/// These are the metadata components that all `Wolf` entities are guaranteed to
8150/// have, in addition to the metadata components from parent types:
8151///
8152/// - [WolfInterested]
8153/// - [WolfCollarColor]
8154/// - [WolfAngerEndTime]
8155/// - [WolfVariant]
8156/// - [WolfSoundVariant]
8157///
8158/// # Parents
8159///
8160/// Entities with `Wolf` will also have the following marker components and
8161/// their metadata fields:
8162///
8163/// - [AbstractTameable]
8164/// - [AbstractAnimal]
8165/// - [AbstractAgeable]
8166/// - [AbstractCreature]
8167/// - [AbstractInsentient]
8168/// - [AbstractLiving]
8169/// - [AbstractEntity]
8170///
8171/// # Children
8172///
8173/// This entity type has no children types.
8174#[derive(Component)]
8175pub struct Wolf;
8176impl Wolf {
8177    fn apply_metadata(
8178        entity: &mut bevy_ecs::system::EntityCommands,
8179        d: EntityDataItem,
8180    ) -> Result<(), UpdateMetadataError> {
8181        match d.index {
8182            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
8183            20 => {
8184                entity.insert(WolfInterested(
8185                    d.value
8186                        .into_boolean()
8187                        .map_err(|v| e(v, d.index, "WolfInterested"))?,
8188                ));
8189            }
8190            21 => {
8191                entity.insert(WolfCollarColor(
8192                    d.value
8193                        .into_int()
8194                        .map_err(|v| e(v, d.index, "WolfCollarColor"))?,
8195                ));
8196            }
8197            22 => {
8198                entity.insert(WolfAngerEndTime(
8199                    d.value
8200                        .into_long()
8201                        .map_err(|v| e(v, d.index, "WolfAngerEndTime"))?,
8202                ));
8203            }
8204            23 => {
8205                entity.insert(WolfVariant(
8206                    d.value
8207                        .into_wolf_variant()
8208                        .map_err(|v| e(v, d.index, "WolfVariant"))?,
8209                ));
8210            }
8211            24 => {
8212                entity.insert(WolfSoundVariant(
8213                    d.value
8214                        .into_wolf_sound_variant()
8215                        .map_err(|v| e(v, d.index, "WolfSoundVariant"))?,
8216                ));
8217            }
8218            _ => {}
8219        }
8220        Ok(())
8221    }
8222}
8223
8224/// The metadata bundle for [Wolf].
8225///
8226/// This type should generally not be used directly.
8227#[derive(Bundle)]
8228pub struct WolfMetadataBundle {
8229    _marker: Wolf,
8230    parent: AbstractTameableMetadataBundle,
8231    wolf_interested: WolfInterested,
8232    wolf_collar_color: WolfCollarColor,
8233    wolf_anger_end_time: WolfAngerEndTime,
8234    wolf_variant: WolfVariant,
8235    wolf_sound_variant: WolfSoundVariant,
8236}
8237impl Default for WolfMetadataBundle {
8238    fn default() -> Self {
8239        Self {
8240            _marker: Wolf,
8241            parent: Default::default(),
8242            wolf_interested: WolfInterested(false),
8243            wolf_collar_color: WolfCollarColor(Default::default()),
8244            wolf_anger_end_time: WolfAngerEndTime(-1),
8245            wolf_variant: WolfVariant(azalea_registry::data::WolfVariant::default()),
8246            wolf_sound_variant: WolfSoundVariant(azalea_registry::data::WolfSoundVariant::default()),
8247        }
8248    }
8249}
8250
8251/// A metadata field for [AbstractNautilus].
8252#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8253pub struct AbstractNautilusDash(pub bool);
8254/// An abstract entity marker component.
8255///
8256/// # Metadata
8257///
8258/// These are the metadata components that all `AbstractNautilus` entities are
8259/// guaranteed to have, in addition to the metadata components from parent
8260/// types:
8261///
8262/// - [AbstractNautilusDash]
8263///
8264/// # Parents
8265///
8266/// Entities with `AbstractNautilus` will also have the following marker
8267/// components and their metadata fields:
8268///
8269/// - [AbstractTameable]
8270/// - [AbstractAnimal]
8271/// - [AbstractAgeable]
8272/// - [AbstractCreature]
8273/// - [AbstractInsentient]
8274/// - [AbstractLiving]
8275/// - [AbstractEntity]
8276///
8277/// # Children
8278///
8279/// - [Nautilus]
8280/// - [ZombieNautilus]
8281#[derive(Component)]
8282pub struct AbstractNautilus;
8283impl AbstractNautilus {
8284    fn apply_metadata(
8285        entity: &mut bevy_ecs::system::EntityCommands,
8286        d: EntityDataItem,
8287    ) -> Result<(), UpdateMetadataError> {
8288        match d.index {
8289            0..=19 => AbstractTameable::apply_metadata(entity, d)?,
8290            20 => {
8291                entity.insert(AbstractNautilusDash(
8292                    d.value
8293                        .into_boolean()
8294                        .map_err(|v| e(v, d.index, "AbstractNautilusDash"))?,
8295                ));
8296            }
8297            _ => {}
8298        }
8299        Ok(())
8300    }
8301}
8302
8303/// The metadata bundle for [AbstractNautilus].
8304///
8305/// This type should generally not be used directly.
8306#[derive(Bundle)]
8307pub struct AbstractNautilusMetadataBundle {
8308    _marker: AbstractNautilus,
8309    parent: AbstractTameableMetadataBundle,
8310    abstract_nautilus_dash: AbstractNautilusDash,
8311}
8312impl Default for AbstractNautilusMetadataBundle {
8313    fn default() -> Self {
8314        Self {
8315            _marker: AbstractNautilus,
8316            parent: Default::default(),
8317            abstract_nautilus_dash: AbstractNautilusDash(false),
8318        }
8319    }
8320}
8321
8322/// The marker component for entities of type `minecraft:nautilus`.
8323///
8324/// # Metadata
8325///
8326/// This entity type does not add any additional metadata. It will still have
8327/// metadata from parent types.
8328///
8329/// # Parents
8330///
8331/// Entities with `Nautilus` will also have the following marker components and
8332/// their metadata fields:
8333///
8334/// - [AbstractNautilus]
8335/// - [AbstractTameable]
8336/// - [AbstractAnimal]
8337/// - [AbstractAgeable]
8338/// - [AbstractCreature]
8339/// - [AbstractInsentient]
8340/// - [AbstractLiving]
8341/// - [AbstractEntity]
8342///
8343/// # Children
8344///
8345/// This entity type has no children types.
8346#[derive(Component)]
8347pub struct Nautilus;
8348impl Nautilus {
8349    fn apply_metadata(
8350        entity: &mut bevy_ecs::system::EntityCommands,
8351        d: EntityDataItem,
8352    ) -> Result<(), UpdateMetadataError> {
8353        match d.index {
8354            0..=20 => AbstractNautilus::apply_metadata(entity, d)?,
8355            _ => {}
8356        }
8357        Ok(())
8358    }
8359}
8360
8361/// The metadata bundle for [Nautilus].
8362///
8363/// This type should generally not be used directly.
8364#[derive(Bundle)]
8365pub struct NautilusMetadataBundle {
8366    _marker: Nautilus,
8367    parent: AbstractNautilusMetadataBundle,
8368}
8369impl Default for NautilusMetadataBundle {
8370    fn default() -> Self {
8371        Self {
8372            _marker: Nautilus,
8373            parent: Default::default(),
8374        }
8375    }
8376}
8377
8378/// A metadata field for [ZombieNautilus].
8379#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8380pub struct ZombieNautilusVariant(pub azalea_registry::data::ZombieNautilusVariant);
8381/// The marker component for entities of type `minecraft:zombie_nautilus`.
8382///
8383/// # Metadata
8384///
8385/// These are the metadata components that all `ZombieNautilus` entities are
8386/// guaranteed to have, in addition to the metadata components from parent
8387/// types:
8388///
8389/// - [ZombieNautilusVariant]
8390///
8391/// # Parents
8392///
8393/// Entities with `ZombieNautilus` will also have the following marker
8394/// components and their metadata fields:
8395///
8396/// - [AbstractNautilus]
8397/// - [AbstractTameable]
8398/// - [AbstractAnimal]
8399/// - [AbstractAgeable]
8400/// - [AbstractCreature]
8401/// - [AbstractInsentient]
8402/// - [AbstractLiving]
8403/// - [AbstractEntity]
8404///
8405/// # Children
8406///
8407/// This entity type has no children types.
8408#[derive(Component)]
8409pub struct ZombieNautilus;
8410impl ZombieNautilus {
8411    fn apply_metadata(
8412        entity: &mut bevy_ecs::system::EntityCommands,
8413        d: EntityDataItem,
8414    ) -> Result<(), UpdateMetadataError> {
8415        match d.index {
8416            0..=20 => AbstractNautilus::apply_metadata(entity, d)?,
8417            21 => {
8418                entity.insert(ZombieNautilusVariant(
8419                    d.value
8420                        .into_zombie_nautilus_variant()
8421                        .map_err(|v| e(v, d.index, "ZombieNautilusVariant"))?,
8422                ));
8423            }
8424            _ => {}
8425        }
8426        Ok(())
8427    }
8428}
8429
8430/// The metadata bundle for [ZombieNautilus].
8431///
8432/// This type should generally not be used directly.
8433#[derive(Bundle)]
8434pub struct ZombieNautilusMetadataBundle {
8435    _marker: ZombieNautilus,
8436    parent: AbstractNautilusMetadataBundle,
8437    zombie_nautilus_variant: ZombieNautilusVariant,
8438}
8439impl Default for ZombieNautilusMetadataBundle {
8440    fn default() -> Self {
8441        Self {
8442            _marker: ZombieNautilus,
8443            parent: Default::default(),
8444            zombie_nautilus_variant: ZombieNautilusVariant(
8445                azalea_registry::data::ZombieNautilusVariant::default(),
8446            ),
8447        }
8448    }
8449}
8450
8451/// A metadata field for [AbstractCubeMob].
8452#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8453pub struct AbstractCubeMobSize(pub i32);
8454/// An abstract entity marker component.
8455///
8456/// # Metadata
8457///
8458/// These are the metadata components that all `AbstractCubeMob` entities are
8459/// guaranteed to have, in addition to the metadata components from parent
8460/// types:
8461///
8462/// - [AbstractCubeMobSize]
8463///
8464/// # Parents
8465///
8466/// Entities with `AbstractCubeMob` will also have the following marker
8467/// components and their metadata fields:
8468///
8469/// - [AbstractAgeable]
8470/// - [AbstractCreature]
8471/// - [AbstractInsentient]
8472/// - [AbstractLiving]
8473/// - [AbstractEntity]
8474///
8475/// # Children
8476///
8477/// - [MagmaCube]
8478/// - [Slime]
8479/// - [SulfurCube]
8480#[derive(Component)]
8481pub struct AbstractCubeMob;
8482impl AbstractCubeMob {
8483    fn apply_metadata(
8484        entity: &mut bevy_ecs::system::EntityCommands,
8485        d: EntityDataItem,
8486    ) -> Result<(), UpdateMetadataError> {
8487        match d.index {
8488            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
8489            18 => {
8490                entity.insert(AbstractCubeMobSize(
8491                    d.value
8492                        .into_int()
8493                        .map_err(|v| e(v, d.index, "AbstractCubeMobSize"))?,
8494                ));
8495            }
8496            _ => {}
8497        }
8498        Ok(())
8499    }
8500}
8501
8502/// The metadata bundle for [AbstractCubeMob].
8503///
8504/// This type should generally not be used directly.
8505#[derive(Bundle)]
8506pub struct AbstractCubeMobMetadataBundle {
8507    _marker: AbstractCubeMob,
8508    parent: AbstractAgeableMetadataBundle,
8509    abstract_cube_mob_size: AbstractCubeMobSize,
8510}
8511impl Default for AbstractCubeMobMetadataBundle {
8512    fn default() -> Self {
8513        Self {
8514            _marker: AbstractCubeMob,
8515            parent: Default::default(),
8516            abstract_cube_mob_size: AbstractCubeMobSize(1),
8517        }
8518    }
8519}
8520
8521/// The marker component for entities of type `minecraft:magma_cube`.
8522///
8523/// # Metadata
8524///
8525/// This entity type does not add any additional metadata. It will still have
8526/// metadata from parent types.
8527///
8528/// # Parents
8529///
8530/// Entities with `MagmaCube` will also have the following marker components and
8531/// their metadata fields:
8532///
8533/// - [AbstractCubeMob]
8534/// - [AbstractAgeable]
8535/// - [AbstractCreature]
8536/// - [AbstractInsentient]
8537/// - [AbstractLiving]
8538/// - [AbstractEntity]
8539///
8540/// # Children
8541///
8542/// This entity type has no children types.
8543#[derive(Component)]
8544pub struct MagmaCube;
8545impl MagmaCube {
8546    fn apply_metadata(
8547        entity: &mut bevy_ecs::system::EntityCommands,
8548        d: EntityDataItem,
8549    ) -> Result<(), UpdateMetadataError> {
8550        match d.index {
8551            0..=18 => AbstractCubeMob::apply_metadata(entity, d)?,
8552            _ => {}
8553        }
8554        Ok(())
8555    }
8556}
8557
8558/// The metadata bundle for [MagmaCube].
8559///
8560/// This type should generally not be used directly.
8561#[derive(Bundle)]
8562pub struct MagmaCubeMetadataBundle {
8563    _marker: MagmaCube,
8564    parent: AbstractCubeMobMetadataBundle,
8565}
8566impl Default for MagmaCubeMetadataBundle {
8567    fn default() -> Self {
8568        Self {
8569            _marker: MagmaCube,
8570            parent: Default::default(),
8571        }
8572    }
8573}
8574
8575/// The marker component for entities of type `minecraft:slime`.
8576///
8577/// # Metadata
8578///
8579/// This entity type does not add any additional metadata. It will still have
8580/// metadata from parent types.
8581///
8582/// # Parents
8583///
8584/// Entities with `Slime` will also have the following marker components and
8585/// their metadata fields:
8586///
8587/// - [AbstractCubeMob]
8588/// - [AbstractAgeable]
8589/// - [AbstractCreature]
8590/// - [AbstractInsentient]
8591/// - [AbstractLiving]
8592/// - [AbstractEntity]
8593///
8594/// # Children
8595///
8596/// This entity type has no children types.
8597#[derive(Component)]
8598pub struct Slime;
8599impl Slime {
8600    fn apply_metadata(
8601        entity: &mut bevy_ecs::system::EntityCommands,
8602        d: EntityDataItem,
8603    ) -> Result<(), UpdateMetadataError> {
8604        match d.index {
8605            0..=18 => AbstractCubeMob::apply_metadata(entity, d)?,
8606            _ => {}
8607        }
8608        Ok(())
8609    }
8610}
8611
8612/// The metadata bundle for [Slime].
8613///
8614/// This type should generally not be used directly.
8615#[derive(Bundle)]
8616pub struct SlimeMetadataBundle {
8617    _marker: Slime,
8618    parent: AbstractCubeMobMetadataBundle,
8619}
8620impl Default for SlimeMetadataBundle {
8621    fn default() -> Self {
8622        Self {
8623            _marker: Slime,
8624            parent: Default::default(),
8625        }
8626    }
8627}
8628
8629/// A metadata field for [SulfurCube].
8630#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8631pub struct MaxFuse(pub i32);
8632/// A metadata field for [SulfurCube].
8633#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8634pub struct SulfurCubeFromBucket(pub bool);
8635/// The marker component for entities of type `minecraft:sulfur_cube`.
8636///
8637/// # Metadata
8638///
8639/// These are the metadata components that all `SulfurCube` entities are
8640/// guaranteed to have, in addition to the metadata components from parent
8641/// types:
8642///
8643/// - [MaxFuse]
8644/// - [SulfurCubeFromBucket]
8645///
8646/// # Parents
8647///
8648/// Entities with `SulfurCube` will also have the following marker components
8649/// and their metadata fields:
8650///
8651/// - [AbstractCubeMob]
8652/// - [AbstractAgeable]
8653/// - [AbstractCreature]
8654/// - [AbstractInsentient]
8655/// - [AbstractLiving]
8656/// - [AbstractEntity]
8657///
8658/// # Children
8659///
8660/// This entity type has no children types.
8661#[derive(Component)]
8662pub struct SulfurCube;
8663impl SulfurCube {
8664    fn apply_metadata(
8665        entity: &mut bevy_ecs::system::EntityCommands,
8666        d: EntityDataItem,
8667    ) -> Result<(), UpdateMetadataError> {
8668        match d.index {
8669            0..=18 => AbstractCubeMob::apply_metadata(entity, d)?,
8670            19 => {
8671                entity.insert(MaxFuse(
8672                    d.value.into_int().map_err(|v| e(v, d.index, "MaxFuse"))?,
8673                ));
8674            }
8675            20 => {
8676                entity.insert(SulfurCubeFromBucket(
8677                    d.value
8678                        .into_boolean()
8679                        .map_err(|v| e(v, d.index, "SulfurCubeFromBucket"))?,
8680                ));
8681            }
8682            _ => {}
8683        }
8684        Ok(())
8685    }
8686}
8687
8688/// The metadata bundle for [SulfurCube].
8689///
8690/// This type should generally not be used directly.
8691#[derive(Bundle)]
8692pub struct SulfurCubeMetadataBundle {
8693    _marker: SulfurCube,
8694    parent: AbstractCubeMobMetadataBundle,
8695    max_fuse: MaxFuse,
8696    sulfur_cube_from_bucket: SulfurCubeFromBucket,
8697}
8698impl Default for SulfurCubeMetadataBundle {
8699    fn default() -> Self {
8700        Self {
8701            _marker: SulfurCube,
8702            parent: Default::default(),
8703            max_fuse: MaxFuse(-1),
8704            sulfur_cube_from_bucket: SulfurCubeFromBucket(false),
8705        }
8706    }
8707}
8708
8709/// A metadata field for [AbstractVillager].
8710#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8711pub struct AbstractVillagerUnhappyCounter(pub i32);
8712/// An abstract entity marker component.
8713///
8714/// # Metadata
8715///
8716/// These are the metadata components that all `AbstractVillager` entities are
8717/// guaranteed to have, in addition to the metadata components from parent
8718/// types:
8719///
8720/// - [AbstractVillagerUnhappyCounter]
8721///
8722/// # Parents
8723///
8724/// Entities with `AbstractVillager` will also have the following marker
8725/// components and their metadata fields:
8726///
8727/// - [AbstractAgeable]
8728/// - [AbstractCreature]
8729/// - [AbstractInsentient]
8730/// - [AbstractLiving]
8731/// - [AbstractEntity]
8732///
8733/// # Children
8734///
8735/// - [Villager]
8736/// - [WanderingTrader]
8737#[derive(Component)]
8738pub struct AbstractVillager;
8739impl AbstractVillager {
8740    fn apply_metadata(
8741        entity: &mut bevy_ecs::system::EntityCommands,
8742        d: EntityDataItem,
8743    ) -> Result<(), UpdateMetadataError> {
8744        match d.index {
8745            0..=17 => AbstractAgeable::apply_metadata(entity, d)?,
8746            18 => {
8747                entity.insert(AbstractVillagerUnhappyCounter(
8748                    d.value
8749                        .into_int()
8750                        .map_err(|v| e(v, d.index, "AbstractVillagerUnhappyCounter"))?,
8751                ));
8752            }
8753            _ => {}
8754        }
8755        Ok(())
8756    }
8757}
8758
8759/// The metadata bundle for [AbstractVillager].
8760///
8761/// This type should generally not be used directly.
8762#[derive(Bundle)]
8763pub struct AbstractVillagerMetadataBundle {
8764    _marker: AbstractVillager,
8765    parent: AbstractAgeableMetadataBundle,
8766    abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter,
8767}
8768impl Default for AbstractVillagerMetadataBundle {
8769    fn default() -> Self {
8770        Self {
8771            _marker: AbstractVillager,
8772            parent: Default::default(),
8773            abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
8774        }
8775    }
8776}
8777
8778/// A metadata field for [Villager].
8779#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8780pub struct VillagerVillagerData(pub VillagerData);
8781/// A metadata field for [Villager].
8782#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8783pub struct VillagerVillagerDataFinalized(pub bool);
8784/// The marker component for entities of type `minecraft:villager`.
8785///
8786/// # Metadata
8787///
8788/// These are the metadata components that all `Villager` entities are
8789/// guaranteed to have, in addition to the metadata components from parent
8790/// types:
8791///
8792/// - [VillagerVillagerData]
8793/// - [VillagerVillagerDataFinalized]
8794///
8795/// # Parents
8796///
8797/// Entities with `Villager` will also have the following marker components and
8798/// their metadata fields:
8799///
8800/// - [AbstractVillager]
8801/// - [AbstractAgeable]
8802/// - [AbstractCreature]
8803/// - [AbstractInsentient]
8804/// - [AbstractLiving]
8805/// - [AbstractEntity]
8806///
8807/// # Children
8808///
8809/// This entity type has no children types.
8810#[derive(Component)]
8811pub struct Villager;
8812impl Villager {
8813    fn apply_metadata(
8814        entity: &mut bevy_ecs::system::EntityCommands,
8815        d: EntityDataItem,
8816    ) -> Result<(), UpdateMetadataError> {
8817        match d.index {
8818            0..=18 => AbstractVillager::apply_metadata(entity, d)?,
8819            19 => {
8820                entity.insert(VillagerVillagerData(
8821                    d.value
8822                        .into_villager_data()
8823                        .map_err(|v| e(v, d.index, "VillagerVillagerData"))?,
8824                ));
8825            }
8826            20 => {
8827                entity.insert(VillagerVillagerDataFinalized(
8828                    d.value
8829                        .into_boolean()
8830                        .map_err(|v| e(v, d.index, "VillagerVillagerDataFinalized"))?,
8831                ));
8832            }
8833            _ => {}
8834        }
8835        Ok(())
8836    }
8837}
8838
8839/// The metadata bundle for [Villager].
8840///
8841/// This type should generally not be used directly.
8842#[derive(Bundle)]
8843pub struct VillagerMetadataBundle {
8844    _marker: Villager,
8845    parent: AbstractVillagerMetadataBundle,
8846    villager_villager_data: VillagerVillagerData,
8847    villager_villager_data_finalized: VillagerVillagerDataFinalized,
8848}
8849impl Default for VillagerMetadataBundle {
8850    fn default() -> Self {
8851        Self {
8852            _marker: Villager,
8853            parent: Default::default(),
8854            villager_villager_data: VillagerVillagerData(VillagerData {
8855                kind: azalea_registry::builtin::VillagerKind::Plains,
8856                profession: azalea_registry::builtin::VillagerProfession::None,
8857                level: 0,
8858            }),
8859            villager_villager_data_finalized: VillagerVillagerDataFinalized(false),
8860        }
8861    }
8862}
8863
8864/// The marker component for entities of type `minecraft:wandering_trader`.
8865///
8866/// # Metadata
8867///
8868/// This entity type does not add any additional metadata. It will still have
8869/// metadata from parent types.
8870///
8871/// # Parents
8872///
8873/// Entities with `WanderingTrader` will also have the following marker
8874/// components and their metadata fields:
8875///
8876/// - [AbstractVillager]
8877/// - [AbstractAgeable]
8878/// - [AbstractCreature]
8879/// - [AbstractInsentient]
8880/// - [AbstractLiving]
8881/// - [AbstractEntity]
8882///
8883/// # Children
8884///
8885/// This entity type has no children types.
8886#[derive(Component)]
8887pub struct WanderingTrader;
8888impl WanderingTrader {
8889    fn apply_metadata(
8890        entity: &mut bevy_ecs::system::EntityCommands,
8891        d: EntityDataItem,
8892    ) -> Result<(), UpdateMetadataError> {
8893        match d.index {
8894            0..=18 => AbstractVillager::apply_metadata(entity, d)?,
8895            _ => {}
8896        }
8897        Ok(())
8898    }
8899}
8900
8901/// The metadata bundle for [WanderingTrader].
8902///
8903/// This type should generally not be used directly.
8904#[derive(Bundle)]
8905pub struct WanderingTraderMetadataBundle {
8906    _marker: WanderingTrader,
8907    parent: AbstractVillagerMetadataBundle,
8908}
8909impl Default for WanderingTraderMetadataBundle {
8910    fn default() -> Self {
8911        Self {
8912            _marker: WanderingTrader,
8913            parent: Default::default(),
8914        }
8915    }
8916}
8917
8918/// A metadata field for [AbstractFish].
8919#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8920pub struct AbstractFishFromBucket(pub bool);
8921/// An abstract entity marker component.
8922///
8923/// # Metadata
8924///
8925/// These are the metadata components that all `AbstractFish` entities are
8926/// guaranteed to have, in addition to the metadata components from parent
8927/// types:
8928///
8929/// - [AbstractFishFromBucket]
8930///
8931/// # Parents
8932///
8933/// Entities with `AbstractFish` will also have the following marker components
8934/// and their metadata fields:
8935///
8936/// - [AbstractCreature]
8937/// - [AbstractInsentient]
8938/// - [AbstractLiving]
8939/// - [AbstractEntity]
8940///
8941/// # Children
8942///
8943/// - [Cod]
8944/// - [Salmon]
8945/// - [TropicalFish]
8946#[derive(Component)]
8947pub struct AbstractFish;
8948impl AbstractFish {
8949    fn apply_metadata(
8950        entity: &mut bevy_ecs::system::EntityCommands,
8951        d: EntityDataItem,
8952    ) -> Result<(), UpdateMetadataError> {
8953        match d.index {
8954            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
8955            16 => {
8956                entity.insert(AbstractFishFromBucket(
8957                    d.value
8958                        .into_boolean()
8959                        .map_err(|v| e(v, d.index, "AbstractFishFromBucket"))?,
8960                ));
8961            }
8962            _ => {}
8963        }
8964        Ok(())
8965    }
8966}
8967
8968/// The metadata bundle for [AbstractFish].
8969///
8970/// This type should generally not be used directly.
8971#[derive(Bundle)]
8972pub struct AbstractFishMetadataBundle {
8973    _marker: AbstractFish,
8974    parent: AbstractCreatureMetadataBundle,
8975    abstract_fish_from_bucket: AbstractFishFromBucket,
8976}
8977impl Default for AbstractFishMetadataBundle {
8978    fn default() -> Self {
8979        Self {
8980            _marker: AbstractFish,
8981            parent: Default::default(),
8982            abstract_fish_from_bucket: AbstractFishFromBucket(false),
8983        }
8984    }
8985}
8986
8987/// The marker component for entities of type `minecraft:cod`.
8988///
8989/// # Metadata
8990///
8991/// This entity type does not add any additional metadata. It will still have
8992/// metadata from parent types.
8993///
8994/// # Parents
8995///
8996/// Entities with `Cod` will also have the following marker components and their
8997/// metadata fields:
8998///
8999/// - [AbstractFish]
9000/// - [AbstractCreature]
9001/// - [AbstractInsentient]
9002/// - [AbstractLiving]
9003/// - [AbstractEntity]
9004///
9005/// # Children
9006///
9007/// This entity type has no children types.
9008#[derive(Component)]
9009pub struct Cod;
9010impl Cod {
9011    fn apply_metadata(
9012        entity: &mut bevy_ecs::system::EntityCommands,
9013        d: EntityDataItem,
9014    ) -> Result<(), UpdateMetadataError> {
9015        match d.index {
9016            0..=16 => AbstractFish::apply_metadata(entity, d)?,
9017            _ => {}
9018        }
9019        Ok(())
9020    }
9021}
9022
9023/// The metadata bundle for [Cod].
9024///
9025/// This type should generally not be used directly.
9026#[derive(Bundle)]
9027pub struct CodMetadataBundle {
9028    _marker: Cod,
9029    parent: AbstractFishMetadataBundle,
9030}
9031impl Default for CodMetadataBundle {
9032    fn default() -> Self {
9033        Self {
9034            _marker: Cod,
9035            parent: Default::default(),
9036        }
9037    }
9038}
9039
9040/// A metadata field for [Salmon].
9041#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9042pub struct SalmonKind(pub i32);
9043/// The marker component for entities of type `minecraft:salmon`.
9044///
9045/// # Metadata
9046///
9047/// These are the metadata components that all `Salmon` entities are guaranteed
9048/// to have, in addition to the metadata components from parent types:
9049///
9050/// - [SalmonKind]
9051///
9052/// # Parents
9053///
9054/// Entities with `Salmon` will also have the following marker components and
9055/// their metadata fields:
9056///
9057/// - [AbstractFish]
9058/// - [AbstractCreature]
9059/// - [AbstractInsentient]
9060/// - [AbstractLiving]
9061/// - [AbstractEntity]
9062///
9063/// # Children
9064///
9065/// This entity type has no children types.
9066#[derive(Component)]
9067pub struct Salmon;
9068impl Salmon {
9069    fn apply_metadata(
9070        entity: &mut bevy_ecs::system::EntityCommands,
9071        d: EntityDataItem,
9072    ) -> Result<(), UpdateMetadataError> {
9073        match d.index {
9074            0..=16 => AbstractFish::apply_metadata(entity, d)?,
9075            17 => {
9076                entity.insert(SalmonKind(
9077                    d.value
9078                        .into_int()
9079                        .map_err(|v| e(v, d.index, "SalmonKind"))?,
9080                ));
9081            }
9082            _ => {}
9083        }
9084        Ok(())
9085    }
9086}
9087
9088/// The metadata bundle for [Salmon].
9089///
9090/// This type should generally not be used directly.
9091#[derive(Bundle)]
9092pub struct SalmonMetadataBundle {
9093    _marker: Salmon,
9094    parent: AbstractFishMetadataBundle,
9095    salmon_kind: SalmonKind,
9096}
9097impl Default for SalmonMetadataBundle {
9098    fn default() -> Self {
9099        Self {
9100            _marker: Salmon,
9101            parent: Default::default(),
9102            salmon_kind: SalmonKind(Default::default()),
9103        }
9104    }
9105}
9106
9107/// A metadata field for [TropicalFish].
9108#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9109pub struct TropicalFishTypeVariant(pub i32);
9110/// The marker component for entities of type `minecraft:tropical_fish`.
9111///
9112/// # Metadata
9113///
9114/// These are the metadata components that all `TropicalFish` entities are
9115/// guaranteed to have, in addition to the metadata components from parent
9116/// types:
9117///
9118/// - [TropicalFishTypeVariant]
9119///
9120/// # Parents
9121///
9122/// Entities with `TropicalFish` will also have the following marker components
9123/// and their metadata fields:
9124///
9125/// - [AbstractFish]
9126/// - [AbstractCreature]
9127/// - [AbstractInsentient]
9128/// - [AbstractLiving]
9129/// - [AbstractEntity]
9130///
9131/// # Children
9132///
9133/// This entity type has no children types.
9134#[derive(Component)]
9135pub struct TropicalFish;
9136impl TropicalFish {
9137    fn apply_metadata(
9138        entity: &mut bevy_ecs::system::EntityCommands,
9139        d: EntityDataItem,
9140    ) -> Result<(), UpdateMetadataError> {
9141        match d.index {
9142            0..=16 => AbstractFish::apply_metadata(entity, d)?,
9143            17 => {
9144                entity.insert(TropicalFishTypeVariant(
9145                    d.value
9146                        .into_int()
9147                        .map_err(|v| e(v, d.index, "TropicalFishTypeVariant"))?,
9148                ));
9149            }
9150            _ => {}
9151        }
9152        Ok(())
9153    }
9154}
9155
9156/// The metadata bundle for [TropicalFish].
9157///
9158/// This type should generally not be used directly.
9159#[derive(Bundle)]
9160pub struct TropicalFishMetadataBundle {
9161    _marker: TropicalFish,
9162    parent: AbstractFishMetadataBundle,
9163    tropical_fish_type_variant: TropicalFishTypeVariant,
9164}
9165impl Default for TropicalFishMetadataBundle {
9166    fn default() -> Self {
9167        Self {
9168            _marker: TropicalFish,
9169            parent: Default::default(),
9170            tropical_fish_type_variant: TropicalFishTypeVariant(Default::default()),
9171        }
9172    }
9173}
9174
9175/// An abstract entity marker component.
9176///
9177/// # Metadata
9178///
9179/// This entity type does not add any additional metadata. It will still have
9180/// metadata from parent types.
9181///
9182/// # Parents
9183///
9184/// Entities with `AbstractMonster` will also have the following marker
9185/// components and their metadata fields:
9186///
9187/// - [AbstractCreature]
9188/// - [AbstractInsentient]
9189/// - [AbstractLiving]
9190/// - [AbstractEntity]
9191///
9192/// # Children
9193///
9194/// - [Blaze]
9195/// - [Bogged]
9196/// - [Breeze]
9197/// - [Creaking]
9198/// - [Creeper]
9199/// - [Enderman]
9200/// - [Endermite]
9201/// - [Giant]
9202/// - [Guardian]
9203///   - [ElderGuardian]
9204/// - [Parched]
9205/// - [Silverfish]
9206/// - [Skeleton]
9207/// - [Spider]
9208///   - [CaveSpider]
9209/// - [Stray]
9210/// - [Vex]
9211/// - [Warden]
9212/// - [Wither]
9213/// - [WitherSkeleton]
9214/// - [Zoglin]
9215/// - [Zombie]
9216///   - [Drowned]
9217///   - [Husk]
9218///   - [ZombieVillager]
9219///   - [ZombifiedPiglin]
9220/// - [AbstractPiglin]
9221///   - [Piglin]
9222///   - [PiglinBrute]
9223/// - [AbstractRaider]
9224///   - [Pillager]
9225///   - [Ravager]
9226///   - [Vindicator]
9227///   - [Witch]
9228///   - [AbstractSpellcasterIllager]
9229///     - [Evoker]
9230///     - [Illusioner]
9231#[derive(Component)]
9232pub struct AbstractMonster;
9233impl AbstractMonster {
9234    fn apply_metadata(
9235        entity: &mut bevy_ecs::system::EntityCommands,
9236        d: EntityDataItem,
9237    ) -> Result<(), UpdateMetadataError> {
9238        match d.index {
9239            0..=15 => AbstractCreature::apply_metadata(entity, d)?,
9240            _ => {}
9241        }
9242        Ok(())
9243    }
9244}
9245
9246/// The metadata bundle for [AbstractMonster].
9247///
9248/// This type should generally not be used directly.
9249#[derive(Bundle)]
9250pub struct AbstractMonsterMetadataBundle {
9251    _marker: AbstractMonster,
9252    parent: AbstractCreatureMetadataBundle,
9253}
9254impl Default for AbstractMonsterMetadataBundle {
9255    fn default() -> Self {
9256        Self {
9257            _marker: AbstractMonster,
9258            parent: Default::default(),
9259        }
9260    }
9261}
9262
9263#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
9264/// A metadata field for [Blaze].
9265pub struct Charged(pub bool);
9266/// The marker component for entities of type `minecraft:blaze`.
9267///
9268/// # Metadata
9269///
9270/// These are the metadata components that all `Blaze` entities are guaranteed
9271/// to have, in addition to the metadata components from parent types:
9272///
9273/// - [Charged]
9274///
9275/// # Parents
9276///
9277/// Entities with `Blaze` will also have the following marker components and
9278/// their metadata fields:
9279///
9280/// - [AbstractMonster]
9281/// - [AbstractCreature]
9282/// - [AbstractInsentient]
9283/// - [AbstractLiving]
9284/// - [AbstractEntity]
9285///
9286/// # Children
9287///
9288/// This entity type has no children types.
9289#[derive(Component)]
9290pub struct Blaze;
9291impl Blaze {
9292    fn apply_metadata(
9293        entity: &mut bevy_ecs::system::EntityCommands,
9294        d: EntityDataItem,
9295    ) -> Result<(), UpdateMetadataError> {
9296        match d.index {
9297            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9298            16 => {
9299                let bitfield = d
9300                    .value
9301                    .into_byte()
9302                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
9303                entity.insert(Charged(bitfield & 0x1 != 0));
9304            }
9305            _ => {}
9306        }
9307        Ok(())
9308    }
9309}
9310
9311/// The metadata bundle for [Blaze].
9312///
9313/// This type should generally not be used directly.
9314#[derive(Bundle)]
9315pub struct BlazeMetadataBundle {
9316    _marker: Blaze,
9317    parent: AbstractMonsterMetadataBundle,
9318    charged: Charged,
9319}
9320impl Default for BlazeMetadataBundle {
9321    fn default() -> Self {
9322        Self {
9323            _marker: Blaze,
9324            parent: Default::default(),
9325            charged: Charged(false),
9326        }
9327    }
9328}
9329
9330/// A metadata field for [Bogged].
9331#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9332pub struct BoggedSheared(pub bool);
9333/// The marker component for entities of type `minecraft:bogged`.
9334///
9335/// # Metadata
9336///
9337/// These are the metadata components that all `Bogged` entities are guaranteed
9338/// to have, in addition to the metadata components from parent types:
9339///
9340/// - [BoggedSheared]
9341///
9342/// # Parents
9343///
9344/// Entities with `Bogged` will also have the following marker components and
9345/// their metadata fields:
9346///
9347/// - [AbstractMonster]
9348/// - [AbstractCreature]
9349/// - [AbstractInsentient]
9350/// - [AbstractLiving]
9351/// - [AbstractEntity]
9352///
9353/// # Children
9354///
9355/// This entity type has no children types.
9356#[derive(Component)]
9357pub struct Bogged;
9358impl Bogged {
9359    fn apply_metadata(
9360        entity: &mut bevy_ecs::system::EntityCommands,
9361        d: EntityDataItem,
9362    ) -> Result<(), UpdateMetadataError> {
9363        match d.index {
9364            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9365            16 => {
9366                entity.insert(BoggedSheared(
9367                    d.value
9368                        .into_boolean()
9369                        .map_err(|v| e(v, d.index, "BoggedSheared"))?,
9370                ));
9371            }
9372            _ => {}
9373        }
9374        Ok(())
9375    }
9376}
9377
9378/// The metadata bundle for [Bogged].
9379///
9380/// This type should generally not be used directly.
9381#[derive(Bundle)]
9382pub struct BoggedMetadataBundle {
9383    _marker: Bogged,
9384    parent: AbstractMonsterMetadataBundle,
9385    bogged_sheared: BoggedSheared,
9386}
9387impl Default for BoggedMetadataBundle {
9388    fn default() -> Self {
9389        Self {
9390            _marker: Bogged,
9391            parent: Default::default(),
9392            bogged_sheared: BoggedSheared(false),
9393        }
9394    }
9395}
9396
9397/// The marker component for entities of type `minecraft:breeze`.
9398///
9399/// # Metadata
9400///
9401/// This entity type does not add any additional metadata. It will still have
9402/// metadata from parent types.
9403///
9404/// # Parents
9405///
9406/// Entities with `Breeze` will also have the following marker components and
9407/// their metadata fields:
9408///
9409/// - [AbstractMonster]
9410/// - [AbstractCreature]
9411/// - [AbstractInsentient]
9412/// - [AbstractLiving]
9413/// - [AbstractEntity]
9414///
9415/// # Children
9416///
9417/// This entity type has no children types.
9418#[derive(Component)]
9419pub struct Breeze;
9420impl Breeze {
9421    fn apply_metadata(
9422        entity: &mut bevy_ecs::system::EntityCommands,
9423        d: EntityDataItem,
9424    ) -> Result<(), UpdateMetadataError> {
9425        match d.index {
9426            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9427            _ => {}
9428        }
9429        Ok(())
9430    }
9431}
9432
9433/// The metadata bundle for [Breeze].
9434///
9435/// This type should generally not be used directly.
9436#[derive(Bundle)]
9437pub struct BreezeMetadataBundle {
9438    _marker: Breeze,
9439    parent: AbstractMonsterMetadataBundle,
9440}
9441impl Default for BreezeMetadataBundle {
9442    fn default() -> Self {
9443        Self {
9444            _marker: Breeze,
9445            parent: Default::default(),
9446        }
9447    }
9448}
9449
9450/// A metadata field for [Creaking].
9451#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9452pub struct CanMove(pub bool);
9453/// A metadata field for [Creaking].
9454#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9455pub struct IsActive(pub bool);
9456/// A metadata field for [Creaking].
9457#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9458pub struct IsTearingDown(pub bool);
9459/// A metadata field for [Creaking].
9460#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9461pub struct HomePos(pub Option<BlockPos>);
9462/// The marker component for entities of type `minecraft:creaking`.
9463///
9464/// # Metadata
9465///
9466/// These are the metadata components that all `Creaking` entities are
9467/// guaranteed to have, in addition to the metadata components from parent
9468/// types:
9469///
9470/// - [CanMove]
9471/// - [IsActive]
9472/// - [IsTearingDown]
9473/// - [HomePos]
9474///
9475/// # Parents
9476///
9477/// Entities with `Creaking` will also have the following marker components and
9478/// their metadata fields:
9479///
9480/// - [AbstractMonster]
9481/// - [AbstractCreature]
9482/// - [AbstractInsentient]
9483/// - [AbstractLiving]
9484/// - [AbstractEntity]
9485///
9486/// # Children
9487///
9488/// This entity type has no children types.
9489#[derive(Component)]
9490pub struct Creaking;
9491impl Creaking {
9492    fn apply_metadata(
9493        entity: &mut bevy_ecs::system::EntityCommands,
9494        d: EntityDataItem,
9495    ) -> Result<(), UpdateMetadataError> {
9496        match d.index {
9497            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9498            16 => {
9499                entity.insert(CanMove(
9500                    d.value
9501                        .into_boolean()
9502                        .map_err(|v| e(v, d.index, "CanMove"))?,
9503                ));
9504            }
9505            17 => {
9506                entity.insert(IsActive(
9507                    d.value
9508                        .into_boolean()
9509                        .map_err(|v| e(v, d.index, "IsActive"))?,
9510                ));
9511            }
9512            18 => {
9513                entity.insert(IsTearingDown(
9514                    d.value
9515                        .into_boolean()
9516                        .map_err(|v| e(v, d.index, "IsTearingDown"))?,
9517                ));
9518            }
9519            19 => {
9520                entity.insert(HomePos(
9521                    d.value
9522                        .into_optional_block_pos()
9523                        .map_err(|v| e(v, d.index, "HomePos"))?,
9524                ));
9525            }
9526            _ => {}
9527        }
9528        Ok(())
9529    }
9530}
9531
9532/// The metadata bundle for [Creaking].
9533///
9534/// This type should generally not be used directly.
9535#[derive(Bundle)]
9536pub struct CreakingMetadataBundle {
9537    _marker: Creaking,
9538    parent: AbstractMonsterMetadataBundle,
9539    can_move: CanMove,
9540    is_active: IsActive,
9541    is_tearing_down: IsTearingDown,
9542    home_pos: HomePos,
9543}
9544impl Default for CreakingMetadataBundle {
9545    fn default() -> Self {
9546        Self {
9547            _marker: Creaking,
9548            parent: Default::default(),
9549            can_move: CanMove(true),
9550            is_active: IsActive(false),
9551            is_tearing_down: IsTearingDown(false),
9552            home_pos: HomePos(None),
9553        }
9554    }
9555}
9556
9557/// A metadata field for [Creeper].
9558#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9559pub struct SwellDir(pub i32);
9560/// A metadata field for [Creeper].
9561#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9562pub struct IsPowered(pub bool);
9563/// A metadata field for [Creeper].
9564#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9565pub struct IsIgnited(pub bool);
9566/// The marker component for entities of type `minecraft:creeper`.
9567///
9568/// # Metadata
9569///
9570/// These are the metadata components that all `Creeper` entities are guaranteed
9571/// to have, in addition to the metadata components from parent types:
9572///
9573/// - [SwellDir]
9574/// - [IsPowered]
9575/// - [IsIgnited]
9576///
9577/// # Parents
9578///
9579/// Entities with `Creeper` will also have the following marker components and
9580/// their metadata fields:
9581///
9582/// - [AbstractMonster]
9583/// - [AbstractCreature]
9584/// - [AbstractInsentient]
9585/// - [AbstractLiving]
9586/// - [AbstractEntity]
9587///
9588/// # Children
9589///
9590/// This entity type has no children types.
9591#[derive(Component)]
9592pub struct Creeper;
9593impl Creeper {
9594    fn apply_metadata(
9595        entity: &mut bevy_ecs::system::EntityCommands,
9596        d: EntityDataItem,
9597    ) -> Result<(), UpdateMetadataError> {
9598        match d.index {
9599            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9600            16 => {
9601                entity.insert(SwellDir(
9602                    d.value.into_int().map_err(|v| e(v, d.index, "SwellDir"))?,
9603                ));
9604            }
9605            17 => {
9606                entity.insert(IsPowered(
9607                    d.value
9608                        .into_boolean()
9609                        .map_err(|v| e(v, d.index, "IsPowered"))?,
9610                ));
9611            }
9612            18 => {
9613                entity.insert(IsIgnited(
9614                    d.value
9615                        .into_boolean()
9616                        .map_err(|v| e(v, d.index, "IsIgnited"))?,
9617                ));
9618            }
9619            _ => {}
9620        }
9621        Ok(())
9622    }
9623}
9624
9625/// The metadata bundle for [Creeper].
9626///
9627/// This type should generally not be used directly.
9628#[derive(Bundle)]
9629pub struct CreeperMetadataBundle {
9630    _marker: Creeper,
9631    parent: AbstractMonsterMetadataBundle,
9632    swell_dir: SwellDir,
9633    is_powered: IsPowered,
9634    is_ignited: IsIgnited,
9635}
9636impl Default for CreeperMetadataBundle {
9637    fn default() -> Self {
9638        Self {
9639            _marker: Creeper,
9640            parent: Default::default(),
9641            swell_dir: SwellDir(-1),
9642            is_powered: IsPowered(false),
9643            is_ignited: IsIgnited(false),
9644        }
9645    }
9646}
9647
9648/// A metadata field for [Enderman].
9649#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9650pub struct CarryState(pub azalea_block::BlockState);
9651/// A metadata field for [Enderman].
9652#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9653pub struct Creepy(pub bool);
9654/// A metadata field for [Enderman].
9655#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9656pub struct StaredAt(pub bool);
9657/// The marker component for entities of type `minecraft:enderman`.
9658///
9659/// # Metadata
9660///
9661/// These are the metadata components that all `Enderman` entities are
9662/// guaranteed to have, in addition to the metadata components from parent
9663/// types:
9664///
9665/// - [CarryState]
9666/// - [Creepy]
9667/// - [StaredAt]
9668///
9669/// # Parents
9670///
9671/// Entities with `Enderman` will also have the following marker components and
9672/// their metadata fields:
9673///
9674/// - [AbstractMonster]
9675/// - [AbstractCreature]
9676/// - [AbstractInsentient]
9677/// - [AbstractLiving]
9678/// - [AbstractEntity]
9679///
9680/// # Children
9681///
9682/// This entity type has no children types.
9683#[derive(Component)]
9684pub struct Enderman;
9685impl Enderman {
9686    fn apply_metadata(
9687        entity: &mut bevy_ecs::system::EntityCommands,
9688        d: EntityDataItem,
9689    ) -> Result<(), UpdateMetadataError> {
9690        match d.index {
9691            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9692            16 => {
9693                entity.insert(CarryState(
9694                    d.value
9695                        .into_optional_block_state()
9696                        .map_err(|v| e(v, d.index, "CarryState"))?,
9697                ));
9698            }
9699            17 => {
9700                entity.insert(Creepy(
9701                    d.value
9702                        .into_boolean()
9703                        .map_err(|v| e(v, d.index, "Creepy"))?,
9704                ));
9705            }
9706            18 => {
9707                entity.insert(StaredAt(
9708                    d.value
9709                        .into_boolean()
9710                        .map_err(|v| e(v, d.index, "StaredAt"))?,
9711                ));
9712            }
9713            _ => {}
9714        }
9715        Ok(())
9716    }
9717}
9718
9719/// The metadata bundle for [Enderman].
9720///
9721/// This type should generally not be used directly.
9722#[derive(Bundle)]
9723pub struct EndermanMetadataBundle {
9724    _marker: Enderman,
9725    parent: AbstractMonsterMetadataBundle,
9726    carry_state: CarryState,
9727    creepy: Creepy,
9728    stared_at: StaredAt,
9729}
9730impl Default for EndermanMetadataBundle {
9731    fn default() -> Self {
9732        Self {
9733            _marker: Enderman,
9734            parent: Default::default(),
9735            carry_state: CarryState(azalea_block::BlockState::AIR),
9736            creepy: Creepy(false),
9737            stared_at: StaredAt(false),
9738        }
9739    }
9740}
9741
9742/// The marker component for entities of type `minecraft:endermite`.
9743///
9744/// # Metadata
9745///
9746/// This entity type does not add any additional metadata. It will still have
9747/// metadata from parent types.
9748///
9749/// # Parents
9750///
9751/// Entities with `Endermite` will also have the following marker components and
9752/// their metadata fields:
9753///
9754/// - [AbstractMonster]
9755/// - [AbstractCreature]
9756/// - [AbstractInsentient]
9757/// - [AbstractLiving]
9758/// - [AbstractEntity]
9759///
9760/// # Children
9761///
9762/// This entity type has no children types.
9763#[derive(Component)]
9764pub struct Endermite;
9765impl Endermite {
9766    fn apply_metadata(
9767        entity: &mut bevy_ecs::system::EntityCommands,
9768        d: EntityDataItem,
9769    ) -> Result<(), UpdateMetadataError> {
9770        match d.index {
9771            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9772            _ => {}
9773        }
9774        Ok(())
9775    }
9776}
9777
9778/// The metadata bundle for [Endermite].
9779///
9780/// This type should generally not be used directly.
9781#[derive(Bundle)]
9782pub struct EndermiteMetadataBundle {
9783    _marker: Endermite,
9784    parent: AbstractMonsterMetadataBundle,
9785}
9786impl Default for EndermiteMetadataBundle {
9787    fn default() -> Self {
9788        Self {
9789            _marker: Endermite,
9790            parent: Default::default(),
9791        }
9792    }
9793}
9794
9795/// The marker component for entities of type `minecraft:giant`.
9796///
9797/// # Metadata
9798///
9799/// This entity type does not add any additional metadata. It will still have
9800/// metadata from parent types.
9801///
9802/// # Parents
9803///
9804/// Entities with `Giant` will also have the following marker components and
9805/// their metadata fields:
9806///
9807/// - [AbstractMonster]
9808/// - [AbstractCreature]
9809/// - [AbstractInsentient]
9810/// - [AbstractLiving]
9811/// - [AbstractEntity]
9812///
9813/// # Children
9814///
9815/// This entity type has no children types.
9816#[derive(Component)]
9817pub struct Giant;
9818impl Giant {
9819    fn apply_metadata(
9820        entity: &mut bevy_ecs::system::EntityCommands,
9821        d: EntityDataItem,
9822    ) -> Result<(), UpdateMetadataError> {
9823        match d.index {
9824            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9825            _ => {}
9826        }
9827        Ok(())
9828    }
9829}
9830
9831/// The metadata bundle for [Giant].
9832///
9833/// This type should generally not be used directly.
9834#[derive(Bundle)]
9835pub struct GiantMetadataBundle {
9836    _marker: Giant,
9837    parent: AbstractMonsterMetadataBundle,
9838}
9839impl Default for GiantMetadataBundle {
9840    fn default() -> Self {
9841        Self {
9842            _marker: Giant,
9843            parent: Default::default(),
9844        }
9845    }
9846}
9847
9848/// A metadata field for [Guardian].
9849#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9850pub struct Moving(pub bool);
9851/// A metadata field for [Guardian].
9852#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9853pub struct AttackTarget(pub i32);
9854/// The marker component for entities of type `minecraft:guardian`.
9855///
9856/// # Metadata
9857///
9858/// These are the metadata components that all `Guardian` entities are
9859/// guaranteed to have, in addition to the metadata components from parent
9860/// types:
9861///
9862/// - [Moving]
9863/// - [AttackTarget]
9864///
9865/// # Parents
9866///
9867/// Entities with `Guardian` will also have the following marker components and
9868/// their metadata fields:
9869///
9870/// - [AbstractMonster]
9871/// - [AbstractCreature]
9872/// - [AbstractInsentient]
9873/// - [AbstractLiving]
9874/// - [AbstractEntity]
9875///
9876/// # Children
9877///
9878/// - [ElderGuardian]
9879#[derive(Component)]
9880pub struct Guardian;
9881impl Guardian {
9882    fn apply_metadata(
9883        entity: &mut bevy_ecs::system::EntityCommands,
9884        d: EntityDataItem,
9885    ) -> Result<(), UpdateMetadataError> {
9886        match d.index {
9887            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
9888            16 => {
9889                entity.insert(Moving(
9890                    d.value
9891                        .into_boolean()
9892                        .map_err(|v| e(v, d.index, "Moving"))?,
9893                ));
9894            }
9895            17 => {
9896                entity.insert(AttackTarget(
9897                    d.value
9898                        .into_int()
9899                        .map_err(|v| e(v, d.index, "AttackTarget"))?,
9900                ));
9901            }
9902            _ => {}
9903        }
9904        Ok(())
9905    }
9906}
9907
9908/// The metadata bundle for [Guardian].
9909///
9910/// This type should generally not be used directly.
9911#[derive(Bundle)]
9912pub struct GuardianMetadataBundle {
9913    _marker: Guardian,
9914    parent: AbstractMonsterMetadataBundle,
9915    moving: Moving,
9916    attack_target: AttackTarget,
9917}
9918impl Default for GuardianMetadataBundle {
9919    fn default() -> Self {
9920        Self {
9921            _marker: Guardian,
9922            parent: Default::default(),
9923            moving: Moving(false),
9924            attack_target: AttackTarget(0),
9925        }
9926    }
9927}
9928
9929/// The marker component for entities of type `minecraft:elder_guardian`.
9930///
9931/// # Metadata
9932///
9933/// This entity type does not add any additional metadata. It will still have
9934/// metadata from parent types.
9935///
9936/// # Parents
9937///
9938/// Entities with `ElderGuardian` will also have the following marker components
9939/// and their metadata fields:
9940///
9941/// - [Guardian]
9942/// - [AbstractMonster]
9943/// - [AbstractCreature]
9944/// - [AbstractInsentient]
9945/// - [AbstractLiving]
9946/// - [AbstractEntity]
9947///
9948/// # Children
9949///
9950/// This entity type has no children types.
9951#[derive(Component)]
9952pub struct ElderGuardian;
9953impl ElderGuardian {
9954    fn apply_metadata(
9955        entity: &mut bevy_ecs::system::EntityCommands,
9956        d: EntityDataItem,
9957    ) -> Result<(), UpdateMetadataError> {
9958        match d.index {
9959            0..=17 => Guardian::apply_metadata(entity, d)?,
9960            _ => {}
9961        }
9962        Ok(())
9963    }
9964}
9965
9966/// The metadata bundle for [ElderGuardian].
9967///
9968/// This type should generally not be used directly.
9969#[derive(Bundle)]
9970pub struct ElderGuardianMetadataBundle {
9971    _marker: ElderGuardian,
9972    parent: GuardianMetadataBundle,
9973}
9974impl Default for ElderGuardianMetadataBundle {
9975    fn default() -> Self {
9976        Self {
9977            _marker: ElderGuardian,
9978            parent: Default::default(),
9979        }
9980    }
9981}
9982
9983/// The marker component for entities of type `minecraft:parched`.
9984///
9985/// # Metadata
9986///
9987/// This entity type does not add any additional metadata. It will still have
9988/// metadata from parent types.
9989///
9990/// # Parents
9991///
9992/// Entities with `Parched` will also have the following marker components and
9993/// their metadata fields:
9994///
9995/// - [AbstractMonster]
9996/// - [AbstractCreature]
9997/// - [AbstractInsentient]
9998/// - [AbstractLiving]
9999/// - [AbstractEntity]
10000///
10001/// # Children
10002///
10003/// This entity type has no children types.
10004#[derive(Component)]
10005pub struct Parched;
10006impl Parched {
10007    fn apply_metadata(
10008        entity: &mut bevy_ecs::system::EntityCommands,
10009        d: EntityDataItem,
10010    ) -> Result<(), UpdateMetadataError> {
10011        match d.index {
10012            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10013            _ => {}
10014        }
10015        Ok(())
10016    }
10017}
10018
10019/// The metadata bundle for [Parched].
10020///
10021/// This type should generally not be used directly.
10022#[derive(Bundle)]
10023pub struct ParchedMetadataBundle {
10024    _marker: Parched,
10025    parent: AbstractMonsterMetadataBundle,
10026}
10027impl Default for ParchedMetadataBundle {
10028    fn default() -> Self {
10029        Self {
10030            _marker: Parched,
10031            parent: Default::default(),
10032        }
10033    }
10034}
10035
10036/// The marker component for entities of type `minecraft:silverfish`.
10037///
10038/// # Metadata
10039///
10040/// This entity type does not add any additional metadata. It will still have
10041/// metadata from parent types.
10042///
10043/// # Parents
10044///
10045/// Entities with `Silverfish` will also have the following marker components
10046/// and their metadata fields:
10047///
10048/// - [AbstractMonster]
10049/// - [AbstractCreature]
10050/// - [AbstractInsentient]
10051/// - [AbstractLiving]
10052/// - [AbstractEntity]
10053///
10054/// # Children
10055///
10056/// This entity type has no children types.
10057#[derive(Component)]
10058pub struct Silverfish;
10059impl Silverfish {
10060    fn apply_metadata(
10061        entity: &mut bevy_ecs::system::EntityCommands,
10062        d: EntityDataItem,
10063    ) -> Result<(), UpdateMetadataError> {
10064        match d.index {
10065            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10066            _ => {}
10067        }
10068        Ok(())
10069    }
10070}
10071
10072/// The metadata bundle for [Silverfish].
10073///
10074/// This type should generally not be used directly.
10075#[derive(Bundle)]
10076pub struct SilverfishMetadataBundle {
10077    _marker: Silverfish,
10078    parent: AbstractMonsterMetadataBundle,
10079}
10080impl Default for SilverfishMetadataBundle {
10081    fn default() -> Self {
10082        Self {
10083            _marker: Silverfish,
10084            parent: Default::default(),
10085        }
10086    }
10087}
10088
10089/// A metadata field for [Skeleton].
10090#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10091pub struct StrayConversion(pub bool);
10092/// The marker component for entities of type `minecraft:skeleton`.
10093///
10094/// # Metadata
10095///
10096/// These are the metadata components that all `Skeleton` entities are
10097/// guaranteed to have, in addition to the metadata components from parent
10098/// types:
10099///
10100/// - [StrayConversion]
10101///
10102/// # Parents
10103///
10104/// Entities with `Skeleton` will also have the following marker components and
10105/// their metadata fields:
10106///
10107/// - [AbstractMonster]
10108/// - [AbstractCreature]
10109/// - [AbstractInsentient]
10110/// - [AbstractLiving]
10111/// - [AbstractEntity]
10112///
10113/// # Children
10114///
10115/// This entity type has no children types.
10116#[derive(Component)]
10117pub struct Skeleton;
10118impl Skeleton {
10119    fn apply_metadata(
10120        entity: &mut bevy_ecs::system::EntityCommands,
10121        d: EntityDataItem,
10122    ) -> Result<(), UpdateMetadataError> {
10123        match d.index {
10124            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10125            16 => {
10126                entity.insert(StrayConversion(
10127                    d.value
10128                        .into_boolean()
10129                        .map_err(|v| e(v, d.index, "StrayConversion"))?,
10130                ));
10131            }
10132            _ => {}
10133        }
10134        Ok(())
10135    }
10136}
10137
10138/// The metadata bundle for [Skeleton].
10139///
10140/// This type should generally not be used directly.
10141#[derive(Bundle)]
10142pub struct SkeletonMetadataBundle {
10143    _marker: Skeleton,
10144    parent: AbstractMonsterMetadataBundle,
10145    stray_conversion: StrayConversion,
10146}
10147impl Default for SkeletonMetadataBundle {
10148    fn default() -> Self {
10149        Self {
10150            _marker: Skeleton,
10151            parent: Default::default(),
10152            stray_conversion: StrayConversion(false),
10153        }
10154    }
10155}
10156
10157#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
10158/// A metadata field for [Spider].
10159pub struct Climbing(pub bool);
10160/// The marker component for entities of type `minecraft:spider`.
10161///
10162/// # Metadata
10163///
10164/// These are the metadata components that all `Spider` entities are guaranteed
10165/// to have, in addition to the metadata components from parent types:
10166///
10167/// - [Climbing]
10168///
10169/// # Parents
10170///
10171/// Entities with `Spider` will also have the following marker components and
10172/// their metadata fields:
10173///
10174/// - [AbstractMonster]
10175/// - [AbstractCreature]
10176/// - [AbstractInsentient]
10177/// - [AbstractLiving]
10178/// - [AbstractEntity]
10179///
10180/// # Children
10181///
10182/// - [CaveSpider]
10183#[derive(Component)]
10184pub struct Spider;
10185impl Spider {
10186    fn apply_metadata(
10187        entity: &mut bevy_ecs::system::EntityCommands,
10188        d: EntityDataItem,
10189    ) -> Result<(), UpdateMetadataError> {
10190        match d.index {
10191            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10192            16 => {
10193                let bitfield = d
10194                    .value
10195                    .into_byte()
10196                    .map_err(|v| e(v, d.index, "<bitfield>"))?;
10197                entity.insert(Climbing(bitfield & 0x1 != 0));
10198            }
10199            _ => {}
10200        }
10201        Ok(())
10202    }
10203}
10204
10205/// The metadata bundle for [Spider].
10206///
10207/// This type should generally not be used directly.
10208#[derive(Bundle)]
10209pub struct SpiderMetadataBundle {
10210    _marker: Spider,
10211    parent: AbstractMonsterMetadataBundle,
10212    climbing: Climbing,
10213}
10214impl Default for SpiderMetadataBundle {
10215    fn default() -> Self {
10216        Self {
10217            _marker: Spider,
10218            parent: Default::default(),
10219            climbing: Climbing(false),
10220        }
10221    }
10222}
10223
10224/// The marker component for entities of type `minecraft:cave_spider`.
10225///
10226/// # Metadata
10227///
10228/// This entity type does not add any additional metadata. It will still have
10229/// metadata from parent types.
10230///
10231/// # Parents
10232///
10233/// Entities with `CaveSpider` will also have the following marker components
10234/// and their metadata fields:
10235///
10236/// - [Spider]
10237/// - [AbstractMonster]
10238/// - [AbstractCreature]
10239/// - [AbstractInsentient]
10240/// - [AbstractLiving]
10241/// - [AbstractEntity]
10242///
10243/// # Children
10244///
10245/// This entity type has no children types.
10246#[derive(Component)]
10247pub struct CaveSpider;
10248impl CaveSpider {
10249    fn apply_metadata(
10250        entity: &mut bevy_ecs::system::EntityCommands,
10251        d: EntityDataItem,
10252    ) -> Result<(), UpdateMetadataError> {
10253        match d.index {
10254            0..=16 => Spider::apply_metadata(entity, d)?,
10255            _ => {}
10256        }
10257        Ok(())
10258    }
10259}
10260
10261/// The metadata bundle for [CaveSpider].
10262///
10263/// This type should generally not be used directly.
10264#[derive(Bundle)]
10265pub struct CaveSpiderMetadataBundle {
10266    _marker: CaveSpider,
10267    parent: SpiderMetadataBundle,
10268}
10269impl Default for CaveSpiderMetadataBundle {
10270    fn default() -> Self {
10271        Self {
10272            _marker: CaveSpider,
10273            parent: Default::default(),
10274        }
10275    }
10276}
10277
10278/// The marker component for entities of type `minecraft:stray`.
10279///
10280/// # Metadata
10281///
10282/// This entity type does not add any additional metadata. It will still have
10283/// metadata from parent types.
10284///
10285/// # Parents
10286///
10287/// Entities with `Stray` will also have the following marker components and
10288/// their metadata fields:
10289///
10290/// - [AbstractMonster]
10291/// - [AbstractCreature]
10292/// - [AbstractInsentient]
10293/// - [AbstractLiving]
10294/// - [AbstractEntity]
10295///
10296/// # Children
10297///
10298/// This entity type has no children types.
10299#[derive(Component)]
10300pub struct Stray;
10301impl Stray {
10302    fn apply_metadata(
10303        entity: &mut bevy_ecs::system::EntityCommands,
10304        d: EntityDataItem,
10305    ) -> Result<(), UpdateMetadataError> {
10306        match d.index {
10307            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10308            _ => {}
10309        }
10310        Ok(())
10311    }
10312}
10313
10314/// The metadata bundle for [Stray].
10315///
10316/// This type should generally not be used directly.
10317#[derive(Bundle)]
10318pub struct StrayMetadataBundle {
10319    _marker: Stray,
10320    parent: AbstractMonsterMetadataBundle,
10321}
10322impl Default for StrayMetadataBundle {
10323    fn default() -> Self {
10324        Self {
10325            _marker: Stray,
10326            parent: Default::default(),
10327        }
10328    }
10329}
10330
10331/// A metadata field for [Vex].
10332#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10333pub struct VexFlags(pub u8);
10334/// The marker component for entities of type `minecraft:vex`.
10335///
10336/// # Metadata
10337///
10338/// These are the metadata components that all `Vex` entities are guaranteed to
10339/// have, in addition to the metadata components from parent types:
10340///
10341/// - [VexFlags]
10342///
10343/// # Parents
10344///
10345/// Entities with `Vex` will also have the following marker components and their
10346/// metadata fields:
10347///
10348/// - [AbstractMonster]
10349/// - [AbstractCreature]
10350/// - [AbstractInsentient]
10351/// - [AbstractLiving]
10352/// - [AbstractEntity]
10353///
10354/// # Children
10355///
10356/// This entity type has no children types.
10357#[derive(Component)]
10358pub struct Vex;
10359impl Vex {
10360    fn apply_metadata(
10361        entity: &mut bevy_ecs::system::EntityCommands,
10362        d: EntityDataItem,
10363    ) -> Result<(), UpdateMetadataError> {
10364        match d.index {
10365            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10366            16 => {
10367                entity.insert(VexFlags(
10368                    d.value.into_byte().map_err(|v| e(v, d.index, "VexFlags"))?,
10369                ));
10370            }
10371            _ => {}
10372        }
10373        Ok(())
10374    }
10375}
10376
10377/// The metadata bundle for [Vex].
10378///
10379/// This type should generally not be used directly.
10380#[derive(Bundle)]
10381pub struct VexMetadataBundle {
10382    _marker: Vex,
10383    parent: AbstractMonsterMetadataBundle,
10384    vex_flags: VexFlags,
10385}
10386impl Default for VexMetadataBundle {
10387    fn default() -> Self {
10388        Self {
10389            _marker: Vex,
10390            parent: Default::default(),
10391            vex_flags: VexFlags(0),
10392        }
10393    }
10394}
10395
10396/// A metadata field for [Warden].
10397#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10398pub struct ClientAngerLevel(pub i32);
10399/// The marker component for entities of type `minecraft:warden`.
10400///
10401/// # Metadata
10402///
10403/// These are the metadata components that all `Warden` entities are guaranteed
10404/// to have, in addition to the metadata components from parent types:
10405///
10406/// - [ClientAngerLevel]
10407///
10408/// # Parents
10409///
10410/// Entities with `Warden` will also have the following marker components and
10411/// their metadata fields:
10412///
10413/// - [AbstractMonster]
10414/// - [AbstractCreature]
10415/// - [AbstractInsentient]
10416/// - [AbstractLiving]
10417/// - [AbstractEntity]
10418///
10419/// # Children
10420///
10421/// This entity type has no children types.
10422#[derive(Component)]
10423pub struct Warden;
10424impl Warden {
10425    fn apply_metadata(
10426        entity: &mut bevy_ecs::system::EntityCommands,
10427        d: EntityDataItem,
10428    ) -> Result<(), UpdateMetadataError> {
10429        match d.index {
10430            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10431            16 => {
10432                entity.insert(ClientAngerLevel(
10433                    d.value
10434                        .into_int()
10435                        .map_err(|v| e(v, d.index, "ClientAngerLevel"))?,
10436                ));
10437            }
10438            _ => {}
10439        }
10440        Ok(())
10441    }
10442}
10443
10444/// The metadata bundle for [Warden].
10445///
10446/// This type should generally not be used directly.
10447#[derive(Bundle)]
10448pub struct WardenMetadataBundle {
10449    _marker: Warden,
10450    parent: AbstractMonsterMetadataBundle,
10451    client_anger_level: ClientAngerLevel,
10452}
10453impl Default for WardenMetadataBundle {
10454    fn default() -> Self {
10455        Self {
10456            _marker: Warden,
10457            parent: Default::default(),
10458            client_anger_level: ClientAngerLevel(0),
10459        }
10460    }
10461}
10462
10463/// A metadata field for [Wither].
10464#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10465pub struct TargetA(pub i32);
10466/// A metadata field for [Wither].
10467#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10468pub struct TargetB(pub i32);
10469/// A metadata field for [Wither].
10470#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10471pub struct TargetC(pub i32);
10472/// A metadata field for [Wither].
10473#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10474pub struct Inv(pub i32);
10475/// The marker component for entities of type `minecraft:wither`.
10476///
10477/// # Metadata
10478///
10479/// These are the metadata components that all `Wither` entities are guaranteed
10480/// to have, in addition to the metadata components from parent types:
10481///
10482/// - [TargetA]
10483/// - [TargetB]
10484/// - [TargetC]
10485/// - [Inv]
10486///
10487/// # Parents
10488///
10489/// Entities with `Wither` will also have the following marker components and
10490/// their metadata fields:
10491///
10492/// - [AbstractMonster]
10493/// - [AbstractCreature]
10494/// - [AbstractInsentient]
10495/// - [AbstractLiving]
10496/// - [AbstractEntity]
10497///
10498/// # Children
10499///
10500/// This entity type has no children types.
10501#[derive(Component)]
10502pub struct Wither;
10503impl Wither {
10504    fn apply_metadata(
10505        entity: &mut bevy_ecs::system::EntityCommands,
10506        d: EntityDataItem,
10507    ) -> Result<(), UpdateMetadataError> {
10508        match d.index {
10509            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10510            16 => {
10511                entity.insert(TargetA(
10512                    d.value.into_int().map_err(|v| e(v, d.index, "TargetA"))?,
10513                ));
10514            }
10515            17 => {
10516                entity.insert(TargetB(
10517                    d.value.into_int().map_err(|v| e(v, d.index, "TargetB"))?,
10518                ));
10519            }
10520            18 => {
10521                entity.insert(TargetC(
10522                    d.value.into_int().map_err(|v| e(v, d.index, "TargetC"))?,
10523                ));
10524            }
10525            19 => {
10526                entity.insert(Inv(d.value.into_int().map_err(|v| e(v, d.index, "Inv"))?));
10527            }
10528            _ => {}
10529        }
10530        Ok(())
10531    }
10532}
10533
10534/// The metadata bundle for [Wither].
10535///
10536/// This type should generally not be used directly.
10537#[derive(Bundle)]
10538pub struct WitherMetadataBundle {
10539    _marker: Wither,
10540    parent: AbstractMonsterMetadataBundle,
10541    target_a: TargetA,
10542    target_b: TargetB,
10543    target_c: TargetC,
10544    inv: Inv,
10545}
10546impl Default for WitherMetadataBundle {
10547    fn default() -> Self {
10548        Self {
10549            _marker: Wither,
10550            parent: Default::default(),
10551            target_a: TargetA(0),
10552            target_b: TargetB(0),
10553            target_c: TargetC(0),
10554            inv: Inv(0),
10555        }
10556    }
10557}
10558
10559/// The marker component for entities of type `minecraft:wither_skeleton`.
10560///
10561/// # Metadata
10562///
10563/// This entity type does not add any additional metadata. It will still have
10564/// metadata from parent types.
10565///
10566/// # Parents
10567///
10568/// Entities with `WitherSkeleton` will also have the following marker
10569/// components and their metadata fields:
10570///
10571/// - [AbstractMonster]
10572/// - [AbstractCreature]
10573/// - [AbstractInsentient]
10574/// - [AbstractLiving]
10575/// - [AbstractEntity]
10576///
10577/// # Children
10578///
10579/// This entity type has no children types.
10580#[derive(Component)]
10581pub struct WitherSkeleton;
10582impl WitherSkeleton {
10583    fn apply_metadata(
10584        entity: &mut bevy_ecs::system::EntityCommands,
10585        d: EntityDataItem,
10586    ) -> Result<(), UpdateMetadataError> {
10587        match d.index {
10588            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10589            _ => {}
10590        }
10591        Ok(())
10592    }
10593}
10594
10595/// The metadata bundle for [WitherSkeleton].
10596///
10597/// This type should generally not be used directly.
10598#[derive(Bundle)]
10599pub struct WitherSkeletonMetadataBundle {
10600    _marker: WitherSkeleton,
10601    parent: AbstractMonsterMetadataBundle,
10602}
10603impl Default for WitherSkeletonMetadataBundle {
10604    fn default() -> Self {
10605        Self {
10606            _marker: WitherSkeleton,
10607            parent: Default::default(),
10608        }
10609    }
10610}
10611
10612/// A metadata field for [Zoglin].
10613#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10614pub struct ZoglinBaby(pub bool);
10615/// The marker component for entities of type `minecraft:zoglin`.
10616///
10617/// # Metadata
10618///
10619/// These are the metadata components that all `Zoglin` entities are guaranteed
10620/// to have, in addition to the metadata components from parent types:
10621///
10622/// - [ZoglinBaby]
10623///
10624/// # Parents
10625///
10626/// Entities with `Zoglin` will also have the following marker components and
10627/// their metadata fields:
10628///
10629/// - [AbstractMonster]
10630/// - [AbstractCreature]
10631/// - [AbstractInsentient]
10632/// - [AbstractLiving]
10633/// - [AbstractEntity]
10634///
10635/// # Children
10636///
10637/// This entity type has no children types.
10638#[derive(Component)]
10639pub struct Zoglin;
10640impl Zoglin {
10641    fn apply_metadata(
10642        entity: &mut bevy_ecs::system::EntityCommands,
10643        d: EntityDataItem,
10644    ) -> Result<(), UpdateMetadataError> {
10645        match d.index {
10646            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10647            16 => {
10648                entity.insert(ZoglinBaby(
10649                    d.value
10650                        .into_boolean()
10651                        .map_err(|v| e(v, d.index, "ZoglinBaby"))?,
10652                ));
10653            }
10654            _ => {}
10655        }
10656        Ok(())
10657    }
10658}
10659
10660/// The metadata bundle for [Zoglin].
10661///
10662/// This type should generally not be used directly.
10663#[derive(Bundle)]
10664pub struct ZoglinMetadataBundle {
10665    _marker: Zoglin,
10666    parent: AbstractMonsterMetadataBundle,
10667    zoglin_baby: ZoglinBaby,
10668}
10669impl Default for ZoglinMetadataBundle {
10670    fn default() -> Self {
10671        Self {
10672            _marker: Zoglin,
10673            parent: Default::default(),
10674            zoglin_baby: ZoglinBaby(false),
10675        }
10676    }
10677}
10678
10679/// A metadata field for [Zombie].
10680#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10681pub struct ZombieBaby(pub bool);
10682/// A metadata field for [Zombie].
10683#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10684pub struct SpecialType(pub i32);
10685/// A metadata field for [Zombie].
10686#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10687pub struct DrownedConversion(pub bool);
10688/// The marker component for entities of type `minecraft:zombie`.
10689///
10690/// # Metadata
10691///
10692/// These are the metadata components that all `Zombie` entities are guaranteed
10693/// to have, in addition to the metadata components from parent types:
10694///
10695/// - [ZombieBaby]
10696/// - [SpecialType]
10697/// - [DrownedConversion]
10698///
10699/// # Parents
10700///
10701/// Entities with `Zombie` will also have the following marker components and
10702/// their metadata fields:
10703///
10704/// - [AbstractMonster]
10705/// - [AbstractCreature]
10706/// - [AbstractInsentient]
10707/// - [AbstractLiving]
10708/// - [AbstractEntity]
10709///
10710/// # Children
10711///
10712/// - [Drowned]
10713/// - [Husk]
10714/// - [ZombieVillager]
10715/// - [ZombifiedPiglin]
10716#[derive(Component)]
10717pub struct Zombie;
10718impl Zombie {
10719    fn apply_metadata(
10720        entity: &mut bevy_ecs::system::EntityCommands,
10721        d: EntityDataItem,
10722    ) -> Result<(), UpdateMetadataError> {
10723        match d.index {
10724            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
10725            16 => {
10726                entity.insert(ZombieBaby(
10727                    d.value
10728                        .into_boolean()
10729                        .map_err(|v| e(v, d.index, "ZombieBaby"))?,
10730                ));
10731            }
10732            17 => {
10733                entity.insert(SpecialType(
10734                    d.value
10735                        .into_int()
10736                        .map_err(|v| e(v, d.index, "SpecialType"))?,
10737                ));
10738            }
10739            18 => {
10740                entity.insert(DrownedConversion(
10741                    d.value
10742                        .into_boolean()
10743                        .map_err(|v| e(v, d.index, "DrownedConversion"))?,
10744                ));
10745            }
10746            _ => {}
10747        }
10748        Ok(())
10749    }
10750}
10751
10752/// The metadata bundle for [Zombie].
10753///
10754/// This type should generally not be used directly.
10755#[derive(Bundle)]
10756pub struct ZombieMetadataBundle {
10757    _marker: Zombie,
10758    parent: AbstractMonsterMetadataBundle,
10759    zombie_baby: ZombieBaby,
10760    special_type: SpecialType,
10761    drowned_conversion: DrownedConversion,
10762}
10763impl Default for ZombieMetadataBundle {
10764    fn default() -> Self {
10765        Self {
10766            _marker: Zombie,
10767            parent: Default::default(),
10768            zombie_baby: ZombieBaby(false),
10769            special_type: SpecialType(0),
10770            drowned_conversion: DrownedConversion(false),
10771        }
10772    }
10773}
10774
10775/// The marker component for entities of type `minecraft:drowned`.
10776///
10777/// # Metadata
10778///
10779/// This entity type does not add any additional metadata. It will still have
10780/// metadata from parent types.
10781///
10782/// # Parents
10783///
10784/// Entities with `Drowned` will also have the following marker components and
10785/// their metadata fields:
10786///
10787/// - [Zombie]
10788/// - [AbstractMonster]
10789/// - [AbstractCreature]
10790/// - [AbstractInsentient]
10791/// - [AbstractLiving]
10792/// - [AbstractEntity]
10793///
10794/// # Children
10795///
10796/// This entity type has no children types.
10797#[derive(Component)]
10798pub struct Drowned;
10799impl Drowned {
10800    fn apply_metadata(
10801        entity: &mut bevy_ecs::system::EntityCommands,
10802        d: EntityDataItem,
10803    ) -> Result<(), UpdateMetadataError> {
10804        match d.index {
10805            0..=18 => Zombie::apply_metadata(entity, d)?,
10806            _ => {}
10807        }
10808        Ok(())
10809    }
10810}
10811
10812/// The metadata bundle for [Drowned].
10813///
10814/// This type should generally not be used directly.
10815#[derive(Bundle)]
10816pub struct DrownedMetadataBundle {
10817    _marker: Drowned,
10818    parent: ZombieMetadataBundle,
10819}
10820impl Default for DrownedMetadataBundle {
10821    fn default() -> Self {
10822        Self {
10823            _marker: Drowned,
10824            parent: Default::default(),
10825        }
10826    }
10827}
10828
10829/// The marker component for entities of type `minecraft:husk`.
10830///
10831/// # Metadata
10832///
10833/// This entity type does not add any additional metadata. It will still have
10834/// metadata from parent types.
10835///
10836/// # Parents
10837///
10838/// Entities with `Husk` will also have the following marker components and
10839/// their metadata fields:
10840///
10841/// - [Zombie]
10842/// - [AbstractMonster]
10843/// - [AbstractCreature]
10844/// - [AbstractInsentient]
10845/// - [AbstractLiving]
10846/// - [AbstractEntity]
10847///
10848/// # Children
10849///
10850/// This entity type has no children types.
10851#[derive(Component)]
10852pub struct Husk;
10853impl Husk {
10854    fn apply_metadata(
10855        entity: &mut bevy_ecs::system::EntityCommands,
10856        d: EntityDataItem,
10857    ) -> Result<(), UpdateMetadataError> {
10858        match d.index {
10859            0..=18 => Zombie::apply_metadata(entity, d)?,
10860            _ => {}
10861        }
10862        Ok(())
10863    }
10864}
10865
10866/// The metadata bundle for [Husk].
10867///
10868/// This type should generally not be used directly.
10869#[derive(Bundle)]
10870pub struct HuskMetadataBundle {
10871    _marker: Husk,
10872    parent: ZombieMetadataBundle,
10873}
10874impl Default for HuskMetadataBundle {
10875    fn default() -> Self {
10876        Self {
10877            _marker: Husk,
10878            parent: Default::default(),
10879        }
10880    }
10881}
10882
10883/// A metadata field for [ZombieVillager].
10884#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10885pub struct Converting(pub bool);
10886/// A metadata field for [ZombieVillager].
10887#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10888pub struct ZombieVillagerVillagerData(pub VillagerData);
10889/// A metadata field for [ZombieVillager].
10890#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10891pub struct ZombieVillagerVillagerDataFinalized(pub bool);
10892/// The marker component for entities of type `minecraft:zombie_villager`.
10893///
10894/// # Metadata
10895///
10896/// These are the metadata components that all `ZombieVillager` entities are
10897/// guaranteed to have, in addition to the metadata components from parent
10898/// types:
10899///
10900/// - [Converting]
10901/// - [ZombieVillagerVillagerData]
10902/// - [ZombieVillagerVillagerDataFinalized]
10903///
10904/// # Parents
10905///
10906/// Entities with `ZombieVillager` will also have the following marker
10907/// components and their metadata fields:
10908///
10909/// - [Zombie]
10910/// - [AbstractMonster]
10911/// - [AbstractCreature]
10912/// - [AbstractInsentient]
10913/// - [AbstractLiving]
10914/// - [AbstractEntity]
10915///
10916/// # Children
10917///
10918/// This entity type has no children types.
10919#[derive(Component)]
10920pub struct ZombieVillager;
10921impl ZombieVillager {
10922    fn apply_metadata(
10923        entity: &mut bevy_ecs::system::EntityCommands,
10924        d: EntityDataItem,
10925    ) -> Result<(), UpdateMetadataError> {
10926        match d.index {
10927            0..=18 => Zombie::apply_metadata(entity, d)?,
10928            19 => {
10929                entity.insert(Converting(
10930                    d.value
10931                        .into_boolean()
10932                        .map_err(|v| e(v, d.index, "Converting"))?,
10933                ));
10934            }
10935            20 => {
10936                entity.insert(ZombieVillagerVillagerData(
10937                    d.value
10938                        .into_villager_data()
10939                        .map_err(|v| e(v, d.index, "ZombieVillagerVillagerData"))?,
10940                ));
10941            }
10942            21 => {
10943                entity.insert(ZombieVillagerVillagerDataFinalized(
10944                    d.value
10945                        .into_boolean()
10946                        .map_err(|v| e(v, d.index, "ZombieVillagerVillagerDataFinalized"))?,
10947                ));
10948            }
10949            _ => {}
10950        }
10951        Ok(())
10952    }
10953}
10954
10955/// The metadata bundle for [ZombieVillager].
10956///
10957/// This type should generally not be used directly.
10958#[derive(Bundle)]
10959pub struct ZombieVillagerMetadataBundle {
10960    _marker: ZombieVillager,
10961    parent: ZombieMetadataBundle,
10962    converting: Converting,
10963    zombie_villager_villager_data: ZombieVillagerVillagerData,
10964    zombie_villager_villager_data_finalized: ZombieVillagerVillagerDataFinalized,
10965}
10966impl Default for ZombieVillagerMetadataBundle {
10967    fn default() -> Self {
10968        Self {
10969            _marker: ZombieVillager,
10970            parent: Default::default(),
10971            converting: Converting(false),
10972            zombie_villager_villager_data: ZombieVillagerVillagerData(VillagerData {
10973                kind: azalea_registry::builtin::VillagerKind::Plains,
10974                profession: azalea_registry::builtin::VillagerProfession::None,
10975                level: 0,
10976            }),
10977            zombie_villager_villager_data_finalized: ZombieVillagerVillagerDataFinalized(false),
10978        }
10979    }
10980}
10981
10982/// The marker component for entities of type `minecraft:zombified_piglin`.
10983///
10984/// # Metadata
10985///
10986/// This entity type does not add any additional metadata. It will still have
10987/// metadata from parent types.
10988///
10989/// # Parents
10990///
10991/// Entities with `ZombifiedPiglin` will also have the following marker
10992/// components and their metadata fields:
10993///
10994/// - [Zombie]
10995/// - [AbstractMonster]
10996/// - [AbstractCreature]
10997/// - [AbstractInsentient]
10998/// - [AbstractLiving]
10999/// - [AbstractEntity]
11000///
11001/// # Children
11002///
11003/// This entity type has no children types.
11004#[derive(Component)]
11005pub struct ZombifiedPiglin;
11006impl ZombifiedPiglin {
11007    fn apply_metadata(
11008        entity: &mut bevy_ecs::system::EntityCommands,
11009        d: EntityDataItem,
11010    ) -> Result<(), UpdateMetadataError> {
11011        match d.index {
11012            0..=18 => Zombie::apply_metadata(entity, d)?,
11013            _ => {}
11014        }
11015        Ok(())
11016    }
11017}
11018
11019/// The metadata bundle for [ZombifiedPiglin].
11020///
11021/// This type should generally not be used directly.
11022#[derive(Bundle)]
11023pub struct ZombifiedPiglinMetadataBundle {
11024    _marker: ZombifiedPiglin,
11025    parent: ZombieMetadataBundle,
11026}
11027impl Default for ZombifiedPiglinMetadataBundle {
11028    fn default() -> Self {
11029        Self {
11030            _marker: ZombifiedPiglin,
11031            parent: Default::default(),
11032        }
11033    }
11034}
11035
11036/// A metadata field for [AbstractPiglin].
11037#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11038pub struct AbstractPiglinImmuneToZombification(pub bool);
11039/// An abstract entity marker component.
11040///
11041/// # Metadata
11042///
11043/// These are the metadata components that all `AbstractPiglin` entities are
11044/// guaranteed to have, in addition to the metadata components from parent
11045/// types:
11046///
11047/// - [AbstractPiglinImmuneToZombification]
11048///
11049/// # Parents
11050///
11051/// Entities with `AbstractPiglin` will also have the following marker
11052/// components and their metadata fields:
11053///
11054/// - [AbstractMonster]
11055/// - [AbstractCreature]
11056/// - [AbstractInsentient]
11057/// - [AbstractLiving]
11058/// - [AbstractEntity]
11059///
11060/// # Children
11061///
11062/// - [Piglin]
11063/// - [PiglinBrute]
11064#[derive(Component)]
11065pub struct AbstractPiglin;
11066impl AbstractPiglin {
11067    fn apply_metadata(
11068        entity: &mut bevy_ecs::system::EntityCommands,
11069        d: EntityDataItem,
11070    ) -> Result<(), UpdateMetadataError> {
11071        match d.index {
11072            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
11073            16 => {
11074                entity.insert(AbstractPiglinImmuneToZombification(
11075                    d.value
11076                        .into_boolean()
11077                        .map_err(|v| e(v, d.index, "AbstractPiglinImmuneToZombification"))?,
11078                ));
11079            }
11080            _ => {}
11081        }
11082        Ok(())
11083    }
11084}
11085
11086/// The metadata bundle for [AbstractPiglin].
11087///
11088/// This type should generally not be used directly.
11089#[derive(Bundle)]
11090pub struct AbstractPiglinMetadataBundle {
11091    _marker: AbstractPiglin,
11092    parent: AbstractMonsterMetadataBundle,
11093    abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification,
11094}
11095impl Default for AbstractPiglinMetadataBundle {
11096    fn default() -> Self {
11097        Self {
11098            _marker: AbstractPiglin,
11099            parent: Default::default(),
11100            abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
11101        }
11102    }
11103}
11104
11105/// A metadata field for [Piglin].
11106#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11107pub struct PiglinBaby(pub bool);
11108/// A metadata field for [Piglin].
11109#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11110pub struct PiglinIsChargingCrossbow(pub bool);
11111/// A metadata field for [Piglin].
11112#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11113pub struct IsDancing(pub bool);
11114/// The marker component for entities of type `minecraft:piglin`.
11115///
11116/// # Metadata
11117///
11118/// These are the metadata components that all `Piglin` entities are guaranteed
11119/// to have, in addition to the metadata components from parent types:
11120///
11121/// - [PiglinBaby]
11122/// - [PiglinIsChargingCrossbow]
11123/// - [IsDancing]
11124///
11125/// # Parents
11126///
11127/// Entities with `Piglin` will also have the following marker components and
11128/// their metadata fields:
11129///
11130/// - [AbstractPiglin]
11131/// - [AbstractMonster]
11132/// - [AbstractCreature]
11133/// - [AbstractInsentient]
11134/// - [AbstractLiving]
11135/// - [AbstractEntity]
11136///
11137/// # Children
11138///
11139/// This entity type has no children types.
11140#[derive(Component)]
11141pub struct Piglin;
11142impl Piglin {
11143    fn apply_metadata(
11144        entity: &mut bevy_ecs::system::EntityCommands,
11145        d: EntityDataItem,
11146    ) -> Result<(), UpdateMetadataError> {
11147        match d.index {
11148            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
11149            17 => {
11150                entity.insert(PiglinBaby(
11151                    d.value
11152                        .into_boolean()
11153                        .map_err(|v| e(v, d.index, "PiglinBaby"))?,
11154                ));
11155            }
11156            18 => {
11157                entity.insert(PiglinIsChargingCrossbow(
11158                    d.value
11159                        .into_boolean()
11160                        .map_err(|v| e(v, d.index, "PiglinIsChargingCrossbow"))?,
11161                ));
11162            }
11163            19 => {
11164                entity.insert(IsDancing(
11165                    d.value
11166                        .into_boolean()
11167                        .map_err(|v| e(v, d.index, "IsDancing"))?,
11168                ));
11169            }
11170            _ => {}
11171        }
11172        Ok(())
11173    }
11174}
11175
11176/// The metadata bundle for [Piglin].
11177///
11178/// This type should generally not be used directly.
11179#[derive(Bundle)]
11180pub struct PiglinMetadataBundle {
11181    _marker: Piglin,
11182    parent: AbstractPiglinMetadataBundle,
11183    piglin_baby: PiglinBaby,
11184    piglin_is_charging_crossbow: PiglinIsChargingCrossbow,
11185    is_dancing: IsDancing,
11186}
11187impl Default for PiglinMetadataBundle {
11188    fn default() -> Self {
11189        Self {
11190            _marker: Piglin,
11191            parent: Default::default(),
11192            piglin_baby: PiglinBaby(false),
11193            piglin_is_charging_crossbow: PiglinIsChargingCrossbow(false),
11194            is_dancing: IsDancing(false),
11195        }
11196    }
11197}
11198
11199/// The marker component for entities of type `minecraft:piglin_brute`.
11200///
11201/// # Metadata
11202///
11203/// This entity type does not add any additional metadata. It will still have
11204/// metadata from parent types.
11205///
11206/// # Parents
11207///
11208/// Entities with `PiglinBrute` will also have the following marker components
11209/// and their metadata fields:
11210///
11211/// - [AbstractPiglin]
11212/// - [AbstractMonster]
11213/// - [AbstractCreature]
11214/// - [AbstractInsentient]
11215/// - [AbstractLiving]
11216/// - [AbstractEntity]
11217///
11218/// # Children
11219///
11220/// This entity type has no children types.
11221#[derive(Component)]
11222pub struct PiglinBrute;
11223impl PiglinBrute {
11224    fn apply_metadata(
11225        entity: &mut bevy_ecs::system::EntityCommands,
11226        d: EntityDataItem,
11227    ) -> Result<(), UpdateMetadataError> {
11228        match d.index {
11229            0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
11230            _ => {}
11231        }
11232        Ok(())
11233    }
11234}
11235
11236/// The metadata bundle for [PiglinBrute].
11237///
11238/// This type should generally not be used directly.
11239#[derive(Bundle)]
11240pub struct PiglinBruteMetadataBundle {
11241    _marker: PiglinBrute,
11242    parent: AbstractPiglinMetadataBundle,
11243}
11244impl Default for PiglinBruteMetadataBundle {
11245    fn default() -> Self {
11246        Self {
11247            _marker: PiglinBrute,
11248            parent: Default::default(),
11249        }
11250    }
11251}
11252
11253/// A metadata field for [AbstractRaider].
11254#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11255pub struct IsCelebrating(pub bool);
11256/// An abstract entity marker component.
11257///
11258/// # Metadata
11259///
11260/// These are the metadata components that all `AbstractRaider` entities are
11261/// guaranteed to have, in addition to the metadata components from parent
11262/// types:
11263///
11264/// - [IsCelebrating]
11265///
11266/// # Parents
11267///
11268/// Entities with `AbstractRaider` will also have the following marker
11269/// components and their metadata fields:
11270///
11271/// - [AbstractMonster]
11272/// - [AbstractCreature]
11273/// - [AbstractInsentient]
11274/// - [AbstractLiving]
11275/// - [AbstractEntity]
11276///
11277/// # Children
11278///
11279/// - [Pillager]
11280/// - [Ravager]
11281/// - [Vindicator]
11282/// - [Witch]
11283/// - [AbstractSpellcasterIllager]
11284///   - [Evoker]
11285///   - [Illusioner]
11286#[derive(Component)]
11287pub struct AbstractRaider;
11288impl AbstractRaider {
11289    fn apply_metadata(
11290        entity: &mut bevy_ecs::system::EntityCommands,
11291        d: EntityDataItem,
11292    ) -> Result<(), UpdateMetadataError> {
11293        match d.index {
11294            0..=15 => AbstractMonster::apply_metadata(entity, d)?,
11295            16 => {
11296                entity.insert(IsCelebrating(
11297                    d.value
11298                        .into_boolean()
11299                        .map_err(|v| e(v, d.index, "IsCelebrating"))?,
11300                ));
11301            }
11302            _ => {}
11303        }
11304        Ok(())
11305    }
11306}
11307
11308/// The metadata bundle for [AbstractRaider].
11309///
11310/// This type should generally not be used directly.
11311#[derive(Bundle)]
11312pub struct AbstractRaiderMetadataBundle {
11313    _marker: AbstractRaider,
11314    parent: AbstractMonsterMetadataBundle,
11315    is_celebrating: IsCelebrating,
11316}
11317impl Default for AbstractRaiderMetadataBundle {
11318    fn default() -> Self {
11319        Self {
11320            _marker: AbstractRaider,
11321            parent: Default::default(),
11322            is_celebrating: IsCelebrating(false),
11323        }
11324    }
11325}
11326
11327/// A metadata field for [Pillager].
11328#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11329pub struct PillagerIsChargingCrossbow(pub bool);
11330/// The marker component for entities of type `minecraft:pillager`.
11331///
11332/// # Metadata
11333///
11334/// These are the metadata components that all `Pillager` entities are
11335/// guaranteed to have, in addition to the metadata components from parent
11336/// types:
11337///
11338/// - [PillagerIsChargingCrossbow]
11339///
11340/// # Parents
11341///
11342/// Entities with `Pillager` will also have the following marker components and
11343/// their metadata fields:
11344///
11345/// - [AbstractRaider]
11346/// - [AbstractMonster]
11347/// - [AbstractCreature]
11348/// - [AbstractInsentient]
11349/// - [AbstractLiving]
11350/// - [AbstractEntity]
11351///
11352/// # Children
11353///
11354/// This entity type has no children types.
11355#[derive(Component)]
11356pub struct Pillager;
11357impl Pillager {
11358    fn apply_metadata(
11359        entity: &mut bevy_ecs::system::EntityCommands,
11360        d: EntityDataItem,
11361    ) -> Result<(), UpdateMetadataError> {
11362        match d.index {
11363            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
11364            17 => {
11365                entity.insert(PillagerIsChargingCrossbow(
11366                    d.value
11367                        .into_boolean()
11368                        .map_err(|v| e(v, d.index, "PillagerIsChargingCrossbow"))?,
11369                ));
11370            }
11371            _ => {}
11372        }
11373        Ok(())
11374    }
11375}
11376
11377/// The metadata bundle for [Pillager].
11378///
11379/// This type should generally not be used directly.
11380#[derive(Bundle)]
11381pub struct PillagerMetadataBundle {
11382    _marker: Pillager,
11383    parent: AbstractRaiderMetadataBundle,
11384    pillager_is_charging_crossbow: PillagerIsChargingCrossbow,
11385}
11386impl Default for PillagerMetadataBundle {
11387    fn default() -> Self {
11388        Self {
11389            _marker: Pillager,
11390            parent: Default::default(),
11391            pillager_is_charging_crossbow: PillagerIsChargingCrossbow(false),
11392        }
11393    }
11394}
11395
11396/// The marker component for entities of type `minecraft:ravager`.
11397///
11398/// # Metadata
11399///
11400/// This entity type does not add any additional metadata. It will still have
11401/// metadata from parent types.
11402///
11403/// # Parents
11404///
11405/// Entities with `Ravager` will also have the following marker components and
11406/// their metadata fields:
11407///
11408/// - [AbstractRaider]
11409/// - [AbstractMonster]
11410/// - [AbstractCreature]
11411/// - [AbstractInsentient]
11412/// - [AbstractLiving]
11413/// - [AbstractEntity]
11414///
11415/// # Children
11416///
11417/// This entity type has no children types.
11418#[derive(Component)]
11419pub struct Ravager;
11420impl Ravager {
11421    fn apply_metadata(
11422        entity: &mut bevy_ecs::system::EntityCommands,
11423        d: EntityDataItem,
11424    ) -> Result<(), UpdateMetadataError> {
11425        match d.index {
11426            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
11427            _ => {}
11428        }
11429        Ok(())
11430    }
11431}
11432
11433/// The metadata bundle for [Ravager].
11434///
11435/// This type should generally not be used directly.
11436#[derive(Bundle)]
11437pub struct RavagerMetadataBundle {
11438    _marker: Ravager,
11439    parent: AbstractRaiderMetadataBundle,
11440}
11441impl Default for RavagerMetadataBundle {
11442    fn default() -> Self {
11443        Self {
11444            _marker: Ravager,
11445            parent: Default::default(),
11446        }
11447    }
11448}
11449
11450/// The marker component for entities of type `minecraft:vindicator`.
11451///
11452/// # Metadata
11453///
11454/// This entity type does not add any additional metadata. It will still have
11455/// metadata from parent types.
11456///
11457/// # Parents
11458///
11459/// Entities with `Vindicator` will also have the following marker components
11460/// and their metadata fields:
11461///
11462/// - [AbstractRaider]
11463/// - [AbstractMonster]
11464/// - [AbstractCreature]
11465/// - [AbstractInsentient]
11466/// - [AbstractLiving]
11467/// - [AbstractEntity]
11468///
11469/// # Children
11470///
11471/// This entity type has no children types.
11472#[derive(Component)]
11473pub struct Vindicator;
11474impl Vindicator {
11475    fn apply_metadata(
11476        entity: &mut bevy_ecs::system::EntityCommands,
11477        d: EntityDataItem,
11478    ) -> Result<(), UpdateMetadataError> {
11479        match d.index {
11480            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
11481            _ => {}
11482        }
11483        Ok(())
11484    }
11485}
11486
11487/// The metadata bundle for [Vindicator].
11488///
11489/// This type should generally not be used directly.
11490#[derive(Bundle)]
11491pub struct VindicatorMetadataBundle {
11492    _marker: Vindicator,
11493    parent: AbstractRaiderMetadataBundle,
11494}
11495impl Default for VindicatorMetadataBundle {
11496    fn default() -> Self {
11497        Self {
11498            _marker: Vindicator,
11499            parent: Default::default(),
11500        }
11501    }
11502}
11503
11504/// A metadata field for [Witch].
11505#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11506pub struct WitchUsingItem(pub bool);
11507/// The marker component for entities of type `minecraft:witch`.
11508///
11509/// # Metadata
11510///
11511/// These are the metadata components that all `Witch` entities are guaranteed
11512/// to have, in addition to the metadata components from parent types:
11513///
11514/// - [WitchUsingItem]
11515///
11516/// # Parents
11517///
11518/// Entities with `Witch` will also have the following marker components and
11519/// their metadata fields:
11520///
11521/// - [AbstractRaider]
11522/// - [AbstractMonster]
11523/// - [AbstractCreature]
11524/// - [AbstractInsentient]
11525/// - [AbstractLiving]
11526/// - [AbstractEntity]
11527///
11528/// # Children
11529///
11530/// This entity type has no children types.
11531#[derive(Component)]
11532pub struct Witch;
11533impl Witch {
11534    fn apply_metadata(
11535        entity: &mut bevy_ecs::system::EntityCommands,
11536        d: EntityDataItem,
11537    ) -> Result<(), UpdateMetadataError> {
11538        match d.index {
11539            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
11540            17 => {
11541                entity.insert(WitchUsingItem(
11542                    d.value
11543                        .into_boolean()
11544                        .map_err(|v| e(v, d.index, "WitchUsingItem"))?,
11545                ));
11546            }
11547            _ => {}
11548        }
11549        Ok(())
11550    }
11551}
11552
11553/// The metadata bundle for [Witch].
11554///
11555/// This type should generally not be used directly.
11556#[derive(Bundle)]
11557pub struct WitchMetadataBundle {
11558    _marker: Witch,
11559    parent: AbstractRaiderMetadataBundle,
11560    witch_using_item: WitchUsingItem,
11561}
11562impl Default for WitchMetadataBundle {
11563    fn default() -> Self {
11564        Self {
11565            _marker: Witch,
11566            parent: Default::default(),
11567            witch_using_item: WitchUsingItem(false),
11568        }
11569    }
11570}
11571
11572/// A metadata field for [AbstractSpellcasterIllager].
11573#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11574pub struct SpellCasting(pub u8);
11575/// An abstract entity marker component.
11576///
11577/// # Metadata
11578///
11579/// These are the metadata components that all `AbstractSpellcasterIllager`
11580/// entities are guaranteed to have, in addition to the metadata components from
11581/// parent types:
11582///
11583/// - [SpellCasting]
11584///
11585/// # Parents
11586///
11587/// Entities with `AbstractSpellcasterIllager` will also have the following
11588/// marker components and their metadata fields:
11589///
11590/// - [AbstractRaider]
11591/// - [AbstractMonster]
11592/// - [AbstractCreature]
11593/// - [AbstractInsentient]
11594/// - [AbstractLiving]
11595/// - [AbstractEntity]
11596///
11597/// # Children
11598///
11599/// - [Evoker]
11600/// - [Illusioner]
11601#[derive(Component)]
11602pub struct AbstractSpellcasterIllager;
11603impl AbstractSpellcasterIllager {
11604    fn apply_metadata(
11605        entity: &mut bevy_ecs::system::EntityCommands,
11606        d: EntityDataItem,
11607    ) -> Result<(), UpdateMetadataError> {
11608        match d.index {
11609            0..=16 => AbstractRaider::apply_metadata(entity, d)?,
11610            17 => {
11611                entity.insert(SpellCasting(
11612                    d.value
11613                        .into_byte()
11614                        .map_err(|v| e(v, d.index, "SpellCasting"))?,
11615                ));
11616            }
11617            _ => {}
11618        }
11619        Ok(())
11620    }
11621}
11622
11623/// The metadata bundle for [AbstractSpellcasterIllager].
11624///
11625/// This type should generally not be used directly.
11626#[derive(Bundle)]
11627pub struct AbstractSpellcasterIllagerMetadataBundle {
11628    _marker: AbstractSpellcasterIllager,
11629    parent: AbstractRaiderMetadataBundle,
11630    spell_casting: SpellCasting,
11631}
11632impl Default for AbstractSpellcasterIllagerMetadataBundle {
11633    fn default() -> Self {
11634        Self {
11635            _marker: AbstractSpellcasterIllager,
11636            parent: Default::default(),
11637            spell_casting: SpellCasting(0),
11638        }
11639    }
11640}
11641
11642/// The marker component for entities of type `minecraft:evoker`.
11643///
11644/// # Metadata
11645///
11646/// This entity type does not add any additional metadata. It will still have
11647/// metadata from parent types.
11648///
11649/// # Parents
11650///
11651/// Entities with `Evoker` will also have the following marker components and
11652/// their metadata fields:
11653///
11654/// - [AbstractSpellcasterIllager]
11655/// - [AbstractRaider]
11656/// - [AbstractMonster]
11657/// - [AbstractCreature]
11658/// - [AbstractInsentient]
11659/// - [AbstractLiving]
11660/// - [AbstractEntity]
11661///
11662/// # Children
11663///
11664/// This entity type has no children types.
11665#[derive(Component)]
11666pub struct Evoker;
11667impl Evoker {
11668    fn apply_metadata(
11669        entity: &mut bevy_ecs::system::EntityCommands,
11670        d: EntityDataItem,
11671    ) -> Result<(), UpdateMetadataError> {
11672        match d.index {
11673            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
11674            _ => {}
11675        }
11676        Ok(())
11677    }
11678}
11679
11680/// The metadata bundle for [Evoker].
11681///
11682/// This type should generally not be used directly.
11683#[derive(Bundle)]
11684pub struct EvokerMetadataBundle {
11685    _marker: Evoker,
11686    parent: AbstractSpellcasterIllagerMetadataBundle,
11687}
11688impl Default for EvokerMetadataBundle {
11689    fn default() -> Self {
11690        Self {
11691            _marker: Evoker,
11692            parent: Default::default(),
11693        }
11694    }
11695}
11696
11697/// The marker component for entities of type `minecraft:illusioner`.
11698///
11699/// # Metadata
11700///
11701/// This entity type does not add any additional metadata. It will still have
11702/// metadata from parent types.
11703///
11704/// # Parents
11705///
11706/// Entities with `Illusioner` will also have the following marker components
11707/// and their metadata fields:
11708///
11709/// - [AbstractSpellcasterIllager]
11710/// - [AbstractRaider]
11711/// - [AbstractMonster]
11712/// - [AbstractCreature]
11713/// - [AbstractInsentient]
11714/// - [AbstractLiving]
11715/// - [AbstractEntity]
11716///
11717/// # Children
11718///
11719/// This entity type has no children types.
11720#[derive(Component)]
11721pub struct Illusioner;
11722impl Illusioner {
11723    fn apply_metadata(
11724        entity: &mut bevy_ecs::system::EntityCommands,
11725        d: EntityDataItem,
11726    ) -> Result<(), UpdateMetadataError> {
11727        match d.index {
11728            0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
11729            _ => {}
11730        }
11731        Ok(())
11732    }
11733}
11734
11735/// The metadata bundle for [Illusioner].
11736///
11737/// This type should generally not be used directly.
11738#[derive(Bundle)]
11739pub struct IllusionerMetadataBundle {
11740    _marker: Illusioner,
11741    parent: AbstractSpellcasterIllagerMetadataBundle,
11742}
11743impl Default for IllusionerMetadataBundle {
11744    fn default() -> Self {
11745        Self {
11746            _marker: Illusioner,
11747            parent: Default::default(),
11748        }
11749    }
11750}
11751
11752/// A metadata field for [AbstractThrownItemProjectile].
11753#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11754pub struct AbstractThrownItemProjectileItemStack(pub ItemStack);
11755/// An abstract entity marker component.
11756///
11757/// # Metadata
11758///
11759/// These are the metadata components that all `AbstractThrownItemProjectile`
11760/// entities are guaranteed to have, in addition to the metadata components from
11761/// parent types:
11762///
11763/// - [AbstractThrownItemProjectileItemStack]
11764///
11765/// # Parents
11766///
11767/// Entities with `AbstractThrownItemProjectile` will also have the following
11768/// marker components and their metadata fields:
11769///
11770/// - [AbstractEntity]
11771///
11772/// # Children
11773///
11774/// - [Egg]
11775/// - [EnderPearl]
11776/// - [ExperienceBottle]
11777/// - [LingeringPotion]
11778/// - [Snowball]
11779/// - [SplashPotion]
11780#[derive(Component)]
11781pub struct AbstractThrownItemProjectile;
11782impl AbstractThrownItemProjectile {
11783    fn apply_metadata(
11784        entity: &mut bevy_ecs::system::EntityCommands,
11785        d: EntityDataItem,
11786    ) -> Result<(), UpdateMetadataError> {
11787        match d.index {
11788            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
11789            8 => {
11790                entity.insert(AbstractThrownItemProjectileItemStack(
11791                    d.value
11792                        .into_item_stack()
11793                        .map_err(|v| e(v, d.index, "AbstractThrownItemProjectileItemStack"))?,
11794                ));
11795            }
11796            _ => {}
11797        }
11798        Ok(())
11799    }
11800}
11801
11802/// The metadata bundle for [AbstractThrownItemProjectile].
11803///
11804/// This type should generally not be used directly.
11805#[derive(Bundle)]
11806pub struct AbstractThrownItemProjectileMetadataBundle {
11807    _marker: AbstractThrownItemProjectile,
11808    parent: AbstractEntityMetadataBundle,
11809    abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack,
11810}
11811impl Default for AbstractThrownItemProjectileMetadataBundle {
11812    fn default() -> Self {
11813        Self {
11814            _marker: AbstractThrownItemProjectile,
11815            parent: Default::default(),
11816            abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
11817                Default::default(),
11818            ),
11819        }
11820    }
11821}
11822
11823/// The marker component for entities of type `minecraft:egg`.
11824///
11825/// # Metadata
11826///
11827/// This entity type does not add any additional metadata. It will still have
11828/// metadata from parent types.
11829///
11830/// # Parents
11831///
11832/// Entities with `Egg` will also have the following marker components and their
11833/// metadata fields:
11834///
11835/// - [AbstractThrownItemProjectile]
11836/// - [AbstractEntity]
11837///
11838/// # Children
11839///
11840/// This entity type has no children types.
11841#[derive(Component)]
11842pub struct Egg;
11843impl Egg {
11844    fn apply_metadata(
11845        entity: &mut bevy_ecs::system::EntityCommands,
11846        d: EntityDataItem,
11847    ) -> Result<(), UpdateMetadataError> {
11848        match d.index {
11849            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11850            _ => {}
11851        }
11852        Ok(())
11853    }
11854}
11855
11856/// The metadata bundle for [Egg].
11857///
11858/// This type should generally not be used directly.
11859#[derive(Bundle)]
11860pub struct EggMetadataBundle {
11861    _marker: Egg,
11862    parent: AbstractThrownItemProjectileMetadataBundle,
11863}
11864impl Default for EggMetadataBundle {
11865    fn default() -> Self {
11866        Self {
11867            _marker: Egg,
11868            parent: Default::default(),
11869        }
11870    }
11871}
11872
11873/// The marker component for entities of type `minecraft:ender_pearl`.
11874///
11875/// # Metadata
11876///
11877/// This entity type does not add any additional metadata. It will still have
11878/// metadata from parent types.
11879///
11880/// # Parents
11881///
11882/// Entities with `EnderPearl` will also have the following marker components
11883/// and their metadata fields:
11884///
11885/// - [AbstractThrownItemProjectile]
11886/// - [AbstractEntity]
11887///
11888/// # Children
11889///
11890/// This entity type has no children types.
11891#[derive(Component)]
11892pub struct EnderPearl;
11893impl EnderPearl {
11894    fn apply_metadata(
11895        entity: &mut bevy_ecs::system::EntityCommands,
11896        d: EntityDataItem,
11897    ) -> Result<(), UpdateMetadataError> {
11898        match d.index {
11899            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11900            _ => {}
11901        }
11902        Ok(())
11903    }
11904}
11905
11906/// The metadata bundle for [EnderPearl].
11907///
11908/// This type should generally not be used directly.
11909#[derive(Bundle)]
11910pub struct EnderPearlMetadataBundle {
11911    _marker: EnderPearl,
11912    parent: AbstractThrownItemProjectileMetadataBundle,
11913}
11914impl Default for EnderPearlMetadataBundle {
11915    fn default() -> Self {
11916        Self {
11917            _marker: EnderPearl,
11918            parent: Default::default(),
11919        }
11920    }
11921}
11922
11923/// The marker component for entities of type `minecraft:experience_bottle`.
11924///
11925/// # Metadata
11926///
11927/// This entity type does not add any additional metadata. It will still have
11928/// metadata from parent types.
11929///
11930/// # Parents
11931///
11932/// Entities with `ExperienceBottle` will also have the following marker
11933/// components and their metadata fields:
11934///
11935/// - [AbstractThrownItemProjectile]
11936/// - [AbstractEntity]
11937///
11938/// # Children
11939///
11940/// This entity type has no children types.
11941#[derive(Component)]
11942pub struct ExperienceBottle;
11943impl ExperienceBottle {
11944    fn apply_metadata(
11945        entity: &mut bevy_ecs::system::EntityCommands,
11946        d: EntityDataItem,
11947    ) -> Result<(), UpdateMetadataError> {
11948        match d.index {
11949            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
11950            _ => {}
11951        }
11952        Ok(())
11953    }
11954}
11955
11956/// The metadata bundle for [ExperienceBottle].
11957///
11958/// This type should generally not be used directly.
11959#[derive(Bundle)]
11960pub struct ExperienceBottleMetadataBundle {
11961    _marker: ExperienceBottle,
11962    parent: AbstractThrownItemProjectileMetadataBundle,
11963}
11964impl Default for ExperienceBottleMetadataBundle {
11965    fn default() -> Self {
11966        Self {
11967            _marker: ExperienceBottle,
11968            parent: Default::default(),
11969        }
11970    }
11971}
11972
11973/// The marker component for entities of type `minecraft:lingering_potion`.
11974///
11975/// # Metadata
11976///
11977/// This entity type does not add any additional metadata. It will still have
11978/// metadata from parent types.
11979///
11980/// # Parents
11981///
11982/// Entities with `LingeringPotion` will also have the following marker
11983/// components and their metadata fields:
11984///
11985/// - [AbstractThrownItemProjectile]
11986/// - [AbstractEntity]
11987///
11988/// # Children
11989///
11990/// This entity type has no children types.
11991#[derive(Component)]
11992pub struct LingeringPotion;
11993impl LingeringPotion {
11994    fn apply_metadata(
11995        entity: &mut bevy_ecs::system::EntityCommands,
11996        d: EntityDataItem,
11997    ) -> Result<(), UpdateMetadataError> {
11998        match d.index {
11999            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
12000            _ => {}
12001        }
12002        Ok(())
12003    }
12004}
12005
12006/// The metadata bundle for [LingeringPotion].
12007///
12008/// This type should generally not be used directly.
12009#[derive(Bundle)]
12010pub struct LingeringPotionMetadataBundle {
12011    _marker: LingeringPotion,
12012    parent: AbstractThrownItemProjectileMetadataBundle,
12013}
12014impl Default for LingeringPotionMetadataBundle {
12015    fn default() -> Self {
12016        Self {
12017            _marker: LingeringPotion,
12018            parent: Default::default(),
12019        }
12020    }
12021}
12022
12023/// The marker component for entities of type `minecraft:snowball`.
12024///
12025/// # Metadata
12026///
12027/// This entity type does not add any additional metadata. It will still have
12028/// metadata from parent types.
12029///
12030/// # Parents
12031///
12032/// Entities with `Snowball` will also have the following marker components and
12033/// their metadata fields:
12034///
12035/// - [AbstractThrownItemProjectile]
12036/// - [AbstractEntity]
12037///
12038/// # Children
12039///
12040/// This entity type has no children types.
12041#[derive(Component)]
12042pub struct Snowball;
12043impl Snowball {
12044    fn apply_metadata(
12045        entity: &mut bevy_ecs::system::EntityCommands,
12046        d: EntityDataItem,
12047    ) -> Result<(), UpdateMetadataError> {
12048        match d.index {
12049            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
12050            _ => {}
12051        }
12052        Ok(())
12053    }
12054}
12055
12056/// The metadata bundle for [Snowball].
12057///
12058/// This type should generally not be used directly.
12059#[derive(Bundle)]
12060pub struct SnowballMetadataBundle {
12061    _marker: Snowball,
12062    parent: AbstractThrownItemProjectileMetadataBundle,
12063}
12064impl Default for SnowballMetadataBundle {
12065    fn default() -> Self {
12066        Self {
12067            _marker: Snowball,
12068            parent: Default::default(),
12069        }
12070    }
12071}
12072
12073/// The marker component for entities of type `minecraft:splash_potion`.
12074///
12075/// # Metadata
12076///
12077/// This entity type does not add any additional metadata. It will still have
12078/// metadata from parent types.
12079///
12080/// # Parents
12081///
12082/// Entities with `SplashPotion` will also have the following marker components
12083/// and their metadata fields:
12084///
12085/// - [AbstractThrownItemProjectile]
12086/// - [AbstractEntity]
12087///
12088/// # Children
12089///
12090/// This entity type has no children types.
12091#[derive(Component)]
12092pub struct SplashPotion;
12093impl SplashPotion {
12094    fn apply_metadata(
12095        entity: &mut bevy_ecs::system::EntityCommands,
12096        d: EntityDataItem,
12097    ) -> Result<(), UpdateMetadataError> {
12098        match d.index {
12099            0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
12100            _ => {}
12101        }
12102        Ok(())
12103    }
12104}
12105
12106/// The metadata bundle for [SplashPotion].
12107///
12108/// This type should generally not be used directly.
12109#[derive(Bundle)]
12110pub struct SplashPotionMetadataBundle {
12111    _marker: SplashPotion,
12112    parent: AbstractThrownItemProjectileMetadataBundle,
12113}
12114impl Default for SplashPotionMetadataBundle {
12115    fn default() -> Self {
12116        Self {
12117            _marker: SplashPotion,
12118            parent: Default::default(),
12119        }
12120    }
12121}
12122
12123/// A metadata field for [AbstractVehicle].
12124#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12125pub struct Hurt(pub i32);
12126/// A metadata field for [AbstractVehicle].
12127#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12128pub struct Hurtdir(pub i32);
12129/// A metadata field for [AbstractVehicle].
12130#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12131pub struct Damage(pub f32);
12132/// An abstract entity marker component.
12133///
12134/// # Metadata
12135///
12136/// These are the metadata components that all `AbstractVehicle` entities are
12137/// guaranteed to have, in addition to the metadata components from parent
12138/// types:
12139///
12140/// - [Hurt]
12141/// - [Hurtdir]
12142/// - [Damage]
12143///
12144/// # Parents
12145///
12146/// Entities with `AbstractVehicle` will also have the following marker
12147/// components and their metadata fields:
12148///
12149/// - [AbstractEntity]
12150///
12151/// # Children
12152///
12153/// - [AbstractBoat]
12154///   - [AcaciaBoat]
12155///   - [AcaciaChestBoat]
12156///   - [BambooChestRaft]
12157///   - [BambooRaft]
12158///   - [BirchBoat]
12159///   - [BirchChestBoat]
12160///   - [CherryBoat]
12161///   - [CherryChestBoat]
12162///   - [DarkOakBoat]
12163///   - [DarkOakChestBoat]
12164///   - [JungleBoat]
12165///   - [JungleChestBoat]
12166///   - [MangroveBoat]
12167///   - [MangroveChestBoat]
12168///   - [OakBoat]
12169///   - [OakChestBoat]
12170///   - [PaleOakBoat]
12171///   - [PaleOakChestBoat]
12172///   - [PoplarBoat]
12173///   - [PoplarChestBoat]
12174///   - [SpruceBoat]
12175///   - [SpruceChestBoat]
12176/// - [AbstractMinecart]
12177///   - [ChestMinecart]
12178///   - [CommandBlockMinecart]
12179///   - [FurnaceMinecart]
12180///   - [HopperMinecart]
12181///   - [Minecart]
12182///   - [SpawnerMinecart]
12183///   - [TntMinecart]
12184#[derive(Component)]
12185pub struct AbstractVehicle;
12186impl AbstractVehicle {
12187    fn apply_metadata(
12188        entity: &mut bevy_ecs::system::EntityCommands,
12189        d: EntityDataItem,
12190    ) -> Result<(), UpdateMetadataError> {
12191        match d.index {
12192            0..=7 => AbstractEntity::apply_metadata(entity, d)?,
12193            8 => {
12194                entity.insert(Hurt(d.value.into_int().map_err(|v| e(v, d.index, "Hurt"))?));
12195            }
12196            9 => {
12197                entity.insert(Hurtdir(
12198                    d.value.into_int().map_err(|v| e(v, d.index, "Hurtdir"))?,
12199                ));
12200            }
12201            10 => {
12202                entity.insert(Damage(
12203                    d.value.into_float().map_err(|v| e(v, d.index, "Damage"))?,
12204                ));
12205            }
12206            _ => {}
12207        }
12208        Ok(())
12209    }
12210}
12211
12212/// The metadata bundle for [AbstractVehicle].
12213///
12214/// This type should generally not be used directly.
12215#[derive(Bundle)]
12216pub struct AbstractVehicleMetadataBundle {
12217    _marker: AbstractVehicle,
12218    parent: AbstractEntityMetadataBundle,
12219    hurt: Hurt,
12220    hurtdir: Hurtdir,
12221    damage: Damage,
12222}
12223impl Default for AbstractVehicleMetadataBundle {
12224    fn default() -> Self {
12225        Self {
12226            _marker: AbstractVehicle,
12227            parent: Default::default(),
12228            hurt: Hurt(0),
12229            hurtdir: Hurtdir(1),
12230            damage: Damage(0.0),
12231        }
12232    }
12233}
12234
12235/// A metadata field for [AbstractBoat].
12236#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12237pub struct PaddleLeft(pub bool);
12238/// A metadata field for [AbstractBoat].
12239#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12240pub struct PaddleRight(pub bool);
12241/// A metadata field for [AbstractBoat].
12242#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12243pub struct BubbleTime(pub i32);
12244/// An abstract entity marker component.
12245///
12246/// # Metadata
12247///
12248/// These are the metadata components that all `AbstractBoat` entities are
12249/// guaranteed to have, in addition to the metadata components from parent
12250/// types:
12251///
12252/// - [PaddleLeft]
12253/// - [PaddleRight]
12254/// - [BubbleTime]
12255///
12256/// # Parents
12257///
12258/// Entities with `AbstractBoat` will also have the following marker components
12259/// and their metadata fields:
12260///
12261/// - [AbstractVehicle]
12262/// - [AbstractEntity]
12263///
12264/// # Children
12265///
12266/// - [AcaciaBoat]
12267/// - [AcaciaChestBoat]
12268/// - [BambooChestRaft]
12269/// - [BambooRaft]
12270/// - [BirchBoat]
12271/// - [BirchChestBoat]
12272/// - [CherryBoat]
12273/// - [CherryChestBoat]
12274/// - [DarkOakBoat]
12275/// - [DarkOakChestBoat]
12276/// - [JungleBoat]
12277/// - [JungleChestBoat]
12278/// - [MangroveBoat]
12279/// - [MangroveChestBoat]
12280/// - [OakBoat]
12281/// - [OakChestBoat]
12282/// - [PaleOakBoat]
12283/// - [PaleOakChestBoat]
12284/// - [PoplarBoat]
12285/// - [PoplarChestBoat]
12286/// - [SpruceBoat]
12287/// - [SpruceChestBoat]
12288#[derive(Component)]
12289pub struct AbstractBoat;
12290impl AbstractBoat {
12291    fn apply_metadata(
12292        entity: &mut bevy_ecs::system::EntityCommands,
12293        d: EntityDataItem,
12294    ) -> Result<(), UpdateMetadataError> {
12295        match d.index {
12296            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
12297            11 => {
12298                entity.insert(PaddleLeft(
12299                    d.value
12300                        .into_boolean()
12301                        .map_err(|v| e(v, d.index, "PaddleLeft"))?,
12302                ));
12303            }
12304            12 => {
12305                entity.insert(PaddleRight(
12306                    d.value
12307                        .into_boolean()
12308                        .map_err(|v| e(v, d.index, "PaddleRight"))?,
12309                ));
12310            }
12311            13 => {
12312                entity.insert(BubbleTime(
12313                    d.value
12314                        .into_int()
12315                        .map_err(|v| e(v, d.index, "BubbleTime"))?,
12316                ));
12317            }
12318            _ => {}
12319        }
12320        Ok(())
12321    }
12322}
12323
12324/// The metadata bundle for [AbstractBoat].
12325///
12326/// This type should generally not be used directly.
12327#[derive(Bundle)]
12328pub struct AbstractBoatMetadataBundle {
12329    _marker: AbstractBoat,
12330    parent: AbstractVehicleMetadataBundle,
12331    paddle_left: PaddleLeft,
12332    paddle_right: PaddleRight,
12333    bubble_time: BubbleTime,
12334}
12335impl Default for AbstractBoatMetadataBundle {
12336    fn default() -> Self {
12337        Self {
12338            _marker: AbstractBoat,
12339            parent: Default::default(),
12340            paddle_left: PaddleLeft(false),
12341            paddle_right: PaddleRight(false),
12342            bubble_time: BubbleTime(0),
12343        }
12344    }
12345}
12346
12347/// The marker component for entities of type `minecraft:acacia_boat`.
12348///
12349/// # Metadata
12350///
12351/// This entity type does not add any additional metadata. It will still have
12352/// metadata from parent types.
12353///
12354/// # Parents
12355///
12356/// Entities with `AcaciaBoat` will also have the following marker components
12357/// and their metadata fields:
12358///
12359/// - [AbstractBoat]
12360/// - [AbstractVehicle]
12361/// - [AbstractEntity]
12362///
12363/// # Children
12364///
12365/// This entity type has no children types.
12366#[derive(Component)]
12367pub struct AcaciaBoat;
12368impl AcaciaBoat {
12369    fn apply_metadata(
12370        entity: &mut bevy_ecs::system::EntityCommands,
12371        d: EntityDataItem,
12372    ) -> Result<(), UpdateMetadataError> {
12373        match d.index {
12374            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12375            _ => {}
12376        }
12377        Ok(())
12378    }
12379}
12380
12381/// The metadata bundle for [AcaciaBoat].
12382///
12383/// This type should generally not be used directly.
12384#[derive(Bundle)]
12385pub struct AcaciaBoatMetadataBundle {
12386    _marker: AcaciaBoat,
12387    parent: AbstractBoatMetadataBundle,
12388}
12389impl Default for AcaciaBoatMetadataBundle {
12390    fn default() -> Self {
12391        Self {
12392            _marker: AcaciaBoat,
12393            parent: Default::default(),
12394        }
12395    }
12396}
12397
12398/// The marker component for entities of type `minecraft:acacia_chest_boat`.
12399///
12400/// # Metadata
12401///
12402/// This entity type does not add any additional metadata. It will still have
12403/// metadata from parent types.
12404///
12405/// # Parents
12406///
12407/// Entities with `AcaciaChestBoat` will also have the following marker
12408/// components and their metadata fields:
12409///
12410/// - [AbstractBoat]
12411/// - [AbstractVehicle]
12412/// - [AbstractEntity]
12413///
12414/// # Children
12415///
12416/// This entity type has no children types.
12417#[derive(Component)]
12418pub struct AcaciaChestBoat;
12419impl AcaciaChestBoat {
12420    fn apply_metadata(
12421        entity: &mut bevy_ecs::system::EntityCommands,
12422        d: EntityDataItem,
12423    ) -> Result<(), UpdateMetadataError> {
12424        match d.index {
12425            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12426            _ => {}
12427        }
12428        Ok(())
12429    }
12430}
12431
12432/// The metadata bundle for [AcaciaChestBoat].
12433///
12434/// This type should generally not be used directly.
12435#[derive(Bundle)]
12436pub struct AcaciaChestBoatMetadataBundle {
12437    _marker: AcaciaChestBoat,
12438    parent: AbstractBoatMetadataBundle,
12439}
12440impl Default for AcaciaChestBoatMetadataBundle {
12441    fn default() -> Self {
12442        Self {
12443            _marker: AcaciaChestBoat,
12444            parent: Default::default(),
12445        }
12446    }
12447}
12448
12449/// The marker component for entities of type `minecraft:bamboo_chest_raft`.
12450///
12451/// # Metadata
12452///
12453/// This entity type does not add any additional metadata. It will still have
12454/// metadata from parent types.
12455///
12456/// # Parents
12457///
12458/// Entities with `BambooChestRaft` will also have the following marker
12459/// components and their metadata fields:
12460///
12461/// - [AbstractBoat]
12462/// - [AbstractVehicle]
12463/// - [AbstractEntity]
12464///
12465/// # Children
12466///
12467/// This entity type has no children types.
12468#[derive(Component)]
12469pub struct BambooChestRaft;
12470impl BambooChestRaft {
12471    fn apply_metadata(
12472        entity: &mut bevy_ecs::system::EntityCommands,
12473        d: EntityDataItem,
12474    ) -> Result<(), UpdateMetadataError> {
12475        match d.index {
12476            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12477            _ => {}
12478        }
12479        Ok(())
12480    }
12481}
12482
12483/// The metadata bundle for [BambooChestRaft].
12484///
12485/// This type should generally not be used directly.
12486#[derive(Bundle)]
12487pub struct BambooChestRaftMetadataBundle {
12488    _marker: BambooChestRaft,
12489    parent: AbstractBoatMetadataBundle,
12490}
12491impl Default for BambooChestRaftMetadataBundle {
12492    fn default() -> Self {
12493        Self {
12494            _marker: BambooChestRaft,
12495            parent: Default::default(),
12496        }
12497    }
12498}
12499
12500/// The marker component for entities of type `minecraft:bamboo_raft`.
12501///
12502/// # Metadata
12503///
12504/// This entity type does not add any additional metadata. It will still have
12505/// metadata from parent types.
12506///
12507/// # Parents
12508///
12509/// Entities with `BambooRaft` will also have the following marker components
12510/// and their metadata fields:
12511///
12512/// - [AbstractBoat]
12513/// - [AbstractVehicle]
12514/// - [AbstractEntity]
12515///
12516/// # Children
12517///
12518/// This entity type has no children types.
12519#[derive(Component)]
12520pub struct BambooRaft;
12521impl BambooRaft {
12522    fn apply_metadata(
12523        entity: &mut bevy_ecs::system::EntityCommands,
12524        d: EntityDataItem,
12525    ) -> Result<(), UpdateMetadataError> {
12526        match d.index {
12527            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12528            _ => {}
12529        }
12530        Ok(())
12531    }
12532}
12533
12534/// The metadata bundle for [BambooRaft].
12535///
12536/// This type should generally not be used directly.
12537#[derive(Bundle)]
12538pub struct BambooRaftMetadataBundle {
12539    _marker: BambooRaft,
12540    parent: AbstractBoatMetadataBundle,
12541}
12542impl Default for BambooRaftMetadataBundle {
12543    fn default() -> Self {
12544        Self {
12545            _marker: BambooRaft,
12546            parent: Default::default(),
12547        }
12548    }
12549}
12550
12551/// The marker component for entities of type `minecraft:birch_boat`.
12552///
12553/// # Metadata
12554///
12555/// This entity type does not add any additional metadata. It will still have
12556/// metadata from parent types.
12557///
12558/// # Parents
12559///
12560/// Entities with `BirchBoat` will also have the following marker components and
12561/// their metadata fields:
12562///
12563/// - [AbstractBoat]
12564/// - [AbstractVehicle]
12565/// - [AbstractEntity]
12566///
12567/// # Children
12568///
12569/// This entity type has no children types.
12570#[derive(Component)]
12571pub struct BirchBoat;
12572impl BirchBoat {
12573    fn apply_metadata(
12574        entity: &mut bevy_ecs::system::EntityCommands,
12575        d: EntityDataItem,
12576    ) -> Result<(), UpdateMetadataError> {
12577        match d.index {
12578            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12579            _ => {}
12580        }
12581        Ok(())
12582    }
12583}
12584
12585/// The metadata bundle for [BirchBoat].
12586///
12587/// This type should generally not be used directly.
12588#[derive(Bundle)]
12589pub struct BirchBoatMetadataBundle {
12590    _marker: BirchBoat,
12591    parent: AbstractBoatMetadataBundle,
12592}
12593impl Default for BirchBoatMetadataBundle {
12594    fn default() -> Self {
12595        Self {
12596            _marker: BirchBoat,
12597            parent: Default::default(),
12598        }
12599    }
12600}
12601
12602/// The marker component for entities of type `minecraft:birch_chest_boat`.
12603///
12604/// # Metadata
12605///
12606/// This entity type does not add any additional metadata. It will still have
12607/// metadata from parent types.
12608///
12609/// # Parents
12610///
12611/// Entities with `BirchChestBoat` will also have the following marker
12612/// components and their metadata fields:
12613///
12614/// - [AbstractBoat]
12615/// - [AbstractVehicle]
12616/// - [AbstractEntity]
12617///
12618/// # Children
12619///
12620/// This entity type has no children types.
12621#[derive(Component)]
12622pub struct BirchChestBoat;
12623impl BirchChestBoat {
12624    fn apply_metadata(
12625        entity: &mut bevy_ecs::system::EntityCommands,
12626        d: EntityDataItem,
12627    ) -> Result<(), UpdateMetadataError> {
12628        match d.index {
12629            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12630            _ => {}
12631        }
12632        Ok(())
12633    }
12634}
12635
12636/// The metadata bundle for [BirchChestBoat].
12637///
12638/// This type should generally not be used directly.
12639#[derive(Bundle)]
12640pub struct BirchChestBoatMetadataBundle {
12641    _marker: BirchChestBoat,
12642    parent: AbstractBoatMetadataBundle,
12643}
12644impl Default for BirchChestBoatMetadataBundle {
12645    fn default() -> Self {
12646        Self {
12647            _marker: BirchChestBoat,
12648            parent: Default::default(),
12649        }
12650    }
12651}
12652
12653/// The marker component for entities of type `minecraft:cherry_boat`.
12654///
12655/// # Metadata
12656///
12657/// This entity type does not add any additional metadata. It will still have
12658/// metadata from parent types.
12659///
12660/// # Parents
12661///
12662/// Entities with `CherryBoat` will also have the following marker components
12663/// and their metadata fields:
12664///
12665/// - [AbstractBoat]
12666/// - [AbstractVehicle]
12667/// - [AbstractEntity]
12668///
12669/// # Children
12670///
12671/// This entity type has no children types.
12672#[derive(Component)]
12673pub struct CherryBoat;
12674impl CherryBoat {
12675    fn apply_metadata(
12676        entity: &mut bevy_ecs::system::EntityCommands,
12677        d: EntityDataItem,
12678    ) -> Result<(), UpdateMetadataError> {
12679        match d.index {
12680            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12681            _ => {}
12682        }
12683        Ok(())
12684    }
12685}
12686
12687/// The metadata bundle for [CherryBoat].
12688///
12689/// This type should generally not be used directly.
12690#[derive(Bundle)]
12691pub struct CherryBoatMetadataBundle {
12692    _marker: CherryBoat,
12693    parent: AbstractBoatMetadataBundle,
12694}
12695impl Default for CherryBoatMetadataBundle {
12696    fn default() -> Self {
12697        Self {
12698            _marker: CherryBoat,
12699            parent: Default::default(),
12700        }
12701    }
12702}
12703
12704/// The marker component for entities of type `minecraft:cherry_chest_boat`.
12705///
12706/// # Metadata
12707///
12708/// This entity type does not add any additional metadata. It will still have
12709/// metadata from parent types.
12710///
12711/// # Parents
12712///
12713/// Entities with `CherryChestBoat` will also have the following marker
12714/// components and their metadata fields:
12715///
12716/// - [AbstractBoat]
12717/// - [AbstractVehicle]
12718/// - [AbstractEntity]
12719///
12720/// # Children
12721///
12722/// This entity type has no children types.
12723#[derive(Component)]
12724pub struct CherryChestBoat;
12725impl CherryChestBoat {
12726    fn apply_metadata(
12727        entity: &mut bevy_ecs::system::EntityCommands,
12728        d: EntityDataItem,
12729    ) -> Result<(), UpdateMetadataError> {
12730        match d.index {
12731            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12732            _ => {}
12733        }
12734        Ok(())
12735    }
12736}
12737
12738/// The metadata bundle for [CherryChestBoat].
12739///
12740/// This type should generally not be used directly.
12741#[derive(Bundle)]
12742pub struct CherryChestBoatMetadataBundle {
12743    _marker: CherryChestBoat,
12744    parent: AbstractBoatMetadataBundle,
12745}
12746impl Default for CherryChestBoatMetadataBundle {
12747    fn default() -> Self {
12748        Self {
12749            _marker: CherryChestBoat,
12750            parent: Default::default(),
12751        }
12752    }
12753}
12754
12755/// The marker component for entities of type `minecraft:dark_oak_boat`.
12756///
12757/// # Metadata
12758///
12759/// This entity type does not add any additional metadata. It will still have
12760/// metadata from parent types.
12761///
12762/// # Parents
12763///
12764/// Entities with `DarkOakBoat` will also have the following marker components
12765/// and their metadata fields:
12766///
12767/// - [AbstractBoat]
12768/// - [AbstractVehicle]
12769/// - [AbstractEntity]
12770///
12771/// # Children
12772///
12773/// This entity type has no children types.
12774#[derive(Component)]
12775pub struct DarkOakBoat;
12776impl DarkOakBoat {
12777    fn apply_metadata(
12778        entity: &mut bevy_ecs::system::EntityCommands,
12779        d: EntityDataItem,
12780    ) -> Result<(), UpdateMetadataError> {
12781        match d.index {
12782            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12783            _ => {}
12784        }
12785        Ok(())
12786    }
12787}
12788
12789/// The metadata bundle for [DarkOakBoat].
12790///
12791/// This type should generally not be used directly.
12792#[derive(Bundle)]
12793pub struct DarkOakBoatMetadataBundle {
12794    _marker: DarkOakBoat,
12795    parent: AbstractBoatMetadataBundle,
12796}
12797impl Default for DarkOakBoatMetadataBundle {
12798    fn default() -> Self {
12799        Self {
12800            _marker: DarkOakBoat,
12801            parent: Default::default(),
12802        }
12803    }
12804}
12805
12806/// The marker component for entities of type `minecraft:dark_oak_chest_boat`.
12807///
12808/// # Metadata
12809///
12810/// This entity type does not add any additional metadata. It will still have
12811/// metadata from parent types.
12812///
12813/// # Parents
12814///
12815/// Entities with `DarkOakChestBoat` will also have the following marker
12816/// components and their metadata fields:
12817///
12818/// - [AbstractBoat]
12819/// - [AbstractVehicle]
12820/// - [AbstractEntity]
12821///
12822/// # Children
12823///
12824/// This entity type has no children types.
12825#[derive(Component)]
12826pub struct DarkOakChestBoat;
12827impl DarkOakChestBoat {
12828    fn apply_metadata(
12829        entity: &mut bevy_ecs::system::EntityCommands,
12830        d: EntityDataItem,
12831    ) -> Result<(), UpdateMetadataError> {
12832        match d.index {
12833            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12834            _ => {}
12835        }
12836        Ok(())
12837    }
12838}
12839
12840/// The metadata bundle for [DarkOakChestBoat].
12841///
12842/// This type should generally not be used directly.
12843#[derive(Bundle)]
12844pub struct DarkOakChestBoatMetadataBundle {
12845    _marker: DarkOakChestBoat,
12846    parent: AbstractBoatMetadataBundle,
12847}
12848impl Default for DarkOakChestBoatMetadataBundle {
12849    fn default() -> Self {
12850        Self {
12851            _marker: DarkOakChestBoat,
12852            parent: Default::default(),
12853        }
12854    }
12855}
12856
12857/// The marker component for entities of type `minecraft:jungle_boat`.
12858///
12859/// # Metadata
12860///
12861/// This entity type does not add any additional metadata. It will still have
12862/// metadata from parent types.
12863///
12864/// # Parents
12865///
12866/// Entities with `JungleBoat` will also have the following marker components
12867/// and their metadata fields:
12868///
12869/// - [AbstractBoat]
12870/// - [AbstractVehicle]
12871/// - [AbstractEntity]
12872///
12873/// # Children
12874///
12875/// This entity type has no children types.
12876#[derive(Component)]
12877pub struct JungleBoat;
12878impl JungleBoat {
12879    fn apply_metadata(
12880        entity: &mut bevy_ecs::system::EntityCommands,
12881        d: EntityDataItem,
12882    ) -> Result<(), UpdateMetadataError> {
12883        match d.index {
12884            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12885            _ => {}
12886        }
12887        Ok(())
12888    }
12889}
12890
12891/// The metadata bundle for [JungleBoat].
12892///
12893/// This type should generally not be used directly.
12894#[derive(Bundle)]
12895pub struct JungleBoatMetadataBundle {
12896    _marker: JungleBoat,
12897    parent: AbstractBoatMetadataBundle,
12898}
12899impl Default for JungleBoatMetadataBundle {
12900    fn default() -> Self {
12901        Self {
12902            _marker: JungleBoat,
12903            parent: Default::default(),
12904        }
12905    }
12906}
12907
12908/// The marker component for entities of type `minecraft:jungle_chest_boat`.
12909///
12910/// # Metadata
12911///
12912/// This entity type does not add any additional metadata. It will still have
12913/// metadata from parent types.
12914///
12915/// # Parents
12916///
12917/// Entities with `JungleChestBoat` will also have the following marker
12918/// components and their metadata fields:
12919///
12920/// - [AbstractBoat]
12921/// - [AbstractVehicle]
12922/// - [AbstractEntity]
12923///
12924/// # Children
12925///
12926/// This entity type has no children types.
12927#[derive(Component)]
12928pub struct JungleChestBoat;
12929impl JungleChestBoat {
12930    fn apply_metadata(
12931        entity: &mut bevy_ecs::system::EntityCommands,
12932        d: EntityDataItem,
12933    ) -> Result<(), UpdateMetadataError> {
12934        match d.index {
12935            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12936            _ => {}
12937        }
12938        Ok(())
12939    }
12940}
12941
12942/// The metadata bundle for [JungleChestBoat].
12943///
12944/// This type should generally not be used directly.
12945#[derive(Bundle)]
12946pub struct JungleChestBoatMetadataBundle {
12947    _marker: JungleChestBoat,
12948    parent: AbstractBoatMetadataBundle,
12949}
12950impl Default for JungleChestBoatMetadataBundle {
12951    fn default() -> Self {
12952        Self {
12953            _marker: JungleChestBoat,
12954            parent: Default::default(),
12955        }
12956    }
12957}
12958
12959/// The marker component for entities of type `minecraft:mangrove_boat`.
12960///
12961/// # Metadata
12962///
12963/// This entity type does not add any additional metadata. It will still have
12964/// metadata from parent types.
12965///
12966/// # Parents
12967///
12968/// Entities with `MangroveBoat` will also have the following marker components
12969/// and their metadata fields:
12970///
12971/// - [AbstractBoat]
12972/// - [AbstractVehicle]
12973/// - [AbstractEntity]
12974///
12975/// # Children
12976///
12977/// This entity type has no children types.
12978#[derive(Component)]
12979pub struct MangroveBoat;
12980impl MangroveBoat {
12981    fn apply_metadata(
12982        entity: &mut bevy_ecs::system::EntityCommands,
12983        d: EntityDataItem,
12984    ) -> Result<(), UpdateMetadataError> {
12985        match d.index {
12986            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
12987            _ => {}
12988        }
12989        Ok(())
12990    }
12991}
12992
12993/// The metadata bundle for [MangroveBoat].
12994///
12995/// This type should generally not be used directly.
12996#[derive(Bundle)]
12997pub struct MangroveBoatMetadataBundle {
12998    _marker: MangroveBoat,
12999    parent: AbstractBoatMetadataBundle,
13000}
13001impl Default for MangroveBoatMetadataBundle {
13002    fn default() -> Self {
13003        Self {
13004            _marker: MangroveBoat,
13005            parent: Default::default(),
13006        }
13007    }
13008}
13009
13010/// The marker component for entities of type `minecraft:mangrove_chest_boat`.
13011///
13012/// # Metadata
13013///
13014/// This entity type does not add any additional metadata. It will still have
13015/// metadata from parent types.
13016///
13017/// # Parents
13018///
13019/// Entities with `MangroveChestBoat` will also have the following marker
13020/// components and their metadata fields:
13021///
13022/// - [AbstractBoat]
13023/// - [AbstractVehicle]
13024/// - [AbstractEntity]
13025///
13026/// # Children
13027///
13028/// This entity type has no children types.
13029#[derive(Component)]
13030pub struct MangroveChestBoat;
13031impl MangroveChestBoat {
13032    fn apply_metadata(
13033        entity: &mut bevy_ecs::system::EntityCommands,
13034        d: EntityDataItem,
13035    ) -> Result<(), UpdateMetadataError> {
13036        match d.index {
13037            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13038            _ => {}
13039        }
13040        Ok(())
13041    }
13042}
13043
13044/// The metadata bundle for [MangroveChestBoat].
13045///
13046/// This type should generally not be used directly.
13047#[derive(Bundle)]
13048pub struct MangroveChestBoatMetadataBundle {
13049    _marker: MangroveChestBoat,
13050    parent: AbstractBoatMetadataBundle,
13051}
13052impl Default for MangroveChestBoatMetadataBundle {
13053    fn default() -> Self {
13054        Self {
13055            _marker: MangroveChestBoat,
13056            parent: Default::default(),
13057        }
13058    }
13059}
13060
13061/// The marker component for entities of type `minecraft:oak_boat`.
13062///
13063/// # Metadata
13064///
13065/// This entity type does not add any additional metadata. It will still have
13066/// metadata from parent types.
13067///
13068/// # Parents
13069///
13070/// Entities with `OakBoat` will also have the following marker components and
13071/// their metadata fields:
13072///
13073/// - [AbstractBoat]
13074/// - [AbstractVehicle]
13075/// - [AbstractEntity]
13076///
13077/// # Children
13078///
13079/// This entity type has no children types.
13080#[derive(Component)]
13081pub struct OakBoat;
13082impl OakBoat {
13083    fn apply_metadata(
13084        entity: &mut bevy_ecs::system::EntityCommands,
13085        d: EntityDataItem,
13086    ) -> Result<(), UpdateMetadataError> {
13087        match d.index {
13088            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13089            _ => {}
13090        }
13091        Ok(())
13092    }
13093}
13094
13095/// The metadata bundle for [OakBoat].
13096///
13097/// This type should generally not be used directly.
13098#[derive(Bundle)]
13099pub struct OakBoatMetadataBundle {
13100    _marker: OakBoat,
13101    parent: AbstractBoatMetadataBundle,
13102}
13103impl Default for OakBoatMetadataBundle {
13104    fn default() -> Self {
13105        Self {
13106            _marker: OakBoat,
13107            parent: Default::default(),
13108        }
13109    }
13110}
13111
13112/// The marker component for entities of type `minecraft:oak_chest_boat`.
13113///
13114/// # Metadata
13115///
13116/// This entity type does not add any additional metadata. It will still have
13117/// metadata from parent types.
13118///
13119/// # Parents
13120///
13121/// Entities with `OakChestBoat` will also have the following marker components
13122/// and their metadata fields:
13123///
13124/// - [AbstractBoat]
13125/// - [AbstractVehicle]
13126/// - [AbstractEntity]
13127///
13128/// # Children
13129///
13130/// This entity type has no children types.
13131#[derive(Component)]
13132pub struct OakChestBoat;
13133impl OakChestBoat {
13134    fn apply_metadata(
13135        entity: &mut bevy_ecs::system::EntityCommands,
13136        d: EntityDataItem,
13137    ) -> Result<(), UpdateMetadataError> {
13138        match d.index {
13139            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13140            _ => {}
13141        }
13142        Ok(())
13143    }
13144}
13145
13146/// The metadata bundle for [OakChestBoat].
13147///
13148/// This type should generally not be used directly.
13149#[derive(Bundle)]
13150pub struct OakChestBoatMetadataBundle {
13151    _marker: OakChestBoat,
13152    parent: AbstractBoatMetadataBundle,
13153}
13154impl Default for OakChestBoatMetadataBundle {
13155    fn default() -> Self {
13156        Self {
13157            _marker: OakChestBoat,
13158            parent: Default::default(),
13159        }
13160    }
13161}
13162
13163/// The marker component for entities of type `minecraft:pale_oak_boat`.
13164///
13165/// # Metadata
13166///
13167/// This entity type does not add any additional metadata. It will still have
13168/// metadata from parent types.
13169///
13170/// # Parents
13171///
13172/// Entities with `PaleOakBoat` will also have the following marker components
13173/// and their metadata fields:
13174///
13175/// - [AbstractBoat]
13176/// - [AbstractVehicle]
13177/// - [AbstractEntity]
13178///
13179/// # Children
13180///
13181/// This entity type has no children types.
13182#[derive(Component)]
13183pub struct PaleOakBoat;
13184impl PaleOakBoat {
13185    fn apply_metadata(
13186        entity: &mut bevy_ecs::system::EntityCommands,
13187        d: EntityDataItem,
13188    ) -> Result<(), UpdateMetadataError> {
13189        match d.index {
13190            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13191            _ => {}
13192        }
13193        Ok(())
13194    }
13195}
13196
13197/// The metadata bundle for [PaleOakBoat].
13198///
13199/// This type should generally not be used directly.
13200#[derive(Bundle)]
13201pub struct PaleOakBoatMetadataBundle {
13202    _marker: PaleOakBoat,
13203    parent: AbstractBoatMetadataBundle,
13204}
13205impl Default for PaleOakBoatMetadataBundle {
13206    fn default() -> Self {
13207        Self {
13208            _marker: PaleOakBoat,
13209            parent: Default::default(),
13210        }
13211    }
13212}
13213
13214/// The marker component for entities of type `minecraft:pale_oak_chest_boat`.
13215///
13216/// # Metadata
13217///
13218/// This entity type does not add any additional metadata. It will still have
13219/// metadata from parent types.
13220///
13221/// # Parents
13222///
13223/// Entities with `PaleOakChestBoat` will also have the following marker
13224/// components and their metadata fields:
13225///
13226/// - [AbstractBoat]
13227/// - [AbstractVehicle]
13228/// - [AbstractEntity]
13229///
13230/// # Children
13231///
13232/// This entity type has no children types.
13233#[derive(Component)]
13234pub struct PaleOakChestBoat;
13235impl PaleOakChestBoat {
13236    fn apply_metadata(
13237        entity: &mut bevy_ecs::system::EntityCommands,
13238        d: EntityDataItem,
13239    ) -> Result<(), UpdateMetadataError> {
13240        match d.index {
13241            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13242            _ => {}
13243        }
13244        Ok(())
13245    }
13246}
13247
13248/// The metadata bundle for [PaleOakChestBoat].
13249///
13250/// This type should generally not be used directly.
13251#[derive(Bundle)]
13252pub struct PaleOakChestBoatMetadataBundle {
13253    _marker: PaleOakChestBoat,
13254    parent: AbstractBoatMetadataBundle,
13255}
13256impl Default for PaleOakChestBoatMetadataBundle {
13257    fn default() -> Self {
13258        Self {
13259            _marker: PaleOakChestBoat,
13260            parent: Default::default(),
13261        }
13262    }
13263}
13264
13265/// The marker component for entities of type `minecraft:poplar_boat`.
13266///
13267/// # Metadata
13268///
13269/// This entity type does not add any additional metadata. It will still have
13270/// metadata from parent types.
13271///
13272/// # Parents
13273///
13274/// Entities with `PoplarBoat` will also have the following marker components
13275/// and their metadata fields:
13276///
13277/// - [AbstractBoat]
13278/// - [AbstractVehicle]
13279/// - [AbstractEntity]
13280///
13281/// # Children
13282///
13283/// This entity type has no children types.
13284#[derive(Component)]
13285pub struct PoplarBoat;
13286impl PoplarBoat {
13287    fn apply_metadata(
13288        entity: &mut bevy_ecs::system::EntityCommands,
13289        d: EntityDataItem,
13290    ) -> Result<(), UpdateMetadataError> {
13291        match d.index {
13292            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13293            _ => {}
13294        }
13295        Ok(())
13296    }
13297}
13298
13299/// The metadata bundle for [PoplarBoat].
13300///
13301/// This type should generally not be used directly.
13302#[derive(Bundle)]
13303pub struct PoplarBoatMetadataBundle {
13304    _marker: PoplarBoat,
13305    parent: AbstractBoatMetadataBundle,
13306}
13307impl Default for PoplarBoatMetadataBundle {
13308    fn default() -> Self {
13309        Self {
13310            _marker: PoplarBoat,
13311            parent: Default::default(),
13312        }
13313    }
13314}
13315
13316/// The marker component for entities of type `minecraft:poplar_chest_boat`.
13317///
13318/// # Metadata
13319///
13320/// This entity type does not add any additional metadata. It will still have
13321/// metadata from parent types.
13322///
13323/// # Parents
13324///
13325/// Entities with `PoplarChestBoat` will also have the following marker
13326/// components and their metadata fields:
13327///
13328/// - [AbstractBoat]
13329/// - [AbstractVehicle]
13330/// - [AbstractEntity]
13331///
13332/// # Children
13333///
13334/// This entity type has no children types.
13335#[derive(Component)]
13336pub struct PoplarChestBoat;
13337impl PoplarChestBoat {
13338    fn apply_metadata(
13339        entity: &mut bevy_ecs::system::EntityCommands,
13340        d: EntityDataItem,
13341    ) -> Result<(), UpdateMetadataError> {
13342        match d.index {
13343            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13344            _ => {}
13345        }
13346        Ok(())
13347    }
13348}
13349
13350/// The metadata bundle for [PoplarChestBoat].
13351///
13352/// This type should generally not be used directly.
13353#[derive(Bundle)]
13354pub struct PoplarChestBoatMetadataBundle {
13355    _marker: PoplarChestBoat,
13356    parent: AbstractBoatMetadataBundle,
13357}
13358impl Default for PoplarChestBoatMetadataBundle {
13359    fn default() -> Self {
13360        Self {
13361            _marker: PoplarChestBoat,
13362            parent: Default::default(),
13363        }
13364    }
13365}
13366
13367/// The marker component for entities of type `minecraft:spruce_boat`.
13368///
13369/// # Metadata
13370///
13371/// This entity type does not add any additional metadata. It will still have
13372/// metadata from parent types.
13373///
13374/// # Parents
13375///
13376/// Entities with `SpruceBoat` will also have the following marker components
13377/// and their metadata fields:
13378///
13379/// - [AbstractBoat]
13380/// - [AbstractVehicle]
13381/// - [AbstractEntity]
13382///
13383/// # Children
13384///
13385/// This entity type has no children types.
13386#[derive(Component)]
13387pub struct SpruceBoat;
13388impl SpruceBoat {
13389    fn apply_metadata(
13390        entity: &mut bevy_ecs::system::EntityCommands,
13391        d: EntityDataItem,
13392    ) -> Result<(), UpdateMetadataError> {
13393        match d.index {
13394            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13395            _ => {}
13396        }
13397        Ok(())
13398    }
13399}
13400
13401/// The metadata bundle for [SpruceBoat].
13402///
13403/// This type should generally not be used directly.
13404#[derive(Bundle)]
13405pub struct SpruceBoatMetadataBundle {
13406    _marker: SpruceBoat,
13407    parent: AbstractBoatMetadataBundle,
13408}
13409impl Default for SpruceBoatMetadataBundle {
13410    fn default() -> Self {
13411        Self {
13412            _marker: SpruceBoat,
13413            parent: Default::default(),
13414        }
13415    }
13416}
13417
13418/// The marker component for entities of type `minecraft:spruce_chest_boat`.
13419///
13420/// # Metadata
13421///
13422/// This entity type does not add any additional metadata. It will still have
13423/// metadata from parent types.
13424///
13425/// # Parents
13426///
13427/// Entities with `SpruceChestBoat` will also have the following marker
13428/// components and their metadata fields:
13429///
13430/// - [AbstractBoat]
13431/// - [AbstractVehicle]
13432/// - [AbstractEntity]
13433///
13434/// # Children
13435///
13436/// This entity type has no children types.
13437#[derive(Component)]
13438pub struct SpruceChestBoat;
13439impl SpruceChestBoat {
13440    fn apply_metadata(
13441        entity: &mut bevy_ecs::system::EntityCommands,
13442        d: EntityDataItem,
13443    ) -> Result<(), UpdateMetadataError> {
13444        match d.index {
13445            0..=13 => AbstractBoat::apply_metadata(entity, d)?,
13446            _ => {}
13447        }
13448        Ok(())
13449    }
13450}
13451
13452/// The metadata bundle for [SpruceChestBoat].
13453///
13454/// This type should generally not be used directly.
13455#[derive(Bundle)]
13456pub struct SpruceChestBoatMetadataBundle {
13457    _marker: SpruceChestBoat,
13458    parent: AbstractBoatMetadataBundle,
13459}
13460impl Default for SpruceChestBoatMetadataBundle {
13461    fn default() -> Self {
13462        Self {
13463            _marker: SpruceChestBoat,
13464            parent: Default::default(),
13465        }
13466    }
13467}
13468
13469/// A metadata field for [AbstractMinecart].
13470#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13471pub struct CustomDisplayBlock(pub azalea_block::BlockState);
13472/// A metadata field for [AbstractMinecart].
13473#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13474pub struct DisplayOffset(pub i32);
13475/// An abstract entity marker component.
13476///
13477/// # Metadata
13478///
13479/// These are the metadata components that all `AbstractMinecart` entities are
13480/// guaranteed to have, in addition to the metadata components from parent
13481/// types:
13482///
13483/// - [CustomDisplayBlock]
13484/// - [DisplayOffset]
13485///
13486/// # Parents
13487///
13488/// Entities with `AbstractMinecart` will also have the following marker
13489/// components and their metadata fields:
13490///
13491/// - [AbstractVehicle]
13492/// - [AbstractEntity]
13493///
13494/// # Children
13495///
13496/// - [ChestMinecart]
13497/// - [CommandBlockMinecart]
13498/// - [FurnaceMinecart]
13499/// - [HopperMinecart]
13500/// - [Minecart]
13501/// - [SpawnerMinecart]
13502/// - [TntMinecart]
13503#[derive(Component)]
13504pub struct AbstractMinecart;
13505impl AbstractMinecart {
13506    fn apply_metadata(
13507        entity: &mut bevy_ecs::system::EntityCommands,
13508        d: EntityDataItem,
13509    ) -> Result<(), UpdateMetadataError> {
13510        match d.index {
13511            0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
13512            11 => {
13513                entity.insert(CustomDisplayBlock(
13514                    d.value
13515                        .into_optional_block_state()
13516                        .map_err(|v| e(v, d.index, "CustomDisplayBlock"))?,
13517                ));
13518            }
13519            12 => {
13520                entity.insert(DisplayOffset(
13521                    d.value
13522                        .into_int()
13523                        .map_err(|v| e(v, d.index, "DisplayOffset"))?,
13524                ));
13525            }
13526            _ => {}
13527        }
13528        Ok(())
13529    }
13530}
13531
13532/// The metadata bundle for [AbstractMinecart].
13533///
13534/// This type should generally not be used directly.
13535#[derive(Bundle)]
13536pub struct AbstractMinecartMetadataBundle {
13537    _marker: AbstractMinecart,
13538    parent: AbstractVehicleMetadataBundle,
13539    custom_display_block: CustomDisplayBlock,
13540    display_offset: DisplayOffset,
13541}
13542impl Default for AbstractMinecartMetadataBundle {
13543    fn default() -> Self {
13544        Self {
13545            _marker: AbstractMinecart,
13546            parent: Default::default(),
13547            custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
13548            display_offset: DisplayOffset(Default::default()),
13549        }
13550    }
13551}
13552
13553/// The marker component for entities of type `minecraft:chest_minecart`.
13554///
13555/// # Metadata
13556///
13557/// This entity type does not add any additional metadata. It will still have
13558/// metadata from parent types.
13559///
13560/// # Parents
13561///
13562/// Entities with `ChestMinecart` will also have the following marker components
13563/// and their metadata fields:
13564///
13565/// - [AbstractMinecart]
13566/// - [AbstractVehicle]
13567/// - [AbstractEntity]
13568///
13569/// # Children
13570///
13571/// This entity type has no children types.
13572#[derive(Component)]
13573pub struct ChestMinecart;
13574impl ChestMinecart {
13575    fn apply_metadata(
13576        entity: &mut bevy_ecs::system::EntityCommands,
13577        d: EntityDataItem,
13578    ) -> Result<(), UpdateMetadataError> {
13579        match d.index {
13580            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13581            _ => {}
13582        }
13583        Ok(())
13584    }
13585}
13586
13587/// The metadata bundle for [ChestMinecart].
13588///
13589/// This type should generally not be used directly.
13590#[derive(Bundle)]
13591pub struct ChestMinecartMetadataBundle {
13592    _marker: ChestMinecart,
13593    parent: AbstractMinecartMetadataBundle,
13594}
13595impl Default for ChestMinecartMetadataBundle {
13596    fn default() -> Self {
13597        Self {
13598            _marker: ChestMinecart,
13599            parent: Default::default(),
13600        }
13601    }
13602}
13603
13604/// A metadata field for [CommandBlockMinecart].
13605#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13606pub struct CommandName(pub Box<str>);
13607/// A metadata field for [CommandBlockMinecart].
13608#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13609pub struct LastOutput(pub Box<FormattedText>);
13610/// The marker component for entities of type
13611/// `minecraft:command_block_minecart`.
13612///
13613/// # Metadata
13614///
13615/// These are the metadata components that all `CommandBlockMinecart` entities
13616/// are guaranteed to have, in addition to the metadata components from parent
13617/// types:
13618///
13619/// - [CommandName]
13620/// - [LastOutput]
13621///
13622/// # Parents
13623///
13624/// Entities with `CommandBlockMinecart` will also have the following marker
13625/// components and their metadata fields:
13626///
13627/// - [AbstractMinecart]
13628/// - [AbstractVehicle]
13629/// - [AbstractEntity]
13630///
13631/// # Children
13632///
13633/// This entity type has no children types.
13634#[derive(Component)]
13635pub struct CommandBlockMinecart;
13636impl CommandBlockMinecart {
13637    fn apply_metadata(
13638        entity: &mut bevy_ecs::system::EntityCommands,
13639        d: EntityDataItem,
13640    ) -> Result<(), UpdateMetadataError> {
13641        match d.index {
13642            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13643            13 => {
13644                entity.insert(CommandName(
13645                    d.value
13646                        .into_string()
13647                        .map_err(|v| e(v, d.index, "CommandName"))?,
13648                ));
13649            }
13650            14 => {
13651                entity.insert(LastOutput(
13652                    d.value
13653                        .into_formatted_text()
13654                        .map_err(|v| e(v, d.index, "LastOutput"))?,
13655                ));
13656            }
13657            _ => {}
13658        }
13659        Ok(())
13660    }
13661}
13662
13663/// The metadata bundle for [CommandBlockMinecart].
13664///
13665/// This type should generally not be used directly.
13666#[derive(Bundle)]
13667pub struct CommandBlockMinecartMetadataBundle {
13668    _marker: CommandBlockMinecart,
13669    parent: AbstractMinecartMetadataBundle,
13670    command_name: CommandName,
13671    last_output: LastOutput,
13672}
13673impl Default for CommandBlockMinecartMetadataBundle {
13674    fn default() -> Self {
13675        Self {
13676            _marker: CommandBlockMinecart,
13677            parent: Default::default(),
13678            command_name: CommandName("".into()),
13679            last_output: LastOutput(Default::default()),
13680        }
13681    }
13682}
13683
13684/// A metadata field for [FurnaceMinecart].
13685#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13686pub struct Fuel(pub bool);
13687/// The marker component for entities of type `minecraft:furnace_minecart`.
13688///
13689/// # Metadata
13690///
13691/// These are the metadata components that all `FurnaceMinecart` entities are
13692/// guaranteed to have, in addition to the metadata components from parent
13693/// types:
13694///
13695/// - [Fuel]
13696///
13697/// # Parents
13698///
13699/// Entities with `FurnaceMinecart` will also have the following marker
13700/// components and their metadata fields:
13701///
13702/// - [AbstractMinecart]
13703/// - [AbstractVehicle]
13704/// - [AbstractEntity]
13705///
13706/// # Children
13707///
13708/// This entity type has no children types.
13709#[derive(Component)]
13710pub struct FurnaceMinecart;
13711impl FurnaceMinecart {
13712    fn apply_metadata(
13713        entity: &mut bevy_ecs::system::EntityCommands,
13714        d: EntityDataItem,
13715    ) -> Result<(), UpdateMetadataError> {
13716        match d.index {
13717            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13718            13 => {
13719                entity.insert(Fuel(
13720                    d.value.into_boolean().map_err(|v| e(v, d.index, "Fuel"))?,
13721                ));
13722            }
13723            _ => {}
13724        }
13725        Ok(())
13726    }
13727}
13728
13729/// The metadata bundle for [FurnaceMinecart].
13730///
13731/// This type should generally not be used directly.
13732#[derive(Bundle)]
13733pub struct FurnaceMinecartMetadataBundle {
13734    _marker: FurnaceMinecart,
13735    parent: AbstractMinecartMetadataBundle,
13736    fuel: Fuel,
13737}
13738impl Default for FurnaceMinecartMetadataBundle {
13739    fn default() -> Self {
13740        Self {
13741            _marker: FurnaceMinecart,
13742            parent: Default::default(),
13743            fuel: Fuel(false),
13744        }
13745    }
13746}
13747
13748/// The marker component for entities of type `minecraft:hopper_minecart`.
13749///
13750/// # Metadata
13751///
13752/// This entity type does not add any additional metadata. It will still have
13753/// metadata from parent types.
13754///
13755/// # Parents
13756///
13757/// Entities with `HopperMinecart` will also have the following marker
13758/// components and their metadata fields:
13759///
13760/// - [AbstractMinecart]
13761/// - [AbstractVehicle]
13762/// - [AbstractEntity]
13763///
13764/// # Children
13765///
13766/// This entity type has no children types.
13767#[derive(Component)]
13768pub struct HopperMinecart;
13769impl HopperMinecart {
13770    fn apply_metadata(
13771        entity: &mut bevy_ecs::system::EntityCommands,
13772        d: EntityDataItem,
13773    ) -> Result<(), UpdateMetadataError> {
13774        match d.index {
13775            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13776            _ => {}
13777        }
13778        Ok(())
13779    }
13780}
13781
13782/// The metadata bundle for [HopperMinecart].
13783///
13784/// This type should generally not be used directly.
13785#[derive(Bundle)]
13786pub struct HopperMinecartMetadataBundle {
13787    _marker: HopperMinecart,
13788    parent: AbstractMinecartMetadataBundle,
13789}
13790impl Default for HopperMinecartMetadataBundle {
13791    fn default() -> Self {
13792        Self {
13793            _marker: HopperMinecart,
13794            parent: Default::default(),
13795        }
13796    }
13797}
13798
13799/// The marker component for entities of type `minecraft:minecart`.
13800///
13801/// # Metadata
13802///
13803/// This entity type does not add any additional metadata. It will still have
13804/// metadata from parent types.
13805///
13806/// # Parents
13807///
13808/// Entities with `Minecart` will also have the following marker components and
13809/// their metadata fields:
13810///
13811/// - [AbstractMinecart]
13812/// - [AbstractVehicle]
13813/// - [AbstractEntity]
13814///
13815/// # Children
13816///
13817/// This entity type has no children types.
13818#[derive(Component)]
13819pub struct Minecart;
13820impl Minecart {
13821    fn apply_metadata(
13822        entity: &mut bevy_ecs::system::EntityCommands,
13823        d: EntityDataItem,
13824    ) -> Result<(), UpdateMetadataError> {
13825        match d.index {
13826            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13827            _ => {}
13828        }
13829        Ok(())
13830    }
13831}
13832
13833/// The metadata bundle for [Minecart].
13834///
13835/// This type should generally not be used directly.
13836#[derive(Bundle)]
13837pub struct MinecartMetadataBundle {
13838    _marker: Minecart,
13839    parent: AbstractMinecartMetadataBundle,
13840}
13841impl Default for MinecartMetadataBundle {
13842    fn default() -> Self {
13843        Self {
13844            _marker: Minecart,
13845            parent: Default::default(),
13846        }
13847    }
13848}
13849
13850/// The marker component for entities of type `minecraft:spawner_minecart`.
13851///
13852/// # Metadata
13853///
13854/// This entity type does not add any additional metadata. It will still have
13855/// metadata from parent types.
13856///
13857/// # Parents
13858///
13859/// Entities with `SpawnerMinecart` will also have the following marker
13860/// components and their metadata fields:
13861///
13862/// - [AbstractMinecart]
13863/// - [AbstractVehicle]
13864/// - [AbstractEntity]
13865///
13866/// # Children
13867///
13868/// This entity type has no children types.
13869#[derive(Component)]
13870pub struct SpawnerMinecart;
13871impl SpawnerMinecart {
13872    fn apply_metadata(
13873        entity: &mut bevy_ecs::system::EntityCommands,
13874        d: EntityDataItem,
13875    ) -> Result<(), UpdateMetadataError> {
13876        match d.index {
13877            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13878            _ => {}
13879        }
13880        Ok(())
13881    }
13882}
13883
13884/// The metadata bundle for [SpawnerMinecart].
13885///
13886/// This type should generally not be used directly.
13887#[derive(Bundle)]
13888pub struct SpawnerMinecartMetadataBundle {
13889    _marker: SpawnerMinecart,
13890    parent: AbstractMinecartMetadataBundle,
13891}
13892impl Default for SpawnerMinecartMetadataBundle {
13893    fn default() -> Self {
13894        Self {
13895            _marker: SpawnerMinecart,
13896            parent: Default::default(),
13897        }
13898    }
13899}
13900
13901/// The marker component for entities of type `minecraft:tnt_minecart`.
13902///
13903/// # Metadata
13904///
13905/// This entity type does not add any additional metadata. It will still have
13906/// metadata from parent types.
13907///
13908/// # Parents
13909///
13910/// Entities with `TntMinecart` will also have the following marker components
13911/// and their metadata fields:
13912///
13913/// - [AbstractMinecart]
13914/// - [AbstractVehicle]
13915/// - [AbstractEntity]
13916///
13917/// # Children
13918///
13919/// This entity type has no children types.
13920#[derive(Component)]
13921pub struct TntMinecart;
13922impl TntMinecart {
13923    fn apply_metadata(
13924        entity: &mut bevy_ecs::system::EntityCommands,
13925        d: EntityDataItem,
13926    ) -> Result<(), UpdateMetadataError> {
13927        match d.index {
13928            0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
13929            _ => {}
13930        }
13931        Ok(())
13932    }
13933}
13934
13935/// The metadata bundle for [TntMinecart].
13936///
13937/// This type should generally not be used directly.
13938#[derive(Bundle)]
13939pub struct TntMinecartMetadataBundle {
13940    _marker: TntMinecart,
13941    parent: AbstractMinecartMetadataBundle,
13942}
13943impl Default for TntMinecartMetadataBundle {
13944    fn default() -> Self {
13945        Self {
13946            _marker: TntMinecart,
13947            parent: Default::default(),
13948        }
13949    }
13950}
13951
13952pub fn apply_metadata(
13953    entity: &mut bevy_ecs::system::EntityCommands,
13954    entity_kind: EntityKind,
13955    items: Vec<EntityDataItem>,
13956) -> Result<(), UpdateMetadataError> {
13957    match entity_kind {
13958        EntityKind::AcaciaBoat => {
13959            for d in items {
13960                AcaciaBoat::apply_metadata(entity, d)?;
13961            }
13962        }
13963        EntityKind::AcaciaChestBoat => {
13964            for d in items {
13965                AcaciaChestBoat::apply_metadata(entity, d)?;
13966            }
13967        }
13968        EntityKind::Allay => {
13969            for d in items {
13970                Allay::apply_metadata(entity, d)?;
13971            }
13972        }
13973        EntityKind::AreaEffectCloud => {
13974            for d in items {
13975                AreaEffectCloud::apply_metadata(entity, d)?;
13976            }
13977        }
13978        EntityKind::Armadillo => {
13979            for d in items {
13980                Armadillo::apply_metadata(entity, d)?;
13981            }
13982        }
13983        EntityKind::ArmorStand => {
13984            for d in items {
13985                ArmorStand::apply_metadata(entity, d)?;
13986            }
13987        }
13988        EntityKind::Arrow => {
13989            for d in items {
13990                Arrow::apply_metadata(entity, d)?;
13991            }
13992        }
13993        EntityKind::Axolotl => {
13994            for d in items {
13995                Axolotl::apply_metadata(entity, d)?;
13996            }
13997        }
13998        EntityKind::BambooChestRaft => {
13999            for d in items {
14000                BambooChestRaft::apply_metadata(entity, d)?;
14001            }
14002        }
14003        EntityKind::BambooRaft => {
14004            for d in items {
14005                BambooRaft::apply_metadata(entity, d)?;
14006            }
14007        }
14008        EntityKind::Bat => {
14009            for d in items {
14010                Bat::apply_metadata(entity, d)?;
14011            }
14012        }
14013        EntityKind::Bee => {
14014            for d in items {
14015                Bee::apply_metadata(entity, d)?;
14016            }
14017        }
14018        EntityKind::BirchBoat => {
14019            for d in items {
14020                BirchBoat::apply_metadata(entity, d)?;
14021            }
14022        }
14023        EntityKind::BirchChestBoat => {
14024            for d in items {
14025                BirchChestBoat::apply_metadata(entity, d)?;
14026            }
14027        }
14028        EntityKind::Blaze => {
14029            for d in items {
14030                Blaze::apply_metadata(entity, d)?;
14031            }
14032        }
14033        EntityKind::BlockDisplay => {
14034            for d in items {
14035                BlockDisplay::apply_metadata(entity, d)?;
14036            }
14037        }
14038        EntityKind::Bogged => {
14039            for d in items {
14040                Bogged::apply_metadata(entity, d)?;
14041            }
14042        }
14043        EntityKind::Breeze => {
14044            for d in items {
14045                Breeze::apply_metadata(entity, d)?;
14046            }
14047        }
14048        EntityKind::BreezeWindCharge => {
14049            for d in items {
14050                BreezeWindCharge::apply_metadata(entity, d)?;
14051            }
14052        }
14053        EntityKind::Camel => {
14054            for d in items {
14055                Camel::apply_metadata(entity, d)?;
14056            }
14057        }
14058        EntityKind::CamelHusk => {
14059            for d in items {
14060                CamelHusk::apply_metadata(entity, d)?;
14061            }
14062        }
14063        EntityKind::Cat => {
14064            for d in items {
14065                Cat::apply_metadata(entity, d)?;
14066            }
14067        }
14068        EntityKind::CaveSpider => {
14069            for d in items {
14070                CaveSpider::apply_metadata(entity, d)?;
14071            }
14072        }
14073        EntityKind::CherryBoat => {
14074            for d in items {
14075                CherryBoat::apply_metadata(entity, d)?;
14076            }
14077        }
14078        EntityKind::CherryChestBoat => {
14079            for d in items {
14080                CherryChestBoat::apply_metadata(entity, d)?;
14081            }
14082        }
14083        EntityKind::ChestMinecart => {
14084            for d in items {
14085                ChestMinecart::apply_metadata(entity, d)?;
14086            }
14087        }
14088        EntityKind::Chicken => {
14089            for d in items {
14090                Chicken::apply_metadata(entity, d)?;
14091            }
14092        }
14093        EntityKind::Cod => {
14094            for d in items {
14095                Cod::apply_metadata(entity, d)?;
14096            }
14097        }
14098        EntityKind::CommandBlockMinecart => {
14099            for d in items {
14100                CommandBlockMinecart::apply_metadata(entity, d)?;
14101            }
14102        }
14103        EntityKind::CopperGolem => {
14104            for d in items {
14105                CopperGolem::apply_metadata(entity, d)?;
14106            }
14107        }
14108        EntityKind::Cow => {
14109            for d in items {
14110                Cow::apply_metadata(entity, d)?;
14111            }
14112        }
14113        EntityKind::Creaking => {
14114            for d in items {
14115                Creaking::apply_metadata(entity, d)?;
14116            }
14117        }
14118        EntityKind::Creeper => {
14119            for d in items {
14120                Creeper::apply_metadata(entity, d)?;
14121            }
14122        }
14123        EntityKind::Cushion => {
14124            for d in items {
14125                Cushion::apply_metadata(entity, d)?;
14126            }
14127        }
14128        EntityKind::DarkOakBoat => {
14129            for d in items {
14130                DarkOakBoat::apply_metadata(entity, d)?;
14131            }
14132        }
14133        EntityKind::DarkOakChestBoat => {
14134            for d in items {
14135                DarkOakChestBoat::apply_metadata(entity, d)?;
14136            }
14137        }
14138        EntityKind::Dolphin => {
14139            for d in items {
14140                Dolphin::apply_metadata(entity, d)?;
14141            }
14142        }
14143        EntityKind::Donkey => {
14144            for d in items {
14145                Donkey::apply_metadata(entity, d)?;
14146            }
14147        }
14148        EntityKind::DragonFireball => {
14149            for d in items {
14150                DragonFireball::apply_metadata(entity, d)?;
14151            }
14152        }
14153        EntityKind::Drowned => {
14154            for d in items {
14155                Drowned::apply_metadata(entity, d)?;
14156            }
14157        }
14158        EntityKind::Egg => {
14159            for d in items {
14160                Egg::apply_metadata(entity, d)?;
14161            }
14162        }
14163        EntityKind::ElderGuardian => {
14164            for d in items {
14165                ElderGuardian::apply_metadata(entity, d)?;
14166            }
14167        }
14168        EntityKind::EndCrystal => {
14169            for d in items {
14170                EndCrystal::apply_metadata(entity, d)?;
14171            }
14172        }
14173        EntityKind::EnderDragon => {
14174            for d in items {
14175                EnderDragon::apply_metadata(entity, d)?;
14176            }
14177        }
14178        EntityKind::EnderPearl => {
14179            for d in items {
14180                EnderPearl::apply_metadata(entity, d)?;
14181            }
14182        }
14183        EntityKind::Enderman => {
14184            for d in items {
14185                Enderman::apply_metadata(entity, d)?;
14186            }
14187        }
14188        EntityKind::Endermite => {
14189            for d in items {
14190                Endermite::apply_metadata(entity, d)?;
14191            }
14192        }
14193        EntityKind::Evoker => {
14194            for d in items {
14195                Evoker::apply_metadata(entity, d)?;
14196            }
14197        }
14198        EntityKind::EvokerFangs => {
14199            for d in items {
14200                EvokerFangs::apply_metadata(entity, d)?;
14201            }
14202        }
14203        EntityKind::ExperienceBottle => {
14204            for d in items {
14205                ExperienceBottle::apply_metadata(entity, d)?;
14206            }
14207        }
14208        EntityKind::ExperienceOrb => {
14209            for d in items {
14210                ExperienceOrb::apply_metadata(entity, d)?;
14211            }
14212        }
14213        EntityKind::EyeOfEnder => {
14214            for d in items {
14215                EyeOfEnder::apply_metadata(entity, d)?;
14216            }
14217        }
14218        EntityKind::FallingBlock => {
14219            for d in items {
14220                FallingBlock::apply_metadata(entity, d)?;
14221            }
14222        }
14223        EntityKind::Fireball => {
14224            for d in items {
14225                Fireball::apply_metadata(entity, d)?;
14226            }
14227        }
14228        EntityKind::FireworkRocket => {
14229            for d in items {
14230                FireworkRocket::apply_metadata(entity, d)?;
14231            }
14232        }
14233        EntityKind::FishingBobber => {
14234            for d in items {
14235                FishingBobber::apply_metadata(entity, d)?;
14236            }
14237        }
14238        EntityKind::Fox => {
14239            for d in items {
14240                Fox::apply_metadata(entity, d)?;
14241            }
14242        }
14243        EntityKind::Frog => {
14244            for d in items {
14245                Frog::apply_metadata(entity, d)?;
14246            }
14247        }
14248        EntityKind::FurnaceMinecart => {
14249            for d in items {
14250                FurnaceMinecart::apply_metadata(entity, d)?;
14251            }
14252        }
14253        EntityKind::Ghast => {
14254            for d in items {
14255                Ghast::apply_metadata(entity, d)?;
14256            }
14257        }
14258        EntityKind::Giant => {
14259            for d in items {
14260                Giant::apply_metadata(entity, d)?;
14261            }
14262        }
14263        EntityKind::GlowItemFrame => {
14264            for d in items {
14265                GlowItemFrame::apply_metadata(entity, d)?;
14266            }
14267        }
14268        EntityKind::GlowSquid => {
14269            for d in items {
14270                GlowSquid::apply_metadata(entity, d)?;
14271            }
14272        }
14273        EntityKind::Goat => {
14274            for d in items {
14275                Goat::apply_metadata(entity, d)?;
14276            }
14277        }
14278        EntityKind::Guardian => {
14279            for d in items {
14280                Guardian::apply_metadata(entity, d)?;
14281            }
14282        }
14283        EntityKind::HappyGhast => {
14284            for d in items {
14285                HappyGhast::apply_metadata(entity, d)?;
14286            }
14287        }
14288        EntityKind::Hoglin => {
14289            for d in items {
14290                Hoglin::apply_metadata(entity, d)?;
14291            }
14292        }
14293        EntityKind::HopperMinecart => {
14294            for d in items {
14295                HopperMinecart::apply_metadata(entity, d)?;
14296            }
14297        }
14298        EntityKind::Horse => {
14299            for d in items {
14300                Horse::apply_metadata(entity, d)?;
14301            }
14302        }
14303        EntityKind::Husk => {
14304            for d in items {
14305                Husk::apply_metadata(entity, d)?;
14306            }
14307        }
14308        EntityKind::Illusioner => {
14309            for d in items {
14310                Illusioner::apply_metadata(entity, d)?;
14311            }
14312        }
14313        EntityKind::Interaction => {
14314            for d in items {
14315                Interaction::apply_metadata(entity, d)?;
14316            }
14317        }
14318        EntityKind::IronGolem => {
14319            for d in items {
14320                IronGolem::apply_metadata(entity, d)?;
14321            }
14322        }
14323        EntityKind::Item => {
14324            for d in items {
14325                Item::apply_metadata(entity, d)?;
14326            }
14327        }
14328        EntityKind::ItemDisplay => {
14329            for d in items {
14330                ItemDisplay::apply_metadata(entity, d)?;
14331            }
14332        }
14333        EntityKind::ItemFrame => {
14334            for d in items {
14335                ItemFrame::apply_metadata(entity, d)?;
14336            }
14337        }
14338        EntityKind::JungleBoat => {
14339            for d in items {
14340                JungleBoat::apply_metadata(entity, d)?;
14341            }
14342        }
14343        EntityKind::JungleChestBoat => {
14344            for d in items {
14345                JungleChestBoat::apply_metadata(entity, d)?;
14346            }
14347        }
14348        EntityKind::LeashKnot => {
14349            for d in items {
14350                LeashKnot::apply_metadata(entity, d)?;
14351            }
14352        }
14353        EntityKind::LightningBolt => {
14354            for d in items {
14355                LightningBolt::apply_metadata(entity, d)?;
14356            }
14357        }
14358        EntityKind::LingeringPotion => {
14359            for d in items {
14360                LingeringPotion::apply_metadata(entity, d)?;
14361            }
14362        }
14363        EntityKind::Llama => {
14364            for d in items {
14365                Llama::apply_metadata(entity, d)?;
14366            }
14367        }
14368        EntityKind::LlamaSpit => {
14369            for d in items {
14370                LlamaSpit::apply_metadata(entity, d)?;
14371            }
14372        }
14373        EntityKind::MagmaCube => {
14374            for d in items {
14375                MagmaCube::apply_metadata(entity, d)?;
14376            }
14377        }
14378        EntityKind::MangroveBoat => {
14379            for d in items {
14380                MangroveBoat::apply_metadata(entity, d)?;
14381            }
14382        }
14383        EntityKind::MangroveChestBoat => {
14384            for d in items {
14385                MangroveChestBoat::apply_metadata(entity, d)?;
14386            }
14387        }
14388        EntityKind::Mannequin => {
14389            for d in items {
14390                Mannequin::apply_metadata(entity, d)?;
14391            }
14392        }
14393        EntityKind::Marker => {
14394            for d in items {
14395                Marker::apply_metadata(entity, d)?;
14396            }
14397        }
14398        EntityKind::Minecart => {
14399            for d in items {
14400                Minecart::apply_metadata(entity, d)?;
14401            }
14402        }
14403        EntityKind::Mooshroom => {
14404            for d in items {
14405                Mooshroom::apply_metadata(entity, d)?;
14406            }
14407        }
14408        EntityKind::Mule => {
14409            for d in items {
14410                Mule::apply_metadata(entity, d)?;
14411            }
14412        }
14413        EntityKind::Nautilus => {
14414            for d in items {
14415                Nautilus::apply_metadata(entity, d)?;
14416            }
14417        }
14418        EntityKind::OakBoat => {
14419            for d in items {
14420                OakBoat::apply_metadata(entity, d)?;
14421            }
14422        }
14423        EntityKind::OakChestBoat => {
14424            for d in items {
14425                OakChestBoat::apply_metadata(entity, d)?;
14426            }
14427        }
14428        EntityKind::Ocelot => {
14429            for d in items {
14430                Ocelot::apply_metadata(entity, d)?;
14431            }
14432        }
14433        EntityKind::OminousItemSpawner => {
14434            for d in items {
14435                OminousItemSpawner::apply_metadata(entity, d)?;
14436            }
14437        }
14438        EntityKind::Painting => {
14439            for d in items {
14440                Painting::apply_metadata(entity, d)?;
14441            }
14442        }
14443        EntityKind::PaleOakBoat => {
14444            for d in items {
14445                PaleOakBoat::apply_metadata(entity, d)?;
14446            }
14447        }
14448        EntityKind::PaleOakChestBoat => {
14449            for d in items {
14450                PaleOakChestBoat::apply_metadata(entity, d)?;
14451            }
14452        }
14453        EntityKind::Panda => {
14454            for d in items {
14455                Panda::apply_metadata(entity, d)?;
14456            }
14457        }
14458        EntityKind::Parched => {
14459            for d in items {
14460                Parched::apply_metadata(entity, d)?;
14461            }
14462        }
14463        EntityKind::Parrot => {
14464            for d in items {
14465                Parrot::apply_metadata(entity, d)?;
14466            }
14467        }
14468        EntityKind::Phantom => {
14469            for d in items {
14470                Phantom::apply_metadata(entity, d)?;
14471            }
14472        }
14473        EntityKind::Pig => {
14474            for d in items {
14475                Pig::apply_metadata(entity, d)?;
14476            }
14477        }
14478        EntityKind::Piglin => {
14479            for d in items {
14480                Piglin::apply_metadata(entity, d)?;
14481            }
14482        }
14483        EntityKind::PiglinBrute => {
14484            for d in items {
14485                PiglinBrute::apply_metadata(entity, d)?;
14486            }
14487        }
14488        EntityKind::Pillager => {
14489            for d in items {
14490                Pillager::apply_metadata(entity, d)?;
14491            }
14492        }
14493        EntityKind::Player => {
14494            for d in items {
14495                Player::apply_metadata(entity, d)?;
14496            }
14497        }
14498        EntityKind::PolarBear => {
14499            for d in items {
14500                PolarBear::apply_metadata(entity, d)?;
14501            }
14502        }
14503        EntityKind::PoplarBoat => {
14504            for d in items {
14505                PoplarBoat::apply_metadata(entity, d)?;
14506            }
14507        }
14508        EntityKind::PoplarChestBoat => {
14509            for d in items {
14510                PoplarChestBoat::apply_metadata(entity, d)?;
14511            }
14512        }
14513        EntityKind::Pufferfish => {
14514            for d in items {
14515                Pufferfish::apply_metadata(entity, d)?;
14516            }
14517        }
14518        EntityKind::Rabbit => {
14519            for d in items {
14520                Rabbit::apply_metadata(entity, d)?;
14521            }
14522        }
14523        EntityKind::Ravager => {
14524            for d in items {
14525                Ravager::apply_metadata(entity, d)?;
14526            }
14527        }
14528        EntityKind::Salmon => {
14529            for d in items {
14530                Salmon::apply_metadata(entity, d)?;
14531            }
14532        }
14533        EntityKind::Sheep => {
14534            for d in items {
14535                Sheep::apply_metadata(entity, d)?;
14536            }
14537        }
14538        EntityKind::Shulker => {
14539            for d in items {
14540                Shulker::apply_metadata(entity, d)?;
14541            }
14542        }
14543        EntityKind::ShulkerBullet => {
14544            for d in items {
14545                ShulkerBullet::apply_metadata(entity, d)?;
14546            }
14547        }
14548        EntityKind::Silverfish => {
14549            for d in items {
14550                Silverfish::apply_metadata(entity, d)?;
14551            }
14552        }
14553        EntityKind::Skeleton => {
14554            for d in items {
14555                Skeleton::apply_metadata(entity, d)?;
14556            }
14557        }
14558        EntityKind::SkeletonHorse => {
14559            for d in items {
14560                SkeletonHorse::apply_metadata(entity, d)?;
14561            }
14562        }
14563        EntityKind::Slime => {
14564            for d in items {
14565                Slime::apply_metadata(entity, d)?;
14566            }
14567        }
14568        EntityKind::SmallFireball => {
14569            for d in items {
14570                SmallFireball::apply_metadata(entity, d)?;
14571            }
14572        }
14573        EntityKind::Sniffer => {
14574            for d in items {
14575                Sniffer::apply_metadata(entity, d)?;
14576            }
14577        }
14578        EntityKind::SnowGolem => {
14579            for d in items {
14580                SnowGolem::apply_metadata(entity, d)?;
14581            }
14582        }
14583        EntityKind::Snowball => {
14584            for d in items {
14585                Snowball::apply_metadata(entity, d)?;
14586            }
14587        }
14588        EntityKind::SpawnerMinecart => {
14589            for d in items {
14590                SpawnerMinecart::apply_metadata(entity, d)?;
14591            }
14592        }
14593        EntityKind::SpectralArrow => {
14594            for d in items {
14595                SpectralArrow::apply_metadata(entity, d)?;
14596            }
14597        }
14598        EntityKind::Spider => {
14599            for d in items {
14600                Spider::apply_metadata(entity, d)?;
14601            }
14602        }
14603        EntityKind::SplashPotion => {
14604            for d in items {
14605                SplashPotion::apply_metadata(entity, d)?;
14606            }
14607        }
14608        EntityKind::SpruceBoat => {
14609            for d in items {
14610                SpruceBoat::apply_metadata(entity, d)?;
14611            }
14612        }
14613        EntityKind::SpruceChestBoat => {
14614            for d in items {
14615                SpruceChestBoat::apply_metadata(entity, d)?;
14616            }
14617        }
14618        EntityKind::Squid => {
14619            for d in items {
14620                Squid::apply_metadata(entity, d)?;
14621            }
14622        }
14623        EntityKind::Stray => {
14624            for d in items {
14625                Stray::apply_metadata(entity, d)?;
14626            }
14627        }
14628        EntityKind::Strider => {
14629            for d in items {
14630                Strider::apply_metadata(entity, d)?;
14631            }
14632        }
14633        EntityKind::SulfurCube => {
14634            for d in items {
14635                SulfurCube::apply_metadata(entity, d)?;
14636            }
14637        }
14638        EntityKind::Tadpole => {
14639            for d in items {
14640                Tadpole::apply_metadata(entity, d)?;
14641            }
14642        }
14643        EntityKind::TextDisplay => {
14644            for d in items {
14645                TextDisplay::apply_metadata(entity, d)?;
14646            }
14647        }
14648        EntityKind::Tnt => {
14649            for d in items {
14650                Tnt::apply_metadata(entity, d)?;
14651            }
14652        }
14653        EntityKind::TntMinecart => {
14654            for d in items {
14655                TntMinecart::apply_metadata(entity, d)?;
14656            }
14657        }
14658        EntityKind::TraderLlama => {
14659            for d in items {
14660                TraderLlama::apply_metadata(entity, d)?;
14661            }
14662        }
14663        EntityKind::Trident => {
14664            for d in items {
14665                Trident::apply_metadata(entity, d)?;
14666            }
14667        }
14668        EntityKind::TropicalFish => {
14669            for d in items {
14670                TropicalFish::apply_metadata(entity, d)?;
14671            }
14672        }
14673        EntityKind::Turtle => {
14674            for d in items {
14675                Turtle::apply_metadata(entity, d)?;
14676            }
14677        }
14678        EntityKind::Vex => {
14679            for d in items {
14680                Vex::apply_metadata(entity, d)?;
14681            }
14682        }
14683        EntityKind::Villager => {
14684            for d in items {
14685                Villager::apply_metadata(entity, d)?;
14686            }
14687        }
14688        EntityKind::Vindicator => {
14689            for d in items {
14690                Vindicator::apply_metadata(entity, d)?;
14691            }
14692        }
14693        EntityKind::WanderingTrader => {
14694            for d in items {
14695                WanderingTrader::apply_metadata(entity, d)?;
14696            }
14697        }
14698        EntityKind::Warden => {
14699            for d in items {
14700                Warden::apply_metadata(entity, d)?;
14701            }
14702        }
14703        EntityKind::WindCharge => {
14704            for d in items {
14705                WindCharge::apply_metadata(entity, d)?;
14706            }
14707        }
14708        EntityKind::Witch => {
14709            for d in items {
14710                Witch::apply_metadata(entity, d)?;
14711            }
14712        }
14713        EntityKind::Wither => {
14714            for d in items {
14715                Wither::apply_metadata(entity, d)?;
14716            }
14717        }
14718        EntityKind::WitherSkeleton => {
14719            for d in items {
14720                WitherSkeleton::apply_metadata(entity, d)?;
14721            }
14722        }
14723        EntityKind::WitherSkull => {
14724            for d in items {
14725                WitherSkull::apply_metadata(entity, d)?;
14726            }
14727        }
14728        EntityKind::Wolf => {
14729            for d in items {
14730                Wolf::apply_metadata(entity, d)?;
14731            }
14732        }
14733        EntityKind::Zoglin => {
14734            for d in items {
14735                Zoglin::apply_metadata(entity, d)?;
14736            }
14737        }
14738        EntityKind::Zombie => {
14739            for d in items {
14740                Zombie::apply_metadata(entity, d)?;
14741            }
14742        }
14743        EntityKind::ZombieHorse => {
14744            for d in items {
14745                ZombieHorse::apply_metadata(entity, d)?;
14746            }
14747        }
14748        EntityKind::ZombieNautilus => {
14749            for d in items {
14750                ZombieNautilus::apply_metadata(entity, d)?;
14751            }
14752        }
14753        EntityKind::ZombieVillager => {
14754            for d in items {
14755                ZombieVillager::apply_metadata(entity, d)?;
14756            }
14757        }
14758        EntityKind::ZombifiedPiglin => {
14759            for d in items {
14760                ZombifiedPiglin::apply_metadata(entity, d)?;
14761            }
14762        }
14763    }
14764    Ok(())
14765}
14766
14767pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: EntityKind) {
14768    match kind {
14769        EntityKind::AcaciaBoat => {
14770            entity.insert(AcaciaBoatMetadataBundle::default());
14771        }
14772        EntityKind::AcaciaChestBoat => {
14773            entity.insert(AcaciaChestBoatMetadataBundle::default());
14774        }
14775        EntityKind::Allay => {
14776            entity.insert(AllayMetadataBundle::default());
14777        }
14778        EntityKind::AreaEffectCloud => {
14779            entity.insert(AreaEffectCloudMetadataBundle::default());
14780        }
14781        EntityKind::Armadillo => {
14782            entity.insert(ArmadilloMetadataBundle::default());
14783        }
14784        EntityKind::ArmorStand => {
14785            entity.insert(ArmorStandMetadataBundle::default());
14786        }
14787        EntityKind::Arrow => {
14788            entity.insert(ArrowMetadataBundle::default());
14789        }
14790        EntityKind::Axolotl => {
14791            entity.insert(AxolotlMetadataBundle::default());
14792        }
14793        EntityKind::BambooChestRaft => {
14794            entity.insert(BambooChestRaftMetadataBundle::default());
14795        }
14796        EntityKind::BambooRaft => {
14797            entity.insert(BambooRaftMetadataBundle::default());
14798        }
14799        EntityKind::Bat => {
14800            entity.insert(BatMetadataBundle::default());
14801        }
14802        EntityKind::Bee => {
14803            entity.insert(BeeMetadataBundle::default());
14804        }
14805        EntityKind::BirchBoat => {
14806            entity.insert(BirchBoatMetadataBundle::default());
14807        }
14808        EntityKind::BirchChestBoat => {
14809            entity.insert(BirchChestBoatMetadataBundle::default());
14810        }
14811        EntityKind::Blaze => {
14812            entity.insert(BlazeMetadataBundle::default());
14813        }
14814        EntityKind::BlockDisplay => {
14815            entity.insert(BlockDisplayMetadataBundle::default());
14816        }
14817        EntityKind::Bogged => {
14818            entity.insert(BoggedMetadataBundle::default());
14819        }
14820        EntityKind::Breeze => {
14821            entity.insert(BreezeMetadataBundle::default());
14822        }
14823        EntityKind::BreezeWindCharge => {
14824            entity.insert(BreezeWindChargeMetadataBundle::default());
14825        }
14826        EntityKind::Camel => {
14827            entity.insert(CamelMetadataBundle::default());
14828        }
14829        EntityKind::CamelHusk => {
14830            entity.insert(CamelHuskMetadataBundle::default());
14831        }
14832        EntityKind::Cat => {
14833            entity.insert(CatMetadataBundle::default());
14834        }
14835        EntityKind::CaveSpider => {
14836            entity.insert(CaveSpiderMetadataBundle::default());
14837        }
14838        EntityKind::CherryBoat => {
14839            entity.insert(CherryBoatMetadataBundle::default());
14840        }
14841        EntityKind::CherryChestBoat => {
14842            entity.insert(CherryChestBoatMetadataBundle::default());
14843        }
14844        EntityKind::ChestMinecart => {
14845            entity.insert(ChestMinecartMetadataBundle::default());
14846        }
14847        EntityKind::Chicken => {
14848            entity.insert(ChickenMetadataBundle::default());
14849        }
14850        EntityKind::Cod => {
14851            entity.insert(CodMetadataBundle::default());
14852        }
14853        EntityKind::CommandBlockMinecart => {
14854            entity.insert(CommandBlockMinecartMetadataBundle::default());
14855        }
14856        EntityKind::CopperGolem => {
14857            entity.insert(CopperGolemMetadataBundle::default());
14858        }
14859        EntityKind::Cow => {
14860            entity.insert(CowMetadataBundle::default());
14861        }
14862        EntityKind::Creaking => {
14863            entity.insert(CreakingMetadataBundle::default());
14864        }
14865        EntityKind::Creeper => {
14866            entity.insert(CreeperMetadataBundle::default());
14867        }
14868        EntityKind::Cushion => {
14869            entity.insert(CushionMetadataBundle::default());
14870        }
14871        EntityKind::DarkOakBoat => {
14872            entity.insert(DarkOakBoatMetadataBundle::default());
14873        }
14874        EntityKind::DarkOakChestBoat => {
14875            entity.insert(DarkOakChestBoatMetadataBundle::default());
14876        }
14877        EntityKind::Dolphin => {
14878            entity.insert(DolphinMetadataBundle::default());
14879        }
14880        EntityKind::Donkey => {
14881            entity.insert(DonkeyMetadataBundle::default());
14882        }
14883        EntityKind::DragonFireball => {
14884            entity.insert(DragonFireballMetadataBundle::default());
14885        }
14886        EntityKind::Drowned => {
14887            entity.insert(DrownedMetadataBundle::default());
14888        }
14889        EntityKind::Egg => {
14890            entity.insert(EggMetadataBundle::default());
14891        }
14892        EntityKind::ElderGuardian => {
14893            entity.insert(ElderGuardianMetadataBundle::default());
14894        }
14895        EntityKind::EndCrystal => {
14896            entity.insert(EndCrystalMetadataBundle::default());
14897        }
14898        EntityKind::EnderDragon => {
14899            entity.insert(EnderDragonMetadataBundle::default());
14900        }
14901        EntityKind::EnderPearl => {
14902            entity.insert(EnderPearlMetadataBundle::default());
14903        }
14904        EntityKind::Enderman => {
14905            entity.insert(EndermanMetadataBundle::default());
14906        }
14907        EntityKind::Endermite => {
14908            entity.insert(EndermiteMetadataBundle::default());
14909        }
14910        EntityKind::Evoker => {
14911            entity.insert(EvokerMetadataBundle::default());
14912        }
14913        EntityKind::EvokerFangs => {
14914            entity.insert(EvokerFangsMetadataBundle::default());
14915        }
14916        EntityKind::ExperienceBottle => {
14917            entity.insert(ExperienceBottleMetadataBundle::default());
14918        }
14919        EntityKind::ExperienceOrb => {
14920            entity.insert(ExperienceOrbMetadataBundle::default());
14921        }
14922        EntityKind::EyeOfEnder => {
14923            entity.insert(EyeOfEnderMetadataBundle::default());
14924        }
14925        EntityKind::FallingBlock => {
14926            entity.insert(FallingBlockMetadataBundle::default());
14927        }
14928        EntityKind::Fireball => {
14929            entity.insert(FireballMetadataBundle::default());
14930        }
14931        EntityKind::FireworkRocket => {
14932            entity.insert(FireworkRocketMetadataBundle::default());
14933        }
14934        EntityKind::FishingBobber => {
14935            entity.insert(FishingBobberMetadataBundle::default());
14936        }
14937        EntityKind::Fox => {
14938            entity.insert(FoxMetadataBundle::default());
14939        }
14940        EntityKind::Frog => {
14941            entity.insert(FrogMetadataBundle::default());
14942        }
14943        EntityKind::FurnaceMinecart => {
14944            entity.insert(FurnaceMinecartMetadataBundle::default());
14945        }
14946        EntityKind::Ghast => {
14947            entity.insert(GhastMetadataBundle::default());
14948        }
14949        EntityKind::Giant => {
14950            entity.insert(GiantMetadataBundle::default());
14951        }
14952        EntityKind::GlowItemFrame => {
14953            entity.insert(GlowItemFrameMetadataBundle::default());
14954        }
14955        EntityKind::GlowSquid => {
14956            entity.insert(GlowSquidMetadataBundle::default());
14957        }
14958        EntityKind::Goat => {
14959            entity.insert(GoatMetadataBundle::default());
14960        }
14961        EntityKind::Guardian => {
14962            entity.insert(GuardianMetadataBundle::default());
14963        }
14964        EntityKind::HappyGhast => {
14965            entity.insert(HappyGhastMetadataBundle::default());
14966        }
14967        EntityKind::Hoglin => {
14968            entity.insert(HoglinMetadataBundle::default());
14969        }
14970        EntityKind::HopperMinecart => {
14971            entity.insert(HopperMinecartMetadataBundle::default());
14972        }
14973        EntityKind::Horse => {
14974            entity.insert(HorseMetadataBundle::default());
14975        }
14976        EntityKind::Husk => {
14977            entity.insert(HuskMetadataBundle::default());
14978        }
14979        EntityKind::Illusioner => {
14980            entity.insert(IllusionerMetadataBundle::default());
14981        }
14982        EntityKind::Interaction => {
14983            entity.insert(InteractionMetadataBundle::default());
14984        }
14985        EntityKind::IronGolem => {
14986            entity.insert(IronGolemMetadataBundle::default());
14987        }
14988        EntityKind::Item => {
14989            entity.insert(ItemMetadataBundle::default());
14990        }
14991        EntityKind::ItemDisplay => {
14992            entity.insert(ItemDisplayMetadataBundle::default());
14993        }
14994        EntityKind::ItemFrame => {
14995            entity.insert(ItemFrameMetadataBundle::default());
14996        }
14997        EntityKind::JungleBoat => {
14998            entity.insert(JungleBoatMetadataBundle::default());
14999        }
15000        EntityKind::JungleChestBoat => {
15001            entity.insert(JungleChestBoatMetadataBundle::default());
15002        }
15003        EntityKind::LeashKnot => {
15004            entity.insert(LeashKnotMetadataBundle::default());
15005        }
15006        EntityKind::LightningBolt => {
15007            entity.insert(LightningBoltMetadataBundle::default());
15008        }
15009        EntityKind::LingeringPotion => {
15010            entity.insert(LingeringPotionMetadataBundle::default());
15011        }
15012        EntityKind::Llama => {
15013            entity.insert(LlamaMetadataBundle::default());
15014        }
15015        EntityKind::LlamaSpit => {
15016            entity.insert(LlamaSpitMetadataBundle::default());
15017        }
15018        EntityKind::MagmaCube => {
15019            entity.insert(MagmaCubeMetadataBundle::default());
15020        }
15021        EntityKind::MangroveBoat => {
15022            entity.insert(MangroveBoatMetadataBundle::default());
15023        }
15024        EntityKind::MangroveChestBoat => {
15025            entity.insert(MangroveChestBoatMetadataBundle::default());
15026        }
15027        EntityKind::Mannequin => {
15028            entity.insert(MannequinMetadataBundle::default());
15029        }
15030        EntityKind::Marker => {
15031            entity.insert(MarkerMetadataBundle::default());
15032        }
15033        EntityKind::Minecart => {
15034            entity.insert(MinecartMetadataBundle::default());
15035        }
15036        EntityKind::Mooshroom => {
15037            entity.insert(MooshroomMetadataBundle::default());
15038        }
15039        EntityKind::Mule => {
15040            entity.insert(MuleMetadataBundle::default());
15041        }
15042        EntityKind::Nautilus => {
15043            entity.insert(NautilusMetadataBundle::default());
15044        }
15045        EntityKind::OakBoat => {
15046            entity.insert(OakBoatMetadataBundle::default());
15047        }
15048        EntityKind::OakChestBoat => {
15049            entity.insert(OakChestBoatMetadataBundle::default());
15050        }
15051        EntityKind::Ocelot => {
15052            entity.insert(OcelotMetadataBundle::default());
15053        }
15054        EntityKind::OminousItemSpawner => {
15055            entity.insert(OminousItemSpawnerMetadataBundle::default());
15056        }
15057        EntityKind::Painting => {
15058            entity.insert(PaintingMetadataBundle::default());
15059        }
15060        EntityKind::PaleOakBoat => {
15061            entity.insert(PaleOakBoatMetadataBundle::default());
15062        }
15063        EntityKind::PaleOakChestBoat => {
15064            entity.insert(PaleOakChestBoatMetadataBundle::default());
15065        }
15066        EntityKind::Panda => {
15067            entity.insert(PandaMetadataBundle::default());
15068        }
15069        EntityKind::Parched => {
15070            entity.insert(ParchedMetadataBundle::default());
15071        }
15072        EntityKind::Parrot => {
15073            entity.insert(ParrotMetadataBundle::default());
15074        }
15075        EntityKind::Phantom => {
15076            entity.insert(PhantomMetadataBundle::default());
15077        }
15078        EntityKind::Pig => {
15079            entity.insert(PigMetadataBundle::default());
15080        }
15081        EntityKind::Piglin => {
15082            entity.insert(PiglinMetadataBundle::default());
15083        }
15084        EntityKind::PiglinBrute => {
15085            entity.insert(PiglinBruteMetadataBundle::default());
15086        }
15087        EntityKind::Pillager => {
15088            entity.insert(PillagerMetadataBundle::default());
15089        }
15090        EntityKind::Player => {
15091            entity.insert(PlayerMetadataBundle::default());
15092        }
15093        EntityKind::PolarBear => {
15094            entity.insert(PolarBearMetadataBundle::default());
15095        }
15096        EntityKind::PoplarBoat => {
15097            entity.insert(PoplarBoatMetadataBundle::default());
15098        }
15099        EntityKind::PoplarChestBoat => {
15100            entity.insert(PoplarChestBoatMetadataBundle::default());
15101        }
15102        EntityKind::Pufferfish => {
15103            entity.insert(PufferfishMetadataBundle::default());
15104        }
15105        EntityKind::Rabbit => {
15106            entity.insert(RabbitMetadataBundle::default());
15107        }
15108        EntityKind::Ravager => {
15109            entity.insert(RavagerMetadataBundle::default());
15110        }
15111        EntityKind::Salmon => {
15112            entity.insert(SalmonMetadataBundle::default());
15113        }
15114        EntityKind::Sheep => {
15115            entity.insert(SheepMetadataBundle::default());
15116        }
15117        EntityKind::Shulker => {
15118            entity.insert(ShulkerMetadataBundle::default());
15119        }
15120        EntityKind::ShulkerBullet => {
15121            entity.insert(ShulkerBulletMetadataBundle::default());
15122        }
15123        EntityKind::Silverfish => {
15124            entity.insert(SilverfishMetadataBundle::default());
15125        }
15126        EntityKind::Skeleton => {
15127            entity.insert(SkeletonMetadataBundle::default());
15128        }
15129        EntityKind::SkeletonHorse => {
15130            entity.insert(SkeletonHorseMetadataBundle::default());
15131        }
15132        EntityKind::Slime => {
15133            entity.insert(SlimeMetadataBundle::default());
15134        }
15135        EntityKind::SmallFireball => {
15136            entity.insert(SmallFireballMetadataBundle::default());
15137        }
15138        EntityKind::Sniffer => {
15139            entity.insert(SnifferMetadataBundle::default());
15140        }
15141        EntityKind::SnowGolem => {
15142            entity.insert(SnowGolemMetadataBundle::default());
15143        }
15144        EntityKind::Snowball => {
15145            entity.insert(SnowballMetadataBundle::default());
15146        }
15147        EntityKind::SpawnerMinecart => {
15148            entity.insert(SpawnerMinecartMetadataBundle::default());
15149        }
15150        EntityKind::SpectralArrow => {
15151            entity.insert(SpectralArrowMetadataBundle::default());
15152        }
15153        EntityKind::Spider => {
15154            entity.insert(SpiderMetadataBundle::default());
15155        }
15156        EntityKind::SplashPotion => {
15157            entity.insert(SplashPotionMetadataBundle::default());
15158        }
15159        EntityKind::SpruceBoat => {
15160            entity.insert(SpruceBoatMetadataBundle::default());
15161        }
15162        EntityKind::SpruceChestBoat => {
15163            entity.insert(SpruceChestBoatMetadataBundle::default());
15164        }
15165        EntityKind::Squid => {
15166            entity.insert(SquidMetadataBundle::default());
15167        }
15168        EntityKind::Stray => {
15169            entity.insert(StrayMetadataBundle::default());
15170        }
15171        EntityKind::Strider => {
15172            entity.insert(StriderMetadataBundle::default());
15173        }
15174        EntityKind::SulfurCube => {
15175            entity.insert(SulfurCubeMetadataBundle::default());
15176        }
15177        EntityKind::Tadpole => {
15178            entity.insert(TadpoleMetadataBundle::default());
15179        }
15180        EntityKind::TextDisplay => {
15181            entity.insert(TextDisplayMetadataBundle::default());
15182        }
15183        EntityKind::Tnt => {
15184            entity.insert(TntMetadataBundle::default());
15185        }
15186        EntityKind::TntMinecart => {
15187            entity.insert(TntMinecartMetadataBundle::default());
15188        }
15189        EntityKind::TraderLlama => {
15190            entity.insert(TraderLlamaMetadataBundle::default());
15191        }
15192        EntityKind::Trident => {
15193            entity.insert(TridentMetadataBundle::default());
15194        }
15195        EntityKind::TropicalFish => {
15196            entity.insert(TropicalFishMetadataBundle::default());
15197        }
15198        EntityKind::Turtle => {
15199            entity.insert(TurtleMetadataBundle::default());
15200        }
15201        EntityKind::Vex => {
15202            entity.insert(VexMetadataBundle::default());
15203        }
15204        EntityKind::Villager => {
15205            entity.insert(VillagerMetadataBundle::default());
15206        }
15207        EntityKind::Vindicator => {
15208            entity.insert(VindicatorMetadataBundle::default());
15209        }
15210        EntityKind::WanderingTrader => {
15211            entity.insert(WanderingTraderMetadataBundle::default());
15212        }
15213        EntityKind::Warden => {
15214            entity.insert(WardenMetadataBundle::default());
15215        }
15216        EntityKind::WindCharge => {
15217            entity.insert(WindChargeMetadataBundle::default());
15218        }
15219        EntityKind::Witch => {
15220            entity.insert(WitchMetadataBundle::default());
15221        }
15222        EntityKind::Wither => {
15223            entity.insert(WitherMetadataBundle::default());
15224        }
15225        EntityKind::WitherSkeleton => {
15226            entity.insert(WitherSkeletonMetadataBundle::default());
15227        }
15228        EntityKind::WitherSkull => {
15229            entity.insert(WitherSkullMetadataBundle::default());
15230        }
15231        EntityKind::Wolf => {
15232            entity.insert(WolfMetadataBundle::default());
15233        }
15234        EntityKind::Zoglin => {
15235            entity.insert(ZoglinMetadataBundle::default());
15236        }
15237        EntityKind::Zombie => {
15238            entity.insert(ZombieMetadataBundle::default());
15239        }
15240        EntityKind::ZombieHorse => {
15241            entity.insert(ZombieHorseMetadataBundle::default());
15242        }
15243        EntityKind::ZombieNautilus => {
15244            entity.insert(ZombieNautilusMetadataBundle::default());
15245        }
15246        EntityKind::ZombieVillager => {
15247            entity.insert(ZombieVillagerMetadataBundle::default());
15248        }
15249        EntityKind::ZombifiedPiglin => {
15250            entity.insert(ZombifiedPiglinMetadataBundle::default());
15251        }
15252    }
15253}