1#![allow(clippy::single_match)]
197
198use azalea_chat::FormattedText;
199use azalea_core::{
200 direction::Direction,
201 position::{BlockPos, Vec3f32},
202};
203use azalea_inventory::{ItemStack, components};
204use azalea_registry::{DataRegistry, builtin::EntityKind};
205use bevy_ecs::{bundle::Bundle, component::Component};
206use derive_more::{Deref, DerefMut};
207use thiserror::Error;
208use uuid::Uuid;
209
210use super::{
211 ArmadilloStateKind, CopperGolemStateKind, EntityDataItem, EntityDataValue, OptionalUnsignedInt,
212 Pose, Quaternion, Rotations, SnifferStateKind, VillagerData, WeatheringCopperStateKind,
213};
214use crate::{HumanoidArm, particle::Particle};
215
216#[derive(Error, Debug)]
217pub enum UpdateMetadataError {
218 #[error("Wrong type ({0:?})")]
219 WrongType(EntityDataValue),
220}
221impl From<EntityDataValue> for UpdateMetadataError {
222 fn from(value: EntityDataValue) -> Self {
223 Self::WrongType(value)
224 }
225}
226
227#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
228pub struct OnFire(pub bool);
230#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
231pub struct AbstractEntityShiftKeyDown(pub bool);
233#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
234pub struct Sprinting(pub bool);
236#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
237pub struct Swimming(pub bool);
239#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
240pub struct CurrentlyGlowing(pub bool);
242#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
243pub struct Invisible(pub bool);
245#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
246pub struct FallFlying(pub bool);
248#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
250pub struct AirSupply(pub i32);
251#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
253pub struct CustomName(pub Option<FormattedText>);
254#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
256pub struct CustomNameVisible(pub bool);
257#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
259pub struct Silent(pub bool);
260#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
262pub struct NoGravity(pub bool);
263#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
265pub struct TicksFrozen(pub i32);
266#[derive(Component)]
472pub struct AbstractEntity;
473impl AbstractEntity {
474 pub fn apply_metadata(
475 entity: &mut bevy_ecs::system::EntityCommands,
476 d: EntityDataItem,
477 ) -> Result<(), UpdateMetadataError> {
478 match d.index {
479 0 => {
480 let bitfield = d.value.into_byte()?;
481 entity.insert(OnFire(bitfield & 0x1 != 0));
482 entity.insert(AbstractEntityShiftKeyDown(bitfield & 0x2 != 0));
483 entity.insert(Sprinting(bitfield & 0x8 != 0));
484 entity.insert(Swimming(bitfield & 0x10 != 0));
485 entity.insert(CurrentlyGlowing(bitfield & 0x40 != 0));
486 entity.insert(Invisible(bitfield & 0x20 != 0));
487 entity.insert(FallFlying(bitfield & 0x80 != 0));
488 }
489 1 => {
490 entity.insert(AirSupply(d.value.into_int()?));
491 }
492 2 => {
493 entity.insert(CustomName(d.value.into_optional_formatted_text()?));
494 }
495 3 => {
496 entity.insert(CustomNameVisible(d.value.into_boolean()?));
497 }
498 4 => {
499 entity.insert(Silent(d.value.into_boolean()?));
500 }
501 5 => {
502 entity.insert(NoGravity(d.value.into_boolean()?));
503 }
504 6 => {
505 entity.insert(d.value.into_pose()?);
506 }
507 7 => {
508 entity.insert(TicksFrozen(d.value.into_int()?));
509 }
510 _ => {}
511 }
512 Ok(())
513 }
514}
515
516#[derive(Bundle)]
520pub struct AbstractEntityMetadataBundle {
521 _marker: AbstractEntity,
522 on_fire: OnFire,
523 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown,
524 sprinting: Sprinting,
525 swimming: Swimming,
526 currently_glowing: CurrentlyGlowing,
527 invisible: Invisible,
528 fall_flying: FallFlying,
529 air_supply: AirSupply,
530 custom_name: CustomName,
531 custom_name_visible: CustomNameVisible,
532 silent: Silent,
533 no_gravity: NoGravity,
534 pose: Pose,
535 ticks_frozen: TicksFrozen,
536}
537impl Default for AbstractEntityMetadataBundle {
538 fn default() -> Self {
539 Self {
540 _marker: AbstractEntity,
541 on_fire: OnFire(false),
542 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
543 sprinting: Sprinting(false),
544 swimming: Swimming(false),
545 currently_glowing: CurrentlyGlowing(false),
546 invisible: Invisible(false),
547 fall_flying: FallFlying(false),
548 air_supply: AirSupply(Default::default()),
549 custom_name: CustomName(Default::default()),
550 custom_name_visible: CustomNameVisible(Default::default()),
551 silent: Silent(Default::default()),
552 no_gravity: NoGravity(Default::default()),
553 pose: Pose::default(),
554 ticks_frozen: TicksFrozen(Default::default()),
555 }
556 }
557}
558
559#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
561pub struct Radius(pub f32);
562#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
564pub struct Waiting(pub bool);
565#[derive(Component)]
587pub struct AreaEffectCloud;
588impl AreaEffectCloud {
589 pub fn apply_metadata(
590 entity: &mut bevy_ecs::system::EntityCommands,
591 d: EntityDataItem,
592 ) -> Result<(), UpdateMetadataError> {
593 match d.index {
594 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
595 8 => {
596 entity.insert(Radius(d.value.into_float()?));
597 }
598 9 => {
599 entity.insert(Waiting(d.value.into_boolean()?));
600 }
601 10 => {
602 entity.insert(d.value.into_particle()?);
603 }
604 _ => {}
605 }
606 Ok(())
607 }
608}
609
610#[derive(Bundle)]
614pub struct AreaEffectCloudMetadataBundle {
615 _marker: AreaEffectCloud,
616 parent: AbstractEntityMetadataBundle,
617 radius: Radius,
618 waiting: Waiting,
619 particle: Particle,
620}
621impl Default for AreaEffectCloudMetadataBundle {
622 fn default() -> Self {
623 Self {
624 _marker: AreaEffectCloud,
625 parent: AbstractEntityMetadataBundle {
626 _marker: AbstractEntity,
627 on_fire: OnFire(false),
628 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
629 sprinting: Sprinting(false),
630 swimming: Swimming(false),
631 currently_glowing: CurrentlyGlowing(false),
632 invisible: Invisible(false),
633 fall_flying: FallFlying(false),
634 air_supply: AirSupply(Default::default()),
635 custom_name: CustomName(Default::default()),
636 custom_name_visible: CustomNameVisible(Default::default()),
637 silent: Silent(Default::default()),
638 no_gravity: NoGravity(Default::default()),
639 pose: Pose::default(),
640 ticks_frozen: TicksFrozen(Default::default()),
641 },
642 radius: Radius(3.0),
643 waiting: Waiting(false),
644 particle: Particle::default(),
645 }
646 }
647}
648
649#[derive(Component)]
667pub struct BreezeWindCharge;
668impl BreezeWindCharge {
669 pub fn apply_metadata(
670 entity: &mut bevy_ecs::system::EntityCommands,
671 d: EntityDataItem,
672 ) -> Result<(), UpdateMetadataError> {
673 match d.index {
674 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
675 _ => {}
676 }
677 Ok(())
678 }
679}
680
681#[derive(Bundle)]
685pub struct BreezeWindChargeMetadataBundle {
686 _marker: BreezeWindCharge,
687 parent: AbstractEntityMetadataBundle,
688}
689impl Default for BreezeWindChargeMetadataBundle {
690 fn default() -> Self {
691 Self {
692 _marker: BreezeWindCharge,
693 parent: AbstractEntityMetadataBundle {
694 _marker: AbstractEntity,
695 on_fire: OnFire(false),
696 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
697 sprinting: Sprinting(false),
698 swimming: Swimming(false),
699 currently_glowing: CurrentlyGlowing(false),
700 invisible: Invisible(false),
701 fall_flying: FallFlying(false),
702 air_supply: AirSupply(Default::default()),
703 custom_name: CustomName(Default::default()),
704 custom_name_visible: CustomNameVisible(Default::default()),
705 silent: Silent(Default::default()),
706 no_gravity: NoGravity(Default::default()),
707 pose: Pose::default(),
708 ticks_frozen: TicksFrozen(Default::default()),
709 },
710 }
711 }
712}
713
714#[derive(Component)]
732pub struct DragonFireball;
733impl DragonFireball {
734 pub fn apply_metadata(
735 entity: &mut bevy_ecs::system::EntityCommands,
736 d: EntityDataItem,
737 ) -> Result<(), UpdateMetadataError> {
738 match d.index {
739 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
740 _ => {}
741 }
742 Ok(())
743 }
744}
745
746#[derive(Bundle)]
750pub struct DragonFireballMetadataBundle {
751 _marker: DragonFireball,
752 parent: AbstractEntityMetadataBundle,
753}
754impl Default for DragonFireballMetadataBundle {
755 fn default() -> Self {
756 Self {
757 _marker: DragonFireball,
758 parent: AbstractEntityMetadataBundle {
759 _marker: AbstractEntity,
760 on_fire: OnFire(false),
761 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
762 sprinting: Sprinting(false),
763 swimming: Swimming(false),
764 currently_glowing: CurrentlyGlowing(false),
765 invisible: Invisible(false),
766 fall_flying: FallFlying(false),
767 air_supply: AirSupply(Default::default()),
768 custom_name: CustomName(Default::default()),
769 custom_name_visible: CustomNameVisible(Default::default()),
770 silent: Silent(Default::default()),
771 no_gravity: NoGravity(Default::default()),
772 pose: Pose::default(),
773 ticks_frozen: TicksFrozen(Default::default()),
774 },
775 }
776 }
777}
778
779#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
781pub struct BeamTarget(pub Option<BlockPos>);
782#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
784pub struct ShowBottom(pub bool);
785#[derive(Component)]
807pub struct EndCrystal;
808impl EndCrystal {
809 pub fn apply_metadata(
810 entity: &mut bevy_ecs::system::EntityCommands,
811 d: EntityDataItem,
812 ) -> Result<(), UpdateMetadataError> {
813 match d.index {
814 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
815 8 => {
816 entity.insert(BeamTarget(d.value.into_optional_block_pos()?));
817 }
818 9 => {
819 entity.insert(ShowBottom(d.value.into_boolean()?));
820 }
821 _ => {}
822 }
823 Ok(())
824 }
825}
826
827#[derive(Bundle)]
831pub struct EndCrystalMetadataBundle {
832 _marker: EndCrystal,
833 parent: AbstractEntityMetadataBundle,
834 beam_target: BeamTarget,
835 show_bottom: ShowBottom,
836}
837impl Default for EndCrystalMetadataBundle {
838 fn default() -> Self {
839 Self {
840 _marker: EndCrystal,
841 parent: AbstractEntityMetadataBundle {
842 _marker: AbstractEntity,
843 on_fire: OnFire(false),
844 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
845 sprinting: Sprinting(false),
846 swimming: Swimming(false),
847 currently_glowing: CurrentlyGlowing(false),
848 invisible: Invisible(false),
849 fall_flying: FallFlying(false),
850 air_supply: AirSupply(Default::default()),
851 custom_name: CustomName(Default::default()),
852 custom_name_visible: CustomNameVisible(Default::default()),
853 silent: Silent(Default::default()),
854 no_gravity: NoGravity(Default::default()),
855 pose: Pose::default(),
856 ticks_frozen: TicksFrozen(Default::default()),
857 },
858 beam_target: BeamTarget(None),
859 show_bottom: ShowBottom(true),
860 }
861 }
862}
863
864#[derive(Component)]
882pub struct EvokerFangs;
883impl EvokerFangs {
884 pub fn apply_metadata(
885 entity: &mut bevy_ecs::system::EntityCommands,
886 d: EntityDataItem,
887 ) -> Result<(), UpdateMetadataError> {
888 match d.index {
889 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
890 _ => {}
891 }
892 Ok(())
893 }
894}
895
896#[derive(Bundle)]
900pub struct EvokerFangsMetadataBundle {
901 _marker: EvokerFangs,
902 parent: AbstractEntityMetadataBundle,
903}
904impl Default for EvokerFangsMetadataBundle {
905 fn default() -> Self {
906 Self {
907 _marker: EvokerFangs,
908 parent: AbstractEntityMetadataBundle {
909 _marker: AbstractEntity,
910 on_fire: OnFire(false),
911 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
912 sprinting: Sprinting(false),
913 swimming: Swimming(false),
914 currently_glowing: CurrentlyGlowing(false),
915 invisible: Invisible(false),
916 fall_flying: FallFlying(false),
917 air_supply: AirSupply(Default::default()),
918 custom_name: CustomName(Default::default()),
919 custom_name_visible: CustomNameVisible(Default::default()),
920 silent: Silent(Default::default()),
921 no_gravity: NoGravity(Default::default()),
922 pose: Pose::default(),
923 ticks_frozen: TicksFrozen(Default::default()),
924 },
925 }
926 }
927}
928
929#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
931pub struct Value(pub i32);
932#[derive(Component)]
953pub struct ExperienceOrb;
954impl ExperienceOrb {
955 pub fn apply_metadata(
956 entity: &mut bevy_ecs::system::EntityCommands,
957 d: EntityDataItem,
958 ) -> Result<(), UpdateMetadataError> {
959 match d.index {
960 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
961 8 => {
962 entity.insert(Value(d.value.into_int()?));
963 }
964 _ => {}
965 }
966 Ok(())
967 }
968}
969
970#[derive(Bundle)]
974pub struct ExperienceOrbMetadataBundle {
975 _marker: ExperienceOrb,
976 parent: AbstractEntityMetadataBundle,
977 value: Value,
978}
979impl Default for ExperienceOrbMetadataBundle {
980 fn default() -> Self {
981 Self {
982 _marker: ExperienceOrb,
983 parent: AbstractEntityMetadataBundle {
984 _marker: AbstractEntity,
985 on_fire: OnFire(false),
986 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
987 sprinting: Sprinting(false),
988 swimming: Swimming(false),
989 currently_glowing: CurrentlyGlowing(false),
990 invisible: Invisible(false),
991 fall_flying: FallFlying(false),
992 air_supply: AirSupply(Default::default()),
993 custom_name: CustomName(Default::default()),
994 custom_name_visible: CustomNameVisible(Default::default()),
995 silent: Silent(Default::default()),
996 no_gravity: NoGravity(Default::default()),
997 pose: Pose::default(),
998 ticks_frozen: TicksFrozen(Default::default()),
999 },
1000 value: Value(0),
1001 }
1002 }
1003}
1004
1005#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1007pub struct EyeOfEnderItemStack(pub ItemStack);
1008#[derive(Component)]
1029pub struct EyeOfEnder;
1030impl EyeOfEnder {
1031 pub fn apply_metadata(
1032 entity: &mut bevy_ecs::system::EntityCommands,
1033 d: EntityDataItem,
1034 ) -> Result<(), UpdateMetadataError> {
1035 match d.index {
1036 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1037 8 => {
1038 entity.insert(EyeOfEnderItemStack(d.value.into_item_stack()?));
1039 }
1040 _ => {}
1041 }
1042 Ok(())
1043 }
1044}
1045
1046#[derive(Bundle)]
1050pub struct EyeOfEnderMetadataBundle {
1051 _marker: EyeOfEnder,
1052 parent: AbstractEntityMetadataBundle,
1053 eye_of_ender_item_stack: EyeOfEnderItemStack,
1054}
1055impl Default for EyeOfEnderMetadataBundle {
1056 fn default() -> Self {
1057 Self {
1058 _marker: EyeOfEnder,
1059 parent: AbstractEntityMetadataBundle {
1060 _marker: AbstractEntity,
1061 on_fire: OnFire(false),
1062 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1063 sprinting: Sprinting(false),
1064 swimming: Swimming(false),
1065 currently_glowing: CurrentlyGlowing(false),
1066 invisible: Invisible(false),
1067 fall_flying: FallFlying(false),
1068 air_supply: AirSupply(Default::default()),
1069 custom_name: CustomName(Default::default()),
1070 custom_name_visible: CustomNameVisible(Default::default()),
1071 silent: Silent(Default::default()),
1072 no_gravity: NoGravity(Default::default()),
1073 pose: Pose::default(),
1074 ticks_frozen: TicksFrozen(Default::default()),
1075 },
1076 eye_of_ender_item_stack: EyeOfEnderItemStack(Default::default()),
1077 }
1078 }
1079}
1080
1081#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1083pub struct StartPos(pub BlockPos);
1084#[derive(Component)]
1105pub struct FallingBlock;
1106impl FallingBlock {
1107 pub fn apply_metadata(
1108 entity: &mut bevy_ecs::system::EntityCommands,
1109 d: EntityDataItem,
1110 ) -> Result<(), UpdateMetadataError> {
1111 match d.index {
1112 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1113 8 => {
1114 entity.insert(StartPos(d.value.into_block_pos()?));
1115 }
1116 _ => {}
1117 }
1118 Ok(())
1119 }
1120}
1121
1122#[derive(Bundle)]
1126pub struct FallingBlockMetadataBundle {
1127 _marker: FallingBlock,
1128 parent: AbstractEntityMetadataBundle,
1129 start_pos: StartPos,
1130}
1131impl Default for FallingBlockMetadataBundle {
1132 fn default() -> Self {
1133 Self {
1134 _marker: FallingBlock,
1135 parent: AbstractEntityMetadataBundle {
1136 _marker: AbstractEntity,
1137 on_fire: OnFire(false),
1138 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1139 sprinting: Sprinting(false),
1140 swimming: Swimming(false),
1141 currently_glowing: CurrentlyGlowing(false),
1142 invisible: Invisible(false),
1143 fall_flying: FallFlying(false),
1144 air_supply: AirSupply(Default::default()),
1145 custom_name: CustomName(Default::default()),
1146 custom_name_visible: CustomNameVisible(Default::default()),
1147 silent: Silent(Default::default()),
1148 no_gravity: NoGravity(Default::default()),
1149 pose: Pose::default(),
1150 ticks_frozen: TicksFrozen(Default::default()),
1151 },
1152 start_pos: StartPos(BlockPos::new(0, 0, 0)),
1153 }
1154 }
1155}
1156
1157#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1159pub struct FireballItemStack(pub ItemStack);
1160#[derive(Component)]
1181pub struct Fireball;
1182impl Fireball {
1183 pub fn apply_metadata(
1184 entity: &mut bevy_ecs::system::EntityCommands,
1185 d: EntityDataItem,
1186 ) -> Result<(), UpdateMetadataError> {
1187 match d.index {
1188 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1189 8 => {
1190 entity.insert(FireballItemStack(d.value.into_item_stack()?));
1191 }
1192 _ => {}
1193 }
1194 Ok(())
1195 }
1196}
1197
1198#[derive(Bundle)]
1202pub struct FireballMetadataBundle {
1203 _marker: Fireball,
1204 parent: AbstractEntityMetadataBundle,
1205 fireball_item_stack: FireballItemStack,
1206}
1207impl Default for FireballMetadataBundle {
1208 fn default() -> Self {
1209 Self {
1210 _marker: Fireball,
1211 parent: AbstractEntityMetadataBundle {
1212 _marker: AbstractEntity,
1213 on_fire: OnFire(false),
1214 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1215 sprinting: Sprinting(false),
1216 swimming: Swimming(false),
1217 currently_glowing: CurrentlyGlowing(false),
1218 invisible: Invisible(false),
1219 fall_flying: FallFlying(false),
1220 air_supply: AirSupply(Default::default()),
1221 custom_name: CustomName(Default::default()),
1222 custom_name_visible: CustomNameVisible(Default::default()),
1223 silent: Silent(Default::default()),
1224 no_gravity: NoGravity(Default::default()),
1225 pose: Pose::default(),
1226 ticks_frozen: TicksFrozen(Default::default()),
1227 },
1228 fireball_item_stack: FireballItemStack(Default::default()),
1229 }
1230 }
1231}
1232
1233#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1235pub struct FireworksItem(pub ItemStack);
1236#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1238pub struct AttachedToTarget(pub OptionalUnsignedInt);
1239#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1241pub struct ShotAtAngle(pub bool);
1242#[derive(Component)]
1265pub struct FireworkRocket;
1266impl FireworkRocket {
1267 pub fn apply_metadata(
1268 entity: &mut bevy_ecs::system::EntityCommands,
1269 d: EntityDataItem,
1270 ) -> Result<(), UpdateMetadataError> {
1271 match d.index {
1272 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1273 8 => {
1274 entity.insert(FireworksItem(d.value.into_item_stack()?));
1275 }
1276 9 => {
1277 entity.insert(AttachedToTarget(d.value.into_optional_unsigned_int()?));
1278 }
1279 10 => {
1280 entity.insert(ShotAtAngle(d.value.into_boolean()?));
1281 }
1282 _ => {}
1283 }
1284 Ok(())
1285 }
1286}
1287
1288#[derive(Bundle)]
1292pub struct FireworkRocketMetadataBundle {
1293 _marker: FireworkRocket,
1294 parent: AbstractEntityMetadataBundle,
1295 fireworks_item: FireworksItem,
1296 attached_to_target: AttachedToTarget,
1297 shot_at_angle: ShotAtAngle,
1298}
1299impl Default for FireworkRocketMetadataBundle {
1300 fn default() -> Self {
1301 Self {
1302 _marker: FireworkRocket,
1303 parent: AbstractEntityMetadataBundle {
1304 _marker: AbstractEntity,
1305 on_fire: OnFire(false),
1306 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1307 sprinting: Sprinting(false),
1308 swimming: Swimming(false),
1309 currently_glowing: CurrentlyGlowing(false),
1310 invisible: Invisible(false),
1311 fall_flying: FallFlying(false),
1312 air_supply: AirSupply(Default::default()),
1313 custom_name: CustomName(Default::default()),
1314 custom_name_visible: CustomNameVisible(Default::default()),
1315 silent: Silent(Default::default()),
1316 no_gravity: NoGravity(Default::default()),
1317 pose: Pose::default(),
1318 ticks_frozen: TicksFrozen(Default::default()),
1319 },
1320 fireworks_item: FireworksItem(Default::default()),
1321 attached_to_target: AttachedToTarget(OptionalUnsignedInt(None)),
1322 shot_at_angle: ShotAtAngle(false),
1323 }
1324 }
1325}
1326
1327#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1329pub struct HookedEntity(pub i32);
1330#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1332pub struct Biting(pub bool);
1333#[derive(Component)]
1355pub struct FishingBobber;
1356impl FishingBobber {
1357 pub fn apply_metadata(
1358 entity: &mut bevy_ecs::system::EntityCommands,
1359 d: EntityDataItem,
1360 ) -> Result<(), UpdateMetadataError> {
1361 match d.index {
1362 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1363 8 => {
1364 entity.insert(HookedEntity(d.value.into_int()?));
1365 }
1366 9 => {
1367 entity.insert(Biting(d.value.into_boolean()?));
1368 }
1369 _ => {}
1370 }
1371 Ok(())
1372 }
1373}
1374
1375#[derive(Bundle)]
1379pub struct FishingBobberMetadataBundle {
1380 _marker: FishingBobber,
1381 parent: AbstractEntityMetadataBundle,
1382 hooked_entity: HookedEntity,
1383 biting: Biting,
1384}
1385impl Default for FishingBobberMetadataBundle {
1386 fn default() -> Self {
1387 Self {
1388 _marker: FishingBobber,
1389 parent: AbstractEntityMetadataBundle {
1390 _marker: AbstractEntity,
1391 on_fire: OnFire(false),
1392 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1393 sprinting: Sprinting(false),
1394 swimming: Swimming(false),
1395 currently_glowing: CurrentlyGlowing(false),
1396 invisible: Invisible(false),
1397 fall_flying: FallFlying(false),
1398 air_supply: AirSupply(Default::default()),
1399 custom_name: CustomName(Default::default()),
1400 custom_name_visible: CustomNameVisible(Default::default()),
1401 silent: Silent(Default::default()),
1402 no_gravity: NoGravity(Default::default()),
1403 pose: Pose::default(),
1404 ticks_frozen: TicksFrozen(Default::default()),
1405 },
1406 hooked_entity: HookedEntity(0),
1407 biting: Biting(false),
1408 }
1409 }
1410}
1411
1412#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1414pub struct InteractionWidth(pub f32);
1415#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1417pub struct InteractionHeight(pub f32);
1418#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1420pub struct Response(pub bool);
1421#[derive(Component)]
1444pub struct Interaction;
1445impl Interaction {
1446 pub fn apply_metadata(
1447 entity: &mut bevy_ecs::system::EntityCommands,
1448 d: EntityDataItem,
1449 ) -> Result<(), UpdateMetadataError> {
1450 match d.index {
1451 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1452 8 => {
1453 entity.insert(InteractionWidth(d.value.into_float()?));
1454 }
1455 9 => {
1456 entity.insert(InteractionHeight(d.value.into_float()?));
1457 }
1458 10 => {
1459 entity.insert(Response(d.value.into_boolean()?));
1460 }
1461 _ => {}
1462 }
1463 Ok(())
1464 }
1465}
1466
1467#[derive(Bundle)]
1471pub struct InteractionMetadataBundle {
1472 _marker: Interaction,
1473 parent: AbstractEntityMetadataBundle,
1474 interaction_width: InteractionWidth,
1475 interaction_height: InteractionHeight,
1476 response: Response,
1477}
1478impl Default for InteractionMetadataBundle {
1479 fn default() -> Self {
1480 Self {
1481 _marker: Interaction,
1482 parent: AbstractEntityMetadataBundle {
1483 _marker: AbstractEntity,
1484 on_fire: OnFire(false),
1485 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1486 sprinting: Sprinting(false),
1487 swimming: Swimming(false),
1488 currently_glowing: CurrentlyGlowing(false),
1489 invisible: Invisible(false),
1490 fall_flying: FallFlying(false),
1491 air_supply: AirSupply(Default::default()),
1492 custom_name: CustomName(Default::default()),
1493 custom_name_visible: CustomNameVisible(Default::default()),
1494 silent: Silent(Default::default()),
1495 no_gravity: NoGravity(Default::default()),
1496 pose: Pose::default(),
1497 ticks_frozen: TicksFrozen(Default::default()),
1498 },
1499 interaction_width: InteractionWidth(1.0),
1500 interaction_height: InteractionHeight(1.0),
1501 response: Response(false),
1502 }
1503 }
1504}
1505
1506#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1508pub struct ItemItem(pub ItemStack);
1509#[derive(Component)]
1529pub struct Item;
1530impl Item {
1531 pub fn apply_metadata(
1532 entity: &mut bevy_ecs::system::EntityCommands,
1533 d: EntityDataItem,
1534 ) -> Result<(), UpdateMetadataError> {
1535 match d.index {
1536 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1537 8 => {
1538 entity.insert(ItemItem(d.value.into_item_stack()?));
1539 }
1540 _ => {}
1541 }
1542 Ok(())
1543 }
1544}
1545
1546#[derive(Bundle)]
1550pub struct ItemMetadataBundle {
1551 _marker: Item,
1552 parent: AbstractEntityMetadataBundle,
1553 item_item: ItemItem,
1554}
1555impl Default for ItemMetadataBundle {
1556 fn default() -> Self {
1557 Self {
1558 _marker: Item,
1559 parent: AbstractEntityMetadataBundle {
1560 _marker: AbstractEntity,
1561 on_fire: OnFire(false),
1562 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1563 sprinting: Sprinting(false),
1564 swimming: Swimming(false),
1565 currently_glowing: CurrentlyGlowing(false),
1566 invisible: Invisible(false),
1567 fall_flying: FallFlying(false),
1568 air_supply: AirSupply(Default::default()),
1569 custom_name: CustomName(Default::default()),
1570 custom_name_visible: CustomNameVisible(Default::default()),
1571 silent: Silent(Default::default()),
1572 no_gravity: NoGravity(Default::default()),
1573 pose: Pose::default(),
1574 ticks_frozen: TicksFrozen(Default::default()),
1575 },
1576 item_item: ItemItem(Default::default()),
1577 }
1578 }
1579}
1580
1581#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1583pub struct ItemFrameDirection(pub Direction);
1584#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1586pub struct ItemFrameItem(pub ItemStack);
1587#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
1589pub struct Rotation(pub i32);
1590#[derive(Component)]
1613pub struct ItemFrame;
1614impl ItemFrame {
1615 pub fn apply_metadata(
1616 entity: &mut bevy_ecs::system::EntityCommands,
1617 d: EntityDataItem,
1618 ) -> Result<(), UpdateMetadataError> {
1619 match d.index {
1620 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1621 8 => {
1622 entity.insert(ItemFrameDirection(d.value.into_direction()?));
1623 }
1624 9 => {
1625 entity.insert(ItemFrameItem(d.value.into_item_stack()?));
1626 }
1627 10 => {
1628 entity.insert(Rotation(d.value.into_int()?));
1629 }
1630 _ => {}
1631 }
1632 Ok(())
1633 }
1634}
1635
1636#[derive(Bundle)]
1640pub struct ItemFrameMetadataBundle {
1641 _marker: ItemFrame,
1642 parent: AbstractEntityMetadataBundle,
1643 item_frame_direction: ItemFrameDirection,
1644 item_frame_item: ItemFrameItem,
1645 rotation: Rotation,
1646}
1647impl Default for ItemFrameMetadataBundle {
1648 fn default() -> Self {
1649 Self {
1650 _marker: ItemFrame,
1651 parent: AbstractEntityMetadataBundle {
1652 _marker: AbstractEntity,
1653 on_fire: OnFire(false),
1654 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1655 sprinting: Sprinting(false),
1656 swimming: Swimming(false),
1657 currently_glowing: CurrentlyGlowing(false),
1658 invisible: Invisible(false),
1659 fall_flying: FallFlying(false),
1660 air_supply: AirSupply(Default::default()),
1661 custom_name: CustomName(Default::default()),
1662 custom_name_visible: CustomNameVisible(Default::default()),
1663 silent: Silent(Default::default()),
1664 no_gravity: NoGravity(Default::default()),
1665 pose: Pose::default(),
1666 ticks_frozen: TicksFrozen(Default::default()),
1667 },
1668 item_frame_direction: ItemFrameDirection(Default::default()),
1669 item_frame_item: ItemFrameItem(Default::default()),
1670 rotation: Rotation(0),
1671 }
1672 }
1673}
1674
1675#[derive(Component)]
1694pub struct GlowItemFrame;
1695impl GlowItemFrame {
1696 pub fn apply_metadata(
1697 entity: &mut bevy_ecs::system::EntityCommands,
1698 d: EntityDataItem,
1699 ) -> Result<(), UpdateMetadataError> {
1700 match d.index {
1701 0..=10 => ItemFrame::apply_metadata(entity, d)?,
1702 _ => {}
1703 }
1704 Ok(())
1705 }
1706}
1707
1708#[derive(Bundle)]
1712pub struct GlowItemFrameMetadataBundle {
1713 _marker: GlowItemFrame,
1714 parent: ItemFrameMetadataBundle,
1715}
1716impl Default for GlowItemFrameMetadataBundle {
1717 fn default() -> Self {
1718 Self {
1719 _marker: GlowItemFrame,
1720 parent: ItemFrameMetadataBundle {
1721 _marker: ItemFrame,
1722 parent: AbstractEntityMetadataBundle {
1723 _marker: AbstractEntity,
1724 on_fire: OnFire(false),
1725 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1726 sprinting: Sprinting(false),
1727 swimming: Swimming(false),
1728 currently_glowing: CurrentlyGlowing(false),
1729 invisible: Invisible(false),
1730 fall_flying: FallFlying(false),
1731 air_supply: AirSupply(Default::default()),
1732 custom_name: CustomName(Default::default()),
1733 custom_name_visible: CustomNameVisible(Default::default()),
1734 silent: Silent(Default::default()),
1735 no_gravity: NoGravity(Default::default()),
1736 pose: Pose::default(),
1737 ticks_frozen: TicksFrozen(Default::default()),
1738 },
1739 item_frame_direction: ItemFrameDirection(Default::default()),
1740 item_frame_item: ItemFrameItem(Default::default()),
1741 rotation: Rotation(0),
1742 },
1743 }
1744 }
1745}
1746
1747#[derive(Component)]
1765pub struct LeashKnot;
1766impl LeashKnot {
1767 pub fn apply_metadata(
1768 entity: &mut bevy_ecs::system::EntityCommands,
1769 d: EntityDataItem,
1770 ) -> Result<(), UpdateMetadataError> {
1771 match d.index {
1772 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1773 _ => {}
1774 }
1775 Ok(())
1776 }
1777}
1778
1779#[derive(Bundle)]
1783pub struct LeashKnotMetadataBundle {
1784 _marker: LeashKnot,
1785 parent: AbstractEntityMetadataBundle,
1786}
1787impl Default for LeashKnotMetadataBundle {
1788 fn default() -> Self {
1789 Self {
1790 _marker: LeashKnot,
1791 parent: AbstractEntityMetadataBundle {
1792 _marker: AbstractEntity,
1793 on_fire: OnFire(false),
1794 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1795 sprinting: Sprinting(false),
1796 swimming: Swimming(false),
1797 currently_glowing: CurrentlyGlowing(false),
1798 invisible: Invisible(false),
1799 fall_flying: FallFlying(false),
1800 air_supply: AirSupply(Default::default()),
1801 custom_name: CustomName(Default::default()),
1802 custom_name_visible: CustomNameVisible(Default::default()),
1803 silent: Silent(Default::default()),
1804 no_gravity: NoGravity(Default::default()),
1805 pose: Pose::default(),
1806 ticks_frozen: TicksFrozen(Default::default()),
1807 },
1808 }
1809 }
1810}
1811
1812#[derive(Component)]
1830pub struct LightningBolt;
1831impl LightningBolt {
1832 pub fn apply_metadata(
1833 entity: &mut bevy_ecs::system::EntityCommands,
1834 d: EntityDataItem,
1835 ) -> Result<(), UpdateMetadataError> {
1836 match d.index {
1837 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1838 _ => {}
1839 }
1840 Ok(())
1841 }
1842}
1843
1844#[derive(Bundle)]
1848pub struct LightningBoltMetadataBundle {
1849 _marker: LightningBolt,
1850 parent: AbstractEntityMetadataBundle,
1851}
1852impl Default for LightningBoltMetadataBundle {
1853 fn default() -> Self {
1854 Self {
1855 _marker: LightningBolt,
1856 parent: AbstractEntityMetadataBundle {
1857 _marker: AbstractEntity,
1858 on_fire: OnFire(false),
1859 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1860 sprinting: Sprinting(false),
1861 swimming: Swimming(false),
1862 currently_glowing: CurrentlyGlowing(false),
1863 invisible: Invisible(false),
1864 fall_flying: FallFlying(false),
1865 air_supply: AirSupply(Default::default()),
1866 custom_name: CustomName(Default::default()),
1867 custom_name_visible: CustomNameVisible(Default::default()),
1868 silent: Silent(Default::default()),
1869 no_gravity: NoGravity(Default::default()),
1870 pose: Pose::default(),
1871 ticks_frozen: TicksFrozen(Default::default()),
1872 },
1873 }
1874 }
1875}
1876
1877#[derive(Component)]
1895pub struct LlamaSpit;
1896impl LlamaSpit {
1897 pub fn apply_metadata(
1898 entity: &mut bevy_ecs::system::EntityCommands,
1899 d: EntityDataItem,
1900 ) -> Result<(), UpdateMetadataError> {
1901 match d.index {
1902 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1903 _ => {}
1904 }
1905 Ok(())
1906 }
1907}
1908
1909#[derive(Bundle)]
1913pub struct LlamaSpitMetadataBundle {
1914 _marker: LlamaSpit,
1915 parent: AbstractEntityMetadataBundle,
1916}
1917impl Default for LlamaSpitMetadataBundle {
1918 fn default() -> Self {
1919 Self {
1920 _marker: LlamaSpit,
1921 parent: AbstractEntityMetadataBundle {
1922 _marker: AbstractEntity,
1923 on_fire: OnFire(false),
1924 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1925 sprinting: Sprinting(false),
1926 swimming: Swimming(false),
1927 currently_glowing: CurrentlyGlowing(false),
1928 invisible: Invisible(false),
1929 fall_flying: FallFlying(false),
1930 air_supply: AirSupply(Default::default()),
1931 custom_name: CustomName(Default::default()),
1932 custom_name_visible: CustomNameVisible(Default::default()),
1933 silent: Silent(Default::default()),
1934 no_gravity: NoGravity(Default::default()),
1935 pose: Pose::default(),
1936 ticks_frozen: TicksFrozen(Default::default()),
1937 },
1938 }
1939 }
1940}
1941
1942#[derive(Component)]
1960pub struct Marker;
1961impl Marker {
1962 pub fn apply_metadata(
1963 entity: &mut bevy_ecs::system::EntityCommands,
1964 d: EntityDataItem,
1965 ) -> Result<(), UpdateMetadataError> {
1966 match d.index {
1967 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
1968 _ => {}
1969 }
1970 Ok(())
1971 }
1972}
1973
1974#[derive(Bundle)]
1978pub struct MarkerMetadataBundle {
1979 _marker: Marker,
1980 parent: AbstractEntityMetadataBundle,
1981}
1982impl Default for MarkerMetadataBundle {
1983 fn default() -> Self {
1984 Self {
1985 _marker: Marker,
1986 parent: AbstractEntityMetadataBundle {
1987 _marker: AbstractEntity,
1988 on_fire: OnFire(false),
1989 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
1990 sprinting: Sprinting(false),
1991 swimming: Swimming(false),
1992 currently_glowing: CurrentlyGlowing(false),
1993 invisible: Invisible(false),
1994 fall_flying: FallFlying(false),
1995 air_supply: AirSupply(Default::default()),
1996 custom_name: CustomName(Default::default()),
1997 custom_name_visible: CustomNameVisible(Default::default()),
1998 silent: Silent(Default::default()),
1999 no_gravity: NoGravity(Default::default()),
2000 pose: Pose::default(),
2001 ticks_frozen: TicksFrozen(Default::default()),
2002 },
2003 }
2004 }
2005}
2006
2007#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2009pub struct OminousItemSpawnerItem(pub ItemStack);
2010#[derive(Component)]
2031pub struct OminousItemSpawner;
2032impl OminousItemSpawner {
2033 pub fn apply_metadata(
2034 entity: &mut bevy_ecs::system::EntityCommands,
2035 d: EntityDataItem,
2036 ) -> Result<(), UpdateMetadataError> {
2037 match d.index {
2038 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2039 8 => {
2040 entity.insert(OminousItemSpawnerItem(d.value.into_item_stack()?));
2041 }
2042 _ => {}
2043 }
2044 Ok(())
2045 }
2046}
2047
2048#[derive(Bundle)]
2052pub struct OminousItemSpawnerMetadataBundle {
2053 _marker: OminousItemSpawner,
2054 parent: AbstractEntityMetadataBundle,
2055 ominous_item_spawner_item: OminousItemSpawnerItem,
2056}
2057impl Default for OminousItemSpawnerMetadataBundle {
2058 fn default() -> Self {
2059 Self {
2060 _marker: OminousItemSpawner,
2061 parent: AbstractEntityMetadataBundle {
2062 _marker: AbstractEntity,
2063 on_fire: OnFire(false),
2064 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2065 sprinting: Sprinting(false),
2066 swimming: Swimming(false),
2067 currently_glowing: CurrentlyGlowing(false),
2068 invisible: Invisible(false),
2069 fall_flying: FallFlying(false),
2070 air_supply: AirSupply(Default::default()),
2071 custom_name: CustomName(Default::default()),
2072 custom_name_visible: CustomNameVisible(Default::default()),
2073 silent: Silent(Default::default()),
2074 no_gravity: NoGravity(Default::default()),
2075 pose: Pose::default(),
2076 ticks_frozen: TicksFrozen(Default::default()),
2077 },
2078 ominous_item_spawner_item: OminousItemSpawnerItem(Default::default()),
2079 }
2080 }
2081}
2082
2083#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2085pub struct PaintingDirection(pub Direction);
2086#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2088pub struct PaintingVariant(pub azalea_registry::data::PaintingVariant);
2089#[derive(Component)]
2111pub struct Painting;
2112impl Painting {
2113 pub fn apply_metadata(
2114 entity: &mut bevy_ecs::system::EntityCommands,
2115 d: EntityDataItem,
2116 ) -> Result<(), UpdateMetadataError> {
2117 match d.index {
2118 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2119 8 => {
2120 entity.insert(PaintingDirection(d.value.into_direction()?));
2121 }
2122 9 => {
2123 entity.insert(PaintingVariant(d.value.into_painting_variant()?));
2124 }
2125 _ => {}
2126 }
2127 Ok(())
2128 }
2129}
2130
2131#[derive(Bundle)]
2135pub struct PaintingMetadataBundle {
2136 _marker: Painting,
2137 parent: AbstractEntityMetadataBundle,
2138 painting_direction: PaintingDirection,
2139 painting_variant: PaintingVariant,
2140}
2141impl Default for PaintingMetadataBundle {
2142 fn default() -> Self {
2143 Self {
2144 _marker: Painting,
2145 parent: AbstractEntityMetadataBundle {
2146 _marker: AbstractEntity,
2147 on_fire: OnFire(false),
2148 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2149 sprinting: Sprinting(false),
2150 swimming: Swimming(false),
2151 currently_glowing: CurrentlyGlowing(false),
2152 invisible: Invisible(false),
2153 fall_flying: FallFlying(false),
2154 air_supply: AirSupply(Default::default()),
2155 custom_name: CustomName(Default::default()),
2156 custom_name_visible: CustomNameVisible(Default::default()),
2157 silent: Silent(Default::default()),
2158 no_gravity: NoGravity(Default::default()),
2159 pose: Pose::default(),
2160 ticks_frozen: TicksFrozen(Default::default()),
2161 },
2162 painting_direction: PaintingDirection(Default::default()),
2163 painting_variant: PaintingVariant(azalea_registry::data::PaintingVariant::new_raw(0)),
2164 }
2165 }
2166}
2167
2168#[derive(Component)]
2186pub struct ShulkerBullet;
2187impl ShulkerBullet {
2188 pub fn apply_metadata(
2189 entity: &mut bevy_ecs::system::EntityCommands,
2190 d: EntityDataItem,
2191 ) -> Result<(), UpdateMetadataError> {
2192 match d.index {
2193 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2194 _ => {}
2195 }
2196 Ok(())
2197 }
2198}
2199
2200#[derive(Bundle)]
2204pub struct ShulkerBulletMetadataBundle {
2205 _marker: ShulkerBullet,
2206 parent: AbstractEntityMetadataBundle,
2207}
2208impl Default for ShulkerBulletMetadataBundle {
2209 fn default() -> Self {
2210 Self {
2211 _marker: ShulkerBullet,
2212 parent: AbstractEntityMetadataBundle {
2213 _marker: AbstractEntity,
2214 on_fire: OnFire(false),
2215 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2216 sprinting: Sprinting(false),
2217 swimming: Swimming(false),
2218 currently_glowing: CurrentlyGlowing(false),
2219 invisible: Invisible(false),
2220 fall_flying: FallFlying(false),
2221 air_supply: AirSupply(Default::default()),
2222 custom_name: CustomName(Default::default()),
2223 custom_name_visible: CustomNameVisible(Default::default()),
2224 silent: Silent(Default::default()),
2225 no_gravity: NoGravity(Default::default()),
2226 pose: Pose::default(),
2227 ticks_frozen: TicksFrozen(Default::default()),
2228 },
2229 }
2230 }
2231}
2232
2233#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2235pub struct SmallFireballItemStack(pub ItemStack);
2236#[derive(Component)]
2257pub struct SmallFireball;
2258impl SmallFireball {
2259 pub fn apply_metadata(
2260 entity: &mut bevy_ecs::system::EntityCommands,
2261 d: EntityDataItem,
2262 ) -> Result<(), UpdateMetadataError> {
2263 match d.index {
2264 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2265 8 => {
2266 entity.insert(SmallFireballItemStack(d.value.into_item_stack()?));
2267 }
2268 _ => {}
2269 }
2270 Ok(())
2271 }
2272}
2273
2274#[derive(Bundle)]
2278pub struct SmallFireballMetadataBundle {
2279 _marker: SmallFireball,
2280 parent: AbstractEntityMetadataBundle,
2281 small_fireball_item_stack: SmallFireballItemStack,
2282}
2283impl Default for SmallFireballMetadataBundle {
2284 fn default() -> Self {
2285 Self {
2286 _marker: SmallFireball,
2287 parent: AbstractEntityMetadataBundle {
2288 _marker: AbstractEntity,
2289 on_fire: OnFire(false),
2290 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2291 sprinting: Sprinting(false),
2292 swimming: Swimming(false),
2293 currently_glowing: CurrentlyGlowing(false),
2294 invisible: Invisible(false),
2295 fall_flying: FallFlying(false),
2296 air_supply: AirSupply(Default::default()),
2297 custom_name: CustomName(Default::default()),
2298 custom_name_visible: CustomNameVisible(Default::default()),
2299 silent: Silent(Default::default()),
2300 no_gravity: NoGravity(Default::default()),
2301 pose: Pose::default(),
2302 ticks_frozen: TicksFrozen(Default::default()),
2303 },
2304 small_fireball_item_stack: SmallFireballItemStack(Default::default()),
2305 }
2306 }
2307}
2308
2309#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2311pub struct Fuse(pub i32);
2312#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2314pub struct TntBlockState(pub azalea_block::BlockState);
2315#[derive(Component)]
2336pub struct Tnt;
2337impl Tnt {
2338 pub fn apply_metadata(
2339 entity: &mut bevy_ecs::system::EntityCommands,
2340 d: EntityDataItem,
2341 ) -> Result<(), UpdateMetadataError> {
2342 match d.index {
2343 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2344 8 => {
2345 entity.insert(Fuse(d.value.into_int()?));
2346 }
2347 9 => {
2348 entity.insert(TntBlockState(d.value.into_block_state()?));
2349 }
2350 _ => {}
2351 }
2352 Ok(())
2353 }
2354}
2355
2356#[derive(Bundle)]
2360pub struct TntMetadataBundle {
2361 _marker: Tnt,
2362 parent: AbstractEntityMetadataBundle,
2363 fuse: Fuse,
2364 tnt_block_state: TntBlockState,
2365}
2366impl Default for TntMetadataBundle {
2367 fn default() -> Self {
2368 Self {
2369 _marker: Tnt,
2370 parent: AbstractEntityMetadataBundle {
2371 _marker: AbstractEntity,
2372 on_fire: OnFire(false),
2373 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2374 sprinting: Sprinting(false),
2375 swimming: Swimming(false),
2376 currently_glowing: CurrentlyGlowing(false),
2377 invisible: Invisible(false),
2378 fall_flying: FallFlying(false),
2379 air_supply: AirSupply(Default::default()),
2380 custom_name: CustomName(Default::default()),
2381 custom_name_visible: CustomNameVisible(Default::default()),
2382 silent: Silent(Default::default()),
2383 no_gravity: NoGravity(Default::default()),
2384 pose: Pose::default(),
2385 ticks_frozen: TicksFrozen(Default::default()),
2386 },
2387 fuse: Fuse(80),
2388 tnt_block_state: TntBlockState(Default::default()),
2389 }
2390 }
2391}
2392
2393#[derive(Component)]
2411pub struct WindCharge;
2412impl WindCharge {
2413 pub fn apply_metadata(
2414 entity: &mut bevy_ecs::system::EntityCommands,
2415 d: EntityDataItem,
2416 ) -> Result<(), UpdateMetadataError> {
2417 match d.index {
2418 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2419 _ => {}
2420 }
2421 Ok(())
2422 }
2423}
2424
2425#[derive(Bundle)]
2429pub struct WindChargeMetadataBundle {
2430 _marker: WindCharge,
2431 parent: AbstractEntityMetadataBundle,
2432}
2433impl Default for WindChargeMetadataBundle {
2434 fn default() -> Self {
2435 Self {
2436 _marker: WindCharge,
2437 parent: AbstractEntityMetadataBundle {
2438 _marker: AbstractEntity,
2439 on_fire: OnFire(false),
2440 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2441 sprinting: Sprinting(false),
2442 swimming: Swimming(false),
2443 currently_glowing: CurrentlyGlowing(false),
2444 invisible: Invisible(false),
2445 fall_flying: FallFlying(false),
2446 air_supply: AirSupply(Default::default()),
2447 custom_name: CustomName(Default::default()),
2448 custom_name_visible: CustomNameVisible(Default::default()),
2449 silent: Silent(Default::default()),
2450 no_gravity: NoGravity(Default::default()),
2451 pose: Pose::default(),
2452 ticks_frozen: TicksFrozen(Default::default()),
2453 },
2454 }
2455 }
2456}
2457
2458#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2460pub struct Dangerous(pub bool);
2461#[derive(Component)]
2482pub struct WitherSkull;
2483impl WitherSkull {
2484 pub fn apply_metadata(
2485 entity: &mut bevy_ecs::system::EntityCommands,
2486 d: EntityDataItem,
2487 ) -> Result<(), UpdateMetadataError> {
2488 match d.index {
2489 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2490 8 => {
2491 entity.insert(Dangerous(d.value.into_boolean()?));
2492 }
2493 _ => {}
2494 }
2495 Ok(())
2496 }
2497}
2498
2499#[derive(Bundle)]
2503pub struct WitherSkullMetadataBundle {
2504 _marker: WitherSkull,
2505 parent: AbstractEntityMetadataBundle,
2506 dangerous: Dangerous,
2507}
2508impl Default for WitherSkullMetadataBundle {
2509 fn default() -> Self {
2510 Self {
2511 _marker: WitherSkull,
2512 parent: AbstractEntityMetadataBundle {
2513 _marker: AbstractEntity,
2514 on_fire: OnFire(false),
2515 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2516 sprinting: Sprinting(false),
2517 swimming: Swimming(false),
2518 currently_glowing: CurrentlyGlowing(false),
2519 invisible: Invisible(false),
2520 fall_flying: FallFlying(false),
2521 air_supply: AirSupply(Default::default()),
2522 custom_name: CustomName(Default::default()),
2523 custom_name_visible: CustomNameVisible(Default::default()),
2524 silent: Silent(Default::default()),
2525 no_gravity: NoGravity(Default::default()),
2526 pose: Pose::default(),
2527 ticks_frozen: TicksFrozen(Default::default()),
2528 },
2529 dangerous: Dangerous(false),
2530 }
2531 }
2532}
2533
2534#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2535pub struct CritArrow(pub bool);
2537#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
2538pub struct NoPhysics(pub bool);
2540#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2542pub struct PierceLevel(pub u8);
2543#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2545pub struct InGround(pub bool);
2546#[derive(Component)]
2572pub struct AbstractArrow;
2573impl AbstractArrow {
2574 pub fn apply_metadata(
2575 entity: &mut bevy_ecs::system::EntityCommands,
2576 d: EntityDataItem,
2577 ) -> Result<(), UpdateMetadataError> {
2578 match d.index {
2579 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2580 8 => {
2581 let bitfield = d.value.into_byte()?;
2582 entity.insert(CritArrow(bitfield & 0x1 != 0));
2583 entity.insert(NoPhysics(bitfield & 0x2 != 0));
2584 }
2585 9 => {
2586 entity.insert(PierceLevel(d.value.into_byte()?));
2587 }
2588 10 => {
2589 entity.insert(InGround(d.value.into_boolean()?));
2590 }
2591 _ => {}
2592 }
2593 Ok(())
2594 }
2595}
2596
2597#[derive(Bundle)]
2601pub struct AbstractArrowMetadataBundle {
2602 _marker: AbstractArrow,
2603 parent: AbstractEntityMetadataBundle,
2604 crit_arrow: CritArrow,
2605 no_physics: NoPhysics,
2606 pierce_level: PierceLevel,
2607 in_ground: InGround,
2608}
2609impl Default for AbstractArrowMetadataBundle {
2610 fn default() -> Self {
2611 Self {
2612 _marker: AbstractArrow,
2613 parent: AbstractEntityMetadataBundle {
2614 _marker: AbstractEntity,
2615 on_fire: OnFire(false),
2616 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2617 sprinting: Sprinting(false),
2618 swimming: Swimming(false),
2619 currently_glowing: CurrentlyGlowing(false),
2620 invisible: Invisible(false),
2621 fall_flying: FallFlying(false),
2622 air_supply: AirSupply(Default::default()),
2623 custom_name: CustomName(Default::default()),
2624 custom_name_visible: CustomNameVisible(Default::default()),
2625 silent: Silent(Default::default()),
2626 no_gravity: NoGravity(Default::default()),
2627 pose: Pose::default(),
2628 ticks_frozen: TicksFrozen(Default::default()),
2629 },
2630 crit_arrow: CritArrow(false),
2631 no_physics: NoPhysics(false),
2632 pierce_level: PierceLevel(0),
2633 in_ground: InGround(false),
2634 }
2635 }
2636}
2637
2638#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2640pub struct EffectColor(pub i32);
2641#[derive(Component)]
2662pub struct Arrow;
2663impl Arrow {
2664 pub fn apply_metadata(
2665 entity: &mut bevy_ecs::system::EntityCommands,
2666 d: EntityDataItem,
2667 ) -> Result<(), UpdateMetadataError> {
2668 match d.index {
2669 0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2670 11 => {
2671 entity.insert(EffectColor(d.value.into_int()?));
2672 }
2673 _ => {}
2674 }
2675 Ok(())
2676 }
2677}
2678
2679#[derive(Bundle)]
2683pub struct ArrowMetadataBundle {
2684 _marker: Arrow,
2685 parent: AbstractArrowMetadataBundle,
2686 effect_color: EffectColor,
2687}
2688impl Default for ArrowMetadataBundle {
2689 fn default() -> Self {
2690 Self {
2691 _marker: Arrow,
2692 parent: AbstractArrowMetadataBundle {
2693 _marker: AbstractArrow,
2694 parent: AbstractEntityMetadataBundle {
2695 _marker: AbstractEntity,
2696 on_fire: OnFire(false),
2697 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2698 sprinting: Sprinting(false),
2699 swimming: Swimming(false),
2700 currently_glowing: CurrentlyGlowing(false),
2701 invisible: Invisible(false),
2702 fall_flying: FallFlying(false),
2703 air_supply: AirSupply(Default::default()),
2704 custom_name: CustomName(Default::default()),
2705 custom_name_visible: CustomNameVisible(Default::default()),
2706 silent: Silent(Default::default()),
2707 no_gravity: NoGravity(Default::default()),
2708 pose: Pose::default(),
2709 ticks_frozen: TicksFrozen(Default::default()),
2710 },
2711 crit_arrow: CritArrow(false),
2712 no_physics: NoPhysics(false),
2713 pierce_level: PierceLevel(0),
2714 in_ground: InGround(false),
2715 },
2716 effect_color: EffectColor(-1),
2717 }
2718 }
2719}
2720
2721#[derive(Component)]
2740pub struct SpectralArrow;
2741impl SpectralArrow {
2742 pub fn apply_metadata(
2743 entity: &mut bevy_ecs::system::EntityCommands,
2744 d: EntityDataItem,
2745 ) -> Result<(), UpdateMetadataError> {
2746 match d.index {
2747 0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2748 _ => {}
2749 }
2750 Ok(())
2751 }
2752}
2753
2754#[derive(Bundle)]
2758pub struct SpectralArrowMetadataBundle {
2759 _marker: SpectralArrow,
2760 parent: AbstractArrowMetadataBundle,
2761}
2762impl Default for SpectralArrowMetadataBundle {
2763 fn default() -> Self {
2764 Self {
2765 _marker: SpectralArrow,
2766 parent: AbstractArrowMetadataBundle {
2767 _marker: AbstractArrow,
2768 parent: AbstractEntityMetadataBundle {
2769 _marker: AbstractEntity,
2770 on_fire: OnFire(false),
2771 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2772 sprinting: Sprinting(false),
2773 swimming: Swimming(false),
2774 currently_glowing: CurrentlyGlowing(false),
2775 invisible: Invisible(false),
2776 fall_flying: FallFlying(false),
2777 air_supply: AirSupply(Default::default()),
2778 custom_name: CustomName(Default::default()),
2779 custom_name_visible: CustomNameVisible(Default::default()),
2780 silent: Silent(Default::default()),
2781 no_gravity: NoGravity(Default::default()),
2782 pose: Pose::default(),
2783 ticks_frozen: TicksFrozen(Default::default()),
2784 },
2785 crit_arrow: CritArrow(false),
2786 no_physics: NoPhysics(false),
2787 pierce_level: PierceLevel(0),
2788 in_ground: InGround(false),
2789 },
2790 }
2791 }
2792}
2793
2794#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2796pub struct Loyalty(pub u8);
2797#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2799pub struct Foil(pub bool);
2800#[derive(Component)]
2822pub struct Trident;
2823impl Trident {
2824 pub fn apply_metadata(
2825 entity: &mut bevy_ecs::system::EntityCommands,
2826 d: EntityDataItem,
2827 ) -> Result<(), UpdateMetadataError> {
2828 match d.index {
2829 0..=10 => AbstractArrow::apply_metadata(entity, d)?,
2830 11 => {
2831 entity.insert(Loyalty(d.value.into_byte()?));
2832 }
2833 12 => {
2834 entity.insert(Foil(d.value.into_boolean()?));
2835 }
2836 _ => {}
2837 }
2838 Ok(())
2839 }
2840}
2841
2842#[derive(Bundle)]
2846pub struct TridentMetadataBundle {
2847 _marker: Trident,
2848 parent: AbstractArrowMetadataBundle,
2849 loyalty: Loyalty,
2850 foil: Foil,
2851}
2852impl Default for TridentMetadataBundle {
2853 fn default() -> Self {
2854 Self {
2855 _marker: Trident,
2856 parent: AbstractArrowMetadataBundle {
2857 _marker: AbstractArrow,
2858 parent: AbstractEntityMetadataBundle {
2859 _marker: AbstractEntity,
2860 on_fire: OnFire(false),
2861 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
2862 sprinting: Sprinting(false),
2863 swimming: Swimming(false),
2864 currently_glowing: CurrentlyGlowing(false),
2865 invisible: Invisible(false),
2866 fall_flying: FallFlying(false),
2867 air_supply: AirSupply(Default::default()),
2868 custom_name: CustomName(Default::default()),
2869 custom_name_visible: CustomNameVisible(Default::default()),
2870 silent: Silent(Default::default()),
2871 no_gravity: NoGravity(Default::default()),
2872 pose: Pose::default(),
2873 ticks_frozen: TicksFrozen(Default::default()),
2874 },
2875 crit_arrow: CritArrow(false),
2876 no_physics: NoPhysics(false),
2877 pierce_level: PierceLevel(0),
2878 in_ground: InGround(false),
2879 },
2880 loyalty: Loyalty(0),
2881 foil: Foil(false),
2882 }
2883 }
2884}
2885
2886#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2888pub struct TransformationInterpolationStartDeltaTicks(pub i32);
2889#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2891pub struct TransformationInterpolationDuration(pub i32);
2892#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2894pub struct PosRotInterpolationDuration(pub i32);
2895#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2897pub struct Translation(pub Vec3f32);
2898#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2900pub struct Scale(pub Vec3f32);
2901#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2903pub struct LeftRotation(pub Quaternion);
2904#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2906pub struct RightRotation(pub Quaternion);
2907#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2909pub struct BillboardRenderConstraints(pub u8);
2910#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2912pub struct BrightnessOverride(pub i32);
2913#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2915pub struct ViewRange(pub f32);
2916#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2918pub struct ShadowRadius(pub f32);
2919#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2921pub struct ShadowStrength(pub f32);
2922#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2924pub struct AbstractDisplayWidth(pub f32);
2925#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2927pub struct AbstractDisplayHeight(pub f32);
2928#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
2930pub struct GlowColorOverride(pub i32);
2931#[derive(Component)]
2968pub struct AbstractDisplay;
2969impl AbstractDisplay {
2970 pub fn apply_metadata(
2971 entity: &mut bevy_ecs::system::EntityCommands,
2972 d: EntityDataItem,
2973 ) -> Result<(), UpdateMetadataError> {
2974 match d.index {
2975 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
2976 8 => {
2977 entity.insert(TransformationInterpolationStartDeltaTicks(
2978 d.value.into_int()?,
2979 ));
2980 }
2981 9 => {
2982 entity.insert(TransformationInterpolationDuration(d.value.into_int()?));
2983 }
2984 10 => {
2985 entity.insert(PosRotInterpolationDuration(d.value.into_int()?));
2986 }
2987 11 => {
2988 entity.insert(Translation(d.value.into_vector3()?));
2989 }
2990 12 => {
2991 entity.insert(Scale(d.value.into_vector3()?));
2992 }
2993 13 => {
2994 entity.insert(LeftRotation(d.value.into_quaternion()?));
2995 }
2996 14 => {
2997 entity.insert(RightRotation(d.value.into_quaternion()?));
2998 }
2999 15 => {
3000 entity.insert(BillboardRenderConstraints(d.value.into_byte()?));
3001 }
3002 16 => {
3003 entity.insert(BrightnessOverride(d.value.into_int()?));
3004 }
3005 17 => {
3006 entity.insert(ViewRange(d.value.into_float()?));
3007 }
3008 18 => {
3009 entity.insert(ShadowRadius(d.value.into_float()?));
3010 }
3011 19 => {
3012 entity.insert(ShadowStrength(d.value.into_float()?));
3013 }
3014 20 => {
3015 entity.insert(AbstractDisplayWidth(d.value.into_float()?));
3016 }
3017 21 => {
3018 entity.insert(AbstractDisplayHeight(d.value.into_float()?));
3019 }
3020 22 => {
3021 entity.insert(GlowColorOverride(d.value.into_int()?));
3022 }
3023 _ => {}
3024 }
3025 Ok(())
3026 }
3027}
3028
3029#[derive(Bundle)]
3033pub struct AbstractDisplayMetadataBundle {
3034 _marker: AbstractDisplay,
3035 parent: AbstractEntityMetadataBundle,
3036 transformation_interpolation_start_delta_ticks: TransformationInterpolationStartDeltaTicks,
3037 transformation_interpolation_duration: TransformationInterpolationDuration,
3038 pos_rot_interpolation_duration: PosRotInterpolationDuration,
3039 translation: Translation,
3040 scale: Scale,
3041 left_rotation: LeftRotation,
3042 right_rotation: RightRotation,
3043 billboard_render_constraints: BillboardRenderConstraints,
3044 brightness_override: BrightnessOverride,
3045 view_range: ViewRange,
3046 shadow_radius: ShadowRadius,
3047 shadow_strength: ShadowStrength,
3048 abstract_display_width: AbstractDisplayWidth,
3049 abstract_display_height: AbstractDisplayHeight,
3050 glow_color_override: GlowColorOverride,
3051}
3052impl Default for AbstractDisplayMetadataBundle {
3053 fn default() -> Self {
3054 Self {
3055 _marker: AbstractDisplay,
3056 parent: AbstractEntityMetadataBundle {
3057 _marker: AbstractEntity,
3058 on_fire: OnFire(false),
3059 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3060 sprinting: Sprinting(false),
3061 swimming: Swimming(false),
3062 currently_glowing: CurrentlyGlowing(false),
3063 invisible: Invisible(false),
3064 fall_flying: FallFlying(false),
3065 air_supply: AirSupply(Default::default()),
3066 custom_name: CustomName(Default::default()),
3067 custom_name_visible: CustomNameVisible(Default::default()),
3068 silent: Silent(Default::default()),
3069 no_gravity: NoGravity(Default::default()),
3070 pose: Pose::default(),
3071 ticks_frozen: TicksFrozen(Default::default()),
3072 },
3073 transformation_interpolation_start_delta_ticks:
3074 TransformationInterpolationStartDeltaTicks(0),
3075 transformation_interpolation_duration: TransformationInterpolationDuration(0),
3076 pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
3077 translation: Translation(Vec3f32 {
3078 x: 0.0,
3079 y: 0.0,
3080 z: 0.0,
3081 }),
3082 scale: Scale(Vec3f32 {
3083 x: 1.0,
3084 y: 1.0,
3085 z: 1.0,
3086 }),
3087 left_rotation: LeftRotation(Quaternion {
3088 x: 0.0,
3089 y: 0.0,
3090 z: 0.0,
3091 w: 1.0,
3092 }),
3093 right_rotation: RightRotation(Quaternion {
3094 x: 0.0,
3095 y: 0.0,
3096 z: 0.0,
3097 w: 1.0,
3098 }),
3099 billboard_render_constraints: BillboardRenderConstraints(Default::default()),
3100 brightness_override: BrightnessOverride(-1),
3101 view_range: ViewRange(1.0),
3102 shadow_radius: ShadowRadius(0.0),
3103 shadow_strength: ShadowStrength(1.0),
3104 abstract_display_width: AbstractDisplayWidth(0.0),
3105 abstract_display_height: AbstractDisplayHeight(0.0),
3106 glow_color_override: GlowColorOverride(-1),
3107 }
3108 }
3109}
3110
3111#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3113pub struct BlockDisplayBlockState(pub azalea_block::BlockState);
3114#[derive(Component)]
3136pub struct BlockDisplay;
3137impl BlockDisplay {
3138 pub fn apply_metadata(
3139 entity: &mut bevy_ecs::system::EntityCommands,
3140 d: EntityDataItem,
3141 ) -> Result<(), UpdateMetadataError> {
3142 match d.index {
3143 0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
3144 23 => {
3145 entity.insert(BlockDisplayBlockState(d.value.into_block_state()?));
3146 }
3147 _ => {}
3148 }
3149 Ok(())
3150 }
3151}
3152
3153#[derive(Bundle)]
3157pub struct BlockDisplayMetadataBundle {
3158 _marker: BlockDisplay,
3159 parent: AbstractDisplayMetadataBundle,
3160 block_display_block_state: BlockDisplayBlockState,
3161}
3162impl Default for BlockDisplayMetadataBundle {
3163 fn default() -> Self {
3164 Self {
3165 _marker: BlockDisplay,
3166 parent: AbstractDisplayMetadataBundle {
3167 _marker: AbstractDisplay,
3168 parent: AbstractEntityMetadataBundle {
3169 _marker: AbstractEntity,
3170 on_fire: OnFire(false),
3171 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3172 sprinting: Sprinting(false),
3173 swimming: Swimming(false),
3174 currently_glowing: CurrentlyGlowing(false),
3175 invisible: Invisible(false),
3176 fall_flying: FallFlying(false),
3177 air_supply: AirSupply(Default::default()),
3178 custom_name: CustomName(Default::default()),
3179 custom_name_visible: CustomNameVisible(Default::default()),
3180 silent: Silent(Default::default()),
3181 no_gravity: NoGravity(Default::default()),
3182 pose: Pose::default(),
3183 ticks_frozen: TicksFrozen(Default::default()),
3184 },
3185 transformation_interpolation_start_delta_ticks:
3186 TransformationInterpolationStartDeltaTicks(0),
3187 transformation_interpolation_duration: TransformationInterpolationDuration(0),
3188 pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
3189 translation: Translation(Vec3f32 {
3190 x: 0.0,
3191 y: 0.0,
3192 z: 0.0,
3193 }),
3194 scale: Scale(Vec3f32 {
3195 x: 1.0,
3196 y: 1.0,
3197 z: 1.0,
3198 }),
3199 left_rotation: LeftRotation(Quaternion {
3200 x: 0.0,
3201 y: 0.0,
3202 z: 0.0,
3203 w: 1.0,
3204 }),
3205 right_rotation: RightRotation(Quaternion {
3206 x: 0.0,
3207 y: 0.0,
3208 z: 0.0,
3209 w: 1.0,
3210 }),
3211 billboard_render_constraints: BillboardRenderConstraints(Default::default()),
3212 brightness_override: BrightnessOverride(-1),
3213 view_range: ViewRange(1.0),
3214 shadow_radius: ShadowRadius(0.0),
3215 shadow_strength: ShadowStrength(1.0),
3216 abstract_display_width: AbstractDisplayWidth(0.0),
3217 abstract_display_height: AbstractDisplayHeight(0.0),
3218 glow_color_override: GlowColorOverride(-1),
3219 },
3220 block_display_block_state: BlockDisplayBlockState(Default::default()),
3221 }
3222 }
3223}
3224
3225#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3227pub struct ItemDisplayItemStack(pub ItemStack);
3228#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3230pub struct ItemDisplayItemDisplay(pub u8);
3231#[derive(Component)]
3254pub struct ItemDisplay;
3255impl ItemDisplay {
3256 pub fn apply_metadata(
3257 entity: &mut bevy_ecs::system::EntityCommands,
3258 d: EntityDataItem,
3259 ) -> Result<(), UpdateMetadataError> {
3260 match d.index {
3261 0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
3262 23 => {
3263 entity.insert(ItemDisplayItemStack(d.value.into_item_stack()?));
3264 }
3265 24 => {
3266 entity.insert(ItemDisplayItemDisplay(d.value.into_byte()?));
3267 }
3268 _ => {}
3269 }
3270 Ok(())
3271 }
3272}
3273
3274#[derive(Bundle)]
3278pub struct ItemDisplayMetadataBundle {
3279 _marker: ItemDisplay,
3280 parent: AbstractDisplayMetadataBundle,
3281 item_display_item_stack: ItemDisplayItemStack,
3282 item_display_item_display: ItemDisplayItemDisplay,
3283}
3284impl Default for ItemDisplayMetadataBundle {
3285 fn default() -> Self {
3286 Self {
3287 _marker: ItemDisplay,
3288 parent: AbstractDisplayMetadataBundle {
3289 _marker: AbstractDisplay,
3290 parent: AbstractEntityMetadataBundle {
3291 _marker: AbstractEntity,
3292 on_fire: OnFire(false),
3293 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3294 sprinting: Sprinting(false),
3295 swimming: Swimming(false),
3296 currently_glowing: CurrentlyGlowing(false),
3297 invisible: Invisible(false),
3298 fall_flying: FallFlying(false),
3299 air_supply: AirSupply(Default::default()),
3300 custom_name: CustomName(Default::default()),
3301 custom_name_visible: CustomNameVisible(Default::default()),
3302 silent: Silent(Default::default()),
3303 no_gravity: NoGravity(Default::default()),
3304 pose: Pose::default(),
3305 ticks_frozen: TicksFrozen(Default::default()),
3306 },
3307 transformation_interpolation_start_delta_ticks:
3308 TransformationInterpolationStartDeltaTicks(0),
3309 transformation_interpolation_duration: TransformationInterpolationDuration(0),
3310 pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
3311 translation: Translation(Vec3f32 {
3312 x: 0.0,
3313 y: 0.0,
3314 z: 0.0,
3315 }),
3316 scale: Scale(Vec3f32 {
3317 x: 1.0,
3318 y: 1.0,
3319 z: 1.0,
3320 }),
3321 left_rotation: LeftRotation(Quaternion {
3322 x: 0.0,
3323 y: 0.0,
3324 z: 0.0,
3325 w: 1.0,
3326 }),
3327 right_rotation: RightRotation(Quaternion {
3328 x: 0.0,
3329 y: 0.0,
3330 z: 0.0,
3331 w: 1.0,
3332 }),
3333 billboard_render_constraints: BillboardRenderConstraints(Default::default()),
3334 brightness_override: BrightnessOverride(-1),
3335 view_range: ViewRange(1.0),
3336 shadow_radius: ShadowRadius(0.0),
3337 shadow_strength: ShadowStrength(1.0),
3338 abstract_display_width: AbstractDisplayWidth(0.0),
3339 abstract_display_height: AbstractDisplayHeight(0.0),
3340 glow_color_override: GlowColorOverride(-1),
3341 },
3342 item_display_item_stack: ItemDisplayItemStack(Default::default()),
3343 item_display_item_display: ItemDisplayItemDisplay(Default::default()),
3344 }
3345 }
3346}
3347
3348#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3350pub struct Text(pub FormattedText);
3351#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3353pub struct LineWidth(pub i32);
3354#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3356pub struct BackgroundColor(pub i32);
3357#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3359pub struct TextOpacity(pub u8);
3360#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3362pub struct StyleFlags(pub u8);
3363#[derive(Component)]
3389pub struct TextDisplay;
3390impl TextDisplay {
3391 pub fn apply_metadata(
3392 entity: &mut bevy_ecs::system::EntityCommands,
3393 d: EntityDataItem,
3394 ) -> Result<(), UpdateMetadataError> {
3395 match d.index {
3396 0..=22 => AbstractDisplay::apply_metadata(entity, d)?,
3397 23 => {
3398 entity.insert(Text(d.value.into_formatted_text()?));
3399 }
3400 24 => {
3401 entity.insert(LineWidth(d.value.into_int()?));
3402 }
3403 25 => {
3404 entity.insert(BackgroundColor(d.value.into_int()?));
3405 }
3406 26 => {
3407 entity.insert(TextOpacity(d.value.into_byte()?));
3408 }
3409 27 => {
3410 entity.insert(StyleFlags(d.value.into_byte()?));
3411 }
3412 _ => {}
3413 }
3414 Ok(())
3415 }
3416}
3417
3418#[derive(Bundle)]
3422pub struct TextDisplayMetadataBundle {
3423 _marker: TextDisplay,
3424 parent: AbstractDisplayMetadataBundle,
3425 text: Text,
3426 line_width: LineWidth,
3427 background_color: BackgroundColor,
3428 text_opacity: TextOpacity,
3429 style_flags: StyleFlags,
3430}
3431impl Default for TextDisplayMetadataBundle {
3432 fn default() -> Self {
3433 Self {
3434 _marker: TextDisplay,
3435 parent: AbstractDisplayMetadataBundle {
3436 _marker: AbstractDisplay,
3437 parent: AbstractEntityMetadataBundle {
3438 _marker: AbstractEntity,
3439 on_fire: OnFire(false),
3440 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3441 sprinting: Sprinting(false),
3442 swimming: Swimming(false),
3443 currently_glowing: CurrentlyGlowing(false),
3444 invisible: Invisible(false),
3445 fall_flying: FallFlying(false),
3446 air_supply: AirSupply(Default::default()),
3447 custom_name: CustomName(Default::default()),
3448 custom_name_visible: CustomNameVisible(Default::default()),
3449 silent: Silent(Default::default()),
3450 no_gravity: NoGravity(Default::default()),
3451 pose: Pose::default(),
3452 ticks_frozen: TicksFrozen(Default::default()),
3453 },
3454 transformation_interpolation_start_delta_ticks:
3455 TransformationInterpolationStartDeltaTicks(0),
3456 transformation_interpolation_duration: TransformationInterpolationDuration(0),
3457 pos_rot_interpolation_duration: PosRotInterpolationDuration(0),
3458 translation: Translation(Vec3f32 {
3459 x: 0.0,
3460 y: 0.0,
3461 z: 0.0,
3462 }),
3463 scale: Scale(Vec3f32 {
3464 x: 1.0,
3465 y: 1.0,
3466 z: 1.0,
3467 }),
3468 left_rotation: LeftRotation(Quaternion {
3469 x: 0.0,
3470 y: 0.0,
3471 z: 0.0,
3472 w: 1.0,
3473 }),
3474 right_rotation: RightRotation(Quaternion {
3475 x: 0.0,
3476 y: 0.0,
3477 z: 0.0,
3478 w: 1.0,
3479 }),
3480 billboard_render_constraints: BillboardRenderConstraints(Default::default()),
3481 brightness_override: BrightnessOverride(-1),
3482 view_range: ViewRange(1.0),
3483 shadow_radius: ShadowRadius(0.0),
3484 shadow_strength: ShadowStrength(1.0),
3485 abstract_display_width: AbstractDisplayWidth(0.0),
3486 abstract_display_height: AbstractDisplayHeight(0.0),
3487 glow_color_override: GlowColorOverride(-1),
3488 },
3489 text: Text(Default::default()),
3490 line_width: LineWidth(200),
3491 background_color: BackgroundColor(1073741824),
3492 text_opacity: TextOpacity(127),
3493 style_flags: StyleFlags(0),
3494 }
3495 }
3496}
3497
3498#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3499pub struct AutoSpinAttack(pub bool);
3501#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3502pub struct AbstractLivingUsingItem(pub bool);
3504#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3506pub struct Health(pub f32);
3507#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3509pub struct EffectParticles(pub Vec<Particle>);
3510#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3512pub struct EffectAmbience(pub bool);
3513#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3515pub struct ArrowCount(pub i32);
3516#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3518pub struct StingerCount(pub i32);
3519#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3521pub struct SleepingPos(pub Option<BlockPos>);
3522#[derive(Component)]
3655pub struct AbstractLiving;
3656impl AbstractLiving {
3657 pub fn apply_metadata(
3658 entity: &mut bevy_ecs::system::EntityCommands,
3659 d: EntityDataItem,
3660 ) -> Result<(), UpdateMetadataError> {
3661 match d.index {
3662 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
3663 8 => {
3664 let bitfield = d.value.into_byte()?;
3665 entity.insert(AutoSpinAttack(bitfield & 0x4 != 0));
3666 entity.insert(AbstractLivingUsingItem(bitfield & 0x1 != 0));
3667 }
3668 9 => {
3669 entity.insert(Health(d.value.into_float()?));
3670 }
3671 10 => {
3672 entity.insert(EffectParticles(d.value.into_particles()?));
3673 }
3674 11 => {
3675 entity.insert(EffectAmbience(d.value.into_boolean()?));
3676 }
3677 12 => {
3678 entity.insert(ArrowCount(d.value.into_int()?));
3679 }
3680 13 => {
3681 entity.insert(StingerCount(d.value.into_int()?));
3682 }
3683 14 => {
3684 entity.insert(SleepingPos(d.value.into_optional_block_pos()?));
3685 }
3686 _ => {}
3687 }
3688 Ok(())
3689 }
3690}
3691
3692#[derive(Bundle)]
3696pub struct AbstractLivingMetadataBundle {
3697 _marker: AbstractLiving,
3698 parent: AbstractEntityMetadataBundle,
3699 auto_spin_attack: AutoSpinAttack,
3700 abstract_living_using_item: AbstractLivingUsingItem,
3701 health: Health,
3702 effect_particles: EffectParticles,
3703 effect_ambience: EffectAmbience,
3704 arrow_count: ArrowCount,
3705 stinger_count: StingerCount,
3706 sleeping_pos: SleepingPos,
3707}
3708impl Default for AbstractLivingMetadataBundle {
3709 fn default() -> Self {
3710 Self {
3711 _marker: AbstractLiving,
3712 parent: AbstractEntityMetadataBundle {
3713 _marker: AbstractEntity,
3714 on_fire: OnFire(false),
3715 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3716 sprinting: Sprinting(false),
3717 swimming: Swimming(false),
3718 currently_glowing: CurrentlyGlowing(false),
3719 invisible: Invisible(false),
3720 fall_flying: FallFlying(false),
3721 air_supply: AirSupply(Default::default()),
3722 custom_name: CustomName(Default::default()),
3723 custom_name_visible: CustomNameVisible(Default::default()),
3724 silent: Silent(Default::default()),
3725 no_gravity: NoGravity(Default::default()),
3726 pose: Pose::default(),
3727 ticks_frozen: TicksFrozen(Default::default()),
3728 },
3729 auto_spin_attack: AutoSpinAttack(false),
3730 abstract_living_using_item: AbstractLivingUsingItem(false),
3731 health: Health(1.0),
3732 effect_particles: EffectParticles(Default::default()),
3733 effect_ambience: EffectAmbience(false),
3734 arrow_count: ArrowCount(0),
3735 stinger_count: StingerCount(0),
3736 sleeping_pos: SleepingPos(None),
3737 }
3738 }
3739}
3740
3741#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3742pub struct Small(pub bool);
3744#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3745pub struct ShowArms(pub bool);
3747#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3748pub struct ShowBasePlate(pub bool);
3750#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
3751pub struct ArmorStandMarker(pub bool);
3753#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3755pub struct HeadPose(pub Rotations);
3756#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3758pub struct BodyPose(pub Rotations);
3759#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3761pub struct LeftArmPose(pub Rotations);
3762#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3764pub struct RightArmPose(pub Rotations);
3765#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3767pub struct LeftLegPose(pub Rotations);
3768#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3770pub struct RightLegPose(pub Rotations);
3771#[derive(Component)]
3802pub struct ArmorStand;
3803impl ArmorStand {
3804 pub fn apply_metadata(
3805 entity: &mut bevy_ecs::system::EntityCommands,
3806 d: EntityDataItem,
3807 ) -> Result<(), UpdateMetadataError> {
3808 match d.index {
3809 0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3810 15 => {
3811 let bitfield = d.value.into_byte()?;
3812 entity.insert(Small(bitfield & 0x1 != 0));
3813 entity.insert(ShowArms(bitfield & 0x4 != 0));
3814 entity.insert(ShowBasePlate(bitfield & 0x8 != 0));
3815 entity.insert(ArmorStandMarker(bitfield & 0x10 != 0));
3816 }
3817 16 => {
3818 entity.insert(HeadPose(d.value.into_rotations()?));
3819 }
3820 17 => {
3821 entity.insert(BodyPose(d.value.into_rotations()?));
3822 }
3823 18 => {
3824 entity.insert(LeftArmPose(d.value.into_rotations()?));
3825 }
3826 19 => {
3827 entity.insert(RightArmPose(d.value.into_rotations()?));
3828 }
3829 20 => {
3830 entity.insert(LeftLegPose(d.value.into_rotations()?));
3831 }
3832 21 => {
3833 entity.insert(RightLegPose(d.value.into_rotations()?));
3834 }
3835 _ => {}
3836 }
3837 Ok(())
3838 }
3839}
3840
3841#[derive(Bundle)]
3845pub struct ArmorStandMetadataBundle {
3846 _marker: ArmorStand,
3847 parent: AbstractLivingMetadataBundle,
3848 small: Small,
3849 show_arms: ShowArms,
3850 show_base_plate: ShowBasePlate,
3851 armor_stand_marker: ArmorStandMarker,
3852 head_pose: HeadPose,
3853 body_pose: BodyPose,
3854 left_arm_pose: LeftArmPose,
3855 right_arm_pose: RightArmPose,
3856 left_leg_pose: LeftLegPose,
3857 right_leg_pose: RightLegPose,
3858}
3859impl Default for ArmorStandMetadataBundle {
3860 fn default() -> Self {
3861 Self {
3862 _marker: ArmorStand,
3863 parent: AbstractLivingMetadataBundle {
3864 _marker: AbstractLiving,
3865 parent: AbstractEntityMetadataBundle {
3866 _marker: AbstractEntity,
3867 on_fire: OnFire(false),
3868 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3869 sprinting: Sprinting(false),
3870 swimming: Swimming(false),
3871 currently_glowing: CurrentlyGlowing(false),
3872 invisible: Invisible(false),
3873 fall_flying: FallFlying(false),
3874 air_supply: AirSupply(Default::default()),
3875 custom_name: CustomName(Default::default()),
3876 custom_name_visible: CustomNameVisible(Default::default()),
3877 silent: Silent(Default::default()),
3878 no_gravity: NoGravity(Default::default()),
3879 pose: Pose::default(),
3880 ticks_frozen: TicksFrozen(Default::default()),
3881 },
3882 auto_spin_attack: AutoSpinAttack(false),
3883 abstract_living_using_item: AbstractLivingUsingItem(false),
3884 health: Health(1.0),
3885 effect_particles: EffectParticles(Default::default()),
3886 effect_ambience: EffectAmbience(false),
3887 arrow_count: ArrowCount(0),
3888 stinger_count: StingerCount(0),
3889 sleeping_pos: SleepingPos(None),
3890 },
3891 small: Small(false),
3892 show_arms: ShowArms(false),
3893 show_base_plate: ShowBasePlate(false),
3894 armor_stand_marker: ArmorStandMarker(false),
3895 head_pose: HeadPose(Default::default()),
3896 body_pose: BodyPose(Default::default()),
3897 left_arm_pose: LeftArmPose(Default::default()),
3898 right_arm_pose: RightArmPose(Default::default()),
3899 left_leg_pose: LeftLegPose(Default::default()),
3900 right_leg_pose: RightLegPose(Default::default()),
3901 }
3902 }
3903}
3904
3905#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3907pub struct PlayerMainHand(pub HumanoidArm);
3908#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
3910pub struct PlayerModeCustomisation(pub u8);
3911#[derive(Component)]
3935pub struct AbstractAvatar;
3936impl AbstractAvatar {
3937 pub fn apply_metadata(
3938 entity: &mut bevy_ecs::system::EntityCommands,
3939 d: EntityDataItem,
3940 ) -> Result<(), UpdateMetadataError> {
3941 match d.index {
3942 0..=14 => AbstractLiving::apply_metadata(entity, d)?,
3943 15 => {
3944 entity.insert(PlayerMainHand(d.value.into_humanoid_arm()?));
3945 }
3946 16 => {
3947 entity.insert(PlayerModeCustomisation(d.value.into_byte()?));
3948 }
3949 _ => {}
3950 }
3951 Ok(())
3952 }
3953}
3954
3955#[derive(Bundle)]
3959pub struct AbstractAvatarMetadataBundle {
3960 _marker: AbstractAvatar,
3961 parent: AbstractLivingMetadataBundle,
3962 player_main_hand: PlayerMainHand,
3963 player_mode_customisation: PlayerModeCustomisation,
3964}
3965impl Default for AbstractAvatarMetadataBundle {
3966 fn default() -> Self {
3967 Self {
3968 _marker: AbstractAvatar,
3969 parent: AbstractLivingMetadataBundle {
3970 _marker: AbstractLiving,
3971 parent: AbstractEntityMetadataBundle {
3972 _marker: AbstractEntity,
3973 on_fire: OnFire(false),
3974 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
3975 sprinting: Sprinting(false),
3976 swimming: Swimming(false),
3977 currently_glowing: CurrentlyGlowing(false),
3978 invisible: Invisible(false),
3979 fall_flying: FallFlying(false),
3980 air_supply: AirSupply(Default::default()),
3981 custom_name: CustomName(Default::default()),
3982 custom_name_visible: CustomNameVisible(Default::default()),
3983 silent: Silent(Default::default()),
3984 no_gravity: NoGravity(Default::default()),
3985 pose: Pose::default(),
3986 ticks_frozen: TicksFrozen(Default::default()),
3987 },
3988 auto_spin_attack: AutoSpinAttack(false),
3989 abstract_living_using_item: AbstractLivingUsingItem(false),
3990 health: Health(1.0),
3991 effect_particles: EffectParticles(Default::default()),
3992 effect_ambience: EffectAmbience(false),
3993 arrow_count: ArrowCount(0),
3994 stinger_count: StingerCount(0),
3995 sleeping_pos: SleepingPos(None),
3996 },
3997 player_main_hand: PlayerMainHand(Default::default()),
3998 player_mode_customisation: PlayerModeCustomisation(0),
3999 }
4000 }
4001}
4002
4003#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4005pub struct Profile(pub components::Profile);
4006#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4008pub struct Immovable(pub bool);
4009#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4011pub struct Description(pub Option<FormattedText>);
4012#[derive(Component)]
4037pub struct Mannequin;
4038impl Mannequin {
4039 pub fn apply_metadata(
4040 entity: &mut bevy_ecs::system::EntityCommands,
4041 d: EntityDataItem,
4042 ) -> Result<(), UpdateMetadataError> {
4043 match d.index {
4044 0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
4045 17 => {
4046 entity.insert(Profile(d.value.into_resolvable_profile()?));
4047 }
4048 18 => {
4049 entity.insert(Immovable(d.value.into_boolean()?));
4050 }
4051 19 => {
4052 entity.insert(Description(d.value.into_optional_formatted_text()?));
4053 }
4054 _ => {}
4055 }
4056 Ok(())
4057 }
4058}
4059
4060#[derive(Bundle)]
4064pub struct MannequinMetadataBundle {
4065 _marker: Mannequin,
4066 parent: AbstractAvatarMetadataBundle,
4067 profile: Profile,
4068 immovable: Immovable,
4069 description: Description,
4070}
4071impl Default for MannequinMetadataBundle {
4072 fn default() -> Self {
4073 Self {
4074 _marker: Mannequin,
4075 parent: AbstractAvatarMetadataBundle {
4076 _marker: AbstractAvatar,
4077 parent: AbstractLivingMetadataBundle {
4078 _marker: AbstractLiving,
4079 parent: AbstractEntityMetadataBundle {
4080 _marker: AbstractEntity,
4081 on_fire: OnFire(false),
4082 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4083 sprinting: Sprinting(false),
4084 swimming: Swimming(false),
4085 currently_glowing: CurrentlyGlowing(false),
4086 invisible: Invisible(false),
4087 fall_flying: FallFlying(false),
4088 air_supply: AirSupply(Default::default()),
4089 custom_name: CustomName(Default::default()),
4090 custom_name_visible: CustomNameVisible(Default::default()),
4091 silent: Silent(Default::default()),
4092 no_gravity: NoGravity(Default::default()),
4093 pose: Pose::default(),
4094 ticks_frozen: TicksFrozen(Default::default()),
4095 },
4096 auto_spin_attack: AutoSpinAttack(false),
4097 abstract_living_using_item: AbstractLivingUsingItem(false),
4098 health: Health(1.0),
4099 effect_particles: EffectParticles(Default::default()),
4100 effect_ambience: EffectAmbience(false),
4101 arrow_count: ArrowCount(0),
4102 stinger_count: StingerCount(0),
4103 sleeping_pos: SleepingPos(None),
4104 },
4105 player_main_hand: PlayerMainHand(Default::default()),
4106 player_mode_customisation: PlayerModeCustomisation(0),
4107 },
4108 profile: Profile(Default::default()),
4109 immovable: Immovable(false),
4110 description: Description(Default::default()),
4111 }
4112 }
4113}
4114
4115#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4117pub struct PlayerAbsorption(pub f32);
4118#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4120pub struct Score(pub i32);
4121#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4123pub struct ShoulderParrotLeft(pub OptionalUnsignedInt);
4124#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4126pub struct ShoulderParrotRight(pub OptionalUnsignedInt);
4127#[derive(Component)]
4152pub struct Player;
4153impl Player {
4154 pub fn apply_metadata(
4155 entity: &mut bevy_ecs::system::EntityCommands,
4156 d: EntityDataItem,
4157 ) -> Result<(), UpdateMetadataError> {
4158 match d.index {
4159 0..=16 => AbstractAvatar::apply_metadata(entity, d)?,
4160 17 => {
4161 entity.insert(PlayerAbsorption(d.value.into_float()?));
4162 }
4163 18 => {
4164 entity.insert(Score(d.value.into_int()?));
4165 }
4166 19 => {
4167 entity.insert(ShoulderParrotLeft(d.value.into_optional_unsigned_int()?));
4168 }
4169 20 => {
4170 entity.insert(ShoulderParrotRight(d.value.into_optional_unsigned_int()?));
4171 }
4172 _ => {}
4173 }
4174 Ok(())
4175 }
4176}
4177
4178#[derive(Bundle)]
4182pub struct PlayerMetadataBundle {
4183 _marker: Player,
4184 parent: AbstractAvatarMetadataBundle,
4185 player_absorption: PlayerAbsorption,
4186 score: Score,
4187 shoulder_parrot_left: ShoulderParrotLeft,
4188 shoulder_parrot_right: ShoulderParrotRight,
4189}
4190impl Default for PlayerMetadataBundle {
4191 fn default() -> Self {
4192 Self {
4193 _marker: Player,
4194 parent: AbstractAvatarMetadataBundle {
4195 _marker: AbstractAvatar,
4196 parent: AbstractLivingMetadataBundle {
4197 _marker: AbstractLiving,
4198 parent: AbstractEntityMetadataBundle {
4199 _marker: AbstractEntity,
4200 on_fire: OnFire(false),
4201 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4202 sprinting: Sprinting(false),
4203 swimming: Swimming(false),
4204 currently_glowing: CurrentlyGlowing(false),
4205 invisible: Invisible(false),
4206 fall_flying: FallFlying(false),
4207 air_supply: AirSupply(Default::default()),
4208 custom_name: CustomName(Default::default()),
4209 custom_name_visible: CustomNameVisible(Default::default()),
4210 silent: Silent(Default::default()),
4211 no_gravity: NoGravity(Default::default()),
4212 pose: Pose::default(),
4213 ticks_frozen: TicksFrozen(Default::default()),
4214 },
4215 auto_spin_attack: AutoSpinAttack(false),
4216 abstract_living_using_item: AbstractLivingUsingItem(false),
4217 health: Health(1.0),
4218 effect_particles: EffectParticles(Default::default()),
4219 effect_ambience: EffectAmbience(false),
4220 arrow_count: ArrowCount(0),
4221 stinger_count: StingerCount(0),
4222 sleeping_pos: SleepingPos(None),
4223 },
4224 player_main_hand: PlayerMainHand(Default::default()),
4225 player_mode_customisation: PlayerModeCustomisation(0),
4226 },
4227 player_absorption: PlayerAbsorption(0.0),
4228 score: Score(0),
4229 shoulder_parrot_left: ShoulderParrotLeft(OptionalUnsignedInt(None)),
4230 shoulder_parrot_right: ShoulderParrotRight(OptionalUnsignedInt(None)),
4231 }
4232 }
4233}
4234
4235#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4236pub struct NoAi(pub bool);
4238#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4239pub struct LeftHanded(pub bool);
4241#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4242pub struct Aggressive(pub bool);
4244#[derive(Component)]
4368pub struct AbstractInsentient;
4369impl AbstractInsentient {
4370 pub fn apply_metadata(
4371 entity: &mut bevy_ecs::system::EntityCommands,
4372 d: EntityDataItem,
4373 ) -> Result<(), UpdateMetadataError> {
4374 match d.index {
4375 0..=14 => AbstractLiving::apply_metadata(entity, d)?,
4376 15 => {
4377 let bitfield = d.value.into_byte()?;
4378 entity.insert(NoAi(bitfield & 0x1 != 0));
4379 entity.insert(LeftHanded(bitfield & 0x2 != 0));
4380 entity.insert(Aggressive(bitfield & 0x4 != 0));
4381 }
4382 _ => {}
4383 }
4384 Ok(())
4385 }
4386}
4387
4388#[derive(Bundle)]
4392pub struct AbstractInsentientMetadataBundle {
4393 _marker: AbstractInsentient,
4394 parent: AbstractLivingMetadataBundle,
4395 no_ai: NoAi,
4396 left_handed: LeftHanded,
4397 aggressive: Aggressive,
4398}
4399impl Default for AbstractInsentientMetadataBundle {
4400 fn default() -> Self {
4401 Self {
4402 _marker: AbstractInsentient,
4403 parent: AbstractLivingMetadataBundle {
4404 _marker: AbstractLiving,
4405 parent: AbstractEntityMetadataBundle {
4406 _marker: AbstractEntity,
4407 on_fire: OnFire(false),
4408 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4409 sprinting: Sprinting(false),
4410 swimming: Swimming(false),
4411 currently_glowing: CurrentlyGlowing(false),
4412 invisible: Invisible(false),
4413 fall_flying: FallFlying(false),
4414 air_supply: AirSupply(Default::default()),
4415 custom_name: CustomName(Default::default()),
4416 custom_name_visible: CustomNameVisible(Default::default()),
4417 silent: Silent(Default::default()),
4418 no_gravity: NoGravity(Default::default()),
4419 pose: Pose::default(),
4420 ticks_frozen: TicksFrozen(Default::default()),
4421 },
4422 auto_spin_attack: AutoSpinAttack(false),
4423 abstract_living_using_item: AbstractLivingUsingItem(false),
4424 health: Health(1.0),
4425 effect_particles: EffectParticles(Default::default()),
4426 effect_ambience: EffectAmbience(false),
4427 arrow_count: ArrowCount(0),
4428 stinger_count: StingerCount(0),
4429 sleeping_pos: SleepingPos(None),
4430 },
4431 no_ai: NoAi(false),
4432 left_handed: LeftHanded(false),
4433 aggressive: Aggressive(false),
4434 }
4435 }
4436}
4437
4438#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
4439pub struct Resting(pub bool);
4441#[derive(Component)]
4463pub struct Bat;
4464impl Bat {
4465 pub fn apply_metadata(
4466 entity: &mut bevy_ecs::system::EntityCommands,
4467 d: EntityDataItem,
4468 ) -> Result<(), UpdateMetadataError> {
4469 match d.index {
4470 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4471 16 => {
4472 let bitfield = d.value.into_byte()?;
4473 entity.insert(Resting(bitfield & 0x1 != 0));
4474 }
4475 _ => {}
4476 }
4477 Ok(())
4478 }
4479}
4480
4481#[derive(Bundle)]
4485pub struct BatMetadataBundle {
4486 _marker: Bat,
4487 parent: AbstractInsentientMetadataBundle,
4488 resting: Resting,
4489}
4490impl Default for BatMetadataBundle {
4491 fn default() -> Self {
4492 Self {
4493 _marker: Bat,
4494 parent: AbstractInsentientMetadataBundle {
4495 _marker: AbstractInsentient,
4496 parent: AbstractLivingMetadataBundle {
4497 _marker: AbstractLiving,
4498 parent: AbstractEntityMetadataBundle {
4499 _marker: AbstractEntity,
4500 on_fire: OnFire(false),
4501 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(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 resting: Resting(false),
4529 }
4530 }
4531}
4532
4533#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4535pub struct Phase(pub i32);
4536#[derive(Component)]
4559pub struct EnderDragon;
4560impl EnderDragon {
4561 pub fn apply_metadata(
4562 entity: &mut bevy_ecs::system::EntityCommands,
4563 d: EntityDataItem,
4564 ) -> Result<(), UpdateMetadataError> {
4565 match d.index {
4566 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4567 16 => {
4568 entity.insert(Phase(d.value.into_int()?));
4569 }
4570 _ => {}
4571 }
4572 Ok(())
4573 }
4574}
4575
4576#[derive(Bundle)]
4580pub struct EnderDragonMetadataBundle {
4581 _marker: EnderDragon,
4582 parent: AbstractInsentientMetadataBundle,
4583 phase: Phase,
4584}
4585impl Default for EnderDragonMetadataBundle {
4586 fn default() -> Self {
4587 Self {
4588 _marker: EnderDragon,
4589 parent: AbstractInsentientMetadataBundle {
4590 _marker: AbstractInsentient,
4591 parent: AbstractLivingMetadataBundle {
4592 _marker: AbstractLiving,
4593 parent: AbstractEntityMetadataBundle {
4594 _marker: AbstractEntity,
4595 on_fire: OnFire(false),
4596 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4597 sprinting: Sprinting(false),
4598 swimming: Swimming(false),
4599 currently_glowing: CurrentlyGlowing(false),
4600 invisible: Invisible(false),
4601 fall_flying: FallFlying(false),
4602 air_supply: AirSupply(Default::default()),
4603 custom_name: CustomName(Default::default()),
4604 custom_name_visible: CustomNameVisible(Default::default()),
4605 silent: Silent(Default::default()),
4606 no_gravity: NoGravity(Default::default()),
4607 pose: Pose::default(),
4608 ticks_frozen: TicksFrozen(Default::default()),
4609 },
4610 auto_spin_attack: AutoSpinAttack(false),
4611 abstract_living_using_item: AbstractLivingUsingItem(false),
4612 health: Health(1.0),
4613 effect_particles: EffectParticles(Default::default()),
4614 effect_ambience: EffectAmbience(false),
4615 arrow_count: ArrowCount(0),
4616 stinger_count: StingerCount(0),
4617 sleeping_pos: SleepingPos(None),
4618 },
4619 no_ai: NoAi(false),
4620 left_handed: LeftHanded(false),
4621 aggressive: Aggressive(false),
4622 },
4623 phase: Phase(Default::default()),
4624 }
4625 }
4626}
4627
4628#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4630pub struct IsCharging(pub bool);
4631#[derive(Component)]
4653pub struct Ghast;
4654impl Ghast {
4655 pub fn apply_metadata(
4656 entity: &mut bevy_ecs::system::EntityCommands,
4657 d: EntityDataItem,
4658 ) -> Result<(), UpdateMetadataError> {
4659 match d.index {
4660 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4661 16 => {
4662 entity.insert(IsCharging(d.value.into_boolean()?));
4663 }
4664 _ => {}
4665 }
4666 Ok(())
4667 }
4668}
4669
4670#[derive(Bundle)]
4674pub struct GhastMetadataBundle {
4675 _marker: Ghast,
4676 parent: AbstractInsentientMetadataBundle,
4677 is_charging: IsCharging,
4678}
4679impl Default for GhastMetadataBundle {
4680 fn default() -> Self {
4681 Self {
4682 _marker: Ghast,
4683 parent: AbstractInsentientMetadataBundle {
4684 _marker: AbstractInsentient,
4685 parent: AbstractLivingMetadataBundle {
4686 _marker: AbstractLiving,
4687 parent: AbstractEntityMetadataBundle {
4688 _marker: AbstractEntity,
4689 on_fire: OnFire(false),
4690 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4691 sprinting: Sprinting(false),
4692 swimming: Swimming(false),
4693 currently_glowing: CurrentlyGlowing(false),
4694 invisible: Invisible(false),
4695 fall_flying: FallFlying(false),
4696 air_supply: AirSupply(Default::default()),
4697 custom_name: CustomName(Default::default()),
4698 custom_name_visible: CustomNameVisible(Default::default()),
4699 silent: Silent(Default::default()),
4700 no_gravity: NoGravity(Default::default()),
4701 pose: Pose::default(),
4702 ticks_frozen: TicksFrozen(Default::default()),
4703 },
4704 auto_spin_attack: AutoSpinAttack(false),
4705 abstract_living_using_item: AbstractLivingUsingItem(false),
4706 health: Health(1.0),
4707 effect_particles: EffectParticles(Default::default()),
4708 effect_ambience: EffectAmbience(false),
4709 arrow_count: ArrowCount(0),
4710 stinger_count: StingerCount(0),
4711 sleeping_pos: SleepingPos(None),
4712 },
4713 no_ai: NoAi(false),
4714 left_handed: LeftHanded(false),
4715 aggressive: Aggressive(false),
4716 },
4717 is_charging: IsCharging(false),
4718 }
4719 }
4720}
4721
4722#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4724pub struct PhantomSize(pub i32);
4725#[derive(Component)]
4747pub struct Phantom;
4748impl Phantom {
4749 pub fn apply_metadata(
4750 entity: &mut bevy_ecs::system::EntityCommands,
4751 d: EntityDataItem,
4752 ) -> Result<(), UpdateMetadataError> {
4753 match d.index {
4754 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4755 16 => {
4756 entity.insert(PhantomSize(d.value.into_int()?));
4757 }
4758 _ => {}
4759 }
4760 Ok(())
4761 }
4762}
4763
4764#[derive(Bundle)]
4768pub struct PhantomMetadataBundle {
4769 _marker: Phantom,
4770 parent: AbstractInsentientMetadataBundle,
4771 phantom_size: PhantomSize,
4772}
4773impl Default for PhantomMetadataBundle {
4774 fn default() -> Self {
4775 Self {
4776 _marker: Phantom,
4777 parent: AbstractInsentientMetadataBundle {
4778 _marker: AbstractInsentient,
4779 parent: AbstractLivingMetadataBundle {
4780 _marker: AbstractLiving,
4781 parent: AbstractEntityMetadataBundle {
4782 _marker: AbstractEntity,
4783 on_fire: OnFire(false),
4784 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4785 sprinting: Sprinting(false),
4786 swimming: Swimming(false),
4787 currently_glowing: CurrentlyGlowing(false),
4788 invisible: Invisible(false),
4789 fall_flying: FallFlying(false),
4790 air_supply: AirSupply(Default::default()),
4791 custom_name: CustomName(Default::default()),
4792 custom_name_visible: CustomNameVisible(Default::default()),
4793 silent: Silent(Default::default()),
4794 no_gravity: NoGravity(Default::default()),
4795 pose: Pose::default(),
4796 ticks_frozen: TicksFrozen(Default::default()),
4797 },
4798 auto_spin_attack: AutoSpinAttack(false),
4799 abstract_living_using_item: AbstractLivingUsingItem(false),
4800 health: Health(1.0),
4801 effect_particles: EffectParticles(Default::default()),
4802 effect_ambience: EffectAmbience(false),
4803 arrow_count: ArrowCount(0),
4804 stinger_count: StingerCount(0),
4805 sleeping_pos: SleepingPos(None),
4806 },
4807 no_ai: NoAi(false),
4808 left_handed: LeftHanded(false),
4809 aggressive: Aggressive(false),
4810 },
4811 phantom_size: PhantomSize(0),
4812 }
4813 }
4814}
4815
4816#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
4818pub struct SlimeSize(pub i32);
4819#[derive(Component)]
4841pub struct Slime;
4842impl Slime {
4843 pub fn apply_metadata(
4844 entity: &mut bevy_ecs::system::EntityCommands,
4845 d: EntityDataItem,
4846 ) -> Result<(), UpdateMetadataError> {
4847 match d.index {
4848 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
4849 16 => {
4850 entity.insert(SlimeSize(d.value.into_int()?));
4851 }
4852 _ => {}
4853 }
4854 Ok(())
4855 }
4856}
4857
4858#[derive(Bundle)]
4862pub struct SlimeMetadataBundle {
4863 _marker: Slime,
4864 parent: AbstractInsentientMetadataBundle,
4865 slime_size: SlimeSize,
4866}
4867impl Default for SlimeMetadataBundle {
4868 fn default() -> Self {
4869 Self {
4870 _marker: Slime,
4871 parent: AbstractInsentientMetadataBundle {
4872 _marker: AbstractInsentient,
4873 parent: AbstractLivingMetadataBundle {
4874 _marker: AbstractLiving,
4875 parent: AbstractEntityMetadataBundle {
4876 _marker: AbstractEntity,
4877 on_fire: OnFire(false),
4878 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4879 sprinting: Sprinting(false),
4880 swimming: Swimming(false),
4881 currently_glowing: CurrentlyGlowing(false),
4882 invisible: Invisible(false),
4883 fall_flying: FallFlying(false),
4884 air_supply: AirSupply(Default::default()),
4885 custom_name: CustomName(Default::default()),
4886 custom_name_visible: CustomNameVisible(Default::default()),
4887 silent: Silent(Default::default()),
4888 no_gravity: NoGravity(Default::default()),
4889 pose: Pose::default(),
4890 ticks_frozen: TicksFrozen(Default::default()),
4891 },
4892 auto_spin_attack: AutoSpinAttack(false),
4893 abstract_living_using_item: AbstractLivingUsingItem(false),
4894 health: Health(1.0),
4895 effect_particles: EffectParticles(Default::default()),
4896 effect_ambience: EffectAmbience(false),
4897 arrow_count: ArrowCount(0),
4898 stinger_count: StingerCount(0),
4899 sleeping_pos: SleepingPos(None),
4900 },
4901 no_ai: NoAi(false),
4902 left_handed: LeftHanded(false),
4903 aggressive: Aggressive(false),
4904 },
4905 slime_size: SlimeSize(1),
4906 }
4907 }
4908}
4909
4910#[derive(Component)]
4931pub struct MagmaCube;
4932impl MagmaCube {
4933 pub fn apply_metadata(
4934 entity: &mut bevy_ecs::system::EntityCommands,
4935 d: EntityDataItem,
4936 ) -> Result<(), UpdateMetadataError> {
4937 match d.index {
4938 0..=16 => Slime::apply_metadata(entity, d)?,
4939 _ => {}
4940 }
4941 Ok(())
4942 }
4943}
4944
4945#[derive(Bundle)]
4949pub struct MagmaCubeMetadataBundle {
4950 _marker: MagmaCube,
4951 parent: SlimeMetadataBundle,
4952}
4953impl Default for MagmaCubeMetadataBundle {
4954 fn default() -> Self {
4955 Self {
4956 _marker: MagmaCube,
4957 parent: SlimeMetadataBundle {
4958 _marker: Slime,
4959 parent: AbstractInsentientMetadataBundle {
4960 _marker: AbstractInsentient,
4961 parent: AbstractLivingMetadataBundle {
4962 _marker: AbstractLiving,
4963 parent: AbstractEntityMetadataBundle {
4964 _marker: AbstractEntity,
4965 on_fire: OnFire(false),
4966 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
4967 sprinting: Sprinting(false),
4968 swimming: Swimming(false),
4969 currently_glowing: CurrentlyGlowing(false),
4970 invisible: Invisible(false),
4971 fall_flying: FallFlying(false),
4972 air_supply: AirSupply(Default::default()),
4973 custom_name: CustomName(Default::default()),
4974 custom_name_visible: CustomNameVisible(Default::default()),
4975 silent: Silent(Default::default()),
4976 no_gravity: NoGravity(Default::default()),
4977 pose: Pose::default(),
4978 ticks_frozen: TicksFrozen(Default::default()),
4979 },
4980 auto_spin_attack: AutoSpinAttack(false),
4981 abstract_living_using_item: AbstractLivingUsingItem(false),
4982 health: Health(1.0),
4983 effect_particles: EffectParticles(Default::default()),
4984 effect_ambience: EffectAmbience(false),
4985 arrow_count: ArrowCount(0),
4986 stinger_count: StingerCount(0),
4987 sleeping_pos: SleepingPos(None),
4988 },
4989 no_ai: NoAi(false),
4990 left_handed: LeftHanded(false),
4991 aggressive: Aggressive(false),
4992 },
4993 slime_size: SlimeSize(1),
4994 },
4995 }
4996 }
4997}
4998
4999#[derive(Component)]
5112pub struct AbstractCreature;
5113impl AbstractCreature {
5114 pub fn apply_metadata(
5115 entity: &mut bevy_ecs::system::EntityCommands,
5116 d: EntityDataItem,
5117 ) -> Result<(), UpdateMetadataError> {
5118 match d.index {
5119 0..=15 => AbstractInsentient::apply_metadata(entity, d)?,
5120 _ => {}
5121 }
5122 Ok(())
5123 }
5124}
5125
5126#[derive(Bundle)]
5130pub struct AbstractCreatureMetadataBundle {
5131 _marker: AbstractCreature,
5132 parent: AbstractInsentientMetadataBundle,
5133}
5134impl Default for AbstractCreatureMetadataBundle {
5135 fn default() -> Self {
5136 Self {
5137 _marker: AbstractCreature,
5138 parent: AbstractInsentientMetadataBundle {
5139 _marker: AbstractInsentient,
5140 parent: AbstractLivingMetadataBundle {
5141 _marker: AbstractLiving,
5142 parent: AbstractEntityMetadataBundle {
5143 _marker: AbstractEntity,
5144 on_fire: OnFire(false),
5145 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5146 sprinting: Sprinting(false),
5147 swimming: Swimming(false),
5148 currently_glowing: CurrentlyGlowing(false),
5149 invisible: Invisible(false),
5150 fall_flying: FallFlying(false),
5151 air_supply: AirSupply(Default::default()),
5152 custom_name: CustomName(Default::default()),
5153 custom_name_visible: CustomNameVisible(Default::default()),
5154 silent: Silent(Default::default()),
5155 no_gravity: NoGravity(Default::default()),
5156 pose: Pose::default(),
5157 ticks_frozen: TicksFrozen(Default::default()),
5158 },
5159 auto_spin_attack: AutoSpinAttack(false),
5160 abstract_living_using_item: AbstractLivingUsingItem(false),
5161 health: Health(1.0),
5162 effect_particles: EffectParticles(Default::default()),
5163 effect_ambience: EffectAmbience(false),
5164 arrow_count: ArrowCount(0),
5165 stinger_count: StingerCount(0),
5166 sleeping_pos: SleepingPos(None),
5167 },
5168 no_ai: NoAi(false),
5169 left_handed: LeftHanded(false),
5170 aggressive: Aggressive(false),
5171 },
5172 }
5173 }
5174}
5175
5176#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5178pub struct Dancing(pub bool);
5179#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5181pub struct CanDuplicate(pub bool);
5182#[derive(Component)]
5206pub struct Allay;
5207impl Allay {
5208 pub fn apply_metadata(
5209 entity: &mut bevy_ecs::system::EntityCommands,
5210 d: EntityDataItem,
5211 ) -> Result<(), UpdateMetadataError> {
5212 match d.index {
5213 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5214 16 => {
5215 entity.insert(Dancing(d.value.into_boolean()?));
5216 }
5217 17 => {
5218 entity.insert(CanDuplicate(d.value.into_boolean()?));
5219 }
5220 _ => {}
5221 }
5222 Ok(())
5223 }
5224}
5225
5226#[derive(Bundle)]
5230pub struct AllayMetadataBundle {
5231 _marker: Allay,
5232 parent: AbstractCreatureMetadataBundle,
5233 dancing: Dancing,
5234 can_duplicate: CanDuplicate,
5235}
5236impl Default for AllayMetadataBundle {
5237 fn default() -> Self {
5238 Self {
5239 _marker: Allay,
5240 parent: AbstractCreatureMetadataBundle {
5241 _marker: AbstractCreature,
5242 parent: AbstractInsentientMetadataBundle {
5243 _marker: AbstractInsentient,
5244 parent: AbstractLivingMetadataBundle {
5245 _marker: AbstractLiving,
5246 parent: AbstractEntityMetadataBundle {
5247 _marker: AbstractEntity,
5248 on_fire: OnFire(false),
5249 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5250 sprinting: Sprinting(false),
5251 swimming: Swimming(false),
5252 currently_glowing: CurrentlyGlowing(false),
5253 invisible: Invisible(false),
5254 fall_flying: FallFlying(false),
5255 air_supply: AirSupply(Default::default()),
5256 custom_name: CustomName(Default::default()),
5257 custom_name_visible: CustomNameVisible(Default::default()),
5258 silent: Silent(Default::default()),
5259 no_gravity: NoGravity(Default::default()),
5260 pose: Pose::default(),
5261 ticks_frozen: TicksFrozen(Default::default()),
5262 },
5263 auto_spin_attack: AutoSpinAttack(false),
5264 abstract_living_using_item: AbstractLivingUsingItem(false),
5265 health: Health(1.0),
5266 effect_particles: EffectParticles(Default::default()),
5267 effect_ambience: EffectAmbience(false),
5268 arrow_count: ArrowCount(0),
5269 stinger_count: StingerCount(0),
5270 sleeping_pos: SleepingPos(None),
5271 },
5272 no_ai: NoAi(false),
5273 left_handed: LeftHanded(false),
5274 aggressive: Aggressive(false),
5275 },
5276 },
5277 dancing: Dancing(false),
5278 can_duplicate: CanDuplicate(true),
5279 }
5280 }
5281}
5282
5283#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5285pub struct WeatherState(pub WeatheringCopperStateKind);
5286#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5288pub struct CopperGolemState(pub CopperGolemStateKind);
5289#[derive(Component)]
5314pub struct CopperGolem;
5315impl CopperGolem {
5316 pub fn apply_metadata(
5317 entity: &mut bevy_ecs::system::EntityCommands,
5318 d: EntityDataItem,
5319 ) -> Result<(), UpdateMetadataError> {
5320 match d.index {
5321 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5322 16 => {
5323 entity.insert(WeatherState(d.value.into_weathering_copper_state()?));
5324 }
5325 17 => {
5326 entity.insert(CopperGolemState(d.value.into_copper_golem_state()?));
5327 }
5328 _ => {}
5329 }
5330 Ok(())
5331 }
5332}
5333
5334#[derive(Bundle)]
5338pub struct CopperGolemMetadataBundle {
5339 _marker: CopperGolem,
5340 parent: AbstractCreatureMetadataBundle,
5341 weather_state: WeatherState,
5342 copper_golem_state: CopperGolemState,
5343}
5344impl Default for CopperGolemMetadataBundle {
5345 fn default() -> Self {
5346 Self {
5347 _marker: CopperGolem,
5348 parent: AbstractCreatureMetadataBundle {
5349 _marker: AbstractCreature,
5350 parent: AbstractInsentientMetadataBundle {
5351 _marker: AbstractInsentient,
5352 parent: AbstractLivingMetadataBundle {
5353 _marker: AbstractLiving,
5354 parent: AbstractEntityMetadataBundle {
5355 _marker: AbstractEntity,
5356 on_fire: OnFire(false),
5357 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5358 sprinting: Sprinting(false),
5359 swimming: Swimming(false),
5360 currently_glowing: CurrentlyGlowing(false),
5361 invisible: Invisible(false),
5362 fall_flying: FallFlying(false),
5363 air_supply: AirSupply(Default::default()),
5364 custom_name: CustomName(Default::default()),
5365 custom_name_visible: CustomNameVisible(Default::default()),
5366 silent: Silent(Default::default()),
5367 no_gravity: NoGravity(Default::default()),
5368 pose: Pose::default(),
5369 ticks_frozen: TicksFrozen(Default::default()),
5370 },
5371 auto_spin_attack: AutoSpinAttack(false),
5372 abstract_living_using_item: AbstractLivingUsingItem(false),
5373 health: Health(1.0),
5374 effect_particles: EffectParticles(Default::default()),
5375 effect_ambience: EffectAmbience(false),
5376 arrow_count: ArrowCount(0),
5377 stinger_count: StingerCount(0),
5378 sleeping_pos: SleepingPos(None),
5379 },
5380 no_ai: NoAi(false),
5381 left_handed: LeftHanded(false),
5382 aggressive: Aggressive(false),
5383 },
5384 },
5385 weather_state: WeatherState(Default::default()),
5386 copper_golem_state: CopperGolemState(Default::default()),
5387 }
5388 }
5389}
5390
5391#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5392pub struct PlayerCreated(pub bool);
5394#[derive(Component)]
5418pub struct IronGolem;
5419impl IronGolem {
5420 pub fn apply_metadata(
5421 entity: &mut bevy_ecs::system::EntityCommands,
5422 d: EntityDataItem,
5423 ) -> Result<(), UpdateMetadataError> {
5424 match d.index {
5425 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5426 16 => {
5427 let bitfield = d.value.into_byte()?;
5428 entity.insert(PlayerCreated(bitfield & 0x1 != 0));
5429 }
5430 _ => {}
5431 }
5432 Ok(())
5433 }
5434}
5435
5436#[derive(Bundle)]
5440pub struct IronGolemMetadataBundle {
5441 _marker: IronGolem,
5442 parent: AbstractCreatureMetadataBundle,
5443 player_created: PlayerCreated,
5444}
5445impl Default for IronGolemMetadataBundle {
5446 fn default() -> Self {
5447 Self {
5448 _marker: IronGolem,
5449 parent: AbstractCreatureMetadataBundle {
5450 _marker: AbstractCreature,
5451 parent: AbstractInsentientMetadataBundle {
5452 _marker: AbstractInsentient,
5453 parent: AbstractLivingMetadataBundle {
5454 _marker: AbstractLiving,
5455 parent: AbstractEntityMetadataBundle {
5456 _marker: AbstractEntity,
5457 on_fire: OnFire(false),
5458 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5459 sprinting: Sprinting(false),
5460 swimming: Swimming(false),
5461 currently_glowing: CurrentlyGlowing(false),
5462 invisible: Invisible(false),
5463 fall_flying: FallFlying(false),
5464 air_supply: AirSupply(Default::default()),
5465 custom_name: CustomName(Default::default()),
5466 custom_name_visible: CustomNameVisible(Default::default()),
5467 silent: Silent(Default::default()),
5468 no_gravity: NoGravity(Default::default()),
5469 pose: Pose::default(),
5470 ticks_frozen: TicksFrozen(Default::default()),
5471 },
5472 auto_spin_attack: AutoSpinAttack(false),
5473 abstract_living_using_item: AbstractLivingUsingItem(false),
5474 health: Health(1.0),
5475 effect_particles: EffectParticles(Default::default()),
5476 effect_ambience: EffectAmbience(false),
5477 arrow_count: ArrowCount(0),
5478 stinger_count: StingerCount(0),
5479 sleeping_pos: SleepingPos(None),
5480 },
5481 no_ai: NoAi(false),
5482 left_handed: LeftHanded(false),
5483 aggressive: Aggressive(false),
5484 },
5485 },
5486 player_created: PlayerCreated(false),
5487 }
5488 }
5489}
5490
5491#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5493pub struct PufferfishFromBucket(pub bool);
5494#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5496pub struct PuffState(pub i32);
5497#[derive(Component)]
5522pub struct Pufferfish;
5523impl Pufferfish {
5524 pub fn apply_metadata(
5525 entity: &mut bevy_ecs::system::EntityCommands,
5526 d: EntityDataItem,
5527 ) -> Result<(), UpdateMetadataError> {
5528 match d.index {
5529 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5530 16 => {
5531 entity.insert(PufferfishFromBucket(d.value.into_boolean()?));
5532 }
5533 17 => {
5534 entity.insert(PuffState(d.value.into_int()?));
5535 }
5536 _ => {}
5537 }
5538 Ok(())
5539 }
5540}
5541
5542#[derive(Bundle)]
5546pub struct PufferfishMetadataBundle {
5547 _marker: Pufferfish,
5548 parent: AbstractCreatureMetadataBundle,
5549 pufferfish_from_bucket: PufferfishFromBucket,
5550 puff_state: PuffState,
5551}
5552impl Default for PufferfishMetadataBundle {
5553 fn default() -> Self {
5554 Self {
5555 _marker: Pufferfish,
5556 parent: AbstractCreatureMetadataBundle {
5557 _marker: AbstractCreature,
5558 parent: AbstractInsentientMetadataBundle {
5559 _marker: AbstractInsentient,
5560 parent: AbstractLivingMetadataBundle {
5561 _marker: AbstractLiving,
5562 parent: AbstractEntityMetadataBundle {
5563 _marker: AbstractEntity,
5564 on_fire: OnFire(false),
5565 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5566 sprinting: Sprinting(false),
5567 swimming: Swimming(false),
5568 currently_glowing: CurrentlyGlowing(false),
5569 invisible: Invisible(false),
5570 fall_flying: FallFlying(false),
5571 air_supply: AirSupply(Default::default()),
5572 custom_name: CustomName(Default::default()),
5573 custom_name_visible: CustomNameVisible(Default::default()),
5574 silent: Silent(Default::default()),
5575 no_gravity: NoGravity(Default::default()),
5576 pose: Pose::default(),
5577 ticks_frozen: TicksFrozen(Default::default()),
5578 },
5579 auto_spin_attack: AutoSpinAttack(false),
5580 abstract_living_using_item: AbstractLivingUsingItem(false),
5581 health: Health(1.0),
5582 effect_particles: EffectParticles(Default::default()),
5583 effect_ambience: EffectAmbience(false),
5584 arrow_count: ArrowCount(0),
5585 stinger_count: StingerCount(0),
5586 sleeping_pos: SleepingPos(None),
5587 },
5588 no_ai: NoAi(false),
5589 left_handed: LeftHanded(false),
5590 aggressive: Aggressive(false),
5591 },
5592 },
5593 pufferfish_from_bucket: PufferfishFromBucket(false),
5594 puff_state: PuffState(0),
5595 }
5596 }
5597}
5598
5599#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5601pub struct AttachFace(pub Direction);
5602#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5604pub struct Peek(pub u8);
5605#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5607pub struct Color(pub u8);
5608#[derive(Component)]
5633pub struct Shulker;
5634impl Shulker {
5635 pub fn apply_metadata(
5636 entity: &mut bevy_ecs::system::EntityCommands,
5637 d: EntityDataItem,
5638 ) -> Result<(), UpdateMetadataError> {
5639 match d.index {
5640 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5641 16 => {
5642 entity.insert(AttachFace(d.value.into_direction()?));
5643 }
5644 17 => {
5645 entity.insert(Peek(d.value.into_byte()?));
5646 }
5647 18 => {
5648 entity.insert(Color(d.value.into_byte()?));
5649 }
5650 _ => {}
5651 }
5652 Ok(())
5653 }
5654}
5655
5656#[derive(Bundle)]
5660pub struct ShulkerMetadataBundle {
5661 _marker: Shulker,
5662 parent: AbstractCreatureMetadataBundle,
5663 attach_face: AttachFace,
5664 peek: Peek,
5665 color: Color,
5666}
5667impl Default for ShulkerMetadataBundle {
5668 fn default() -> Self {
5669 Self {
5670 _marker: Shulker,
5671 parent: AbstractCreatureMetadataBundle {
5672 _marker: AbstractCreature,
5673 parent: AbstractInsentientMetadataBundle {
5674 _marker: AbstractInsentient,
5675 parent: AbstractLivingMetadataBundle {
5676 _marker: AbstractLiving,
5677 parent: AbstractEntityMetadataBundle {
5678 _marker: AbstractEntity,
5679 on_fire: OnFire(false),
5680 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5681 sprinting: Sprinting(false),
5682 swimming: Swimming(false),
5683 currently_glowing: CurrentlyGlowing(false),
5684 invisible: Invisible(false),
5685 fall_flying: FallFlying(false),
5686 air_supply: AirSupply(Default::default()),
5687 custom_name: CustomName(Default::default()),
5688 custom_name_visible: CustomNameVisible(Default::default()),
5689 silent: Silent(Default::default()),
5690 no_gravity: NoGravity(Default::default()),
5691 pose: Pose::default(),
5692 ticks_frozen: TicksFrozen(Default::default()),
5693 },
5694 auto_spin_attack: AutoSpinAttack(false),
5695 abstract_living_using_item: AbstractLivingUsingItem(false),
5696 health: Health(1.0),
5697 effect_particles: EffectParticles(Default::default()),
5698 effect_ambience: EffectAmbience(false),
5699 arrow_count: ArrowCount(0),
5700 stinger_count: StingerCount(0),
5701 sleeping_pos: SleepingPos(None),
5702 },
5703 no_ai: NoAi(false),
5704 left_handed: LeftHanded(false),
5705 aggressive: Aggressive(false),
5706 },
5707 },
5708 attach_face: AttachFace(Default::default()),
5709 peek: Peek(0),
5710 color: Color(16),
5711 }
5712 }
5713}
5714
5715#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
5716pub struct HasPumpkin(pub bool);
5718#[derive(Component)]
5742pub struct SnowGolem;
5743impl SnowGolem {
5744 pub fn apply_metadata(
5745 entity: &mut bevy_ecs::system::EntityCommands,
5746 d: EntityDataItem,
5747 ) -> Result<(), UpdateMetadataError> {
5748 match d.index {
5749 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5750 16 => {
5751 let bitfield = d.value.into_byte()?;
5752 entity.insert(HasPumpkin(bitfield & 0x10 != 0));
5753 }
5754 _ => {}
5755 }
5756 Ok(())
5757 }
5758}
5759
5760#[derive(Bundle)]
5764pub struct SnowGolemMetadataBundle {
5765 _marker: SnowGolem,
5766 parent: AbstractCreatureMetadataBundle,
5767 has_pumpkin: HasPumpkin,
5768}
5769impl Default for SnowGolemMetadataBundle {
5770 fn default() -> Self {
5771 Self {
5772 _marker: SnowGolem,
5773 parent: AbstractCreatureMetadataBundle {
5774 _marker: AbstractCreature,
5775 parent: AbstractInsentientMetadataBundle {
5776 _marker: AbstractInsentient,
5777 parent: AbstractLivingMetadataBundle {
5778 _marker: AbstractLiving,
5779 parent: AbstractEntityMetadataBundle {
5780 _marker: AbstractEntity,
5781 on_fire: OnFire(false),
5782 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5783 sprinting: Sprinting(false),
5784 swimming: Swimming(false),
5785 currently_glowing: CurrentlyGlowing(false),
5786 invisible: Invisible(false),
5787 fall_flying: FallFlying(false),
5788 air_supply: AirSupply(Default::default()),
5789 custom_name: CustomName(Default::default()),
5790 custom_name_visible: CustomNameVisible(Default::default()),
5791 silent: Silent(Default::default()),
5792 no_gravity: NoGravity(Default::default()),
5793 pose: Pose::default(),
5794 ticks_frozen: TicksFrozen(Default::default()),
5795 },
5796 auto_spin_attack: AutoSpinAttack(false),
5797 abstract_living_using_item: AbstractLivingUsingItem(false),
5798 health: Health(1.0),
5799 effect_particles: EffectParticles(Default::default()),
5800 effect_ambience: EffectAmbience(false),
5801 arrow_count: ArrowCount(0),
5802 stinger_count: StingerCount(0),
5803 sleeping_pos: SleepingPos(None),
5804 },
5805 no_ai: NoAi(false),
5806 left_handed: LeftHanded(false),
5807 aggressive: Aggressive(false),
5808 },
5809 },
5810 has_pumpkin: HasPumpkin(true),
5811 }
5812 }
5813}
5814
5815#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5817pub struct TadpoleFromBucket(pub bool);
5818#[derive(Component)]
5841pub struct Tadpole;
5842impl Tadpole {
5843 pub fn apply_metadata(
5844 entity: &mut bevy_ecs::system::EntityCommands,
5845 d: EntityDataItem,
5846 ) -> Result<(), UpdateMetadataError> {
5847 match d.index {
5848 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5849 16 => {
5850 entity.insert(TadpoleFromBucket(d.value.into_boolean()?));
5851 }
5852 _ => {}
5853 }
5854 Ok(())
5855 }
5856}
5857
5858#[derive(Bundle)]
5862pub struct TadpoleMetadataBundle {
5863 _marker: Tadpole,
5864 parent: AbstractCreatureMetadataBundle,
5865 tadpole_from_bucket: TadpoleFromBucket,
5866}
5867impl Default for TadpoleMetadataBundle {
5868 fn default() -> Self {
5869 Self {
5870 _marker: Tadpole,
5871 parent: AbstractCreatureMetadataBundle {
5872 _marker: AbstractCreature,
5873 parent: AbstractInsentientMetadataBundle {
5874 _marker: AbstractInsentient,
5875 parent: AbstractLivingMetadataBundle {
5876 _marker: AbstractLiving,
5877 parent: AbstractEntityMetadataBundle {
5878 _marker: AbstractEntity,
5879 on_fire: OnFire(false),
5880 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
5881 sprinting: Sprinting(false),
5882 swimming: Swimming(false),
5883 currently_glowing: CurrentlyGlowing(false),
5884 invisible: Invisible(false),
5885 fall_flying: FallFlying(false),
5886 air_supply: AirSupply(Default::default()),
5887 custom_name: CustomName(Default::default()),
5888 custom_name_visible: CustomNameVisible(Default::default()),
5889 silent: Silent(Default::default()),
5890 no_gravity: NoGravity(Default::default()),
5891 pose: Pose::default(),
5892 ticks_frozen: TicksFrozen(Default::default()),
5893 },
5894 auto_spin_attack: AutoSpinAttack(false),
5895 abstract_living_using_item: AbstractLivingUsingItem(false),
5896 health: Health(1.0),
5897 effect_particles: EffectParticles(Default::default()),
5898 effect_ambience: EffectAmbience(false),
5899 arrow_count: ArrowCount(0),
5900 stinger_count: StingerCount(0),
5901 sleeping_pos: SleepingPos(None),
5902 },
5903 no_ai: NoAi(false),
5904 left_handed: LeftHanded(false),
5905 aggressive: Aggressive(false),
5906 },
5907 },
5908 tadpole_from_bucket: TadpoleFromBucket(false),
5909 }
5910 }
5911}
5912
5913#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
5915pub struct AbstractAgeableBaby(pub bool);
5916#[derive(Component)]
5983pub struct AbstractAgeable;
5984impl AbstractAgeable {
5985 pub fn apply_metadata(
5986 entity: &mut bevy_ecs::system::EntityCommands,
5987 d: EntityDataItem,
5988 ) -> Result<(), UpdateMetadataError> {
5989 match d.index {
5990 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
5991 16 => {
5992 entity.insert(AbstractAgeableBaby(d.value.into_boolean()?));
5993 }
5994 _ => {}
5995 }
5996 Ok(())
5997 }
5998}
5999
6000#[derive(Bundle)]
6004pub struct AbstractAgeableMetadataBundle {
6005 _marker: AbstractAgeable,
6006 parent: AbstractCreatureMetadataBundle,
6007 abstract_ageable_baby: AbstractAgeableBaby,
6008}
6009impl Default for AbstractAgeableMetadataBundle {
6010 fn default() -> Self {
6011 Self {
6012 _marker: AbstractAgeable,
6013 parent: AbstractCreatureMetadataBundle {
6014 _marker: AbstractCreature,
6015 parent: AbstractInsentientMetadataBundle {
6016 _marker: AbstractInsentient,
6017 parent: AbstractLivingMetadataBundle {
6018 _marker: AbstractLiving,
6019 parent: AbstractEntityMetadataBundle {
6020 _marker: AbstractEntity,
6021 on_fire: OnFire(false),
6022 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
6023 sprinting: Sprinting(false),
6024 swimming: Swimming(false),
6025 currently_glowing: CurrentlyGlowing(false),
6026 invisible: Invisible(false),
6027 fall_flying: FallFlying(false),
6028 air_supply: AirSupply(Default::default()),
6029 custom_name: CustomName(Default::default()),
6030 custom_name_visible: CustomNameVisible(Default::default()),
6031 silent: Silent(Default::default()),
6032 no_gravity: NoGravity(Default::default()),
6033 pose: Pose::default(),
6034 ticks_frozen: TicksFrozen(Default::default()),
6035 },
6036 auto_spin_attack: AutoSpinAttack(false),
6037 abstract_living_using_item: AbstractLivingUsingItem(false),
6038 health: Health(1.0),
6039 effect_particles: EffectParticles(Default::default()),
6040 effect_ambience: EffectAmbience(false),
6041 arrow_count: ArrowCount(0),
6042 stinger_count: StingerCount(0),
6043 sleeping_pos: SleepingPos(None),
6044 },
6045 no_ai: NoAi(false),
6046 left_handed: LeftHanded(false),
6047 aggressive: Aggressive(false),
6048 },
6049 },
6050 abstract_ageable_baby: AbstractAgeableBaby(false),
6051 }
6052 }
6053}
6054
6055#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6057pub struct GotFish(pub bool);
6058#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6060pub struct MoistnessLevel(pub i32);
6061#[derive(Component)]
6086pub struct Dolphin;
6087impl Dolphin {
6088 pub fn apply_metadata(
6089 entity: &mut bevy_ecs::system::EntityCommands,
6090 d: EntityDataItem,
6091 ) -> Result<(), UpdateMetadataError> {
6092 match d.index {
6093 0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
6094 17 => {
6095 entity.insert(GotFish(d.value.into_boolean()?));
6096 }
6097 18 => {
6098 entity.insert(MoistnessLevel(d.value.into_int()?));
6099 }
6100 _ => {}
6101 }
6102 Ok(())
6103 }
6104}
6105
6106#[derive(Bundle)]
6110pub struct DolphinMetadataBundle {
6111 _marker: Dolphin,
6112 parent: AbstractAgeableMetadataBundle,
6113 got_fish: GotFish,
6114 moistness_level: MoistnessLevel,
6115}
6116impl Default for DolphinMetadataBundle {
6117 fn default() -> Self {
6118 Self {
6119 _marker: Dolphin,
6120 parent: AbstractAgeableMetadataBundle {
6121 _marker: AbstractAgeable,
6122 parent: AbstractCreatureMetadataBundle {
6123 _marker: AbstractCreature,
6124 parent: AbstractInsentientMetadataBundle {
6125 _marker: AbstractInsentient,
6126 parent: AbstractLivingMetadataBundle {
6127 _marker: AbstractLiving,
6128 parent: AbstractEntityMetadataBundle {
6129 _marker: AbstractEntity,
6130 on_fire: OnFire(false),
6131 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
6132 sprinting: Sprinting(false),
6133 swimming: Swimming(false),
6134 currently_glowing: CurrentlyGlowing(false),
6135 invisible: Invisible(false),
6136 fall_flying: FallFlying(false),
6137 air_supply: AirSupply(Default::default()),
6138 custom_name: CustomName(Default::default()),
6139 custom_name_visible: CustomNameVisible(Default::default()),
6140 silent: Silent(Default::default()),
6141 no_gravity: NoGravity(Default::default()),
6142 pose: Pose::default(),
6143 ticks_frozen: TicksFrozen(Default::default()),
6144 },
6145 auto_spin_attack: AutoSpinAttack(false),
6146 abstract_living_using_item: AbstractLivingUsingItem(false),
6147 health: Health(1.0),
6148 effect_particles: EffectParticles(Default::default()),
6149 effect_ambience: EffectAmbience(false),
6150 arrow_count: ArrowCount(0),
6151 stinger_count: StingerCount(0),
6152 sleeping_pos: SleepingPos(None),
6153 },
6154 no_ai: NoAi(false),
6155 left_handed: LeftHanded(false),
6156 aggressive: Aggressive(false),
6157 },
6158 },
6159 abstract_ageable_baby: AbstractAgeableBaby(false),
6160 },
6161 got_fish: GotFish(false),
6162 moistness_level: MoistnessLevel(2400),
6163 }
6164 }
6165}
6166
6167#[derive(Component)]
6189pub struct Squid;
6190impl Squid {
6191 pub fn apply_metadata(
6192 entity: &mut bevy_ecs::system::EntityCommands,
6193 d: EntityDataItem,
6194 ) -> Result<(), UpdateMetadataError> {
6195 match d.index {
6196 0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
6197 _ => {}
6198 }
6199 Ok(())
6200 }
6201}
6202
6203#[derive(Bundle)]
6207pub struct SquidMetadataBundle {
6208 _marker: Squid,
6209 parent: AbstractAgeableMetadataBundle,
6210}
6211impl Default for SquidMetadataBundle {
6212 fn default() -> Self {
6213 Self {
6214 _marker: Squid,
6215 parent: AbstractAgeableMetadataBundle {
6216 _marker: AbstractAgeable,
6217 parent: AbstractCreatureMetadataBundle {
6218 _marker: AbstractCreature,
6219 parent: AbstractInsentientMetadataBundle {
6220 _marker: AbstractInsentient,
6221 parent: AbstractLivingMetadataBundle {
6222 _marker: AbstractLiving,
6223 parent: AbstractEntityMetadataBundle {
6224 _marker: AbstractEntity,
6225 on_fire: OnFire(false),
6226 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
6227 sprinting: Sprinting(false),
6228 swimming: Swimming(false),
6229 currently_glowing: CurrentlyGlowing(false),
6230 invisible: Invisible(false),
6231 fall_flying: FallFlying(false),
6232 air_supply: AirSupply(Default::default()),
6233 custom_name: CustomName(Default::default()),
6234 custom_name_visible: CustomNameVisible(Default::default()),
6235 silent: Silent(Default::default()),
6236 no_gravity: NoGravity(Default::default()),
6237 pose: Pose::default(),
6238 ticks_frozen: TicksFrozen(Default::default()),
6239 },
6240 auto_spin_attack: AutoSpinAttack(false),
6241 abstract_living_using_item: AbstractLivingUsingItem(false),
6242 health: Health(1.0),
6243 effect_particles: EffectParticles(Default::default()),
6244 effect_ambience: EffectAmbience(false),
6245 arrow_count: ArrowCount(0),
6246 stinger_count: StingerCount(0),
6247 sleeping_pos: SleepingPos(None),
6248 },
6249 no_ai: NoAi(false),
6250 left_handed: LeftHanded(false),
6251 aggressive: Aggressive(false),
6252 },
6253 },
6254 abstract_ageable_baby: AbstractAgeableBaby(false),
6255 },
6256 }
6257 }
6258}
6259
6260#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6262pub struct DarkTicksRemaining(pub i32);
6263#[derive(Component)]
6289pub struct GlowSquid;
6290impl GlowSquid {
6291 pub fn apply_metadata(
6292 entity: &mut bevy_ecs::system::EntityCommands,
6293 d: EntityDataItem,
6294 ) -> Result<(), UpdateMetadataError> {
6295 match d.index {
6296 0..=16 => Squid::apply_metadata(entity, d)?,
6297 17 => {
6298 entity.insert(DarkTicksRemaining(d.value.into_int()?));
6299 }
6300 _ => {}
6301 }
6302 Ok(())
6303 }
6304}
6305
6306#[derive(Bundle)]
6310pub struct GlowSquidMetadataBundle {
6311 _marker: GlowSquid,
6312 parent: SquidMetadataBundle,
6313 dark_ticks_remaining: DarkTicksRemaining,
6314}
6315impl Default for GlowSquidMetadataBundle {
6316 fn default() -> Self {
6317 Self {
6318 _marker: GlowSquid,
6319 parent: SquidMetadataBundle {
6320 _marker: Squid,
6321 parent: AbstractAgeableMetadataBundle {
6322 _marker: AbstractAgeable,
6323 parent: AbstractCreatureMetadataBundle {
6324 _marker: AbstractCreature,
6325 parent: AbstractInsentientMetadataBundle {
6326 _marker: AbstractInsentient,
6327 parent: AbstractLivingMetadataBundle {
6328 _marker: AbstractLiving,
6329 parent: AbstractEntityMetadataBundle {
6330 _marker: AbstractEntity,
6331 on_fire: OnFire(false),
6332 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
6333 false,
6334 ),
6335 sprinting: Sprinting(false),
6336 swimming: Swimming(false),
6337 currently_glowing: CurrentlyGlowing(false),
6338 invisible: Invisible(false),
6339 fall_flying: FallFlying(false),
6340 air_supply: AirSupply(Default::default()),
6341 custom_name: CustomName(Default::default()),
6342 custom_name_visible: CustomNameVisible(Default::default()),
6343 silent: Silent(Default::default()),
6344 no_gravity: NoGravity(Default::default()),
6345 pose: Pose::default(),
6346 ticks_frozen: TicksFrozen(Default::default()),
6347 },
6348 auto_spin_attack: AutoSpinAttack(false),
6349 abstract_living_using_item: AbstractLivingUsingItem(false),
6350 health: Health(1.0),
6351 effect_particles: EffectParticles(Default::default()),
6352 effect_ambience: EffectAmbience(false),
6353 arrow_count: ArrowCount(0),
6354 stinger_count: StingerCount(0),
6355 sleeping_pos: SleepingPos(None),
6356 },
6357 no_ai: NoAi(false),
6358 left_handed: LeftHanded(false),
6359 aggressive: Aggressive(false),
6360 },
6361 },
6362 abstract_ageable_baby: AbstractAgeableBaby(false),
6363 },
6364 },
6365 dark_ticks_remaining: DarkTicksRemaining(0),
6366 }
6367 }
6368}
6369
6370#[derive(Component)]
6428pub struct AbstractAnimal;
6429impl AbstractAnimal {
6430 pub fn apply_metadata(
6431 entity: &mut bevy_ecs::system::EntityCommands,
6432 d: EntityDataItem,
6433 ) -> Result<(), UpdateMetadataError> {
6434 match d.index {
6435 0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
6436 _ => {}
6437 }
6438 Ok(())
6439 }
6440}
6441
6442#[derive(Bundle)]
6446pub struct AbstractAnimalMetadataBundle {
6447 _marker: AbstractAnimal,
6448 parent: AbstractAgeableMetadataBundle,
6449}
6450impl Default for AbstractAnimalMetadataBundle {
6451 fn default() -> Self {
6452 Self {
6453 _marker: AbstractAnimal,
6454 parent: AbstractAgeableMetadataBundle {
6455 _marker: AbstractAgeable,
6456 parent: AbstractCreatureMetadataBundle {
6457 _marker: AbstractCreature,
6458 parent: AbstractInsentientMetadataBundle {
6459 _marker: AbstractInsentient,
6460 parent: AbstractLivingMetadataBundle {
6461 _marker: AbstractLiving,
6462 parent: AbstractEntityMetadataBundle {
6463 _marker: AbstractEntity,
6464 on_fire: OnFire(false),
6465 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
6466 sprinting: Sprinting(false),
6467 swimming: Swimming(false),
6468 currently_glowing: CurrentlyGlowing(false),
6469 invisible: Invisible(false),
6470 fall_flying: FallFlying(false),
6471 air_supply: AirSupply(Default::default()),
6472 custom_name: CustomName(Default::default()),
6473 custom_name_visible: CustomNameVisible(Default::default()),
6474 silent: Silent(Default::default()),
6475 no_gravity: NoGravity(Default::default()),
6476 pose: Pose::default(),
6477 ticks_frozen: TicksFrozen(Default::default()),
6478 },
6479 auto_spin_attack: AutoSpinAttack(false),
6480 abstract_living_using_item: AbstractLivingUsingItem(false),
6481 health: Health(1.0),
6482 effect_particles: EffectParticles(Default::default()),
6483 effect_ambience: EffectAmbience(false),
6484 arrow_count: ArrowCount(0),
6485 stinger_count: StingerCount(0),
6486 sleeping_pos: SleepingPos(None),
6487 },
6488 no_ai: NoAi(false),
6489 left_handed: LeftHanded(false),
6490 aggressive: Aggressive(false),
6491 },
6492 },
6493 abstract_ageable_baby: AbstractAgeableBaby(false),
6494 },
6495 }
6496 }
6497}
6498
6499#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6501pub struct ArmadilloState(pub ArmadilloStateKind);
6502#[derive(Component)]
6528pub struct Armadillo;
6529impl Armadillo {
6530 pub fn apply_metadata(
6531 entity: &mut bevy_ecs::system::EntityCommands,
6532 d: EntityDataItem,
6533 ) -> Result<(), UpdateMetadataError> {
6534 match d.index {
6535 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6536 17 => {
6537 entity.insert(ArmadilloState(d.value.into_armadillo_state()?));
6538 }
6539 _ => {}
6540 }
6541 Ok(())
6542 }
6543}
6544
6545#[derive(Bundle)]
6549pub struct ArmadilloMetadataBundle {
6550 _marker: Armadillo,
6551 parent: AbstractAnimalMetadataBundle,
6552 armadillo_state: ArmadilloState,
6553}
6554impl Default for ArmadilloMetadataBundle {
6555 fn default() -> Self {
6556 Self {
6557 _marker: Armadillo,
6558 parent: AbstractAnimalMetadataBundle {
6559 _marker: AbstractAnimal,
6560 parent: AbstractAgeableMetadataBundle {
6561 _marker: AbstractAgeable,
6562 parent: AbstractCreatureMetadataBundle {
6563 _marker: AbstractCreature,
6564 parent: AbstractInsentientMetadataBundle {
6565 _marker: AbstractInsentient,
6566 parent: AbstractLivingMetadataBundle {
6567 _marker: AbstractLiving,
6568 parent: AbstractEntityMetadataBundle {
6569 _marker: AbstractEntity,
6570 on_fire: OnFire(false),
6571 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
6572 false,
6573 ),
6574 sprinting: Sprinting(false),
6575 swimming: Swimming(false),
6576 currently_glowing: CurrentlyGlowing(false),
6577 invisible: Invisible(false),
6578 fall_flying: FallFlying(false),
6579 air_supply: AirSupply(Default::default()),
6580 custom_name: CustomName(Default::default()),
6581 custom_name_visible: CustomNameVisible(Default::default()),
6582 silent: Silent(Default::default()),
6583 no_gravity: NoGravity(Default::default()),
6584 pose: Pose::default(),
6585 ticks_frozen: TicksFrozen(Default::default()),
6586 },
6587 auto_spin_attack: AutoSpinAttack(false),
6588 abstract_living_using_item: AbstractLivingUsingItem(false),
6589 health: Health(1.0),
6590 effect_particles: EffectParticles(Default::default()),
6591 effect_ambience: EffectAmbience(false),
6592 arrow_count: ArrowCount(0),
6593 stinger_count: StingerCount(0),
6594 sleeping_pos: SleepingPos(None),
6595 },
6596 no_ai: NoAi(false),
6597 left_handed: LeftHanded(false),
6598 aggressive: Aggressive(false),
6599 },
6600 },
6601 abstract_ageable_baby: AbstractAgeableBaby(false),
6602 },
6603 },
6604 armadillo_state: ArmadilloState(Default::default()),
6605 }
6606 }
6607}
6608
6609#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6611pub struct AxolotlVariant(pub i32);
6612#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6614pub struct PlayingDead(pub bool);
6615#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6617pub struct AxolotlFromBucket(pub bool);
6618#[derive(Component)]
6645pub struct Axolotl;
6646impl Axolotl {
6647 pub fn apply_metadata(
6648 entity: &mut bevy_ecs::system::EntityCommands,
6649 d: EntityDataItem,
6650 ) -> Result<(), UpdateMetadataError> {
6651 match d.index {
6652 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6653 17 => {
6654 entity.insert(AxolotlVariant(d.value.into_int()?));
6655 }
6656 18 => {
6657 entity.insert(PlayingDead(d.value.into_boolean()?));
6658 }
6659 19 => {
6660 entity.insert(AxolotlFromBucket(d.value.into_boolean()?));
6661 }
6662 _ => {}
6663 }
6664 Ok(())
6665 }
6666}
6667
6668#[derive(Bundle)]
6672pub struct AxolotlMetadataBundle {
6673 _marker: Axolotl,
6674 parent: AbstractAnimalMetadataBundle,
6675 axolotl_variant: AxolotlVariant,
6676 playing_dead: PlayingDead,
6677 axolotl_from_bucket: AxolotlFromBucket,
6678}
6679impl Default for AxolotlMetadataBundle {
6680 fn default() -> Self {
6681 Self {
6682 _marker: Axolotl,
6683 parent: AbstractAnimalMetadataBundle {
6684 _marker: AbstractAnimal,
6685 parent: AbstractAgeableMetadataBundle {
6686 _marker: AbstractAgeable,
6687 parent: AbstractCreatureMetadataBundle {
6688 _marker: AbstractCreature,
6689 parent: AbstractInsentientMetadataBundle {
6690 _marker: AbstractInsentient,
6691 parent: AbstractLivingMetadataBundle {
6692 _marker: AbstractLiving,
6693 parent: AbstractEntityMetadataBundle {
6694 _marker: AbstractEntity,
6695 on_fire: OnFire(false),
6696 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
6697 false,
6698 ),
6699 sprinting: Sprinting(false),
6700 swimming: Swimming(false),
6701 currently_glowing: CurrentlyGlowing(false),
6702 invisible: Invisible(false),
6703 fall_flying: FallFlying(false),
6704 air_supply: AirSupply(Default::default()),
6705 custom_name: CustomName(Default::default()),
6706 custom_name_visible: CustomNameVisible(Default::default()),
6707 silent: Silent(Default::default()),
6708 no_gravity: NoGravity(Default::default()),
6709 pose: Pose::default(),
6710 ticks_frozen: TicksFrozen(Default::default()),
6711 },
6712 auto_spin_attack: AutoSpinAttack(false),
6713 abstract_living_using_item: AbstractLivingUsingItem(false),
6714 health: Health(1.0),
6715 effect_particles: EffectParticles(Default::default()),
6716 effect_ambience: EffectAmbience(false),
6717 arrow_count: ArrowCount(0),
6718 stinger_count: StingerCount(0),
6719 sleeping_pos: SleepingPos(None),
6720 },
6721 no_ai: NoAi(false),
6722 left_handed: LeftHanded(false),
6723 aggressive: Aggressive(false),
6724 },
6725 },
6726 abstract_ageable_baby: AbstractAgeableBaby(false),
6727 },
6728 },
6729 axolotl_variant: AxolotlVariant(0),
6730 playing_dead: PlayingDead(false),
6731 axolotl_from_bucket: AxolotlFromBucket(false),
6732 }
6733 }
6734}
6735
6736#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6737pub struct HasNectar(pub bool);
6739#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6740pub struct HasStung(pub bool);
6742#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
6743pub struct BeeRolling(pub bool);
6745#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6747pub struct BeeAngerEndTime(pub i64);
6748#[derive(Component)]
6776pub struct Bee;
6777impl Bee {
6778 pub fn apply_metadata(
6779 entity: &mut bevy_ecs::system::EntityCommands,
6780 d: EntityDataItem,
6781 ) -> Result<(), UpdateMetadataError> {
6782 match d.index {
6783 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6784 17 => {
6785 let bitfield = d.value.into_byte()?;
6786 entity.insert(HasNectar(bitfield & 0x8 != 0));
6787 entity.insert(HasStung(bitfield & 0x4 != 0));
6788 entity.insert(BeeRolling(bitfield & 0x2 != 0));
6789 }
6790 18 => {
6791 entity.insert(BeeAngerEndTime(d.value.into_long()?));
6792 }
6793 _ => {}
6794 }
6795 Ok(())
6796 }
6797}
6798
6799#[derive(Bundle)]
6803pub struct BeeMetadataBundle {
6804 _marker: Bee,
6805 parent: AbstractAnimalMetadataBundle,
6806 has_nectar: HasNectar,
6807 has_stung: HasStung,
6808 bee_rolling: BeeRolling,
6809 bee_anger_end_time: BeeAngerEndTime,
6810}
6811impl Default for BeeMetadataBundle {
6812 fn default() -> Self {
6813 Self {
6814 _marker: Bee,
6815 parent: AbstractAnimalMetadataBundle {
6816 _marker: AbstractAnimal,
6817 parent: AbstractAgeableMetadataBundle {
6818 _marker: AbstractAgeable,
6819 parent: AbstractCreatureMetadataBundle {
6820 _marker: AbstractCreature,
6821 parent: AbstractInsentientMetadataBundle {
6822 _marker: AbstractInsentient,
6823 parent: AbstractLivingMetadataBundle {
6824 _marker: AbstractLiving,
6825 parent: AbstractEntityMetadataBundle {
6826 _marker: AbstractEntity,
6827 on_fire: OnFire(false),
6828 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
6829 false,
6830 ),
6831 sprinting: Sprinting(false),
6832 swimming: Swimming(false),
6833 currently_glowing: CurrentlyGlowing(false),
6834 invisible: Invisible(false),
6835 fall_flying: FallFlying(false),
6836 air_supply: AirSupply(Default::default()),
6837 custom_name: CustomName(Default::default()),
6838 custom_name_visible: CustomNameVisible(Default::default()),
6839 silent: Silent(Default::default()),
6840 no_gravity: NoGravity(Default::default()),
6841 pose: Pose::default(),
6842 ticks_frozen: TicksFrozen(Default::default()),
6843 },
6844 auto_spin_attack: AutoSpinAttack(false),
6845 abstract_living_using_item: AbstractLivingUsingItem(false),
6846 health: Health(1.0),
6847 effect_particles: EffectParticles(Default::default()),
6848 effect_ambience: EffectAmbience(false),
6849 arrow_count: ArrowCount(0),
6850 stinger_count: StingerCount(0),
6851 sleeping_pos: SleepingPos(None),
6852 },
6853 no_ai: NoAi(false),
6854 left_handed: LeftHanded(false),
6855 aggressive: Aggressive(false),
6856 },
6857 },
6858 abstract_ageable_baby: AbstractAgeableBaby(false),
6859 },
6860 },
6861 has_nectar: HasNectar(false),
6862 has_stung: HasStung(false),
6863 bee_rolling: BeeRolling(false),
6864 bee_anger_end_time: BeeAngerEndTime(-1),
6865 }
6866 }
6867}
6868
6869#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6871pub struct ChickenVariant(pub azalea_registry::data::PigVariant);
6872#[derive(Component)]
6897pub struct Chicken;
6898impl Chicken {
6899 pub fn apply_metadata(
6900 entity: &mut bevy_ecs::system::EntityCommands,
6901 d: EntityDataItem,
6902 ) -> Result<(), UpdateMetadataError> {
6903 match d.index {
6904 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
6905 17 => {
6906 entity.insert(ChickenVariant(d.value.into_pig_variant()?));
6907 }
6908 _ => {}
6909 }
6910 Ok(())
6911 }
6912}
6913
6914#[derive(Bundle)]
6918pub struct ChickenMetadataBundle {
6919 _marker: Chicken,
6920 parent: AbstractAnimalMetadataBundle,
6921 chicken_variant: ChickenVariant,
6922}
6923impl Default for ChickenMetadataBundle {
6924 fn default() -> Self {
6925 Self {
6926 _marker: Chicken,
6927 parent: AbstractAnimalMetadataBundle {
6928 _marker: AbstractAnimal,
6929 parent: AbstractAgeableMetadataBundle {
6930 _marker: AbstractAgeable,
6931 parent: AbstractCreatureMetadataBundle {
6932 _marker: AbstractCreature,
6933 parent: AbstractInsentientMetadataBundle {
6934 _marker: AbstractInsentient,
6935 parent: AbstractLivingMetadataBundle {
6936 _marker: AbstractLiving,
6937 parent: AbstractEntityMetadataBundle {
6938 _marker: AbstractEntity,
6939 on_fire: OnFire(false),
6940 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
6941 false,
6942 ),
6943 sprinting: Sprinting(false),
6944 swimming: Swimming(false),
6945 currently_glowing: CurrentlyGlowing(false),
6946 invisible: Invisible(false),
6947 fall_flying: FallFlying(false),
6948 air_supply: AirSupply(Default::default()),
6949 custom_name: CustomName(Default::default()),
6950 custom_name_visible: CustomNameVisible(Default::default()),
6951 silent: Silent(Default::default()),
6952 no_gravity: NoGravity(Default::default()),
6953 pose: Pose::default(),
6954 ticks_frozen: TicksFrozen(Default::default()),
6955 },
6956 auto_spin_attack: AutoSpinAttack(false),
6957 abstract_living_using_item: AbstractLivingUsingItem(false),
6958 health: Health(1.0),
6959 effect_particles: EffectParticles(Default::default()),
6960 effect_ambience: EffectAmbience(false),
6961 arrow_count: ArrowCount(0),
6962 stinger_count: StingerCount(0),
6963 sleeping_pos: SleepingPos(None),
6964 },
6965 no_ai: NoAi(false),
6966 left_handed: LeftHanded(false),
6967 aggressive: Aggressive(false),
6968 },
6969 },
6970 abstract_ageable_baby: AbstractAgeableBaby(false),
6971 },
6972 },
6973 chicken_variant: ChickenVariant(azalea_registry::data::PigVariant::new_raw(0)),
6974 }
6975 }
6976}
6977
6978#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
6980pub struct CowVariant(pub azalea_registry::data::ChickenVariant);
6981#[derive(Component)]
7006pub struct Cow;
7007impl Cow {
7008 pub fn apply_metadata(
7009 entity: &mut bevy_ecs::system::EntityCommands,
7010 d: EntityDataItem,
7011 ) -> Result<(), UpdateMetadataError> {
7012 match d.index {
7013 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7014 17 => {
7015 entity.insert(CowVariant(d.value.into_chicken_variant()?));
7016 }
7017 _ => {}
7018 }
7019 Ok(())
7020 }
7021}
7022
7023#[derive(Bundle)]
7027pub struct CowMetadataBundle {
7028 _marker: Cow,
7029 parent: AbstractAnimalMetadataBundle,
7030 cow_variant: CowVariant,
7031}
7032impl Default for CowMetadataBundle {
7033 fn default() -> Self {
7034 Self {
7035 _marker: Cow,
7036 parent: AbstractAnimalMetadataBundle {
7037 _marker: AbstractAnimal,
7038 parent: AbstractAgeableMetadataBundle {
7039 _marker: AbstractAgeable,
7040 parent: AbstractCreatureMetadataBundle {
7041 _marker: AbstractCreature,
7042 parent: AbstractInsentientMetadataBundle {
7043 _marker: AbstractInsentient,
7044 parent: AbstractLivingMetadataBundle {
7045 _marker: AbstractLiving,
7046 parent: AbstractEntityMetadataBundle {
7047 _marker: AbstractEntity,
7048 on_fire: OnFire(false),
7049 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7050 false,
7051 ),
7052 sprinting: Sprinting(false),
7053 swimming: Swimming(false),
7054 currently_glowing: CurrentlyGlowing(false),
7055 invisible: Invisible(false),
7056 fall_flying: FallFlying(false),
7057 air_supply: AirSupply(Default::default()),
7058 custom_name: CustomName(Default::default()),
7059 custom_name_visible: CustomNameVisible(Default::default()),
7060 silent: Silent(Default::default()),
7061 no_gravity: NoGravity(Default::default()),
7062 pose: Pose::default(),
7063 ticks_frozen: TicksFrozen(Default::default()),
7064 },
7065 auto_spin_attack: AutoSpinAttack(false),
7066 abstract_living_using_item: AbstractLivingUsingItem(false),
7067 health: Health(1.0),
7068 effect_particles: EffectParticles(Default::default()),
7069 effect_ambience: EffectAmbience(false),
7070 arrow_count: ArrowCount(0),
7071 stinger_count: StingerCount(0),
7072 sleeping_pos: SleepingPos(None),
7073 },
7074 no_ai: NoAi(false),
7075 left_handed: LeftHanded(false),
7076 aggressive: Aggressive(false),
7077 },
7078 },
7079 abstract_ageable_baby: AbstractAgeableBaby(false),
7080 },
7081 },
7082 cow_variant: CowVariant(azalea_registry::data::ChickenVariant::new_raw(0)),
7083 }
7084 }
7085}
7086
7087#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7089pub struct FoxKind(pub i32);
7090#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7091pub struct FoxSitting(pub bool);
7093#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7094pub struct Faceplanted(pub bool);
7096#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7097pub struct Defending(pub bool);
7099#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7100pub struct Sleeping(pub bool);
7102#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7103pub struct Pouncing(pub bool);
7105#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7106pub struct FoxCrouching(pub bool);
7108#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7109pub struct FoxInterested(pub bool);
7111#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7113pub struct TrustedId0(pub Option<Uuid>);
7114#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7116pub struct TrustedId1(pub Option<Uuid>);
7117#[derive(Component)]
7151pub struct Fox;
7152impl Fox {
7153 pub fn apply_metadata(
7154 entity: &mut bevy_ecs::system::EntityCommands,
7155 d: EntityDataItem,
7156 ) -> Result<(), UpdateMetadataError> {
7157 match d.index {
7158 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7159 17 => {
7160 entity.insert(FoxKind(d.value.into_int()?));
7161 }
7162 18 => {
7163 let bitfield = d.value.into_byte()?;
7164 entity.insert(FoxSitting(bitfield & 0x1 != 0));
7165 entity.insert(Faceplanted(bitfield & 0x40 != 0));
7166 entity.insert(Defending(bitfield & 0x80 != 0));
7167 entity.insert(Sleeping(bitfield & 0x20 != 0));
7168 entity.insert(Pouncing(bitfield & 0x10 != 0));
7169 entity.insert(FoxCrouching(bitfield & 0x4 != 0));
7170 entity.insert(FoxInterested(bitfield & 0x8 != 0));
7171 }
7172 19 => {
7173 entity.insert(TrustedId0(d.value.into_optional_living_entity_reference()?));
7174 }
7175 20 => {
7176 entity.insert(TrustedId1(d.value.into_optional_living_entity_reference()?));
7177 }
7178 _ => {}
7179 }
7180 Ok(())
7181 }
7182}
7183
7184#[derive(Bundle)]
7188pub struct FoxMetadataBundle {
7189 _marker: Fox,
7190 parent: AbstractAnimalMetadataBundle,
7191 fox_kind: FoxKind,
7192 fox_sitting: FoxSitting,
7193 faceplanted: Faceplanted,
7194 defending: Defending,
7195 sleeping: Sleeping,
7196 pouncing: Pouncing,
7197 fox_crouching: FoxCrouching,
7198 fox_interested: FoxInterested,
7199 trusted_id_0: TrustedId0,
7200 trusted_id_1: TrustedId1,
7201}
7202impl Default for FoxMetadataBundle {
7203 fn default() -> Self {
7204 Self {
7205 _marker: Fox,
7206 parent: AbstractAnimalMetadataBundle {
7207 _marker: AbstractAnimal,
7208 parent: AbstractAgeableMetadataBundle {
7209 _marker: AbstractAgeable,
7210 parent: AbstractCreatureMetadataBundle {
7211 _marker: AbstractCreature,
7212 parent: AbstractInsentientMetadataBundle {
7213 _marker: AbstractInsentient,
7214 parent: AbstractLivingMetadataBundle {
7215 _marker: AbstractLiving,
7216 parent: AbstractEntityMetadataBundle {
7217 _marker: AbstractEntity,
7218 on_fire: OnFire(false),
7219 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7220 false,
7221 ),
7222 sprinting: Sprinting(false),
7223 swimming: Swimming(false),
7224 currently_glowing: CurrentlyGlowing(false),
7225 invisible: Invisible(false),
7226 fall_flying: FallFlying(false),
7227 air_supply: AirSupply(Default::default()),
7228 custom_name: CustomName(Default::default()),
7229 custom_name_visible: CustomNameVisible(Default::default()),
7230 silent: Silent(Default::default()),
7231 no_gravity: NoGravity(Default::default()),
7232 pose: Pose::default(),
7233 ticks_frozen: TicksFrozen(Default::default()),
7234 },
7235 auto_spin_attack: AutoSpinAttack(false),
7236 abstract_living_using_item: AbstractLivingUsingItem(false),
7237 health: Health(1.0),
7238 effect_particles: EffectParticles(Default::default()),
7239 effect_ambience: EffectAmbience(false),
7240 arrow_count: ArrowCount(0),
7241 stinger_count: StingerCount(0),
7242 sleeping_pos: SleepingPos(None),
7243 },
7244 no_ai: NoAi(false),
7245 left_handed: LeftHanded(false),
7246 aggressive: Aggressive(false),
7247 },
7248 },
7249 abstract_ageable_baby: AbstractAgeableBaby(false),
7250 },
7251 },
7252 fox_kind: FoxKind(Default::default()),
7253 fox_sitting: FoxSitting(false),
7254 faceplanted: Faceplanted(false),
7255 defending: Defending(false),
7256 sleeping: Sleeping(false),
7257 pouncing: Pouncing(false),
7258 fox_crouching: FoxCrouching(false),
7259 fox_interested: FoxInterested(false),
7260 trusted_id_0: TrustedId0(None),
7261 trusted_id_1: TrustedId1(None),
7262 }
7263 }
7264}
7265
7266#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7268pub struct FrogVariant(pub azalea_registry::data::WolfSoundVariant);
7269#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7271pub struct TongueTarget(pub OptionalUnsignedInt);
7272#[derive(Component)]
7298pub struct Frog;
7299impl Frog {
7300 pub fn apply_metadata(
7301 entity: &mut bevy_ecs::system::EntityCommands,
7302 d: EntityDataItem,
7303 ) -> Result<(), UpdateMetadataError> {
7304 match d.index {
7305 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7306 17 => {
7307 entity.insert(FrogVariant(d.value.into_wolf_sound_variant()?));
7308 }
7309 18 => {
7310 entity.insert(TongueTarget(d.value.into_optional_unsigned_int()?));
7311 }
7312 _ => {}
7313 }
7314 Ok(())
7315 }
7316}
7317
7318#[derive(Bundle)]
7322pub struct FrogMetadataBundle {
7323 _marker: Frog,
7324 parent: AbstractAnimalMetadataBundle,
7325 frog_variant: FrogVariant,
7326 tongue_target: TongueTarget,
7327}
7328impl Default for FrogMetadataBundle {
7329 fn default() -> Self {
7330 Self {
7331 _marker: Frog,
7332 parent: AbstractAnimalMetadataBundle {
7333 _marker: AbstractAnimal,
7334 parent: AbstractAgeableMetadataBundle {
7335 _marker: AbstractAgeable,
7336 parent: AbstractCreatureMetadataBundle {
7337 _marker: AbstractCreature,
7338 parent: AbstractInsentientMetadataBundle {
7339 _marker: AbstractInsentient,
7340 parent: AbstractLivingMetadataBundle {
7341 _marker: AbstractLiving,
7342 parent: AbstractEntityMetadataBundle {
7343 _marker: AbstractEntity,
7344 on_fire: OnFire(false),
7345 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7346 false,
7347 ),
7348 sprinting: Sprinting(false),
7349 swimming: Swimming(false),
7350 currently_glowing: CurrentlyGlowing(false),
7351 invisible: Invisible(false),
7352 fall_flying: FallFlying(false),
7353 air_supply: AirSupply(Default::default()),
7354 custom_name: CustomName(Default::default()),
7355 custom_name_visible: CustomNameVisible(Default::default()),
7356 silent: Silent(Default::default()),
7357 no_gravity: NoGravity(Default::default()),
7358 pose: Pose::default(),
7359 ticks_frozen: TicksFrozen(Default::default()),
7360 },
7361 auto_spin_attack: AutoSpinAttack(false),
7362 abstract_living_using_item: AbstractLivingUsingItem(false),
7363 health: Health(1.0),
7364 effect_particles: EffectParticles(Default::default()),
7365 effect_ambience: EffectAmbience(false),
7366 arrow_count: ArrowCount(0),
7367 stinger_count: StingerCount(0),
7368 sleeping_pos: SleepingPos(None),
7369 },
7370 no_ai: NoAi(false),
7371 left_handed: LeftHanded(false),
7372 aggressive: Aggressive(false),
7373 },
7374 },
7375 abstract_ageable_baby: AbstractAgeableBaby(false),
7376 },
7377 },
7378 frog_variant: FrogVariant(azalea_registry::data::WolfSoundVariant::new_raw(0)),
7379 tongue_target: TongueTarget(OptionalUnsignedInt(None)),
7380 }
7381 }
7382}
7383
7384#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7386pub struct IsScreamingGoat(pub bool);
7387#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7389pub struct HasLeftHorn(pub bool);
7390#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7392pub struct HasRightHorn(pub bool);
7393#[derive(Component)]
7420pub struct Goat;
7421impl Goat {
7422 pub fn apply_metadata(
7423 entity: &mut bevy_ecs::system::EntityCommands,
7424 d: EntityDataItem,
7425 ) -> Result<(), UpdateMetadataError> {
7426 match d.index {
7427 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7428 17 => {
7429 entity.insert(IsScreamingGoat(d.value.into_boolean()?));
7430 }
7431 18 => {
7432 entity.insert(HasLeftHorn(d.value.into_boolean()?));
7433 }
7434 19 => {
7435 entity.insert(HasRightHorn(d.value.into_boolean()?));
7436 }
7437 _ => {}
7438 }
7439 Ok(())
7440 }
7441}
7442
7443#[derive(Bundle)]
7447pub struct GoatMetadataBundle {
7448 _marker: Goat,
7449 parent: AbstractAnimalMetadataBundle,
7450 is_screaming_goat: IsScreamingGoat,
7451 has_left_horn: HasLeftHorn,
7452 has_right_horn: HasRightHorn,
7453}
7454impl Default for GoatMetadataBundle {
7455 fn default() -> Self {
7456 Self {
7457 _marker: Goat,
7458 parent: AbstractAnimalMetadataBundle {
7459 _marker: AbstractAnimal,
7460 parent: AbstractAgeableMetadataBundle {
7461 _marker: AbstractAgeable,
7462 parent: AbstractCreatureMetadataBundle {
7463 _marker: AbstractCreature,
7464 parent: AbstractInsentientMetadataBundle {
7465 _marker: AbstractInsentient,
7466 parent: AbstractLivingMetadataBundle {
7467 _marker: AbstractLiving,
7468 parent: AbstractEntityMetadataBundle {
7469 _marker: AbstractEntity,
7470 on_fire: OnFire(false),
7471 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7472 false,
7473 ),
7474 sprinting: Sprinting(false),
7475 swimming: Swimming(false),
7476 currently_glowing: CurrentlyGlowing(false),
7477 invisible: Invisible(false),
7478 fall_flying: FallFlying(false),
7479 air_supply: AirSupply(Default::default()),
7480 custom_name: CustomName(Default::default()),
7481 custom_name_visible: CustomNameVisible(Default::default()),
7482 silent: Silent(Default::default()),
7483 no_gravity: NoGravity(Default::default()),
7484 pose: Pose::default(),
7485 ticks_frozen: TicksFrozen(Default::default()),
7486 },
7487 auto_spin_attack: AutoSpinAttack(false),
7488 abstract_living_using_item: AbstractLivingUsingItem(false),
7489 health: Health(1.0),
7490 effect_particles: EffectParticles(Default::default()),
7491 effect_ambience: EffectAmbience(false),
7492 arrow_count: ArrowCount(0),
7493 stinger_count: StingerCount(0),
7494 sleeping_pos: SleepingPos(None),
7495 },
7496 no_ai: NoAi(false),
7497 left_handed: LeftHanded(false),
7498 aggressive: Aggressive(false),
7499 },
7500 },
7501 abstract_ageable_baby: AbstractAgeableBaby(false),
7502 },
7503 },
7504 is_screaming_goat: IsScreamingGoat(false),
7505 has_left_horn: HasLeftHorn(true),
7506 has_right_horn: HasRightHorn(true),
7507 }
7508 }
7509}
7510
7511#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7513pub struct IsLeashHolder(pub bool);
7514#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7516pub struct StaysStill(pub bool);
7517#[derive(Component)]
7544pub struct HappyGhast;
7545impl HappyGhast {
7546 pub fn apply_metadata(
7547 entity: &mut bevy_ecs::system::EntityCommands,
7548 d: EntityDataItem,
7549 ) -> Result<(), UpdateMetadataError> {
7550 match d.index {
7551 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7552 17 => {
7553 entity.insert(IsLeashHolder(d.value.into_boolean()?));
7554 }
7555 18 => {
7556 entity.insert(StaysStill(d.value.into_boolean()?));
7557 }
7558 _ => {}
7559 }
7560 Ok(())
7561 }
7562}
7563
7564#[derive(Bundle)]
7568pub struct HappyGhastMetadataBundle {
7569 _marker: HappyGhast,
7570 parent: AbstractAnimalMetadataBundle,
7571 is_leash_holder: IsLeashHolder,
7572 stays_still: StaysStill,
7573}
7574impl Default for HappyGhastMetadataBundle {
7575 fn default() -> Self {
7576 Self {
7577 _marker: HappyGhast,
7578 parent: AbstractAnimalMetadataBundle {
7579 _marker: AbstractAnimal,
7580 parent: AbstractAgeableMetadataBundle {
7581 _marker: AbstractAgeable,
7582 parent: AbstractCreatureMetadataBundle {
7583 _marker: AbstractCreature,
7584 parent: AbstractInsentientMetadataBundle {
7585 _marker: AbstractInsentient,
7586 parent: AbstractLivingMetadataBundle {
7587 _marker: AbstractLiving,
7588 parent: AbstractEntityMetadataBundle {
7589 _marker: AbstractEntity,
7590 on_fire: OnFire(false),
7591 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7592 false,
7593 ),
7594 sprinting: Sprinting(false),
7595 swimming: Swimming(false),
7596 currently_glowing: CurrentlyGlowing(false),
7597 invisible: Invisible(false),
7598 fall_flying: FallFlying(false),
7599 air_supply: AirSupply(Default::default()),
7600 custom_name: CustomName(Default::default()),
7601 custom_name_visible: CustomNameVisible(Default::default()),
7602 silent: Silent(Default::default()),
7603 no_gravity: NoGravity(Default::default()),
7604 pose: Pose::default(),
7605 ticks_frozen: TicksFrozen(Default::default()),
7606 },
7607 auto_spin_attack: AutoSpinAttack(false),
7608 abstract_living_using_item: AbstractLivingUsingItem(false),
7609 health: Health(1.0),
7610 effect_particles: EffectParticles(Default::default()),
7611 effect_ambience: EffectAmbience(false),
7612 arrow_count: ArrowCount(0),
7613 stinger_count: StingerCount(0),
7614 sleeping_pos: SleepingPos(None),
7615 },
7616 no_ai: NoAi(false),
7617 left_handed: LeftHanded(false),
7618 aggressive: Aggressive(false),
7619 },
7620 },
7621 abstract_ageable_baby: AbstractAgeableBaby(false),
7622 },
7623 },
7624 is_leash_holder: IsLeashHolder(false),
7625 stays_still: StaysStill(false),
7626 }
7627 }
7628}
7629
7630#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7632pub struct HoglinImmuneToZombification(pub bool);
7633#[derive(Component)]
7658pub struct Hoglin;
7659impl Hoglin {
7660 pub fn apply_metadata(
7661 entity: &mut bevy_ecs::system::EntityCommands,
7662 d: EntityDataItem,
7663 ) -> Result<(), UpdateMetadataError> {
7664 match d.index {
7665 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7666 17 => {
7667 entity.insert(HoglinImmuneToZombification(d.value.into_boolean()?));
7668 }
7669 _ => {}
7670 }
7671 Ok(())
7672 }
7673}
7674
7675#[derive(Bundle)]
7679pub struct HoglinMetadataBundle {
7680 _marker: Hoglin,
7681 parent: AbstractAnimalMetadataBundle,
7682 hoglin_immune_to_zombification: HoglinImmuneToZombification,
7683}
7684impl Default for HoglinMetadataBundle {
7685 fn default() -> Self {
7686 Self {
7687 _marker: Hoglin,
7688 parent: AbstractAnimalMetadataBundle {
7689 _marker: AbstractAnimal,
7690 parent: AbstractAgeableMetadataBundle {
7691 _marker: AbstractAgeable,
7692 parent: AbstractCreatureMetadataBundle {
7693 _marker: AbstractCreature,
7694 parent: AbstractInsentientMetadataBundle {
7695 _marker: AbstractInsentient,
7696 parent: AbstractLivingMetadataBundle {
7697 _marker: AbstractLiving,
7698 parent: AbstractEntityMetadataBundle {
7699 _marker: AbstractEntity,
7700 on_fire: OnFire(false),
7701 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7702 false,
7703 ),
7704 sprinting: Sprinting(false),
7705 swimming: Swimming(false),
7706 currently_glowing: CurrentlyGlowing(false),
7707 invisible: Invisible(false),
7708 fall_flying: FallFlying(false),
7709 air_supply: AirSupply(Default::default()),
7710 custom_name: CustomName(Default::default()),
7711 custom_name_visible: CustomNameVisible(Default::default()),
7712 silent: Silent(Default::default()),
7713 no_gravity: NoGravity(Default::default()),
7714 pose: Pose::default(),
7715 ticks_frozen: TicksFrozen(Default::default()),
7716 },
7717 auto_spin_attack: AutoSpinAttack(false),
7718 abstract_living_using_item: AbstractLivingUsingItem(false),
7719 health: Health(1.0),
7720 effect_particles: EffectParticles(Default::default()),
7721 effect_ambience: EffectAmbience(false),
7722 arrow_count: ArrowCount(0),
7723 stinger_count: StingerCount(0),
7724 sleeping_pos: SleepingPos(None),
7725 },
7726 no_ai: NoAi(false),
7727 left_handed: LeftHanded(false),
7728 aggressive: Aggressive(false),
7729 },
7730 },
7731 abstract_ageable_baby: AbstractAgeableBaby(false),
7732 },
7733 },
7734 hoglin_immune_to_zombification: HoglinImmuneToZombification(false),
7735 }
7736 }
7737}
7738
7739#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7741pub struct MooshroomKind(pub i32);
7742#[derive(Component)]
7768pub struct Mooshroom;
7769impl Mooshroom {
7770 pub fn apply_metadata(
7771 entity: &mut bevy_ecs::system::EntityCommands,
7772 d: EntityDataItem,
7773 ) -> Result<(), UpdateMetadataError> {
7774 match d.index {
7775 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7776 17 => {
7777 entity.insert(MooshroomKind(d.value.into_int()?));
7778 }
7779 _ => {}
7780 }
7781 Ok(())
7782 }
7783}
7784
7785#[derive(Bundle)]
7789pub struct MooshroomMetadataBundle {
7790 _marker: Mooshroom,
7791 parent: AbstractAnimalMetadataBundle,
7792 mooshroom_kind: MooshroomKind,
7793}
7794impl Default for MooshroomMetadataBundle {
7795 fn default() -> Self {
7796 Self {
7797 _marker: Mooshroom,
7798 parent: AbstractAnimalMetadataBundle {
7799 _marker: AbstractAnimal,
7800 parent: AbstractAgeableMetadataBundle {
7801 _marker: AbstractAgeable,
7802 parent: AbstractCreatureMetadataBundle {
7803 _marker: AbstractCreature,
7804 parent: AbstractInsentientMetadataBundle {
7805 _marker: AbstractInsentient,
7806 parent: AbstractLivingMetadataBundle {
7807 _marker: AbstractLiving,
7808 parent: AbstractEntityMetadataBundle {
7809 _marker: AbstractEntity,
7810 on_fire: OnFire(false),
7811 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7812 false,
7813 ),
7814 sprinting: Sprinting(false),
7815 swimming: Swimming(false),
7816 currently_glowing: CurrentlyGlowing(false),
7817 invisible: Invisible(false),
7818 fall_flying: FallFlying(false),
7819 air_supply: AirSupply(Default::default()),
7820 custom_name: CustomName(Default::default()),
7821 custom_name_visible: CustomNameVisible(Default::default()),
7822 silent: Silent(Default::default()),
7823 no_gravity: NoGravity(Default::default()),
7824 pose: Pose::default(),
7825 ticks_frozen: TicksFrozen(Default::default()),
7826 },
7827 auto_spin_attack: AutoSpinAttack(false),
7828 abstract_living_using_item: AbstractLivingUsingItem(false),
7829 health: Health(1.0),
7830 effect_particles: EffectParticles(Default::default()),
7831 effect_ambience: EffectAmbience(false),
7832 arrow_count: ArrowCount(0),
7833 stinger_count: StingerCount(0),
7834 sleeping_pos: SleepingPos(None),
7835 },
7836 no_ai: NoAi(false),
7837 left_handed: LeftHanded(false),
7838 aggressive: Aggressive(false),
7839 },
7840 },
7841 abstract_ageable_baby: AbstractAgeableBaby(false),
7842 },
7843 },
7844 mooshroom_kind: MooshroomKind(Default::default()),
7845 }
7846 }
7847}
7848
7849#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7851pub struct Trusting(pub bool);
7852#[derive(Component)]
7877pub struct Ocelot;
7878impl Ocelot {
7879 pub fn apply_metadata(
7880 entity: &mut bevy_ecs::system::EntityCommands,
7881 d: EntityDataItem,
7882 ) -> Result<(), UpdateMetadataError> {
7883 match d.index {
7884 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
7885 17 => {
7886 entity.insert(Trusting(d.value.into_boolean()?));
7887 }
7888 _ => {}
7889 }
7890 Ok(())
7891 }
7892}
7893
7894#[derive(Bundle)]
7898pub struct OcelotMetadataBundle {
7899 _marker: Ocelot,
7900 parent: AbstractAnimalMetadataBundle,
7901 trusting: Trusting,
7902}
7903impl Default for OcelotMetadataBundle {
7904 fn default() -> Self {
7905 Self {
7906 _marker: Ocelot,
7907 parent: AbstractAnimalMetadataBundle {
7908 _marker: AbstractAnimal,
7909 parent: AbstractAgeableMetadataBundle {
7910 _marker: AbstractAgeable,
7911 parent: AbstractCreatureMetadataBundle {
7912 _marker: AbstractCreature,
7913 parent: AbstractInsentientMetadataBundle {
7914 _marker: AbstractInsentient,
7915 parent: AbstractLivingMetadataBundle {
7916 _marker: AbstractLiving,
7917 parent: AbstractEntityMetadataBundle {
7918 _marker: AbstractEntity,
7919 on_fire: OnFire(false),
7920 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
7921 false,
7922 ),
7923 sprinting: Sprinting(false),
7924 swimming: Swimming(false),
7925 currently_glowing: CurrentlyGlowing(false),
7926 invisible: Invisible(false),
7927 fall_flying: FallFlying(false),
7928 air_supply: AirSupply(Default::default()),
7929 custom_name: CustomName(Default::default()),
7930 custom_name_visible: CustomNameVisible(Default::default()),
7931 silent: Silent(Default::default()),
7932 no_gravity: NoGravity(Default::default()),
7933 pose: Pose::default(),
7934 ticks_frozen: TicksFrozen(Default::default()),
7935 },
7936 auto_spin_attack: AutoSpinAttack(false),
7937 abstract_living_using_item: AbstractLivingUsingItem(false),
7938 health: Health(1.0),
7939 effect_particles: EffectParticles(Default::default()),
7940 effect_ambience: EffectAmbience(false),
7941 arrow_count: ArrowCount(0),
7942 stinger_count: StingerCount(0),
7943 sleeping_pos: SleepingPos(None),
7944 },
7945 no_ai: NoAi(false),
7946 left_handed: LeftHanded(false),
7947 aggressive: Aggressive(false),
7948 },
7949 },
7950 abstract_ageable_baby: AbstractAgeableBaby(false),
7951 },
7952 },
7953 trusting: Trusting(false),
7954 }
7955 }
7956}
7957
7958#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7960pub struct PandaUnhappyCounter(pub i32);
7961#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7963pub struct SneezeCounter(pub i32);
7964#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7966pub struct EatCounter(pub i32);
7967#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7968pub struct Sneezing(pub bool);
7970#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7971pub struct PandaSitting(pub bool);
7973#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7974pub struct OnBack(pub bool);
7976#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
7977pub struct PandaRolling(pub bool);
7979#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7981pub struct HiddenGene(pub u8);
7982#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
7984pub struct PandaFlags(pub u8);
7985#[derive(Component)]
8018pub struct Panda;
8019impl Panda {
8020 pub fn apply_metadata(
8021 entity: &mut bevy_ecs::system::EntityCommands,
8022 d: EntityDataItem,
8023 ) -> Result<(), UpdateMetadataError> {
8024 match d.index {
8025 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8026 17 => {
8027 entity.insert(PandaUnhappyCounter(d.value.into_int()?));
8028 }
8029 18 => {
8030 entity.insert(SneezeCounter(d.value.into_int()?));
8031 }
8032 19 => {
8033 entity.insert(EatCounter(d.value.into_int()?));
8034 }
8035 20 => {
8036 let bitfield = d.value.into_byte()?;
8037 entity.insert(Sneezing(bitfield & 0x2 != 0));
8038 entity.insert(PandaSitting(bitfield & 0x8 != 0));
8039 entity.insert(OnBack(bitfield & 0x10 != 0));
8040 entity.insert(PandaRolling(bitfield & 0x4 != 0));
8041 }
8042 21 => {
8043 entity.insert(HiddenGene(d.value.into_byte()?));
8044 }
8045 22 => {
8046 entity.insert(PandaFlags(d.value.into_byte()?));
8047 }
8048 _ => {}
8049 }
8050 Ok(())
8051 }
8052}
8053
8054#[derive(Bundle)]
8058pub struct PandaMetadataBundle {
8059 _marker: Panda,
8060 parent: AbstractAnimalMetadataBundle,
8061 panda_unhappy_counter: PandaUnhappyCounter,
8062 sneeze_counter: SneezeCounter,
8063 eat_counter: EatCounter,
8064 sneezing: Sneezing,
8065 panda_sitting: PandaSitting,
8066 on_back: OnBack,
8067 panda_rolling: PandaRolling,
8068 hidden_gene: HiddenGene,
8069 panda_flags: PandaFlags,
8070}
8071impl Default for PandaMetadataBundle {
8072 fn default() -> Self {
8073 Self {
8074 _marker: Panda,
8075 parent: AbstractAnimalMetadataBundle {
8076 _marker: AbstractAnimal,
8077 parent: AbstractAgeableMetadataBundle {
8078 _marker: AbstractAgeable,
8079 parent: AbstractCreatureMetadataBundle {
8080 _marker: AbstractCreature,
8081 parent: AbstractInsentientMetadataBundle {
8082 _marker: AbstractInsentient,
8083 parent: AbstractLivingMetadataBundle {
8084 _marker: AbstractLiving,
8085 parent: AbstractEntityMetadataBundle {
8086 _marker: AbstractEntity,
8087 on_fire: OnFire(false),
8088 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8089 false,
8090 ),
8091 sprinting: Sprinting(false),
8092 swimming: Swimming(false),
8093 currently_glowing: CurrentlyGlowing(false),
8094 invisible: Invisible(false),
8095 fall_flying: FallFlying(false),
8096 air_supply: AirSupply(Default::default()),
8097 custom_name: CustomName(Default::default()),
8098 custom_name_visible: CustomNameVisible(Default::default()),
8099 silent: Silent(Default::default()),
8100 no_gravity: NoGravity(Default::default()),
8101 pose: Pose::default(),
8102 ticks_frozen: TicksFrozen(Default::default()),
8103 },
8104 auto_spin_attack: AutoSpinAttack(false),
8105 abstract_living_using_item: AbstractLivingUsingItem(false),
8106 health: Health(1.0),
8107 effect_particles: EffectParticles(Default::default()),
8108 effect_ambience: EffectAmbience(false),
8109 arrow_count: ArrowCount(0),
8110 stinger_count: StingerCount(0),
8111 sleeping_pos: SleepingPos(None),
8112 },
8113 no_ai: NoAi(false),
8114 left_handed: LeftHanded(false),
8115 aggressive: Aggressive(false),
8116 },
8117 },
8118 abstract_ageable_baby: AbstractAgeableBaby(false),
8119 },
8120 },
8121 panda_unhappy_counter: PandaUnhappyCounter(0),
8122 sneeze_counter: SneezeCounter(0),
8123 eat_counter: EatCounter(0),
8124 sneezing: Sneezing(false),
8125 panda_sitting: PandaSitting(false),
8126 on_back: OnBack(false),
8127 panda_rolling: PandaRolling(false),
8128 hidden_gene: HiddenGene(0),
8129 panda_flags: PandaFlags(0),
8130 }
8131 }
8132}
8133
8134#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8136pub struct PigBoostTime(pub i32);
8137#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8139pub struct PigVariant(pub azalea_registry::data::FrogVariant);
8140#[derive(Component)]
8166pub struct Pig;
8167impl Pig {
8168 pub fn apply_metadata(
8169 entity: &mut bevy_ecs::system::EntityCommands,
8170 d: EntityDataItem,
8171 ) -> Result<(), UpdateMetadataError> {
8172 match d.index {
8173 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8174 17 => {
8175 entity.insert(PigBoostTime(d.value.into_int()?));
8176 }
8177 18 => {
8178 entity.insert(PigVariant(d.value.into_frog_variant()?));
8179 }
8180 _ => {}
8181 }
8182 Ok(())
8183 }
8184}
8185
8186#[derive(Bundle)]
8190pub struct PigMetadataBundle {
8191 _marker: Pig,
8192 parent: AbstractAnimalMetadataBundle,
8193 pig_boost_time: PigBoostTime,
8194 pig_variant: PigVariant,
8195}
8196impl Default for PigMetadataBundle {
8197 fn default() -> Self {
8198 Self {
8199 _marker: Pig,
8200 parent: AbstractAnimalMetadataBundle {
8201 _marker: AbstractAnimal,
8202 parent: AbstractAgeableMetadataBundle {
8203 _marker: AbstractAgeable,
8204 parent: AbstractCreatureMetadataBundle {
8205 _marker: AbstractCreature,
8206 parent: AbstractInsentientMetadataBundle {
8207 _marker: AbstractInsentient,
8208 parent: AbstractLivingMetadataBundle {
8209 _marker: AbstractLiving,
8210 parent: AbstractEntityMetadataBundle {
8211 _marker: AbstractEntity,
8212 on_fire: OnFire(false),
8213 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8214 false,
8215 ),
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 pig_boost_time: PigBoostTime(0),
8247 pig_variant: PigVariant(azalea_registry::data::FrogVariant::new_raw(0)),
8248 }
8249 }
8250}
8251
8252#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8254pub struct PolarBearStanding(pub bool);
8255#[derive(Component)]
8281pub struct PolarBear;
8282impl PolarBear {
8283 pub fn apply_metadata(
8284 entity: &mut bevy_ecs::system::EntityCommands,
8285 d: EntityDataItem,
8286 ) -> Result<(), UpdateMetadataError> {
8287 match d.index {
8288 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8289 17 => {
8290 entity.insert(PolarBearStanding(d.value.into_boolean()?));
8291 }
8292 _ => {}
8293 }
8294 Ok(())
8295 }
8296}
8297
8298#[derive(Bundle)]
8302pub struct PolarBearMetadataBundle {
8303 _marker: PolarBear,
8304 parent: AbstractAnimalMetadataBundle,
8305 polar_bear_standing: PolarBearStanding,
8306}
8307impl Default for PolarBearMetadataBundle {
8308 fn default() -> Self {
8309 Self {
8310 _marker: PolarBear,
8311 parent: AbstractAnimalMetadataBundle {
8312 _marker: AbstractAnimal,
8313 parent: AbstractAgeableMetadataBundle {
8314 _marker: AbstractAgeable,
8315 parent: AbstractCreatureMetadataBundle {
8316 _marker: AbstractCreature,
8317 parent: AbstractInsentientMetadataBundle {
8318 _marker: AbstractInsentient,
8319 parent: AbstractLivingMetadataBundle {
8320 _marker: AbstractLiving,
8321 parent: AbstractEntityMetadataBundle {
8322 _marker: AbstractEntity,
8323 on_fire: OnFire(false),
8324 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8325 false,
8326 ),
8327 sprinting: Sprinting(false),
8328 swimming: Swimming(false),
8329 currently_glowing: CurrentlyGlowing(false),
8330 invisible: Invisible(false),
8331 fall_flying: FallFlying(false),
8332 air_supply: AirSupply(Default::default()),
8333 custom_name: CustomName(Default::default()),
8334 custom_name_visible: CustomNameVisible(Default::default()),
8335 silent: Silent(Default::default()),
8336 no_gravity: NoGravity(Default::default()),
8337 pose: Pose::default(),
8338 ticks_frozen: TicksFrozen(Default::default()),
8339 },
8340 auto_spin_attack: AutoSpinAttack(false),
8341 abstract_living_using_item: AbstractLivingUsingItem(false),
8342 health: Health(1.0),
8343 effect_particles: EffectParticles(Default::default()),
8344 effect_ambience: EffectAmbience(false),
8345 arrow_count: ArrowCount(0),
8346 stinger_count: StingerCount(0),
8347 sleeping_pos: SleepingPos(None),
8348 },
8349 no_ai: NoAi(false),
8350 left_handed: LeftHanded(false),
8351 aggressive: Aggressive(false),
8352 },
8353 },
8354 abstract_ageable_baby: AbstractAgeableBaby(false),
8355 },
8356 },
8357 polar_bear_standing: PolarBearStanding(false),
8358 }
8359 }
8360}
8361
8362#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8364pub struct RabbitKind(pub i32);
8365#[derive(Component)]
8390pub struct Rabbit;
8391impl Rabbit {
8392 pub fn apply_metadata(
8393 entity: &mut bevy_ecs::system::EntityCommands,
8394 d: EntityDataItem,
8395 ) -> Result<(), UpdateMetadataError> {
8396 match d.index {
8397 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8398 17 => {
8399 entity.insert(RabbitKind(d.value.into_int()?));
8400 }
8401 _ => {}
8402 }
8403 Ok(())
8404 }
8405}
8406
8407#[derive(Bundle)]
8411pub struct RabbitMetadataBundle {
8412 _marker: Rabbit,
8413 parent: AbstractAnimalMetadataBundle,
8414 rabbit_kind: RabbitKind,
8415}
8416impl Default for RabbitMetadataBundle {
8417 fn default() -> Self {
8418 Self {
8419 _marker: Rabbit,
8420 parent: AbstractAnimalMetadataBundle {
8421 _marker: AbstractAnimal,
8422 parent: AbstractAgeableMetadataBundle {
8423 _marker: AbstractAgeable,
8424 parent: AbstractCreatureMetadataBundle {
8425 _marker: AbstractCreature,
8426 parent: AbstractInsentientMetadataBundle {
8427 _marker: AbstractInsentient,
8428 parent: AbstractLivingMetadataBundle {
8429 _marker: AbstractLiving,
8430 parent: AbstractEntityMetadataBundle {
8431 _marker: AbstractEntity,
8432 on_fire: OnFire(false),
8433 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8434 false,
8435 ),
8436 sprinting: Sprinting(false),
8437 swimming: Swimming(false),
8438 currently_glowing: CurrentlyGlowing(false),
8439 invisible: Invisible(false),
8440 fall_flying: FallFlying(false),
8441 air_supply: AirSupply(Default::default()),
8442 custom_name: CustomName(Default::default()),
8443 custom_name_visible: CustomNameVisible(Default::default()),
8444 silent: Silent(Default::default()),
8445 no_gravity: NoGravity(Default::default()),
8446 pose: Pose::default(),
8447 ticks_frozen: TicksFrozen(Default::default()),
8448 },
8449 auto_spin_attack: AutoSpinAttack(false),
8450 abstract_living_using_item: AbstractLivingUsingItem(false),
8451 health: Health(1.0),
8452 effect_particles: EffectParticles(Default::default()),
8453 effect_ambience: EffectAmbience(false),
8454 arrow_count: ArrowCount(0),
8455 stinger_count: StingerCount(0),
8456 sleeping_pos: SleepingPos(None),
8457 },
8458 no_ai: NoAi(false),
8459 left_handed: LeftHanded(false),
8460 aggressive: Aggressive(false),
8461 },
8462 },
8463 abstract_ageable_baby: AbstractAgeableBaby(false),
8464 },
8465 },
8466 rabbit_kind: RabbitKind(Default::default()),
8467 }
8468 }
8469}
8470
8471#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8472pub struct SheepSheared(pub bool);
8474#[derive(Component)]
8499pub struct Sheep;
8500impl Sheep {
8501 pub fn apply_metadata(
8502 entity: &mut bevy_ecs::system::EntityCommands,
8503 d: EntityDataItem,
8504 ) -> Result<(), UpdateMetadataError> {
8505 match d.index {
8506 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8507 17 => {
8508 let bitfield = d.value.into_byte()?;
8509 entity.insert(SheepSheared(bitfield & 0x10 != 0));
8510 }
8511 _ => {}
8512 }
8513 Ok(())
8514 }
8515}
8516
8517#[derive(Bundle)]
8521pub struct SheepMetadataBundle {
8522 _marker: Sheep,
8523 parent: AbstractAnimalMetadataBundle,
8524 sheep_sheared: SheepSheared,
8525}
8526impl Default for SheepMetadataBundle {
8527 fn default() -> Self {
8528 Self {
8529 _marker: Sheep,
8530 parent: AbstractAnimalMetadataBundle {
8531 _marker: AbstractAnimal,
8532 parent: AbstractAgeableMetadataBundle {
8533 _marker: AbstractAgeable,
8534 parent: AbstractCreatureMetadataBundle {
8535 _marker: AbstractCreature,
8536 parent: AbstractInsentientMetadataBundle {
8537 _marker: AbstractInsentient,
8538 parent: AbstractLivingMetadataBundle {
8539 _marker: AbstractLiving,
8540 parent: AbstractEntityMetadataBundle {
8541 _marker: AbstractEntity,
8542 on_fire: OnFire(false),
8543 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8544 false,
8545 ),
8546 sprinting: Sprinting(false),
8547 swimming: Swimming(false),
8548 currently_glowing: CurrentlyGlowing(false),
8549 invisible: Invisible(false),
8550 fall_flying: FallFlying(false),
8551 air_supply: AirSupply(Default::default()),
8552 custom_name: CustomName(Default::default()),
8553 custom_name_visible: CustomNameVisible(Default::default()),
8554 silent: Silent(Default::default()),
8555 no_gravity: NoGravity(Default::default()),
8556 pose: Pose::default(),
8557 ticks_frozen: TicksFrozen(Default::default()),
8558 },
8559 auto_spin_attack: AutoSpinAttack(false),
8560 abstract_living_using_item: AbstractLivingUsingItem(false),
8561 health: Health(1.0),
8562 effect_particles: EffectParticles(Default::default()),
8563 effect_ambience: EffectAmbience(false),
8564 arrow_count: ArrowCount(0),
8565 stinger_count: StingerCount(0),
8566 sleeping_pos: SleepingPos(None),
8567 },
8568 no_ai: NoAi(false),
8569 left_handed: LeftHanded(false),
8570 aggressive: Aggressive(false),
8571 },
8572 },
8573 abstract_ageable_baby: AbstractAgeableBaby(false),
8574 },
8575 },
8576 sheep_sheared: SheepSheared(false),
8577 }
8578 }
8579}
8580
8581#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8583pub struct SnifferState(pub SnifferStateKind);
8584#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8586pub struct DropSeedAtTick(pub i32);
8587#[derive(Component)]
8613pub struct Sniffer;
8614impl Sniffer {
8615 pub fn apply_metadata(
8616 entity: &mut bevy_ecs::system::EntityCommands,
8617 d: EntityDataItem,
8618 ) -> Result<(), UpdateMetadataError> {
8619 match d.index {
8620 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8621 17 => {
8622 entity.insert(SnifferState(d.value.into_sniffer_state()?));
8623 }
8624 18 => {
8625 entity.insert(DropSeedAtTick(d.value.into_int()?));
8626 }
8627 _ => {}
8628 }
8629 Ok(())
8630 }
8631}
8632
8633#[derive(Bundle)]
8637pub struct SnifferMetadataBundle {
8638 _marker: Sniffer,
8639 parent: AbstractAnimalMetadataBundle,
8640 sniffer_state: SnifferState,
8641 drop_seed_at_tick: DropSeedAtTick,
8642}
8643impl Default for SnifferMetadataBundle {
8644 fn default() -> Self {
8645 Self {
8646 _marker: Sniffer,
8647 parent: AbstractAnimalMetadataBundle {
8648 _marker: AbstractAnimal,
8649 parent: AbstractAgeableMetadataBundle {
8650 _marker: AbstractAgeable,
8651 parent: AbstractCreatureMetadataBundle {
8652 _marker: AbstractCreature,
8653 parent: AbstractInsentientMetadataBundle {
8654 _marker: AbstractInsentient,
8655 parent: AbstractLivingMetadataBundle {
8656 _marker: AbstractLiving,
8657 parent: AbstractEntityMetadataBundle {
8658 _marker: AbstractEntity,
8659 on_fire: OnFire(false),
8660 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8661 false,
8662 ),
8663 sprinting: Sprinting(false),
8664 swimming: Swimming(false),
8665 currently_glowing: CurrentlyGlowing(false),
8666 invisible: Invisible(false),
8667 fall_flying: FallFlying(false),
8668 air_supply: AirSupply(Default::default()),
8669 custom_name: CustomName(Default::default()),
8670 custom_name_visible: CustomNameVisible(Default::default()),
8671 silent: Silent(Default::default()),
8672 no_gravity: NoGravity(Default::default()),
8673 pose: Pose::default(),
8674 ticks_frozen: TicksFrozen(Default::default()),
8675 },
8676 auto_spin_attack: AutoSpinAttack(false),
8677 abstract_living_using_item: AbstractLivingUsingItem(false),
8678 health: Health(1.0),
8679 effect_particles: EffectParticles(Default::default()),
8680 effect_ambience: EffectAmbience(false),
8681 arrow_count: ArrowCount(0),
8682 stinger_count: StingerCount(0),
8683 sleeping_pos: SleepingPos(None),
8684 },
8685 no_ai: NoAi(false),
8686 left_handed: LeftHanded(false),
8687 aggressive: Aggressive(false),
8688 },
8689 },
8690 abstract_ageable_baby: AbstractAgeableBaby(false),
8691 },
8692 },
8693 sniffer_state: SnifferState(Default::default()),
8694 drop_seed_at_tick: DropSeedAtTick(0),
8695 }
8696 }
8697}
8698
8699#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8701pub struct StriderBoostTime(pub i32);
8702#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8704pub struct Suffocating(pub bool);
8705#[derive(Component)]
8731pub struct Strider;
8732impl Strider {
8733 pub fn apply_metadata(
8734 entity: &mut bevy_ecs::system::EntityCommands,
8735 d: EntityDataItem,
8736 ) -> Result<(), UpdateMetadataError> {
8737 match d.index {
8738 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8739 17 => {
8740 entity.insert(StriderBoostTime(d.value.into_int()?));
8741 }
8742 18 => {
8743 entity.insert(Suffocating(d.value.into_boolean()?));
8744 }
8745 _ => {}
8746 }
8747 Ok(())
8748 }
8749}
8750
8751#[derive(Bundle)]
8755pub struct StriderMetadataBundle {
8756 _marker: Strider,
8757 parent: AbstractAnimalMetadataBundle,
8758 strider_boost_time: StriderBoostTime,
8759 suffocating: Suffocating,
8760}
8761impl Default for StriderMetadataBundle {
8762 fn default() -> Self {
8763 Self {
8764 _marker: Strider,
8765 parent: AbstractAnimalMetadataBundle {
8766 _marker: AbstractAnimal,
8767 parent: AbstractAgeableMetadataBundle {
8768 _marker: AbstractAgeable,
8769 parent: AbstractCreatureMetadataBundle {
8770 _marker: AbstractCreature,
8771 parent: AbstractInsentientMetadataBundle {
8772 _marker: AbstractInsentient,
8773 parent: AbstractLivingMetadataBundle {
8774 _marker: AbstractLiving,
8775 parent: AbstractEntityMetadataBundle {
8776 _marker: AbstractEntity,
8777 on_fire: OnFire(false),
8778 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8779 false,
8780 ),
8781 sprinting: Sprinting(false),
8782 swimming: Swimming(false),
8783 currently_glowing: CurrentlyGlowing(false),
8784 invisible: Invisible(false),
8785 fall_flying: FallFlying(false),
8786 air_supply: AirSupply(Default::default()),
8787 custom_name: CustomName(Default::default()),
8788 custom_name_visible: CustomNameVisible(Default::default()),
8789 silent: Silent(Default::default()),
8790 no_gravity: NoGravity(Default::default()),
8791 pose: Pose::default(),
8792 ticks_frozen: TicksFrozen(Default::default()),
8793 },
8794 auto_spin_attack: AutoSpinAttack(false),
8795 abstract_living_using_item: AbstractLivingUsingItem(false),
8796 health: Health(1.0),
8797 effect_particles: EffectParticles(Default::default()),
8798 effect_ambience: EffectAmbience(false),
8799 arrow_count: ArrowCount(0),
8800 stinger_count: StingerCount(0),
8801 sleeping_pos: SleepingPos(None),
8802 },
8803 no_ai: NoAi(false),
8804 left_handed: LeftHanded(false),
8805 aggressive: Aggressive(false),
8806 },
8807 },
8808 abstract_ageable_baby: AbstractAgeableBaby(false),
8809 },
8810 },
8811 strider_boost_time: StriderBoostTime(0),
8812 suffocating: Suffocating(false),
8813 }
8814 }
8815}
8816
8817#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8819pub struct HasEgg(pub bool);
8820#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
8822pub struct LayingEgg(pub bool);
8823#[derive(Component)]
8849pub struct Turtle;
8850impl Turtle {
8851 pub fn apply_metadata(
8852 entity: &mut bevy_ecs::system::EntityCommands,
8853 d: EntityDataItem,
8854 ) -> Result<(), UpdateMetadataError> {
8855 match d.index {
8856 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8857 17 => {
8858 entity.insert(HasEgg(d.value.into_boolean()?));
8859 }
8860 18 => {
8861 entity.insert(LayingEgg(d.value.into_boolean()?));
8862 }
8863 _ => {}
8864 }
8865 Ok(())
8866 }
8867}
8868
8869#[derive(Bundle)]
8873pub struct TurtleMetadataBundle {
8874 _marker: Turtle,
8875 parent: AbstractAnimalMetadataBundle,
8876 has_egg: HasEgg,
8877 laying_egg: LayingEgg,
8878}
8879impl Default for TurtleMetadataBundle {
8880 fn default() -> Self {
8881 Self {
8882 _marker: Turtle,
8883 parent: AbstractAnimalMetadataBundle {
8884 _marker: AbstractAnimal,
8885 parent: AbstractAgeableMetadataBundle {
8886 _marker: AbstractAgeable,
8887 parent: AbstractCreatureMetadataBundle {
8888 _marker: AbstractCreature,
8889 parent: AbstractInsentientMetadataBundle {
8890 _marker: AbstractInsentient,
8891 parent: AbstractLivingMetadataBundle {
8892 _marker: AbstractLiving,
8893 parent: AbstractEntityMetadataBundle {
8894 _marker: AbstractEntity,
8895 on_fire: OnFire(false),
8896 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
8897 false,
8898 ),
8899 sprinting: Sprinting(false),
8900 swimming: Swimming(false),
8901 currently_glowing: CurrentlyGlowing(false),
8902 invisible: Invisible(false),
8903 fall_flying: FallFlying(false),
8904 air_supply: AirSupply(Default::default()),
8905 custom_name: CustomName(Default::default()),
8906 custom_name_visible: CustomNameVisible(Default::default()),
8907 silent: Silent(Default::default()),
8908 no_gravity: NoGravity(Default::default()),
8909 pose: Pose::default(),
8910 ticks_frozen: TicksFrozen(Default::default()),
8911 },
8912 auto_spin_attack: AutoSpinAttack(false),
8913 abstract_living_using_item: AbstractLivingUsingItem(false),
8914 health: Health(1.0),
8915 effect_particles: EffectParticles(Default::default()),
8916 effect_ambience: EffectAmbience(false),
8917 arrow_count: ArrowCount(0),
8918 stinger_count: StingerCount(0),
8919 sleeping_pos: SleepingPos(None),
8920 },
8921 no_ai: NoAi(false),
8922 left_handed: LeftHanded(false),
8923 aggressive: Aggressive(false),
8924 },
8925 },
8926 abstract_ageable_baby: AbstractAgeableBaby(false),
8927 },
8928 },
8929 has_egg: HasEgg(false),
8930 laying_egg: LayingEgg(false),
8931 }
8932 }
8933}
8934
8935#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8936pub struct Tamed(pub bool);
8938#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8939pub struct Eating(pub bool);
8941#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8942pub struct AbstractHorseStanding(pub bool);
8944#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
8945pub struct Bred(pub bool);
8947#[derive(Component)]
8985pub struct AbstractHorse;
8986impl AbstractHorse {
8987 pub fn apply_metadata(
8988 entity: &mut bevy_ecs::system::EntityCommands,
8989 d: EntityDataItem,
8990 ) -> Result<(), UpdateMetadataError> {
8991 match d.index {
8992 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
8993 17 => {
8994 let bitfield = d.value.into_byte()?;
8995 entity.insert(Tamed(bitfield & 0x2 != 0));
8996 entity.insert(Eating(bitfield & 0x10 != 0));
8997 entity.insert(AbstractHorseStanding(bitfield & 0x20 != 0));
8998 entity.insert(Bred(bitfield & 0x8 != 0));
8999 }
9000 _ => {}
9001 }
9002 Ok(())
9003 }
9004}
9005
9006#[derive(Bundle)]
9010pub struct AbstractHorseMetadataBundle {
9011 _marker: AbstractHorse,
9012 parent: AbstractAnimalMetadataBundle,
9013 tamed: Tamed,
9014 eating: Eating,
9015 abstract_horse_standing: AbstractHorseStanding,
9016 bred: Bred,
9017}
9018impl Default for AbstractHorseMetadataBundle {
9019 fn default() -> Self {
9020 Self {
9021 _marker: AbstractHorse,
9022 parent: AbstractAnimalMetadataBundle {
9023 _marker: AbstractAnimal,
9024 parent: AbstractAgeableMetadataBundle {
9025 _marker: AbstractAgeable,
9026 parent: AbstractCreatureMetadataBundle {
9027 _marker: AbstractCreature,
9028 parent: AbstractInsentientMetadataBundle {
9029 _marker: AbstractInsentient,
9030 parent: AbstractLivingMetadataBundle {
9031 _marker: AbstractLiving,
9032 parent: AbstractEntityMetadataBundle {
9033 _marker: AbstractEntity,
9034 on_fire: OnFire(false),
9035 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9036 false,
9037 ),
9038 sprinting: Sprinting(false),
9039 swimming: Swimming(false),
9040 currently_glowing: CurrentlyGlowing(false),
9041 invisible: Invisible(false),
9042 fall_flying: FallFlying(false),
9043 air_supply: AirSupply(Default::default()),
9044 custom_name: CustomName(Default::default()),
9045 custom_name_visible: CustomNameVisible(Default::default()),
9046 silent: Silent(Default::default()),
9047 no_gravity: NoGravity(Default::default()),
9048 pose: Pose::default(),
9049 ticks_frozen: TicksFrozen(Default::default()),
9050 },
9051 auto_spin_attack: AutoSpinAttack(false),
9052 abstract_living_using_item: AbstractLivingUsingItem(false),
9053 health: Health(1.0),
9054 effect_particles: EffectParticles(Default::default()),
9055 effect_ambience: EffectAmbience(false),
9056 arrow_count: ArrowCount(0),
9057 stinger_count: StingerCount(0),
9058 sleeping_pos: SleepingPos(None),
9059 },
9060 no_ai: NoAi(false),
9061 left_handed: LeftHanded(false),
9062 aggressive: Aggressive(false),
9063 },
9064 },
9065 abstract_ageable_baby: AbstractAgeableBaby(false),
9066 },
9067 },
9068 tamed: Tamed(false),
9069 eating: Eating(false),
9070 abstract_horse_standing: AbstractHorseStanding(false),
9071 bred: Bred(false),
9072 }
9073 }
9074}
9075
9076#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9078pub struct CamelDash(pub bool);
9079#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9081pub struct LastPoseChangeTick(pub i64);
9082#[derive(Component)]
9109pub struct Camel;
9110impl Camel {
9111 pub fn apply_metadata(
9112 entity: &mut bevy_ecs::system::EntityCommands,
9113 d: EntityDataItem,
9114 ) -> Result<(), UpdateMetadataError> {
9115 match d.index {
9116 0..=17 => AbstractHorse::apply_metadata(entity, d)?,
9117 18 => {
9118 entity.insert(CamelDash(d.value.into_boolean()?));
9119 }
9120 19 => {
9121 entity.insert(LastPoseChangeTick(d.value.into_long()?));
9122 }
9123 _ => {}
9124 }
9125 Ok(())
9126 }
9127}
9128
9129#[derive(Bundle)]
9133pub struct CamelMetadataBundle {
9134 _marker: Camel,
9135 parent: AbstractHorseMetadataBundle,
9136 camel_dash: CamelDash,
9137 last_pose_change_tick: LastPoseChangeTick,
9138}
9139impl Default for CamelMetadataBundle {
9140 fn default() -> Self {
9141 Self {
9142 _marker: Camel,
9143 parent: AbstractHorseMetadataBundle {
9144 _marker: AbstractHorse,
9145 parent: AbstractAnimalMetadataBundle {
9146 _marker: AbstractAnimal,
9147 parent: AbstractAgeableMetadataBundle {
9148 _marker: AbstractAgeable,
9149 parent: AbstractCreatureMetadataBundle {
9150 _marker: AbstractCreature,
9151 parent: AbstractInsentientMetadataBundle {
9152 _marker: AbstractInsentient,
9153 parent: AbstractLivingMetadataBundle {
9154 _marker: AbstractLiving,
9155 parent: AbstractEntityMetadataBundle {
9156 _marker: AbstractEntity,
9157 on_fire: OnFire(false),
9158 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9159 false,
9160 ),
9161 sprinting: Sprinting(false),
9162 swimming: Swimming(false),
9163 currently_glowing: CurrentlyGlowing(false),
9164 invisible: Invisible(false),
9165 fall_flying: FallFlying(false),
9166 air_supply: AirSupply(Default::default()),
9167 custom_name: CustomName(Default::default()),
9168 custom_name_visible: CustomNameVisible(Default::default()),
9169 silent: Silent(Default::default()),
9170 no_gravity: NoGravity(Default::default()),
9171 pose: Pose::default(),
9172 ticks_frozen: TicksFrozen(Default::default()),
9173 },
9174 auto_spin_attack: AutoSpinAttack(false),
9175 abstract_living_using_item: AbstractLivingUsingItem(false),
9176 health: Health(1.0),
9177 effect_particles: EffectParticles(Default::default()),
9178 effect_ambience: EffectAmbience(false),
9179 arrow_count: ArrowCount(0),
9180 stinger_count: StingerCount(0),
9181 sleeping_pos: SleepingPos(None),
9182 },
9183 no_ai: NoAi(false),
9184 left_handed: LeftHanded(false),
9185 aggressive: Aggressive(false),
9186 },
9187 },
9188 abstract_ageable_baby: AbstractAgeableBaby(false),
9189 },
9190 },
9191 tamed: Tamed(false),
9192 eating: Eating(false),
9193 abstract_horse_standing: AbstractHorseStanding(false),
9194 bred: Bred(false),
9195 },
9196 camel_dash: CamelDash(false),
9197 last_pose_change_tick: LastPoseChangeTick(0),
9198 }
9199 }
9200}
9201
9202#[derive(Component)]
9227pub struct CamelHusk;
9228impl CamelHusk {
9229 pub fn apply_metadata(
9230 entity: &mut bevy_ecs::system::EntityCommands,
9231 d: EntityDataItem,
9232 ) -> Result<(), UpdateMetadataError> {
9233 match d.index {
9234 0..=19 => Camel::apply_metadata(entity, d)?,
9235 _ => {}
9236 }
9237 Ok(())
9238 }
9239}
9240
9241#[derive(Bundle)]
9245pub struct CamelHuskMetadataBundle {
9246 _marker: CamelHusk,
9247 parent: CamelMetadataBundle,
9248}
9249impl Default for CamelHuskMetadataBundle {
9250 fn default() -> Self {
9251 Self {
9252 _marker: CamelHusk,
9253 parent: CamelMetadataBundle {
9254 _marker: Camel,
9255 parent: AbstractHorseMetadataBundle {
9256 _marker: AbstractHorse,
9257 parent: AbstractAnimalMetadataBundle {
9258 _marker: AbstractAnimal,
9259 parent: AbstractAgeableMetadataBundle {
9260 _marker: AbstractAgeable,
9261 parent: AbstractCreatureMetadataBundle {
9262 _marker: AbstractCreature,
9263 parent: AbstractInsentientMetadataBundle {
9264 _marker: AbstractInsentient,
9265 parent: AbstractLivingMetadataBundle {
9266 _marker: AbstractLiving,
9267 parent: AbstractEntityMetadataBundle {
9268 _marker: AbstractEntity,
9269 on_fire: OnFire(false),
9270 abstract_entity_shift_key_down:
9271 AbstractEntityShiftKeyDown(false),
9272 sprinting: Sprinting(false),
9273 swimming: Swimming(false),
9274 currently_glowing: CurrentlyGlowing(false),
9275 invisible: Invisible(false),
9276 fall_flying: FallFlying(false),
9277 air_supply: AirSupply(Default::default()),
9278 custom_name: CustomName(Default::default()),
9279 custom_name_visible: CustomNameVisible(
9280 Default::default(),
9281 ),
9282 silent: Silent(Default::default()),
9283 no_gravity: NoGravity(Default::default()),
9284 pose: Pose::default(),
9285 ticks_frozen: TicksFrozen(Default::default()),
9286 },
9287 auto_spin_attack: AutoSpinAttack(false),
9288 abstract_living_using_item: AbstractLivingUsingItem(false),
9289 health: Health(1.0),
9290 effect_particles: EffectParticles(Default::default()),
9291 effect_ambience: EffectAmbience(false),
9292 arrow_count: ArrowCount(0),
9293 stinger_count: StingerCount(0),
9294 sleeping_pos: SleepingPos(None),
9295 },
9296 no_ai: NoAi(false),
9297 left_handed: LeftHanded(false),
9298 aggressive: Aggressive(false),
9299 },
9300 },
9301 abstract_ageable_baby: AbstractAgeableBaby(false),
9302 },
9303 },
9304 tamed: Tamed(false),
9305 eating: Eating(false),
9306 abstract_horse_standing: AbstractHorseStanding(false),
9307 bred: Bred(false),
9308 },
9309 camel_dash: CamelDash(false),
9310 last_pose_change_tick: LastPoseChangeTick(0),
9311 },
9312 }
9313 }
9314}
9315
9316#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9318pub struct HorseTypeVariant(pub i32);
9319#[derive(Component)]
9345pub struct Horse;
9346impl Horse {
9347 pub fn apply_metadata(
9348 entity: &mut bevy_ecs::system::EntityCommands,
9349 d: EntityDataItem,
9350 ) -> Result<(), UpdateMetadataError> {
9351 match d.index {
9352 0..=17 => AbstractHorse::apply_metadata(entity, d)?,
9353 18 => {
9354 entity.insert(HorseTypeVariant(d.value.into_int()?));
9355 }
9356 _ => {}
9357 }
9358 Ok(())
9359 }
9360}
9361
9362#[derive(Bundle)]
9366pub struct HorseMetadataBundle {
9367 _marker: Horse,
9368 parent: AbstractHorseMetadataBundle,
9369 horse_type_variant: HorseTypeVariant,
9370}
9371impl Default for HorseMetadataBundle {
9372 fn default() -> Self {
9373 Self {
9374 _marker: Horse,
9375 parent: AbstractHorseMetadataBundle {
9376 _marker: AbstractHorse,
9377 parent: AbstractAnimalMetadataBundle {
9378 _marker: AbstractAnimal,
9379 parent: AbstractAgeableMetadataBundle {
9380 _marker: AbstractAgeable,
9381 parent: AbstractCreatureMetadataBundle {
9382 _marker: AbstractCreature,
9383 parent: AbstractInsentientMetadataBundle {
9384 _marker: AbstractInsentient,
9385 parent: AbstractLivingMetadataBundle {
9386 _marker: AbstractLiving,
9387 parent: AbstractEntityMetadataBundle {
9388 _marker: AbstractEntity,
9389 on_fire: OnFire(false),
9390 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9391 false,
9392 ),
9393 sprinting: Sprinting(false),
9394 swimming: Swimming(false),
9395 currently_glowing: CurrentlyGlowing(false),
9396 invisible: Invisible(false),
9397 fall_flying: FallFlying(false),
9398 air_supply: AirSupply(Default::default()),
9399 custom_name: CustomName(Default::default()),
9400 custom_name_visible: CustomNameVisible(Default::default()),
9401 silent: Silent(Default::default()),
9402 no_gravity: NoGravity(Default::default()),
9403 pose: Pose::default(),
9404 ticks_frozen: TicksFrozen(Default::default()),
9405 },
9406 auto_spin_attack: AutoSpinAttack(false),
9407 abstract_living_using_item: AbstractLivingUsingItem(false),
9408 health: Health(1.0),
9409 effect_particles: EffectParticles(Default::default()),
9410 effect_ambience: EffectAmbience(false),
9411 arrow_count: ArrowCount(0),
9412 stinger_count: StingerCount(0),
9413 sleeping_pos: SleepingPos(None),
9414 },
9415 no_ai: NoAi(false),
9416 left_handed: LeftHanded(false),
9417 aggressive: Aggressive(false),
9418 },
9419 },
9420 abstract_ageable_baby: AbstractAgeableBaby(false),
9421 },
9422 },
9423 tamed: Tamed(false),
9424 eating: Eating(false),
9425 abstract_horse_standing: AbstractHorseStanding(false),
9426 bred: Bred(false),
9427 },
9428 horse_type_variant: HorseTypeVariant(0),
9429 }
9430 }
9431}
9432
9433#[derive(Component)]
9457pub struct SkeletonHorse;
9458impl SkeletonHorse {
9459 pub fn apply_metadata(
9460 entity: &mut bevy_ecs::system::EntityCommands,
9461 d: EntityDataItem,
9462 ) -> Result<(), UpdateMetadataError> {
9463 match d.index {
9464 0..=17 => AbstractHorse::apply_metadata(entity, d)?,
9465 _ => {}
9466 }
9467 Ok(())
9468 }
9469}
9470
9471#[derive(Bundle)]
9475pub struct SkeletonHorseMetadataBundle {
9476 _marker: SkeletonHorse,
9477 parent: AbstractHorseMetadataBundle,
9478}
9479impl Default for SkeletonHorseMetadataBundle {
9480 fn default() -> Self {
9481 Self {
9482 _marker: SkeletonHorse,
9483 parent: AbstractHorseMetadataBundle {
9484 _marker: AbstractHorse,
9485 parent: AbstractAnimalMetadataBundle {
9486 _marker: AbstractAnimal,
9487 parent: AbstractAgeableMetadataBundle {
9488 _marker: AbstractAgeable,
9489 parent: AbstractCreatureMetadataBundle {
9490 _marker: AbstractCreature,
9491 parent: AbstractInsentientMetadataBundle {
9492 _marker: AbstractInsentient,
9493 parent: AbstractLivingMetadataBundle {
9494 _marker: AbstractLiving,
9495 parent: AbstractEntityMetadataBundle {
9496 _marker: AbstractEntity,
9497 on_fire: OnFire(false),
9498 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9499 false,
9500 ),
9501 sprinting: Sprinting(false),
9502 swimming: Swimming(false),
9503 currently_glowing: CurrentlyGlowing(false),
9504 invisible: Invisible(false),
9505 fall_flying: FallFlying(false),
9506 air_supply: AirSupply(Default::default()),
9507 custom_name: CustomName(Default::default()),
9508 custom_name_visible: CustomNameVisible(Default::default()),
9509 silent: Silent(Default::default()),
9510 no_gravity: NoGravity(Default::default()),
9511 pose: Pose::default(),
9512 ticks_frozen: TicksFrozen(Default::default()),
9513 },
9514 auto_spin_attack: AutoSpinAttack(false),
9515 abstract_living_using_item: AbstractLivingUsingItem(false),
9516 health: Health(1.0),
9517 effect_particles: EffectParticles(Default::default()),
9518 effect_ambience: EffectAmbience(false),
9519 arrow_count: ArrowCount(0),
9520 stinger_count: StingerCount(0),
9521 sleeping_pos: SleepingPos(None),
9522 },
9523 no_ai: NoAi(false),
9524 left_handed: LeftHanded(false),
9525 aggressive: Aggressive(false),
9526 },
9527 },
9528 abstract_ageable_baby: AbstractAgeableBaby(false),
9529 },
9530 },
9531 tamed: Tamed(false),
9532 eating: Eating(false),
9533 abstract_horse_standing: AbstractHorseStanding(false),
9534 bred: Bred(false),
9535 },
9536 }
9537 }
9538}
9539
9540#[derive(Component)]
9564pub struct ZombieHorse;
9565impl ZombieHorse {
9566 pub fn apply_metadata(
9567 entity: &mut bevy_ecs::system::EntityCommands,
9568 d: EntityDataItem,
9569 ) -> Result<(), UpdateMetadataError> {
9570 match d.index {
9571 0..=17 => AbstractHorse::apply_metadata(entity, d)?,
9572 _ => {}
9573 }
9574 Ok(())
9575 }
9576}
9577
9578#[derive(Bundle)]
9582pub struct ZombieHorseMetadataBundle {
9583 _marker: ZombieHorse,
9584 parent: AbstractHorseMetadataBundle,
9585}
9586impl Default for ZombieHorseMetadataBundle {
9587 fn default() -> Self {
9588 Self {
9589 _marker: ZombieHorse,
9590 parent: AbstractHorseMetadataBundle {
9591 _marker: AbstractHorse,
9592 parent: AbstractAnimalMetadataBundle {
9593 _marker: AbstractAnimal,
9594 parent: AbstractAgeableMetadataBundle {
9595 _marker: AbstractAgeable,
9596 parent: AbstractCreatureMetadataBundle {
9597 _marker: AbstractCreature,
9598 parent: AbstractInsentientMetadataBundle {
9599 _marker: AbstractInsentient,
9600 parent: AbstractLivingMetadataBundle {
9601 _marker: AbstractLiving,
9602 parent: AbstractEntityMetadataBundle {
9603 _marker: AbstractEntity,
9604 on_fire: OnFire(false),
9605 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9606 false,
9607 ),
9608 sprinting: Sprinting(false),
9609 swimming: Swimming(false),
9610 currently_glowing: CurrentlyGlowing(false),
9611 invisible: Invisible(false),
9612 fall_flying: FallFlying(false),
9613 air_supply: AirSupply(Default::default()),
9614 custom_name: CustomName(Default::default()),
9615 custom_name_visible: CustomNameVisible(Default::default()),
9616 silent: Silent(Default::default()),
9617 no_gravity: NoGravity(Default::default()),
9618 pose: Pose::default(),
9619 ticks_frozen: TicksFrozen(Default::default()),
9620 },
9621 auto_spin_attack: AutoSpinAttack(false),
9622 abstract_living_using_item: AbstractLivingUsingItem(false),
9623 health: Health(1.0),
9624 effect_particles: EffectParticles(Default::default()),
9625 effect_ambience: EffectAmbience(false),
9626 arrow_count: ArrowCount(0),
9627 stinger_count: StingerCount(0),
9628 sleeping_pos: SleepingPos(None),
9629 },
9630 no_ai: NoAi(false),
9631 left_handed: LeftHanded(false),
9632 aggressive: Aggressive(false),
9633 },
9634 },
9635 abstract_ageable_baby: AbstractAgeableBaby(false),
9636 },
9637 },
9638 tamed: Tamed(false),
9639 eating: Eating(false),
9640 abstract_horse_standing: AbstractHorseStanding(false),
9641 bred: Bred(false),
9642 },
9643 }
9644 }
9645}
9646
9647#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9649pub struct Chest(pub bool);
9650#[derive(Component)]
9680pub struct AbstractChestedHorse;
9681impl AbstractChestedHorse {
9682 pub fn apply_metadata(
9683 entity: &mut bevy_ecs::system::EntityCommands,
9684 d: EntityDataItem,
9685 ) -> Result<(), UpdateMetadataError> {
9686 match d.index {
9687 0..=17 => AbstractHorse::apply_metadata(entity, d)?,
9688 18 => {
9689 entity.insert(Chest(d.value.into_boolean()?));
9690 }
9691 _ => {}
9692 }
9693 Ok(())
9694 }
9695}
9696
9697#[derive(Bundle)]
9701pub struct AbstractChestedHorseMetadataBundle {
9702 _marker: AbstractChestedHorse,
9703 parent: AbstractHorseMetadataBundle,
9704 chest: Chest,
9705}
9706impl Default for AbstractChestedHorseMetadataBundle {
9707 fn default() -> Self {
9708 Self {
9709 _marker: AbstractChestedHorse,
9710 parent: AbstractHorseMetadataBundle {
9711 _marker: AbstractHorse,
9712 parent: AbstractAnimalMetadataBundle {
9713 _marker: AbstractAnimal,
9714 parent: AbstractAgeableMetadataBundle {
9715 _marker: AbstractAgeable,
9716 parent: AbstractCreatureMetadataBundle {
9717 _marker: AbstractCreature,
9718 parent: AbstractInsentientMetadataBundle {
9719 _marker: AbstractInsentient,
9720 parent: AbstractLivingMetadataBundle {
9721 _marker: AbstractLiving,
9722 parent: AbstractEntityMetadataBundle {
9723 _marker: AbstractEntity,
9724 on_fire: OnFire(false),
9725 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
9726 false,
9727 ),
9728 sprinting: Sprinting(false),
9729 swimming: Swimming(false),
9730 currently_glowing: CurrentlyGlowing(false),
9731 invisible: Invisible(false),
9732 fall_flying: FallFlying(false),
9733 air_supply: AirSupply(Default::default()),
9734 custom_name: CustomName(Default::default()),
9735 custom_name_visible: CustomNameVisible(Default::default()),
9736 silent: Silent(Default::default()),
9737 no_gravity: NoGravity(Default::default()),
9738 pose: Pose::default(),
9739 ticks_frozen: TicksFrozen(Default::default()),
9740 },
9741 auto_spin_attack: AutoSpinAttack(false),
9742 abstract_living_using_item: AbstractLivingUsingItem(false),
9743 health: Health(1.0),
9744 effect_particles: EffectParticles(Default::default()),
9745 effect_ambience: EffectAmbience(false),
9746 arrow_count: ArrowCount(0),
9747 stinger_count: StingerCount(0),
9748 sleeping_pos: SleepingPos(None),
9749 },
9750 no_ai: NoAi(false),
9751 left_handed: LeftHanded(false),
9752 aggressive: Aggressive(false),
9753 },
9754 },
9755 abstract_ageable_baby: AbstractAgeableBaby(false),
9756 },
9757 },
9758 tamed: Tamed(false),
9759 eating: Eating(false),
9760 abstract_horse_standing: AbstractHorseStanding(false),
9761 bred: Bred(false),
9762 },
9763 chest: Chest(false),
9764 }
9765 }
9766}
9767
9768#[derive(Component)]
9793pub struct Donkey;
9794impl Donkey {
9795 pub fn apply_metadata(
9796 entity: &mut bevy_ecs::system::EntityCommands,
9797 d: EntityDataItem,
9798 ) -> Result<(), UpdateMetadataError> {
9799 match d.index {
9800 0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
9801 _ => {}
9802 }
9803 Ok(())
9804 }
9805}
9806
9807#[derive(Bundle)]
9811pub struct DonkeyMetadataBundle {
9812 _marker: Donkey,
9813 parent: AbstractChestedHorseMetadataBundle,
9814}
9815impl Default for DonkeyMetadataBundle {
9816 fn default() -> Self {
9817 Self {
9818 _marker: Donkey,
9819 parent: AbstractChestedHorseMetadataBundle {
9820 _marker: AbstractChestedHorse,
9821 parent: AbstractHorseMetadataBundle {
9822 _marker: AbstractHorse,
9823 parent: AbstractAnimalMetadataBundle {
9824 _marker: AbstractAnimal,
9825 parent: AbstractAgeableMetadataBundle {
9826 _marker: AbstractAgeable,
9827 parent: AbstractCreatureMetadataBundle {
9828 _marker: AbstractCreature,
9829 parent: AbstractInsentientMetadataBundle {
9830 _marker: AbstractInsentient,
9831 parent: AbstractLivingMetadataBundle {
9832 _marker: AbstractLiving,
9833 parent: AbstractEntityMetadataBundle {
9834 _marker: AbstractEntity,
9835 on_fire: OnFire(false),
9836 abstract_entity_shift_key_down:
9837 AbstractEntityShiftKeyDown(false),
9838 sprinting: Sprinting(false),
9839 swimming: Swimming(false),
9840 currently_glowing: CurrentlyGlowing(false),
9841 invisible: Invisible(false),
9842 fall_flying: FallFlying(false),
9843 air_supply: AirSupply(Default::default()),
9844 custom_name: CustomName(Default::default()),
9845 custom_name_visible: CustomNameVisible(
9846 Default::default(),
9847 ),
9848 silent: Silent(Default::default()),
9849 no_gravity: NoGravity(Default::default()),
9850 pose: Pose::default(),
9851 ticks_frozen: TicksFrozen(Default::default()),
9852 },
9853 auto_spin_attack: AutoSpinAttack(false),
9854 abstract_living_using_item: AbstractLivingUsingItem(false),
9855 health: Health(1.0),
9856 effect_particles: EffectParticles(Default::default()),
9857 effect_ambience: EffectAmbience(false),
9858 arrow_count: ArrowCount(0),
9859 stinger_count: StingerCount(0),
9860 sleeping_pos: SleepingPos(None),
9861 },
9862 no_ai: NoAi(false),
9863 left_handed: LeftHanded(false),
9864 aggressive: Aggressive(false),
9865 },
9866 },
9867 abstract_ageable_baby: AbstractAgeableBaby(false),
9868 },
9869 },
9870 tamed: Tamed(false),
9871 eating: Eating(false),
9872 abstract_horse_standing: AbstractHorseStanding(false),
9873 bred: Bred(false),
9874 },
9875 chest: Chest(false),
9876 },
9877 }
9878 }
9879}
9880
9881#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9883pub struct Strength(pub i32);
9884#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
9886pub struct LlamaVariant(pub i32);
9887#[derive(Component)]
9915pub struct Llama;
9916impl Llama {
9917 pub fn apply_metadata(
9918 entity: &mut bevy_ecs::system::EntityCommands,
9919 d: EntityDataItem,
9920 ) -> Result<(), UpdateMetadataError> {
9921 match d.index {
9922 0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
9923 19 => {
9924 entity.insert(Strength(d.value.into_int()?));
9925 }
9926 20 => {
9927 entity.insert(LlamaVariant(d.value.into_int()?));
9928 }
9929 _ => {}
9930 }
9931 Ok(())
9932 }
9933}
9934
9935#[derive(Bundle)]
9939pub struct LlamaMetadataBundle {
9940 _marker: Llama,
9941 parent: AbstractChestedHorseMetadataBundle,
9942 strength: Strength,
9943 llama_variant: LlamaVariant,
9944}
9945impl Default for LlamaMetadataBundle {
9946 fn default() -> Self {
9947 Self {
9948 _marker: Llama,
9949 parent: AbstractChestedHorseMetadataBundle {
9950 _marker: AbstractChestedHorse,
9951 parent: AbstractHorseMetadataBundle {
9952 _marker: AbstractHorse,
9953 parent: AbstractAnimalMetadataBundle {
9954 _marker: AbstractAnimal,
9955 parent: AbstractAgeableMetadataBundle {
9956 _marker: AbstractAgeable,
9957 parent: AbstractCreatureMetadataBundle {
9958 _marker: AbstractCreature,
9959 parent: AbstractInsentientMetadataBundle {
9960 _marker: AbstractInsentient,
9961 parent: AbstractLivingMetadataBundle {
9962 _marker: AbstractLiving,
9963 parent: AbstractEntityMetadataBundle {
9964 _marker: AbstractEntity,
9965 on_fire: OnFire(false),
9966 abstract_entity_shift_key_down:
9967 AbstractEntityShiftKeyDown(false),
9968 sprinting: Sprinting(false),
9969 swimming: Swimming(false),
9970 currently_glowing: CurrentlyGlowing(false),
9971 invisible: Invisible(false),
9972 fall_flying: FallFlying(false),
9973 air_supply: AirSupply(Default::default()),
9974 custom_name: CustomName(Default::default()),
9975 custom_name_visible: CustomNameVisible(
9976 Default::default(),
9977 ),
9978 silent: Silent(Default::default()),
9979 no_gravity: NoGravity(Default::default()),
9980 pose: Pose::default(),
9981 ticks_frozen: TicksFrozen(Default::default()),
9982 },
9983 auto_spin_attack: AutoSpinAttack(false),
9984 abstract_living_using_item: AbstractLivingUsingItem(false),
9985 health: Health(1.0),
9986 effect_particles: EffectParticles(Default::default()),
9987 effect_ambience: EffectAmbience(false),
9988 arrow_count: ArrowCount(0),
9989 stinger_count: StingerCount(0),
9990 sleeping_pos: SleepingPos(None),
9991 },
9992 no_ai: NoAi(false),
9993 left_handed: LeftHanded(false),
9994 aggressive: Aggressive(false),
9995 },
9996 },
9997 abstract_ageable_baby: AbstractAgeableBaby(false),
9998 },
9999 },
10000 tamed: Tamed(false),
10001 eating: Eating(false),
10002 abstract_horse_standing: AbstractHorseStanding(false),
10003 bred: Bred(false),
10004 },
10005 chest: Chest(false),
10006 },
10007 strength: Strength(0),
10008 llama_variant: LlamaVariant(0),
10009 }
10010 }
10011}
10012
10013#[derive(Component)]
10039pub struct TraderLlama;
10040impl TraderLlama {
10041 pub fn apply_metadata(
10042 entity: &mut bevy_ecs::system::EntityCommands,
10043 d: EntityDataItem,
10044 ) -> Result<(), UpdateMetadataError> {
10045 match d.index {
10046 0..=20 => Llama::apply_metadata(entity, d)?,
10047 _ => {}
10048 }
10049 Ok(())
10050 }
10051}
10052
10053#[derive(Bundle)]
10057pub struct TraderLlamaMetadataBundle {
10058 _marker: TraderLlama,
10059 parent: LlamaMetadataBundle,
10060}
10061impl Default for TraderLlamaMetadataBundle {
10062 fn default() -> Self {
10063 Self {
10064 _marker: TraderLlama,
10065 parent: LlamaMetadataBundle {
10066 _marker: Llama,
10067 parent: AbstractChestedHorseMetadataBundle {
10068 _marker: AbstractChestedHorse,
10069 parent: AbstractHorseMetadataBundle {
10070 _marker: AbstractHorse,
10071 parent: AbstractAnimalMetadataBundle {
10072 _marker: AbstractAnimal,
10073 parent: AbstractAgeableMetadataBundle {
10074 _marker: AbstractAgeable,
10075 parent: AbstractCreatureMetadataBundle {
10076 _marker: AbstractCreature,
10077 parent: AbstractInsentientMetadataBundle {
10078 _marker: AbstractInsentient,
10079 parent: AbstractLivingMetadataBundle {
10080 _marker: AbstractLiving,
10081 parent: AbstractEntityMetadataBundle {
10082 _marker: AbstractEntity,
10083 on_fire: OnFire(false),
10084 abstract_entity_shift_key_down:
10085 AbstractEntityShiftKeyDown(false),
10086 sprinting: Sprinting(false),
10087 swimming: Swimming(false),
10088 currently_glowing: CurrentlyGlowing(false),
10089 invisible: Invisible(false),
10090 fall_flying: FallFlying(false),
10091 air_supply: AirSupply(Default::default()),
10092 custom_name: CustomName(Default::default()),
10093 custom_name_visible: CustomNameVisible(
10094 Default::default(),
10095 ),
10096 silent: Silent(Default::default()),
10097 no_gravity: NoGravity(Default::default()),
10098 pose: Pose::default(),
10099 ticks_frozen: TicksFrozen(Default::default()),
10100 },
10101 auto_spin_attack: AutoSpinAttack(false),
10102 abstract_living_using_item: AbstractLivingUsingItem(
10103 false,
10104 ),
10105 health: Health(1.0),
10106 effect_particles: EffectParticles(Default::default()),
10107 effect_ambience: EffectAmbience(false),
10108 arrow_count: ArrowCount(0),
10109 stinger_count: StingerCount(0),
10110 sleeping_pos: SleepingPos(None),
10111 },
10112 no_ai: NoAi(false),
10113 left_handed: LeftHanded(false),
10114 aggressive: Aggressive(false),
10115 },
10116 },
10117 abstract_ageable_baby: AbstractAgeableBaby(false),
10118 },
10119 },
10120 tamed: Tamed(false),
10121 eating: Eating(false),
10122 abstract_horse_standing: AbstractHorseStanding(false),
10123 bred: Bred(false),
10124 },
10125 chest: Chest(false),
10126 },
10127 strength: Strength(0),
10128 llama_variant: LlamaVariant(0),
10129 },
10130 }
10131 }
10132}
10133
10134#[derive(Component)]
10159pub struct Mule;
10160impl Mule {
10161 pub fn apply_metadata(
10162 entity: &mut bevy_ecs::system::EntityCommands,
10163 d: EntityDataItem,
10164 ) -> Result<(), UpdateMetadataError> {
10165 match d.index {
10166 0..=18 => AbstractChestedHorse::apply_metadata(entity, d)?,
10167 _ => {}
10168 }
10169 Ok(())
10170 }
10171}
10172
10173#[derive(Bundle)]
10177pub struct MuleMetadataBundle {
10178 _marker: Mule,
10179 parent: AbstractChestedHorseMetadataBundle,
10180}
10181impl Default for MuleMetadataBundle {
10182 fn default() -> Self {
10183 Self {
10184 _marker: Mule,
10185 parent: AbstractChestedHorseMetadataBundle {
10186 _marker: AbstractChestedHorse,
10187 parent: AbstractHorseMetadataBundle {
10188 _marker: AbstractHorse,
10189 parent: AbstractAnimalMetadataBundle {
10190 _marker: AbstractAnimal,
10191 parent: AbstractAgeableMetadataBundle {
10192 _marker: AbstractAgeable,
10193 parent: AbstractCreatureMetadataBundle {
10194 _marker: AbstractCreature,
10195 parent: AbstractInsentientMetadataBundle {
10196 _marker: AbstractInsentient,
10197 parent: AbstractLivingMetadataBundle {
10198 _marker: AbstractLiving,
10199 parent: AbstractEntityMetadataBundle {
10200 _marker: AbstractEntity,
10201 on_fire: OnFire(false),
10202 abstract_entity_shift_key_down:
10203 AbstractEntityShiftKeyDown(false),
10204 sprinting: Sprinting(false),
10205 swimming: Swimming(false),
10206 currently_glowing: CurrentlyGlowing(false),
10207 invisible: Invisible(false),
10208 fall_flying: FallFlying(false),
10209 air_supply: AirSupply(Default::default()),
10210 custom_name: CustomName(Default::default()),
10211 custom_name_visible: CustomNameVisible(
10212 Default::default(),
10213 ),
10214 silent: Silent(Default::default()),
10215 no_gravity: NoGravity(Default::default()),
10216 pose: Pose::default(),
10217 ticks_frozen: TicksFrozen(Default::default()),
10218 },
10219 auto_spin_attack: AutoSpinAttack(false),
10220 abstract_living_using_item: AbstractLivingUsingItem(false),
10221 health: Health(1.0),
10222 effect_particles: EffectParticles(Default::default()),
10223 effect_ambience: EffectAmbience(false),
10224 arrow_count: ArrowCount(0),
10225 stinger_count: StingerCount(0),
10226 sleeping_pos: SleepingPos(None),
10227 },
10228 no_ai: NoAi(false),
10229 left_handed: LeftHanded(false),
10230 aggressive: Aggressive(false),
10231 },
10232 },
10233 abstract_ageable_baby: AbstractAgeableBaby(false),
10234 },
10235 },
10236 tamed: Tamed(false),
10237 eating: Eating(false),
10238 abstract_horse_standing: AbstractHorseStanding(false),
10239 bred: Bred(false),
10240 },
10241 chest: Chest(false),
10242 },
10243 }
10244 }
10245}
10246
10247#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
10248pub struct Tame(pub bool);
10250#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
10251pub struct InSittingPose(pub bool);
10253#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10255pub struct Owneruuid(pub Option<Uuid>);
10256#[derive(Component)]
10288pub struct AbstractTameable;
10289impl AbstractTameable {
10290 pub fn apply_metadata(
10291 entity: &mut bevy_ecs::system::EntityCommands,
10292 d: EntityDataItem,
10293 ) -> Result<(), UpdateMetadataError> {
10294 match d.index {
10295 0..=16 => AbstractAnimal::apply_metadata(entity, d)?,
10296 17 => {
10297 let bitfield = d.value.into_byte()?;
10298 entity.insert(Tame(bitfield & 0x4 != 0));
10299 entity.insert(InSittingPose(bitfield & 0x1 != 0));
10300 }
10301 18 => {
10302 entity.insert(Owneruuid(d.value.into_optional_living_entity_reference()?));
10303 }
10304 _ => {}
10305 }
10306 Ok(())
10307 }
10308}
10309
10310#[derive(Bundle)]
10314pub struct AbstractTameableMetadataBundle {
10315 _marker: AbstractTameable,
10316 parent: AbstractAnimalMetadataBundle,
10317 tame: Tame,
10318 in_sitting_pose: InSittingPose,
10319 owneruuid: Owneruuid,
10320}
10321impl Default for AbstractTameableMetadataBundle {
10322 fn default() -> Self {
10323 Self {
10324 _marker: AbstractTameable,
10325 parent: AbstractAnimalMetadataBundle {
10326 _marker: AbstractAnimal,
10327 parent: AbstractAgeableMetadataBundle {
10328 _marker: AbstractAgeable,
10329 parent: AbstractCreatureMetadataBundle {
10330 _marker: AbstractCreature,
10331 parent: AbstractInsentientMetadataBundle {
10332 _marker: AbstractInsentient,
10333 parent: AbstractLivingMetadataBundle {
10334 _marker: AbstractLiving,
10335 parent: AbstractEntityMetadataBundle {
10336 _marker: AbstractEntity,
10337 on_fire: OnFire(false),
10338 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10339 false,
10340 ),
10341 sprinting: Sprinting(false),
10342 swimming: Swimming(false),
10343 currently_glowing: CurrentlyGlowing(false),
10344 invisible: Invisible(false),
10345 fall_flying: FallFlying(false),
10346 air_supply: AirSupply(Default::default()),
10347 custom_name: CustomName(Default::default()),
10348 custom_name_visible: CustomNameVisible(Default::default()),
10349 silent: Silent(Default::default()),
10350 no_gravity: NoGravity(Default::default()),
10351 pose: Pose::default(),
10352 ticks_frozen: TicksFrozen(Default::default()),
10353 },
10354 auto_spin_attack: AutoSpinAttack(false),
10355 abstract_living_using_item: AbstractLivingUsingItem(false),
10356 health: Health(1.0),
10357 effect_particles: EffectParticles(Default::default()),
10358 effect_ambience: EffectAmbience(false),
10359 arrow_count: ArrowCount(0),
10360 stinger_count: StingerCount(0),
10361 sleeping_pos: SleepingPos(None),
10362 },
10363 no_ai: NoAi(false),
10364 left_handed: LeftHanded(false),
10365 aggressive: Aggressive(false),
10366 },
10367 },
10368 abstract_ageable_baby: AbstractAgeableBaby(false),
10369 },
10370 },
10371 tame: Tame(false),
10372 in_sitting_pose: InSittingPose(false),
10373 owneruuid: Owneruuid(None),
10374 }
10375 }
10376}
10377
10378#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10380pub struct CatVariant(pub azalea_registry::data::CatVariant);
10381#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10383pub struct IsLying(pub bool);
10384#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10386pub struct RelaxStateOne(pub bool);
10387#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10389pub struct CatCollarColor(pub i32);
10390#[derive(Component)]
10419pub struct Cat;
10420impl Cat {
10421 pub fn apply_metadata(
10422 entity: &mut bevy_ecs::system::EntityCommands,
10423 d: EntityDataItem,
10424 ) -> Result<(), UpdateMetadataError> {
10425 match d.index {
10426 0..=18 => AbstractTameable::apply_metadata(entity, d)?,
10427 19 => {
10428 entity.insert(CatVariant(d.value.into_cat_variant()?));
10429 }
10430 20 => {
10431 entity.insert(IsLying(d.value.into_boolean()?));
10432 }
10433 21 => {
10434 entity.insert(RelaxStateOne(d.value.into_boolean()?));
10435 }
10436 22 => {
10437 entity.insert(CatCollarColor(d.value.into_int()?));
10438 }
10439 _ => {}
10440 }
10441 Ok(())
10442 }
10443}
10444
10445#[derive(Bundle)]
10449pub struct CatMetadataBundle {
10450 _marker: Cat,
10451 parent: AbstractTameableMetadataBundle,
10452 cat_variant: CatVariant,
10453 is_lying: IsLying,
10454 relax_state_one: RelaxStateOne,
10455 cat_collar_color: CatCollarColor,
10456}
10457impl Default for CatMetadataBundle {
10458 fn default() -> Self {
10459 Self {
10460 _marker: Cat,
10461 parent: AbstractTameableMetadataBundle {
10462 _marker: AbstractTameable,
10463 parent: AbstractAnimalMetadataBundle {
10464 _marker: AbstractAnimal,
10465 parent: AbstractAgeableMetadataBundle {
10466 _marker: AbstractAgeable,
10467 parent: AbstractCreatureMetadataBundle {
10468 _marker: AbstractCreature,
10469 parent: AbstractInsentientMetadataBundle {
10470 _marker: AbstractInsentient,
10471 parent: AbstractLivingMetadataBundle {
10472 _marker: AbstractLiving,
10473 parent: AbstractEntityMetadataBundle {
10474 _marker: AbstractEntity,
10475 on_fire: OnFire(false),
10476 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10477 false,
10478 ),
10479 sprinting: Sprinting(false),
10480 swimming: Swimming(false),
10481 currently_glowing: CurrentlyGlowing(false),
10482 invisible: Invisible(false),
10483 fall_flying: FallFlying(false),
10484 air_supply: AirSupply(Default::default()),
10485 custom_name: CustomName(Default::default()),
10486 custom_name_visible: CustomNameVisible(Default::default()),
10487 silent: Silent(Default::default()),
10488 no_gravity: NoGravity(Default::default()),
10489 pose: Pose::default(),
10490 ticks_frozen: TicksFrozen(Default::default()),
10491 },
10492 auto_spin_attack: AutoSpinAttack(false),
10493 abstract_living_using_item: AbstractLivingUsingItem(false),
10494 health: Health(1.0),
10495 effect_particles: EffectParticles(Default::default()),
10496 effect_ambience: EffectAmbience(false),
10497 arrow_count: ArrowCount(0),
10498 stinger_count: StingerCount(0),
10499 sleeping_pos: SleepingPos(None),
10500 },
10501 no_ai: NoAi(false),
10502 left_handed: LeftHanded(false),
10503 aggressive: Aggressive(false),
10504 },
10505 },
10506 abstract_ageable_baby: AbstractAgeableBaby(false),
10507 },
10508 },
10509 tame: Tame(false),
10510 in_sitting_pose: InSittingPose(false),
10511 owneruuid: Owneruuid(None),
10512 },
10513 cat_variant: CatVariant(azalea_registry::data::CatVariant::new_raw(0)),
10514 is_lying: IsLying(false),
10515 relax_state_one: RelaxStateOne(false),
10516 cat_collar_color: CatCollarColor(Default::default()),
10517 }
10518 }
10519}
10520
10521#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10523pub struct NautilusDash(pub bool);
10524#[derive(Component)]
10551pub struct Nautilus;
10552impl Nautilus {
10553 pub fn apply_metadata(
10554 entity: &mut bevy_ecs::system::EntityCommands,
10555 d: EntityDataItem,
10556 ) -> Result<(), UpdateMetadataError> {
10557 match d.index {
10558 0..=18 => AbstractTameable::apply_metadata(entity, d)?,
10559 19 => {
10560 entity.insert(NautilusDash(d.value.into_boolean()?));
10561 }
10562 _ => {}
10563 }
10564 Ok(())
10565 }
10566}
10567
10568#[derive(Bundle)]
10572pub struct NautilusMetadataBundle {
10573 _marker: Nautilus,
10574 parent: AbstractTameableMetadataBundle,
10575 nautilus_dash: NautilusDash,
10576}
10577impl Default for NautilusMetadataBundle {
10578 fn default() -> Self {
10579 Self {
10580 _marker: Nautilus,
10581 parent: AbstractTameableMetadataBundle {
10582 _marker: AbstractTameable,
10583 parent: AbstractAnimalMetadataBundle {
10584 _marker: AbstractAnimal,
10585 parent: AbstractAgeableMetadataBundle {
10586 _marker: AbstractAgeable,
10587 parent: AbstractCreatureMetadataBundle {
10588 _marker: AbstractCreature,
10589 parent: AbstractInsentientMetadataBundle {
10590 _marker: AbstractInsentient,
10591 parent: AbstractLivingMetadataBundle {
10592 _marker: AbstractLiving,
10593 parent: AbstractEntityMetadataBundle {
10594 _marker: AbstractEntity,
10595 on_fire: OnFire(false),
10596 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10597 false,
10598 ),
10599 sprinting: Sprinting(false),
10600 swimming: Swimming(false),
10601 currently_glowing: CurrentlyGlowing(false),
10602 invisible: Invisible(false),
10603 fall_flying: FallFlying(false),
10604 air_supply: AirSupply(Default::default()),
10605 custom_name: CustomName(Default::default()),
10606 custom_name_visible: CustomNameVisible(Default::default()),
10607 silent: Silent(Default::default()),
10608 no_gravity: NoGravity(Default::default()),
10609 pose: Pose::default(),
10610 ticks_frozen: TicksFrozen(Default::default()),
10611 },
10612 auto_spin_attack: AutoSpinAttack(false),
10613 abstract_living_using_item: AbstractLivingUsingItem(false),
10614 health: Health(1.0),
10615 effect_particles: EffectParticles(Default::default()),
10616 effect_ambience: EffectAmbience(false),
10617 arrow_count: ArrowCount(0),
10618 stinger_count: StingerCount(0),
10619 sleeping_pos: SleepingPos(None),
10620 },
10621 no_ai: NoAi(false),
10622 left_handed: LeftHanded(false),
10623 aggressive: Aggressive(false),
10624 },
10625 },
10626 abstract_ageable_baby: AbstractAgeableBaby(false),
10627 },
10628 },
10629 tame: Tame(false),
10630 in_sitting_pose: InSittingPose(false),
10631 owneruuid: Owneruuid(None),
10632 },
10633 nautilus_dash: NautilusDash(false),
10634 }
10635 }
10636}
10637
10638#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10640pub struct ParrotVariant(pub i32);
10641#[derive(Component)]
10667pub struct Parrot;
10668impl Parrot {
10669 pub fn apply_metadata(
10670 entity: &mut bevy_ecs::system::EntityCommands,
10671 d: EntityDataItem,
10672 ) -> Result<(), UpdateMetadataError> {
10673 match d.index {
10674 0..=18 => AbstractTameable::apply_metadata(entity, d)?,
10675 19 => {
10676 entity.insert(ParrotVariant(d.value.into_int()?));
10677 }
10678 _ => {}
10679 }
10680 Ok(())
10681 }
10682}
10683
10684#[derive(Bundle)]
10688pub struct ParrotMetadataBundle {
10689 _marker: Parrot,
10690 parent: AbstractTameableMetadataBundle,
10691 parrot_variant: ParrotVariant,
10692}
10693impl Default for ParrotMetadataBundle {
10694 fn default() -> Self {
10695 Self {
10696 _marker: Parrot,
10697 parent: AbstractTameableMetadataBundle {
10698 _marker: AbstractTameable,
10699 parent: AbstractAnimalMetadataBundle {
10700 _marker: AbstractAnimal,
10701 parent: AbstractAgeableMetadataBundle {
10702 _marker: AbstractAgeable,
10703 parent: AbstractCreatureMetadataBundle {
10704 _marker: AbstractCreature,
10705 parent: AbstractInsentientMetadataBundle {
10706 _marker: AbstractInsentient,
10707 parent: AbstractLivingMetadataBundle {
10708 _marker: AbstractLiving,
10709 parent: AbstractEntityMetadataBundle {
10710 _marker: AbstractEntity,
10711 on_fire: OnFire(false),
10712 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10713 false,
10714 ),
10715 sprinting: Sprinting(false),
10716 swimming: Swimming(false),
10717 currently_glowing: CurrentlyGlowing(false),
10718 invisible: Invisible(false),
10719 fall_flying: FallFlying(false),
10720 air_supply: AirSupply(Default::default()),
10721 custom_name: CustomName(Default::default()),
10722 custom_name_visible: CustomNameVisible(Default::default()),
10723 silent: Silent(Default::default()),
10724 no_gravity: NoGravity(Default::default()),
10725 pose: Pose::default(),
10726 ticks_frozen: TicksFrozen(Default::default()),
10727 },
10728 auto_spin_attack: AutoSpinAttack(false),
10729 abstract_living_using_item: AbstractLivingUsingItem(false),
10730 health: Health(1.0),
10731 effect_particles: EffectParticles(Default::default()),
10732 effect_ambience: EffectAmbience(false),
10733 arrow_count: ArrowCount(0),
10734 stinger_count: StingerCount(0),
10735 sleeping_pos: SleepingPos(None),
10736 },
10737 no_ai: NoAi(false),
10738 left_handed: LeftHanded(false),
10739 aggressive: Aggressive(false),
10740 },
10741 },
10742 abstract_ageable_baby: AbstractAgeableBaby(false),
10743 },
10744 },
10745 tame: Tame(false),
10746 in_sitting_pose: InSittingPose(false),
10747 owneruuid: Owneruuid(None),
10748 },
10749 parrot_variant: ParrotVariant(Default::default()),
10750 }
10751 }
10752}
10753
10754#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10756pub struct WolfInterested(pub bool);
10757#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10759pub struct WolfCollarColor(pub i32);
10760#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10762pub struct WolfAngerEndTime(pub i64);
10763#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10765pub struct WolfVariant(pub azalea_registry::data::CowVariant);
10766#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10768pub struct SoundVariant(pub azalea_registry::data::WolfVariant);
10769#[derive(Component)]
10799pub struct Wolf;
10800impl Wolf {
10801 pub fn apply_metadata(
10802 entity: &mut bevy_ecs::system::EntityCommands,
10803 d: EntityDataItem,
10804 ) -> Result<(), UpdateMetadataError> {
10805 match d.index {
10806 0..=18 => AbstractTameable::apply_metadata(entity, d)?,
10807 19 => {
10808 entity.insert(WolfInterested(d.value.into_boolean()?));
10809 }
10810 20 => {
10811 entity.insert(WolfCollarColor(d.value.into_int()?));
10812 }
10813 21 => {
10814 entity.insert(WolfAngerEndTime(d.value.into_long()?));
10815 }
10816 22 => {
10817 entity.insert(WolfVariant(d.value.into_cow_variant()?));
10818 }
10819 23 => {
10820 entity.insert(SoundVariant(d.value.into_wolf_variant()?));
10821 }
10822 _ => {}
10823 }
10824 Ok(())
10825 }
10826}
10827
10828#[derive(Bundle)]
10832pub struct WolfMetadataBundle {
10833 _marker: Wolf,
10834 parent: AbstractTameableMetadataBundle,
10835 wolf_interested: WolfInterested,
10836 wolf_collar_color: WolfCollarColor,
10837 wolf_anger_end_time: WolfAngerEndTime,
10838 wolf_variant: WolfVariant,
10839 sound_variant: SoundVariant,
10840}
10841impl Default for WolfMetadataBundle {
10842 fn default() -> Self {
10843 Self {
10844 _marker: Wolf,
10845 parent: AbstractTameableMetadataBundle {
10846 _marker: AbstractTameable,
10847 parent: AbstractAnimalMetadataBundle {
10848 _marker: AbstractAnimal,
10849 parent: AbstractAgeableMetadataBundle {
10850 _marker: AbstractAgeable,
10851 parent: AbstractCreatureMetadataBundle {
10852 _marker: AbstractCreature,
10853 parent: AbstractInsentientMetadataBundle {
10854 _marker: AbstractInsentient,
10855 parent: AbstractLivingMetadataBundle {
10856 _marker: AbstractLiving,
10857 parent: AbstractEntityMetadataBundle {
10858 _marker: AbstractEntity,
10859 on_fire: OnFire(false),
10860 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10861 false,
10862 ),
10863 sprinting: Sprinting(false),
10864 swimming: Swimming(false),
10865 currently_glowing: CurrentlyGlowing(false),
10866 invisible: Invisible(false),
10867 fall_flying: FallFlying(false),
10868 air_supply: AirSupply(Default::default()),
10869 custom_name: CustomName(Default::default()),
10870 custom_name_visible: CustomNameVisible(Default::default()),
10871 silent: Silent(Default::default()),
10872 no_gravity: NoGravity(Default::default()),
10873 pose: Pose::default(),
10874 ticks_frozen: TicksFrozen(Default::default()),
10875 },
10876 auto_spin_attack: AutoSpinAttack(false),
10877 abstract_living_using_item: AbstractLivingUsingItem(false),
10878 health: Health(1.0),
10879 effect_particles: EffectParticles(Default::default()),
10880 effect_ambience: EffectAmbience(false),
10881 arrow_count: ArrowCount(0),
10882 stinger_count: StingerCount(0),
10883 sleeping_pos: SleepingPos(None),
10884 },
10885 no_ai: NoAi(false),
10886 left_handed: LeftHanded(false),
10887 aggressive: Aggressive(false),
10888 },
10889 },
10890 abstract_ageable_baby: AbstractAgeableBaby(false),
10891 },
10892 },
10893 tame: Tame(false),
10894 in_sitting_pose: InSittingPose(false),
10895 owneruuid: Owneruuid(None),
10896 },
10897 wolf_interested: WolfInterested(false),
10898 wolf_collar_color: WolfCollarColor(Default::default()),
10899 wolf_anger_end_time: WolfAngerEndTime(-1),
10900 wolf_variant: WolfVariant(azalea_registry::data::CowVariant::new_raw(0)),
10901 sound_variant: SoundVariant(azalea_registry::data::WolfVariant::new_raw(0)),
10902 }
10903 }
10904}
10905
10906#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10908pub struct ZombieNautilusDash(pub bool);
10909#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
10911pub struct ZombieNautilusVariant(pub azalea_registry::data::ZombieNautilusVariant);
10912#[derive(Component)]
10940pub struct ZombieNautilus;
10941impl ZombieNautilus {
10942 pub fn apply_metadata(
10943 entity: &mut bevy_ecs::system::EntityCommands,
10944 d: EntityDataItem,
10945 ) -> Result<(), UpdateMetadataError> {
10946 match d.index {
10947 0..=18 => AbstractTameable::apply_metadata(entity, d)?,
10948 19 => {
10949 entity.insert(ZombieNautilusDash(d.value.into_boolean()?));
10950 }
10951 20 => {
10952 entity.insert(ZombieNautilusVariant(
10953 d.value.into_zombie_nautilus_variant()?,
10954 ));
10955 }
10956 _ => {}
10957 }
10958 Ok(())
10959 }
10960}
10961
10962#[derive(Bundle)]
10966pub struct ZombieNautilusMetadataBundle {
10967 _marker: ZombieNautilus,
10968 parent: AbstractTameableMetadataBundle,
10969 zombie_nautilus_dash: ZombieNautilusDash,
10970 zombie_nautilus_variant: ZombieNautilusVariant,
10971}
10972impl Default for ZombieNautilusMetadataBundle {
10973 fn default() -> Self {
10974 Self {
10975 _marker: ZombieNautilus,
10976 parent: AbstractTameableMetadataBundle {
10977 _marker: AbstractTameable,
10978 parent: AbstractAnimalMetadataBundle {
10979 _marker: AbstractAnimal,
10980 parent: AbstractAgeableMetadataBundle {
10981 _marker: AbstractAgeable,
10982 parent: AbstractCreatureMetadataBundle {
10983 _marker: AbstractCreature,
10984 parent: AbstractInsentientMetadataBundle {
10985 _marker: AbstractInsentient,
10986 parent: AbstractLivingMetadataBundle {
10987 _marker: AbstractLiving,
10988 parent: AbstractEntityMetadataBundle {
10989 _marker: AbstractEntity,
10990 on_fire: OnFire(false),
10991 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
10992 false,
10993 ),
10994 sprinting: Sprinting(false),
10995 swimming: Swimming(false),
10996 currently_glowing: CurrentlyGlowing(false),
10997 invisible: Invisible(false),
10998 fall_flying: FallFlying(false),
10999 air_supply: AirSupply(Default::default()),
11000 custom_name: CustomName(Default::default()),
11001 custom_name_visible: CustomNameVisible(Default::default()),
11002 silent: Silent(Default::default()),
11003 no_gravity: NoGravity(Default::default()),
11004 pose: Pose::default(),
11005 ticks_frozen: TicksFrozen(Default::default()),
11006 },
11007 auto_spin_attack: AutoSpinAttack(false),
11008 abstract_living_using_item: AbstractLivingUsingItem(false),
11009 health: Health(1.0),
11010 effect_particles: EffectParticles(Default::default()),
11011 effect_ambience: EffectAmbience(false),
11012 arrow_count: ArrowCount(0),
11013 stinger_count: StingerCount(0),
11014 sleeping_pos: SleepingPos(None),
11015 },
11016 no_ai: NoAi(false),
11017 left_handed: LeftHanded(false),
11018 aggressive: Aggressive(false),
11019 },
11020 },
11021 abstract_ageable_baby: AbstractAgeableBaby(false),
11022 },
11023 },
11024 tame: Tame(false),
11025 in_sitting_pose: InSittingPose(false),
11026 owneruuid: Owneruuid(None),
11027 },
11028 zombie_nautilus_dash: ZombieNautilusDash(false),
11029 zombie_nautilus_variant: ZombieNautilusVariant(
11030 azalea_registry::data::ZombieNautilusVariant::new_raw(0),
11031 ),
11032 }
11033 }
11034}
11035
11036#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11038pub struct AbstractVillagerUnhappyCounter(pub i32);
11039#[derive(Component)]
11065pub struct AbstractVillager;
11066impl AbstractVillager {
11067 pub fn apply_metadata(
11068 entity: &mut bevy_ecs::system::EntityCommands,
11069 d: EntityDataItem,
11070 ) -> Result<(), UpdateMetadataError> {
11071 match d.index {
11072 0..=16 => AbstractAgeable::apply_metadata(entity, d)?,
11073 17 => {
11074 entity.insert(AbstractVillagerUnhappyCounter(d.value.into_int()?));
11075 }
11076 _ => {}
11077 }
11078 Ok(())
11079 }
11080}
11081
11082#[derive(Bundle)]
11086pub struct AbstractVillagerMetadataBundle {
11087 _marker: AbstractVillager,
11088 parent: AbstractAgeableMetadataBundle,
11089 abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter,
11090}
11091impl Default for AbstractVillagerMetadataBundle {
11092 fn default() -> Self {
11093 Self {
11094 _marker: AbstractVillager,
11095 parent: AbstractAgeableMetadataBundle {
11096 _marker: AbstractAgeable,
11097 parent: AbstractCreatureMetadataBundle {
11098 _marker: AbstractCreature,
11099 parent: AbstractInsentientMetadataBundle {
11100 _marker: AbstractInsentient,
11101 parent: AbstractLivingMetadataBundle {
11102 _marker: AbstractLiving,
11103 parent: AbstractEntityMetadataBundle {
11104 _marker: AbstractEntity,
11105 on_fire: OnFire(false),
11106 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11107 sprinting: Sprinting(false),
11108 swimming: Swimming(false),
11109 currently_glowing: CurrentlyGlowing(false),
11110 invisible: Invisible(false),
11111 fall_flying: FallFlying(false),
11112 air_supply: AirSupply(Default::default()),
11113 custom_name: CustomName(Default::default()),
11114 custom_name_visible: CustomNameVisible(Default::default()),
11115 silent: Silent(Default::default()),
11116 no_gravity: NoGravity(Default::default()),
11117 pose: Pose::default(),
11118 ticks_frozen: TicksFrozen(Default::default()),
11119 },
11120 auto_spin_attack: AutoSpinAttack(false),
11121 abstract_living_using_item: AbstractLivingUsingItem(false),
11122 health: Health(1.0),
11123 effect_particles: EffectParticles(Default::default()),
11124 effect_ambience: EffectAmbience(false),
11125 arrow_count: ArrowCount(0),
11126 stinger_count: StingerCount(0),
11127 sleeping_pos: SleepingPos(None),
11128 },
11129 no_ai: NoAi(false),
11130 left_handed: LeftHanded(false),
11131 aggressive: Aggressive(false),
11132 },
11133 },
11134 abstract_ageable_baby: AbstractAgeableBaby(false),
11135 },
11136 abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
11137 }
11138 }
11139}
11140
11141#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11143pub struct VillagerVillagerData(pub VillagerData);
11144#[derive(Component)]
11170pub struct Villager;
11171impl Villager {
11172 pub fn apply_metadata(
11173 entity: &mut bevy_ecs::system::EntityCommands,
11174 d: EntityDataItem,
11175 ) -> Result<(), UpdateMetadataError> {
11176 match d.index {
11177 0..=17 => AbstractVillager::apply_metadata(entity, d)?,
11178 18 => {
11179 entity.insert(VillagerVillagerData(d.value.into_villager_data()?));
11180 }
11181 _ => {}
11182 }
11183 Ok(())
11184 }
11185}
11186
11187#[derive(Bundle)]
11191pub struct VillagerMetadataBundle {
11192 _marker: Villager,
11193 parent: AbstractVillagerMetadataBundle,
11194 villager_villager_data: VillagerVillagerData,
11195}
11196impl Default for VillagerMetadataBundle {
11197 fn default() -> Self {
11198 Self {
11199 _marker: Villager,
11200 parent: AbstractVillagerMetadataBundle {
11201 _marker: AbstractVillager,
11202 parent: AbstractAgeableMetadataBundle {
11203 _marker: AbstractAgeable,
11204 parent: AbstractCreatureMetadataBundle {
11205 _marker: AbstractCreature,
11206 parent: AbstractInsentientMetadataBundle {
11207 _marker: AbstractInsentient,
11208 parent: AbstractLivingMetadataBundle {
11209 _marker: AbstractLiving,
11210 parent: AbstractEntityMetadataBundle {
11211 _marker: AbstractEntity,
11212 on_fire: OnFire(false),
11213 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
11214 false,
11215 ),
11216 sprinting: Sprinting(false),
11217 swimming: Swimming(false),
11218 currently_glowing: CurrentlyGlowing(false),
11219 invisible: Invisible(false),
11220 fall_flying: FallFlying(false),
11221 air_supply: AirSupply(Default::default()),
11222 custom_name: CustomName(Default::default()),
11223 custom_name_visible: CustomNameVisible(Default::default()),
11224 silent: Silent(Default::default()),
11225 no_gravity: NoGravity(Default::default()),
11226 pose: Pose::default(),
11227 ticks_frozen: TicksFrozen(Default::default()),
11228 },
11229 auto_spin_attack: AutoSpinAttack(false),
11230 abstract_living_using_item: AbstractLivingUsingItem(false),
11231 health: Health(1.0),
11232 effect_particles: EffectParticles(Default::default()),
11233 effect_ambience: EffectAmbience(false),
11234 arrow_count: ArrowCount(0),
11235 stinger_count: StingerCount(0),
11236 sleeping_pos: SleepingPos(None),
11237 },
11238 no_ai: NoAi(false),
11239 left_handed: LeftHanded(false),
11240 aggressive: Aggressive(false),
11241 },
11242 },
11243 abstract_ageable_baby: AbstractAgeableBaby(false),
11244 },
11245 abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
11246 },
11247 villager_villager_data: VillagerVillagerData(VillagerData {
11248 kind: azalea_registry::builtin::VillagerKind::Plains,
11249 profession: azalea_registry::builtin::VillagerProfession::None,
11250 level: 0,
11251 }),
11252 }
11253 }
11254}
11255
11256#[derive(Component)]
11279pub struct WanderingTrader;
11280impl WanderingTrader {
11281 pub fn apply_metadata(
11282 entity: &mut bevy_ecs::system::EntityCommands,
11283 d: EntityDataItem,
11284 ) -> Result<(), UpdateMetadataError> {
11285 match d.index {
11286 0..=17 => AbstractVillager::apply_metadata(entity, d)?,
11287 _ => {}
11288 }
11289 Ok(())
11290 }
11291}
11292
11293#[derive(Bundle)]
11297pub struct WanderingTraderMetadataBundle {
11298 _marker: WanderingTrader,
11299 parent: AbstractVillagerMetadataBundle,
11300}
11301impl Default for WanderingTraderMetadataBundle {
11302 fn default() -> Self {
11303 Self {
11304 _marker: WanderingTrader,
11305 parent: AbstractVillagerMetadataBundle {
11306 _marker: AbstractVillager,
11307 parent: AbstractAgeableMetadataBundle {
11308 _marker: AbstractAgeable,
11309 parent: AbstractCreatureMetadataBundle {
11310 _marker: AbstractCreature,
11311 parent: AbstractInsentientMetadataBundle {
11312 _marker: AbstractInsentient,
11313 parent: AbstractLivingMetadataBundle {
11314 _marker: AbstractLiving,
11315 parent: AbstractEntityMetadataBundle {
11316 _marker: AbstractEntity,
11317 on_fire: OnFire(false),
11318 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
11319 false,
11320 ),
11321 sprinting: Sprinting(false),
11322 swimming: Swimming(false),
11323 currently_glowing: CurrentlyGlowing(false),
11324 invisible: Invisible(false),
11325 fall_flying: FallFlying(false),
11326 air_supply: AirSupply(Default::default()),
11327 custom_name: CustomName(Default::default()),
11328 custom_name_visible: CustomNameVisible(Default::default()),
11329 silent: Silent(Default::default()),
11330 no_gravity: NoGravity(Default::default()),
11331 pose: Pose::default(),
11332 ticks_frozen: TicksFrozen(Default::default()),
11333 },
11334 auto_spin_attack: AutoSpinAttack(false),
11335 abstract_living_using_item: AbstractLivingUsingItem(false),
11336 health: Health(1.0),
11337 effect_particles: EffectParticles(Default::default()),
11338 effect_ambience: EffectAmbience(false),
11339 arrow_count: ArrowCount(0),
11340 stinger_count: StingerCount(0),
11341 sleeping_pos: SleepingPos(None),
11342 },
11343 no_ai: NoAi(false),
11344 left_handed: LeftHanded(false),
11345 aggressive: Aggressive(false),
11346 },
11347 },
11348 abstract_ageable_baby: AbstractAgeableBaby(false),
11349 },
11350 abstract_villager_unhappy_counter: AbstractVillagerUnhappyCounter(0),
11351 },
11352 }
11353 }
11354}
11355
11356#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11358pub struct AbstractFishFromBucket(pub bool);
11359#[derive(Component)]
11385pub struct AbstractFish;
11386impl AbstractFish {
11387 pub fn apply_metadata(
11388 entity: &mut bevy_ecs::system::EntityCommands,
11389 d: EntityDataItem,
11390 ) -> Result<(), UpdateMetadataError> {
11391 match d.index {
11392 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
11393 16 => {
11394 entity.insert(AbstractFishFromBucket(d.value.into_boolean()?));
11395 }
11396 _ => {}
11397 }
11398 Ok(())
11399 }
11400}
11401
11402#[derive(Bundle)]
11406pub struct AbstractFishMetadataBundle {
11407 _marker: AbstractFish,
11408 parent: AbstractCreatureMetadataBundle,
11409 abstract_fish_from_bucket: AbstractFishFromBucket,
11410}
11411impl Default for AbstractFishMetadataBundle {
11412 fn default() -> Self {
11413 Self {
11414 _marker: AbstractFish,
11415 parent: AbstractCreatureMetadataBundle {
11416 _marker: AbstractCreature,
11417 parent: AbstractInsentientMetadataBundle {
11418 _marker: AbstractInsentient,
11419 parent: AbstractLivingMetadataBundle {
11420 _marker: AbstractLiving,
11421 parent: AbstractEntityMetadataBundle {
11422 _marker: AbstractEntity,
11423 on_fire: OnFire(false),
11424 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11425 sprinting: Sprinting(false),
11426 swimming: Swimming(false),
11427 currently_glowing: CurrentlyGlowing(false),
11428 invisible: Invisible(false),
11429 fall_flying: FallFlying(false),
11430 air_supply: AirSupply(Default::default()),
11431 custom_name: CustomName(Default::default()),
11432 custom_name_visible: CustomNameVisible(Default::default()),
11433 silent: Silent(Default::default()),
11434 no_gravity: NoGravity(Default::default()),
11435 pose: Pose::default(),
11436 ticks_frozen: TicksFrozen(Default::default()),
11437 },
11438 auto_spin_attack: AutoSpinAttack(false),
11439 abstract_living_using_item: AbstractLivingUsingItem(false),
11440 health: Health(1.0),
11441 effect_particles: EffectParticles(Default::default()),
11442 effect_ambience: EffectAmbience(false),
11443 arrow_count: ArrowCount(0),
11444 stinger_count: StingerCount(0),
11445 sleeping_pos: SleepingPos(None),
11446 },
11447 no_ai: NoAi(false),
11448 left_handed: LeftHanded(false),
11449 aggressive: Aggressive(false),
11450 },
11451 },
11452 abstract_fish_from_bucket: AbstractFishFromBucket(false),
11453 }
11454 }
11455}
11456
11457#[derive(Component)]
11479pub struct Cod;
11480impl Cod {
11481 pub fn apply_metadata(
11482 entity: &mut bevy_ecs::system::EntityCommands,
11483 d: EntityDataItem,
11484 ) -> Result<(), UpdateMetadataError> {
11485 match d.index {
11486 0..=16 => AbstractFish::apply_metadata(entity, d)?,
11487 _ => {}
11488 }
11489 Ok(())
11490 }
11491}
11492
11493#[derive(Bundle)]
11497pub struct CodMetadataBundle {
11498 _marker: Cod,
11499 parent: AbstractFishMetadataBundle,
11500}
11501impl Default for CodMetadataBundle {
11502 fn default() -> Self {
11503 Self {
11504 _marker: Cod,
11505 parent: AbstractFishMetadataBundle {
11506 _marker: AbstractFish,
11507 parent: AbstractCreatureMetadataBundle {
11508 _marker: AbstractCreature,
11509 parent: AbstractInsentientMetadataBundle {
11510 _marker: AbstractInsentient,
11511 parent: AbstractLivingMetadataBundle {
11512 _marker: AbstractLiving,
11513 parent: AbstractEntityMetadataBundle {
11514 _marker: AbstractEntity,
11515 on_fire: OnFire(false),
11516 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11517 sprinting: Sprinting(false),
11518 swimming: Swimming(false),
11519 currently_glowing: CurrentlyGlowing(false),
11520 invisible: Invisible(false),
11521 fall_flying: FallFlying(false),
11522 air_supply: AirSupply(Default::default()),
11523 custom_name: CustomName(Default::default()),
11524 custom_name_visible: CustomNameVisible(Default::default()),
11525 silent: Silent(Default::default()),
11526 no_gravity: NoGravity(Default::default()),
11527 pose: Pose::default(),
11528 ticks_frozen: TicksFrozen(Default::default()),
11529 },
11530 auto_spin_attack: AutoSpinAttack(false),
11531 abstract_living_using_item: AbstractLivingUsingItem(false),
11532 health: Health(1.0),
11533 effect_particles: EffectParticles(Default::default()),
11534 effect_ambience: EffectAmbience(false),
11535 arrow_count: ArrowCount(0),
11536 stinger_count: StingerCount(0),
11537 sleeping_pos: SleepingPos(None),
11538 },
11539 no_ai: NoAi(false),
11540 left_handed: LeftHanded(false),
11541 aggressive: Aggressive(false),
11542 },
11543 },
11544 abstract_fish_from_bucket: AbstractFishFromBucket(false),
11545 },
11546 }
11547 }
11548}
11549
11550#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11552pub struct SalmonKind(pub i32);
11553#[derive(Component)]
11577pub struct Salmon;
11578impl Salmon {
11579 pub fn apply_metadata(
11580 entity: &mut bevy_ecs::system::EntityCommands,
11581 d: EntityDataItem,
11582 ) -> Result<(), UpdateMetadataError> {
11583 match d.index {
11584 0..=16 => AbstractFish::apply_metadata(entity, d)?,
11585 17 => {
11586 entity.insert(SalmonKind(d.value.into_int()?));
11587 }
11588 _ => {}
11589 }
11590 Ok(())
11591 }
11592}
11593
11594#[derive(Bundle)]
11598pub struct SalmonMetadataBundle {
11599 _marker: Salmon,
11600 parent: AbstractFishMetadataBundle,
11601 salmon_kind: SalmonKind,
11602}
11603impl Default for SalmonMetadataBundle {
11604 fn default() -> Self {
11605 Self {
11606 _marker: Salmon,
11607 parent: AbstractFishMetadataBundle {
11608 _marker: AbstractFish,
11609 parent: AbstractCreatureMetadataBundle {
11610 _marker: AbstractCreature,
11611 parent: AbstractInsentientMetadataBundle {
11612 _marker: AbstractInsentient,
11613 parent: AbstractLivingMetadataBundle {
11614 _marker: AbstractLiving,
11615 parent: AbstractEntityMetadataBundle {
11616 _marker: AbstractEntity,
11617 on_fire: OnFire(false),
11618 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11619 sprinting: Sprinting(false),
11620 swimming: Swimming(false),
11621 currently_glowing: CurrentlyGlowing(false),
11622 invisible: Invisible(false),
11623 fall_flying: FallFlying(false),
11624 air_supply: AirSupply(Default::default()),
11625 custom_name: CustomName(Default::default()),
11626 custom_name_visible: CustomNameVisible(Default::default()),
11627 silent: Silent(Default::default()),
11628 no_gravity: NoGravity(Default::default()),
11629 pose: Pose::default(),
11630 ticks_frozen: TicksFrozen(Default::default()),
11631 },
11632 auto_spin_attack: AutoSpinAttack(false),
11633 abstract_living_using_item: AbstractLivingUsingItem(false),
11634 health: Health(1.0),
11635 effect_particles: EffectParticles(Default::default()),
11636 effect_ambience: EffectAmbience(false),
11637 arrow_count: ArrowCount(0),
11638 stinger_count: StingerCount(0),
11639 sleeping_pos: SleepingPos(None),
11640 },
11641 no_ai: NoAi(false),
11642 left_handed: LeftHanded(false),
11643 aggressive: Aggressive(false),
11644 },
11645 },
11646 abstract_fish_from_bucket: AbstractFishFromBucket(false),
11647 },
11648 salmon_kind: SalmonKind(Default::default()),
11649 }
11650 }
11651}
11652
11653#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11655pub struct TropicalFishTypeVariant(pub i32);
11656#[derive(Component)]
11681pub struct TropicalFish;
11682impl TropicalFish {
11683 pub fn apply_metadata(
11684 entity: &mut bevy_ecs::system::EntityCommands,
11685 d: EntityDataItem,
11686 ) -> Result<(), UpdateMetadataError> {
11687 match d.index {
11688 0..=16 => AbstractFish::apply_metadata(entity, d)?,
11689 17 => {
11690 entity.insert(TropicalFishTypeVariant(d.value.into_int()?));
11691 }
11692 _ => {}
11693 }
11694 Ok(())
11695 }
11696}
11697
11698#[derive(Bundle)]
11702pub struct TropicalFishMetadataBundle {
11703 _marker: TropicalFish,
11704 parent: AbstractFishMetadataBundle,
11705 tropical_fish_type_variant: TropicalFishTypeVariant,
11706}
11707impl Default for TropicalFishMetadataBundle {
11708 fn default() -> Self {
11709 Self {
11710 _marker: TropicalFish,
11711 parent: AbstractFishMetadataBundle {
11712 _marker: AbstractFish,
11713 parent: AbstractCreatureMetadataBundle {
11714 _marker: AbstractCreature,
11715 parent: AbstractInsentientMetadataBundle {
11716 _marker: AbstractInsentient,
11717 parent: AbstractLivingMetadataBundle {
11718 _marker: AbstractLiving,
11719 parent: AbstractEntityMetadataBundle {
11720 _marker: AbstractEntity,
11721 on_fire: OnFire(false),
11722 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11723 sprinting: Sprinting(false),
11724 swimming: Swimming(false),
11725 currently_glowing: CurrentlyGlowing(false),
11726 invisible: Invisible(false),
11727 fall_flying: FallFlying(false),
11728 air_supply: AirSupply(Default::default()),
11729 custom_name: CustomName(Default::default()),
11730 custom_name_visible: CustomNameVisible(Default::default()),
11731 silent: Silent(Default::default()),
11732 no_gravity: NoGravity(Default::default()),
11733 pose: Pose::default(),
11734 ticks_frozen: TicksFrozen(Default::default()),
11735 },
11736 auto_spin_attack: AutoSpinAttack(false),
11737 abstract_living_using_item: AbstractLivingUsingItem(false),
11738 health: Health(1.0),
11739 effect_particles: EffectParticles(Default::default()),
11740 effect_ambience: EffectAmbience(false),
11741 arrow_count: ArrowCount(0),
11742 stinger_count: StingerCount(0),
11743 sleeping_pos: SleepingPos(None),
11744 },
11745 no_ai: NoAi(false),
11746 left_handed: LeftHanded(false),
11747 aggressive: Aggressive(false),
11748 },
11749 },
11750 abstract_fish_from_bucket: AbstractFishFromBucket(false),
11751 },
11752 tropical_fish_type_variant: TropicalFishTypeVariant(Default::default()),
11753 }
11754 }
11755}
11756
11757#[derive(Component)]
11814pub struct AbstractMonster;
11815impl AbstractMonster {
11816 pub fn apply_metadata(
11817 entity: &mut bevy_ecs::system::EntityCommands,
11818 d: EntityDataItem,
11819 ) -> Result<(), UpdateMetadataError> {
11820 match d.index {
11821 0..=15 => AbstractCreature::apply_metadata(entity, d)?,
11822 _ => {}
11823 }
11824 Ok(())
11825 }
11826}
11827
11828#[derive(Bundle)]
11832pub struct AbstractMonsterMetadataBundle {
11833 _marker: AbstractMonster,
11834 parent: AbstractCreatureMetadataBundle,
11835}
11836impl Default for AbstractMonsterMetadataBundle {
11837 fn default() -> Self {
11838 Self {
11839 _marker: AbstractMonster,
11840 parent: AbstractCreatureMetadataBundle {
11841 _marker: AbstractCreature,
11842 parent: AbstractInsentientMetadataBundle {
11843 _marker: AbstractInsentient,
11844 parent: AbstractLivingMetadataBundle {
11845 _marker: AbstractLiving,
11846 parent: AbstractEntityMetadataBundle {
11847 _marker: AbstractEntity,
11848 on_fire: OnFire(false),
11849 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11850 sprinting: Sprinting(false),
11851 swimming: Swimming(false),
11852 currently_glowing: CurrentlyGlowing(false),
11853 invisible: Invisible(false),
11854 fall_flying: FallFlying(false),
11855 air_supply: AirSupply(Default::default()),
11856 custom_name: CustomName(Default::default()),
11857 custom_name_visible: CustomNameVisible(Default::default()),
11858 silent: Silent(Default::default()),
11859 no_gravity: NoGravity(Default::default()),
11860 pose: Pose::default(),
11861 ticks_frozen: TicksFrozen(Default::default()),
11862 },
11863 auto_spin_attack: AutoSpinAttack(false),
11864 abstract_living_using_item: AbstractLivingUsingItem(false),
11865 health: Health(1.0),
11866 effect_particles: EffectParticles(Default::default()),
11867 effect_ambience: EffectAmbience(false),
11868 arrow_count: ArrowCount(0),
11869 stinger_count: StingerCount(0),
11870 sleeping_pos: SleepingPos(None),
11871 },
11872 no_ai: NoAi(false),
11873 left_handed: LeftHanded(false),
11874 aggressive: Aggressive(false),
11875 },
11876 },
11877 }
11878 }
11879}
11880
11881#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
11882pub struct Charged(pub bool);
11884#[derive(Component)]
11908pub struct Blaze;
11909impl Blaze {
11910 pub fn apply_metadata(
11911 entity: &mut bevy_ecs::system::EntityCommands,
11912 d: EntityDataItem,
11913 ) -> Result<(), UpdateMetadataError> {
11914 match d.index {
11915 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
11916 16 => {
11917 let bitfield = d.value.into_byte()?;
11918 entity.insert(Charged(bitfield & 0x1 != 0));
11919 }
11920 _ => {}
11921 }
11922 Ok(())
11923 }
11924}
11925
11926#[derive(Bundle)]
11930pub struct BlazeMetadataBundle {
11931 _marker: Blaze,
11932 parent: AbstractMonsterMetadataBundle,
11933 charged: Charged,
11934}
11935impl Default for BlazeMetadataBundle {
11936 fn default() -> Self {
11937 Self {
11938 _marker: Blaze,
11939 parent: AbstractMonsterMetadataBundle {
11940 _marker: AbstractMonster,
11941 parent: AbstractCreatureMetadataBundle {
11942 _marker: AbstractCreature,
11943 parent: AbstractInsentientMetadataBundle {
11944 _marker: AbstractInsentient,
11945 parent: AbstractLivingMetadataBundle {
11946 _marker: AbstractLiving,
11947 parent: AbstractEntityMetadataBundle {
11948 _marker: AbstractEntity,
11949 on_fire: OnFire(false),
11950 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
11951 sprinting: Sprinting(false),
11952 swimming: Swimming(false),
11953 currently_glowing: CurrentlyGlowing(false),
11954 invisible: Invisible(false),
11955 fall_flying: FallFlying(false),
11956 air_supply: AirSupply(Default::default()),
11957 custom_name: CustomName(Default::default()),
11958 custom_name_visible: CustomNameVisible(Default::default()),
11959 silent: Silent(Default::default()),
11960 no_gravity: NoGravity(Default::default()),
11961 pose: Pose::default(),
11962 ticks_frozen: TicksFrozen(Default::default()),
11963 },
11964 auto_spin_attack: AutoSpinAttack(false),
11965 abstract_living_using_item: AbstractLivingUsingItem(false),
11966 health: Health(1.0),
11967 effect_particles: EffectParticles(Default::default()),
11968 effect_ambience: EffectAmbience(false),
11969 arrow_count: ArrowCount(0),
11970 stinger_count: StingerCount(0),
11971 sleeping_pos: SleepingPos(None),
11972 },
11973 no_ai: NoAi(false),
11974 left_handed: LeftHanded(false),
11975 aggressive: Aggressive(false),
11976 },
11977 },
11978 },
11979 charged: Charged(false),
11980 }
11981 }
11982}
11983
11984#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
11986pub struct BoggedSheared(pub bool);
11987#[derive(Component)]
12011pub struct Bogged;
12012impl Bogged {
12013 pub fn apply_metadata(
12014 entity: &mut bevy_ecs::system::EntityCommands,
12015 d: EntityDataItem,
12016 ) -> Result<(), UpdateMetadataError> {
12017 match d.index {
12018 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12019 16 => {
12020 entity.insert(BoggedSheared(d.value.into_boolean()?));
12021 }
12022 _ => {}
12023 }
12024 Ok(())
12025 }
12026}
12027
12028#[derive(Bundle)]
12032pub struct BoggedMetadataBundle {
12033 _marker: Bogged,
12034 parent: AbstractMonsterMetadataBundle,
12035 bogged_sheared: BoggedSheared,
12036}
12037impl Default for BoggedMetadataBundle {
12038 fn default() -> Self {
12039 Self {
12040 _marker: Bogged,
12041 parent: AbstractMonsterMetadataBundle {
12042 _marker: AbstractMonster,
12043 parent: AbstractCreatureMetadataBundle {
12044 _marker: AbstractCreature,
12045 parent: AbstractInsentientMetadataBundle {
12046 _marker: AbstractInsentient,
12047 parent: AbstractLivingMetadataBundle {
12048 _marker: AbstractLiving,
12049 parent: AbstractEntityMetadataBundle {
12050 _marker: AbstractEntity,
12051 on_fire: OnFire(false),
12052 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12053 sprinting: Sprinting(false),
12054 swimming: Swimming(false),
12055 currently_glowing: CurrentlyGlowing(false),
12056 invisible: Invisible(false),
12057 fall_flying: FallFlying(false),
12058 air_supply: AirSupply(Default::default()),
12059 custom_name: CustomName(Default::default()),
12060 custom_name_visible: CustomNameVisible(Default::default()),
12061 silent: Silent(Default::default()),
12062 no_gravity: NoGravity(Default::default()),
12063 pose: Pose::default(),
12064 ticks_frozen: TicksFrozen(Default::default()),
12065 },
12066 auto_spin_attack: AutoSpinAttack(false),
12067 abstract_living_using_item: AbstractLivingUsingItem(false),
12068 health: Health(1.0),
12069 effect_particles: EffectParticles(Default::default()),
12070 effect_ambience: EffectAmbience(false),
12071 arrow_count: ArrowCount(0),
12072 stinger_count: StingerCount(0),
12073 sleeping_pos: SleepingPos(None),
12074 },
12075 no_ai: NoAi(false),
12076 left_handed: LeftHanded(false),
12077 aggressive: Aggressive(false),
12078 },
12079 },
12080 },
12081 bogged_sheared: BoggedSheared(false),
12082 }
12083 }
12084}
12085
12086#[derive(Component)]
12108pub struct Breeze;
12109impl Breeze {
12110 pub fn apply_metadata(
12111 entity: &mut bevy_ecs::system::EntityCommands,
12112 d: EntityDataItem,
12113 ) -> Result<(), UpdateMetadataError> {
12114 match d.index {
12115 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12116 _ => {}
12117 }
12118 Ok(())
12119 }
12120}
12121
12122#[derive(Bundle)]
12126pub struct BreezeMetadataBundle {
12127 _marker: Breeze,
12128 parent: AbstractMonsterMetadataBundle,
12129}
12130impl Default for BreezeMetadataBundle {
12131 fn default() -> Self {
12132 Self {
12133 _marker: Breeze,
12134 parent: AbstractMonsterMetadataBundle {
12135 _marker: AbstractMonster,
12136 parent: AbstractCreatureMetadataBundle {
12137 _marker: AbstractCreature,
12138 parent: AbstractInsentientMetadataBundle {
12139 _marker: AbstractInsentient,
12140 parent: AbstractLivingMetadataBundle {
12141 _marker: AbstractLiving,
12142 parent: AbstractEntityMetadataBundle {
12143 _marker: AbstractEntity,
12144 on_fire: OnFire(false),
12145 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12146 sprinting: Sprinting(false),
12147 swimming: Swimming(false),
12148 currently_glowing: CurrentlyGlowing(false),
12149 invisible: Invisible(false),
12150 fall_flying: FallFlying(false),
12151 air_supply: AirSupply(Default::default()),
12152 custom_name: CustomName(Default::default()),
12153 custom_name_visible: CustomNameVisible(Default::default()),
12154 silent: Silent(Default::default()),
12155 no_gravity: NoGravity(Default::default()),
12156 pose: Pose::default(),
12157 ticks_frozen: TicksFrozen(Default::default()),
12158 },
12159 auto_spin_attack: AutoSpinAttack(false),
12160 abstract_living_using_item: AbstractLivingUsingItem(false),
12161 health: Health(1.0),
12162 effect_particles: EffectParticles(Default::default()),
12163 effect_ambience: EffectAmbience(false),
12164 arrow_count: ArrowCount(0),
12165 stinger_count: StingerCount(0),
12166 sleeping_pos: SleepingPos(None),
12167 },
12168 no_ai: NoAi(false),
12169 left_handed: LeftHanded(false),
12170 aggressive: Aggressive(false),
12171 },
12172 },
12173 },
12174 }
12175 }
12176}
12177
12178#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12180pub struct CanMove(pub bool);
12181#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12183pub struct IsActive(pub bool);
12184#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12186pub struct IsTearingDown(pub bool);
12187#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12189pub struct HomePos(pub Option<BlockPos>);
12190#[derive(Component)]
12218pub struct Creaking;
12219impl Creaking {
12220 pub fn apply_metadata(
12221 entity: &mut bevy_ecs::system::EntityCommands,
12222 d: EntityDataItem,
12223 ) -> Result<(), UpdateMetadataError> {
12224 match d.index {
12225 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12226 16 => {
12227 entity.insert(CanMove(d.value.into_boolean()?));
12228 }
12229 17 => {
12230 entity.insert(IsActive(d.value.into_boolean()?));
12231 }
12232 18 => {
12233 entity.insert(IsTearingDown(d.value.into_boolean()?));
12234 }
12235 19 => {
12236 entity.insert(HomePos(d.value.into_optional_block_pos()?));
12237 }
12238 _ => {}
12239 }
12240 Ok(())
12241 }
12242}
12243
12244#[derive(Bundle)]
12248pub struct CreakingMetadataBundle {
12249 _marker: Creaking,
12250 parent: AbstractMonsterMetadataBundle,
12251 can_move: CanMove,
12252 is_active: IsActive,
12253 is_tearing_down: IsTearingDown,
12254 home_pos: HomePos,
12255}
12256impl Default for CreakingMetadataBundle {
12257 fn default() -> Self {
12258 Self {
12259 _marker: Creaking,
12260 parent: AbstractMonsterMetadataBundle {
12261 _marker: AbstractMonster,
12262 parent: AbstractCreatureMetadataBundle {
12263 _marker: AbstractCreature,
12264 parent: AbstractInsentientMetadataBundle {
12265 _marker: AbstractInsentient,
12266 parent: AbstractLivingMetadataBundle {
12267 _marker: AbstractLiving,
12268 parent: AbstractEntityMetadataBundle {
12269 _marker: AbstractEntity,
12270 on_fire: OnFire(false),
12271 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12272 sprinting: Sprinting(false),
12273 swimming: Swimming(false),
12274 currently_glowing: CurrentlyGlowing(false),
12275 invisible: Invisible(false),
12276 fall_flying: FallFlying(false),
12277 air_supply: AirSupply(Default::default()),
12278 custom_name: CustomName(Default::default()),
12279 custom_name_visible: CustomNameVisible(Default::default()),
12280 silent: Silent(Default::default()),
12281 no_gravity: NoGravity(Default::default()),
12282 pose: Pose::default(),
12283 ticks_frozen: TicksFrozen(Default::default()),
12284 },
12285 auto_spin_attack: AutoSpinAttack(false),
12286 abstract_living_using_item: AbstractLivingUsingItem(false),
12287 health: Health(1.0),
12288 effect_particles: EffectParticles(Default::default()),
12289 effect_ambience: EffectAmbience(false),
12290 arrow_count: ArrowCount(0),
12291 stinger_count: StingerCount(0),
12292 sleeping_pos: SleepingPos(None),
12293 },
12294 no_ai: NoAi(false),
12295 left_handed: LeftHanded(false),
12296 aggressive: Aggressive(false),
12297 },
12298 },
12299 },
12300 can_move: CanMove(true),
12301 is_active: IsActive(false),
12302 is_tearing_down: IsTearingDown(false),
12303 home_pos: HomePos(None),
12304 }
12305 }
12306}
12307
12308#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12310pub struct SwellDir(pub i32);
12311#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12313pub struct IsPowered(pub bool);
12314#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12316pub struct IsIgnited(pub bool);
12317#[derive(Component)]
12343pub struct Creeper;
12344impl Creeper {
12345 pub fn apply_metadata(
12346 entity: &mut bevy_ecs::system::EntityCommands,
12347 d: EntityDataItem,
12348 ) -> Result<(), UpdateMetadataError> {
12349 match d.index {
12350 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12351 16 => {
12352 entity.insert(SwellDir(d.value.into_int()?));
12353 }
12354 17 => {
12355 entity.insert(IsPowered(d.value.into_boolean()?));
12356 }
12357 18 => {
12358 entity.insert(IsIgnited(d.value.into_boolean()?));
12359 }
12360 _ => {}
12361 }
12362 Ok(())
12363 }
12364}
12365
12366#[derive(Bundle)]
12370pub struct CreeperMetadataBundle {
12371 _marker: Creeper,
12372 parent: AbstractMonsterMetadataBundle,
12373 swell_dir: SwellDir,
12374 is_powered: IsPowered,
12375 is_ignited: IsIgnited,
12376}
12377impl Default for CreeperMetadataBundle {
12378 fn default() -> Self {
12379 Self {
12380 _marker: Creeper,
12381 parent: AbstractMonsterMetadataBundle {
12382 _marker: AbstractMonster,
12383 parent: AbstractCreatureMetadataBundle {
12384 _marker: AbstractCreature,
12385 parent: AbstractInsentientMetadataBundle {
12386 _marker: AbstractInsentient,
12387 parent: AbstractLivingMetadataBundle {
12388 _marker: AbstractLiving,
12389 parent: AbstractEntityMetadataBundle {
12390 _marker: AbstractEntity,
12391 on_fire: OnFire(false),
12392 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12393 sprinting: Sprinting(false),
12394 swimming: Swimming(false),
12395 currently_glowing: CurrentlyGlowing(false),
12396 invisible: Invisible(false),
12397 fall_flying: FallFlying(false),
12398 air_supply: AirSupply(Default::default()),
12399 custom_name: CustomName(Default::default()),
12400 custom_name_visible: CustomNameVisible(Default::default()),
12401 silent: Silent(Default::default()),
12402 no_gravity: NoGravity(Default::default()),
12403 pose: Pose::default(),
12404 ticks_frozen: TicksFrozen(Default::default()),
12405 },
12406 auto_spin_attack: AutoSpinAttack(false),
12407 abstract_living_using_item: AbstractLivingUsingItem(false),
12408 health: Health(1.0),
12409 effect_particles: EffectParticles(Default::default()),
12410 effect_ambience: EffectAmbience(false),
12411 arrow_count: ArrowCount(0),
12412 stinger_count: StingerCount(0),
12413 sleeping_pos: SleepingPos(None),
12414 },
12415 no_ai: NoAi(false),
12416 left_handed: LeftHanded(false),
12417 aggressive: Aggressive(false),
12418 },
12419 },
12420 },
12421 swell_dir: SwellDir(-1),
12422 is_powered: IsPowered(false),
12423 is_ignited: IsIgnited(false),
12424 }
12425 }
12426}
12427
12428#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12430pub struct CarryState(pub azalea_block::BlockState);
12431#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12433pub struct Creepy(pub bool);
12434#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12436pub struct StaredAt(pub bool);
12437#[derive(Component)]
12464pub struct Enderman;
12465impl Enderman {
12466 pub fn apply_metadata(
12467 entity: &mut bevy_ecs::system::EntityCommands,
12468 d: EntityDataItem,
12469 ) -> Result<(), UpdateMetadataError> {
12470 match d.index {
12471 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12472 16 => {
12473 entity.insert(CarryState(d.value.into_optional_block_state()?));
12474 }
12475 17 => {
12476 entity.insert(Creepy(d.value.into_boolean()?));
12477 }
12478 18 => {
12479 entity.insert(StaredAt(d.value.into_boolean()?));
12480 }
12481 _ => {}
12482 }
12483 Ok(())
12484 }
12485}
12486
12487#[derive(Bundle)]
12491pub struct EndermanMetadataBundle {
12492 _marker: Enderman,
12493 parent: AbstractMonsterMetadataBundle,
12494 carry_state: CarryState,
12495 creepy: Creepy,
12496 stared_at: StaredAt,
12497}
12498impl Default for EndermanMetadataBundle {
12499 fn default() -> Self {
12500 Self {
12501 _marker: Enderman,
12502 parent: AbstractMonsterMetadataBundle {
12503 _marker: AbstractMonster,
12504 parent: AbstractCreatureMetadataBundle {
12505 _marker: AbstractCreature,
12506 parent: AbstractInsentientMetadataBundle {
12507 _marker: AbstractInsentient,
12508 parent: AbstractLivingMetadataBundle {
12509 _marker: AbstractLiving,
12510 parent: AbstractEntityMetadataBundle {
12511 _marker: AbstractEntity,
12512 on_fire: OnFire(false),
12513 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12514 sprinting: Sprinting(false),
12515 swimming: Swimming(false),
12516 currently_glowing: CurrentlyGlowing(false),
12517 invisible: Invisible(false),
12518 fall_flying: FallFlying(false),
12519 air_supply: AirSupply(Default::default()),
12520 custom_name: CustomName(Default::default()),
12521 custom_name_visible: CustomNameVisible(Default::default()),
12522 silent: Silent(Default::default()),
12523 no_gravity: NoGravity(Default::default()),
12524 pose: Pose::default(),
12525 ticks_frozen: TicksFrozen(Default::default()),
12526 },
12527 auto_spin_attack: AutoSpinAttack(false),
12528 abstract_living_using_item: AbstractLivingUsingItem(false),
12529 health: Health(1.0),
12530 effect_particles: EffectParticles(Default::default()),
12531 effect_ambience: EffectAmbience(false),
12532 arrow_count: ArrowCount(0),
12533 stinger_count: StingerCount(0),
12534 sleeping_pos: SleepingPos(None),
12535 },
12536 no_ai: NoAi(false),
12537 left_handed: LeftHanded(false),
12538 aggressive: Aggressive(false),
12539 },
12540 },
12541 },
12542 carry_state: CarryState(azalea_block::BlockState::AIR),
12543 creepy: Creepy(false),
12544 stared_at: StaredAt(false),
12545 }
12546 }
12547}
12548
12549#[derive(Component)]
12571pub struct Endermite;
12572impl Endermite {
12573 pub fn apply_metadata(
12574 entity: &mut bevy_ecs::system::EntityCommands,
12575 d: EntityDataItem,
12576 ) -> Result<(), UpdateMetadataError> {
12577 match d.index {
12578 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12579 _ => {}
12580 }
12581 Ok(())
12582 }
12583}
12584
12585#[derive(Bundle)]
12589pub struct EndermiteMetadataBundle {
12590 _marker: Endermite,
12591 parent: AbstractMonsterMetadataBundle,
12592}
12593impl Default for EndermiteMetadataBundle {
12594 fn default() -> Self {
12595 Self {
12596 _marker: Endermite,
12597 parent: AbstractMonsterMetadataBundle {
12598 _marker: AbstractMonster,
12599 parent: AbstractCreatureMetadataBundle {
12600 _marker: AbstractCreature,
12601 parent: AbstractInsentientMetadataBundle {
12602 _marker: AbstractInsentient,
12603 parent: AbstractLivingMetadataBundle {
12604 _marker: AbstractLiving,
12605 parent: AbstractEntityMetadataBundle {
12606 _marker: AbstractEntity,
12607 on_fire: OnFire(false),
12608 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12609 sprinting: Sprinting(false),
12610 swimming: Swimming(false),
12611 currently_glowing: CurrentlyGlowing(false),
12612 invisible: Invisible(false),
12613 fall_flying: FallFlying(false),
12614 air_supply: AirSupply(Default::default()),
12615 custom_name: CustomName(Default::default()),
12616 custom_name_visible: CustomNameVisible(Default::default()),
12617 silent: Silent(Default::default()),
12618 no_gravity: NoGravity(Default::default()),
12619 pose: Pose::default(),
12620 ticks_frozen: TicksFrozen(Default::default()),
12621 },
12622 auto_spin_attack: AutoSpinAttack(false),
12623 abstract_living_using_item: AbstractLivingUsingItem(false),
12624 health: Health(1.0),
12625 effect_particles: EffectParticles(Default::default()),
12626 effect_ambience: EffectAmbience(false),
12627 arrow_count: ArrowCount(0),
12628 stinger_count: StingerCount(0),
12629 sleeping_pos: SleepingPos(None),
12630 },
12631 no_ai: NoAi(false),
12632 left_handed: LeftHanded(false),
12633 aggressive: Aggressive(false),
12634 },
12635 },
12636 },
12637 }
12638 }
12639}
12640
12641#[derive(Component)]
12663pub struct Giant;
12664impl Giant {
12665 pub fn apply_metadata(
12666 entity: &mut bevy_ecs::system::EntityCommands,
12667 d: EntityDataItem,
12668 ) -> Result<(), UpdateMetadataError> {
12669 match d.index {
12670 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12671 _ => {}
12672 }
12673 Ok(())
12674 }
12675}
12676
12677#[derive(Bundle)]
12681pub struct GiantMetadataBundle {
12682 _marker: Giant,
12683 parent: AbstractMonsterMetadataBundle,
12684}
12685impl Default for GiantMetadataBundle {
12686 fn default() -> Self {
12687 Self {
12688 _marker: Giant,
12689 parent: AbstractMonsterMetadataBundle {
12690 _marker: AbstractMonster,
12691 parent: AbstractCreatureMetadataBundle {
12692 _marker: AbstractCreature,
12693 parent: AbstractInsentientMetadataBundle {
12694 _marker: AbstractInsentient,
12695 parent: AbstractLivingMetadataBundle {
12696 _marker: AbstractLiving,
12697 parent: AbstractEntityMetadataBundle {
12698 _marker: AbstractEntity,
12699 on_fire: OnFire(false),
12700 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12701 sprinting: Sprinting(false),
12702 swimming: Swimming(false),
12703 currently_glowing: CurrentlyGlowing(false),
12704 invisible: Invisible(false),
12705 fall_flying: FallFlying(false),
12706 air_supply: AirSupply(Default::default()),
12707 custom_name: CustomName(Default::default()),
12708 custom_name_visible: CustomNameVisible(Default::default()),
12709 silent: Silent(Default::default()),
12710 no_gravity: NoGravity(Default::default()),
12711 pose: Pose::default(),
12712 ticks_frozen: TicksFrozen(Default::default()),
12713 },
12714 auto_spin_attack: AutoSpinAttack(false),
12715 abstract_living_using_item: AbstractLivingUsingItem(false),
12716 health: Health(1.0),
12717 effect_particles: EffectParticles(Default::default()),
12718 effect_ambience: EffectAmbience(false),
12719 arrow_count: ArrowCount(0),
12720 stinger_count: StingerCount(0),
12721 sleeping_pos: SleepingPos(None),
12722 },
12723 no_ai: NoAi(false),
12724 left_handed: LeftHanded(false),
12725 aggressive: Aggressive(false),
12726 },
12727 },
12728 },
12729 }
12730 }
12731}
12732
12733#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12735pub struct Moving(pub bool);
12736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
12738pub struct AttackTarget(pub i32);
12739#[derive(Component)]
12765pub struct Guardian;
12766impl Guardian {
12767 pub fn apply_metadata(
12768 entity: &mut bevy_ecs::system::EntityCommands,
12769 d: EntityDataItem,
12770 ) -> Result<(), UpdateMetadataError> {
12771 match d.index {
12772 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12773 16 => {
12774 entity.insert(Moving(d.value.into_boolean()?));
12775 }
12776 17 => {
12777 entity.insert(AttackTarget(d.value.into_int()?));
12778 }
12779 _ => {}
12780 }
12781 Ok(())
12782 }
12783}
12784
12785#[derive(Bundle)]
12789pub struct GuardianMetadataBundle {
12790 _marker: Guardian,
12791 parent: AbstractMonsterMetadataBundle,
12792 moving: Moving,
12793 attack_target: AttackTarget,
12794}
12795impl Default for GuardianMetadataBundle {
12796 fn default() -> Self {
12797 Self {
12798 _marker: Guardian,
12799 parent: AbstractMonsterMetadataBundle {
12800 _marker: AbstractMonster,
12801 parent: AbstractCreatureMetadataBundle {
12802 _marker: AbstractCreature,
12803 parent: AbstractInsentientMetadataBundle {
12804 _marker: AbstractInsentient,
12805 parent: AbstractLivingMetadataBundle {
12806 _marker: AbstractLiving,
12807 parent: AbstractEntityMetadataBundle {
12808 _marker: AbstractEntity,
12809 on_fire: OnFire(false),
12810 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
12811 sprinting: Sprinting(false),
12812 swimming: Swimming(false),
12813 currently_glowing: CurrentlyGlowing(false),
12814 invisible: Invisible(false),
12815 fall_flying: FallFlying(false),
12816 air_supply: AirSupply(Default::default()),
12817 custom_name: CustomName(Default::default()),
12818 custom_name_visible: CustomNameVisible(Default::default()),
12819 silent: Silent(Default::default()),
12820 no_gravity: NoGravity(Default::default()),
12821 pose: Pose::default(),
12822 ticks_frozen: TicksFrozen(Default::default()),
12823 },
12824 auto_spin_attack: AutoSpinAttack(false),
12825 abstract_living_using_item: AbstractLivingUsingItem(false),
12826 health: Health(1.0),
12827 effect_particles: EffectParticles(Default::default()),
12828 effect_ambience: EffectAmbience(false),
12829 arrow_count: ArrowCount(0),
12830 stinger_count: StingerCount(0),
12831 sleeping_pos: SleepingPos(None),
12832 },
12833 no_ai: NoAi(false),
12834 left_handed: LeftHanded(false),
12835 aggressive: Aggressive(false),
12836 },
12837 },
12838 },
12839 moving: Moving(false),
12840 attack_target: AttackTarget(0),
12841 }
12842 }
12843}
12844
12845#[derive(Component)]
12868pub struct ElderGuardian;
12869impl ElderGuardian {
12870 pub fn apply_metadata(
12871 entity: &mut bevy_ecs::system::EntityCommands,
12872 d: EntityDataItem,
12873 ) -> Result<(), UpdateMetadataError> {
12874 match d.index {
12875 0..=17 => Guardian::apply_metadata(entity, d)?,
12876 _ => {}
12877 }
12878 Ok(())
12879 }
12880}
12881
12882#[derive(Bundle)]
12886pub struct ElderGuardianMetadataBundle {
12887 _marker: ElderGuardian,
12888 parent: GuardianMetadataBundle,
12889}
12890impl Default for ElderGuardianMetadataBundle {
12891 fn default() -> Self {
12892 Self {
12893 _marker: ElderGuardian,
12894 parent: GuardianMetadataBundle {
12895 _marker: Guardian,
12896 parent: AbstractMonsterMetadataBundle {
12897 _marker: AbstractMonster,
12898 parent: AbstractCreatureMetadataBundle {
12899 _marker: AbstractCreature,
12900 parent: AbstractInsentientMetadataBundle {
12901 _marker: AbstractInsentient,
12902 parent: AbstractLivingMetadataBundle {
12903 _marker: AbstractLiving,
12904 parent: AbstractEntityMetadataBundle {
12905 _marker: AbstractEntity,
12906 on_fire: OnFire(false),
12907 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
12908 false,
12909 ),
12910 sprinting: Sprinting(false),
12911 swimming: Swimming(false),
12912 currently_glowing: CurrentlyGlowing(false),
12913 invisible: Invisible(false),
12914 fall_flying: FallFlying(false),
12915 air_supply: AirSupply(Default::default()),
12916 custom_name: CustomName(Default::default()),
12917 custom_name_visible: CustomNameVisible(Default::default()),
12918 silent: Silent(Default::default()),
12919 no_gravity: NoGravity(Default::default()),
12920 pose: Pose::default(),
12921 ticks_frozen: TicksFrozen(Default::default()),
12922 },
12923 auto_spin_attack: AutoSpinAttack(false),
12924 abstract_living_using_item: AbstractLivingUsingItem(false),
12925 health: Health(1.0),
12926 effect_particles: EffectParticles(Default::default()),
12927 effect_ambience: EffectAmbience(false),
12928 arrow_count: ArrowCount(0),
12929 stinger_count: StingerCount(0),
12930 sleeping_pos: SleepingPos(None),
12931 },
12932 no_ai: NoAi(false),
12933 left_handed: LeftHanded(false),
12934 aggressive: Aggressive(false),
12935 },
12936 },
12937 },
12938 moving: Moving(false),
12939 attack_target: AttackTarget(0),
12940 },
12941 }
12942 }
12943}
12944
12945#[derive(Component)]
12967pub struct Parched;
12968impl Parched {
12969 pub fn apply_metadata(
12970 entity: &mut bevy_ecs::system::EntityCommands,
12971 d: EntityDataItem,
12972 ) -> Result<(), UpdateMetadataError> {
12973 match d.index {
12974 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
12975 _ => {}
12976 }
12977 Ok(())
12978 }
12979}
12980
12981#[derive(Bundle)]
12985pub struct ParchedMetadataBundle {
12986 _marker: Parched,
12987 parent: AbstractMonsterMetadataBundle,
12988}
12989impl Default for ParchedMetadataBundle {
12990 fn default() -> Self {
12991 Self {
12992 _marker: Parched,
12993 parent: AbstractMonsterMetadataBundle {
12994 _marker: AbstractMonster,
12995 parent: AbstractCreatureMetadataBundle {
12996 _marker: AbstractCreature,
12997 parent: AbstractInsentientMetadataBundle {
12998 _marker: AbstractInsentient,
12999 parent: AbstractLivingMetadataBundle {
13000 _marker: AbstractLiving,
13001 parent: AbstractEntityMetadataBundle {
13002 _marker: AbstractEntity,
13003 on_fire: OnFire(false),
13004 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13005 sprinting: Sprinting(false),
13006 swimming: Swimming(false),
13007 currently_glowing: CurrentlyGlowing(false),
13008 invisible: Invisible(false),
13009 fall_flying: FallFlying(false),
13010 air_supply: AirSupply(Default::default()),
13011 custom_name: CustomName(Default::default()),
13012 custom_name_visible: CustomNameVisible(Default::default()),
13013 silent: Silent(Default::default()),
13014 no_gravity: NoGravity(Default::default()),
13015 pose: Pose::default(),
13016 ticks_frozen: TicksFrozen(Default::default()),
13017 },
13018 auto_spin_attack: AutoSpinAttack(false),
13019 abstract_living_using_item: AbstractLivingUsingItem(false),
13020 health: Health(1.0),
13021 effect_particles: EffectParticles(Default::default()),
13022 effect_ambience: EffectAmbience(false),
13023 arrow_count: ArrowCount(0),
13024 stinger_count: StingerCount(0),
13025 sleeping_pos: SleepingPos(None),
13026 },
13027 no_ai: NoAi(false),
13028 left_handed: LeftHanded(false),
13029 aggressive: Aggressive(false),
13030 },
13031 },
13032 },
13033 }
13034 }
13035}
13036
13037#[derive(Component)]
13059pub struct Silverfish;
13060impl Silverfish {
13061 pub fn apply_metadata(
13062 entity: &mut bevy_ecs::system::EntityCommands,
13063 d: EntityDataItem,
13064 ) -> Result<(), UpdateMetadataError> {
13065 match d.index {
13066 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13067 _ => {}
13068 }
13069 Ok(())
13070 }
13071}
13072
13073#[derive(Bundle)]
13077pub struct SilverfishMetadataBundle {
13078 _marker: Silverfish,
13079 parent: AbstractMonsterMetadataBundle,
13080}
13081impl Default for SilverfishMetadataBundle {
13082 fn default() -> Self {
13083 Self {
13084 _marker: Silverfish,
13085 parent: AbstractMonsterMetadataBundle {
13086 _marker: AbstractMonster,
13087 parent: AbstractCreatureMetadataBundle {
13088 _marker: AbstractCreature,
13089 parent: AbstractInsentientMetadataBundle {
13090 _marker: AbstractInsentient,
13091 parent: AbstractLivingMetadataBundle {
13092 _marker: AbstractLiving,
13093 parent: AbstractEntityMetadataBundle {
13094 _marker: AbstractEntity,
13095 on_fire: OnFire(false),
13096 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13097 sprinting: Sprinting(false),
13098 swimming: Swimming(false),
13099 currently_glowing: CurrentlyGlowing(false),
13100 invisible: Invisible(false),
13101 fall_flying: FallFlying(false),
13102 air_supply: AirSupply(Default::default()),
13103 custom_name: CustomName(Default::default()),
13104 custom_name_visible: CustomNameVisible(Default::default()),
13105 silent: Silent(Default::default()),
13106 no_gravity: NoGravity(Default::default()),
13107 pose: Pose::default(),
13108 ticks_frozen: TicksFrozen(Default::default()),
13109 },
13110 auto_spin_attack: AutoSpinAttack(false),
13111 abstract_living_using_item: AbstractLivingUsingItem(false),
13112 health: Health(1.0),
13113 effect_particles: EffectParticles(Default::default()),
13114 effect_ambience: EffectAmbience(false),
13115 arrow_count: ArrowCount(0),
13116 stinger_count: StingerCount(0),
13117 sleeping_pos: SleepingPos(None),
13118 },
13119 no_ai: NoAi(false),
13120 left_handed: LeftHanded(false),
13121 aggressive: Aggressive(false),
13122 },
13123 },
13124 },
13125 }
13126 }
13127}
13128
13129#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13131pub struct StrayConversion(pub bool);
13132#[derive(Component)]
13157pub struct Skeleton;
13158impl Skeleton {
13159 pub fn apply_metadata(
13160 entity: &mut bevy_ecs::system::EntityCommands,
13161 d: EntityDataItem,
13162 ) -> Result<(), UpdateMetadataError> {
13163 match d.index {
13164 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13165 16 => {
13166 entity.insert(StrayConversion(d.value.into_boolean()?));
13167 }
13168 _ => {}
13169 }
13170 Ok(())
13171 }
13172}
13173
13174#[derive(Bundle)]
13178pub struct SkeletonMetadataBundle {
13179 _marker: Skeleton,
13180 parent: AbstractMonsterMetadataBundle,
13181 stray_conversion: StrayConversion,
13182}
13183impl Default for SkeletonMetadataBundle {
13184 fn default() -> Self {
13185 Self {
13186 _marker: Skeleton,
13187 parent: AbstractMonsterMetadataBundle {
13188 _marker: AbstractMonster,
13189 parent: AbstractCreatureMetadataBundle {
13190 _marker: AbstractCreature,
13191 parent: AbstractInsentientMetadataBundle {
13192 _marker: AbstractInsentient,
13193 parent: AbstractLivingMetadataBundle {
13194 _marker: AbstractLiving,
13195 parent: AbstractEntityMetadataBundle {
13196 _marker: AbstractEntity,
13197 on_fire: OnFire(false),
13198 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13199 sprinting: Sprinting(false),
13200 swimming: Swimming(false),
13201 currently_glowing: CurrentlyGlowing(false),
13202 invisible: Invisible(false),
13203 fall_flying: FallFlying(false),
13204 air_supply: AirSupply(Default::default()),
13205 custom_name: CustomName(Default::default()),
13206 custom_name_visible: CustomNameVisible(Default::default()),
13207 silent: Silent(Default::default()),
13208 no_gravity: NoGravity(Default::default()),
13209 pose: Pose::default(),
13210 ticks_frozen: TicksFrozen(Default::default()),
13211 },
13212 auto_spin_attack: AutoSpinAttack(false),
13213 abstract_living_using_item: AbstractLivingUsingItem(false),
13214 health: Health(1.0),
13215 effect_particles: EffectParticles(Default::default()),
13216 effect_ambience: EffectAmbience(false),
13217 arrow_count: ArrowCount(0),
13218 stinger_count: StingerCount(0),
13219 sleeping_pos: SleepingPos(None),
13220 },
13221 no_ai: NoAi(false),
13222 left_handed: LeftHanded(false),
13223 aggressive: Aggressive(false),
13224 },
13225 },
13226 },
13227 stray_conversion: StrayConversion(false),
13228 }
13229 }
13230}
13231
13232#[derive(Component, Deref, DerefMut, Clone, Copy, PartialEq)]
13233pub struct Climbing(pub bool);
13235#[derive(Component)]
13259pub struct Spider;
13260impl Spider {
13261 pub fn apply_metadata(
13262 entity: &mut bevy_ecs::system::EntityCommands,
13263 d: EntityDataItem,
13264 ) -> Result<(), UpdateMetadataError> {
13265 match d.index {
13266 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13267 16 => {
13268 let bitfield = d.value.into_byte()?;
13269 entity.insert(Climbing(bitfield & 0x1 != 0));
13270 }
13271 _ => {}
13272 }
13273 Ok(())
13274 }
13275}
13276
13277#[derive(Bundle)]
13281pub struct SpiderMetadataBundle {
13282 _marker: Spider,
13283 parent: AbstractMonsterMetadataBundle,
13284 climbing: Climbing,
13285}
13286impl Default for SpiderMetadataBundle {
13287 fn default() -> Self {
13288 Self {
13289 _marker: Spider,
13290 parent: AbstractMonsterMetadataBundle {
13291 _marker: AbstractMonster,
13292 parent: AbstractCreatureMetadataBundle {
13293 _marker: AbstractCreature,
13294 parent: AbstractInsentientMetadataBundle {
13295 _marker: AbstractInsentient,
13296 parent: AbstractLivingMetadataBundle {
13297 _marker: AbstractLiving,
13298 parent: AbstractEntityMetadataBundle {
13299 _marker: AbstractEntity,
13300 on_fire: OnFire(false),
13301 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13302 sprinting: Sprinting(false),
13303 swimming: Swimming(false),
13304 currently_glowing: CurrentlyGlowing(false),
13305 invisible: Invisible(false),
13306 fall_flying: FallFlying(false),
13307 air_supply: AirSupply(Default::default()),
13308 custom_name: CustomName(Default::default()),
13309 custom_name_visible: CustomNameVisible(Default::default()),
13310 silent: Silent(Default::default()),
13311 no_gravity: NoGravity(Default::default()),
13312 pose: Pose::default(),
13313 ticks_frozen: TicksFrozen(Default::default()),
13314 },
13315 auto_spin_attack: AutoSpinAttack(false),
13316 abstract_living_using_item: AbstractLivingUsingItem(false),
13317 health: Health(1.0),
13318 effect_particles: EffectParticles(Default::default()),
13319 effect_ambience: EffectAmbience(false),
13320 arrow_count: ArrowCount(0),
13321 stinger_count: StingerCount(0),
13322 sleeping_pos: SleepingPos(None),
13323 },
13324 no_ai: NoAi(false),
13325 left_handed: LeftHanded(false),
13326 aggressive: Aggressive(false),
13327 },
13328 },
13329 },
13330 climbing: Climbing(false),
13331 }
13332 }
13333}
13334
13335#[derive(Component)]
13358pub struct CaveSpider;
13359impl CaveSpider {
13360 pub fn apply_metadata(
13361 entity: &mut bevy_ecs::system::EntityCommands,
13362 d: EntityDataItem,
13363 ) -> Result<(), UpdateMetadataError> {
13364 match d.index {
13365 0..=16 => Spider::apply_metadata(entity, d)?,
13366 _ => {}
13367 }
13368 Ok(())
13369 }
13370}
13371
13372#[derive(Bundle)]
13376pub struct CaveSpiderMetadataBundle {
13377 _marker: CaveSpider,
13378 parent: SpiderMetadataBundle,
13379}
13380impl Default for CaveSpiderMetadataBundle {
13381 fn default() -> Self {
13382 Self {
13383 _marker: CaveSpider,
13384 parent: SpiderMetadataBundle {
13385 _marker: Spider,
13386 parent: AbstractMonsterMetadataBundle {
13387 _marker: AbstractMonster,
13388 parent: AbstractCreatureMetadataBundle {
13389 _marker: AbstractCreature,
13390 parent: AbstractInsentientMetadataBundle {
13391 _marker: AbstractInsentient,
13392 parent: AbstractLivingMetadataBundle {
13393 _marker: AbstractLiving,
13394 parent: AbstractEntityMetadataBundle {
13395 _marker: AbstractEntity,
13396 on_fire: OnFire(false),
13397 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
13398 false,
13399 ),
13400 sprinting: Sprinting(false),
13401 swimming: Swimming(false),
13402 currently_glowing: CurrentlyGlowing(false),
13403 invisible: Invisible(false),
13404 fall_flying: FallFlying(false),
13405 air_supply: AirSupply(Default::default()),
13406 custom_name: CustomName(Default::default()),
13407 custom_name_visible: CustomNameVisible(Default::default()),
13408 silent: Silent(Default::default()),
13409 no_gravity: NoGravity(Default::default()),
13410 pose: Pose::default(),
13411 ticks_frozen: TicksFrozen(Default::default()),
13412 },
13413 auto_spin_attack: AutoSpinAttack(false),
13414 abstract_living_using_item: AbstractLivingUsingItem(false),
13415 health: Health(1.0),
13416 effect_particles: EffectParticles(Default::default()),
13417 effect_ambience: EffectAmbience(false),
13418 arrow_count: ArrowCount(0),
13419 stinger_count: StingerCount(0),
13420 sleeping_pos: SleepingPos(None),
13421 },
13422 no_ai: NoAi(false),
13423 left_handed: LeftHanded(false),
13424 aggressive: Aggressive(false),
13425 },
13426 },
13427 },
13428 climbing: Climbing(false),
13429 },
13430 }
13431 }
13432}
13433
13434#[derive(Component)]
13456pub struct Stray;
13457impl Stray {
13458 pub fn apply_metadata(
13459 entity: &mut bevy_ecs::system::EntityCommands,
13460 d: EntityDataItem,
13461 ) -> Result<(), UpdateMetadataError> {
13462 match d.index {
13463 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13464 _ => {}
13465 }
13466 Ok(())
13467 }
13468}
13469
13470#[derive(Bundle)]
13474pub struct StrayMetadataBundle {
13475 _marker: Stray,
13476 parent: AbstractMonsterMetadataBundle,
13477}
13478impl Default for StrayMetadataBundle {
13479 fn default() -> Self {
13480 Self {
13481 _marker: Stray,
13482 parent: AbstractMonsterMetadataBundle {
13483 _marker: AbstractMonster,
13484 parent: AbstractCreatureMetadataBundle {
13485 _marker: AbstractCreature,
13486 parent: AbstractInsentientMetadataBundle {
13487 _marker: AbstractInsentient,
13488 parent: AbstractLivingMetadataBundle {
13489 _marker: AbstractLiving,
13490 parent: AbstractEntityMetadataBundle {
13491 _marker: AbstractEntity,
13492 on_fire: OnFire(false),
13493 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13494 sprinting: Sprinting(false),
13495 swimming: Swimming(false),
13496 currently_glowing: CurrentlyGlowing(false),
13497 invisible: Invisible(false),
13498 fall_flying: FallFlying(false),
13499 air_supply: AirSupply(Default::default()),
13500 custom_name: CustomName(Default::default()),
13501 custom_name_visible: CustomNameVisible(Default::default()),
13502 silent: Silent(Default::default()),
13503 no_gravity: NoGravity(Default::default()),
13504 pose: Pose::default(),
13505 ticks_frozen: TicksFrozen(Default::default()),
13506 },
13507 auto_spin_attack: AutoSpinAttack(false),
13508 abstract_living_using_item: AbstractLivingUsingItem(false),
13509 health: Health(1.0),
13510 effect_particles: EffectParticles(Default::default()),
13511 effect_ambience: EffectAmbience(false),
13512 arrow_count: ArrowCount(0),
13513 stinger_count: StingerCount(0),
13514 sleeping_pos: SleepingPos(None),
13515 },
13516 no_ai: NoAi(false),
13517 left_handed: LeftHanded(false),
13518 aggressive: Aggressive(false),
13519 },
13520 },
13521 },
13522 }
13523 }
13524}
13525
13526#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13528pub struct VexFlags(pub u8);
13529#[derive(Component)]
13553pub struct Vex;
13554impl Vex {
13555 pub fn apply_metadata(
13556 entity: &mut bevy_ecs::system::EntityCommands,
13557 d: EntityDataItem,
13558 ) -> Result<(), UpdateMetadataError> {
13559 match d.index {
13560 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13561 16 => {
13562 entity.insert(VexFlags(d.value.into_byte()?));
13563 }
13564 _ => {}
13565 }
13566 Ok(())
13567 }
13568}
13569
13570#[derive(Bundle)]
13574pub struct VexMetadataBundle {
13575 _marker: Vex,
13576 parent: AbstractMonsterMetadataBundle,
13577 vex_flags: VexFlags,
13578}
13579impl Default for VexMetadataBundle {
13580 fn default() -> Self {
13581 Self {
13582 _marker: Vex,
13583 parent: AbstractMonsterMetadataBundle {
13584 _marker: AbstractMonster,
13585 parent: AbstractCreatureMetadataBundle {
13586 _marker: AbstractCreature,
13587 parent: AbstractInsentientMetadataBundle {
13588 _marker: AbstractInsentient,
13589 parent: AbstractLivingMetadataBundle {
13590 _marker: AbstractLiving,
13591 parent: AbstractEntityMetadataBundle {
13592 _marker: AbstractEntity,
13593 on_fire: OnFire(false),
13594 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13595 sprinting: Sprinting(false),
13596 swimming: Swimming(false),
13597 currently_glowing: CurrentlyGlowing(false),
13598 invisible: Invisible(false),
13599 fall_flying: FallFlying(false),
13600 air_supply: AirSupply(Default::default()),
13601 custom_name: CustomName(Default::default()),
13602 custom_name_visible: CustomNameVisible(Default::default()),
13603 silent: Silent(Default::default()),
13604 no_gravity: NoGravity(Default::default()),
13605 pose: Pose::default(),
13606 ticks_frozen: TicksFrozen(Default::default()),
13607 },
13608 auto_spin_attack: AutoSpinAttack(false),
13609 abstract_living_using_item: AbstractLivingUsingItem(false),
13610 health: Health(1.0),
13611 effect_particles: EffectParticles(Default::default()),
13612 effect_ambience: EffectAmbience(false),
13613 arrow_count: ArrowCount(0),
13614 stinger_count: StingerCount(0),
13615 sleeping_pos: SleepingPos(None),
13616 },
13617 no_ai: NoAi(false),
13618 left_handed: LeftHanded(false),
13619 aggressive: Aggressive(false),
13620 },
13621 },
13622 },
13623 vex_flags: VexFlags(0),
13624 }
13625 }
13626}
13627
13628#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13630pub struct ClientAngerLevel(pub i32);
13631#[derive(Component)]
13655pub struct Warden;
13656impl Warden {
13657 pub fn apply_metadata(
13658 entity: &mut bevy_ecs::system::EntityCommands,
13659 d: EntityDataItem,
13660 ) -> Result<(), UpdateMetadataError> {
13661 match d.index {
13662 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13663 16 => {
13664 entity.insert(ClientAngerLevel(d.value.into_int()?));
13665 }
13666 _ => {}
13667 }
13668 Ok(())
13669 }
13670}
13671
13672#[derive(Bundle)]
13676pub struct WardenMetadataBundle {
13677 _marker: Warden,
13678 parent: AbstractMonsterMetadataBundle,
13679 client_anger_level: ClientAngerLevel,
13680}
13681impl Default for WardenMetadataBundle {
13682 fn default() -> Self {
13683 Self {
13684 _marker: Warden,
13685 parent: AbstractMonsterMetadataBundle {
13686 _marker: AbstractMonster,
13687 parent: AbstractCreatureMetadataBundle {
13688 _marker: AbstractCreature,
13689 parent: AbstractInsentientMetadataBundle {
13690 _marker: AbstractInsentient,
13691 parent: AbstractLivingMetadataBundle {
13692 _marker: AbstractLiving,
13693 parent: AbstractEntityMetadataBundle {
13694 _marker: AbstractEntity,
13695 on_fire: OnFire(false),
13696 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13697 sprinting: Sprinting(false),
13698 swimming: Swimming(false),
13699 currently_glowing: CurrentlyGlowing(false),
13700 invisible: Invisible(false),
13701 fall_flying: FallFlying(false),
13702 air_supply: AirSupply(Default::default()),
13703 custom_name: CustomName(Default::default()),
13704 custom_name_visible: CustomNameVisible(Default::default()),
13705 silent: Silent(Default::default()),
13706 no_gravity: NoGravity(Default::default()),
13707 pose: Pose::default(),
13708 ticks_frozen: TicksFrozen(Default::default()),
13709 },
13710 auto_spin_attack: AutoSpinAttack(false),
13711 abstract_living_using_item: AbstractLivingUsingItem(false),
13712 health: Health(1.0),
13713 effect_particles: EffectParticles(Default::default()),
13714 effect_ambience: EffectAmbience(false),
13715 arrow_count: ArrowCount(0),
13716 stinger_count: StingerCount(0),
13717 sleeping_pos: SleepingPos(None),
13718 },
13719 no_ai: NoAi(false),
13720 left_handed: LeftHanded(false),
13721 aggressive: Aggressive(false),
13722 },
13723 },
13724 },
13725 client_anger_level: ClientAngerLevel(0),
13726 }
13727 }
13728}
13729
13730#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13732pub struct TargetA(pub i32);
13733#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13735pub struct TargetB(pub i32);
13736#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13738pub struct TargetC(pub i32);
13739#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13741pub struct Inv(pub i32);
13742#[derive(Component)]
13769pub struct Wither;
13770impl Wither {
13771 pub fn apply_metadata(
13772 entity: &mut bevy_ecs::system::EntityCommands,
13773 d: EntityDataItem,
13774 ) -> Result<(), UpdateMetadataError> {
13775 match d.index {
13776 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13777 16 => {
13778 entity.insert(TargetA(d.value.into_int()?));
13779 }
13780 17 => {
13781 entity.insert(TargetB(d.value.into_int()?));
13782 }
13783 18 => {
13784 entity.insert(TargetC(d.value.into_int()?));
13785 }
13786 19 => {
13787 entity.insert(Inv(d.value.into_int()?));
13788 }
13789 _ => {}
13790 }
13791 Ok(())
13792 }
13793}
13794
13795#[derive(Bundle)]
13799pub struct WitherMetadataBundle {
13800 _marker: Wither,
13801 parent: AbstractMonsterMetadataBundle,
13802 target_a: TargetA,
13803 target_b: TargetB,
13804 target_c: TargetC,
13805 inv: Inv,
13806}
13807impl Default for WitherMetadataBundle {
13808 fn default() -> Self {
13809 Self {
13810 _marker: Wither,
13811 parent: AbstractMonsterMetadataBundle {
13812 _marker: AbstractMonster,
13813 parent: AbstractCreatureMetadataBundle {
13814 _marker: AbstractCreature,
13815 parent: AbstractInsentientMetadataBundle {
13816 _marker: AbstractInsentient,
13817 parent: AbstractLivingMetadataBundle {
13818 _marker: AbstractLiving,
13819 parent: AbstractEntityMetadataBundle {
13820 _marker: AbstractEntity,
13821 on_fire: OnFire(false),
13822 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13823 sprinting: Sprinting(false),
13824 swimming: Swimming(false),
13825 currently_glowing: CurrentlyGlowing(false),
13826 invisible: Invisible(false),
13827 fall_flying: FallFlying(false),
13828 air_supply: AirSupply(Default::default()),
13829 custom_name: CustomName(Default::default()),
13830 custom_name_visible: CustomNameVisible(Default::default()),
13831 silent: Silent(Default::default()),
13832 no_gravity: NoGravity(Default::default()),
13833 pose: Pose::default(),
13834 ticks_frozen: TicksFrozen(Default::default()),
13835 },
13836 auto_spin_attack: AutoSpinAttack(false),
13837 abstract_living_using_item: AbstractLivingUsingItem(false),
13838 health: Health(1.0),
13839 effect_particles: EffectParticles(Default::default()),
13840 effect_ambience: EffectAmbience(false),
13841 arrow_count: ArrowCount(0),
13842 stinger_count: StingerCount(0),
13843 sleeping_pos: SleepingPos(None),
13844 },
13845 no_ai: NoAi(false),
13846 left_handed: LeftHanded(false),
13847 aggressive: Aggressive(false),
13848 },
13849 },
13850 },
13851 target_a: TargetA(0),
13852 target_b: TargetB(0),
13853 target_c: TargetC(0),
13854 inv: Inv(0),
13855 }
13856 }
13857}
13858
13859#[derive(Component)]
13881pub struct WitherSkeleton;
13882impl WitherSkeleton {
13883 pub fn apply_metadata(
13884 entity: &mut bevy_ecs::system::EntityCommands,
13885 d: EntityDataItem,
13886 ) -> Result<(), UpdateMetadataError> {
13887 match d.index {
13888 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13889 _ => {}
13890 }
13891 Ok(())
13892 }
13893}
13894
13895#[derive(Bundle)]
13899pub struct WitherSkeletonMetadataBundle {
13900 _marker: WitherSkeleton,
13901 parent: AbstractMonsterMetadataBundle,
13902}
13903impl Default for WitherSkeletonMetadataBundle {
13904 fn default() -> Self {
13905 Self {
13906 _marker: WitherSkeleton,
13907 parent: AbstractMonsterMetadataBundle {
13908 _marker: AbstractMonster,
13909 parent: AbstractCreatureMetadataBundle {
13910 _marker: AbstractCreature,
13911 parent: AbstractInsentientMetadataBundle {
13912 _marker: AbstractInsentient,
13913 parent: AbstractLivingMetadataBundle {
13914 _marker: AbstractLiving,
13915 parent: AbstractEntityMetadataBundle {
13916 _marker: AbstractEntity,
13917 on_fire: OnFire(false),
13918 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
13919 sprinting: Sprinting(false),
13920 swimming: Swimming(false),
13921 currently_glowing: CurrentlyGlowing(false),
13922 invisible: Invisible(false),
13923 fall_flying: FallFlying(false),
13924 air_supply: AirSupply(Default::default()),
13925 custom_name: CustomName(Default::default()),
13926 custom_name_visible: CustomNameVisible(Default::default()),
13927 silent: Silent(Default::default()),
13928 no_gravity: NoGravity(Default::default()),
13929 pose: Pose::default(),
13930 ticks_frozen: TicksFrozen(Default::default()),
13931 },
13932 auto_spin_attack: AutoSpinAttack(false),
13933 abstract_living_using_item: AbstractLivingUsingItem(false),
13934 health: Health(1.0),
13935 effect_particles: EffectParticles(Default::default()),
13936 effect_ambience: EffectAmbience(false),
13937 arrow_count: ArrowCount(0),
13938 stinger_count: StingerCount(0),
13939 sleeping_pos: SleepingPos(None),
13940 },
13941 no_ai: NoAi(false),
13942 left_handed: LeftHanded(false),
13943 aggressive: Aggressive(false),
13944 },
13945 },
13946 },
13947 }
13948 }
13949}
13950
13951#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
13953pub struct ZoglinBaby(pub bool);
13954#[derive(Component)]
13978pub struct Zoglin;
13979impl Zoglin {
13980 pub fn apply_metadata(
13981 entity: &mut bevy_ecs::system::EntityCommands,
13982 d: EntityDataItem,
13983 ) -> Result<(), UpdateMetadataError> {
13984 match d.index {
13985 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
13986 16 => {
13987 entity.insert(ZoglinBaby(d.value.into_boolean()?));
13988 }
13989 _ => {}
13990 }
13991 Ok(())
13992 }
13993}
13994
13995#[derive(Bundle)]
13999pub struct ZoglinMetadataBundle {
14000 _marker: Zoglin,
14001 parent: AbstractMonsterMetadataBundle,
14002 zoglin_baby: ZoglinBaby,
14003}
14004impl Default for ZoglinMetadataBundle {
14005 fn default() -> Self {
14006 Self {
14007 _marker: Zoglin,
14008 parent: AbstractMonsterMetadataBundle {
14009 _marker: AbstractMonster,
14010 parent: AbstractCreatureMetadataBundle {
14011 _marker: AbstractCreature,
14012 parent: AbstractInsentientMetadataBundle {
14013 _marker: AbstractInsentient,
14014 parent: AbstractLivingMetadataBundle {
14015 _marker: AbstractLiving,
14016 parent: AbstractEntityMetadataBundle {
14017 _marker: AbstractEntity,
14018 on_fire: OnFire(false),
14019 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
14020 sprinting: Sprinting(false),
14021 swimming: Swimming(false),
14022 currently_glowing: CurrentlyGlowing(false),
14023 invisible: Invisible(false),
14024 fall_flying: FallFlying(false),
14025 air_supply: AirSupply(Default::default()),
14026 custom_name: CustomName(Default::default()),
14027 custom_name_visible: CustomNameVisible(Default::default()),
14028 silent: Silent(Default::default()),
14029 no_gravity: NoGravity(Default::default()),
14030 pose: Pose::default(),
14031 ticks_frozen: TicksFrozen(Default::default()),
14032 },
14033 auto_spin_attack: AutoSpinAttack(false),
14034 abstract_living_using_item: AbstractLivingUsingItem(false),
14035 health: Health(1.0),
14036 effect_particles: EffectParticles(Default::default()),
14037 effect_ambience: EffectAmbience(false),
14038 arrow_count: ArrowCount(0),
14039 stinger_count: StingerCount(0),
14040 sleeping_pos: SleepingPos(None),
14041 },
14042 no_ai: NoAi(false),
14043 left_handed: LeftHanded(false),
14044 aggressive: Aggressive(false),
14045 },
14046 },
14047 },
14048 zoglin_baby: ZoglinBaby(false),
14049 }
14050 }
14051}
14052
14053#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14055pub struct ZombieBaby(pub bool);
14056#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14058pub struct SpecialType(pub i32);
14059#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14061pub struct DrownedConversion(pub bool);
14062#[derive(Component)]
14091pub struct Zombie;
14092impl Zombie {
14093 pub fn apply_metadata(
14094 entity: &mut bevy_ecs::system::EntityCommands,
14095 d: EntityDataItem,
14096 ) -> Result<(), UpdateMetadataError> {
14097 match d.index {
14098 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
14099 16 => {
14100 entity.insert(ZombieBaby(d.value.into_boolean()?));
14101 }
14102 17 => {
14103 entity.insert(SpecialType(d.value.into_int()?));
14104 }
14105 18 => {
14106 entity.insert(DrownedConversion(d.value.into_boolean()?));
14107 }
14108 _ => {}
14109 }
14110 Ok(())
14111 }
14112}
14113
14114#[derive(Bundle)]
14118pub struct ZombieMetadataBundle {
14119 _marker: Zombie,
14120 parent: AbstractMonsterMetadataBundle,
14121 zombie_baby: ZombieBaby,
14122 special_type: SpecialType,
14123 drowned_conversion: DrownedConversion,
14124}
14125impl Default for ZombieMetadataBundle {
14126 fn default() -> Self {
14127 Self {
14128 _marker: Zombie,
14129 parent: AbstractMonsterMetadataBundle {
14130 _marker: AbstractMonster,
14131 parent: AbstractCreatureMetadataBundle {
14132 _marker: AbstractCreature,
14133 parent: AbstractInsentientMetadataBundle {
14134 _marker: AbstractInsentient,
14135 parent: AbstractLivingMetadataBundle {
14136 _marker: AbstractLiving,
14137 parent: AbstractEntityMetadataBundle {
14138 _marker: AbstractEntity,
14139 on_fire: OnFire(false),
14140 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
14141 sprinting: Sprinting(false),
14142 swimming: Swimming(false),
14143 currently_glowing: CurrentlyGlowing(false),
14144 invisible: Invisible(false),
14145 fall_flying: FallFlying(false),
14146 air_supply: AirSupply(Default::default()),
14147 custom_name: CustomName(Default::default()),
14148 custom_name_visible: CustomNameVisible(Default::default()),
14149 silent: Silent(Default::default()),
14150 no_gravity: NoGravity(Default::default()),
14151 pose: Pose::default(),
14152 ticks_frozen: TicksFrozen(Default::default()),
14153 },
14154 auto_spin_attack: AutoSpinAttack(false),
14155 abstract_living_using_item: AbstractLivingUsingItem(false),
14156 health: Health(1.0),
14157 effect_particles: EffectParticles(Default::default()),
14158 effect_ambience: EffectAmbience(false),
14159 arrow_count: ArrowCount(0),
14160 stinger_count: StingerCount(0),
14161 sleeping_pos: SleepingPos(None),
14162 },
14163 no_ai: NoAi(false),
14164 left_handed: LeftHanded(false),
14165 aggressive: Aggressive(false),
14166 },
14167 },
14168 },
14169 zombie_baby: ZombieBaby(false),
14170 special_type: SpecialType(0),
14171 drowned_conversion: DrownedConversion(false),
14172 }
14173 }
14174}
14175
14176#[derive(Component)]
14199pub struct Drowned;
14200impl Drowned {
14201 pub fn apply_metadata(
14202 entity: &mut bevy_ecs::system::EntityCommands,
14203 d: EntityDataItem,
14204 ) -> Result<(), UpdateMetadataError> {
14205 match d.index {
14206 0..=18 => Zombie::apply_metadata(entity, d)?,
14207 _ => {}
14208 }
14209 Ok(())
14210 }
14211}
14212
14213#[derive(Bundle)]
14217pub struct DrownedMetadataBundle {
14218 _marker: Drowned,
14219 parent: ZombieMetadataBundle,
14220}
14221impl Default for DrownedMetadataBundle {
14222 fn default() -> Self {
14223 Self {
14224 _marker: Drowned,
14225 parent: ZombieMetadataBundle {
14226 _marker: Zombie,
14227 parent: AbstractMonsterMetadataBundle {
14228 _marker: AbstractMonster,
14229 parent: AbstractCreatureMetadataBundle {
14230 _marker: AbstractCreature,
14231 parent: AbstractInsentientMetadataBundle {
14232 _marker: AbstractInsentient,
14233 parent: AbstractLivingMetadataBundle {
14234 _marker: AbstractLiving,
14235 parent: AbstractEntityMetadataBundle {
14236 _marker: AbstractEntity,
14237 on_fire: OnFire(false),
14238 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14239 false,
14240 ),
14241 sprinting: Sprinting(false),
14242 swimming: Swimming(false),
14243 currently_glowing: CurrentlyGlowing(false),
14244 invisible: Invisible(false),
14245 fall_flying: FallFlying(false),
14246 air_supply: AirSupply(Default::default()),
14247 custom_name: CustomName(Default::default()),
14248 custom_name_visible: CustomNameVisible(Default::default()),
14249 silent: Silent(Default::default()),
14250 no_gravity: NoGravity(Default::default()),
14251 pose: Pose::default(),
14252 ticks_frozen: TicksFrozen(Default::default()),
14253 },
14254 auto_spin_attack: AutoSpinAttack(false),
14255 abstract_living_using_item: AbstractLivingUsingItem(false),
14256 health: Health(1.0),
14257 effect_particles: EffectParticles(Default::default()),
14258 effect_ambience: EffectAmbience(false),
14259 arrow_count: ArrowCount(0),
14260 stinger_count: StingerCount(0),
14261 sleeping_pos: SleepingPos(None),
14262 },
14263 no_ai: NoAi(false),
14264 left_handed: LeftHanded(false),
14265 aggressive: Aggressive(false),
14266 },
14267 },
14268 },
14269 zombie_baby: ZombieBaby(false),
14270 special_type: SpecialType(0),
14271 drowned_conversion: DrownedConversion(false),
14272 },
14273 }
14274 }
14275}
14276
14277#[derive(Component)]
14300pub struct Husk;
14301impl Husk {
14302 pub fn apply_metadata(
14303 entity: &mut bevy_ecs::system::EntityCommands,
14304 d: EntityDataItem,
14305 ) -> Result<(), UpdateMetadataError> {
14306 match d.index {
14307 0..=18 => Zombie::apply_metadata(entity, d)?,
14308 _ => {}
14309 }
14310 Ok(())
14311 }
14312}
14313
14314#[derive(Bundle)]
14318pub struct HuskMetadataBundle {
14319 _marker: Husk,
14320 parent: ZombieMetadataBundle,
14321}
14322impl Default for HuskMetadataBundle {
14323 fn default() -> Self {
14324 Self {
14325 _marker: Husk,
14326 parent: ZombieMetadataBundle {
14327 _marker: Zombie,
14328 parent: AbstractMonsterMetadataBundle {
14329 _marker: AbstractMonster,
14330 parent: AbstractCreatureMetadataBundle {
14331 _marker: AbstractCreature,
14332 parent: AbstractInsentientMetadataBundle {
14333 _marker: AbstractInsentient,
14334 parent: AbstractLivingMetadataBundle {
14335 _marker: AbstractLiving,
14336 parent: AbstractEntityMetadataBundle {
14337 _marker: AbstractEntity,
14338 on_fire: OnFire(false),
14339 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14340 false,
14341 ),
14342 sprinting: Sprinting(false),
14343 swimming: Swimming(false),
14344 currently_glowing: CurrentlyGlowing(false),
14345 invisible: Invisible(false),
14346 fall_flying: FallFlying(false),
14347 air_supply: AirSupply(Default::default()),
14348 custom_name: CustomName(Default::default()),
14349 custom_name_visible: CustomNameVisible(Default::default()),
14350 silent: Silent(Default::default()),
14351 no_gravity: NoGravity(Default::default()),
14352 pose: Pose::default(),
14353 ticks_frozen: TicksFrozen(Default::default()),
14354 },
14355 auto_spin_attack: AutoSpinAttack(false),
14356 abstract_living_using_item: AbstractLivingUsingItem(false),
14357 health: Health(1.0),
14358 effect_particles: EffectParticles(Default::default()),
14359 effect_ambience: EffectAmbience(false),
14360 arrow_count: ArrowCount(0),
14361 stinger_count: StingerCount(0),
14362 sleeping_pos: SleepingPos(None),
14363 },
14364 no_ai: NoAi(false),
14365 left_handed: LeftHanded(false),
14366 aggressive: Aggressive(false),
14367 },
14368 },
14369 },
14370 zombie_baby: ZombieBaby(false),
14371 special_type: SpecialType(0),
14372 drowned_conversion: DrownedConversion(false),
14373 },
14374 }
14375 }
14376}
14377
14378#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14380pub struct Converting(pub bool);
14381#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14383pub struct ZombieVillagerVillagerData(pub VillagerData);
14384#[derive(Component)]
14411pub struct ZombieVillager;
14412impl ZombieVillager {
14413 pub fn apply_metadata(
14414 entity: &mut bevy_ecs::system::EntityCommands,
14415 d: EntityDataItem,
14416 ) -> Result<(), UpdateMetadataError> {
14417 match d.index {
14418 0..=18 => Zombie::apply_metadata(entity, d)?,
14419 19 => {
14420 entity.insert(Converting(d.value.into_boolean()?));
14421 }
14422 20 => {
14423 entity.insert(ZombieVillagerVillagerData(d.value.into_villager_data()?));
14424 }
14425 _ => {}
14426 }
14427 Ok(())
14428 }
14429}
14430
14431#[derive(Bundle)]
14435pub struct ZombieVillagerMetadataBundle {
14436 _marker: ZombieVillager,
14437 parent: ZombieMetadataBundle,
14438 converting: Converting,
14439 zombie_villager_villager_data: ZombieVillagerVillagerData,
14440}
14441impl Default for ZombieVillagerMetadataBundle {
14442 fn default() -> Self {
14443 Self {
14444 _marker: ZombieVillager,
14445 parent: ZombieMetadataBundle {
14446 _marker: Zombie,
14447 parent: AbstractMonsterMetadataBundle {
14448 _marker: AbstractMonster,
14449 parent: AbstractCreatureMetadataBundle {
14450 _marker: AbstractCreature,
14451 parent: AbstractInsentientMetadataBundle {
14452 _marker: AbstractInsentient,
14453 parent: AbstractLivingMetadataBundle {
14454 _marker: AbstractLiving,
14455 parent: AbstractEntityMetadataBundle {
14456 _marker: AbstractEntity,
14457 on_fire: OnFire(false),
14458 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14459 false,
14460 ),
14461 sprinting: Sprinting(false),
14462 swimming: Swimming(false),
14463 currently_glowing: CurrentlyGlowing(false),
14464 invisible: Invisible(false),
14465 fall_flying: FallFlying(false),
14466 air_supply: AirSupply(Default::default()),
14467 custom_name: CustomName(Default::default()),
14468 custom_name_visible: CustomNameVisible(Default::default()),
14469 silent: Silent(Default::default()),
14470 no_gravity: NoGravity(Default::default()),
14471 pose: Pose::default(),
14472 ticks_frozen: TicksFrozen(Default::default()),
14473 },
14474 auto_spin_attack: AutoSpinAttack(false),
14475 abstract_living_using_item: AbstractLivingUsingItem(false),
14476 health: Health(1.0),
14477 effect_particles: EffectParticles(Default::default()),
14478 effect_ambience: EffectAmbience(false),
14479 arrow_count: ArrowCount(0),
14480 stinger_count: StingerCount(0),
14481 sleeping_pos: SleepingPos(None),
14482 },
14483 no_ai: NoAi(false),
14484 left_handed: LeftHanded(false),
14485 aggressive: Aggressive(false),
14486 },
14487 },
14488 },
14489 zombie_baby: ZombieBaby(false),
14490 special_type: SpecialType(0),
14491 drowned_conversion: DrownedConversion(false),
14492 },
14493 converting: Converting(false),
14494 zombie_villager_villager_data: ZombieVillagerVillagerData(VillagerData {
14495 kind: azalea_registry::builtin::VillagerKind::Plains,
14496 profession: azalea_registry::builtin::VillagerProfession::None,
14497 level: 0,
14498 }),
14499 }
14500 }
14501}
14502
14503#[derive(Component)]
14526pub struct ZombifiedPiglin;
14527impl ZombifiedPiglin {
14528 pub fn apply_metadata(
14529 entity: &mut bevy_ecs::system::EntityCommands,
14530 d: EntityDataItem,
14531 ) -> Result<(), UpdateMetadataError> {
14532 match d.index {
14533 0..=18 => Zombie::apply_metadata(entity, d)?,
14534 _ => {}
14535 }
14536 Ok(())
14537 }
14538}
14539
14540#[derive(Bundle)]
14544pub struct ZombifiedPiglinMetadataBundle {
14545 _marker: ZombifiedPiglin,
14546 parent: ZombieMetadataBundle,
14547}
14548impl Default for ZombifiedPiglinMetadataBundle {
14549 fn default() -> Self {
14550 Self {
14551 _marker: ZombifiedPiglin,
14552 parent: ZombieMetadataBundle {
14553 _marker: Zombie,
14554 parent: AbstractMonsterMetadataBundle {
14555 _marker: AbstractMonster,
14556 parent: AbstractCreatureMetadataBundle {
14557 _marker: AbstractCreature,
14558 parent: AbstractInsentientMetadataBundle {
14559 _marker: AbstractInsentient,
14560 parent: AbstractLivingMetadataBundle {
14561 _marker: AbstractLiving,
14562 parent: AbstractEntityMetadataBundle {
14563 _marker: AbstractEntity,
14564 on_fire: OnFire(false),
14565 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14566 false,
14567 ),
14568 sprinting: Sprinting(false),
14569 swimming: Swimming(false),
14570 currently_glowing: CurrentlyGlowing(false),
14571 invisible: Invisible(false),
14572 fall_flying: FallFlying(false),
14573 air_supply: AirSupply(Default::default()),
14574 custom_name: CustomName(Default::default()),
14575 custom_name_visible: CustomNameVisible(Default::default()),
14576 silent: Silent(Default::default()),
14577 no_gravity: NoGravity(Default::default()),
14578 pose: Pose::default(),
14579 ticks_frozen: TicksFrozen(Default::default()),
14580 },
14581 auto_spin_attack: AutoSpinAttack(false),
14582 abstract_living_using_item: AbstractLivingUsingItem(false),
14583 health: Health(1.0),
14584 effect_particles: EffectParticles(Default::default()),
14585 effect_ambience: EffectAmbience(false),
14586 arrow_count: ArrowCount(0),
14587 stinger_count: StingerCount(0),
14588 sleeping_pos: SleepingPos(None),
14589 },
14590 no_ai: NoAi(false),
14591 left_handed: LeftHanded(false),
14592 aggressive: Aggressive(false),
14593 },
14594 },
14595 },
14596 zombie_baby: ZombieBaby(false),
14597 special_type: SpecialType(0),
14598 drowned_conversion: DrownedConversion(false),
14599 },
14600 }
14601 }
14602}
14603
14604#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14606pub struct AbstractPiglinImmuneToZombification(pub bool);
14607#[derive(Component)]
14633pub struct AbstractPiglin;
14634impl AbstractPiglin {
14635 pub fn apply_metadata(
14636 entity: &mut bevy_ecs::system::EntityCommands,
14637 d: EntityDataItem,
14638 ) -> Result<(), UpdateMetadataError> {
14639 match d.index {
14640 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
14641 16 => {
14642 entity.insert(AbstractPiglinImmuneToZombification(d.value.into_boolean()?));
14643 }
14644 _ => {}
14645 }
14646 Ok(())
14647 }
14648}
14649
14650#[derive(Bundle)]
14654pub struct AbstractPiglinMetadataBundle {
14655 _marker: AbstractPiglin,
14656 parent: AbstractMonsterMetadataBundle,
14657 abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification,
14658}
14659impl Default for AbstractPiglinMetadataBundle {
14660 fn default() -> Self {
14661 Self {
14662 _marker: AbstractPiglin,
14663 parent: AbstractMonsterMetadataBundle {
14664 _marker: AbstractMonster,
14665 parent: AbstractCreatureMetadataBundle {
14666 _marker: AbstractCreature,
14667 parent: AbstractInsentientMetadataBundle {
14668 _marker: AbstractInsentient,
14669 parent: AbstractLivingMetadataBundle {
14670 _marker: AbstractLiving,
14671 parent: AbstractEntityMetadataBundle {
14672 _marker: AbstractEntity,
14673 on_fire: OnFire(false),
14674 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
14675 sprinting: Sprinting(false),
14676 swimming: Swimming(false),
14677 currently_glowing: CurrentlyGlowing(false),
14678 invisible: Invisible(false),
14679 fall_flying: FallFlying(false),
14680 air_supply: AirSupply(Default::default()),
14681 custom_name: CustomName(Default::default()),
14682 custom_name_visible: CustomNameVisible(Default::default()),
14683 silent: Silent(Default::default()),
14684 no_gravity: NoGravity(Default::default()),
14685 pose: Pose::default(),
14686 ticks_frozen: TicksFrozen(Default::default()),
14687 },
14688 auto_spin_attack: AutoSpinAttack(false),
14689 abstract_living_using_item: AbstractLivingUsingItem(false),
14690 health: Health(1.0),
14691 effect_particles: EffectParticles(Default::default()),
14692 effect_ambience: EffectAmbience(false),
14693 arrow_count: ArrowCount(0),
14694 stinger_count: StingerCount(0),
14695 sleeping_pos: SleepingPos(None),
14696 },
14697 no_ai: NoAi(false),
14698 left_handed: LeftHanded(false),
14699 aggressive: Aggressive(false),
14700 },
14701 },
14702 },
14703 abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
14704 }
14705 }
14706}
14707
14708#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14710pub struct PiglinBaby(pub bool);
14711#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14713pub struct PiglinIsChargingCrossbow(pub bool);
14714#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14716pub struct IsDancing(pub bool);
14717#[derive(Component)]
14744pub struct Piglin;
14745impl Piglin {
14746 pub fn apply_metadata(
14747 entity: &mut bevy_ecs::system::EntityCommands,
14748 d: EntityDataItem,
14749 ) -> Result<(), UpdateMetadataError> {
14750 match d.index {
14751 0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
14752 17 => {
14753 entity.insert(PiglinBaby(d.value.into_boolean()?));
14754 }
14755 18 => {
14756 entity.insert(PiglinIsChargingCrossbow(d.value.into_boolean()?));
14757 }
14758 19 => {
14759 entity.insert(IsDancing(d.value.into_boolean()?));
14760 }
14761 _ => {}
14762 }
14763 Ok(())
14764 }
14765}
14766
14767#[derive(Bundle)]
14771pub struct PiglinMetadataBundle {
14772 _marker: Piglin,
14773 parent: AbstractPiglinMetadataBundle,
14774 piglin_baby: PiglinBaby,
14775 piglin_is_charging_crossbow: PiglinIsChargingCrossbow,
14776 is_dancing: IsDancing,
14777}
14778impl Default for PiglinMetadataBundle {
14779 fn default() -> Self {
14780 Self {
14781 _marker: Piglin,
14782 parent: AbstractPiglinMetadataBundle {
14783 _marker: AbstractPiglin,
14784 parent: AbstractMonsterMetadataBundle {
14785 _marker: AbstractMonster,
14786 parent: AbstractCreatureMetadataBundle {
14787 _marker: AbstractCreature,
14788 parent: AbstractInsentientMetadataBundle {
14789 _marker: AbstractInsentient,
14790 parent: AbstractLivingMetadataBundle {
14791 _marker: AbstractLiving,
14792 parent: AbstractEntityMetadataBundle {
14793 _marker: AbstractEntity,
14794 on_fire: OnFire(false),
14795 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14796 false,
14797 ),
14798 sprinting: Sprinting(false),
14799 swimming: Swimming(false),
14800 currently_glowing: CurrentlyGlowing(false),
14801 invisible: Invisible(false),
14802 fall_flying: FallFlying(false),
14803 air_supply: AirSupply(Default::default()),
14804 custom_name: CustomName(Default::default()),
14805 custom_name_visible: CustomNameVisible(Default::default()),
14806 silent: Silent(Default::default()),
14807 no_gravity: NoGravity(Default::default()),
14808 pose: Pose::default(),
14809 ticks_frozen: TicksFrozen(Default::default()),
14810 },
14811 auto_spin_attack: AutoSpinAttack(false),
14812 abstract_living_using_item: AbstractLivingUsingItem(false),
14813 health: Health(1.0),
14814 effect_particles: EffectParticles(Default::default()),
14815 effect_ambience: EffectAmbience(false),
14816 arrow_count: ArrowCount(0),
14817 stinger_count: StingerCount(0),
14818 sleeping_pos: SleepingPos(None),
14819 },
14820 no_ai: NoAi(false),
14821 left_handed: LeftHanded(false),
14822 aggressive: Aggressive(false),
14823 },
14824 },
14825 },
14826 abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
14827 },
14828 piglin_baby: PiglinBaby(false),
14829 piglin_is_charging_crossbow: PiglinIsChargingCrossbow(false),
14830 is_dancing: IsDancing(false),
14831 }
14832 }
14833}
14834
14835#[derive(Component)]
14858pub struct PiglinBrute;
14859impl PiglinBrute {
14860 pub fn apply_metadata(
14861 entity: &mut bevy_ecs::system::EntityCommands,
14862 d: EntityDataItem,
14863 ) -> Result<(), UpdateMetadataError> {
14864 match d.index {
14865 0..=16 => AbstractPiglin::apply_metadata(entity, d)?,
14866 _ => {}
14867 }
14868 Ok(())
14869 }
14870}
14871
14872#[derive(Bundle)]
14876pub struct PiglinBruteMetadataBundle {
14877 _marker: PiglinBrute,
14878 parent: AbstractPiglinMetadataBundle,
14879}
14880impl Default for PiglinBruteMetadataBundle {
14881 fn default() -> Self {
14882 Self {
14883 _marker: PiglinBrute,
14884 parent: AbstractPiglinMetadataBundle {
14885 _marker: AbstractPiglin,
14886 parent: AbstractMonsterMetadataBundle {
14887 _marker: AbstractMonster,
14888 parent: AbstractCreatureMetadataBundle {
14889 _marker: AbstractCreature,
14890 parent: AbstractInsentientMetadataBundle {
14891 _marker: AbstractInsentient,
14892 parent: AbstractLivingMetadataBundle {
14893 _marker: AbstractLiving,
14894 parent: AbstractEntityMetadataBundle {
14895 _marker: AbstractEntity,
14896 on_fire: OnFire(false),
14897 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
14898 false,
14899 ),
14900 sprinting: Sprinting(false),
14901 swimming: Swimming(false),
14902 currently_glowing: CurrentlyGlowing(false),
14903 invisible: Invisible(false),
14904 fall_flying: FallFlying(false),
14905 air_supply: AirSupply(Default::default()),
14906 custom_name: CustomName(Default::default()),
14907 custom_name_visible: CustomNameVisible(Default::default()),
14908 silent: Silent(Default::default()),
14909 no_gravity: NoGravity(Default::default()),
14910 pose: Pose::default(),
14911 ticks_frozen: TicksFrozen(Default::default()),
14912 },
14913 auto_spin_attack: AutoSpinAttack(false),
14914 abstract_living_using_item: AbstractLivingUsingItem(false),
14915 health: Health(1.0),
14916 effect_particles: EffectParticles(Default::default()),
14917 effect_ambience: EffectAmbience(false),
14918 arrow_count: ArrowCount(0),
14919 stinger_count: StingerCount(0),
14920 sleeping_pos: SleepingPos(None),
14921 },
14922 no_ai: NoAi(false),
14923 left_handed: LeftHanded(false),
14924 aggressive: Aggressive(false),
14925 },
14926 },
14927 },
14928 abstract_piglin_immune_to_zombification: AbstractPiglinImmuneToZombification(false),
14929 },
14930 }
14931 }
14932}
14933
14934#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
14936pub struct IsCelebrating(pub bool);
14937#[derive(Component)]
14968pub struct AbstractRaider;
14969impl AbstractRaider {
14970 pub fn apply_metadata(
14971 entity: &mut bevy_ecs::system::EntityCommands,
14972 d: EntityDataItem,
14973 ) -> Result<(), UpdateMetadataError> {
14974 match d.index {
14975 0..=15 => AbstractMonster::apply_metadata(entity, d)?,
14976 16 => {
14977 entity.insert(IsCelebrating(d.value.into_boolean()?));
14978 }
14979 _ => {}
14980 }
14981 Ok(())
14982 }
14983}
14984
14985#[derive(Bundle)]
14989pub struct AbstractRaiderMetadataBundle {
14990 _marker: AbstractRaider,
14991 parent: AbstractMonsterMetadataBundle,
14992 is_celebrating: IsCelebrating,
14993}
14994impl Default for AbstractRaiderMetadataBundle {
14995 fn default() -> Self {
14996 Self {
14997 _marker: AbstractRaider,
14998 parent: AbstractMonsterMetadataBundle {
14999 _marker: AbstractMonster,
15000 parent: AbstractCreatureMetadataBundle {
15001 _marker: AbstractCreature,
15002 parent: AbstractInsentientMetadataBundle {
15003 _marker: AbstractInsentient,
15004 parent: AbstractLivingMetadataBundle {
15005 _marker: AbstractLiving,
15006 parent: AbstractEntityMetadataBundle {
15007 _marker: AbstractEntity,
15008 on_fire: OnFire(false),
15009 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
15010 sprinting: Sprinting(false),
15011 swimming: Swimming(false),
15012 currently_glowing: CurrentlyGlowing(false),
15013 invisible: Invisible(false),
15014 fall_flying: FallFlying(false),
15015 air_supply: AirSupply(Default::default()),
15016 custom_name: CustomName(Default::default()),
15017 custom_name_visible: CustomNameVisible(Default::default()),
15018 silent: Silent(Default::default()),
15019 no_gravity: NoGravity(Default::default()),
15020 pose: Pose::default(),
15021 ticks_frozen: TicksFrozen(Default::default()),
15022 },
15023 auto_spin_attack: AutoSpinAttack(false),
15024 abstract_living_using_item: AbstractLivingUsingItem(false),
15025 health: Health(1.0),
15026 effect_particles: EffectParticles(Default::default()),
15027 effect_ambience: EffectAmbience(false),
15028 arrow_count: ArrowCount(0),
15029 stinger_count: StingerCount(0),
15030 sleeping_pos: SleepingPos(None),
15031 },
15032 no_ai: NoAi(false),
15033 left_handed: LeftHanded(false),
15034 aggressive: Aggressive(false),
15035 },
15036 },
15037 },
15038 is_celebrating: IsCelebrating(false),
15039 }
15040 }
15041}
15042
15043#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
15045pub struct PillagerIsChargingCrossbow(pub bool);
15046#[derive(Component)]
15072pub struct Pillager;
15073impl Pillager {
15074 pub fn apply_metadata(
15075 entity: &mut bevy_ecs::system::EntityCommands,
15076 d: EntityDataItem,
15077 ) -> Result<(), UpdateMetadataError> {
15078 match d.index {
15079 0..=16 => AbstractRaider::apply_metadata(entity, d)?,
15080 17 => {
15081 entity.insert(PillagerIsChargingCrossbow(d.value.into_boolean()?));
15082 }
15083 _ => {}
15084 }
15085 Ok(())
15086 }
15087}
15088
15089#[derive(Bundle)]
15093pub struct PillagerMetadataBundle {
15094 _marker: Pillager,
15095 parent: AbstractRaiderMetadataBundle,
15096 pillager_is_charging_crossbow: PillagerIsChargingCrossbow,
15097}
15098impl Default for PillagerMetadataBundle {
15099 fn default() -> Self {
15100 Self {
15101 _marker: Pillager,
15102 parent: AbstractRaiderMetadataBundle {
15103 _marker: AbstractRaider,
15104 parent: AbstractMonsterMetadataBundle {
15105 _marker: AbstractMonster,
15106 parent: AbstractCreatureMetadataBundle {
15107 _marker: AbstractCreature,
15108 parent: AbstractInsentientMetadataBundle {
15109 _marker: AbstractInsentient,
15110 parent: AbstractLivingMetadataBundle {
15111 _marker: AbstractLiving,
15112 parent: AbstractEntityMetadataBundle {
15113 _marker: AbstractEntity,
15114 on_fire: OnFire(false),
15115 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15116 false,
15117 ),
15118 sprinting: Sprinting(false),
15119 swimming: Swimming(false),
15120 currently_glowing: CurrentlyGlowing(false),
15121 invisible: Invisible(false),
15122 fall_flying: FallFlying(false),
15123 air_supply: AirSupply(Default::default()),
15124 custom_name: CustomName(Default::default()),
15125 custom_name_visible: CustomNameVisible(Default::default()),
15126 silent: Silent(Default::default()),
15127 no_gravity: NoGravity(Default::default()),
15128 pose: Pose::default(),
15129 ticks_frozen: TicksFrozen(Default::default()),
15130 },
15131 auto_spin_attack: AutoSpinAttack(false),
15132 abstract_living_using_item: AbstractLivingUsingItem(false),
15133 health: Health(1.0),
15134 effect_particles: EffectParticles(Default::default()),
15135 effect_ambience: EffectAmbience(false),
15136 arrow_count: ArrowCount(0),
15137 stinger_count: StingerCount(0),
15138 sleeping_pos: SleepingPos(None),
15139 },
15140 no_ai: NoAi(false),
15141 left_handed: LeftHanded(false),
15142 aggressive: Aggressive(false),
15143 },
15144 },
15145 },
15146 is_celebrating: IsCelebrating(false),
15147 },
15148 pillager_is_charging_crossbow: PillagerIsChargingCrossbow(false),
15149 }
15150 }
15151}
15152
15153#[derive(Component)]
15176pub struct Ravager;
15177impl Ravager {
15178 pub fn apply_metadata(
15179 entity: &mut bevy_ecs::system::EntityCommands,
15180 d: EntityDataItem,
15181 ) -> Result<(), UpdateMetadataError> {
15182 match d.index {
15183 0..=16 => AbstractRaider::apply_metadata(entity, d)?,
15184 _ => {}
15185 }
15186 Ok(())
15187 }
15188}
15189
15190#[derive(Bundle)]
15194pub struct RavagerMetadataBundle {
15195 _marker: Ravager,
15196 parent: AbstractRaiderMetadataBundle,
15197}
15198impl Default for RavagerMetadataBundle {
15199 fn default() -> Self {
15200 Self {
15201 _marker: Ravager,
15202 parent: AbstractRaiderMetadataBundle {
15203 _marker: AbstractRaider,
15204 parent: AbstractMonsterMetadataBundle {
15205 _marker: AbstractMonster,
15206 parent: AbstractCreatureMetadataBundle {
15207 _marker: AbstractCreature,
15208 parent: AbstractInsentientMetadataBundle {
15209 _marker: AbstractInsentient,
15210 parent: AbstractLivingMetadataBundle {
15211 _marker: AbstractLiving,
15212 parent: AbstractEntityMetadataBundle {
15213 _marker: AbstractEntity,
15214 on_fire: OnFire(false),
15215 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15216 false,
15217 ),
15218 sprinting: Sprinting(false),
15219 swimming: Swimming(false),
15220 currently_glowing: CurrentlyGlowing(false),
15221 invisible: Invisible(false),
15222 fall_flying: FallFlying(false),
15223 air_supply: AirSupply(Default::default()),
15224 custom_name: CustomName(Default::default()),
15225 custom_name_visible: CustomNameVisible(Default::default()),
15226 silent: Silent(Default::default()),
15227 no_gravity: NoGravity(Default::default()),
15228 pose: Pose::default(),
15229 ticks_frozen: TicksFrozen(Default::default()),
15230 },
15231 auto_spin_attack: AutoSpinAttack(false),
15232 abstract_living_using_item: AbstractLivingUsingItem(false),
15233 health: Health(1.0),
15234 effect_particles: EffectParticles(Default::default()),
15235 effect_ambience: EffectAmbience(false),
15236 arrow_count: ArrowCount(0),
15237 stinger_count: StingerCount(0),
15238 sleeping_pos: SleepingPos(None),
15239 },
15240 no_ai: NoAi(false),
15241 left_handed: LeftHanded(false),
15242 aggressive: Aggressive(false),
15243 },
15244 },
15245 },
15246 is_celebrating: IsCelebrating(false),
15247 },
15248 }
15249 }
15250}
15251
15252#[derive(Component)]
15275pub struct Vindicator;
15276impl Vindicator {
15277 pub fn apply_metadata(
15278 entity: &mut bevy_ecs::system::EntityCommands,
15279 d: EntityDataItem,
15280 ) -> Result<(), UpdateMetadataError> {
15281 match d.index {
15282 0..=16 => AbstractRaider::apply_metadata(entity, d)?,
15283 _ => {}
15284 }
15285 Ok(())
15286 }
15287}
15288
15289#[derive(Bundle)]
15293pub struct VindicatorMetadataBundle {
15294 _marker: Vindicator,
15295 parent: AbstractRaiderMetadataBundle,
15296}
15297impl Default for VindicatorMetadataBundle {
15298 fn default() -> Self {
15299 Self {
15300 _marker: Vindicator,
15301 parent: AbstractRaiderMetadataBundle {
15302 _marker: AbstractRaider,
15303 parent: AbstractMonsterMetadataBundle {
15304 _marker: AbstractMonster,
15305 parent: AbstractCreatureMetadataBundle {
15306 _marker: AbstractCreature,
15307 parent: AbstractInsentientMetadataBundle {
15308 _marker: AbstractInsentient,
15309 parent: AbstractLivingMetadataBundle {
15310 _marker: AbstractLiving,
15311 parent: AbstractEntityMetadataBundle {
15312 _marker: AbstractEntity,
15313 on_fire: OnFire(false),
15314 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15315 false,
15316 ),
15317 sprinting: Sprinting(false),
15318 swimming: Swimming(false),
15319 currently_glowing: CurrentlyGlowing(false),
15320 invisible: Invisible(false),
15321 fall_flying: FallFlying(false),
15322 air_supply: AirSupply(Default::default()),
15323 custom_name: CustomName(Default::default()),
15324 custom_name_visible: CustomNameVisible(Default::default()),
15325 silent: Silent(Default::default()),
15326 no_gravity: NoGravity(Default::default()),
15327 pose: Pose::default(),
15328 ticks_frozen: TicksFrozen(Default::default()),
15329 },
15330 auto_spin_attack: AutoSpinAttack(false),
15331 abstract_living_using_item: AbstractLivingUsingItem(false),
15332 health: Health(1.0),
15333 effect_particles: EffectParticles(Default::default()),
15334 effect_ambience: EffectAmbience(false),
15335 arrow_count: ArrowCount(0),
15336 stinger_count: StingerCount(0),
15337 sleeping_pos: SleepingPos(None),
15338 },
15339 no_ai: NoAi(false),
15340 left_handed: LeftHanded(false),
15341 aggressive: Aggressive(false),
15342 },
15343 },
15344 },
15345 is_celebrating: IsCelebrating(false),
15346 },
15347 }
15348 }
15349}
15350
15351#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
15353pub struct WitchUsingItem(pub bool);
15354#[derive(Component)]
15379pub struct Witch;
15380impl Witch {
15381 pub fn apply_metadata(
15382 entity: &mut bevy_ecs::system::EntityCommands,
15383 d: EntityDataItem,
15384 ) -> Result<(), UpdateMetadataError> {
15385 match d.index {
15386 0..=16 => AbstractRaider::apply_metadata(entity, d)?,
15387 17 => {
15388 entity.insert(WitchUsingItem(d.value.into_boolean()?));
15389 }
15390 _ => {}
15391 }
15392 Ok(())
15393 }
15394}
15395
15396#[derive(Bundle)]
15400pub struct WitchMetadataBundle {
15401 _marker: Witch,
15402 parent: AbstractRaiderMetadataBundle,
15403 witch_using_item: WitchUsingItem,
15404}
15405impl Default for WitchMetadataBundle {
15406 fn default() -> Self {
15407 Self {
15408 _marker: Witch,
15409 parent: AbstractRaiderMetadataBundle {
15410 _marker: AbstractRaider,
15411 parent: AbstractMonsterMetadataBundle {
15412 _marker: AbstractMonster,
15413 parent: AbstractCreatureMetadataBundle {
15414 _marker: AbstractCreature,
15415 parent: AbstractInsentientMetadataBundle {
15416 _marker: AbstractInsentient,
15417 parent: AbstractLivingMetadataBundle {
15418 _marker: AbstractLiving,
15419 parent: AbstractEntityMetadataBundle {
15420 _marker: AbstractEntity,
15421 on_fire: OnFire(false),
15422 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15423 false,
15424 ),
15425 sprinting: Sprinting(false),
15426 swimming: Swimming(false),
15427 currently_glowing: CurrentlyGlowing(false),
15428 invisible: Invisible(false),
15429 fall_flying: FallFlying(false),
15430 air_supply: AirSupply(Default::default()),
15431 custom_name: CustomName(Default::default()),
15432 custom_name_visible: CustomNameVisible(Default::default()),
15433 silent: Silent(Default::default()),
15434 no_gravity: NoGravity(Default::default()),
15435 pose: Pose::default(),
15436 ticks_frozen: TicksFrozen(Default::default()),
15437 },
15438 auto_spin_attack: AutoSpinAttack(false),
15439 abstract_living_using_item: AbstractLivingUsingItem(false),
15440 health: Health(1.0),
15441 effect_particles: EffectParticles(Default::default()),
15442 effect_ambience: EffectAmbience(false),
15443 arrow_count: ArrowCount(0),
15444 stinger_count: StingerCount(0),
15445 sleeping_pos: SleepingPos(None),
15446 },
15447 no_ai: NoAi(false),
15448 left_handed: LeftHanded(false),
15449 aggressive: Aggressive(false),
15450 },
15451 },
15452 },
15453 is_celebrating: IsCelebrating(false),
15454 },
15455 witch_using_item: WitchUsingItem(false),
15456 }
15457 }
15458}
15459
15460#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
15462pub struct SpellCasting(pub u8);
15463#[derive(Component)]
15490pub struct AbstractSpellcasterIllager;
15491impl AbstractSpellcasterIllager {
15492 pub fn apply_metadata(
15493 entity: &mut bevy_ecs::system::EntityCommands,
15494 d: EntityDataItem,
15495 ) -> Result<(), UpdateMetadataError> {
15496 match d.index {
15497 0..=16 => AbstractRaider::apply_metadata(entity, d)?,
15498 17 => {
15499 entity.insert(SpellCasting(d.value.into_byte()?));
15500 }
15501 _ => {}
15502 }
15503 Ok(())
15504 }
15505}
15506
15507#[derive(Bundle)]
15511pub struct AbstractSpellcasterIllagerMetadataBundle {
15512 _marker: AbstractSpellcasterIllager,
15513 parent: AbstractRaiderMetadataBundle,
15514 spell_casting: SpellCasting,
15515}
15516impl Default for AbstractSpellcasterIllagerMetadataBundle {
15517 fn default() -> Self {
15518 Self {
15519 _marker: AbstractSpellcasterIllager,
15520 parent: AbstractRaiderMetadataBundle {
15521 _marker: AbstractRaider,
15522 parent: AbstractMonsterMetadataBundle {
15523 _marker: AbstractMonster,
15524 parent: AbstractCreatureMetadataBundle {
15525 _marker: AbstractCreature,
15526 parent: AbstractInsentientMetadataBundle {
15527 _marker: AbstractInsentient,
15528 parent: AbstractLivingMetadataBundle {
15529 _marker: AbstractLiving,
15530 parent: AbstractEntityMetadataBundle {
15531 _marker: AbstractEntity,
15532 on_fire: OnFire(false),
15533 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15534 false,
15535 ),
15536 sprinting: Sprinting(false),
15537 swimming: Swimming(false),
15538 currently_glowing: CurrentlyGlowing(false),
15539 invisible: Invisible(false),
15540 fall_flying: FallFlying(false),
15541 air_supply: AirSupply(Default::default()),
15542 custom_name: CustomName(Default::default()),
15543 custom_name_visible: CustomNameVisible(Default::default()),
15544 silent: Silent(Default::default()),
15545 no_gravity: NoGravity(Default::default()),
15546 pose: Pose::default(),
15547 ticks_frozen: TicksFrozen(Default::default()),
15548 },
15549 auto_spin_attack: AutoSpinAttack(false),
15550 abstract_living_using_item: AbstractLivingUsingItem(false),
15551 health: Health(1.0),
15552 effect_particles: EffectParticles(Default::default()),
15553 effect_ambience: EffectAmbience(false),
15554 arrow_count: ArrowCount(0),
15555 stinger_count: StingerCount(0),
15556 sleeping_pos: SleepingPos(None),
15557 },
15558 no_ai: NoAi(false),
15559 left_handed: LeftHanded(false),
15560 aggressive: Aggressive(false),
15561 },
15562 },
15563 },
15564 is_celebrating: IsCelebrating(false),
15565 },
15566 spell_casting: SpellCasting(0),
15567 }
15568 }
15569}
15570
15571#[derive(Component)]
15595pub struct Evoker;
15596impl Evoker {
15597 pub fn apply_metadata(
15598 entity: &mut bevy_ecs::system::EntityCommands,
15599 d: EntityDataItem,
15600 ) -> Result<(), UpdateMetadataError> {
15601 match d.index {
15602 0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
15603 _ => {}
15604 }
15605 Ok(())
15606 }
15607}
15608
15609#[derive(Bundle)]
15613pub struct EvokerMetadataBundle {
15614 _marker: Evoker,
15615 parent: AbstractSpellcasterIllagerMetadataBundle,
15616}
15617impl Default for EvokerMetadataBundle {
15618 fn default() -> Self {
15619 Self {
15620 _marker: Evoker,
15621 parent: AbstractSpellcasterIllagerMetadataBundle {
15622 _marker: AbstractSpellcasterIllager,
15623 parent: AbstractRaiderMetadataBundle {
15624 _marker: AbstractRaider,
15625 parent: AbstractMonsterMetadataBundle {
15626 _marker: AbstractMonster,
15627 parent: AbstractCreatureMetadataBundle {
15628 _marker: AbstractCreature,
15629 parent: AbstractInsentientMetadataBundle {
15630 _marker: AbstractInsentient,
15631 parent: AbstractLivingMetadataBundle {
15632 _marker: AbstractLiving,
15633 parent: AbstractEntityMetadataBundle {
15634 _marker: AbstractEntity,
15635 on_fire: OnFire(false),
15636 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15637 false,
15638 ),
15639 sprinting: Sprinting(false),
15640 swimming: Swimming(false),
15641 currently_glowing: CurrentlyGlowing(false),
15642 invisible: Invisible(false),
15643 fall_flying: FallFlying(false),
15644 air_supply: AirSupply(Default::default()),
15645 custom_name: CustomName(Default::default()),
15646 custom_name_visible: CustomNameVisible(Default::default()),
15647 silent: Silent(Default::default()),
15648 no_gravity: NoGravity(Default::default()),
15649 pose: Pose::default(),
15650 ticks_frozen: TicksFrozen(Default::default()),
15651 },
15652 auto_spin_attack: AutoSpinAttack(false),
15653 abstract_living_using_item: AbstractLivingUsingItem(false),
15654 health: Health(1.0),
15655 effect_particles: EffectParticles(Default::default()),
15656 effect_ambience: EffectAmbience(false),
15657 arrow_count: ArrowCount(0),
15658 stinger_count: StingerCount(0),
15659 sleeping_pos: SleepingPos(None),
15660 },
15661 no_ai: NoAi(false),
15662 left_handed: LeftHanded(false),
15663 aggressive: Aggressive(false),
15664 },
15665 },
15666 },
15667 is_celebrating: IsCelebrating(false),
15668 },
15669 spell_casting: SpellCasting(0),
15670 },
15671 }
15672 }
15673}
15674
15675#[derive(Component)]
15699pub struct Illusioner;
15700impl Illusioner {
15701 pub fn apply_metadata(
15702 entity: &mut bevy_ecs::system::EntityCommands,
15703 d: EntityDataItem,
15704 ) -> Result<(), UpdateMetadataError> {
15705 match d.index {
15706 0..=17 => AbstractSpellcasterIllager::apply_metadata(entity, d)?,
15707 _ => {}
15708 }
15709 Ok(())
15710 }
15711}
15712
15713#[derive(Bundle)]
15717pub struct IllusionerMetadataBundle {
15718 _marker: Illusioner,
15719 parent: AbstractSpellcasterIllagerMetadataBundle,
15720}
15721impl Default for IllusionerMetadataBundle {
15722 fn default() -> Self {
15723 Self {
15724 _marker: Illusioner,
15725 parent: AbstractSpellcasterIllagerMetadataBundle {
15726 _marker: AbstractSpellcasterIllager,
15727 parent: AbstractRaiderMetadataBundle {
15728 _marker: AbstractRaider,
15729 parent: AbstractMonsterMetadataBundle {
15730 _marker: AbstractMonster,
15731 parent: AbstractCreatureMetadataBundle {
15732 _marker: AbstractCreature,
15733 parent: AbstractInsentientMetadataBundle {
15734 _marker: AbstractInsentient,
15735 parent: AbstractLivingMetadataBundle {
15736 _marker: AbstractLiving,
15737 parent: AbstractEntityMetadataBundle {
15738 _marker: AbstractEntity,
15739 on_fire: OnFire(false),
15740 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(
15741 false,
15742 ),
15743 sprinting: Sprinting(false),
15744 swimming: Swimming(false),
15745 currently_glowing: CurrentlyGlowing(false),
15746 invisible: Invisible(false),
15747 fall_flying: FallFlying(false),
15748 air_supply: AirSupply(Default::default()),
15749 custom_name: CustomName(Default::default()),
15750 custom_name_visible: CustomNameVisible(Default::default()),
15751 silent: Silent(Default::default()),
15752 no_gravity: NoGravity(Default::default()),
15753 pose: Pose::default(),
15754 ticks_frozen: TicksFrozen(Default::default()),
15755 },
15756 auto_spin_attack: AutoSpinAttack(false),
15757 abstract_living_using_item: AbstractLivingUsingItem(false),
15758 health: Health(1.0),
15759 effect_particles: EffectParticles(Default::default()),
15760 effect_ambience: EffectAmbience(false),
15761 arrow_count: ArrowCount(0),
15762 stinger_count: StingerCount(0),
15763 sleeping_pos: SleepingPos(None),
15764 },
15765 no_ai: NoAi(false),
15766 left_handed: LeftHanded(false),
15767 aggressive: Aggressive(false),
15768 },
15769 },
15770 },
15771 is_celebrating: IsCelebrating(false),
15772 },
15773 spell_casting: SpellCasting(0),
15774 },
15775 }
15776 }
15777}
15778
15779#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
15781pub struct AbstractThrownItemProjectileItemStack(pub ItemStack);
15782#[derive(Component)]
15808pub struct AbstractThrownItemProjectile;
15809impl AbstractThrownItemProjectile {
15810 pub fn apply_metadata(
15811 entity: &mut bevy_ecs::system::EntityCommands,
15812 d: EntityDataItem,
15813 ) -> Result<(), UpdateMetadataError> {
15814 match d.index {
15815 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
15816 8 => {
15817 entity.insert(AbstractThrownItemProjectileItemStack(
15818 d.value.into_item_stack()?,
15819 ));
15820 }
15821 _ => {}
15822 }
15823 Ok(())
15824 }
15825}
15826
15827#[derive(Bundle)]
15831pub struct AbstractThrownItemProjectileMetadataBundle {
15832 _marker: AbstractThrownItemProjectile,
15833 parent: AbstractEntityMetadataBundle,
15834 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack,
15835}
15836impl Default for AbstractThrownItemProjectileMetadataBundle {
15837 fn default() -> Self {
15838 Self {
15839 _marker: AbstractThrownItemProjectile,
15840 parent: AbstractEntityMetadataBundle {
15841 _marker: AbstractEntity,
15842 on_fire: OnFire(false),
15843 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
15844 sprinting: Sprinting(false),
15845 swimming: Swimming(false),
15846 currently_glowing: CurrentlyGlowing(false),
15847 invisible: Invisible(false),
15848 fall_flying: FallFlying(false),
15849 air_supply: AirSupply(Default::default()),
15850 custom_name: CustomName(Default::default()),
15851 custom_name_visible: CustomNameVisible(Default::default()),
15852 silent: Silent(Default::default()),
15853 no_gravity: NoGravity(Default::default()),
15854 pose: Pose::default(),
15855 ticks_frozen: TicksFrozen(Default::default()),
15856 },
15857 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
15858 Default::default(),
15859 ),
15860 }
15861 }
15862}
15863
15864#[derive(Component)]
15883pub struct Egg;
15884impl Egg {
15885 pub fn apply_metadata(
15886 entity: &mut bevy_ecs::system::EntityCommands,
15887 d: EntityDataItem,
15888 ) -> Result<(), UpdateMetadataError> {
15889 match d.index {
15890 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
15891 _ => {}
15892 }
15893 Ok(())
15894 }
15895}
15896
15897#[derive(Bundle)]
15901pub struct EggMetadataBundle {
15902 _marker: Egg,
15903 parent: AbstractThrownItemProjectileMetadataBundle,
15904}
15905impl Default for EggMetadataBundle {
15906 fn default() -> Self {
15907 Self {
15908 _marker: Egg,
15909 parent: AbstractThrownItemProjectileMetadataBundle {
15910 _marker: AbstractThrownItemProjectile,
15911 parent: AbstractEntityMetadataBundle {
15912 _marker: AbstractEntity,
15913 on_fire: OnFire(false),
15914 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
15915 sprinting: Sprinting(false),
15916 swimming: Swimming(false),
15917 currently_glowing: CurrentlyGlowing(false),
15918 invisible: Invisible(false),
15919 fall_flying: FallFlying(false),
15920 air_supply: AirSupply(Default::default()),
15921 custom_name: CustomName(Default::default()),
15922 custom_name_visible: CustomNameVisible(Default::default()),
15923 silent: Silent(Default::default()),
15924 no_gravity: NoGravity(Default::default()),
15925 pose: Pose::default(),
15926 ticks_frozen: TicksFrozen(Default::default()),
15927 },
15928 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
15929 Default::default(),
15930 ),
15931 },
15932 }
15933 }
15934}
15935
15936#[derive(Component)]
15955pub struct EnderPearl;
15956impl EnderPearl {
15957 pub fn apply_metadata(
15958 entity: &mut bevy_ecs::system::EntityCommands,
15959 d: EntityDataItem,
15960 ) -> Result<(), UpdateMetadataError> {
15961 match d.index {
15962 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
15963 _ => {}
15964 }
15965 Ok(())
15966 }
15967}
15968
15969#[derive(Bundle)]
15973pub struct EnderPearlMetadataBundle {
15974 _marker: EnderPearl,
15975 parent: AbstractThrownItemProjectileMetadataBundle,
15976}
15977impl Default for EnderPearlMetadataBundle {
15978 fn default() -> Self {
15979 Self {
15980 _marker: EnderPearl,
15981 parent: AbstractThrownItemProjectileMetadataBundle {
15982 _marker: AbstractThrownItemProjectile,
15983 parent: AbstractEntityMetadataBundle {
15984 _marker: AbstractEntity,
15985 on_fire: OnFire(false),
15986 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
15987 sprinting: Sprinting(false),
15988 swimming: Swimming(false),
15989 currently_glowing: CurrentlyGlowing(false),
15990 invisible: Invisible(false),
15991 fall_flying: FallFlying(false),
15992 air_supply: AirSupply(Default::default()),
15993 custom_name: CustomName(Default::default()),
15994 custom_name_visible: CustomNameVisible(Default::default()),
15995 silent: Silent(Default::default()),
15996 no_gravity: NoGravity(Default::default()),
15997 pose: Pose::default(),
15998 ticks_frozen: TicksFrozen(Default::default()),
15999 },
16000 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
16001 Default::default(),
16002 ),
16003 },
16004 }
16005 }
16006}
16007
16008#[derive(Component)]
16027pub struct ExperienceBottle;
16028impl ExperienceBottle {
16029 pub fn apply_metadata(
16030 entity: &mut bevy_ecs::system::EntityCommands,
16031 d: EntityDataItem,
16032 ) -> Result<(), UpdateMetadataError> {
16033 match d.index {
16034 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
16035 _ => {}
16036 }
16037 Ok(())
16038 }
16039}
16040
16041#[derive(Bundle)]
16045pub struct ExperienceBottleMetadataBundle {
16046 _marker: ExperienceBottle,
16047 parent: AbstractThrownItemProjectileMetadataBundle,
16048}
16049impl Default for ExperienceBottleMetadataBundle {
16050 fn default() -> Self {
16051 Self {
16052 _marker: ExperienceBottle,
16053 parent: AbstractThrownItemProjectileMetadataBundle {
16054 _marker: AbstractThrownItemProjectile,
16055 parent: AbstractEntityMetadataBundle {
16056 _marker: AbstractEntity,
16057 on_fire: OnFire(false),
16058 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16059 sprinting: Sprinting(false),
16060 swimming: Swimming(false),
16061 currently_glowing: CurrentlyGlowing(false),
16062 invisible: Invisible(false),
16063 fall_flying: FallFlying(false),
16064 air_supply: AirSupply(Default::default()),
16065 custom_name: CustomName(Default::default()),
16066 custom_name_visible: CustomNameVisible(Default::default()),
16067 silent: Silent(Default::default()),
16068 no_gravity: NoGravity(Default::default()),
16069 pose: Pose::default(),
16070 ticks_frozen: TicksFrozen(Default::default()),
16071 },
16072 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
16073 Default::default(),
16074 ),
16075 },
16076 }
16077 }
16078}
16079
16080#[derive(Component)]
16099pub struct LingeringPotion;
16100impl LingeringPotion {
16101 pub fn apply_metadata(
16102 entity: &mut bevy_ecs::system::EntityCommands,
16103 d: EntityDataItem,
16104 ) -> Result<(), UpdateMetadataError> {
16105 match d.index {
16106 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
16107 _ => {}
16108 }
16109 Ok(())
16110 }
16111}
16112
16113#[derive(Bundle)]
16117pub struct LingeringPotionMetadataBundle {
16118 _marker: LingeringPotion,
16119 parent: AbstractThrownItemProjectileMetadataBundle,
16120}
16121impl Default for LingeringPotionMetadataBundle {
16122 fn default() -> Self {
16123 Self {
16124 _marker: LingeringPotion,
16125 parent: AbstractThrownItemProjectileMetadataBundle {
16126 _marker: AbstractThrownItemProjectile,
16127 parent: AbstractEntityMetadataBundle {
16128 _marker: AbstractEntity,
16129 on_fire: OnFire(false),
16130 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16131 sprinting: Sprinting(false),
16132 swimming: Swimming(false),
16133 currently_glowing: CurrentlyGlowing(false),
16134 invisible: Invisible(false),
16135 fall_flying: FallFlying(false),
16136 air_supply: AirSupply(Default::default()),
16137 custom_name: CustomName(Default::default()),
16138 custom_name_visible: CustomNameVisible(Default::default()),
16139 silent: Silent(Default::default()),
16140 no_gravity: NoGravity(Default::default()),
16141 pose: Pose::default(),
16142 ticks_frozen: TicksFrozen(Default::default()),
16143 },
16144 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
16145 Default::default(),
16146 ),
16147 },
16148 }
16149 }
16150}
16151
16152#[derive(Component)]
16171pub struct Snowball;
16172impl Snowball {
16173 pub fn apply_metadata(
16174 entity: &mut bevy_ecs::system::EntityCommands,
16175 d: EntityDataItem,
16176 ) -> Result<(), UpdateMetadataError> {
16177 match d.index {
16178 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
16179 _ => {}
16180 }
16181 Ok(())
16182 }
16183}
16184
16185#[derive(Bundle)]
16189pub struct SnowballMetadataBundle {
16190 _marker: Snowball,
16191 parent: AbstractThrownItemProjectileMetadataBundle,
16192}
16193impl Default for SnowballMetadataBundle {
16194 fn default() -> Self {
16195 Self {
16196 _marker: Snowball,
16197 parent: AbstractThrownItemProjectileMetadataBundle {
16198 _marker: AbstractThrownItemProjectile,
16199 parent: AbstractEntityMetadataBundle {
16200 _marker: AbstractEntity,
16201 on_fire: OnFire(false),
16202 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16203 sprinting: Sprinting(false),
16204 swimming: Swimming(false),
16205 currently_glowing: CurrentlyGlowing(false),
16206 invisible: Invisible(false),
16207 fall_flying: FallFlying(false),
16208 air_supply: AirSupply(Default::default()),
16209 custom_name: CustomName(Default::default()),
16210 custom_name_visible: CustomNameVisible(Default::default()),
16211 silent: Silent(Default::default()),
16212 no_gravity: NoGravity(Default::default()),
16213 pose: Pose::default(),
16214 ticks_frozen: TicksFrozen(Default::default()),
16215 },
16216 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
16217 Default::default(),
16218 ),
16219 },
16220 }
16221 }
16222}
16223
16224#[derive(Component)]
16243pub struct SplashPotion;
16244impl SplashPotion {
16245 pub fn apply_metadata(
16246 entity: &mut bevy_ecs::system::EntityCommands,
16247 d: EntityDataItem,
16248 ) -> Result<(), UpdateMetadataError> {
16249 match d.index {
16250 0..=8 => AbstractThrownItemProjectile::apply_metadata(entity, d)?,
16251 _ => {}
16252 }
16253 Ok(())
16254 }
16255}
16256
16257#[derive(Bundle)]
16261pub struct SplashPotionMetadataBundle {
16262 _marker: SplashPotion,
16263 parent: AbstractThrownItemProjectileMetadataBundle,
16264}
16265impl Default for SplashPotionMetadataBundle {
16266 fn default() -> Self {
16267 Self {
16268 _marker: SplashPotion,
16269 parent: AbstractThrownItemProjectileMetadataBundle {
16270 _marker: AbstractThrownItemProjectile,
16271 parent: AbstractEntityMetadataBundle {
16272 _marker: AbstractEntity,
16273 on_fire: OnFire(false),
16274 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16275 sprinting: Sprinting(false),
16276 swimming: Swimming(false),
16277 currently_glowing: CurrentlyGlowing(false),
16278 invisible: Invisible(false),
16279 fall_flying: FallFlying(false),
16280 air_supply: AirSupply(Default::default()),
16281 custom_name: CustomName(Default::default()),
16282 custom_name_visible: CustomNameVisible(Default::default()),
16283 silent: Silent(Default::default()),
16284 no_gravity: NoGravity(Default::default()),
16285 pose: Pose::default(),
16286 ticks_frozen: TicksFrozen(Default::default()),
16287 },
16288 abstract_thrown_item_projectile_item_stack: AbstractThrownItemProjectileItemStack(
16289 Default::default(),
16290 ),
16291 },
16292 }
16293 }
16294}
16295
16296#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16298pub struct Hurt(pub i32);
16299#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16301pub struct Hurtdir(pub i32);
16302#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16304pub struct Damage(pub f32);
16305#[derive(Component)]
16356pub struct AbstractVehicle;
16357impl AbstractVehicle {
16358 pub fn apply_metadata(
16359 entity: &mut bevy_ecs::system::EntityCommands,
16360 d: EntityDataItem,
16361 ) -> Result<(), UpdateMetadataError> {
16362 match d.index {
16363 0..=7 => AbstractEntity::apply_metadata(entity, d)?,
16364 8 => {
16365 entity.insert(Hurt(d.value.into_int()?));
16366 }
16367 9 => {
16368 entity.insert(Hurtdir(d.value.into_int()?));
16369 }
16370 10 => {
16371 entity.insert(Damage(d.value.into_float()?));
16372 }
16373 _ => {}
16374 }
16375 Ok(())
16376 }
16377}
16378
16379#[derive(Bundle)]
16383pub struct AbstractVehicleMetadataBundle {
16384 _marker: AbstractVehicle,
16385 parent: AbstractEntityMetadataBundle,
16386 hurt: Hurt,
16387 hurtdir: Hurtdir,
16388 damage: Damage,
16389}
16390impl Default for AbstractVehicleMetadataBundle {
16391 fn default() -> Self {
16392 Self {
16393 _marker: AbstractVehicle,
16394 parent: AbstractEntityMetadataBundle {
16395 _marker: AbstractEntity,
16396 on_fire: OnFire(false),
16397 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16398 sprinting: Sprinting(false),
16399 swimming: Swimming(false),
16400 currently_glowing: CurrentlyGlowing(false),
16401 invisible: Invisible(false),
16402 fall_flying: FallFlying(false),
16403 air_supply: AirSupply(Default::default()),
16404 custom_name: CustomName(Default::default()),
16405 custom_name_visible: CustomNameVisible(Default::default()),
16406 silent: Silent(Default::default()),
16407 no_gravity: NoGravity(Default::default()),
16408 pose: Pose::default(),
16409 ticks_frozen: TicksFrozen(Default::default()),
16410 },
16411 hurt: Hurt(0),
16412 hurtdir: Hurtdir(1),
16413 damage: Damage(0.0),
16414 }
16415 }
16416}
16417
16418#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16420pub struct PaddleLeft(pub bool);
16421#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16423pub struct PaddleRight(pub bool);
16424#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
16426pub struct BubbleTime(pub i32);
16427#[derive(Component)]
16470pub struct AbstractBoat;
16471impl AbstractBoat {
16472 pub fn apply_metadata(
16473 entity: &mut bevy_ecs::system::EntityCommands,
16474 d: EntityDataItem,
16475 ) -> Result<(), UpdateMetadataError> {
16476 match d.index {
16477 0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
16478 11 => {
16479 entity.insert(PaddleLeft(d.value.into_boolean()?));
16480 }
16481 12 => {
16482 entity.insert(PaddleRight(d.value.into_boolean()?));
16483 }
16484 13 => {
16485 entity.insert(BubbleTime(d.value.into_int()?));
16486 }
16487 _ => {}
16488 }
16489 Ok(())
16490 }
16491}
16492
16493#[derive(Bundle)]
16497pub struct AbstractBoatMetadataBundle {
16498 _marker: AbstractBoat,
16499 parent: AbstractVehicleMetadataBundle,
16500 paddle_left: PaddleLeft,
16501 paddle_right: PaddleRight,
16502 bubble_time: BubbleTime,
16503}
16504impl Default for AbstractBoatMetadataBundle {
16505 fn default() -> Self {
16506 Self {
16507 _marker: AbstractBoat,
16508 parent: AbstractVehicleMetadataBundle {
16509 _marker: AbstractVehicle,
16510 parent: AbstractEntityMetadataBundle {
16511 _marker: AbstractEntity,
16512 on_fire: OnFire(false),
16513 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16514 sprinting: Sprinting(false),
16515 swimming: Swimming(false),
16516 currently_glowing: CurrentlyGlowing(false),
16517 invisible: Invisible(false),
16518 fall_flying: FallFlying(false),
16519 air_supply: AirSupply(Default::default()),
16520 custom_name: CustomName(Default::default()),
16521 custom_name_visible: CustomNameVisible(Default::default()),
16522 silent: Silent(Default::default()),
16523 no_gravity: NoGravity(Default::default()),
16524 pose: Pose::default(),
16525 ticks_frozen: TicksFrozen(Default::default()),
16526 },
16527 hurt: Hurt(0),
16528 hurtdir: Hurtdir(1),
16529 damage: Damage(0.0),
16530 },
16531 paddle_left: PaddleLeft(false),
16532 paddle_right: PaddleRight(false),
16533 bubble_time: BubbleTime(0),
16534 }
16535 }
16536}
16537
16538#[derive(Component)]
16558pub struct AcaciaBoat;
16559impl AcaciaBoat {
16560 pub fn apply_metadata(
16561 entity: &mut bevy_ecs::system::EntityCommands,
16562 d: EntityDataItem,
16563 ) -> Result<(), UpdateMetadataError> {
16564 match d.index {
16565 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16566 _ => {}
16567 }
16568 Ok(())
16569 }
16570}
16571
16572#[derive(Bundle)]
16576pub struct AcaciaBoatMetadataBundle {
16577 _marker: AcaciaBoat,
16578 parent: AbstractBoatMetadataBundle,
16579}
16580impl Default for AcaciaBoatMetadataBundle {
16581 fn default() -> Self {
16582 Self {
16583 _marker: AcaciaBoat,
16584 parent: AbstractBoatMetadataBundle {
16585 _marker: AbstractBoat,
16586 parent: AbstractVehicleMetadataBundle {
16587 _marker: AbstractVehicle,
16588 parent: AbstractEntityMetadataBundle {
16589 _marker: AbstractEntity,
16590 on_fire: OnFire(false),
16591 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16592 sprinting: Sprinting(false),
16593 swimming: Swimming(false),
16594 currently_glowing: CurrentlyGlowing(false),
16595 invisible: Invisible(false),
16596 fall_flying: FallFlying(false),
16597 air_supply: AirSupply(Default::default()),
16598 custom_name: CustomName(Default::default()),
16599 custom_name_visible: CustomNameVisible(Default::default()),
16600 silent: Silent(Default::default()),
16601 no_gravity: NoGravity(Default::default()),
16602 pose: Pose::default(),
16603 ticks_frozen: TicksFrozen(Default::default()),
16604 },
16605 hurt: Hurt(0),
16606 hurtdir: Hurtdir(1),
16607 damage: Damage(0.0),
16608 },
16609 paddle_left: PaddleLeft(false),
16610 paddle_right: PaddleRight(false),
16611 bubble_time: BubbleTime(0),
16612 },
16613 }
16614 }
16615}
16616
16617#[derive(Component)]
16637pub struct AcaciaChestBoat;
16638impl AcaciaChestBoat {
16639 pub fn apply_metadata(
16640 entity: &mut bevy_ecs::system::EntityCommands,
16641 d: EntityDataItem,
16642 ) -> Result<(), UpdateMetadataError> {
16643 match d.index {
16644 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16645 _ => {}
16646 }
16647 Ok(())
16648 }
16649}
16650
16651#[derive(Bundle)]
16655pub struct AcaciaChestBoatMetadataBundle {
16656 _marker: AcaciaChestBoat,
16657 parent: AbstractBoatMetadataBundle,
16658}
16659impl Default for AcaciaChestBoatMetadataBundle {
16660 fn default() -> Self {
16661 Self {
16662 _marker: AcaciaChestBoat,
16663 parent: AbstractBoatMetadataBundle {
16664 _marker: AbstractBoat,
16665 parent: AbstractVehicleMetadataBundle {
16666 _marker: AbstractVehicle,
16667 parent: AbstractEntityMetadataBundle {
16668 _marker: AbstractEntity,
16669 on_fire: OnFire(false),
16670 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16671 sprinting: Sprinting(false),
16672 swimming: Swimming(false),
16673 currently_glowing: CurrentlyGlowing(false),
16674 invisible: Invisible(false),
16675 fall_flying: FallFlying(false),
16676 air_supply: AirSupply(Default::default()),
16677 custom_name: CustomName(Default::default()),
16678 custom_name_visible: CustomNameVisible(Default::default()),
16679 silent: Silent(Default::default()),
16680 no_gravity: NoGravity(Default::default()),
16681 pose: Pose::default(),
16682 ticks_frozen: TicksFrozen(Default::default()),
16683 },
16684 hurt: Hurt(0),
16685 hurtdir: Hurtdir(1),
16686 damage: Damage(0.0),
16687 },
16688 paddle_left: PaddleLeft(false),
16689 paddle_right: PaddleRight(false),
16690 bubble_time: BubbleTime(0),
16691 },
16692 }
16693 }
16694}
16695
16696#[derive(Component)]
16716pub struct BambooChestRaft;
16717impl BambooChestRaft {
16718 pub fn apply_metadata(
16719 entity: &mut bevy_ecs::system::EntityCommands,
16720 d: EntityDataItem,
16721 ) -> Result<(), UpdateMetadataError> {
16722 match d.index {
16723 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16724 _ => {}
16725 }
16726 Ok(())
16727 }
16728}
16729
16730#[derive(Bundle)]
16734pub struct BambooChestRaftMetadataBundle {
16735 _marker: BambooChestRaft,
16736 parent: AbstractBoatMetadataBundle,
16737}
16738impl Default for BambooChestRaftMetadataBundle {
16739 fn default() -> Self {
16740 Self {
16741 _marker: BambooChestRaft,
16742 parent: AbstractBoatMetadataBundle {
16743 _marker: AbstractBoat,
16744 parent: AbstractVehicleMetadataBundle {
16745 _marker: AbstractVehicle,
16746 parent: AbstractEntityMetadataBundle {
16747 _marker: AbstractEntity,
16748 on_fire: OnFire(false),
16749 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16750 sprinting: Sprinting(false),
16751 swimming: Swimming(false),
16752 currently_glowing: CurrentlyGlowing(false),
16753 invisible: Invisible(false),
16754 fall_flying: FallFlying(false),
16755 air_supply: AirSupply(Default::default()),
16756 custom_name: CustomName(Default::default()),
16757 custom_name_visible: CustomNameVisible(Default::default()),
16758 silent: Silent(Default::default()),
16759 no_gravity: NoGravity(Default::default()),
16760 pose: Pose::default(),
16761 ticks_frozen: TicksFrozen(Default::default()),
16762 },
16763 hurt: Hurt(0),
16764 hurtdir: Hurtdir(1),
16765 damage: Damage(0.0),
16766 },
16767 paddle_left: PaddleLeft(false),
16768 paddle_right: PaddleRight(false),
16769 bubble_time: BubbleTime(0),
16770 },
16771 }
16772 }
16773}
16774
16775#[derive(Component)]
16795pub struct BambooRaft;
16796impl BambooRaft {
16797 pub fn apply_metadata(
16798 entity: &mut bevy_ecs::system::EntityCommands,
16799 d: EntityDataItem,
16800 ) -> Result<(), UpdateMetadataError> {
16801 match d.index {
16802 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16803 _ => {}
16804 }
16805 Ok(())
16806 }
16807}
16808
16809#[derive(Bundle)]
16813pub struct BambooRaftMetadataBundle {
16814 _marker: BambooRaft,
16815 parent: AbstractBoatMetadataBundle,
16816}
16817impl Default for BambooRaftMetadataBundle {
16818 fn default() -> Self {
16819 Self {
16820 _marker: BambooRaft,
16821 parent: AbstractBoatMetadataBundle {
16822 _marker: AbstractBoat,
16823 parent: AbstractVehicleMetadataBundle {
16824 _marker: AbstractVehicle,
16825 parent: AbstractEntityMetadataBundle {
16826 _marker: AbstractEntity,
16827 on_fire: OnFire(false),
16828 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16829 sprinting: Sprinting(false),
16830 swimming: Swimming(false),
16831 currently_glowing: CurrentlyGlowing(false),
16832 invisible: Invisible(false),
16833 fall_flying: FallFlying(false),
16834 air_supply: AirSupply(Default::default()),
16835 custom_name: CustomName(Default::default()),
16836 custom_name_visible: CustomNameVisible(Default::default()),
16837 silent: Silent(Default::default()),
16838 no_gravity: NoGravity(Default::default()),
16839 pose: Pose::default(),
16840 ticks_frozen: TicksFrozen(Default::default()),
16841 },
16842 hurt: Hurt(0),
16843 hurtdir: Hurtdir(1),
16844 damage: Damage(0.0),
16845 },
16846 paddle_left: PaddleLeft(false),
16847 paddle_right: PaddleRight(false),
16848 bubble_time: BubbleTime(0),
16849 },
16850 }
16851 }
16852}
16853
16854#[derive(Component)]
16874pub struct BirchBoat;
16875impl BirchBoat {
16876 pub fn apply_metadata(
16877 entity: &mut bevy_ecs::system::EntityCommands,
16878 d: EntityDataItem,
16879 ) -> Result<(), UpdateMetadataError> {
16880 match d.index {
16881 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16882 _ => {}
16883 }
16884 Ok(())
16885 }
16886}
16887
16888#[derive(Bundle)]
16892pub struct BirchBoatMetadataBundle {
16893 _marker: BirchBoat,
16894 parent: AbstractBoatMetadataBundle,
16895}
16896impl Default for BirchBoatMetadataBundle {
16897 fn default() -> Self {
16898 Self {
16899 _marker: BirchBoat,
16900 parent: AbstractBoatMetadataBundle {
16901 _marker: AbstractBoat,
16902 parent: AbstractVehicleMetadataBundle {
16903 _marker: AbstractVehicle,
16904 parent: AbstractEntityMetadataBundle {
16905 _marker: AbstractEntity,
16906 on_fire: OnFire(false),
16907 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16908 sprinting: Sprinting(false),
16909 swimming: Swimming(false),
16910 currently_glowing: CurrentlyGlowing(false),
16911 invisible: Invisible(false),
16912 fall_flying: FallFlying(false),
16913 air_supply: AirSupply(Default::default()),
16914 custom_name: CustomName(Default::default()),
16915 custom_name_visible: CustomNameVisible(Default::default()),
16916 silent: Silent(Default::default()),
16917 no_gravity: NoGravity(Default::default()),
16918 pose: Pose::default(),
16919 ticks_frozen: TicksFrozen(Default::default()),
16920 },
16921 hurt: Hurt(0),
16922 hurtdir: Hurtdir(1),
16923 damage: Damage(0.0),
16924 },
16925 paddle_left: PaddleLeft(false),
16926 paddle_right: PaddleRight(false),
16927 bubble_time: BubbleTime(0),
16928 },
16929 }
16930 }
16931}
16932
16933#[derive(Component)]
16953pub struct BirchChestBoat;
16954impl BirchChestBoat {
16955 pub fn apply_metadata(
16956 entity: &mut bevy_ecs::system::EntityCommands,
16957 d: EntityDataItem,
16958 ) -> Result<(), UpdateMetadataError> {
16959 match d.index {
16960 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
16961 _ => {}
16962 }
16963 Ok(())
16964 }
16965}
16966
16967#[derive(Bundle)]
16971pub struct BirchChestBoatMetadataBundle {
16972 _marker: BirchChestBoat,
16973 parent: AbstractBoatMetadataBundle,
16974}
16975impl Default for BirchChestBoatMetadataBundle {
16976 fn default() -> Self {
16977 Self {
16978 _marker: BirchChestBoat,
16979 parent: AbstractBoatMetadataBundle {
16980 _marker: AbstractBoat,
16981 parent: AbstractVehicleMetadataBundle {
16982 _marker: AbstractVehicle,
16983 parent: AbstractEntityMetadataBundle {
16984 _marker: AbstractEntity,
16985 on_fire: OnFire(false),
16986 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
16987 sprinting: Sprinting(false),
16988 swimming: Swimming(false),
16989 currently_glowing: CurrentlyGlowing(false),
16990 invisible: Invisible(false),
16991 fall_flying: FallFlying(false),
16992 air_supply: AirSupply(Default::default()),
16993 custom_name: CustomName(Default::default()),
16994 custom_name_visible: CustomNameVisible(Default::default()),
16995 silent: Silent(Default::default()),
16996 no_gravity: NoGravity(Default::default()),
16997 pose: Pose::default(),
16998 ticks_frozen: TicksFrozen(Default::default()),
16999 },
17000 hurt: Hurt(0),
17001 hurtdir: Hurtdir(1),
17002 damage: Damage(0.0),
17003 },
17004 paddle_left: PaddleLeft(false),
17005 paddle_right: PaddleRight(false),
17006 bubble_time: BubbleTime(0),
17007 },
17008 }
17009 }
17010}
17011
17012#[derive(Component)]
17032pub struct CherryBoat;
17033impl CherryBoat {
17034 pub fn apply_metadata(
17035 entity: &mut bevy_ecs::system::EntityCommands,
17036 d: EntityDataItem,
17037 ) -> Result<(), UpdateMetadataError> {
17038 match d.index {
17039 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17040 _ => {}
17041 }
17042 Ok(())
17043 }
17044}
17045
17046#[derive(Bundle)]
17050pub struct CherryBoatMetadataBundle {
17051 _marker: CherryBoat,
17052 parent: AbstractBoatMetadataBundle,
17053}
17054impl Default for CherryBoatMetadataBundle {
17055 fn default() -> Self {
17056 Self {
17057 _marker: CherryBoat,
17058 parent: AbstractBoatMetadataBundle {
17059 _marker: AbstractBoat,
17060 parent: AbstractVehicleMetadataBundle {
17061 _marker: AbstractVehicle,
17062 parent: AbstractEntityMetadataBundle {
17063 _marker: AbstractEntity,
17064 on_fire: OnFire(false),
17065 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17066 sprinting: Sprinting(false),
17067 swimming: Swimming(false),
17068 currently_glowing: CurrentlyGlowing(false),
17069 invisible: Invisible(false),
17070 fall_flying: FallFlying(false),
17071 air_supply: AirSupply(Default::default()),
17072 custom_name: CustomName(Default::default()),
17073 custom_name_visible: CustomNameVisible(Default::default()),
17074 silent: Silent(Default::default()),
17075 no_gravity: NoGravity(Default::default()),
17076 pose: Pose::default(),
17077 ticks_frozen: TicksFrozen(Default::default()),
17078 },
17079 hurt: Hurt(0),
17080 hurtdir: Hurtdir(1),
17081 damage: Damage(0.0),
17082 },
17083 paddle_left: PaddleLeft(false),
17084 paddle_right: PaddleRight(false),
17085 bubble_time: BubbleTime(0),
17086 },
17087 }
17088 }
17089}
17090
17091#[derive(Component)]
17111pub struct CherryChestBoat;
17112impl CherryChestBoat {
17113 pub fn apply_metadata(
17114 entity: &mut bevy_ecs::system::EntityCommands,
17115 d: EntityDataItem,
17116 ) -> Result<(), UpdateMetadataError> {
17117 match d.index {
17118 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17119 _ => {}
17120 }
17121 Ok(())
17122 }
17123}
17124
17125#[derive(Bundle)]
17129pub struct CherryChestBoatMetadataBundle {
17130 _marker: CherryChestBoat,
17131 parent: AbstractBoatMetadataBundle,
17132}
17133impl Default for CherryChestBoatMetadataBundle {
17134 fn default() -> Self {
17135 Self {
17136 _marker: CherryChestBoat,
17137 parent: AbstractBoatMetadataBundle {
17138 _marker: AbstractBoat,
17139 parent: AbstractVehicleMetadataBundle {
17140 _marker: AbstractVehicle,
17141 parent: AbstractEntityMetadataBundle {
17142 _marker: AbstractEntity,
17143 on_fire: OnFire(false),
17144 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17145 sprinting: Sprinting(false),
17146 swimming: Swimming(false),
17147 currently_glowing: CurrentlyGlowing(false),
17148 invisible: Invisible(false),
17149 fall_flying: FallFlying(false),
17150 air_supply: AirSupply(Default::default()),
17151 custom_name: CustomName(Default::default()),
17152 custom_name_visible: CustomNameVisible(Default::default()),
17153 silent: Silent(Default::default()),
17154 no_gravity: NoGravity(Default::default()),
17155 pose: Pose::default(),
17156 ticks_frozen: TicksFrozen(Default::default()),
17157 },
17158 hurt: Hurt(0),
17159 hurtdir: Hurtdir(1),
17160 damage: Damage(0.0),
17161 },
17162 paddle_left: PaddleLeft(false),
17163 paddle_right: PaddleRight(false),
17164 bubble_time: BubbleTime(0),
17165 },
17166 }
17167 }
17168}
17169
17170#[derive(Component)]
17190pub struct DarkOakBoat;
17191impl DarkOakBoat {
17192 pub fn apply_metadata(
17193 entity: &mut bevy_ecs::system::EntityCommands,
17194 d: EntityDataItem,
17195 ) -> Result<(), UpdateMetadataError> {
17196 match d.index {
17197 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17198 _ => {}
17199 }
17200 Ok(())
17201 }
17202}
17203
17204#[derive(Bundle)]
17208pub struct DarkOakBoatMetadataBundle {
17209 _marker: DarkOakBoat,
17210 parent: AbstractBoatMetadataBundle,
17211}
17212impl Default for DarkOakBoatMetadataBundle {
17213 fn default() -> Self {
17214 Self {
17215 _marker: DarkOakBoat,
17216 parent: AbstractBoatMetadataBundle {
17217 _marker: AbstractBoat,
17218 parent: AbstractVehicleMetadataBundle {
17219 _marker: AbstractVehicle,
17220 parent: AbstractEntityMetadataBundle {
17221 _marker: AbstractEntity,
17222 on_fire: OnFire(false),
17223 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17224 sprinting: Sprinting(false),
17225 swimming: Swimming(false),
17226 currently_glowing: CurrentlyGlowing(false),
17227 invisible: Invisible(false),
17228 fall_flying: FallFlying(false),
17229 air_supply: AirSupply(Default::default()),
17230 custom_name: CustomName(Default::default()),
17231 custom_name_visible: CustomNameVisible(Default::default()),
17232 silent: Silent(Default::default()),
17233 no_gravity: NoGravity(Default::default()),
17234 pose: Pose::default(),
17235 ticks_frozen: TicksFrozen(Default::default()),
17236 },
17237 hurt: Hurt(0),
17238 hurtdir: Hurtdir(1),
17239 damage: Damage(0.0),
17240 },
17241 paddle_left: PaddleLeft(false),
17242 paddle_right: PaddleRight(false),
17243 bubble_time: BubbleTime(0),
17244 },
17245 }
17246 }
17247}
17248
17249#[derive(Component)]
17269pub struct DarkOakChestBoat;
17270impl DarkOakChestBoat {
17271 pub fn apply_metadata(
17272 entity: &mut bevy_ecs::system::EntityCommands,
17273 d: EntityDataItem,
17274 ) -> Result<(), UpdateMetadataError> {
17275 match d.index {
17276 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17277 _ => {}
17278 }
17279 Ok(())
17280 }
17281}
17282
17283#[derive(Bundle)]
17287pub struct DarkOakChestBoatMetadataBundle {
17288 _marker: DarkOakChestBoat,
17289 parent: AbstractBoatMetadataBundle,
17290}
17291impl Default for DarkOakChestBoatMetadataBundle {
17292 fn default() -> Self {
17293 Self {
17294 _marker: DarkOakChestBoat,
17295 parent: AbstractBoatMetadataBundle {
17296 _marker: AbstractBoat,
17297 parent: AbstractVehicleMetadataBundle {
17298 _marker: AbstractVehicle,
17299 parent: AbstractEntityMetadataBundle {
17300 _marker: AbstractEntity,
17301 on_fire: OnFire(false),
17302 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17303 sprinting: Sprinting(false),
17304 swimming: Swimming(false),
17305 currently_glowing: CurrentlyGlowing(false),
17306 invisible: Invisible(false),
17307 fall_flying: FallFlying(false),
17308 air_supply: AirSupply(Default::default()),
17309 custom_name: CustomName(Default::default()),
17310 custom_name_visible: CustomNameVisible(Default::default()),
17311 silent: Silent(Default::default()),
17312 no_gravity: NoGravity(Default::default()),
17313 pose: Pose::default(),
17314 ticks_frozen: TicksFrozen(Default::default()),
17315 },
17316 hurt: Hurt(0),
17317 hurtdir: Hurtdir(1),
17318 damage: Damage(0.0),
17319 },
17320 paddle_left: PaddleLeft(false),
17321 paddle_right: PaddleRight(false),
17322 bubble_time: BubbleTime(0),
17323 },
17324 }
17325 }
17326}
17327
17328#[derive(Component)]
17348pub struct JungleBoat;
17349impl JungleBoat {
17350 pub fn apply_metadata(
17351 entity: &mut bevy_ecs::system::EntityCommands,
17352 d: EntityDataItem,
17353 ) -> Result<(), UpdateMetadataError> {
17354 match d.index {
17355 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17356 _ => {}
17357 }
17358 Ok(())
17359 }
17360}
17361
17362#[derive(Bundle)]
17366pub struct JungleBoatMetadataBundle {
17367 _marker: JungleBoat,
17368 parent: AbstractBoatMetadataBundle,
17369}
17370impl Default for JungleBoatMetadataBundle {
17371 fn default() -> Self {
17372 Self {
17373 _marker: JungleBoat,
17374 parent: AbstractBoatMetadataBundle {
17375 _marker: AbstractBoat,
17376 parent: AbstractVehicleMetadataBundle {
17377 _marker: AbstractVehicle,
17378 parent: AbstractEntityMetadataBundle {
17379 _marker: AbstractEntity,
17380 on_fire: OnFire(false),
17381 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17382 sprinting: Sprinting(false),
17383 swimming: Swimming(false),
17384 currently_glowing: CurrentlyGlowing(false),
17385 invisible: Invisible(false),
17386 fall_flying: FallFlying(false),
17387 air_supply: AirSupply(Default::default()),
17388 custom_name: CustomName(Default::default()),
17389 custom_name_visible: CustomNameVisible(Default::default()),
17390 silent: Silent(Default::default()),
17391 no_gravity: NoGravity(Default::default()),
17392 pose: Pose::default(),
17393 ticks_frozen: TicksFrozen(Default::default()),
17394 },
17395 hurt: Hurt(0),
17396 hurtdir: Hurtdir(1),
17397 damage: Damage(0.0),
17398 },
17399 paddle_left: PaddleLeft(false),
17400 paddle_right: PaddleRight(false),
17401 bubble_time: BubbleTime(0),
17402 },
17403 }
17404 }
17405}
17406
17407#[derive(Component)]
17427pub struct JungleChestBoat;
17428impl JungleChestBoat {
17429 pub fn apply_metadata(
17430 entity: &mut bevy_ecs::system::EntityCommands,
17431 d: EntityDataItem,
17432 ) -> Result<(), UpdateMetadataError> {
17433 match d.index {
17434 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17435 _ => {}
17436 }
17437 Ok(())
17438 }
17439}
17440
17441#[derive(Bundle)]
17445pub struct JungleChestBoatMetadataBundle {
17446 _marker: JungleChestBoat,
17447 parent: AbstractBoatMetadataBundle,
17448}
17449impl Default for JungleChestBoatMetadataBundle {
17450 fn default() -> Self {
17451 Self {
17452 _marker: JungleChestBoat,
17453 parent: AbstractBoatMetadataBundle {
17454 _marker: AbstractBoat,
17455 parent: AbstractVehicleMetadataBundle {
17456 _marker: AbstractVehicle,
17457 parent: AbstractEntityMetadataBundle {
17458 _marker: AbstractEntity,
17459 on_fire: OnFire(false),
17460 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17461 sprinting: Sprinting(false),
17462 swimming: Swimming(false),
17463 currently_glowing: CurrentlyGlowing(false),
17464 invisible: Invisible(false),
17465 fall_flying: FallFlying(false),
17466 air_supply: AirSupply(Default::default()),
17467 custom_name: CustomName(Default::default()),
17468 custom_name_visible: CustomNameVisible(Default::default()),
17469 silent: Silent(Default::default()),
17470 no_gravity: NoGravity(Default::default()),
17471 pose: Pose::default(),
17472 ticks_frozen: TicksFrozen(Default::default()),
17473 },
17474 hurt: Hurt(0),
17475 hurtdir: Hurtdir(1),
17476 damage: Damage(0.0),
17477 },
17478 paddle_left: PaddleLeft(false),
17479 paddle_right: PaddleRight(false),
17480 bubble_time: BubbleTime(0),
17481 },
17482 }
17483 }
17484}
17485
17486#[derive(Component)]
17506pub struct MangroveBoat;
17507impl MangroveBoat {
17508 pub fn apply_metadata(
17509 entity: &mut bevy_ecs::system::EntityCommands,
17510 d: EntityDataItem,
17511 ) -> Result<(), UpdateMetadataError> {
17512 match d.index {
17513 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17514 _ => {}
17515 }
17516 Ok(())
17517 }
17518}
17519
17520#[derive(Bundle)]
17524pub struct MangroveBoatMetadataBundle {
17525 _marker: MangroveBoat,
17526 parent: AbstractBoatMetadataBundle,
17527}
17528impl Default for MangroveBoatMetadataBundle {
17529 fn default() -> Self {
17530 Self {
17531 _marker: MangroveBoat,
17532 parent: AbstractBoatMetadataBundle {
17533 _marker: AbstractBoat,
17534 parent: AbstractVehicleMetadataBundle {
17535 _marker: AbstractVehicle,
17536 parent: AbstractEntityMetadataBundle {
17537 _marker: AbstractEntity,
17538 on_fire: OnFire(false),
17539 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17540 sprinting: Sprinting(false),
17541 swimming: Swimming(false),
17542 currently_glowing: CurrentlyGlowing(false),
17543 invisible: Invisible(false),
17544 fall_flying: FallFlying(false),
17545 air_supply: AirSupply(Default::default()),
17546 custom_name: CustomName(Default::default()),
17547 custom_name_visible: CustomNameVisible(Default::default()),
17548 silent: Silent(Default::default()),
17549 no_gravity: NoGravity(Default::default()),
17550 pose: Pose::default(),
17551 ticks_frozen: TicksFrozen(Default::default()),
17552 },
17553 hurt: Hurt(0),
17554 hurtdir: Hurtdir(1),
17555 damage: Damage(0.0),
17556 },
17557 paddle_left: PaddleLeft(false),
17558 paddle_right: PaddleRight(false),
17559 bubble_time: BubbleTime(0),
17560 },
17561 }
17562 }
17563}
17564
17565#[derive(Component)]
17585pub struct MangroveChestBoat;
17586impl MangroveChestBoat {
17587 pub fn apply_metadata(
17588 entity: &mut bevy_ecs::system::EntityCommands,
17589 d: EntityDataItem,
17590 ) -> Result<(), UpdateMetadataError> {
17591 match d.index {
17592 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17593 _ => {}
17594 }
17595 Ok(())
17596 }
17597}
17598
17599#[derive(Bundle)]
17603pub struct MangroveChestBoatMetadataBundle {
17604 _marker: MangroveChestBoat,
17605 parent: AbstractBoatMetadataBundle,
17606}
17607impl Default for MangroveChestBoatMetadataBundle {
17608 fn default() -> Self {
17609 Self {
17610 _marker: MangroveChestBoat,
17611 parent: AbstractBoatMetadataBundle {
17612 _marker: AbstractBoat,
17613 parent: AbstractVehicleMetadataBundle {
17614 _marker: AbstractVehicle,
17615 parent: AbstractEntityMetadataBundle {
17616 _marker: AbstractEntity,
17617 on_fire: OnFire(false),
17618 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17619 sprinting: Sprinting(false),
17620 swimming: Swimming(false),
17621 currently_glowing: CurrentlyGlowing(false),
17622 invisible: Invisible(false),
17623 fall_flying: FallFlying(false),
17624 air_supply: AirSupply(Default::default()),
17625 custom_name: CustomName(Default::default()),
17626 custom_name_visible: CustomNameVisible(Default::default()),
17627 silent: Silent(Default::default()),
17628 no_gravity: NoGravity(Default::default()),
17629 pose: Pose::default(),
17630 ticks_frozen: TicksFrozen(Default::default()),
17631 },
17632 hurt: Hurt(0),
17633 hurtdir: Hurtdir(1),
17634 damage: Damage(0.0),
17635 },
17636 paddle_left: PaddleLeft(false),
17637 paddle_right: PaddleRight(false),
17638 bubble_time: BubbleTime(0),
17639 },
17640 }
17641 }
17642}
17643
17644#[derive(Component)]
17664pub struct OakBoat;
17665impl OakBoat {
17666 pub fn apply_metadata(
17667 entity: &mut bevy_ecs::system::EntityCommands,
17668 d: EntityDataItem,
17669 ) -> Result<(), UpdateMetadataError> {
17670 match d.index {
17671 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17672 _ => {}
17673 }
17674 Ok(())
17675 }
17676}
17677
17678#[derive(Bundle)]
17682pub struct OakBoatMetadataBundle {
17683 _marker: OakBoat,
17684 parent: AbstractBoatMetadataBundle,
17685}
17686impl Default for OakBoatMetadataBundle {
17687 fn default() -> Self {
17688 Self {
17689 _marker: OakBoat,
17690 parent: AbstractBoatMetadataBundle {
17691 _marker: AbstractBoat,
17692 parent: AbstractVehicleMetadataBundle {
17693 _marker: AbstractVehicle,
17694 parent: AbstractEntityMetadataBundle {
17695 _marker: AbstractEntity,
17696 on_fire: OnFire(false),
17697 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17698 sprinting: Sprinting(false),
17699 swimming: Swimming(false),
17700 currently_glowing: CurrentlyGlowing(false),
17701 invisible: Invisible(false),
17702 fall_flying: FallFlying(false),
17703 air_supply: AirSupply(Default::default()),
17704 custom_name: CustomName(Default::default()),
17705 custom_name_visible: CustomNameVisible(Default::default()),
17706 silent: Silent(Default::default()),
17707 no_gravity: NoGravity(Default::default()),
17708 pose: Pose::default(),
17709 ticks_frozen: TicksFrozen(Default::default()),
17710 },
17711 hurt: Hurt(0),
17712 hurtdir: Hurtdir(1),
17713 damage: Damage(0.0),
17714 },
17715 paddle_left: PaddleLeft(false),
17716 paddle_right: PaddleRight(false),
17717 bubble_time: BubbleTime(0),
17718 },
17719 }
17720 }
17721}
17722
17723#[derive(Component)]
17743pub struct OakChestBoat;
17744impl OakChestBoat {
17745 pub fn apply_metadata(
17746 entity: &mut bevy_ecs::system::EntityCommands,
17747 d: EntityDataItem,
17748 ) -> Result<(), UpdateMetadataError> {
17749 match d.index {
17750 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17751 _ => {}
17752 }
17753 Ok(())
17754 }
17755}
17756
17757#[derive(Bundle)]
17761pub struct OakChestBoatMetadataBundle {
17762 _marker: OakChestBoat,
17763 parent: AbstractBoatMetadataBundle,
17764}
17765impl Default for OakChestBoatMetadataBundle {
17766 fn default() -> Self {
17767 Self {
17768 _marker: OakChestBoat,
17769 parent: AbstractBoatMetadataBundle {
17770 _marker: AbstractBoat,
17771 parent: AbstractVehicleMetadataBundle {
17772 _marker: AbstractVehicle,
17773 parent: AbstractEntityMetadataBundle {
17774 _marker: AbstractEntity,
17775 on_fire: OnFire(false),
17776 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17777 sprinting: Sprinting(false),
17778 swimming: Swimming(false),
17779 currently_glowing: CurrentlyGlowing(false),
17780 invisible: Invisible(false),
17781 fall_flying: FallFlying(false),
17782 air_supply: AirSupply(Default::default()),
17783 custom_name: CustomName(Default::default()),
17784 custom_name_visible: CustomNameVisible(Default::default()),
17785 silent: Silent(Default::default()),
17786 no_gravity: NoGravity(Default::default()),
17787 pose: Pose::default(),
17788 ticks_frozen: TicksFrozen(Default::default()),
17789 },
17790 hurt: Hurt(0),
17791 hurtdir: Hurtdir(1),
17792 damage: Damage(0.0),
17793 },
17794 paddle_left: PaddleLeft(false),
17795 paddle_right: PaddleRight(false),
17796 bubble_time: BubbleTime(0),
17797 },
17798 }
17799 }
17800}
17801
17802#[derive(Component)]
17822pub struct PaleOakBoat;
17823impl PaleOakBoat {
17824 pub fn apply_metadata(
17825 entity: &mut bevy_ecs::system::EntityCommands,
17826 d: EntityDataItem,
17827 ) -> Result<(), UpdateMetadataError> {
17828 match d.index {
17829 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17830 _ => {}
17831 }
17832 Ok(())
17833 }
17834}
17835
17836#[derive(Bundle)]
17840pub struct PaleOakBoatMetadataBundle {
17841 _marker: PaleOakBoat,
17842 parent: AbstractBoatMetadataBundle,
17843}
17844impl Default for PaleOakBoatMetadataBundle {
17845 fn default() -> Self {
17846 Self {
17847 _marker: PaleOakBoat,
17848 parent: AbstractBoatMetadataBundle {
17849 _marker: AbstractBoat,
17850 parent: AbstractVehicleMetadataBundle {
17851 _marker: AbstractVehicle,
17852 parent: AbstractEntityMetadataBundle {
17853 _marker: AbstractEntity,
17854 on_fire: OnFire(false),
17855 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17856 sprinting: Sprinting(false),
17857 swimming: Swimming(false),
17858 currently_glowing: CurrentlyGlowing(false),
17859 invisible: Invisible(false),
17860 fall_flying: FallFlying(false),
17861 air_supply: AirSupply(Default::default()),
17862 custom_name: CustomName(Default::default()),
17863 custom_name_visible: CustomNameVisible(Default::default()),
17864 silent: Silent(Default::default()),
17865 no_gravity: NoGravity(Default::default()),
17866 pose: Pose::default(),
17867 ticks_frozen: TicksFrozen(Default::default()),
17868 },
17869 hurt: Hurt(0),
17870 hurtdir: Hurtdir(1),
17871 damage: Damage(0.0),
17872 },
17873 paddle_left: PaddleLeft(false),
17874 paddle_right: PaddleRight(false),
17875 bubble_time: BubbleTime(0),
17876 },
17877 }
17878 }
17879}
17880
17881#[derive(Component)]
17901pub struct PaleOakChestBoat;
17902impl PaleOakChestBoat {
17903 pub fn apply_metadata(
17904 entity: &mut bevy_ecs::system::EntityCommands,
17905 d: EntityDataItem,
17906 ) -> Result<(), UpdateMetadataError> {
17907 match d.index {
17908 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17909 _ => {}
17910 }
17911 Ok(())
17912 }
17913}
17914
17915#[derive(Bundle)]
17919pub struct PaleOakChestBoatMetadataBundle {
17920 _marker: PaleOakChestBoat,
17921 parent: AbstractBoatMetadataBundle,
17922}
17923impl Default for PaleOakChestBoatMetadataBundle {
17924 fn default() -> Self {
17925 Self {
17926 _marker: PaleOakChestBoat,
17927 parent: AbstractBoatMetadataBundle {
17928 _marker: AbstractBoat,
17929 parent: AbstractVehicleMetadataBundle {
17930 _marker: AbstractVehicle,
17931 parent: AbstractEntityMetadataBundle {
17932 _marker: AbstractEntity,
17933 on_fire: OnFire(false),
17934 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
17935 sprinting: Sprinting(false),
17936 swimming: Swimming(false),
17937 currently_glowing: CurrentlyGlowing(false),
17938 invisible: Invisible(false),
17939 fall_flying: FallFlying(false),
17940 air_supply: AirSupply(Default::default()),
17941 custom_name: CustomName(Default::default()),
17942 custom_name_visible: CustomNameVisible(Default::default()),
17943 silent: Silent(Default::default()),
17944 no_gravity: NoGravity(Default::default()),
17945 pose: Pose::default(),
17946 ticks_frozen: TicksFrozen(Default::default()),
17947 },
17948 hurt: Hurt(0),
17949 hurtdir: Hurtdir(1),
17950 damage: Damage(0.0),
17951 },
17952 paddle_left: PaddleLeft(false),
17953 paddle_right: PaddleRight(false),
17954 bubble_time: BubbleTime(0),
17955 },
17956 }
17957 }
17958}
17959
17960#[derive(Component)]
17980pub struct SpruceBoat;
17981impl SpruceBoat {
17982 pub fn apply_metadata(
17983 entity: &mut bevy_ecs::system::EntityCommands,
17984 d: EntityDataItem,
17985 ) -> Result<(), UpdateMetadataError> {
17986 match d.index {
17987 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
17988 _ => {}
17989 }
17990 Ok(())
17991 }
17992}
17993
17994#[derive(Bundle)]
17998pub struct SpruceBoatMetadataBundle {
17999 _marker: SpruceBoat,
18000 parent: AbstractBoatMetadataBundle,
18001}
18002impl Default for SpruceBoatMetadataBundle {
18003 fn default() -> Self {
18004 Self {
18005 _marker: SpruceBoat,
18006 parent: AbstractBoatMetadataBundle {
18007 _marker: AbstractBoat,
18008 parent: AbstractVehicleMetadataBundle {
18009 _marker: AbstractVehicle,
18010 parent: AbstractEntityMetadataBundle {
18011 _marker: AbstractEntity,
18012 on_fire: OnFire(false),
18013 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18014 sprinting: Sprinting(false),
18015 swimming: Swimming(false),
18016 currently_glowing: CurrentlyGlowing(false),
18017 invisible: Invisible(false),
18018 fall_flying: FallFlying(false),
18019 air_supply: AirSupply(Default::default()),
18020 custom_name: CustomName(Default::default()),
18021 custom_name_visible: CustomNameVisible(Default::default()),
18022 silent: Silent(Default::default()),
18023 no_gravity: NoGravity(Default::default()),
18024 pose: Pose::default(),
18025 ticks_frozen: TicksFrozen(Default::default()),
18026 },
18027 hurt: Hurt(0),
18028 hurtdir: Hurtdir(1),
18029 damage: Damage(0.0),
18030 },
18031 paddle_left: PaddleLeft(false),
18032 paddle_right: PaddleRight(false),
18033 bubble_time: BubbleTime(0),
18034 },
18035 }
18036 }
18037}
18038
18039#[derive(Component)]
18059pub struct SpruceChestBoat;
18060impl SpruceChestBoat {
18061 pub fn apply_metadata(
18062 entity: &mut bevy_ecs::system::EntityCommands,
18063 d: EntityDataItem,
18064 ) -> Result<(), UpdateMetadataError> {
18065 match d.index {
18066 0..=13 => AbstractBoat::apply_metadata(entity, d)?,
18067 _ => {}
18068 }
18069 Ok(())
18070 }
18071}
18072
18073#[derive(Bundle)]
18077pub struct SpruceChestBoatMetadataBundle {
18078 _marker: SpruceChestBoat,
18079 parent: AbstractBoatMetadataBundle,
18080}
18081impl Default for SpruceChestBoatMetadataBundle {
18082 fn default() -> Self {
18083 Self {
18084 _marker: SpruceChestBoat,
18085 parent: AbstractBoatMetadataBundle {
18086 _marker: AbstractBoat,
18087 parent: AbstractVehicleMetadataBundle {
18088 _marker: AbstractVehicle,
18089 parent: AbstractEntityMetadataBundle {
18090 _marker: AbstractEntity,
18091 on_fire: OnFire(false),
18092 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18093 sprinting: Sprinting(false),
18094 swimming: Swimming(false),
18095 currently_glowing: CurrentlyGlowing(false),
18096 invisible: Invisible(false),
18097 fall_flying: FallFlying(false),
18098 air_supply: AirSupply(Default::default()),
18099 custom_name: CustomName(Default::default()),
18100 custom_name_visible: CustomNameVisible(Default::default()),
18101 silent: Silent(Default::default()),
18102 no_gravity: NoGravity(Default::default()),
18103 pose: Pose::default(),
18104 ticks_frozen: TicksFrozen(Default::default()),
18105 },
18106 hurt: Hurt(0),
18107 hurtdir: Hurtdir(1),
18108 damage: Damage(0.0),
18109 },
18110 paddle_left: PaddleLeft(false),
18111 paddle_right: PaddleRight(false),
18112 bubble_time: BubbleTime(0),
18113 },
18114 }
18115 }
18116}
18117
18118#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
18120pub struct CustomDisplayBlock(pub azalea_block::BlockState);
18121#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
18123pub struct DisplayOffset(pub i32);
18124#[derive(Component)]
18153pub struct AbstractMinecart;
18154impl AbstractMinecart {
18155 pub fn apply_metadata(
18156 entity: &mut bevy_ecs::system::EntityCommands,
18157 d: EntityDataItem,
18158 ) -> Result<(), UpdateMetadataError> {
18159 match d.index {
18160 0..=10 => AbstractVehicle::apply_metadata(entity, d)?,
18161 11 => {
18162 entity.insert(CustomDisplayBlock(d.value.into_optional_block_state()?));
18163 }
18164 12 => {
18165 entity.insert(DisplayOffset(d.value.into_int()?));
18166 }
18167 _ => {}
18168 }
18169 Ok(())
18170 }
18171}
18172
18173#[derive(Bundle)]
18177pub struct AbstractMinecartMetadataBundle {
18178 _marker: AbstractMinecart,
18179 parent: AbstractVehicleMetadataBundle,
18180 custom_display_block: CustomDisplayBlock,
18181 display_offset: DisplayOffset,
18182}
18183impl Default for AbstractMinecartMetadataBundle {
18184 fn default() -> Self {
18185 Self {
18186 _marker: AbstractMinecart,
18187 parent: AbstractVehicleMetadataBundle {
18188 _marker: AbstractVehicle,
18189 parent: AbstractEntityMetadataBundle {
18190 _marker: AbstractEntity,
18191 on_fire: OnFire(false),
18192 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18193 sprinting: Sprinting(false),
18194 swimming: Swimming(false),
18195 currently_glowing: CurrentlyGlowing(false),
18196 invisible: Invisible(false),
18197 fall_flying: FallFlying(false),
18198 air_supply: AirSupply(Default::default()),
18199 custom_name: CustomName(Default::default()),
18200 custom_name_visible: CustomNameVisible(Default::default()),
18201 silent: Silent(Default::default()),
18202 no_gravity: NoGravity(Default::default()),
18203 pose: Pose::default(),
18204 ticks_frozen: TicksFrozen(Default::default()),
18205 },
18206 hurt: Hurt(0),
18207 hurtdir: Hurtdir(1),
18208 damage: Damage(0.0),
18209 },
18210 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18211 display_offset: DisplayOffset(Default::default()),
18212 }
18213 }
18214}
18215
18216#[derive(Component)]
18236pub struct ChestMinecart;
18237impl ChestMinecart {
18238 pub fn apply_metadata(
18239 entity: &mut bevy_ecs::system::EntityCommands,
18240 d: EntityDataItem,
18241 ) -> Result<(), UpdateMetadataError> {
18242 match d.index {
18243 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18244 _ => {}
18245 }
18246 Ok(())
18247 }
18248}
18249
18250#[derive(Bundle)]
18254pub struct ChestMinecartMetadataBundle {
18255 _marker: ChestMinecart,
18256 parent: AbstractMinecartMetadataBundle,
18257}
18258impl Default for ChestMinecartMetadataBundle {
18259 fn default() -> Self {
18260 Self {
18261 _marker: ChestMinecart,
18262 parent: AbstractMinecartMetadataBundle {
18263 _marker: AbstractMinecart,
18264 parent: AbstractVehicleMetadataBundle {
18265 _marker: AbstractVehicle,
18266 parent: AbstractEntityMetadataBundle {
18267 _marker: AbstractEntity,
18268 on_fire: OnFire(false),
18269 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18270 sprinting: Sprinting(false),
18271 swimming: Swimming(false),
18272 currently_glowing: CurrentlyGlowing(false),
18273 invisible: Invisible(false),
18274 fall_flying: FallFlying(false),
18275 air_supply: AirSupply(Default::default()),
18276 custom_name: CustomName(Default::default()),
18277 custom_name_visible: CustomNameVisible(Default::default()),
18278 silent: Silent(Default::default()),
18279 no_gravity: NoGravity(Default::default()),
18280 pose: Pose::default(),
18281 ticks_frozen: TicksFrozen(Default::default()),
18282 },
18283 hurt: Hurt(0),
18284 hurtdir: Hurtdir(1),
18285 damage: Damage(0.0),
18286 },
18287 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18288 display_offset: DisplayOffset(Default::default()),
18289 },
18290 }
18291 }
18292}
18293
18294#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
18296pub struct CommandName(pub String);
18297#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
18299pub struct LastOutput(pub FormattedText);
18300#[derive(Component)]
18325pub struct CommandBlockMinecart;
18326impl CommandBlockMinecart {
18327 pub fn apply_metadata(
18328 entity: &mut bevy_ecs::system::EntityCommands,
18329 d: EntityDataItem,
18330 ) -> Result<(), UpdateMetadataError> {
18331 match d.index {
18332 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18333 13 => {
18334 entity.insert(CommandName(d.value.into_string()?));
18335 }
18336 14 => {
18337 entity.insert(LastOutput(d.value.into_formatted_text()?));
18338 }
18339 _ => {}
18340 }
18341 Ok(())
18342 }
18343}
18344
18345#[derive(Bundle)]
18349pub struct CommandBlockMinecartMetadataBundle {
18350 _marker: CommandBlockMinecart,
18351 parent: AbstractMinecartMetadataBundle,
18352 command_name: CommandName,
18353 last_output: LastOutput,
18354}
18355impl Default for CommandBlockMinecartMetadataBundle {
18356 fn default() -> Self {
18357 Self {
18358 _marker: CommandBlockMinecart,
18359 parent: AbstractMinecartMetadataBundle {
18360 _marker: AbstractMinecart,
18361 parent: AbstractVehicleMetadataBundle {
18362 _marker: AbstractVehicle,
18363 parent: AbstractEntityMetadataBundle {
18364 _marker: AbstractEntity,
18365 on_fire: OnFire(false),
18366 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18367 sprinting: Sprinting(false),
18368 swimming: Swimming(false),
18369 currently_glowing: CurrentlyGlowing(false),
18370 invisible: Invisible(false),
18371 fall_flying: FallFlying(false),
18372 air_supply: AirSupply(Default::default()),
18373 custom_name: CustomName(Default::default()),
18374 custom_name_visible: CustomNameVisible(Default::default()),
18375 silent: Silent(Default::default()),
18376 no_gravity: NoGravity(Default::default()),
18377 pose: Pose::default(),
18378 ticks_frozen: TicksFrozen(Default::default()),
18379 },
18380 hurt: Hurt(0),
18381 hurtdir: Hurtdir(1),
18382 damage: Damage(0.0),
18383 },
18384 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18385 display_offset: DisplayOffset(Default::default()),
18386 },
18387 command_name: CommandName("".to_owned()),
18388 last_output: LastOutput(Default::default()),
18389 }
18390 }
18391}
18392
18393#[derive(Component, Deref, DerefMut, Clone, PartialEq)]
18395pub struct Fuel(pub bool);
18396#[derive(Component)]
18419pub struct FurnaceMinecart;
18420impl FurnaceMinecart {
18421 pub fn apply_metadata(
18422 entity: &mut bevy_ecs::system::EntityCommands,
18423 d: EntityDataItem,
18424 ) -> Result<(), UpdateMetadataError> {
18425 match d.index {
18426 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18427 13 => {
18428 entity.insert(Fuel(d.value.into_boolean()?));
18429 }
18430 _ => {}
18431 }
18432 Ok(())
18433 }
18434}
18435
18436#[derive(Bundle)]
18440pub struct FurnaceMinecartMetadataBundle {
18441 _marker: FurnaceMinecart,
18442 parent: AbstractMinecartMetadataBundle,
18443 fuel: Fuel,
18444}
18445impl Default for FurnaceMinecartMetadataBundle {
18446 fn default() -> Self {
18447 Self {
18448 _marker: FurnaceMinecart,
18449 parent: AbstractMinecartMetadataBundle {
18450 _marker: AbstractMinecart,
18451 parent: AbstractVehicleMetadataBundle {
18452 _marker: AbstractVehicle,
18453 parent: AbstractEntityMetadataBundle {
18454 _marker: AbstractEntity,
18455 on_fire: OnFire(false),
18456 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18457 sprinting: Sprinting(false),
18458 swimming: Swimming(false),
18459 currently_glowing: CurrentlyGlowing(false),
18460 invisible: Invisible(false),
18461 fall_flying: FallFlying(false),
18462 air_supply: AirSupply(Default::default()),
18463 custom_name: CustomName(Default::default()),
18464 custom_name_visible: CustomNameVisible(Default::default()),
18465 silent: Silent(Default::default()),
18466 no_gravity: NoGravity(Default::default()),
18467 pose: Pose::default(),
18468 ticks_frozen: TicksFrozen(Default::default()),
18469 },
18470 hurt: Hurt(0),
18471 hurtdir: Hurtdir(1),
18472 damage: Damage(0.0),
18473 },
18474 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18475 display_offset: DisplayOffset(Default::default()),
18476 },
18477 fuel: Fuel(false),
18478 }
18479 }
18480}
18481
18482#[derive(Component)]
18502pub struct HopperMinecart;
18503impl HopperMinecart {
18504 pub fn apply_metadata(
18505 entity: &mut bevy_ecs::system::EntityCommands,
18506 d: EntityDataItem,
18507 ) -> Result<(), UpdateMetadataError> {
18508 match d.index {
18509 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18510 _ => {}
18511 }
18512 Ok(())
18513 }
18514}
18515
18516#[derive(Bundle)]
18520pub struct HopperMinecartMetadataBundle {
18521 _marker: HopperMinecart,
18522 parent: AbstractMinecartMetadataBundle,
18523}
18524impl Default for HopperMinecartMetadataBundle {
18525 fn default() -> Self {
18526 Self {
18527 _marker: HopperMinecart,
18528 parent: AbstractMinecartMetadataBundle {
18529 _marker: AbstractMinecart,
18530 parent: AbstractVehicleMetadataBundle {
18531 _marker: AbstractVehicle,
18532 parent: AbstractEntityMetadataBundle {
18533 _marker: AbstractEntity,
18534 on_fire: OnFire(false),
18535 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18536 sprinting: Sprinting(false),
18537 swimming: Swimming(false),
18538 currently_glowing: CurrentlyGlowing(false),
18539 invisible: Invisible(false),
18540 fall_flying: FallFlying(false),
18541 air_supply: AirSupply(Default::default()),
18542 custom_name: CustomName(Default::default()),
18543 custom_name_visible: CustomNameVisible(Default::default()),
18544 silent: Silent(Default::default()),
18545 no_gravity: NoGravity(Default::default()),
18546 pose: Pose::default(),
18547 ticks_frozen: TicksFrozen(Default::default()),
18548 },
18549 hurt: Hurt(0),
18550 hurtdir: Hurtdir(1),
18551 damage: Damage(0.0),
18552 },
18553 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18554 display_offset: DisplayOffset(Default::default()),
18555 },
18556 }
18557 }
18558}
18559
18560#[derive(Component)]
18580pub struct Minecart;
18581impl Minecart {
18582 pub fn apply_metadata(
18583 entity: &mut bevy_ecs::system::EntityCommands,
18584 d: EntityDataItem,
18585 ) -> Result<(), UpdateMetadataError> {
18586 match d.index {
18587 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18588 _ => {}
18589 }
18590 Ok(())
18591 }
18592}
18593
18594#[derive(Bundle)]
18598pub struct MinecartMetadataBundle {
18599 _marker: Minecart,
18600 parent: AbstractMinecartMetadataBundle,
18601}
18602impl Default for MinecartMetadataBundle {
18603 fn default() -> Self {
18604 Self {
18605 _marker: Minecart,
18606 parent: AbstractMinecartMetadataBundle {
18607 _marker: AbstractMinecart,
18608 parent: AbstractVehicleMetadataBundle {
18609 _marker: AbstractVehicle,
18610 parent: AbstractEntityMetadataBundle {
18611 _marker: AbstractEntity,
18612 on_fire: OnFire(false),
18613 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18614 sprinting: Sprinting(false),
18615 swimming: Swimming(false),
18616 currently_glowing: CurrentlyGlowing(false),
18617 invisible: Invisible(false),
18618 fall_flying: FallFlying(false),
18619 air_supply: AirSupply(Default::default()),
18620 custom_name: CustomName(Default::default()),
18621 custom_name_visible: CustomNameVisible(Default::default()),
18622 silent: Silent(Default::default()),
18623 no_gravity: NoGravity(Default::default()),
18624 pose: Pose::default(),
18625 ticks_frozen: TicksFrozen(Default::default()),
18626 },
18627 hurt: Hurt(0),
18628 hurtdir: Hurtdir(1),
18629 damage: Damage(0.0),
18630 },
18631 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18632 display_offset: DisplayOffset(Default::default()),
18633 },
18634 }
18635 }
18636}
18637
18638#[derive(Component)]
18658pub struct SpawnerMinecart;
18659impl SpawnerMinecart {
18660 pub fn apply_metadata(
18661 entity: &mut bevy_ecs::system::EntityCommands,
18662 d: EntityDataItem,
18663 ) -> Result<(), UpdateMetadataError> {
18664 match d.index {
18665 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18666 _ => {}
18667 }
18668 Ok(())
18669 }
18670}
18671
18672#[derive(Bundle)]
18676pub struct SpawnerMinecartMetadataBundle {
18677 _marker: SpawnerMinecart,
18678 parent: AbstractMinecartMetadataBundle,
18679}
18680impl Default for SpawnerMinecartMetadataBundle {
18681 fn default() -> Self {
18682 Self {
18683 _marker: SpawnerMinecart,
18684 parent: AbstractMinecartMetadataBundle {
18685 _marker: AbstractMinecart,
18686 parent: AbstractVehicleMetadataBundle {
18687 _marker: AbstractVehicle,
18688 parent: AbstractEntityMetadataBundle {
18689 _marker: AbstractEntity,
18690 on_fire: OnFire(false),
18691 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18692 sprinting: Sprinting(false),
18693 swimming: Swimming(false),
18694 currently_glowing: CurrentlyGlowing(false),
18695 invisible: Invisible(false),
18696 fall_flying: FallFlying(false),
18697 air_supply: AirSupply(Default::default()),
18698 custom_name: CustomName(Default::default()),
18699 custom_name_visible: CustomNameVisible(Default::default()),
18700 silent: Silent(Default::default()),
18701 no_gravity: NoGravity(Default::default()),
18702 pose: Pose::default(),
18703 ticks_frozen: TicksFrozen(Default::default()),
18704 },
18705 hurt: Hurt(0),
18706 hurtdir: Hurtdir(1),
18707 damage: Damage(0.0),
18708 },
18709 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18710 display_offset: DisplayOffset(Default::default()),
18711 },
18712 }
18713 }
18714}
18715
18716#[derive(Component)]
18736pub struct TntMinecart;
18737impl TntMinecart {
18738 pub fn apply_metadata(
18739 entity: &mut bevy_ecs::system::EntityCommands,
18740 d: EntityDataItem,
18741 ) -> Result<(), UpdateMetadataError> {
18742 match d.index {
18743 0..=12 => AbstractMinecart::apply_metadata(entity, d)?,
18744 _ => {}
18745 }
18746 Ok(())
18747 }
18748}
18749
18750#[derive(Bundle)]
18754pub struct TntMinecartMetadataBundle {
18755 _marker: TntMinecart,
18756 parent: AbstractMinecartMetadataBundle,
18757}
18758impl Default for TntMinecartMetadataBundle {
18759 fn default() -> Self {
18760 Self {
18761 _marker: TntMinecart,
18762 parent: AbstractMinecartMetadataBundle {
18763 _marker: AbstractMinecart,
18764 parent: AbstractVehicleMetadataBundle {
18765 _marker: AbstractVehicle,
18766 parent: AbstractEntityMetadataBundle {
18767 _marker: AbstractEntity,
18768 on_fire: OnFire(false),
18769 abstract_entity_shift_key_down: AbstractEntityShiftKeyDown(false),
18770 sprinting: Sprinting(false),
18771 swimming: Swimming(false),
18772 currently_glowing: CurrentlyGlowing(false),
18773 invisible: Invisible(false),
18774 fall_flying: FallFlying(false),
18775 air_supply: AirSupply(Default::default()),
18776 custom_name: CustomName(Default::default()),
18777 custom_name_visible: CustomNameVisible(Default::default()),
18778 silent: Silent(Default::default()),
18779 no_gravity: NoGravity(Default::default()),
18780 pose: Pose::default(),
18781 ticks_frozen: TicksFrozen(Default::default()),
18782 },
18783 hurt: Hurt(0),
18784 hurtdir: Hurtdir(1),
18785 damage: Damage(0.0),
18786 },
18787 custom_display_block: CustomDisplayBlock(azalea_block::BlockState::AIR),
18788 display_offset: DisplayOffset(Default::default()),
18789 },
18790 }
18791 }
18792}
18793
18794pub fn apply_metadata(
18795 entity: &mut bevy_ecs::system::EntityCommands,
18796 entity_kind: EntityKind,
18797 items: Vec<EntityDataItem>,
18798) -> Result<(), UpdateMetadataError> {
18799 match entity_kind {
18800 EntityKind::AcaciaBoat => {
18801 for d in items {
18802 AcaciaBoat::apply_metadata(entity, d)?;
18803 }
18804 }
18805 EntityKind::AcaciaChestBoat => {
18806 for d in items {
18807 AcaciaChestBoat::apply_metadata(entity, d)?;
18808 }
18809 }
18810 EntityKind::Allay => {
18811 for d in items {
18812 Allay::apply_metadata(entity, d)?;
18813 }
18814 }
18815 EntityKind::AreaEffectCloud => {
18816 for d in items {
18817 AreaEffectCloud::apply_metadata(entity, d)?;
18818 }
18819 }
18820 EntityKind::Armadillo => {
18821 for d in items {
18822 Armadillo::apply_metadata(entity, d)?;
18823 }
18824 }
18825 EntityKind::ArmorStand => {
18826 for d in items {
18827 ArmorStand::apply_metadata(entity, d)?;
18828 }
18829 }
18830 EntityKind::Arrow => {
18831 for d in items {
18832 Arrow::apply_metadata(entity, d)?;
18833 }
18834 }
18835 EntityKind::Axolotl => {
18836 for d in items {
18837 Axolotl::apply_metadata(entity, d)?;
18838 }
18839 }
18840 EntityKind::BambooChestRaft => {
18841 for d in items {
18842 BambooChestRaft::apply_metadata(entity, d)?;
18843 }
18844 }
18845 EntityKind::BambooRaft => {
18846 for d in items {
18847 BambooRaft::apply_metadata(entity, d)?;
18848 }
18849 }
18850 EntityKind::Bat => {
18851 for d in items {
18852 Bat::apply_metadata(entity, d)?;
18853 }
18854 }
18855 EntityKind::Bee => {
18856 for d in items {
18857 Bee::apply_metadata(entity, d)?;
18858 }
18859 }
18860 EntityKind::BirchBoat => {
18861 for d in items {
18862 BirchBoat::apply_metadata(entity, d)?;
18863 }
18864 }
18865 EntityKind::BirchChestBoat => {
18866 for d in items {
18867 BirchChestBoat::apply_metadata(entity, d)?;
18868 }
18869 }
18870 EntityKind::Blaze => {
18871 for d in items {
18872 Blaze::apply_metadata(entity, d)?;
18873 }
18874 }
18875 EntityKind::BlockDisplay => {
18876 for d in items {
18877 BlockDisplay::apply_metadata(entity, d)?;
18878 }
18879 }
18880 EntityKind::Bogged => {
18881 for d in items {
18882 Bogged::apply_metadata(entity, d)?;
18883 }
18884 }
18885 EntityKind::Breeze => {
18886 for d in items {
18887 Breeze::apply_metadata(entity, d)?;
18888 }
18889 }
18890 EntityKind::BreezeWindCharge => {
18891 for d in items {
18892 BreezeWindCharge::apply_metadata(entity, d)?;
18893 }
18894 }
18895 EntityKind::Camel => {
18896 for d in items {
18897 Camel::apply_metadata(entity, d)?;
18898 }
18899 }
18900 EntityKind::CamelHusk => {
18901 for d in items {
18902 CamelHusk::apply_metadata(entity, d)?;
18903 }
18904 }
18905 EntityKind::Cat => {
18906 for d in items {
18907 Cat::apply_metadata(entity, d)?;
18908 }
18909 }
18910 EntityKind::CaveSpider => {
18911 for d in items {
18912 CaveSpider::apply_metadata(entity, d)?;
18913 }
18914 }
18915 EntityKind::CherryBoat => {
18916 for d in items {
18917 CherryBoat::apply_metadata(entity, d)?;
18918 }
18919 }
18920 EntityKind::CherryChestBoat => {
18921 for d in items {
18922 CherryChestBoat::apply_metadata(entity, d)?;
18923 }
18924 }
18925 EntityKind::ChestMinecart => {
18926 for d in items {
18927 ChestMinecart::apply_metadata(entity, d)?;
18928 }
18929 }
18930 EntityKind::Chicken => {
18931 for d in items {
18932 Chicken::apply_metadata(entity, d)?;
18933 }
18934 }
18935 EntityKind::Cod => {
18936 for d in items {
18937 Cod::apply_metadata(entity, d)?;
18938 }
18939 }
18940 EntityKind::CommandBlockMinecart => {
18941 for d in items {
18942 CommandBlockMinecart::apply_metadata(entity, d)?;
18943 }
18944 }
18945 EntityKind::CopperGolem => {
18946 for d in items {
18947 CopperGolem::apply_metadata(entity, d)?;
18948 }
18949 }
18950 EntityKind::Cow => {
18951 for d in items {
18952 Cow::apply_metadata(entity, d)?;
18953 }
18954 }
18955 EntityKind::Creaking => {
18956 for d in items {
18957 Creaking::apply_metadata(entity, d)?;
18958 }
18959 }
18960 EntityKind::Creeper => {
18961 for d in items {
18962 Creeper::apply_metadata(entity, d)?;
18963 }
18964 }
18965 EntityKind::DarkOakBoat => {
18966 for d in items {
18967 DarkOakBoat::apply_metadata(entity, d)?;
18968 }
18969 }
18970 EntityKind::DarkOakChestBoat => {
18971 for d in items {
18972 DarkOakChestBoat::apply_metadata(entity, d)?;
18973 }
18974 }
18975 EntityKind::Dolphin => {
18976 for d in items {
18977 Dolphin::apply_metadata(entity, d)?;
18978 }
18979 }
18980 EntityKind::Donkey => {
18981 for d in items {
18982 Donkey::apply_metadata(entity, d)?;
18983 }
18984 }
18985 EntityKind::DragonFireball => {
18986 for d in items {
18987 DragonFireball::apply_metadata(entity, d)?;
18988 }
18989 }
18990 EntityKind::Drowned => {
18991 for d in items {
18992 Drowned::apply_metadata(entity, d)?;
18993 }
18994 }
18995 EntityKind::Egg => {
18996 for d in items {
18997 Egg::apply_metadata(entity, d)?;
18998 }
18999 }
19000 EntityKind::ElderGuardian => {
19001 for d in items {
19002 ElderGuardian::apply_metadata(entity, d)?;
19003 }
19004 }
19005 EntityKind::EndCrystal => {
19006 for d in items {
19007 EndCrystal::apply_metadata(entity, d)?;
19008 }
19009 }
19010 EntityKind::EnderDragon => {
19011 for d in items {
19012 EnderDragon::apply_metadata(entity, d)?;
19013 }
19014 }
19015 EntityKind::EnderPearl => {
19016 for d in items {
19017 EnderPearl::apply_metadata(entity, d)?;
19018 }
19019 }
19020 EntityKind::Enderman => {
19021 for d in items {
19022 Enderman::apply_metadata(entity, d)?;
19023 }
19024 }
19025 EntityKind::Endermite => {
19026 for d in items {
19027 Endermite::apply_metadata(entity, d)?;
19028 }
19029 }
19030 EntityKind::Evoker => {
19031 for d in items {
19032 Evoker::apply_metadata(entity, d)?;
19033 }
19034 }
19035 EntityKind::EvokerFangs => {
19036 for d in items {
19037 EvokerFangs::apply_metadata(entity, d)?;
19038 }
19039 }
19040 EntityKind::ExperienceBottle => {
19041 for d in items {
19042 ExperienceBottle::apply_metadata(entity, d)?;
19043 }
19044 }
19045 EntityKind::ExperienceOrb => {
19046 for d in items {
19047 ExperienceOrb::apply_metadata(entity, d)?;
19048 }
19049 }
19050 EntityKind::EyeOfEnder => {
19051 for d in items {
19052 EyeOfEnder::apply_metadata(entity, d)?;
19053 }
19054 }
19055 EntityKind::FallingBlock => {
19056 for d in items {
19057 FallingBlock::apply_metadata(entity, d)?;
19058 }
19059 }
19060 EntityKind::Fireball => {
19061 for d in items {
19062 Fireball::apply_metadata(entity, d)?;
19063 }
19064 }
19065 EntityKind::FireworkRocket => {
19066 for d in items {
19067 FireworkRocket::apply_metadata(entity, d)?;
19068 }
19069 }
19070 EntityKind::FishingBobber => {
19071 for d in items {
19072 FishingBobber::apply_metadata(entity, d)?;
19073 }
19074 }
19075 EntityKind::Fox => {
19076 for d in items {
19077 Fox::apply_metadata(entity, d)?;
19078 }
19079 }
19080 EntityKind::Frog => {
19081 for d in items {
19082 Frog::apply_metadata(entity, d)?;
19083 }
19084 }
19085 EntityKind::FurnaceMinecart => {
19086 for d in items {
19087 FurnaceMinecart::apply_metadata(entity, d)?;
19088 }
19089 }
19090 EntityKind::Ghast => {
19091 for d in items {
19092 Ghast::apply_metadata(entity, d)?;
19093 }
19094 }
19095 EntityKind::Giant => {
19096 for d in items {
19097 Giant::apply_metadata(entity, d)?;
19098 }
19099 }
19100 EntityKind::GlowItemFrame => {
19101 for d in items {
19102 GlowItemFrame::apply_metadata(entity, d)?;
19103 }
19104 }
19105 EntityKind::GlowSquid => {
19106 for d in items {
19107 GlowSquid::apply_metadata(entity, d)?;
19108 }
19109 }
19110 EntityKind::Goat => {
19111 for d in items {
19112 Goat::apply_metadata(entity, d)?;
19113 }
19114 }
19115 EntityKind::Guardian => {
19116 for d in items {
19117 Guardian::apply_metadata(entity, d)?;
19118 }
19119 }
19120 EntityKind::HappyGhast => {
19121 for d in items {
19122 HappyGhast::apply_metadata(entity, d)?;
19123 }
19124 }
19125 EntityKind::Hoglin => {
19126 for d in items {
19127 Hoglin::apply_metadata(entity, d)?;
19128 }
19129 }
19130 EntityKind::HopperMinecart => {
19131 for d in items {
19132 HopperMinecart::apply_metadata(entity, d)?;
19133 }
19134 }
19135 EntityKind::Horse => {
19136 for d in items {
19137 Horse::apply_metadata(entity, d)?;
19138 }
19139 }
19140 EntityKind::Husk => {
19141 for d in items {
19142 Husk::apply_metadata(entity, d)?;
19143 }
19144 }
19145 EntityKind::Illusioner => {
19146 for d in items {
19147 Illusioner::apply_metadata(entity, d)?;
19148 }
19149 }
19150 EntityKind::Interaction => {
19151 for d in items {
19152 Interaction::apply_metadata(entity, d)?;
19153 }
19154 }
19155 EntityKind::IronGolem => {
19156 for d in items {
19157 IronGolem::apply_metadata(entity, d)?;
19158 }
19159 }
19160 EntityKind::Item => {
19161 for d in items {
19162 Item::apply_metadata(entity, d)?;
19163 }
19164 }
19165 EntityKind::ItemDisplay => {
19166 for d in items {
19167 ItemDisplay::apply_metadata(entity, d)?;
19168 }
19169 }
19170 EntityKind::ItemFrame => {
19171 for d in items {
19172 ItemFrame::apply_metadata(entity, d)?;
19173 }
19174 }
19175 EntityKind::JungleBoat => {
19176 for d in items {
19177 JungleBoat::apply_metadata(entity, d)?;
19178 }
19179 }
19180 EntityKind::JungleChestBoat => {
19181 for d in items {
19182 JungleChestBoat::apply_metadata(entity, d)?;
19183 }
19184 }
19185 EntityKind::LeashKnot => {
19186 for d in items {
19187 LeashKnot::apply_metadata(entity, d)?;
19188 }
19189 }
19190 EntityKind::LightningBolt => {
19191 for d in items {
19192 LightningBolt::apply_metadata(entity, d)?;
19193 }
19194 }
19195 EntityKind::LingeringPotion => {
19196 for d in items {
19197 LingeringPotion::apply_metadata(entity, d)?;
19198 }
19199 }
19200 EntityKind::Llama => {
19201 for d in items {
19202 Llama::apply_metadata(entity, d)?;
19203 }
19204 }
19205 EntityKind::LlamaSpit => {
19206 for d in items {
19207 LlamaSpit::apply_metadata(entity, d)?;
19208 }
19209 }
19210 EntityKind::MagmaCube => {
19211 for d in items {
19212 MagmaCube::apply_metadata(entity, d)?;
19213 }
19214 }
19215 EntityKind::MangroveBoat => {
19216 for d in items {
19217 MangroveBoat::apply_metadata(entity, d)?;
19218 }
19219 }
19220 EntityKind::MangroveChestBoat => {
19221 for d in items {
19222 MangroveChestBoat::apply_metadata(entity, d)?;
19223 }
19224 }
19225 EntityKind::Mannequin => {
19226 for d in items {
19227 Mannequin::apply_metadata(entity, d)?;
19228 }
19229 }
19230 EntityKind::Marker => {
19231 for d in items {
19232 Marker::apply_metadata(entity, d)?;
19233 }
19234 }
19235 EntityKind::Minecart => {
19236 for d in items {
19237 Minecart::apply_metadata(entity, d)?;
19238 }
19239 }
19240 EntityKind::Mooshroom => {
19241 for d in items {
19242 Mooshroom::apply_metadata(entity, d)?;
19243 }
19244 }
19245 EntityKind::Mule => {
19246 for d in items {
19247 Mule::apply_metadata(entity, d)?;
19248 }
19249 }
19250 EntityKind::Nautilus => {
19251 for d in items {
19252 Nautilus::apply_metadata(entity, d)?;
19253 }
19254 }
19255 EntityKind::OakBoat => {
19256 for d in items {
19257 OakBoat::apply_metadata(entity, d)?;
19258 }
19259 }
19260 EntityKind::OakChestBoat => {
19261 for d in items {
19262 OakChestBoat::apply_metadata(entity, d)?;
19263 }
19264 }
19265 EntityKind::Ocelot => {
19266 for d in items {
19267 Ocelot::apply_metadata(entity, d)?;
19268 }
19269 }
19270 EntityKind::OminousItemSpawner => {
19271 for d in items {
19272 OminousItemSpawner::apply_metadata(entity, d)?;
19273 }
19274 }
19275 EntityKind::Painting => {
19276 for d in items {
19277 Painting::apply_metadata(entity, d)?;
19278 }
19279 }
19280 EntityKind::PaleOakBoat => {
19281 for d in items {
19282 PaleOakBoat::apply_metadata(entity, d)?;
19283 }
19284 }
19285 EntityKind::PaleOakChestBoat => {
19286 for d in items {
19287 PaleOakChestBoat::apply_metadata(entity, d)?;
19288 }
19289 }
19290 EntityKind::Panda => {
19291 for d in items {
19292 Panda::apply_metadata(entity, d)?;
19293 }
19294 }
19295 EntityKind::Parched => {
19296 for d in items {
19297 Parched::apply_metadata(entity, d)?;
19298 }
19299 }
19300 EntityKind::Parrot => {
19301 for d in items {
19302 Parrot::apply_metadata(entity, d)?;
19303 }
19304 }
19305 EntityKind::Phantom => {
19306 for d in items {
19307 Phantom::apply_metadata(entity, d)?;
19308 }
19309 }
19310 EntityKind::Pig => {
19311 for d in items {
19312 Pig::apply_metadata(entity, d)?;
19313 }
19314 }
19315 EntityKind::Piglin => {
19316 for d in items {
19317 Piglin::apply_metadata(entity, d)?;
19318 }
19319 }
19320 EntityKind::PiglinBrute => {
19321 for d in items {
19322 PiglinBrute::apply_metadata(entity, d)?;
19323 }
19324 }
19325 EntityKind::Pillager => {
19326 for d in items {
19327 Pillager::apply_metadata(entity, d)?;
19328 }
19329 }
19330 EntityKind::Player => {
19331 for d in items {
19332 Player::apply_metadata(entity, d)?;
19333 }
19334 }
19335 EntityKind::PolarBear => {
19336 for d in items {
19337 PolarBear::apply_metadata(entity, d)?;
19338 }
19339 }
19340 EntityKind::Pufferfish => {
19341 for d in items {
19342 Pufferfish::apply_metadata(entity, d)?;
19343 }
19344 }
19345 EntityKind::Rabbit => {
19346 for d in items {
19347 Rabbit::apply_metadata(entity, d)?;
19348 }
19349 }
19350 EntityKind::Ravager => {
19351 for d in items {
19352 Ravager::apply_metadata(entity, d)?;
19353 }
19354 }
19355 EntityKind::Salmon => {
19356 for d in items {
19357 Salmon::apply_metadata(entity, d)?;
19358 }
19359 }
19360 EntityKind::Sheep => {
19361 for d in items {
19362 Sheep::apply_metadata(entity, d)?;
19363 }
19364 }
19365 EntityKind::Shulker => {
19366 for d in items {
19367 Shulker::apply_metadata(entity, d)?;
19368 }
19369 }
19370 EntityKind::ShulkerBullet => {
19371 for d in items {
19372 ShulkerBullet::apply_metadata(entity, d)?;
19373 }
19374 }
19375 EntityKind::Silverfish => {
19376 for d in items {
19377 Silverfish::apply_metadata(entity, d)?;
19378 }
19379 }
19380 EntityKind::Skeleton => {
19381 for d in items {
19382 Skeleton::apply_metadata(entity, d)?;
19383 }
19384 }
19385 EntityKind::SkeletonHorse => {
19386 for d in items {
19387 SkeletonHorse::apply_metadata(entity, d)?;
19388 }
19389 }
19390 EntityKind::Slime => {
19391 for d in items {
19392 Slime::apply_metadata(entity, d)?;
19393 }
19394 }
19395 EntityKind::SmallFireball => {
19396 for d in items {
19397 SmallFireball::apply_metadata(entity, d)?;
19398 }
19399 }
19400 EntityKind::Sniffer => {
19401 for d in items {
19402 Sniffer::apply_metadata(entity, d)?;
19403 }
19404 }
19405 EntityKind::SnowGolem => {
19406 for d in items {
19407 SnowGolem::apply_metadata(entity, d)?;
19408 }
19409 }
19410 EntityKind::Snowball => {
19411 for d in items {
19412 Snowball::apply_metadata(entity, d)?;
19413 }
19414 }
19415 EntityKind::SpawnerMinecart => {
19416 for d in items {
19417 SpawnerMinecart::apply_metadata(entity, d)?;
19418 }
19419 }
19420 EntityKind::SpectralArrow => {
19421 for d in items {
19422 SpectralArrow::apply_metadata(entity, d)?;
19423 }
19424 }
19425 EntityKind::Spider => {
19426 for d in items {
19427 Spider::apply_metadata(entity, d)?;
19428 }
19429 }
19430 EntityKind::SplashPotion => {
19431 for d in items {
19432 SplashPotion::apply_metadata(entity, d)?;
19433 }
19434 }
19435 EntityKind::SpruceBoat => {
19436 for d in items {
19437 SpruceBoat::apply_metadata(entity, d)?;
19438 }
19439 }
19440 EntityKind::SpruceChestBoat => {
19441 for d in items {
19442 SpruceChestBoat::apply_metadata(entity, d)?;
19443 }
19444 }
19445 EntityKind::Squid => {
19446 for d in items {
19447 Squid::apply_metadata(entity, d)?;
19448 }
19449 }
19450 EntityKind::Stray => {
19451 for d in items {
19452 Stray::apply_metadata(entity, d)?;
19453 }
19454 }
19455 EntityKind::Strider => {
19456 for d in items {
19457 Strider::apply_metadata(entity, d)?;
19458 }
19459 }
19460 EntityKind::Tadpole => {
19461 for d in items {
19462 Tadpole::apply_metadata(entity, d)?;
19463 }
19464 }
19465 EntityKind::TextDisplay => {
19466 for d in items {
19467 TextDisplay::apply_metadata(entity, d)?;
19468 }
19469 }
19470 EntityKind::Tnt => {
19471 for d in items {
19472 Tnt::apply_metadata(entity, d)?;
19473 }
19474 }
19475 EntityKind::TntMinecart => {
19476 for d in items {
19477 TntMinecart::apply_metadata(entity, d)?;
19478 }
19479 }
19480 EntityKind::TraderLlama => {
19481 for d in items {
19482 TraderLlama::apply_metadata(entity, d)?;
19483 }
19484 }
19485 EntityKind::Trident => {
19486 for d in items {
19487 Trident::apply_metadata(entity, d)?;
19488 }
19489 }
19490 EntityKind::TropicalFish => {
19491 for d in items {
19492 TropicalFish::apply_metadata(entity, d)?;
19493 }
19494 }
19495 EntityKind::Turtle => {
19496 for d in items {
19497 Turtle::apply_metadata(entity, d)?;
19498 }
19499 }
19500 EntityKind::Vex => {
19501 for d in items {
19502 Vex::apply_metadata(entity, d)?;
19503 }
19504 }
19505 EntityKind::Villager => {
19506 for d in items {
19507 Villager::apply_metadata(entity, d)?;
19508 }
19509 }
19510 EntityKind::Vindicator => {
19511 for d in items {
19512 Vindicator::apply_metadata(entity, d)?;
19513 }
19514 }
19515 EntityKind::WanderingTrader => {
19516 for d in items {
19517 WanderingTrader::apply_metadata(entity, d)?;
19518 }
19519 }
19520 EntityKind::Warden => {
19521 for d in items {
19522 Warden::apply_metadata(entity, d)?;
19523 }
19524 }
19525 EntityKind::WindCharge => {
19526 for d in items {
19527 WindCharge::apply_metadata(entity, d)?;
19528 }
19529 }
19530 EntityKind::Witch => {
19531 for d in items {
19532 Witch::apply_metadata(entity, d)?;
19533 }
19534 }
19535 EntityKind::Wither => {
19536 for d in items {
19537 Wither::apply_metadata(entity, d)?;
19538 }
19539 }
19540 EntityKind::WitherSkeleton => {
19541 for d in items {
19542 WitherSkeleton::apply_metadata(entity, d)?;
19543 }
19544 }
19545 EntityKind::WitherSkull => {
19546 for d in items {
19547 WitherSkull::apply_metadata(entity, d)?;
19548 }
19549 }
19550 EntityKind::Wolf => {
19551 for d in items {
19552 Wolf::apply_metadata(entity, d)?;
19553 }
19554 }
19555 EntityKind::Zoglin => {
19556 for d in items {
19557 Zoglin::apply_metadata(entity, d)?;
19558 }
19559 }
19560 EntityKind::Zombie => {
19561 for d in items {
19562 Zombie::apply_metadata(entity, d)?;
19563 }
19564 }
19565 EntityKind::ZombieHorse => {
19566 for d in items {
19567 ZombieHorse::apply_metadata(entity, d)?;
19568 }
19569 }
19570 EntityKind::ZombieNautilus => {
19571 for d in items {
19572 ZombieNautilus::apply_metadata(entity, d)?;
19573 }
19574 }
19575 EntityKind::ZombieVillager => {
19576 for d in items {
19577 ZombieVillager::apply_metadata(entity, d)?;
19578 }
19579 }
19580 EntityKind::ZombifiedPiglin => {
19581 for d in items {
19582 ZombifiedPiglin::apply_metadata(entity, d)?;
19583 }
19584 }
19585 }
19586 Ok(())
19587}
19588
19589pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: EntityKind) {
19590 match kind {
19591 EntityKind::AcaciaBoat => {
19592 entity.insert(AcaciaBoatMetadataBundle::default());
19593 }
19594 EntityKind::AcaciaChestBoat => {
19595 entity.insert(AcaciaChestBoatMetadataBundle::default());
19596 }
19597 EntityKind::Allay => {
19598 entity.insert(AllayMetadataBundle::default());
19599 }
19600 EntityKind::AreaEffectCloud => {
19601 entity.insert(AreaEffectCloudMetadataBundle::default());
19602 }
19603 EntityKind::Armadillo => {
19604 entity.insert(ArmadilloMetadataBundle::default());
19605 }
19606 EntityKind::ArmorStand => {
19607 entity.insert(ArmorStandMetadataBundle::default());
19608 }
19609 EntityKind::Arrow => {
19610 entity.insert(ArrowMetadataBundle::default());
19611 }
19612 EntityKind::Axolotl => {
19613 entity.insert(AxolotlMetadataBundle::default());
19614 }
19615 EntityKind::BambooChestRaft => {
19616 entity.insert(BambooChestRaftMetadataBundle::default());
19617 }
19618 EntityKind::BambooRaft => {
19619 entity.insert(BambooRaftMetadataBundle::default());
19620 }
19621 EntityKind::Bat => {
19622 entity.insert(BatMetadataBundle::default());
19623 }
19624 EntityKind::Bee => {
19625 entity.insert(BeeMetadataBundle::default());
19626 }
19627 EntityKind::BirchBoat => {
19628 entity.insert(BirchBoatMetadataBundle::default());
19629 }
19630 EntityKind::BirchChestBoat => {
19631 entity.insert(BirchChestBoatMetadataBundle::default());
19632 }
19633 EntityKind::Blaze => {
19634 entity.insert(BlazeMetadataBundle::default());
19635 }
19636 EntityKind::BlockDisplay => {
19637 entity.insert(BlockDisplayMetadataBundle::default());
19638 }
19639 EntityKind::Bogged => {
19640 entity.insert(BoggedMetadataBundle::default());
19641 }
19642 EntityKind::Breeze => {
19643 entity.insert(BreezeMetadataBundle::default());
19644 }
19645 EntityKind::BreezeWindCharge => {
19646 entity.insert(BreezeWindChargeMetadataBundle::default());
19647 }
19648 EntityKind::Camel => {
19649 entity.insert(CamelMetadataBundle::default());
19650 }
19651 EntityKind::CamelHusk => {
19652 entity.insert(CamelHuskMetadataBundle::default());
19653 }
19654 EntityKind::Cat => {
19655 entity.insert(CatMetadataBundle::default());
19656 }
19657 EntityKind::CaveSpider => {
19658 entity.insert(CaveSpiderMetadataBundle::default());
19659 }
19660 EntityKind::CherryBoat => {
19661 entity.insert(CherryBoatMetadataBundle::default());
19662 }
19663 EntityKind::CherryChestBoat => {
19664 entity.insert(CherryChestBoatMetadataBundle::default());
19665 }
19666 EntityKind::ChestMinecart => {
19667 entity.insert(ChestMinecartMetadataBundle::default());
19668 }
19669 EntityKind::Chicken => {
19670 entity.insert(ChickenMetadataBundle::default());
19671 }
19672 EntityKind::Cod => {
19673 entity.insert(CodMetadataBundle::default());
19674 }
19675 EntityKind::CommandBlockMinecart => {
19676 entity.insert(CommandBlockMinecartMetadataBundle::default());
19677 }
19678 EntityKind::CopperGolem => {
19679 entity.insert(CopperGolemMetadataBundle::default());
19680 }
19681 EntityKind::Cow => {
19682 entity.insert(CowMetadataBundle::default());
19683 }
19684 EntityKind::Creaking => {
19685 entity.insert(CreakingMetadataBundle::default());
19686 }
19687 EntityKind::Creeper => {
19688 entity.insert(CreeperMetadataBundle::default());
19689 }
19690 EntityKind::DarkOakBoat => {
19691 entity.insert(DarkOakBoatMetadataBundle::default());
19692 }
19693 EntityKind::DarkOakChestBoat => {
19694 entity.insert(DarkOakChestBoatMetadataBundle::default());
19695 }
19696 EntityKind::Dolphin => {
19697 entity.insert(DolphinMetadataBundle::default());
19698 }
19699 EntityKind::Donkey => {
19700 entity.insert(DonkeyMetadataBundle::default());
19701 }
19702 EntityKind::DragonFireball => {
19703 entity.insert(DragonFireballMetadataBundle::default());
19704 }
19705 EntityKind::Drowned => {
19706 entity.insert(DrownedMetadataBundle::default());
19707 }
19708 EntityKind::Egg => {
19709 entity.insert(EggMetadataBundle::default());
19710 }
19711 EntityKind::ElderGuardian => {
19712 entity.insert(ElderGuardianMetadataBundle::default());
19713 }
19714 EntityKind::EndCrystal => {
19715 entity.insert(EndCrystalMetadataBundle::default());
19716 }
19717 EntityKind::EnderDragon => {
19718 entity.insert(EnderDragonMetadataBundle::default());
19719 }
19720 EntityKind::EnderPearl => {
19721 entity.insert(EnderPearlMetadataBundle::default());
19722 }
19723 EntityKind::Enderman => {
19724 entity.insert(EndermanMetadataBundle::default());
19725 }
19726 EntityKind::Endermite => {
19727 entity.insert(EndermiteMetadataBundle::default());
19728 }
19729 EntityKind::Evoker => {
19730 entity.insert(EvokerMetadataBundle::default());
19731 }
19732 EntityKind::EvokerFangs => {
19733 entity.insert(EvokerFangsMetadataBundle::default());
19734 }
19735 EntityKind::ExperienceBottle => {
19736 entity.insert(ExperienceBottleMetadataBundle::default());
19737 }
19738 EntityKind::ExperienceOrb => {
19739 entity.insert(ExperienceOrbMetadataBundle::default());
19740 }
19741 EntityKind::EyeOfEnder => {
19742 entity.insert(EyeOfEnderMetadataBundle::default());
19743 }
19744 EntityKind::FallingBlock => {
19745 entity.insert(FallingBlockMetadataBundle::default());
19746 }
19747 EntityKind::Fireball => {
19748 entity.insert(FireballMetadataBundle::default());
19749 }
19750 EntityKind::FireworkRocket => {
19751 entity.insert(FireworkRocketMetadataBundle::default());
19752 }
19753 EntityKind::FishingBobber => {
19754 entity.insert(FishingBobberMetadataBundle::default());
19755 }
19756 EntityKind::Fox => {
19757 entity.insert(FoxMetadataBundle::default());
19758 }
19759 EntityKind::Frog => {
19760 entity.insert(FrogMetadataBundle::default());
19761 }
19762 EntityKind::FurnaceMinecart => {
19763 entity.insert(FurnaceMinecartMetadataBundle::default());
19764 }
19765 EntityKind::Ghast => {
19766 entity.insert(GhastMetadataBundle::default());
19767 }
19768 EntityKind::Giant => {
19769 entity.insert(GiantMetadataBundle::default());
19770 }
19771 EntityKind::GlowItemFrame => {
19772 entity.insert(GlowItemFrameMetadataBundle::default());
19773 }
19774 EntityKind::GlowSquid => {
19775 entity.insert(GlowSquidMetadataBundle::default());
19776 }
19777 EntityKind::Goat => {
19778 entity.insert(GoatMetadataBundle::default());
19779 }
19780 EntityKind::Guardian => {
19781 entity.insert(GuardianMetadataBundle::default());
19782 }
19783 EntityKind::HappyGhast => {
19784 entity.insert(HappyGhastMetadataBundle::default());
19785 }
19786 EntityKind::Hoglin => {
19787 entity.insert(HoglinMetadataBundle::default());
19788 }
19789 EntityKind::HopperMinecart => {
19790 entity.insert(HopperMinecartMetadataBundle::default());
19791 }
19792 EntityKind::Horse => {
19793 entity.insert(HorseMetadataBundle::default());
19794 }
19795 EntityKind::Husk => {
19796 entity.insert(HuskMetadataBundle::default());
19797 }
19798 EntityKind::Illusioner => {
19799 entity.insert(IllusionerMetadataBundle::default());
19800 }
19801 EntityKind::Interaction => {
19802 entity.insert(InteractionMetadataBundle::default());
19803 }
19804 EntityKind::IronGolem => {
19805 entity.insert(IronGolemMetadataBundle::default());
19806 }
19807 EntityKind::Item => {
19808 entity.insert(ItemMetadataBundle::default());
19809 }
19810 EntityKind::ItemDisplay => {
19811 entity.insert(ItemDisplayMetadataBundle::default());
19812 }
19813 EntityKind::ItemFrame => {
19814 entity.insert(ItemFrameMetadataBundle::default());
19815 }
19816 EntityKind::JungleBoat => {
19817 entity.insert(JungleBoatMetadataBundle::default());
19818 }
19819 EntityKind::JungleChestBoat => {
19820 entity.insert(JungleChestBoatMetadataBundle::default());
19821 }
19822 EntityKind::LeashKnot => {
19823 entity.insert(LeashKnotMetadataBundle::default());
19824 }
19825 EntityKind::LightningBolt => {
19826 entity.insert(LightningBoltMetadataBundle::default());
19827 }
19828 EntityKind::LingeringPotion => {
19829 entity.insert(LingeringPotionMetadataBundle::default());
19830 }
19831 EntityKind::Llama => {
19832 entity.insert(LlamaMetadataBundle::default());
19833 }
19834 EntityKind::LlamaSpit => {
19835 entity.insert(LlamaSpitMetadataBundle::default());
19836 }
19837 EntityKind::MagmaCube => {
19838 entity.insert(MagmaCubeMetadataBundle::default());
19839 }
19840 EntityKind::MangroveBoat => {
19841 entity.insert(MangroveBoatMetadataBundle::default());
19842 }
19843 EntityKind::MangroveChestBoat => {
19844 entity.insert(MangroveChestBoatMetadataBundle::default());
19845 }
19846 EntityKind::Mannequin => {
19847 entity.insert(MannequinMetadataBundle::default());
19848 }
19849 EntityKind::Marker => {
19850 entity.insert(MarkerMetadataBundle::default());
19851 }
19852 EntityKind::Minecart => {
19853 entity.insert(MinecartMetadataBundle::default());
19854 }
19855 EntityKind::Mooshroom => {
19856 entity.insert(MooshroomMetadataBundle::default());
19857 }
19858 EntityKind::Mule => {
19859 entity.insert(MuleMetadataBundle::default());
19860 }
19861 EntityKind::Nautilus => {
19862 entity.insert(NautilusMetadataBundle::default());
19863 }
19864 EntityKind::OakBoat => {
19865 entity.insert(OakBoatMetadataBundle::default());
19866 }
19867 EntityKind::OakChestBoat => {
19868 entity.insert(OakChestBoatMetadataBundle::default());
19869 }
19870 EntityKind::Ocelot => {
19871 entity.insert(OcelotMetadataBundle::default());
19872 }
19873 EntityKind::OminousItemSpawner => {
19874 entity.insert(OminousItemSpawnerMetadataBundle::default());
19875 }
19876 EntityKind::Painting => {
19877 entity.insert(PaintingMetadataBundle::default());
19878 }
19879 EntityKind::PaleOakBoat => {
19880 entity.insert(PaleOakBoatMetadataBundle::default());
19881 }
19882 EntityKind::PaleOakChestBoat => {
19883 entity.insert(PaleOakChestBoatMetadataBundle::default());
19884 }
19885 EntityKind::Panda => {
19886 entity.insert(PandaMetadataBundle::default());
19887 }
19888 EntityKind::Parched => {
19889 entity.insert(ParchedMetadataBundle::default());
19890 }
19891 EntityKind::Parrot => {
19892 entity.insert(ParrotMetadataBundle::default());
19893 }
19894 EntityKind::Phantom => {
19895 entity.insert(PhantomMetadataBundle::default());
19896 }
19897 EntityKind::Pig => {
19898 entity.insert(PigMetadataBundle::default());
19899 }
19900 EntityKind::Piglin => {
19901 entity.insert(PiglinMetadataBundle::default());
19902 }
19903 EntityKind::PiglinBrute => {
19904 entity.insert(PiglinBruteMetadataBundle::default());
19905 }
19906 EntityKind::Pillager => {
19907 entity.insert(PillagerMetadataBundle::default());
19908 }
19909 EntityKind::Player => {
19910 entity.insert(PlayerMetadataBundle::default());
19911 }
19912 EntityKind::PolarBear => {
19913 entity.insert(PolarBearMetadataBundle::default());
19914 }
19915 EntityKind::Pufferfish => {
19916 entity.insert(PufferfishMetadataBundle::default());
19917 }
19918 EntityKind::Rabbit => {
19919 entity.insert(RabbitMetadataBundle::default());
19920 }
19921 EntityKind::Ravager => {
19922 entity.insert(RavagerMetadataBundle::default());
19923 }
19924 EntityKind::Salmon => {
19925 entity.insert(SalmonMetadataBundle::default());
19926 }
19927 EntityKind::Sheep => {
19928 entity.insert(SheepMetadataBundle::default());
19929 }
19930 EntityKind::Shulker => {
19931 entity.insert(ShulkerMetadataBundle::default());
19932 }
19933 EntityKind::ShulkerBullet => {
19934 entity.insert(ShulkerBulletMetadataBundle::default());
19935 }
19936 EntityKind::Silverfish => {
19937 entity.insert(SilverfishMetadataBundle::default());
19938 }
19939 EntityKind::Skeleton => {
19940 entity.insert(SkeletonMetadataBundle::default());
19941 }
19942 EntityKind::SkeletonHorse => {
19943 entity.insert(SkeletonHorseMetadataBundle::default());
19944 }
19945 EntityKind::Slime => {
19946 entity.insert(SlimeMetadataBundle::default());
19947 }
19948 EntityKind::SmallFireball => {
19949 entity.insert(SmallFireballMetadataBundle::default());
19950 }
19951 EntityKind::Sniffer => {
19952 entity.insert(SnifferMetadataBundle::default());
19953 }
19954 EntityKind::SnowGolem => {
19955 entity.insert(SnowGolemMetadataBundle::default());
19956 }
19957 EntityKind::Snowball => {
19958 entity.insert(SnowballMetadataBundle::default());
19959 }
19960 EntityKind::SpawnerMinecart => {
19961 entity.insert(SpawnerMinecartMetadataBundle::default());
19962 }
19963 EntityKind::SpectralArrow => {
19964 entity.insert(SpectralArrowMetadataBundle::default());
19965 }
19966 EntityKind::Spider => {
19967 entity.insert(SpiderMetadataBundle::default());
19968 }
19969 EntityKind::SplashPotion => {
19970 entity.insert(SplashPotionMetadataBundle::default());
19971 }
19972 EntityKind::SpruceBoat => {
19973 entity.insert(SpruceBoatMetadataBundle::default());
19974 }
19975 EntityKind::SpruceChestBoat => {
19976 entity.insert(SpruceChestBoatMetadataBundle::default());
19977 }
19978 EntityKind::Squid => {
19979 entity.insert(SquidMetadataBundle::default());
19980 }
19981 EntityKind::Stray => {
19982 entity.insert(StrayMetadataBundle::default());
19983 }
19984 EntityKind::Strider => {
19985 entity.insert(StriderMetadataBundle::default());
19986 }
19987 EntityKind::Tadpole => {
19988 entity.insert(TadpoleMetadataBundle::default());
19989 }
19990 EntityKind::TextDisplay => {
19991 entity.insert(TextDisplayMetadataBundle::default());
19992 }
19993 EntityKind::Tnt => {
19994 entity.insert(TntMetadataBundle::default());
19995 }
19996 EntityKind::TntMinecart => {
19997 entity.insert(TntMinecartMetadataBundle::default());
19998 }
19999 EntityKind::TraderLlama => {
20000 entity.insert(TraderLlamaMetadataBundle::default());
20001 }
20002 EntityKind::Trident => {
20003 entity.insert(TridentMetadataBundle::default());
20004 }
20005 EntityKind::TropicalFish => {
20006 entity.insert(TropicalFishMetadataBundle::default());
20007 }
20008 EntityKind::Turtle => {
20009 entity.insert(TurtleMetadataBundle::default());
20010 }
20011 EntityKind::Vex => {
20012 entity.insert(VexMetadataBundle::default());
20013 }
20014 EntityKind::Villager => {
20015 entity.insert(VillagerMetadataBundle::default());
20016 }
20017 EntityKind::Vindicator => {
20018 entity.insert(VindicatorMetadataBundle::default());
20019 }
20020 EntityKind::WanderingTrader => {
20021 entity.insert(WanderingTraderMetadataBundle::default());
20022 }
20023 EntityKind::Warden => {
20024 entity.insert(WardenMetadataBundle::default());
20025 }
20026 EntityKind::WindCharge => {
20027 entity.insert(WindChargeMetadataBundle::default());
20028 }
20029 EntityKind::Witch => {
20030 entity.insert(WitchMetadataBundle::default());
20031 }
20032 EntityKind::Wither => {
20033 entity.insert(WitherMetadataBundle::default());
20034 }
20035 EntityKind::WitherSkeleton => {
20036 entity.insert(WitherSkeletonMetadataBundle::default());
20037 }
20038 EntityKind::WitherSkull => {
20039 entity.insert(WitherSkullMetadataBundle::default());
20040 }
20041 EntityKind::Wolf => {
20042 entity.insert(WolfMetadataBundle::default());
20043 }
20044 EntityKind::Zoglin => {
20045 entity.insert(ZoglinMetadataBundle::default());
20046 }
20047 EntityKind::Zombie => {
20048 entity.insert(ZombieMetadataBundle::default());
20049 }
20050 EntityKind::ZombieHorse => {
20051 entity.insert(ZombieHorseMetadataBundle::default());
20052 }
20053 EntityKind::ZombieNautilus => {
20054 entity.insert(ZombieNautilusMetadataBundle::default());
20055 }
20056 EntityKind::ZombieVillager => {
20057 entity.insert(ZombieVillagerMetadataBundle::default());
20058 }
20059 EntityKind::ZombifiedPiglin => {
20060 entity.insert(ZombifiedPiglinMetadataBundle::default());
20061 }
20062 }
20063}