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