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