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