1use crate::entity_data::{
2 ArmadilloState, BlockPos, DataValue, Direction, EntityData, EntityPose,
3 ColorParticleOption, GlobalPos, HumanoidArm, ParticleData, ParticleList, Quaternionf,
4 ResolvableProfile, Rotations, SnifferState, SyncedValue, Vector3f, VillagerData,
5};
6use crate::item_stack::ItemStack;
7use steel_utils::{ArgbColor, BlockStateId, random::Random};
8use text_components::TextComponent;
9use uuid::Uuid;
10use crate::{RegistryEntry, RegistryExt, RegistryReference};
11pub trait VanillaEntityData {
13 fn base(&self) -> &BaseEntityData;
15 fn base_mut(&mut self) -> &mut BaseEntityData;
17 fn pack_dirty(&mut self) -> Option<Vec<DataValue>>;
19 fn pack_all(&self) -> Vec<DataValue>;
21 fn is_dirty(&self) -> bool;
23}
24pub trait VanillaLivingEntityData: VanillaEntityData {
26 fn living_entity(&self) -> &LivingEntityData;
28 fn living_entity_mut(&mut self) -> &mut LivingEntityData;
30}
31#[derive(Debug, Clone)]
33pub struct BaseEntityData {
34 pub shared_flags: SyncedValue<i8>,
35 pub air_supply: SyncedValue<i32>,
36 pub custom_name: SyncedValue<Option<Box<TextComponent>>>,
37 pub custom_name_visible: SyncedValue<bool>,
38 pub silent: SyncedValue<bool>,
39 pub no_gravity: SyncedValue<bool>,
40 pub pose: SyncedValue<EntityPose>,
41 pub ticks_frozen: SyncedValue<i32>,
42}
43impl BaseEntityData {
44 pub fn new() -> Self {
46 Self {
47 shared_flags: SyncedValue::new(0i8),
48 air_supply: SyncedValue::new(300i32),
49 custom_name: SyncedValue::new(None),
50 custom_name_visible: SyncedValue::new(false),
51 silent: SyncedValue::new(false),
52 no_gravity: SyncedValue::new(false),
53 pose: SyncedValue::new(EntityPose::Standing),
54 ticks_frozen: SyncedValue::new(0i32),
55 }
56 }
57 pub fn base(&self) -> &BaseEntityData {
59 self
60 }
61 pub fn base_mut(&mut self) -> &mut BaseEntityData {
63 self
64 }
65 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
68 let mut values = Vec::new();
69 self.pack_dirty_into(&mut values);
70 if values.is_empty() { None } else { Some(values) }
71 }
72 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
73 if self.shared_flags.is_dirty() {
74 values
75 .push(DataValue {
76 index: 0u8,
77 serializer_id: 0i32,
78 value: EntityData::Byte(*self.shared_flags.get()),
79 });
80 self.shared_flags.clear_dirty();
81 }
82 if self.air_supply.is_dirty() {
83 values
84 .push(DataValue {
85 index: 1u8,
86 serializer_id: 1i32,
87 value: EntityData::Int(*self.air_supply.get()),
88 });
89 self.air_supply.clear_dirty();
90 }
91 if self.custom_name.is_dirty() {
92 values
93 .push(DataValue {
94 index: 2u8,
95 serializer_id: 6i32,
96 value: EntityData::OptionalComponent(self.custom_name.get().clone()),
97 });
98 self.custom_name.clear_dirty();
99 }
100 if self.custom_name_visible.is_dirty() {
101 values
102 .push(DataValue {
103 index: 3u8,
104 serializer_id: 8i32,
105 value: EntityData::Boolean(*self.custom_name_visible.get()),
106 });
107 self.custom_name_visible.clear_dirty();
108 }
109 if self.silent.is_dirty() {
110 values
111 .push(DataValue {
112 index: 4u8,
113 serializer_id: 8i32,
114 value: EntityData::Boolean(*self.silent.get()),
115 });
116 self.silent.clear_dirty();
117 }
118 if self.no_gravity.is_dirty() {
119 values
120 .push(DataValue {
121 index: 5u8,
122 serializer_id: 8i32,
123 value: EntityData::Boolean(*self.no_gravity.get()),
124 });
125 self.no_gravity.clear_dirty();
126 }
127 if self.pose.is_dirty() {
128 values
129 .push(DataValue {
130 index: 6u8,
131 serializer_id: 20i32,
132 value: EntityData::Pose(*self.pose.get()),
133 });
134 self.pose.clear_dirty();
135 }
136 if self.ticks_frozen.is_dirty() {
137 values
138 .push(DataValue {
139 index: 7u8,
140 serializer_id: 1i32,
141 value: EntityData::Int(*self.ticks_frozen.get()),
142 });
143 self.ticks_frozen.clear_dirty();
144 }
145 }
146 pub fn pack_all(&self) -> Vec<DataValue> {
148 let mut values = Vec::new();
149 self.pack_all_into(&mut values);
150 values
151 }
152 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
153 if !self.shared_flags.is_default() {
154 values
155 .push(DataValue {
156 index: 0u8,
157 serializer_id: 0i32,
158 value: EntityData::Byte(*self.shared_flags.get()),
159 });
160 }
161 if !self.air_supply.is_default() {
162 values
163 .push(DataValue {
164 index: 1u8,
165 serializer_id: 1i32,
166 value: EntityData::Int(*self.air_supply.get()),
167 });
168 }
169 if !self.custom_name.is_default() {
170 values
171 .push(DataValue {
172 index: 2u8,
173 serializer_id: 6i32,
174 value: EntityData::OptionalComponent(self.custom_name.get().clone()),
175 });
176 }
177 if !self.custom_name_visible.is_default() {
178 values
179 .push(DataValue {
180 index: 3u8,
181 serializer_id: 8i32,
182 value: EntityData::Boolean(*self.custom_name_visible.get()),
183 });
184 }
185 if !self.silent.is_default() {
186 values
187 .push(DataValue {
188 index: 4u8,
189 serializer_id: 8i32,
190 value: EntityData::Boolean(*self.silent.get()),
191 });
192 }
193 if !self.no_gravity.is_default() {
194 values
195 .push(DataValue {
196 index: 5u8,
197 serializer_id: 8i32,
198 value: EntityData::Boolean(*self.no_gravity.get()),
199 });
200 }
201 if !self.pose.is_default() {
202 values
203 .push(DataValue {
204 index: 6u8,
205 serializer_id: 20i32,
206 value: EntityData::Pose(*self.pose.get()),
207 });
208 }
209 if !self.ticks_frozen.is_default() {
210 values
211 .push(DataValue {
212 index: 7u8,
213 serializer_id: 1i32,
214 value: EntityData::Int(*self.ticks_frozen.get()),
215 });
216 }
217 }
218 pub fn is_dirty(&self) -> bool {
220 self.shared_flags.is_dirty() || self.air_supply.is_dirty()
221 || self.custom_name.is_dirty() || self.custom_name_visible.is_dirty()
222 || self.silent.is_dirty() || self.no_gravity.is_dirty()
223 || self.pose.is_dirty() || self.ticks_frozen.is_dirty()
224 }
225}
226impl Default for BaseEntityData {
227 fn default() -> Self {
228 Self::new()
229 }
230}
231impl VanillaEntityData for BaseEntityData {
232 fn base(&self) -> &BaseEntityData {
233 BaseEntityData::base(self)
234 }
235 fn base_mut(&mut self) -> &mut BaseEntityData {
236 BaseEntityData::base_mut(self)
237 }
238 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
239 BaseEntityData::pack_dirty(self)
240 }
241 fn pack_all(&self) -> Vec<DataValue> {
242 BaseEntityData::pack_all(self)
243 }
244 fn is_dirty(&self) -> bool {
245 BaseEntityData::is_dirty(self)
246 }
247}
248#[derive(Debug, Clone)]
250pub struct VehicleEntityData {
251 pub base: BaseEntityData,
252 pub id_hurt: SyncedValue<i32>,
253 pub id_hurtdir: SyncedValue<i32>,
254 pub id_damage: SyncedValue<f32>,
255}
256impl VehicleEntityData {
257 pub fn new() -> Self {
259 Self {
260 base: BaseEntityData::new(),
261 id_hurt: SyncedValue::new(0i32),
262 id_hurtdir: SyncedValue::new(1i32),
263 id_damage: SyncedValue::new(0f32),
264 }
265 }
266 pub fn vehicle_entity(&self) -> &VehicleEntityData {
268 self
269 }
270 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
272 self
273 }
274 pub fn base(&self) -> &BaseEntityData {
276 &self.base
277 }
278 pub fn base_mut(&mut self) -> &mut BaseEntityData {
280 &mut self.base
281 }
282 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
285 let mut values = Vec::new();
286 self.pack_dirty_into(&mut values);
287 if values.is_empty() { None } else { Some(values) }
288 }
289 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
290 self.base.pack_dirty_into(values);
291 if self.id_hurt.is_dirty() {
292 values
293 .push(DataValue {
294 index: 8u8,
295 serializer_id: 1i32,
296 value: EntityData::Int(*self.id_hurt.get()),
297 });
298 self.id_hurt.clear_dirty();
299 }
300 if self.id_hurtdir.is_dirty() {
301 values
302 .push(DataValue {
303 index: 9u8,
304 serializer_id: 1i32,
305 value: EntityData::Int(*self.id_hurtdir.get()),
306 });
307 self.id_hurtdir.clear_dirty();
308 }
309 if self.id_damage.is_dirty() {
310 values
311 .push(DataValue {
312 index: 10u8,
313 serializer_id: 3i32,
314 value: EntityData::Float(*self.id_damage.get()),
315 });
316 self.id_damage.clear_dirty();
317 }
318 }
319 pub fn pack_all(&self) -> Vec<DataValue> {
321 let mut values = Vec::new();
322 self.pack_all_into(&mut values);
323 values
324 }
325 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
326 self.base.pack_all_into(values);
327 if !self.id_hurt.is_default() {
328 values
329 .push(DataValue {
330 index: 8u8,
331 serializer_id: 1i32,
332 value: EntityData::Int(*self.id_hurt.get()),
333 });
334 }
335 if !self.id_hurtdir.is_default() {
336 values
337 .push(DataValue {
338 index: 9u8,
339 serializer_id: 1i32,
340 value: EntityData::Int(*self.id_hurtdir.get()),
341 });
342 }
343 if !self.id_damage.is_default() {
344 values
345 .push(DataValue {
346 index: 10u8,
347 serializer_id: 3i32,
348 value: EntityData::Float(*self.id_damage.get()),
349 });
350 }
351 }
352 pub fn is_dirty(&self) -> bool {
354 self.base.is_dirty() || self.id_hurt.is_dirty() || self.id_hurtdir.is_dirty()
355 || self.id_damage.is_dirty()
356 }
357}
358impl Default for VehicleEntityData {
359 fn default() -> Self {
360 Self::new()
361 }
362}
363impl VanillaEntityData for VehicleEntityData {
364 fn base(&self) -> &BaseEntityData {
365 VehicleEntityData::base(self)
366 }
367 fn base_mut(&mut self) -> &mut BaseEntityData {
368 VehicleEntityData::base_mut(self)
369 }
370 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
371 VehicleEntityData::pack_dirty(self)
372 }
373 fn pack_all(&self) -> Vec<DataValue> {
374 VehicleEntityData::pack_all(self)
375 }
376 fn is_dirty(&self) -> bool {
377 VehicleEntityData::is_dirty(self)
378 }
379}
380#[derive(Debug, Clone)]
382pub struct AbstractBoatEntityData {
383 pub vehicle_entity: VehicleEntityData,
384 pub id_paddle_left: SyncedValue<bool>,
385 pub id_paddle_right: SyncedValue<bool>,
386 pub id_bubble_time: SyncedValue<i32>,
387}
388impl AbstractBoatEntityData {
389 pub fn new() -> Self {
391 Self {
392 vehicle_entity: VehicleEntityData::new(),
393 id_paddle_left: SyncedValue::new(false),
394 id_paddle_right: SyncedValue::new(false),
395 id_bubble_time: SyncedValue::new(0i32),
396 }
397 }
398 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
400 self
401 }
402 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
404 self
405 }
406 pub fn vehicle_entity(&self) -> &VehicleEntityData {
408 &self.vehicle_entity
409 }
410 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
412 &mut self.vehicle_entity
413 }
414 pub fn base(&self) -> &BaseEntityData {
416 &self.vehicle_entity.base
417 }
418 pub fn base_mut(&mut self) -> &mut BaseEntityData {
420 &mut self.vehicle_entity.base
421 }
422 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
425 let mut values = Vec::new();
426 self.pack_dirty_into(&mut values);
427 if values.is_empty() { None } else { Some(values) }
428 }
429 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
430 self.vehicle_entity.pack_dirty_into(values);
431 if self.id_paddle_left.is_dirty() {
432 values
433 .push(DataValue {
434 index: 11u8,
435 serializer_id: 8i32,
436 value: EntityData::Boolean(*self.id_paddle_left.get()),
437 });
438 self.id_paddle_left.clear_dirty();
439 }
440 if self.id_paddle_right.is_dirty() {
441 values
442 .push(DataValue {
443 index: 12u8,
444 serializer_id: 8i32,
445 value: EntityData::Boolean(*self.id_paddle_right.get()),
446 });
447 self.id_paddle_right.clear_dirty();
448 }
449 if self.id_bubble_time.is_dirty() {
450 values
451 .push(DataValue {
452 index: 13u8,
453 serializer_id: 1i32,
454 value: EntityData::Int(*self.id_bubble_time.get()),
455 });
456 self.id_bubble_time.clear_dirty();
457 }
458 }
459 pub fn pack_all(&self) -> Vec<DataValue> {
461 let mut values = Vec::new();
462 self.pack_all_into(&mut values);
463 values
464 }
465 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
466 self.vehicle_entity.pack_all_into(values);
467 if !self.id_paddle_left.is_default() {
468 values
469 .push(DataValue {
470 index: 11u8,
471 serializer_id: 8i32,
472 value: EntityData::Boolean(*self.id_paddle_left.get()),
473 });
474 }
475 if !self.id_paddle_right.is_default() {
476 values
477 .push(DataValue {
478 index: 12u8,
479 serializer_id: 8i32,
480 value: EntityData::Boolean(*self.id_paddle_right.get()),
481 });
482 }
483 if !self.id_bubble_time.is_default() {
484 values
485 .push(DataValue {
486 index: 13u8,
487 serializer_id: 1i32,
488 value: EntityData::Int(*self.id_bubble_time.get()),
489 });
490 }
491 }
492 pub fn is_dirty(&self) -> bool {
494 self.vehicle_entity.is_dirty() || self.id_paddle_left.is_dirty()
495 || self.id_paddle_right.is_dirty() || self.id_bubble_time.is_dirty()
496 }
497}
498impl Default for AbstractBoatEntityData {
499 fn default() -> Self {
500 Self::new()
501 }
502}
503impl VanillaEntityData for AbstractBoatEntityData {
504 fn base(&self) -> &BaseEntityData {
505 AbstractBoatEntityData::base(self)
506 }
507 fn base_mut(&mut self) -> &mut BaseEntityData {
508 AbstractBoatEntityData::base_mut(self)
509 }
510 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
511 AbstractBoatEntityData::pack_dirty(self)
512 }
513 fn pack_all(&self) -> Vec<DataValue> {
514 AbstractBoatEntityData::pack_all(self)
515 }
516 fn is_dirty(&self) -> bool {
517 AbstractBoatEntityData::is_dirty(self)
518 }
519}
520#[derive(Debug, Clone)]
522pub struct LivingEntityData {
523 pub base: BaseEntityData,
524 pub living_entity_flags: SyncedValue<i8>,
525 pub health: SyncedValue<f32>,
526 pub effect_particles: SyncedValue<ParticleList>,
527 pub effect_ambience: SyncedValue<bool>,
528 pub arrow_count: SyncedValue<i32>,
529 pub stinger_count: SyncedValue<i32>,
530 pub sleeping_pos: SyncedValue<Option<BlockPos>>,
531}
532impl LivingEntityData {
533 pub fn new() -> Self {
535 Self {
536 base: BaseEntityData::new(),
537 living_entity_flags: SyncedValue::new(0i8),
538 health: SyncedValue::new(1f32),
539 effect_particles: SyncedValue::new(ParticleList::default()),
540 effect_ambience: SyncedValue::new(false),
541 arrow_count: SyncedValue::new(0i32),
542 stinger_count: SyncedValue::new(0i32),
543 sleeping_pos: SyncedValue::new(None),
544 }
545 }
546 pub fn living_entity(&self) -> &LivingEntityData {
548 self
549 }
550 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
552 self
553 }
554 pub fn base(&self) -> &BaseEntityData {
556 &self.base
557 }
558 pub fn base_mut(&mut self) -> &mut BaseEntityData {
560 &mut self.base
561 }
562 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
565 let mut values = Vec::new();
566 self.pack_dirty_into(&mut values);
567 if values.is_empty() { None } else { Some(values) }
568 }
569 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
570 self.base.pack_dirty_into(values);
571 if self.living_entity_flags.is_dirty() {
572 values
573 .push(DataValue {
574 index: 8u8,
575 serializer_id: 0i32,
576 value: EntityData::Byte(*self.living_entity_flags.get()),
577 });
578 self.living_entity_flags.clear_dirty();
579 }
580 if self.health.is_dirty() {
581 values
582 .push(DataValue {
583 index: 9u8,
584 serializer_id: 3i32,
585 value: EntityData::Float(*self.health.get()),
586 });
587 self.health.clear_dirty();
588 }
589 if self.effect_particles.is_dirty() {
590 values
591 .push(DataValue {
592 index: 10u8,
593 serializer_id: 17i32,
594 value: EntityData::Particles(self.effect_particles.get().clone()),
595 });
596 self.effect_particles.clear_dirty();
597 }
598 if self.effect_ambience.is_dirty() {
599 values
600 .push(DataValue {
601 index: 11u8,
602 serializer_id: 8i32,
603 value: EntityData::Boolean(*self.effect_ambience.get()),
604 });
605 self.effect_ambience.clear_dirty();
606 }
607 if self.arrow_count.is_dirty() {
608 values
609 .push(DataValue {
610 index: 12u8,
611 serializer_id: 1i32,
612 value: EntityData::Int(*self.arrow_count.get()),
613 });
614 self.arrow_count.clear_dirty();
615 }
616 if self.stinger_count.is_dirty() {
617 values
618 .push(DataValue {
619 index: 13u8,
620 serializer_id: 1i32,
621 value: EntityData::Int(*self.stinger_count.get()),
622 });
623 self.stinger_count.clear_dirty();
624 }
625 if self.sleeping_pos.is_dirty() {
626 values
627 .push(DataValue {
628 index: 14u8,
629 serializer_id: 11i32,
630 value: EntityData::OptionalBlockPos(self.sleeping_pos.get().clone()),
631 });
632 self.sleeping_pos.clear_dirty();
633 }
634 }
635 pub fn pack_all(&self) -> Vec<DataValue> {
637 let mut values = Vec::new();
638 self.pack_all_into(&mut values);
639 values
640 }
641 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
642 self.base.pack_all_into(values);
643 if !self.living_entity_flags.is_default() {
644 values
645 .push(DataValue {
646 index: 8u8,
647 serializer_id: 0i32,
648 value: EntityData::Byte(*self.living_entity_flags.get()),
649 });
650 }
651 if !self.health.is_default() {
652 values
653 .push(DataValue {
654 index: 9u8,
655 serializer_id: 3i32,
656 value: EntityData::Float(*self.health.get()),
657 });
658 }
659 if !self.effect_particles.is_default() {
660 values
661 .push(DataValue {
662 index: 10u8,
663 serializer_id: 17i32,
664 value: EntityData::Particles(self.effect_particles.get().clone()),
665 });
666 }
667 if !self.effect_ambience.is_default() {
668 values
669 .push(DataValue {
670 index: 11u8,
671 serializer_id: 8i32,
672 value: EntityData::Boolean(*self.effect_ambience.get()),
673 });
674 }
675 if !self.arrow_count.is_default() {
676 values
677 .push(DataValue {
678 index: 12u8,
679 serializer_id: 1i32,
680 value: EntityData::Int(*self.arrow_count.get()),
681 });
682 }
683 if !self.stinger_count.is_default() {
684 values
685 .push(DataValue {
686 index: 13u8,
687 serializer_id: 1i32,
688 value: EntityData::Int(*self.stinger_count.get()),
689 });
690 }
691 if !self.sleeping_pos.is_default() {
692 values
693 .push(DataValue {
694 index: 14u8,
695 serializer_id: 11i32,
696 value: EntityData::OptionalBlockPos(self.sleeping_pos.get().clone()),
697 });
698 }
699 }
700 pub fn is_dirty(&self) -> bool {
702 self.base.is_dirty() || self.living_entity_flags.is_dirty()
703 || self.health.is_dirty() || self.effect_particles.is_dirty()
704 || self.effect_ambience.is_dirty() || self.arrow_count.is_dirty()
705 || self.stinger_count.is_dirty() || self.sleeping_pos.is_dirty()
706 }
707}
708impl Default for LivingEntityData {
709 fn default() -> Self {
710 Self::new()
711 }
712}
713impl VanillaEntityData for LivingEntityData {
714 fn base(&self) -> &BaseEntityData {
715 LivingEntityData::base(self)
716 }
717 fn base_mut(&mut self) -> &mut BaseEntityData {
718 LivingEntityData::base_mut(self)
719 }
720 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
721 LivingEntityData::pack_dirty(self)
722 }
723 fn pack_all(&self) -> Vec<DataValue> {
724 LivingEntityData::pack_all(self)
725 }
726 fn is_dirty(&self) -> bool {
727 LivingEntityData::is_dirty(self)
728 }
729}
730impl VanillaLivingEntityData for LivingEntityData {
731 fn living_entity(&self) -> &LivingEntityData {
732 LivingEntityData::living_entity(self)
733 }
734 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
735 LivingEntityData::living_entity_mut(self)
736 }
737}
738#[derive(Debug, Clone)]
740pub struct MobEntityData {
741 pub living_entity: LivingEntityData,
742 pub mob_flags: SyncedValue<i8>,
743}
744impl MobEntityData {
745 pub fn new() -> Self {
747 Self {
748 living_entity: LivingEntityData::new(),
749 mob_flags: SyncedValue::new(0i8),
750 }
751 }
752 pub fn mob(&self) -> &MobEntityData {
754 self
755 }
756 pub fn mob_mut(&mut self) -> &mut MobEntityData {
758 self
759 }
760 pub fn living_entity(&self) -> &LivingEntityData {
762 &self.living_entity
763 }
764 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
766 &mut self.living_entity
767 }
768 pub fn base(&self) -> &BaseEntityData {
770 &self.living_entity.base
771 }
772 pub fn base_mut(&mut self) -> &mut BaseEntityData {
774 &mut self.living_entity.base
775 }
776 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
779 let mut values = Vec::new();
780 self.pack_dirty_into(&mut values);
781 if values.is_empty() { None } else { Some(values) }
782 }
783 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
784 self.living_entity.pack_dirty_into(values);
785 if self.mob_flags.is_dirty() {
786 values
787 .push(DataValue {
788 index: 15u8,
789 serializer_id: 0i32,
790 value: EntityData::Byte(*self.mob_flags.get()),
791 });
792 self.mob_flags.clear_dirty();
793 }
794 }
795 pub fn pack_all(&self) -> Vec<DataValue> {
797 let mut values = Vec::new();
798 self.pack_all_into(&mut values);
799 values
800 }
801 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
802 self.living_entity.pack_all_into(values);
803 if !self.mob_flags.is_default() {
804 values
805 .push(DataValue {
806 index: 15u8,
807 serializer_id: 0i32,
808 value: EntityData::Byte(*self.mob_flags.get()),
809 });
810 }
811 }
812 pub fn is_dirty(&self) -> bool {
814 self.living_entity.is_dirty() || self.mob_flags.is_dirty()
815 }
816}
817impl Default for MobEntityData {
818 fn default() -> Self {
819 Self::new()
820 }
821}
822impl VanillaEntityData for MobEntityData {
823 fn base(&self) -> &BaseEntityData {
824 MobEntityData::base(self)
825 }
826 fn base_mut(&mut self) -> &mut BaseEntityData {
827 MobEntityData::base_mut(self)
828 }
829 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
830 MobEntityData::pack_dirty(self)
831 }
832 fn pack_all(&self) -> Vec<DataValue> {
833 MobEntityData::pack_all(self)
834 }
835 fn is_dirty(&self) -> bool {
836 MobEntityData::is_dirty(self)
837 }
838}
839impl VanillaLivingEntityData for MobEntityData {
840 fn living_entity(&self) -> &LivingEntityData {
841 MobEntityData::living_entity(self)
842 }
843 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
844 MobEntityData::living_entity_mut(self)
845 }
846}
847#[derive(Debug, Clone)]
849pub struct AllayEntityData {
850 pub mob: MobEntityData,
851 pub dancing: SyncedValue<bool>,
852 pub can_duplicate: SyncedValue<bool>,
853}
854impl AllayEntityData {
855 pub fn new() -> Self {
857 Self {
858 mob: MobEntityData::new(),
859 dancing: SyncedValue::new(false),
860 can_duplicate: SyncedValue::new(true),
861 }
862 }
863 pub fn allay(&self) -> &AllayEntityData {
865 self
866 }
867 pub fn allay_mut(&mut self) -> &mut AllayEntityData {
869 self
870 }
871 pub fn mob(&self) -> &MobEntityData {
873 &self.mob
874 }
875 pub fn mob_mut(&mut self) -> &mut MobEntityData {
877 &mut self.mob
878 }
879 pub fn living_entity(&self) -> &LivingEntityData {
881 &self.mob.living_entity
882 }
883 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
885 &mut self.mob.living_entity
886 }
887 pub fn base(&self) -> &BaseEntityData {
889 &self.mob.living_entity.base
890 }
891 pub fn base_mut(&mut self) -> &mut BaseEntityData {
893 &mut self.mob.living_entity.base
894 }
895 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
898 let mut values = Vec::new();
899 self.pack_dirty_into(&mut values);
900 if values.is_empty() { None } else { Some(values) }
901 }
902 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
903 self.mob.pack_dirty_into(values);
904 if self.dancing.is_dirty() {
905 values
906 .push(DataValue {
907 index: 16u8,
908 serializer_id: 8i32,
909 value: EntityData::Boolean(*self.dancing.get()),
910 });
911 self.dancing.clear_dirty();
912 }
913 if self.can_duplicate.is_dirty() {
914 values
915 .push(DataValue {
916 index: 17u8,
917 serializer_id: 8i32,
918 value: EntityData::Boolean(*self.can_duplicate.get()),
919 });
920 self.can_duplicate.clear_dirty();
921 }
922 }
923 pub fn pack_all(&self) -> Vec<DataValue> {
925 let mut values = Vec::new();
926 self.pack_all_into(&mut values);
927 values
928 }
929 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
930 self.mob.pack_all_into(values);
931 if !self.dancing.is_default() {
932 values
933 .push(DataValue {
934 index: 16u8,
935 serializer_id: 8i32,
936 value: EntityData::Boolean(*self.dancing.get()),
937 });
938 }
939 if !self.can_duplicate.is_default() {
940 values
941 .push(DataValue {
942 index: 17u8,
943 serializer_id: 8i32,
944 value: EntityData::Boolean(*self.can_duplicate.get()),
945 });
946 }
947 }
948 pub fn is_dirty(&self) -> bool {
950 self.mob.is_dirty() || self.dancing.is_dirty() || self.can_duplicate.is_dirty()
951 }
952}
953impl Default for AllayEntityData {
954 fn default() -> Self {
955 Self::new()
956 }
957}
958impl VanillaEntityData for AllayEntityData {
959 fn base(&self) -> &BaseEntityData {
960 AllayEntityData::base(self)
961 }
962 fn base_mut(&mut self) -> &mut BaseEntityData {
963 AllayEntityData::base_mut(self)
964 }
965 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
966 AllayEntityData::pack_dirty(self)
967 }
968 fn pack_all(&self) -> Vec<DataValue> {
969 AllayEntityData::pack_all(self)
970 }
971 fn is_dirty(&self) -> bool {
972 AllayEntityData::is_dirty(self)
973 }
974}
975impl VanillaLivingEntityData for AllayEntityData {
976 fn living_entity(&self) -> &LivingEntityData {
977 AllayEntityData::living_entity(self)
978 }
979 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
980 AllayEntityData::living_entity_mut(self)
981 }
982}
983#[derive(Debug, Clone)]
985pub struct AreaEffectCloudEntityData {
986 pub base: BaseEntityData,
987 pub radius: SyncedValue<f32>,
988 pub waiting: SyncedValue<bool>,
989 pub particle: SyncedValue<ParticleData>,
990}
991impl AreaEffectCloudEntityData {
992 pub fn new() -> Self {
994 Self {
995 base: BaseEntityData::new(),
996 radius: SyncedValue::new(3f32),
997 waiting: SyncedValue::new(false),
998 particle: SyncedValue::new(
999 ParticleData::new(
1000 &crate::vanilla_particle_types::ENTITY_EFFECT,
1001 ColorParticleOption::new(ArgbColor::new(-1i32)),
1002 ),
1003 ),
1004 }
1005 }
1006 pub fn area_effect_cloud(&self) -> &AreaEffectCloudEntityData {
1008 self
1009 }
1010 pub fn area_effect_cloud_mut(&mut self) -> &mut AreaEffectCloudEntityData {
1012 self
1013 }
1014 pub fn base(&self) -> &BaseEntityData {
1016 &self.base
1017 }
1018 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1020 &mut self.base
1021 }
1022 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1025 let mut values = Vec::new();
1026 self.pack_dirty_into(&mut values);
1027 if values.is_empty() { None } else { Some(values) }
1028 }
1029 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1030 self.base.pack_dirty_into(values);
1031 if self.radius.is_dirty() {
1032 values
1033 .push(DataValue {
1034 index: 8u8,
1035 serializer_id: 3i32,
1036 value: EntityData::Float(*self.radius.get()),
1037 });
1038 self.radius.clear_dirty();
1039 }
1040 if self.waiting.is_dirty() {
1041 values
1042 .push(DataValue {
1043 index: 9u8,
1044 serializer_id: 8i32,
1045 value: EntityData::Boolean(*self.waiting.get()),
1046 });
1047 self.waiting.clear_dirty();
1048 }
1049 if self.particle.is_dirty() {
1050 values
1051 .push(DataValue {
1052 index: 10u8,
1053 serializer_id: 16i32,
1054 value: EntityData::Particle(self.particle.get().clone()),
1055 });
1056 self.particle.clear_dirty();
1057 }
1058 }
1059 pub fn pack_all(&self) -> Vec<DataValue> {
1061 let mut values = Vec::new();
1062 self.pack_all_into(&mut values);
1063 values
1064 }
1065 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1066 self.base.pack_all_into(values);
1067 if !self.radius.is_default() {
1068 values
1069 .push(DataValue {
1070 index: 8u8,
1071 serializer_id: 3i32,
1072 value: EntityData::Float(*self.radius.get()),
1073 });
1074 }
1075 if !self.waiting.is_default() {
1076 values
1077 .push(DataValue {
1078 index: 9u8,
1079 serializer_id: 8i32,
1080 value: EntityData::Boolean(*self.waiting.get()),
1081 });
1082 }
1083 if !self.particle.is_default() {
1084 values
1085 .push(DataValue {
1086 index: 10u8,
1087 serializer_id: 16i32,
1088 value: EntityData::Particle(self.particle.get().clone()),
1089 });
1090 }
1091 }
1092 pub fn is_dirty(&self) -> bool {
1094 self.base.is_dirty() || self.radius.is_dirty() || self.waiting.is_dirty()
1095 || self.particle.is_dirty()
1096 }
1097}
1098impl Default for AreaEffectCloudEntityData {
1099 fn default() -> Self {
1100 Self::new()
1101 }
1102}
1103impl VanillaEntityData for AreaEffectCloudEntityData {
1104 fn base(&self) -> &BaseEntityData {
1105 AreaEffectCloudEntityData::base(self)
1106 }
1107 fn base_mut(&mut self) -> &mut BaseEntityData {
1108 AreaEffectCloudEntityData::base_mut(self)
1109 }
1110 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1111 AreaEffectCloudEntityData::pack_dirty(self)
1112 }
1113 fn pack_all(&self) -> Vec<DataValue> {
1114 AreaEffectCloudEntityData::pack_all(self)
1115 }
1116 fn is_dirty(&self) -> bool {
1117 AreaEffectCloudEntityData::is_dirty(self)
1118 }
1119}
1120#[derive(Debug, Clone)]
1122pub struct AgeableMobEntityData {
1123 pub mob: MobEntityData,
1124 pub baby: SyncedValue<bool>,
1125 pub age_locked: SyncedValue<bool>,
1126}
1127impl AgeableMobEntityData {
1128 pub fn new() -> Self {
1130 Self {
1131 mob: MobEntityData::new(),
1132 baby: SyncedValue::new(false),
1133 age_locked: SyncedValue::new(false),
1134 }
1135 }
1136 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
1138 self
1139 }
1140 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
1142 self
1143 }
1144 pub fn mob(&self) -> &MobEntityData {
1146 &self.mob
1147 }
1148 pub fn mob_mut(&mut self) -> &mut MobEntityData {
1150 &mut self.mob
1151 }
1152 pub fn living_entity(&self) -> &LivingEntityData {
1154 &self.mob.living_entity
1155 }
1156 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1158 &mut self.mob.living_entity
1159 }
1160 pub fn base(&self) -> &BaseEntityData {
1162 &self.mob.living_entity.base
1163 }
1164 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1166 &mut self.mob.living_entity.base
1167 }
1168 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1171 let mut values = Vec::new();
1172 self.pack_dirty_into(&mut values);
1173 if values.is_empty() { None } else { Some(values) }
1174 }
1175 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1176 self.mob.pack_dirty_into(values);
1177 if self.baby.is_dirty() {
1178 values
1179 .push(DataValue {
1180 index: 16u8,
1181 serializer_id: 8i32,
1182 value: EntityData::Boolean(*self.baby.get()),
1183 });
1184 self.baby.clear_dirty();
1185 }
1186 if self.age_locked.is_dirty() {
1187 values
1188 .push(DataValue {
1189 index: 17u8,
1190 serializer_id: 8i32,
1191 value: EntityData::Boolean(*self.age_locked.get()),
1192 });
1193 self.age_locked.clear_dirty();
1194 }
1195 }
1196 pub fn pack_all(&self) -> Vec<DataValue> {
1198 let mut values = Vec::new();
1199 self.pack_all_into(&mut values);
1200 values
1201 }
1202 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1203 self.mob.pack_all_into(values);
1204 if !self.baby.is_default() {
1205 values
1206 .push(DataValue {
1207 index: 16u8,
1208 serializer_id: 8i32,
1209 value: EntityData::Boolean(*self.baby.get()),
1210 });
1211 }
1212 if !self.age_locked.is_default() {
1213 values
1214 .push(DataValue {
1215 index: 17u8,
1216 serializer_id: 8i32,
1217 value: EntityData::Boolean(*self.age_locked.get()),
1218 });
1219 }
1220 }
1221 pub fn is_dirty(&self) -> bool {
1223 self.mob.is_dirty() || self.baby.is_dirty() || self.age_locked.is_dirty()
1224 }
1225}
1226impl Default for AgeableMobEntityData {
1227 fn default() -> Self {
1228 Self::new()
1229 }
1230}
1231impl VanillaEntityData for AgeableMobEntityData {
1232 fn base(&self) -> &BaseEntityData {
1233 AgeableMobEntityData::base(self)
1234 }
1235 fn base_mut(&mut self) -> &mut BaseEntityData {
1236 AgeableMobEntityData::base_mut(self)
1237 }
1238 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1239 AgeableMobEntityData::pack_dirty(self)
1240 }
1241 fn pack_all(&self) -> Vec<DataValue> {
1242 AgeableMobEntityData::pack_all(self)
1243 }
1244 fn is_dirty(&self) -> bool {
1245 AgeableMobEntityData::is_dirty(self)
1246 }
1247}
1248impl VanillaLivingEntityData for AgeableMobEntityData {
1249 fn living_entity(&self) -> &LivingEntityData {
1250 AgeableMobEntityData::living_entity(self)
1251 }
1252 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1253 AgeableMobEntityData::living_entity_mut(self)
1254 }
1255}
1256#[derive(Debug, Clone)]
1258pub struct ArmadilloEntityData {
1259 pub ageable_mob: AgeableMobEntityData,
1260 pub armadillo_state: SyncedValue<ArmadilloState>,
1261}
1262impl ArmadilloEntityData {
1263 pub fn new() -> Self {
1265 Self {
1266 ageable_mob: AgeableMobEntityData::new(),
1267 armadillo_state: SyncedValue::new(ArmadilloState::Idle),
1268 }
1269 }
1270 pub fn armadillo(&self) -> &ArmadilloEntityData {
1272 self
1273 }
1274 pub fn armadillo_mut(&mut self) -> &mut ArmadilloEntityData {
1276 self
1277 }
1278 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
1280 &self.ageable_mob
1281 }
1282 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
1284 &mut self.ageable_mob
1285 }
1286 pub fn mob(&self) -> &MobEntityData {
1288 &self.ageable_mob.mob
1289 }
1290 pub fn mob_mut(&mut self) -> &mut MobEntityData {
1292 &mut self.ageable_mob.mob
1293 }
1294 pub fn living_entity(&self) -> &LivingEntityData {
1296 &self.ageable_mob.mob.living_entity
1297 }
1298 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1300 &mut self.ageable_mob.mob.living_entity
1301 }
1302 pub fn base(&self) -> &BaseEntityData {
1304 &self.ageable_mob.mob.living_entity.base
1305 }
1306 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1308 &mut self.ageable_mob.mob.living_entity.base
1309 }
1310 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1313 let mut values = Vec::new();
1314 self.pack_dirty_into(&mut values);
1315 if values.is_empty() { None } else { Some(values) }
1316 }
1317 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1318 self.ageable_mob.pack_dirty_into(values);
1319 if self.armadillo_state.is_dirty() {
1320 values
1321 .push(DataValue {
1322 index: 18u8,
1323 serializer_id: 36i32,
1324 value: EntityData::ArmadilloState(*self.armadillo_state.get()),
1325 });
1326 self.armadillo_state.clear_dirty();
1327 }
1328 }
1329 pub fn pack_all(&self) -> Vec<DataValue> {
1331 let mut values = Vec::new();
1332 self.pack_all_into(&mut values);
1333 values
1334 }
1335 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1336 self.ageable_mob.pack_all_into(values);
1337 if !self.armadillo_state.is_default() {
1338 values
1339 .push(DataValue {
1340 index: 18u8,
1341 serializer_id: 36i32,
1342 value: EntityData::ArmadilloState(*self.armadillo_state.get()),
1343 });
1344 }
1345 }
1346 pub fn is_dirty(&self) -> bool {
1348 self.ageable_mob.is_dirty() || self.armadillo_state.is_dirty()
1349 }
1350}
1351impl Default for ArmadilloEntityData {
1352 fn default() -> Self {
1353 Self::new()
1354 }
1355}
1356impl VanillaEntityData for ArmadilloEntityData {
1357 fn base(&self) -> &BaseEntityData {
1358 ArmadilloEntityData::base(self)
1359 }
1360 fn base_mut(&mut self) -> &mut BaseEntityData {
1361 ArmadilloEntityData::base_mut(self)
1362 }
1363 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1364 ArmadilloEntityData::pack_dirty(self)
1365 }
1366 fn pack_all(&self) -> Vec<DataValue> {
1367 ArmadilloEntityData::pack_all(self)
1368 }
1369 fn is_dirty(&self) -> bool {
1370 ArmadilloEntityData::is_dirty(self)
1371 }
1372}
1373impl VanillaLivingEntityData for ArmadilloEntityData {
1374 fn living_entity(&self) -> &LivingEntityData {
1375 ArmadilloEntityData::living_entity(self)
1376 }
1377 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1378 ArmadilloEntityData::living_entity_mut(self)
1379 }
1380}
1381#[derive(Debug, Clone)]
1383pub struct ArmorStandEntityData {
1384 pub living_entity: LivingEntityData,
1385 pub client_flags: SyncedValue<i8>,
1386 pub head_pose: SyncedValue<Rotations>,
1387 pub body_pose: SyncedValue<Rotations>,
1388 pub left_arm_pose: SyncedValue<Rotations>,
1389 pub right_arm_pose: SyncedValue<Rotations>,
1390 pub left_leg_pose: SyncedValue<Rotations>,
1391 pub right_leg_pose: SyncedValue<Rotations>,
1392}
1393impl ArmorStandEntityData {
1394 pub fn new() -> Self {
1396 Self {
1397 living_entity: LivingEntityData::new(),
1398 client_flags: SyncedValue::new(0i8),
1399 head_pose: SyncedValue::new(Rotations::new(0f32, 0f32, 0f32)),
1400 body_pose: SyncedValue::new(Rotations::new(0f32, 0f32, 0f32)),
1401 left_arm_pose: SyncedValue::new(Rotations::new(-10f32, 0f32, -10f32)),
1402 right_arm_pose: SyncedValue::new(Rotations::new(-15f32, 0f32, 10f32)),
1403 left_leg_pose: SyncedValue::new(Rotations::new(-1f32, 0f32, -1f32)),
1404 right_leg_pose: SyncedValue::new(Rotations::new(1f32, 0f32, 1f32)),
1405 }
1406 }
1407 pub fn armor_stand(&self) -> &ArmorStandEntityData {
1409 self
1410 }
1411 pub fn armor_stand_mut(&mut self) -> &mut ArmorStandEntityData {
1413 self
1414 }
1415 pub fn living_entity(&self) -> &LivingEntityData {
1417 &self.living_entity
1418 }
1419 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1421 &mut self.living_entity
1422 }
1423 pub fn base(&self) -> &BaseEntityData {
1425 &self.living_entity.base
1426 }
1427 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1429 &mut self.living_entity.base
1430 }
1431 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1434 let mut values = Vec::new();
1435 self.pack_dirty_into(&mut values);
1436 if values.is_empty() { None } else { Some(values) }
1437 }
1438 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1439 self.living_entity.pack_dirty_into(values);
1440 if self.client_flags.is_dirty() {
1441 values
1442 .push(DataValue {
1443 index: 15u8,
1444 serializer_id: 0i32,
1445 value: EntityData::Byte(*self.client_flags.get()),
1446 });
1447 self.client_flags.clear_dirty();
1448 }
1449 if self.head_pose.is_dirty() {
1450 values
1451 .push(DataValue {
1452 index: 16u8,
1453 serializer_id: 9i32,
1454 value: EntityData::Rotations(*self.head_pose.get()),
1455 });
1456 self.head_pose.clear_dirty();
1457 }
1458 if self.body_pose.is_dirty() {
1459 values
1460 .push(DataValue {
1461 index: 17u8,
1462 serializer_id: 9i32,
1463 value: EntityData::Rotations(*self.body_pose.get()),
1464 });
1465 self.body_pose.clear_dirty();
1466 }
1467 if self.left_arm_pose.is_dirty() {
1468 values
1469 .push(DataValue {
1470 index: 18u8,
1471 serializer_id: 9i32,
1472 value: EntityData::Rotations(*self.left_arm_pose.get()),
1473 });
1474 self.left_arm_pose.clear_dirty();
1475 }
1476 if self.right_arm_pose.is_dirty() {
1477 values
1478 .push(DataValue {
1479 index: 19u8,
1480 serializer_id: 9i32,
1481 value: EntityData::Rotations(*self.right_arm_pose.get()),
1482 });
1483 self.right_arm_pose.clear_dirty();
1484 }
1485 if self.left_leg_pose.is_dirty() {
1486 values
1487 .push(DataValue {
1488 index: 20u8,
1489 serializer_id: 9i32,
1490 value: EntityData::Rotations(*self.left_leg_pose.get()),
1491 });
1492 self.left_leg_pose.clear_dirty();
1493 }
1494 if self.right_leg_pose.is_dirty() {
1495 values
1496 .push(DataValue {
1497 index: 21u8,
1498 serializer_id: 9i32,
1499 value: EntityData::Rotations(*self.right_leg_pose.get()),
1500 });
1501 self.right_leg_pose.clear_dirty();
1502 }
1503 }
1504 pub fn pack_all(&self) -> Vec<DataValue> {
1506 let mut values = Vec::new();
1507 self.pack_all_into(&mut values);
1508 values
1509 }
1510 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1511 self.living_entity.pack_all_into(values);
1512 if !self.client_flags.is_default() {
1513 values
1514 .push(DataValue {
1515 index: 15u8,
1516 serializer_id: 0i32,
1517 value: EntityData::Byte(*self.client_flags.get()),
1518 });
1519 }
1520 if !self.head_pose.is_default() {
1521 values
1522 .push(DataValue {
1523 index: 16u8,
1524 serializer_id: 9i32,
1525 value: EntityData::Rotations(*self.head_pose.get()),
1526 });
1527 }
1528 if !self.body_pose.is_default() {
1529 values
1530 .push(DataValue {
1531 index: 17u8,
1532 serializer_id: 9i32,
1533 value: EntityData::Rotations(*self.body_pose.get()),
1534 });
1535 }
1536 if !self.left_arm_pose.is_default() {
1537 values
1538 .push(DataValue {
1539 index: 18u8,
1540 serializer_id: 9i32,
1541 value: EntityData::Rotations(*self.left_arm_pose.get()),
1542 });
1543 }
1544 if !self.right_arm_pose.is_default() {
1545 values
1546 .push(DataValue {
1547 index: 19u8,
1548 serializer_id: 9i32,
1549 value: EntityData::Rotations(*self.right_arm_pose.get()),
1550 });
1551 }
1552 if !self.left_leg_pose.is_default() {
1553 values
1554 .push(DataValue {
1555 index: 20u8,
1556 serializer_id: 9i32,
1557 value: EntityData::Rotations(*self.left_leg_pose.get()),
1558 });
1559 }
1560 if !self.right_leg_pose.is_default() {
1561 values
1562 .push(DataValue {
1563 index: 21u8,
1564 serializer_id: 9i32,
1565 value: EntityData::Rotations(*self.right_leg_pose.get()),
1566 });
1567 }
1568 }
1569 pub fn is_dirty(&self) -> bool {
1571 self.living_entity.is_dirty() || self.client_flags.is_dirty()
1572 || self.head_pose.is_dirty() || self.body_pose.is_dirty()
1573 || self.left_arm_pose.is_dirty() || self.right_arm_pose.is_dirty()
1574 || self.left_leg_pose.is_dirty() || self.right_leg_pose.is_dirty()
1575 }
1576}
1577impl Default for ArmorStandEntityData {
1578 fn default() -> Self {
1579 Self::new()
1580 }
1581}
1582impl VanillaEntityData for ArmorStandEntityData {
1583 fn base(&self) -> &BaseEntityData {
1584 ArmorStandEntityData::base(self)
1585 }
1586 fn base_mut(&mut self) -> &mut BaseEntityData {
1587 ArmorStandEntityData::base_mut(self)
1588 }
1589 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1590 ArmorStandEntityData::pack_dirty(self)
1591 }
1592 fn pack_all(&self) -> Vec<DataValue> {
1593 ArmorStandEntityData::pack_all(self)
1594 }
1595 fn is_dirty(&self) -> bool {
1596 ArmorStandEntityData::is_dirty(self)
1597 }
1598}
1599impl VanillaLivingEntityData for ArmorStandEntityData {
1600 fn living_entity(&self) -> &LivingEntityData {
1601 ArmorStandEntityData::living_entity(self)
1602 }
1603 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1604 ArmorStandEntityData::living_entity_mut(self)
1605 }
1606}
1607#[derive(Debug, Clone)]
1609pub struct AbstractArrowEntityData {
1610 pub base: BaseEntityData,
1611 pub id_flags: SyncedValue<i8>,
1612 pub pierce_level: SyncedValue<i8>,
1613 pub in_ground: SyncedValue<bool>,
1614}
1615impl AbstractArrowEntityData {
1616 pub fn new() -> Self {
1618 Self {
1619 base: BaseEntityData::new(),
1620 id_flags: SyncedValue::new(0i8),
1621 pierce_level: SyncedValue::new(0i8),
1622 in_ground: SyncedValue::new(false),
1623 }
1624 }
1625 pub fn abstract_arrow(&self) -> &AbstractArrowEntityData {
1627 self
1628 }
1629 pub fn abstract_arrow_mut(&mut self) -> &mut AbstractArrowEntityData {
1631 self
1632 }
1633 pub fn base(&self) -> &BaseEntityData {
1635 &self.base
1636 }
1637 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1639 &mut self.base
1640 }
1641 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1644 let mut values = Vec::new();
1645 self.pack_dirty_into(&mut values);
1646 if values.is_empty() { None } else { Some(values) }
1647 }
1648 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1649 self.base.pack_dirty_into(values);
1650 if self.id_flags.is_dirty() {
1651 values
1652 .push(DataValue {
1653 index: 8u8,
1654 serializer_id: 0i32,
1655 value: EntityData::Byte(*self.id_flags.get()),
1656 });
1657 self.id_flags.clear_dirty();
1658 }
1659 if self.pierce_level.is_dirty() {
1660 values
1661 .push(DataValue {
1662 index: 9u8,
1663 serializer_id: 0i32,
1664 value: EntityData::Byte(*self.pierce_level.get()),
1665 });
1666 self.pierce_level.clear_dirty();
1667 }
1668 if self.in_ground.is_dirty() {
1669 values
1670 .push(DataValue {
1671 index: 10u8,
1672 serializer_id: 8i32,
1673 value: EntityData::Boolean(*self.in_ground.get()),
1674 });
1675 self.in_ground.clear_dirty();
1676 }
1677 }
1678 pub fn pack_all(&self) -> Vec<DataValue> {
1680 let mut values = Vec::new();
1681 self.pack_all_into(&mut values);
1682 values
1683 }
1684 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1685 self.base.pack_all_into(values);
1686 if !self.id_flags.is_default() {
1687 values
1688 .push(DataValue {
1689 index: 8u8,
1690 serializer_id: 0i32,
1691 value: EntityData::Byte(*self.id_flags.get()),
1692 });
1693 }
1694 if !self.pierce_level.is_default() {
1695 values
1696 .push(DataValue {
1697 index: 9u8,
1698 serializer_id: 0i32,
1699 value: EntityData::Byte(*self.pierce_level.get()),
1700 });
1701 }
1702 if !self.in_ground.is_default() {
1703 values
1704 .push(DataValue {
1705 index: 10u8,
1706 serializer_id: 8i32,
1707 value: EntityData::Boolean(*self.in_ground.get()),
1708 });
1709 }
1710 }
1711 pub fn is_dirty(&self) -> bool {
1713 self.base.is_dirty() || self.id_flags.is_dirty() || self.pierce_level.is_dirty()
1714 || self.in_ground.is_dirty()
1715 }
1716}
1717impl Default for AbstractArrowEntityData {
1718 fn default() -> Self {
1719 Self::new()
1720 }
1721}
1722impl VanillaEntityData for AbstractArrowEntityData {
1723 fn base(&self) -> &BaseEntityData {
1724 AbstractArrowEntityData::base(self)
1725 }
1726 fn base_mut(&mut self) -> &mut BaseEntityData {
1727 AbstractArrowEntityData::base_mut(self)
1728 }
1729 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1730 AbstractArrowEntityData::pack_dirty(self)
1731 }
1732 fn pack_all(&self) -> Vec<DataValue> {
1733 AbstractArrowEntityData::pack_all(self)
1734 }
1735 fn is_dirty(&self) -> bool {
1736 AbstractArrowEntityData::is_dirty(self)
1737 }
1738}
1739#[derive(Debug, Clone)]
1741pub struct ArrowEntityData {
1742 pub abstract_arrow: AbstractArrowEntityData,
1743 pub id_effect_color: SyncedValue<i32>,
1744}
1745impl ArrowEntityData {
1746 pub fn new() -> Self {
1748 Self {
1749 abstract_arrow: AbstractArrowEntityData::new(),
1750 id_effect_color: SyncedValue::new(-1i32),
1751 }
1752 }
1753 pub fn arrow(&self) -> &ArrowEntityData {
1755 self
1756 }
1757 pub fn arrow_mut(&mut self) -> &mut ArrowEntityData {
1759 self
1760 }
1761 pub fn abstract_arrow(&self) -> &AbstractArrowEntityData {
1763 &self.abstract_arrow
1764 }
1765 pub fn abstract_arrow_mut(&mut self) -> &mut AbstractArrowEntityData {
1767 &mut self.abstract_arrow
1768 }
1769 pub fn base(&self) -> &BaseEntityData {
1771 &self.abstract_arrow.base
1772 }
1773 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1775 &mut self.abstract_arrow.base
1776 }
1777 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1780 let mut values = Vec::new();
1781 self.pack_dirty_into(&mut values);
1782 if values.is_empty() { None } else { Some(values) }
1783 }
1784 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1785 self.abstract_arrow.pack_dirty_into(values);
1786 if self.id_effect_color.is_dirty() {
1787 values
1788 .push(DataValue {
1789 index: 11u8,
1790 serializer_id: 1i32,
1791 value: EntityData::Int(*self.id_effect_color.get()),
1792 });
1793 self.id_effect_color.clear_dirty();
1794 }
1795 }
1796 pub fn pack_all(&self) -> Vec<DataValue> {
1798 let mut values = Vec::new();
1799 self.pack_all_into(&mut values);
1800 values
1801 }
1802 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1803 self.abstract_arrow.pack_all_into(values);
1804 if !self.id_effect_color.is_default() {
1805 values
1806 .push(DataValue {
1807 index: 11u8,
1808 serializer_id: 1i32,
1809 value: EntityData::Int(*self.id_effect_color.get()),
1810 });
1811 }
1812 }
1813 pub fn is_dirty(&self) -> bool {
1815 self.abstract_arrow.is_dirty() || self.id_effect_color.is_dirty()
1816 }
1817}
1818impl Default for ArrowEntityData {
1819 fn default() -> Self {
1820 Self::new()
1821 }
1822}
1823impl VanillaEntityData for ArrowEntityData {
1824 fn base(&self) -> &BaseEntityData {
1825 ArrowEntityData::base(self)
1826 }
1827 fn base_mut(&mut self) -> &mut BaseEntityData {
1828 ArrowEntityData::base_mut(self)
1829 }
1830 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1831 ArrowEntityData::pack_dirty(self)
1832 }
1833 fn pack_all(&self) -> Vec<DataValue> {
1834 ArrowEntityData::pack_all(self)
1835 }
1836 fn is_dirty(&self) -> bool {
1837 ArrowEntityData::is_dirty(self)
1838 }
1839}
1840#[derive(Debug, Clone)]
1842pub struct AxolotlEntityData {
1843 pub ageable_mob: AgeableMobEntityData,
1844 pub variant: SyncedValue<i32>,
1845 pub playing_dead: SyncedValue<bool>,
1846 pub from_bucket: SyncedValue<bool>,
1847}
1848impl AxolotlEntityData {
1849 pub fn new() -> Self {
1851 let mut data = Self {
1852 ageable_mob: AgeableMobEntityData::new(),
1853 variant: SyncedValue::new(0i32),
1854 playing_dead: SyncedValue::new(false),
1855 from_bucket: SyncedValue::new(false),
1856 };
1857 data.ageable_mob.mob.living_entity.base.air_supply = SyncedValue::new(6000i32);
1858 data
1859 }
1860 pub fn axolotl(&self) -> &AxolotlEntityData {
1862 self
1863 }
1864 pub fn axolotl_mut(&mut self) -> &mut AxolotlEntityData {
1866 self
1867 }
1868 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
1870 &self.ageable_mob
1871 }
1872 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
1874 &mut self.ageable_mob
1875 }
1876 pub fn mob(&self) -> &MobEntityData {
1878 &self.ageable_mob.mob
1879 }
1880 pub fn mob_mut(&mut self) -> &mut MobEntityData {
1882 &mut self.ageable_mob.mob
1883 }
1884 pub fn living_entity(&self) -> &LivingEntityData {
1886 &self.ageable_mob.mob.living_entity
1887 }
1888 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
1890 &mut self.ageable_mob.mob.living_entity
1891 }
1892 pub fn base(&self) -> &BaseEntityData {
1894 &self.ageable_mob.mob.living_entity.base
1895 }
1896 pub fn base_mut(&mut self) -> &mut BaseEntityData {
1898 &mut self.ageable_mob.mob.living_entity.base
1899 }
1900 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1903 let mut values = Vec::new();
1904 self.pack_dirty_into(&mut values);
1905 if values.is_empty() { None } else { Some(values) }
1906 }
1907 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
1908 self.ageable_mob.pack_dirty_into(values);
1909 if self.variant.is_dirty() {
1910 values
1911 .push(DataValue {
1912 index: 18u8,
1913 serializer_id: 1i32,
1914 value: EntityData::Int(*self.variant.get()),
1915 });
1916 self.variant.clear_dirty();
1917 }
1918 if self.playing_dead.is_dirty() {
1919 values
1920 .push(DataValue {
1921 index: 19u8,
1922 serializer_id: 8i32,
1923 value: EntityData::Boolean(*self.playing_dead.get()),
1924 });
1925 self.playing_dead.clear_dirty();
1926 }
1927 if self.from_bucket.is_dirty() {
1928 values
1929 .push(DataValue {
1930 index: 20u8,
1931 serializer_id: 8i32,
1932 value: EntityData::Boolean(*self.from_bucket.get()),
1933 });
1934 self.from_bucket.clear_dirty();
1935 }
1936 }
1937 pub fn pack_all(&self) -> Vec<DataValue> {
1939 let mut values = Vec::new();
1940 self.pack_all_into(&mut values);
1941 values
1942 }
1943 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
1944 self.ageable_mob.pack_all_into(values);
1945 if !self.variant.is_default() {
1946 values
1947 .push(DataValue {
1948 index: 18u8,
1949 serializer_id: 1i32,
1950 value: EntityData::Int(*self.variant.get()),
1951 });
1952 }
1953 if !self.playing_dead.is_default() {
1954 values
1955 .push(DataValue {
1956 index: 19u8,
1957 serializer_id: 8i32,
1958 value: EntityData::Boolean(*self.playing_dead.get()),
1959 });
1960 }
1961 if !self.from_bucket.is_default() {
1962 values
1963 .push(DataValue {
1964 index: 20u8,
1965 serializer_id: 8i32,
1966 value: EntityData::Boolean(*self.from_bucket.get()),
1967 });
1968 }
1969 }
1970 pub fn is_dirty(&self) -> bool {
1972 self.ageable_mob.is_dirty() || self.variant.is_dirty()
1973 || self.playing_dead.is_dirty() || self.from_bucket.is_dirty()
1974 }
1975}
1976impl Default for AxolotlEntityData {
1977 fn default() -> Self {
1978 Self::new()
1979 }
1980}
1981impl VanillaEntityData for AxolotlEntityData {
1982 fn base(&self) -> &BaseEntityData {
1983 AxolotlEntityData::base(self)
1984 }
1985 fn base_mut(&mut self) -> &mut BaseEntityData {
1986 AxolotlEntityData::base_mut(self)
1987 }
1988 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
1989 AxolotlEntityData::pack_dirty(self)
1990 }
1991 fn pack_all(&self) -> Vec<DataValue> {
1992 AxolotlEntityData::pack_all(self)
1993 }
1994 fn is_dirty(&self) -> bool {
1995 AxolotlEntityData::is_dirty(self)
1996 }
1997}
1998impl VanillaLivingEntityData for AxolotlEntityData {
1999 fn living_entity(&self) -> &LivingEntityData {
2000 AxolotlEntityData::living_entity(self)
2001 }
2002 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2003 AxolotlEntityData::living_entity_mut(self)
2004 }
2005}
2006#[derive(Debug, Clone)]
2008pub struct BatEntityData {
2009 pub mob: MobEntityData,
2010 pub id_flags: SyncedValue<i8>,
2011}
2012impl BatEntityData {
2013 pub fn new() -> Self {
2015 Self {
2016 mob: MobEntityData::new(),
2017 id_flags: SyncedValue::new(0i8),
2018 }
2019 }
2020 pub fn bat(&self) -> &BatEntityData {
2022 self
2023 }
2024 pub fn bat_mut(&mut self) -> &mut BatEntityData {
2026 self
2027 }
2028 pub fn mob(&self) -> &MobEntityData {
2030 &self.mob
2031 }
2032 pub fn mob_mut(&mut self) -> &mut MobEntityData {
2034 &mut self.mob
2035 }
2036 pub fn living_entity(&self) -> &LivingEntityData {
2038 &self.mob.living_entity
2039 }
2040 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2042 &mut self.mob.living_entity
2043 }
2044 pub fn base(&self) -> &BaseEntityData {
2046 &self.mob.living_entity.base
2047 }
2048 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2050 &mut self.mob.living_entity.base
2051 }
2052 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2055 let mut values = Vec::new();
2056 self.pack_dirty_into(&mut values);
2057 if values.is_empty() { None } else { Some(values) }
2058 }
2059 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2060 self.mob.pack_dirty_into(values);
2061 if self.id_flags.is_dirty() {
2062 values
2063 .push(DataValue {
2064 index: 16u8,
2065 serializer_id: 0i32,
2066 value: EntityData::Byte(*self.id_flags.get()),
2067 });
2068 self.id_flags.clear_dirty();
2069 }
2070 }
2071 pub fn pack_all(&self) -> Vec<DataValue> {
2073 let mut values = Vec::new();
2074 self.pack_all_into(&mut values);
2075 values
2076 }
2077 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2078 self.mob.pack_all_into(values);
2079 if !self.id_flags.is_default() {
2080 values
2081 .push(DataValue {
2082 index: 16u8,
2083 serializer_id: 0i32,
2084 value: EntityData::Byte(*self.id_flags.get()),
2085 });
2086 }
2087 }
2088 pub fn is_dirty(&self) -> bool {
2090 self.mob.is_dirty() || self.id_flags.is_dirty()
2091 }
2092}
2093impl Default for BatEntityData {
2094 fn default() -> Self {
2095 Self::new()
2096 }
2097}
2098impl VanillaEntityData for BatEntityData {
2099 fn base(&self) -> &BaseEntityData {
2100 BatEntityData::base(self)
2101 }
2102 fn base_mut(&mut self) -> &mut BaseEntityData {
2103 BatEntityData::base_mut(self)
2104 }
2105 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2106 BatEntityData::pack_dirty(self)
2107 }
2108 fn pack_all(&self) -> Vec<DataValue> {
2109 BatEntityData::pack_all(self)
2110 }
2111 fn is_dirty(&self) -> bool {
2112 BatEntityData::is_dirty(self)
2113 }
2114}
2115impl VanillaLivingEntityData for BatEntityData {
2116 fn living_entity(&self) -> &LivingEntityData {
2117 BatEntityData::living_entity(self)
2118 }
2119 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2120 BatEntityData::living_entity_mut(self)
2121 }
2122}
2123#[derive(Debug, Clone)]
2125pub struct BeeEntityData {
2126 pub ageable_mob: AgeableMobEntityData,
2127 pub flags: SyncedValue<i8>,
2128 pub anger_end_time: SyncedValue<i64>,
2129}
2130impl BeeEntityData {
2131 pub fn new() -> Self {
2133 Self {
2134 ageable_mob: AgeableMobEntityData::new(),
2135 flags: SyncedValue::new(0i8),
2136 anger_end_time: SyncedValue::new(-1i64),
2137 }
2138 }
2139 pub fn bee(&self) -> &BeeEntityData {
2141 self
2142 }
2143 pub fn bee_mut(&mut self) -> &mut BeeEntityData {
2145 self
2146 }
2147 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
2149 &self.ageable_mob
2150 }
2151 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
2153 &mut self.ageable_mob
2154 }
2155 pub fn mob(&self) -> &MobEntityData {
2157 &self.ageable_mob.mob
2158 }
2159 pub fn mob_mut(&mut self) -> &mut MobEntityData {
2161 &mut self.ageable_mob.mob
2162 }
2163 pub fn living_entity(&self) -> &LivingEntityData {
2165 &self.ageable_mob.mob.living_entity
2166 }
2167 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2169 &mut self.ageable_mob.mob.living_entity
2170 }
2171 pub fn base(&self) -> &BaseEntityData {
2173 &self.ageable_mob.mob.living_entity.base
2174 }
2175 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2177 &mut self.ageable_mob.mob.living_entity.base
2178 }
2179 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2182 let mut values = Vec::new();
2183 self.pack_dirty_into(&mut values);
2184 if values.is_empty() { None } else { Some(values) }
2185 }
2186 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2187 self.ageable_mob.pack_dirty_into(values);
2188 if self.flags.is_dirty() {
2189 values
2190 .push(DataValue {
2191 index: 18u8,
2192 serializer_id: 0i32,
2193 value: EntityData::Byte(*self.flags.get()),
2194 });
2195 self.flags.clear_dirty();
2196 }
2197 if self.anger_end_time.is_dirty() {
2198 values
2199 .push(DataValue {
2200 index: 19u8,
2201 serializer_id: 2i32,
2202 value: EntityData::Long(*self.anger_end_time.get()),
2203 });
2204 self.anger_end_time.clear_dirty();
2205 }
2206 }
2207 pub fn pack_all(&self) -> Vec<DataValue> {
2209 let mut values = Vec::new();
2210 self.pack_all_into(&mut values);
2211 values
2212 }
2213 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2214 self.ageable_mob.pack_all_into(values);
2215 if !self.flags.is_default() {
2216 values
2217 .push(DataValue {
2218 index: 18u8,
2219 serializer_id: 0i32,
2220 value: EntityData::Byte(*self.flags.get()),
2221 });
2222 }
2223 if !self.anger_end_time.is_default() {
2224 values
2225 .push(DataValue {
2226 index: 19u8,
2227 serializer_id: 2i32,
2228 value: EntityData::Long(*self.anger_end_time.get()),
2229 });
2230 }
2231 }
2232 pub fn is_dirty(&self) -> bool {
2234 self.ageable_mob.is_dirty() || self.flags.is_dirty()
2235 || self.anger_end_time.is_dirty()
2236 }
2237}
2238impl Default for BeeEntityData {
2239 fn default() -> Self {
2240 Self::new()
2241 }
2242}
2243impl VanillaEntityData for BeeEntityData {
2244 fn base(&self) -> &BaseEntityData {
2245 BeeEntityData::base(self)
2246 }
2247 fn base_mut(&mut self) -> &mut BaseEntityData {
2248 BeeEntityData::base_mut(self)
2249 }
2250 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2251 BeeEntityData::pack_dirty(self)
2252 }
2253 fn pack_all(&self) -> Vec<DataValue> {
2254 BeeEntityData::pack_all(self)
2255 }
2256 fn is_dirty(&self) -> bool {
2257 BeeEntityData::is_dirty(self)
2258 }
2259}
2260impl VanillaLivingEntityData for BeeEntityData {
2261 fn living_entity(&self) -> &LivingEntityData {
2262 BeeEntityData::living_entity(self)
2263 }
2264 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2265 BeeEntityData::living_entity_mut(self)
2266 }
2267}
2268#[derive(Debug, Clone)]
2270pub struct BlazeEntityData {
2271 pub mob: MobEntityData,
2272 pub flags: SyncedValue<i8>,
2273}
2274impl BlazeEntityData {
2275 pub fn new() -> Self {
2277 Self {
2278 mob: MobEntityData::new(),
2279 flags: SyncedValue::new(0i8),
2280 }
2281 }
2282 pub fn blaze(&self) -> &BlazeEntityData {
2284 self
2285 }
2286 pub fn blaze_mut(&mut self) -> &mut BlazeEntityData {
2288 self
2289 }
2290 pub fn mob(&self) -> &MobEntityData {
2292 &self.mob
2293 }
2294 pub fn mob_mut(&mut self) -> &mut MobEntityData {
2296 &mut self.mob
2297 }
2298 pub fn living_entity(&self) -> &LivingEntityData {
2300 &self.mob.living_entity
2301 }
2302 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2304 &mut self.mob.living_entity
2305 }
2306 pub fn base(&self) -> &BaseEntityData {
2308 &self.mob.living_entity.base
2309 }
2310 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2312 &mut self.mob.living_entity.base
2313 }
2314 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2317 let mut values = Vec::new();
2318 self.pack_dirty_into(&mut values);
2319 if values.is_empty() { None } else { Some(values) }
2320 }
2321 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2322 self.mob.pack_dirty_into(values);
2323 if self.flags.is_dirty() {
2324 values
2325 .push(DataValue {
2326 index: 16u8,
2327 serializer_id: 0i32,
2328 value: EntityData::Byte(*self.flags.get()),
2329 });
2330 self.flags.clear_dirty();
2331 }
2332 }
2333 pub fn pack_all(&self) -> Vec<DataValue> {
2335 let mut values = Vec::new();
2336 self.pack_all_into(&mut values);
2337 values
2338 }
2339 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2340 self.mob.pack_all_into(values);
2341 if !self.flags.is_default() {
2342 values
2343 .push(DataValue {
2344 index: 16u8,
2345 serializer_id: 0i32,
2346 value: EntityData::Byte(*self.flags.get()),
2347 });
2348 }
2349 }
2350 pub fn is_dirty(&self) -> bool {
2352 self.mob.is_dirty() || self.flags.is_dirty()
2353 }
2354}
2355impl Default for BlazeEntityData {
2356 fn default() -> Self {
2357 Self::new()
2358 }
2359}
2360impl VanillaEntityData for BlazeEntityData {
2361 fn base(&self) -> &BaseEntityData {
2362 BlazeEntityData::base(self)
2363 }
2364 fn base_mut(&mut self) -> &mut BaseEntityData {
2365 BlazeEntityData::base_mut(self)
2366 }
2367 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2368 BlazeEntityData::pack_dirty(self)
2369 }
2370 fn pack_all(&self) -> Vec<DataValue> {
2371 BlazeEntityData::pack_all(self)
2372 }
2373 fn is_dirty(&self) -> bool {
2374 BlazeEntityData::is_dirty(self)
2375 }
2376}
2377impl VanillaLivingEntityData for BlazeEntityData {
2378 fn living_entity(&self) -> &LivingEntityData {
2379 BlazeEntityData::living_entity(self)
2380 }
2381 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2382 BlazeEntityData::living_entity_mut(self)
2383 }
2384}
2385#[derive(Debug, Clone)]
2387pub struct DisplayEntityData {
2388 pub base: BaseEntityData,
2389 pub transformation_interpolation_start_delta_ticks: SyncedValue<i32>,
2390 pub transformation_interpolation_duration: SyncedValue<i32>,
2391 pub pos_rot_interpolation_duration: SyncedValue<i32>,
2392 pub translation: SyncedValue<Vector3f>,
2393 pub scale: SyncedValue<Vector3f>,
2394 pub left_rotation: SyncedValue<Quaternionf>,
2395 pub right_rotation: SyncedValue<Quaternionf>,
2396 pub billboard_render_constraints: SyncedValue<i8>,
2397 pub brightness_override: SyncedValue<i32>,
2398 pub view_range: SyncedValue<f32>,
2399 pub shadow_radius: SyncedValue<f32>,
2400 pub shadow_strength: SyncedValue<f32>,
2401 pub width: SyncedValue<f32>,
2402 pub height: SyncedValue<f32>,
2403 pub glow_color_override: SyncedValue<i32>,
2404}
2405impl DisplayEntityData {
2406 pub fn new() -> Self {
2408 Self {
2409 base: BaseEntityData::new(),
2410 transformation_interpolation_start_delta_ticks: SyncedValue::new(0i32),
2411 transformation_interpolation_duration: SyncedValue::new(0i32),
2412 pos_rot_interpolation_duration: SyncedValue::new(0i32),
2413 translation: SyncedValue::new(Vector3f::new(0f32, 0f32, 0f32)),
2414 scale: SyncedValue::new(Vector3f::new(1f32, 1f32, 1f32)),
2415 left_rotation: SyncedValue::new(Quaternionf::new(0f32, 0f32, 0f32, 1f32)),
2416 right_rotation: SyncedValue::new(Quaternionf::new(0f32, 0f32, 0f32, 1f32)),
2417 billboard_render_constraints: SyncedValue::new(0i8),
2418 brightness_override: SyncedValue::new(-1i32),
2419 view_range: SyncedValue::new(1f32),
2420 shadow_radius: SyncedValue::new(0f32),
2421 shadow_strength: SyncedValue::new(1f32),
2422 width: SyncedValue::new(0f32),
2423 height: SyncedValue::new(0f32),
2424 glow_color_override: SyncedValue::new(-1i32),
2425 }
2426 }
2427 pub fn display(&self) -> &DisplayEntityData {
2429 self
2430 }
2431 pub fn display_mut(&mut self) -> &mut DisplayEntityData {
2433 self
2434 }
2435 pub fn base(&self) -> &BaseEntityData {
2437 &self.base
2438 }
2439 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2441 &mut self.base
2442 }
2443 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2446 let mut values = Vec::new();
2447 self.pack_dirty_into(&mut values);
2448 if values.is_empty() { None } else { Some(values) }
2449 }
2450 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2451 self.base.pack_dirty_into(values);
2452 if self.transformation_interpolation_start_delta_ticks.is_dirty() {
2453 values
2454 .push(DataValue {
2455 index: 8u8,
2456 serializer_id: 1i32,
2457 value: EntityData::Int(
2458 *self.transformation_interpolation_start_delta_ticks.get(),
2459 ),
2460 });
2461 self.transformation_interpolation_start_delta_ticks.clear_dirty();
2462 }
2463 if self.transformation_interpolation_duration.is_dirty() {
2464 values
2465 .push(DataValue {
2466 index: 9u8,
2467 serializer_id: 1i32,
2468 value: EntityData::Int(
2469 *self.transformation_interpolation_duration.get(),
2470 ),
2471 });
2472 self.transformation_interpolation_duration.clear_dirty();
2473 }
2474 if self.pos_rot_interpolation_duration.is_dirty() {
2475 values
2476 .push(DataValue {
2477 index: 10u8,
2478 serializer_id: 1i32,
2479 value: EntityData::Int(*self.pos_rot_interpolation_duration.get()),
2480 });
2481 self.pos_rot_interpolation_duration.clear_dirty();
2482 }
2483 if self.translation.is_dirty() {
2484 values
2485 .push(DataValue {
2486 index: 11u8,
2487 serializer_id: 39i32,
2488 value: EntityData::Vector3(*self.translation.get()),
2489 });
2490 self.translation.clear_dirty();
2491 }
2492 if self.scale.is_dirty() {
2493 values
2494 .push(DataValue {
2495 index: 12u8,
2496 serializer_id: 39i32,
2497 value: EntityData::Vector3(*self.scale.get()),
2498 });
2499 self.scale.clear_dirty();
2500 }
2501 if self.left_rotation.is_dirty() {
2502 values
2503 .push(DataValue {
2504 index: 13u8,
2505 serializer_id: 40i32,
2506 value: EntityData::Quaternion(*self.left_rotation.get()),
2507 });
2508 self.left_rotation.clear_dirty();
2509 }
2510 if self.right_rotation.is_dirty() {
2511 values
2512 .push(DataValue {
2513 index: 14u8,
2514 serializer_id: 40i32,
2515 value: EntityData::Quaternion(*self.right_rotation.get()),
2516 });
2517 self.right_rotation.clear_dirty();
2518 }
2519 if self.billboard_render_constraints.is_dirty() {
2520 values
2521 .push(DataValue {
2522 index: 15u8,
2523 serializer_id: 0i32,
2524 value: EntityData::Byte(*self.billboard_render_constraints.get()),
2525 });
2526 self.billboard_render_constraints.clear_dirty();
2527 }
2528 if self.brightness_override.is_dirty() {
2529 values
2530 .push(DataValue {
2531 index: 16u8,
2532 serializer_id: 1i32,
2533 value: EntityData::Int(*self.brightness_override.get()),
2534 });
2535 self.brightness_override.clear_dirty();
2536 }
2537 if self.view_range.is_dirty() {
2538 values
2539 .push(DataValue {
2540 index: 17u8,
2541 serializer_id: 3i32,
2542 value: EntityData::Float(*self.view_range.get()),
2543 });
2544 self.view_range.clear_dirty();
2545 }
2546 if self.shadow_radius.is_dirty() {
2547 values
2548 .push(DataValue {
2549 index: 18u8,
2550 serializer_id: 3i32,
2551 value: EntityData::Float(*self.shadow_radius.get()),
2552 });
2553 self.shadow_radius.clear_dirty();
2554 }
2555 if self.shadow_strength.is_dirty() {
2556 values
2557 .push(DataValue {
2558 index: 19u8,
2559 serializer_id: 3i32,
2560 value: EntityData::Float(*self.shadow_strength.get()),
2561 });
2562 self.shadow_strength.clear_dirty();
2563 }
2564 if self.width.is_dirty() {
2565 values
2566 .push(DataValue {
2567 index: 20u8,
2568 serializer_id: 3i32,
2569 value: EntityData::Float(*self.width.get()),
2570 });
2571 self.width.clear_dirty();
2572 }
2573 if self.height.is_dirty() {
2574 values
2575 .push(DataValue {
2576 index: 21u8,
2577 serializer_id: 3i32,
2578 value: EntityData::Float(*self.height.get()),
2579 });
2580 self.height.clear_dirty();
2581 }
2582 if self.glow_color_override.is_dirty() {
2583 values
2584 .push(DataValue {
2585 index: 22u8,
2586 serializer_id: 1i32,
2587 value: EntityData::Int(*self.glow_color_override.get()),
2588 });
2589 self.glow_color_override.clear_dirty();
2590 }
2591 }
2592 pub fn pack_all(&self) -> Vec<DataValue> {
2594 let mut values = Vec::new();
2595 self.pack_all_into(&mut values);
2596 values
2597 }
2598 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2599 self.base.pack_all_into(values);
2600 if !self.transformation_interpolation_start_delta_ticks.is_default() {
2601 values
2602 .push(DataValue {
2603 index: 8u8,
2604 serializer_id: 1i32,
2605 value: EntityData::Int(
2606 *self.transformation_interpolation_start_delta_ticks.get(),
2607 ),
2608 });
2609 }
2610 if !self.transformation_interpolation_duration.is_default() {
2611 values
2612 .push(DataValue {
2613 index: 9u8,
2614 serializer_id: 1i32,
2615 value: EntityData::Int(
2616 *self.transformation_interpolation_duration.get(),
2617 ),
2618 });
2619 }
2620 if !self.pos_rot_interpolation_duration.is_default() {
2621 values
2622 .push(DataValue {
2623 index: 10u8,
2624 serializer_id: 1i32,
2625 value: EntityData::Int(*self.pos_rot_interpolation_duration.get()),
2626 });
2627 }
2628 if !self.translation.is_default() {
2629 values
2630 .push(DataValue {
2631 index: 11u8,
2632 serializer_id: 39i32,
2633 value: EntityData::Vector3(*self.translation.get()),
2634 });
2635 }
2636 if !self.scale.is_default() {
2637 values
2638 .push(DataValue {
2639 index: 12u8,
2640 serializer_id: 39i32,
2641 value: EntityData::Vector3(*self.scale.get()),
2642 });
2643 }
2644 if !self.left_rotation.is_default() {
2645 values
2646 .push(DataValue {
2647 index: 13u8,
2648 serializer_id: 40i32,
2649 value: EntityData::Quaternion(*self.left_rotation.get()),
2650 });
2651 }
2652 if !self.right_rotation.is_default() {
2653 values
2654 .push(DataValue {
2655 index: 14u8,
2656 serializer_id: 40i32,
2657 value: EntityData::Quaternion(*self.right_rotation.get()),
2658 });
2659 }
2660 if !self.billboard_render_constraints.is_default() {
2661 values
2662 .push(DataValue {
2663 index: 15u8,
2664 serializer_id: 0i32,
2665 value: EntityData::Byte(*self.billboard_render_constraints.get()),
2666 });
2667 }
2668 if !self.brightness_override.is_default() {
2669 values
2670 .push(DataValue {
2671 index: 16u8,
2672 serializer_id: 1i32,
2673 value: EntityData::Int(*self.brightness_override.get()),
2674 });
2675 }
2676 if !self.view_range.is_default() {
2677 values
2678 .push(DataValue {
2679 index: 17u8,
2680 serializer_id: 3i32,
2681 value: EntityData::Float(*self.view_range.get()),
2682 });
2683 }
2684 if !self.shadow_radius.is_default() {
2685 values
2686 .push(DataValue {
2687 index: 18u8,
2688 serializer_id: 3i32,
2689 value: EntityData::Float(*self.shadow_radius.get()),
2690 });
2691 }
2692 if !self.shadow_strength.is_default() {
2693 values
2694 .push(DataValue {
2695 index: 19u8,
2696 serializer_id: 3i32,
2697 value: EntityData::Float(*self.shadow_strength.get()),
2698 });
2699 }
2700 if !self.width.is_default() {
2701 values
2702 .push(DataValue {
2703 index: 20u8,
2704 serializer_id: 3i32,
2705 value: EntityData::Float(*self.width.get()),
2706 });
2707 }
2708 if !self.height.is_default() {
2709 values
2710 .push(DataValue {
2711 index: 21u8,
2712 serializer_id: 3i32,
2713 value: EntityData::Float(*self.height.get()),
2714 });
2715 }
2716 if !self.glow_color_override.is_default() {
2717 values
2718 .push(DataValue {
2719 index: 22u8,
2720 serializer_id: 1i32,
2721 value: EntityData::Int(*self.glow_color_override.get()),
2722 });
2723 }
2724 }
2725 pub fn is_dirty(&self) -> bool {
2727 self.base.is_dirty()
2728 || self.transformation_interpolation_start_delta_ticks.is_dirty()
2729 || self.transformation_interpolation_duration.is_dirty()
2730 || self.pos_rot_interpolation_duration.is_dirty()
2731 || self.translation.is_dirty() || self.scale.is_dirty()
2732 || self.left_rotation.is_dirty() || self.right_rotation.is_dirty()
2733 || self.billboard_render_constraints.is_dirty()
2734 || self.brightness_override.is_dirty() || self.view_range.is_dirty()
2735 || self.shadow_radius.is_dirty() || self.shadow_strength.is_dirty()
2736 || self.width.is_dirty() || self.height.is_dirty()
2737 || self.glow_color_override.is_dirty()
2738 }
2739}
2740impl Default for DisplayEntityData {
2741 fn default() -> Self {
2742 Self::new()
2743 }
2744}
2745impl VanillaEntityData for DisplayEntityData {
2746 fn base(&self) -> &BaseEntityData {
2747 DisplayEntityData::base(self)
2748 }
2749 fn base_mut(&mut self) -> &mut BaseEntityData {
2750 DisplayEntityData::base_mut(self)
2751 }
2752 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2753 DisplayEntityData::pack_dirty(self)
2754 }
2755 fn pack_all(&self) -> Vec<DataValue> {
2756 DisplayEntityData::pack_all(self)
2757 }
2758 fn is_dirty(&self) -> bool {
2759 DisplayEntityData::is_dirty(self)
2760 }
2761}
2762#[derive(Debug, Clone)]
2764pub struct BlockDisplayEntityData {
2765 pub display: DisplayEntityData,
2766 pub block_state: SyncedValue<BlockStateId>,
2767}
2768impl BlockDisplayEntityData {
2769 pub fn new() -> Self {
2771 Self {
2772 display: DisplayEntityData::new(),
2773 block_state: SyncedValue::new(crate::vanilla_blocks::AIR.default_state()),
2774 }
2775 }
2776 pub fn block_display(&self) -> &BlockDisplayEntityData {
2778 self
2779 }
2780 pub fn block_display_mut(&mut self) -> &mut BlockDisplayEntityData {
2782 self
2783 }
2784 pub fn display(&self) -> &DisplayEntityData {
2786 &self.display
2787 }
2788 pub fn display_mut(&mut self) -> &mut DisplayEntityData {
2790 &mut self.display
2791 }
2792 pub fn base(&self) -> &BaseEntityData {
2794 &self.display.base
2795 }
2796 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2798 &mut self.display.base
2799 }
2800 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2803 let mut values = Vec::new();
2804 self.pack_dirty_into(&mut values);
2805 if values.is_empty() { None } else { Some(values) }
2806 }
2807 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2808 self.display.pack_dirty_into(values);
2809 if self.block_state.is_dirty() {
2810 values
2811 .push(DataValue {
2812 index: 23u8,
2813 serializer_id: 14i32,
2814 value: EntityData::BlockState(*self.block_state.get()),
2815 });
2816 self.block_state.clear_dirty();
2817 }
2818 }
2819 pub fn pack_all(&self) -> Vec<DataValue> {
2821 let mut values = Vec::new();
2822 self.pack_all_into(&mut values);
2823 values
2824 }
2825 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2826 self.display.pack_all_into(values);
2827 if !self.block_state.is_default() {
2828 values
2829 .push(DataValue {
2830 index: 23u8,
2831 serializer_id: 14i32,
2832 value: EntityData::BlockState(*self.block_state.get()),
2833 });
2834 }
2835 }
2836 pub fn is_dirty(&self) -> bool {
2838 self.display.is_dirty() || self.block_state.is_dirty()
2839 }
2840}
2841impl Default for BlockDisplayEntityData {
2842 fn default() -> Self {
2843 Self::new()
2844 }
2845}
2846impl VanillaEntityData for BlockDisplayEntityData {
2847 fn base(&self) -> &BaseEntityData {
2848 BlockDisplayEntityData::base(self)
2849 }
2850 fn base_mut(&mut self) -> &mut BaseEntityData {
2851 BlockDisplayEntityData::base_mut(self)
2852 }
2853 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2854 BlockDisplayEntityData::pack_dirty(self)
2855 }
2856 fn pack_all(&self) -> Vec<DataValue> {
2857 BlockDisplayEntityData::pack_all(self)
2858 }
2859 fn is_dirty(&self) -> bool {
2860 BlockDisplayEntityData::is_dirty(self)
2861 }
2862}
2863#[derive(Debug, Clone)]
2865pub struct BoggedEntityData {
2866 pub mob: MobEntityData,
2867 pub sheared: SyncedValue<bool>,
2868}
2869impl BoggedEntityData {
2870 pub fn new() -> Self {
2872 Self {
2873 mob: MobEntityData::new(),
2874 sheared: SyncedValue::new(false),
2875 }
2876 }
2877 pub fn bogged(&self) -> &BoggedEntityData {
2879 self
2880 }
2881 pub fn bogged_mut(&mut self) -> &mut BoggedEntityData {
2883 self
2884 }
2885 pub fn mob(&self) -> &MobEntityData {
2887 &self.mob
2888 }
2889 pub fn mob_mut(&mut self) -> &mut MobEntityData {
2891 &mut self.mob
2892 }
2893 pub fn living_entity(&self) -> &LivingEntityData {
2895 &self.mob.living_entity
2896 }
2897 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2899 &mut self.mob.living_entity
2900 }
2901 pub fn base(&self) -> &BaseEntityData {
2903 &self.mob.living_entity.base
2904 }
2905 pub fn base_mut(&mut self) -> &mut BaseEntityData {
2907 &mut self.mob.living_entity.base
2908 }
2909 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2912 let mut values = Vec::new();
2913 self.pack_dirty_into(&mut values);
2914 if values.is_empty() { None } else { Some(values) }
2915 }
2916 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
2917 self.mob.pack_dirty_into(values);
2918 if self.sheared.is_dirty() {
2919 values
2920 .push(DataValue {
2921 index: 16u8,
2922 serializer_id: 8i32,
2923 value: EntityData::Boolean(*self.sheared.get()),
2924 });
2925 self.sheared.clear_dirty();
2926 }
2927 }
2928 pub fn pack_all(&self) -> Vec<DataValue> {
2930 let mut values = Vec::new();
2931 self.pack_all_into(&mut values);
2932 values
2933 }
2934 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
2935 self.mob.pack_all_into(values);
2936 if !self.sheared.is_default() {
2937 values
2938 .push(DataValue {
2939 index: 16u8,
2940 serializer_id: 8i32,
2941 value: EntityData::Boolean(*self.sheared.get()),
2942 });
2943 }
2944 }
2945 pub fn is_dirty(&self) -> bool {
2947 self.mob.is_dirty() || self.sheared.is_dirty()
2948 }
2949}
2950impl Default for BoggedEntityData {
2951 fn default() -> Self {
2952 Self::new()
2953 }
2954}
2955impl VanillaEntityData for BoggedEntityData {
2956 fn base(&self) -> &BaseEntityData {
2957 BoggedEntityData::base(self)
2958 }
2959 fn base_mut(&mut self) -> &mut BaseEntityData {
2960 BoggedEntityData::base_mut(self)
2961 }
2962 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
2963 BoggedEntityData::pack_dirty(self)
2964 }
2965 fn pack_all(&self) -> Vec<DataValue> {
2966 BoggedEntityData::pack_all(self)
2967 }
2968 fn is_dirty(&self) -> bool {
2969 BoggedEntityData::is_dirty(self)
2970 }
2971}
2972impl VanillaLivingEntityData for BoggedEntityData {
2973 fn living_entity(&self) -> &LivingEntityData {
2974 BoggedEntityData::living_entity(self)
2975 }
2976 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
2977 BoggedEntityData::living_entity_mut(self)
2978 }
2979}
2980#[derive(Debug, Clone)]
2982pub struct AbstractHorseEntityData {
2983 pub ageable_mob: AgeableMobEntityData,
2984 pub id_flags: SyncedValue<i8>,
2985}
2986impl AbstractHorseEntityData {
2987 pub fn new() -> Self {
2989 Self {
2990 ageable_mob: AgeableMobEntityData::new(),
2991 id_flags: SyncedValue::new(0i8),
2992 }
2993 }
2994 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
2996 self
2997 }
2998 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
3000 self
3001 }
3002 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
3004 &self.ageable_mob
3005 }
3006 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
3008 &mut self.ageable_mob
3009 }
3010 pub fn mob(&self) -> &MobEntityData {
3012 &self.ageable_mob.mob
3013 }
3014 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3016 &mut self.ageable_mob.mob
3017 }
3018 pub fn living_entity(&self) -> &LivingEntityData {
3020 &self.ageable_mob.mob.living_entity
3021 }
3022 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3024 &mut self.ageable_mob.mob.living_entity
3025 }
3026 pub fn base(&self) -> &BaseEntityData {
3028 &self.ageable_mob.mob.living_entity.base
3029 }
3030 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3032 &mut self.ageable_mob.mob.living_entity.base
3033 }
3034 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3037 let mut values = Vec::new();
3038 self.pack_dirty_into(&mut values);
3039 if values.is_empty() { None } else { Some(values) }
3040 }
3041 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3042 self.ageable_mob.pack_dirty_into(values);
3043 if self.id_flags.is_dirty() {
3044 values
3045 .push(DataValue {
3046 index: 18u8,
3047 serializer_id: 0i32,
3048 value: EntityData::Byte(*self.id_flags.get()),
3049 });
3050 self.id_flags.clear_dirty();
3051 }
3052 }
3053 pub fn pack_all(&self) -> Vec<DataValue> {
3055 let mut values = Vec::new();
3056 self.pack_all_into(&mut values);
3057 values
3058 }
3059 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3060 self.ageable_mob.pack_all_into(values);
3061 if !self.id_flags.is_default() {
3062 values
3063 .push(DataValue {
3064 index: 18u8,
3065 serializer_id: 0i32,
3066 value: EntityData::Byte(*self.id_flags.get()),
3067 });
3068 }
3069 }
3070 pub fn is_dirty(&self) -> bool {
3072 self.ageable_mob.is_dirty() || self.id_flags.is_dirty()
3073 }
3074}
3075impl Default for AbstractHorseEntityData {
3076 fn default() -> Self {
3077 Self::new()
3078 }
3079}
3080impl VanillaEntityData for AbstractHorseEntityData {
3081 fn base(&self) -> &BaseEntityData {
3082 AbstractHorseEntityData::base(self)
3083 }
3084 fn base_mut(&mut self) -> &mut BaseEntityData {
3085 AbstractHorseEntityData::base_mut(self)
3086 }
3087 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3088 AbstractHorseEntityData::pack_dirty(self)
3089 }
3090 fn pack_all(&self) -> Vec<DataValue> {
3091 AbstractHorseEntityData::pack_all(self)
3092 }
3093 fn is_dirty(&self) -> bool {
3094 AbstractHorseEntityData::is_dirty(self)
3095 }
3096}
3097impl VanillaLivingEntityData for AbstractHorseEntityData {
3098 fn living_entity(&self) -> &LivingEntityData {
3099 AbstractHorseEntityData::living_entity(self)
3100 }
3101 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3102 AbstractHorseEntityData::living_entity_mut(self)
3103 }
3104}
3105#[derive(Debug, Clone)]
3107pub struct CamelEntityData {
3108 pub abstract_horse: AbstractHorseEntityData,
3109 pub dash: SyncedValue<bool>,
3110 pub last_pose_change_tick: SyncedValue<i64>,
3111}
3112impl CamelEntityData {
3113 pub fn new() -> Self {
3115 Self {
3116 abstract_horse: AbstractHorseEntityData::new(),
3117 dash: SyncedValue::new(false),
3118 last_pose_change_tick: SyncedValue::new(0i64),
3119 }
3120 }
3121 pub fn camel(&self) -> &CamelEntityData {
3123 self
3124 }
3125 pub fn camel_mut(&mut self) -> &mut CamelEntityData {
3127 self
3128 }
3129 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
3131 &self.abstract_horse
3132 }
3133 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
3135 &mut self.abstract_horse
3136 }
3137 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
3139 &self.abstract_horse.ageable_mob
3140 }
3141 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
3143 &mut self.abstract_horse.ageable_mob
3144 }
3145 pub fn mob(&self) -> &MobEntityData {
3147 &self.abstract_horse.ageable_mob.mob
3148 }
3149 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3151 &mut self.abstract_horse.ageable_mob.mob
3152 }
3153 pub fn living_entity(&self) -> &LivingEntityData {
3155 &self.abstract_horse.ageable_mob.mob.living_entity
3156 }
3157 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3159 &mut self.abstract_horse.ageable_mob.mob.living_entity
3160 }
3161 pub fn base(&self) -> &BaseEntityData {
3163 &self.abstract_horse.ageable_mob.mob.living_entity.base
3164 }
3165 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3167 &mut self.abstract_horse.ageable_mob.mob.living_entity.base
3168 }
3169 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3172 let mut values = Vec::new();
3173 self.pack_dirty_into(&mut values);
3174 if values.is_empty() { None } else { Some(values) }
3175 }
3176 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3177 self.abstract_horse.pack_dirty_into(values);
3178 if self.dash.is_dirty() {
3179 values
3180 .push(DataValue {
3181 index: 19u8,
3182 serializer_id: 8i32,
3183 value: EntityData::Boolean(*self.dash.get()),
3184 });
3185 self.dash.clear_dirty();
3186 }
3187 if self.last_pose_change_tick.is_dirty() {
3188 values
3189 .push(DataValue {
3190 index: 20u8,
3191 serializer_id: 2i32,
3192 value: EntityData::Long(*self.last_pose_change_tick.get()),
3193 });
3194 self.last_pose_change_tick.clear_dirty();
3195 }
3196 }
3197 pub fn pack_all(&self) -> Vec<DataValue> {
3199 let mut values = Vec::new();
3200 self.pack_all_into(&mut values);
3201 values
3202 }
3203 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3204 self.abstract_horse.pack_all_into(values);
3205 if !self.dash.is_default() {
3206 values
3207 .push(DataValue {
3208 index: 19u8,
3209 serializer_id: 8i32,
3210 value: EntityData::Boolean(*self.dash.get()),
3211 });
3212 }
3213 if !self.last_pose_change_tick.is_default() {
3214 values
3215 .push(DataValue {
3216 index: 20u8,
3217 serializer_id: 2i32,
3218 value: EntityData::Long(*self.last_pose_change_tick.get()),
3219 });
3220 }
3221 }
3222 pub fn is_dirty(&self) -> bool {
3224 self.abstract_horse.is_dirty() || self.dash.is_dirty()
3225 || self.last_pose_change_tick.is_dirty()
3226 }
3227}
3228impl Default for CamelEntityData {
3229 fn default() -> Self {
3230 Self::new()
3231 }
3232}
3233impl VanillaEntityData for CamelEntityData {
3234 fn base(&self) -> &BaseEntityData {
3235 CamelEntityData::base(self)
3236 }
3237 fn base_mut(&mut self) -> &mut BaseEntityData {
3238 CamelEntityData::base_mut(self)
3239 }
3240 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3241 CamelEntityData::pack_dirty(self)
3242 }
3243 fn pack_all(&self) -> Vec<DataValue> {
3244 CamelEntityData::pack_all(self)
3245 }
3246 fn is_dirty(&self) -> bool {
3247 CamelEntityData::is_dirty(self)
3248 }
3249}
3250impl VanillaLivingEntityData for CamelEntityData {
3251 fn living_entity(&self) -> &LivingEntityData {
3252 CamelEntityData::living_entity(self)
3253 }
3254 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3255 CamelEntityData::living_entity_mut(self)
3256 }
3257}
3258#[derive(Debug, Clone)]
3260pub struct TamableAnimalEntityData {
3261 pub ageable_mob: AgeableMobEntityData,
3262 pub flags: SyncedValue<i8>,
3263 pub owneruuid: SyncedValue<Option<Uuid>>,
3264}
3265impl TamableAnimalEntityData {
3266 pub fn new() -> Self {
3268 Self {
3269 ageable_mob: AgeableMobEntityData::new(),
3270 flags: SyncedValue::new(0i8),
3271 owneruuid: SyncedValue::new(None),
3272 }
3273 }
3274 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
3276 self
3277 }
3278 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
3280 self
3281 }
3282 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
3284 &self.ageable_mob
3285 }
3286 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
3288 &mut self.ageable_mob
3289 }
3290 pub fn mob(&self) -> &MobEntityData {
3292 &self.ageable_mob.mob
3293 }
3294 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3296 &mut self.ageable_mob.mob
3297 }
3298 pub fn living_entity(&self) -> &LivingEntityData {
3300 &self.ageable_mob.mob.living_entity
3301 }
3302 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3304 &mut self.ageable_mob.mob.living_entity
3305 }
3306 pub fn base(&self) -> &BaseEntityData {
3308 &self.ageable_mob.mob.living_entity.base
3309 }
3310 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3312 &mut self.ageable_mob.mob.living_entity.base
3313 }
3314 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3317 let mut values = Vec::new();
3318 self.pack_dirty_into(&mut values);
3319 if values.is_empty() { None } else { Some(values) }
3320 }
3321 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3322 self.ageable_mob.pack_dirty_into(values);
3323 if self.flags.is_dirty() {
3324 values
3325 .push(DataValue {
3326 index: 18u8,
3327 serializer_id: 0i32,
3328 value: EntityData::Byte(*self.flags.get()),
3329 });
3330 self.flags.clear_dirty();
3331 }
3332 if self.owneruuid.is_dirty() {
3333 values
3334 .push(DataValue {
3335 index: 19u8,
3336 serializer_id: 13i32,
3337 value: EntityData::OptionalLivingEntityRef(
3338 self.owneruuid.get().clone(),
3339 ),
3340 });
3341 self.owneruuid.clear_dirty();
3342 }
3343 }
3344 pub fn pack_all(&self) -> Vec<DataValue> {
3346 let mut values = Vec::new();
3347 self.pack_all_into(&mut values);
3348 values
3349 }
3350 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3351 self.ageable_mob.pack_all_into(values);
3352 if !self.flags.is_default() {
3353 values
3354 .push(DataValue {
3355 index: 18u8,
3356 serializer_id: 0i32,
3357 value: EntityData::Byte(*self.flags.get()),
3358 });
3359 }
3360 if !self.owneruuid.is_default() {
3361 values
3362 .push(DataValue {
3363 index: 19u8,
3364 serializer_id: 13i32,
3365 value: EntityData::OptionalLivingEntityRef(
3366 self.owneruuid.get().clone(),
3367 ),
3368 });
3369 }
3370 }
3371 pub fn is_dirty(&self) -> bool {
3373 self.ageable_mob.is_dirty() || self.flags.is_dirty() || self.owneruuid.is_dirty()
3374 }
3375}
3376impl Default for TamableAnimalEntityData {
3377 fn default() -> Self {
3378 Self::new()
3379 }
3380}
3381impl VanillaEntityData for TamableAnimalEntityData {
3382 fn base(&self) -> &BaseEntityData {
3383 TamableAnimalEntityData::base(self)
3384 }
3385 fn base_mut(&mut self) -> &mut BaseEntityData {
3386 TamableAnimalEntityData::base_mut(self)
3387 }
3388 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3389 TamableAnimalEntityData::pack_dirty(self)
3390 }
3391 fn pack_all(&self) -> Vec<DataValue> {
3392 TamableAnimalEntityData::pack_all(self)
3393 }
3394 fn is_dirty(&self) -> bool {
3395 TamableAnimalEntityData::is_dirty(self)
3396 }
3397}
3398impl VanillaLivingEntityData for TamableAnimalEntityData {
3399 fn living_entity(&self) -> &LivingEntityData {
3400 TamableAnimalEntityData::living_entity(self)
3401 }
3402 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3403 TamableAnimalEntityData::living_entity_mut(self)
3404 }
3405}
3406#[derive(Debug, Clone)]
3408pub struct CatEntityData {
3409 pub tamable_animal: TamableAnimalEntityData,
3410 pub variant: SyncedValue<RegistryReference<crate::cat_variant::CatVariant>>,
3411 pub is_lying: SyncedValue<bool>,
3412 pub relax_state_one: SyncedValue<bool>,
3413 pub collar_color: SyncedValue<i32>,
3414 pub sound_variant: SyncedValue<
3415 RegistryReference<crate::cat_sound_variant::CatSoundVariant>,
3416 >,
3417}
3418impl CatEntityData {
3419 pub fn new() -> Self {
3421 Self {
3422 tamable_animal: TamableAnimalEntityData::new(),
3423 variant: SyncedValue::new(
3424 RegistryReference::new(&crate::vanilla_cat_variants::BLACK),
3425 ),
3426 is_lying: SyncedValue::new(false),
3427 relax_state_one: SyncedValue::new(false),
3428 collar_color: SyncedValue::new(14i32),
3429 sound_variant: SyncedValue::new(
3430 RegistryReference::new(&crate::vanilla_cat_sound_variants::CLASSIC),
3431 ),
3432 }
3433 }
3434 pub fn cat(&self) -> &CatEntityData {
3436 self
3437 }
3438 pub fn cat_mut(&mut self) -> &mut CatEntityData {
3440 self
3441 }
3442 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
3444 &self.tamable_animal
3445 }
3446 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
3448 &mut self.tamable_animal
3449 }
3450 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
3452 &self.tamable_animal.ageable_mob
3453 }
3454 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
3456 &mut self.tamable_animal.ageable_mob
3457 }
3458 pub fn mob(&self) -> &MobEntityData {
3460 &self.tamable_animal.ageable_mob.mob
3461 }
3462 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3464 &mut self.tamable_animal.ageable_mob.mob
3465 }
3466 pub fn living_entity(&self) -> &LivingEntityData {
3468 &self.tamable_animal.ageable_mob.mob.living_entity
3469 }
3470 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3472 &mut self.tamable_animal.ageable_mob.mob.living_entity
3473 }
3474 pub fn base(&self) -> &BaseEntityData {
3476 &self.tamable_animal.ageable_mob.mob.living_entity.base
3477 }
3478 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3480 &mut self.tamable_animal.ageable_mob.mob.living_entity.base
3481 }
3482 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3485 let mut values = Vec::new();
3486 self.pack_dirty_into(&mut values);
3487 if values.is_empty() { None } else { Some(values) }
3488 }
3489 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3490 self.tamable_animal.pack_dirty_into(values);
3491 if self.variant.is_dirty() {
3492 values
3493 .push(DataValue {
3494 index: 20u8,
3495 serializer_id: 21i32,
3496 value: EntityData::CatVariant(*self.variant.get()),
3497 });
3498 self.variant.clear_dirty();
3499 }
3500 if self.is_lying.is_dirty() {
3501 values
3502 .push(DataValue {
3503 index: 21u8,
3504 serializer_id: 8i32,
3505 value: EntityData::Boolean(*self.is_lying.get()),
3506 });
3507 self.is_lying.clear_dirty();
3508 }
3509 if self.relax_state_one.is_dirty() {
3510 values
3511 .push(DataValue {
3512 index: 22u8,
3513 serializer_id: 8i32,
3514 value: EntityData::Boolean(*self.relax_state_one.get()),
3515 });
3516 self.relax_state_one.clear_dirty();
3517 }
3518 if self.collar_color.is_dirty() {
3519 values
3520 .push(DataValue {
3521 index: 23u8,
3522 serializer_id: 1i32,
3523 value: EntityData::Int(*self.collar_color.get()),
3524 });
3525 self.collar_color.clear_dirty();
3526 }
3527 if self.sound_variant.is_dirty() {
3528 values
3529 .push(DataValue {
3530 index: 24u8,
3531 serializer_id: 22i32,
3532 value: EntityData::CatSoundVariant(*self.sound_variant.get()),
3533 });
3534 self.sound_variant.clear_dirty();
3535 }
3536 }
3537 pub fn pack_all(&self) -> Vec<DataValue> {
3539 let mut values = Vec::new();
3540 self.pack_all_into(&mut values);
3541 values
3542 }
3543 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3544 self.tamable_animal.pack_all_into(values);
3545 if !self.variant.is_default() {
3546 values
3547 .push(DataValue {
3548 index: 20u8,
3549 serializer_id: 21i32,
3550 value: EntityData::CatVariant(*self.variant.get()),
3551 });
3552 }
3553 if !self.is_lying.is_default() {
3554 values
3555 .push(DataValue {
3556 index: 21u8,
3557 serializer_id: 8i32,
3558 value: EntityData::Boolean(*self.is_lying.get()),
3559 });
3560 }
3561 if !self.relax_state_one.is_default() {
3562 values
3563 .push(DataValue {
3564 index: 22u8,
3565 serializer_id: 8i32,
3566 value: EntityData::Boolean(*self.relax_state_one.get()),
3567 });
3568 }
3569 if !self.collar_color.is_default() {
3570 values
3571 .push(DataValue {
3572 index: 23u8,
3573 serializer_id: 1i32,
3574 value: EntityData::Int(*self.collar_color.get()),
3575 });
3576 }
3577 if !self.sound_variant.is_default() {
3578 values
3579 .push(DataValue {
3580 index: 24u8,
3581 serializer_id: 22i32,
3582 value: EntityData::CatSoundVariant(*self.sound_variant.get()),
3583 });
3584 }
3585 }
3586 pub fn is_dirty(&self) -> bool {
3588 self.tamable_animal.is_dirty() || self.variant.is_dirty()
3589 || self.is_lying.is_dirty() || self.relax_state_one.is_dirty()
3590 || self.collar_color.is_dirty() || self.sound_variant.is_dirty()
3591 }
3592}
3593impl Default for CatEntityData {
3594 fn default() -> Self {
3595 Self::new()
3596 }
3597}
3598impl VanillaEntityData for CatEntityData {
3599 fn base(&self) -> &BaseEntityData {
3600 CatEntityData::base(self)
3601 }
3602 fn base_mut(&mut self) -> &mut BaseEntityData {
3603 CatEntityData::base_mut(self)
3604 }
3605 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3606 CatEntityData::pack_dirty(self)
3607 }
3608 fn pack_all(&self) -> Vec<DataValue> {
3609 CatEntityData::pack_all(self)
3610 }
3611 fn is_dirty(&self) -> bool {
3612 CatEntityData::is_dirty(self)
3613 }
3614}
3615impl VanillaLivingEntityData for CatEntityData {
3616 fn living_entity(&self) -> &LivingEntityData {
3617 CatEntityData::living_entity(self)
3618 }
3619 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3620 CatEntityData::living_entity_mut(self)
3621 }
3622}
3623#[derive(Debug, Clone)]
3625pub struct SpiderEntityData {
3626 pub mob: MobEntityData,
3627 pub flags: SyncedValue<i8>,
3628}
3629impl SpiderEntityData {
3630 pub fn new() -> Self {
3632 Self {
3633 mob: MobEntityData::new(),
3634 flags: SyncedValue::new(0i8),
3635 }
3636 }
3637 pub fn spider(&self) -> &SpiderEntityData {
3639 self
3640 }
3641 pub fn spider_mut(&mut self) -> &mut SpiderEntityData {
3643 self
3644 }
3645 pub fn mob(&self) -> &MobEntityData {
3647 &self.mob
3648 }
3649 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3651 &mut self.mob
3652 }
3653 pub fn living_entity(&self) -> &LivingEntityData {
3655 &self.mob.living_entity
3656 }
3657 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3659 &mut self.mob.living_entity
3660 }
3661 pub fn base(&self) -> &BaseEntityData {
3663 &self.mob.living_entity.base
3664 }
3665 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3667 &mut self.mob.living_entity.base
3668 }
3669 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3672 let mut values = Vec::new();
3673 self.pack_dirty_into(&mut values);
3674 if values.is_empty() { None } else { Some(values) }
3675 }
3676 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3677 self.mob.pack_dirty_into(values);
3678 if self.flags.is_dirty() {
3679 values
3680 .push(DataValue {
3681 index: 16u8,
3682 serializer_id: 0i32,
3683 value: EntityData::Byte(*self.flags.get()),
3684 });
3685 self.flags.clear_dirty();
3686 }
3687 }
3688 pub fn pack_all(&self) -> Vec<DataValue> {
3690 let mut values = Vec::new();
3691 self.pack_all_into(&mut values);
3692 values
3693 }
3694 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3695 self.mob.pack_all_into(values);
3696 if !self.flags.is_default() {
3697 values
3698 .push(DataValue {
3699 index: 16u8,
3700 serializer_id: 0i32,
3701 value: EntityData::Byte(*self.flags.get()),
3702 });
3703 }
3704 }
3705 pub fn is_dirty(&self) -> bool {
3707 self.mob.is_dirty() || self.flags.is_dirty()
3708 }
3709}
3710impl Default for SpiderEntityData {
3711 fn default() -> Self {
3712 Self::new()
3713 }
3714}
3715impl VanillaEntityData for SpiderEntityData {
3716 fn base(&self) -> &BaseEntityData {
3717 SpiderEntityData::base(self)
3718 }
3719 fn base_mut(&mut self) -> &mut BaseEntityData {
3720 SpiderEntityData::base_mut(self)
3721 }
3722 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3723 SpiderEntityData::pack_dirty(self)
3724 }
3725 fn pack_all(&self) -> Vec<DataValue> {
3726 SpiderEntityData::pack_all(self)
3727 }
3728 fn is_dirty(&self) -> bool {
3729 SpiderEntityData::is_dirty(self)
3730 }
3731}
3732impl VanillaLivingEntityData for SpiderEntityData {
3733 fn living_entity(&self) -> &LivingEntityData {
3734 SpiderEntityData::living_entity(self)
3735 }
3736 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3737 SpiderEntityData::living_entity_mut(self)
3738 }
3739}
3740#[derive(Debug, Clone)]
3742pub struct AbstractMinecartEntityData {
3743 pub vehicle_entity: VehicleEntityData,
3744 pub id_custom_display_block: SyncedValue<Option<BlockStateId>>,
3745 pub id_display_offset: SyncedValue<i32>,
3746}
3747impl AbstractMinecartEntityData {
3748 pub fn new() -> Self {
3750 Self {
3751 vehicle_entity: VehicleEntityData::new(),
3752 id_custom_display_block: SyncedValue::new(None),
3753 id_display_offset: SyncedValue::new(8i32),
3754 }
3755 }
3756 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
3758 self
3759 }
3760 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
3762 self
3763 }
3764 pub fn vehicle_entity(&self) -> &VehicleEntityData {
3766 &self.vehicle_entity
3767 }
3768 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
3770 &mut self.vehicle_entity
3771 }
3772 pub fn base(&self) -> &BaseEntityData {
3774 &self.vehicle_entity.base
3775 }
3776 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3778 &mut self.vehicle_entity.base
3779 }
3780 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3783 let mut values = Vec::new();
3784 self.pack_dirty_into(&mut values);
3785 if values.is_empty() { None } else { Some(values) }
3786 }
3787 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3788 self.vehicle_entity.pack_dirty_into(values);
3789 if self.id_custom_display_block.is_dirty() {
3790 values
3791 .push(DataValue {
3792 index: 11u8,
3793 serializer_id: 15i32,
3794 value: EntityData::OptionalBlockState(
3795 self.id_custom_display_block.get().clone(),
3796 ),
3797 });
3798 self.id_custom_display_block.clear_dirty();
3799 }
3800 if self.id_display_offset.is_dirty() {
3801 values
3802 .push(DataValue {
3803 index: 12u8,
3804 serializer_id: 1i32,
3805 value: EntityData::Int(*self.id_display_offset.get()),
3806 });
3807 self.id_display_offset.clear_dirty();
3808 }
3809 }
3810 pub fn pack_all(&self) -> Vec<DataValue> {
3812 let mut values = Vec::new();
3813 self.pack_all_into(&mut values);
3814 values
3815 }
3816 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3817 self.vehicle_entity.pack_all_into(values);
3818 if !self.id_custom_display_block.is_default() {
3819 values
3820 .push(DataValue {
3821 index: 11u8,
3822 serializer_id: 15i32,
3823 value: EntityData::OptionalBlockState(
3824 self.id_custom_display_block.get().clone(),
3825 ),
3826 });
3827 }
3828 if !self.id_display_offset.is_default() {
3829 values
3830 .push(DataValue {
3831 index: 12u8,
3832 serializer_id: 1i32,
3833 value: EntityData::Int(*self.id_display_offset.get()),
3834 });
3835 }
3836 }
3837 pub fn is_dirty(&self) -> bool {
3839 self.vehicle_entity.is_dirty() || self.id_custom_display_block.is_dirty()
3840 || self.id_display_offset.is_dirty()
3841 }
3842}
3843impl Default for AbstractMinecartEntityData {
3844 fn default() -> Self {
3845 Self::new()
3846 }
3847}
3848impl VanillaEntityData for AbstractMinecartEntityData {
3849 fn base(&self) -> &BaseEntityData {
3850 AbstractMinecartEntityData::base(self)
3851 }
3852 fn base_mut(&mut self) -> &mut BaseEntityData {
3853 AbstractMinecartEntityData::base_mut(self)
3854 }
3855 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3856 AbstractMinecartEntityData::pack_dirty(self)
3857 }
3858 fn pack_all(&self) -> Vec<DataValue> {
3859 AbstractMinecartEntityData::pack_all(self)
3860 }
3861 fn is_dirty(&self) -> bool {
3862 AbstractMinecartEntityData::is_dirty(self)
3863 }
3864}
3865#[derive(Debug, Clone)]
3867pub struct ChickenEntityData {
3868 pub ageable_mob: AgeableMobEntityData,
3869 pub variant: SyncedValue<RegistryReference<crate::chicken_variant::ChickenVariant>>,
3870 pub sound_variant: SyncedValue<
3871 RegistryReference<crate::chicken_sound_variant::ChickenSoundVariant>,
3872 >,
3873}
3874impl ChickenEntityData {
3875 pub fn new() -> Self {
3877 Self {
3878 ageable_mob: AgeableMobEntityData::new(),
3879 variant: SyncedValue::new(
3880 RegistryReference::new(&crate::vanilla_chicken_variants::TEMPERATE),
3881 ),
3882 sound_variant: SyncedValue::new(
3883 RegistryReference::new(&crate::vanilla_chicken_sound_variants::CLASSIC),
3884 ),
3885 }
3886 }
3887 pub fn chicken(&self) -> &ChickenEntityData {
3889 self
3890 }
3891 pub fn chicken_mut(&mut self) -> &mut ChickenEntityData {
3893 self
3894 }
3895 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
3897 &self.ageable_mob
3898 }
3899 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
3901 &mut self.ageable_mob
3902 }
3903 pub fn mob(&self) -> &MobEntityData {
3905 &self.ageable_mob.mob
3906 }
3907 pub fn mob_mut(&mut self) -> &mut MobEntityData {
3909 &mut self.ageable_mob.mob
3910 }
3911 pub fn living_entity(&self) -> &LivingEntityData {
3913 &self.ageable_mob.mob.living_entity
3914 }
3915 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
3917 &mut self.ageable_mob.mob.living_entity
3918 }
3919 pub fn base(&self) -> &BaseEntityData {
3921 &self.ageable_mob.mob.living_entity.base
3922 }
3923 pub fn base_mut(&mut self) -> &mut BaseEntityData {
3925 &mut self.ageable_mob.mob.living_entity.base
3926 }
3927 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3930 let mut values = Vec::new();
3931 self.pack_dirty_into(&mut values);
3932 if values.is_empty() { None } else { Some(values) }
3933 }
3934 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
3935 self.ageable_mob.pack_dirty_into(values);
3936 if self.variant.is_dirty() {
3937 values
3938 .push(DataValue {
3939 index: 18u8,
3940 serializer_id: 30i32,
3941 value: EntityData::ChickenVariant(*self.variant.get()),
3942 });
3943 self.variant.clear_dirty();
3944 }
3945 if self.sound_variant.is_dirty() {
3946 values
3947 .push(DataValue {
3948 index: 19u8,
3949 serializer_id: 31i32,
3950 value: EntityData::ChickenSoundVariant(*self.sound_variant.get()),
3951 });
3952 self.sound_variant.clear_dirty();
3953 }
3954 }
3955 pub fn pack_all(&self) -> Vec<DataValue> {
3957 let mut values = Vec::new();
3958 self.pack_all_into(&mut values);
3959 values
3960 }
3961 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
3962 self.ageable_mob.pack_all_into(values);
3963 if !self.variant.is_default() {
3964 values
3965 .push(DataValue {
3966 index: 18u8,
3967 serializer_id: 30i32,
3968 value: EntityData::ChickenVariant(*self.variant.get()),
3969 });
3970 }
3971 if !self.sound_variant.is_default() {
3972 values
3973 .push(DataValue {
3974 index: 19u8,
3975 serializer_id: 31i32,
3976 value: EntityData::ChickenSoundVariant(*self.sound_variant.get()),
3977 });
3978 }
3979 }
3980 pub fn is_dirty(&self) -> bool {
3982 self.ageable_mob.is_dirty() || self.variant.is_dirty()
3983 || self.sound_variant.is_dirty()
3984 }
3985}
3986impl Default for ChickenEntityData {
3987 fn default() -> Self {
3988 Self::new()
3989 }
3990}
3991impl VanillaEntityData for ChickenEntityData {
3992 fn base(&self) -> &BaseEntityData {
3993 ChickenEntityData::base(self)
3994 }
3995 fn base_mut(&mut self) -> &mut BaseEntityData {
3996 ChickenEntityData::base_mut(self)
3997 }
3998 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
3999 ChickenEntityData::pack_dirty(self)
4000 }
4001 fn pack_all(&self) -> Vec<DataValue> {
4002 ChickenEntityData::pack_all(self)
4003 }
4004 fn is_dirty(&self) -> bool {
4005 ChickenEntityData::is_dirty(self)
4006 }
4007}
4008impl VanillaLivingEntityData for ChickenEntityData {
4009 fn living_entity(&self) -> &LivingEntityData {
4010 ChickenEntityData::living_entity(self)
4011 }
4012 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4013 ChickenEntityData::living_entity_mut(self)
4014 }
4015}
4016#[derive(Debug, Clone)]
4018pub struct AbstractFishEntityData {
4019 pub mob: MobEntityData,
4020 pub from_bucket: SyncedValue<bool>,
4021}
4022impl AbstractFishEntityData {
4023 pub fn new() -> Self {
4025 Self {
4026 mob: MobEntityData::new(),
4027 from_bucket: SyncedValue::new(false),
4028 }
4029 }
4030 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
4032 self
4033 }
4034 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
4036 self
4037 }
4038 pub fn mob(&self) -> &MobEntityData {
4040 &self.mob
4041 }
4042 pub fn mob_mut(&mut self) -> &mut MobEntityData {
4044 &mut self.mob
4045 }
4046 pub fn living_entity(&self) -> &LivingEntityData {
4048 &self.mob.living_entity
4049 }
4050 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4052 &mut self.mob.living_entity
4053 }
4054 pub fn base(&self) -> &BaseEntityData {
4056 &self.mob.living_entity.base
4057 }
4058 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4060 &mut self.mob.living_entity.base
4061 }
4062 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4065 let mut values = Vec::new();
4066 self.pack_dirty_into(&mut values);
4067 if values.is_empty() { None } else { Some(values) }
4068 }
4069 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4070 self.mob.pack_dirty_into(values);
4071 if self.from_bucket.is_dirty() {
4072 values
4073 .push(DataValue {
4074 index: 16u8,
4075 serializer_id: 8i32,
4076 value: EntityData::Boolean(*self.from_bucket.get()),
4077 });
4078 self.from_bucket.clear_dirty();
4079 }
4080 }
4081 pub fn pack_all(&self) -> Vec<DataValue> {
4083 let mut values = Vec::new();
4084 self.pack_all_into(&mut values);
4085 values
4086 }
4087 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4088 self.mob.pack_all_into(values);
4089 if !self.from_bucket.is_default() {
4090 values
4091 .push(DataValue {
4092 index: 16u8,
4093 serializer_id: 8i32,
4094 value: EntityData::Boolean(*self.from_bucket.get()),
4095 });
4096 }
4097 }
4098 pub fn is_dirty(&self) -> bool {
4100 self.mob.is_dirty() || self.from_bucket.is_dirty()
4101 }
4102}
4103impl Default for AbstractFishEntityData {
4104 fn default() -> Self {
4105 Self::new()
4106 }
4107}
4108impl VanillaEntityData for AbstractFishEntityData {
4109 fn base(&self) -> &BaseEntityData {
4110 AbstractFishEntityData::base(self)
4111 }
4112 fn base_mut(&mut self) -> &mut BaseEntityData {
4113 AbstractFishEntityData::base_mut(self)
4114 }
4115 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4116 AbstractFishEntityData::pack_dirty(self)
4117 }
4118 fn pack_all(&self) -> Vec<DataValue> {
4119 AbstractFishEntityData::pack_all(self)
4120 }
4121 fn is_dirty(&self) -> bool {
4122 AbstractFishEntityData::is_dirty(self)
4123 }
4124}
4125impl VanillaLivingEntityData for AbstractFishEntityData {
4126 fn living_entity(&self) -> &LivingEntityData {
4127 AbstractFishEntityData::living_entity(self)
4128 }
4129 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4130 AbstractFishEntityData::living_entity_mut(self)
4131 }
4132}
4133#[derive(Debug, Clone)]
4135pub struct CopperGolemEntityData {
4136 pub mob: MobEntityData,
4137 pub weather_state: SyncedValue<i32>,
4138 pub copper_golem_state: SyncedValue<i32>,
4139}
4140impl CopperGolemEntityData {
4141 pub fn new() -> Self {
4143 Self {
4144 mob: MobEntityData::new(),
4145 weather_state: SyncedValue::new(0i32),
4146 copper_golem_state: SyncedValue::new(0i32),
4147 }
4148 }
4149 pub fn copper_golem(&self) -> &CopperGolemEntityData {
4151 self
4152 }
4153 pub fn copper_golem_mut(&mut self) -> &mut CopperGolemEntityData {
4155 self
4156 }
4157 pub fn mob(&self) -> &MobEntityData {
4159 &self.mob
4160 }
4161 pub fn mob_mut(&mut self) -> &mut MobEntityData {
4163 &mut self.mob
4164 }
4165 pub fn living_entity(&self) -> &LivingEntityData {
4167 &self.mob.living_entity
4168 }
4169 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4171 &mut self.mob.living_entity
4172 }
4173 pub fn base(&self) -> &BaseEntityData {
4175 &self.mob.living_entity.base
4176 }
4177 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4179 &mut self.mob.living_entity.base
4180 }
4181 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4184 let mut values = Vec::new();
4185 self.pack_dirty_into(&mut values);
4186 if values.is_empty() { None } else { Some(values) }
4187 }
4188 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4189 self.mob.pack_dirty_into(values);
4190 if self.weather_state.is_dirty() {
4191 values
4192 .push(DataValue {
4193 index: 16u8,
4194 serializer_id: 38i32,
4195 value: EntityData::WeatheringCopperState(*self.weather_state.get()),
4196 });
4197 self.weather_state.clear_dirty();
4198 }
4199 if self.copper_golem_state.is_dirty() {
4200 values
4201 .push(DataValue {
4202 index: 17u8,
4203 serializer_id: 37i32,
4204 value: EntityData::CopperGolemState(*self.copper_golem_state.get()),
4205 });
4206 self.copper_golem_state.clear_dirty();
4207 }
4208 }
4209 pub fn pack_all(&self) -> Vec<DataValue> {
4211 let mut values = Vec::new();
4212 self.pack_all_into(&mut values);
4213 values
4214 }
4215 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4216 self.mob.pack_all_into(values);
4217 if !self.weather_state.is_default() {
4218 values
4219 .push(DataValue {
4220 index: 16u8,
4221 serializer_id: 38i32,
4222 value: EntityData::WeatheringCopperState(*self.weather_state.get()),
4223 });
4224 }
4225 if !self.copper_golem_state.is_default() {
4226 values
4227 .push(DataValue {
4228 index: 17u8,
4229 serializer_id: 37i32,
4230 value: EntityData::CopperGolemState(*self.copper_golem_state.get()),
4231 });
4232 }
4233 }
4234 pub fn is_dirty(&self) -> bool {
4236 self.mob.is_dirty() || self.weather_state.is_dirty()
4237 || self.copper_golem_state.is_dirty()
4238 }
4239}
4240impl Default for CopperGolemEntityData {
4241 fn default() -> Self {
4242 Self::new()
4243 }
4244}
4245impl VanillaEntityData for CopperGolemEntityData {
4246 fn base(&self) -> &BaseEntityData {
4247 CopperGolemEntityData::base(self)
4248 }
4249 fn base_mut(&mut self) -> &mut BaseEntityData {
4250 CopperGolemEntityData::base_mut(self)
4251 }
4252 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4253 CopperGolemEntityData::pack_dirty(self)
4254 }
4255 fn pack_all(&self) -> Vec<DataValue> {
4256 CopperGolemEntityData::pack_all(self)
4257 }
4258 fn is_dirty(&self) -> bool {
4259 CopperGolemEntityData::is_dirty(self)
4260 }
4261}
4262impl VanillaLivingEntityData for CopperGolemEntityData {
4263 fn living_entity(&self) -> &LivingEntityData {
4264 CopperGolemEntityData::living_entity(self)
4265 }
4266 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4267 CopperGolemEntityData::living_entity_mut(self)
4268 }
4269}
4270#[derive(Debug, Clone)]
4272pub struct MinecartCommandBlockEntityData {
4273 pub abstract_minecart: AbstractMinecartEntityData,
4274 pub id_command_name: SyncedValue<String>,
4275 pub id_last_output: SyncedValue<Box<TextComponent>>,
4276}
4277impl MinecartCommandBlockEntityData {
4278 pub fn new() -> Self {
4280 Self {
4281 abstract_minecart: AbstractMinecartEntityData::new(),
4282 id_command_name: SyncedValue::new("".to_string()),
4283 id_last_output: SyncedValue::new(Box::new(TextComponent::default())),
4284 }
4285 }
4286 pub fn minecart_command_block(&self) -> &MinecartCommandBlockEntityData {
4288 self
4289 }
4290 pub fn minecart_command_block_mut(&mut self) -> &mut MinecartCommandBlockEntityData {
4292 self
4293 }
4294 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
4296 &self.abstract_minecart
4297 }
4298 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
4300 &mut self.abstract_minecart
4301 }
4302 pub fn vehicle_entity(&self) -> &VehicleEntityData {
4304 &self.abstract_minecart.vehicle_entity
4305 }
4306 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
4308 &mut self.abstract_minecart.vehicle_entity
4309 }
4310 pub fn base(&self) -> &BaseEntityData {
4312 &self.abstract_minecart.vehicle_entity.base
4313 }
4314 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4316 &mut self.abstract_minecart.vehicle_entity.base
4317 }
4318 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4321 let mut values = Vec::new();
4322 self.pack_dirty_into(&mut values);
4323 if values.is_empty() { None } else { Some(values) }
4324 }
4325 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4326 self.abstract_minecart.pack_dirty_into(values);
4327 if self.id_command_name.is_dirty() {
4328 values
4329 .push(DataValue {
4330 index: 13u8,
4331 serializer_id: 4i32,
4332 value: EntityData::String(self.id_command_name.get().clone()),
4333 });
4334 self.id_command_name.clear_dirty();
4335 }
4336 if self.id_last_output.is_dirty() {
4337 values
4338 .push(DataValue {
4339 index: 14u8,
4340 serializer_id: 5i32,
4341 value: EntityData::Component(self.id_last_output.get().clone()),
4342 });
4343 self.id_last_output.clear_dirty();
4344 }
4345 }
4346 pub fn pack_all(&self) -> Vec<DataValue> {
4348 let mut values = Vec::new();
4349 self.pack_all_into(&mut values);
4350 values
4351 }
4352 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4353 self.abstract_minecart.pack_all_into(values);
4354 if !self.id_command_name.is_default() {
4355 values
4356 .push(DataValue {
4357 index: 13u8,
4358 serializer_id: 4i32,
4359 value: EntityData::String(self.id_command_name.get().clone()),
4360 });
4361 }
4362 if !self.id_last_output.is_default() {
4363 values
4364 .push(DataValue {
4365 index: 14u8,
4366 serializer_id: 5i32,
4367 value: EntityData::Component(self.id_last_output.get().clone()),
4368 });
4369 }
4370 }
4371 pub fn is_dirty(&self) -> bool {
4373 self.abstract_minecart.is_dirty() || self.id_command_name.is_dirty()
4374 || self.id_last_output.is_dirty()
4375 }
4376}
4377impl Default for MinecartCommandBlockEntityData {
4378 fn default() -> Self {
4379 Self::new()
4380 }
4381}
4382impl VanillaEntityData for MinecartCommandBlockEntityData {
4383 fn base(&self) -> &BaseEntityData {
4384 MinecartCommandBlockEntityData::base(self)
4385 }
4386 fn base_mut(&mut self) -> &mut BaseEntityData {
4387 MinecartCommandBlockEntityData::base_mut(self)
4388 }
4389 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4390 MinecartCommandBlockEntityData::pack_dirty(self)
4391 }
4392 fn pack_all(&self) -> Vec<DataValue> {
4393 MinecartCommandBlockEntityData::pack_all(self)
4394 }
4395 fn is_dirty(&self) -> bool {
4396 MinecartCommandBlockEntityData::is_dirty(self)
4397 }
4398}
4399#[derive(Debug, Clone)]
4401pub struct CowEntityData {
4402 pub ageable_mob: AgeableMobEntityData,
4403 pub variant: SyncedValue<RegistryReference<crate::cow_variant::CowVariant>>,
4404 pub sound_variant: SyncedValue<
4405 RegistryReference<crate::cow_sound_variant::CowSoundVariant>,
4406 >,
4407}
4408impl CowEntityData {
4409 pub fn new() -> Self {
4411 Self {
4412 ageable_mob: AgeableMobEntityData::new(),
4413 variant: SyncedValue::new(
4414 RegistryReference::new(&crate::vanilla_cow_variants::TEMPERATE),
4415 ),
4416 sound_variant: SyncedValue::new(
4417 RegistryReference::new(&crate::vanilla_cow_sound_variants::CLASSIC),
4418 ),
4419 }
4420 }
4421 pub fn cow(&self) -> &CowEntityData {
4423 self
4424 }
4425 pub fn cow_mut(&mut self) -> &mut CowEntityData {
4427 self
4428 }
4429 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
4431 &self.ageable_mob
4432 }
4433 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
4435 &mut self.ageable_mob
4436 }
4437 pub fn mob(&self) -> &MobEntityData {
4439 &self.ageable_mob.mob
4440 }
4441 pub fn mob_mut(&mut self) -> &mut MobEntityData {
4443 &mut self.ageable_mob.mob
4444 }
4445 pub fn living_entity(&self) -> &LivingEntityData {
4447 &self.ageable_mob.mob.living_entity
4448 }
4449 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4451 &mut self.ageable_mob.mob.living_entity
4452 }
4453 pub fn base(&self) -> &BaseEntityData {
4455 &self.ageable_mob.mob.living_entity.base
4456 }
4457 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4459 &mut self.ageable_mob.mob.living_entity.base
4460 }
4461 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4464 let mut values = Vec::new();
4465 self.pack_dirty_into(&mut values);
4466 if values.is_empty() { None } else { Some(values) }
4467 }
4468 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4469 self.ageable_mob.pack_dirty_into(values);
4470 if self.variant.is_dirty() {
4471 values
4472 .push(DataValue {
4473 index: 18u8,
4474 serializer_id: 23i32,
4475 value: EntityData::CowVariant(*self.variant.get()),
4476 });
4477 self.variant.clear_dirty();
4478 }
4479 if self.sound_variant.is_dirty() {
4480 values
4481 .push(DataValue {
4482 index: 19u8,
4483 serializer_id: 24i32,
4484 value: EntityData::CowSoundVariant(*self.sound_variant.get()),
4485 });
4486 self.sound_variant.clear_dirty();
4487 }
4488 }
4489 pub fn pack_all(&self) -> Vec<DataValue> {
4491 let mut values = Vec::new();
4492 self.pack_all_into(&mut values);
4493 values
4494 }
4495 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4496 self.ageable_mob.pack_all_into(values);
4497 if !self.variant.is_default() {
4498 values
4499 .push(DataValue {
4500 index: 18u8,
4501 serializer_id: 23i32,
4502 value: EntityData::CowVariant(*self.variant.get()),
4503 });
4504 }
4505 if !self.sound_variant.is_default() {
4506 values
4507 .push(DataValue {
4508 index: 19u8,
4509 serializer_id: 24i32,
4510 value: EntityData::CowSoundVariant(*self.sound_variant.get()),
4511 });
4512 }
4513 }
4514 pub fn is_dirty(&self) -> bool {
4516 self.ageable_mob.is_dirty() || self.variant.is_dirty()
4517 || self.sound_variant.is_dirty()
4518 }
4519}
4520impl Default for CowEntityData {
4521 fn default() -> Self {
4522 Self::new()
4523 }
4524}
4525impl VanillaEntityData for CowEntityData {
4526 fn base(&self) -> &BaseEntityData {
4527 CowEntityData::base(self)
4528 }
4529 fn base_mut(&mut self) -> &mut BaseEntityData {
4530 CowEntityData::base_mut(self)
4531 }
4532 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4533 CowEntityData::pack_dirty(self)
4534 }
4535 fn pack_all(&self) -> Vec<DataValue> {
4536 CowEntityData::pack_all(self)
4537 }
4538 fn is_dirty(&self) -> bool {
4539 CowEntityData::is_dirty(self)
4540 }
4541}
4542impl VanillaLivingEntityData for CowEntityData {
4543 fn living_entity(&self) -> &LivingEntityData {
4544 CowEntityData::living_entity(self)
4545 }
4546 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4547 CowEntityData::living_entity_mut(self)
4548 }
4549}
4550#[derive(Debug, Clone)]
4552pub struct CreakingEntityData {
4553 pub mob: MobEntityData,
4554 pub can_move: SyncedValue<bool>,
4555 pub is_active: SyncedValue<bool>,
4556 pub is_tearing_down: SyncedValue<bool>,
4557 pub home_pos: SyncedValue<Option<BlockPos>>,
4558}
4559impl CreakingEntityData {
4560 pub fn new() -> Self {
4562 Self {
4563 mob: MobEntityData::new(),
4564 can_move: SyncedValue::new(true),
4565 is_active: SyncedValue::new(false),
4566 is_tearing_down: SyncedValue::new(false),
4567 home_pos: SyncedValue::new(None),
4568 }
4569 }
4570 pub fn creaking(&self) -> &CreakingEntityData {
4572 self
4573 }
4574 pub fn creaking_mut(&mut self) -> &mut CreakingEntityData {
4576 self
4577 }
4578 pub fn mob(&self) -> &MobEntityData {
4580 &self.mob
4581 }
4582 pub fn mob_mut(&mut self) -> &mut MobEntityData {
4584 &mut self.mob
4585 }
4586 pub fn living_entity(&self) -> &LivingEntityData {
4588 &self.mob.living_entity
4589 }
4590 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4592 &mut self.mob.living_entity
4593 }
4594 pub fn base(&self) -> &BaseEntityData {
4596 &self.mob.living_entity.base
4597 }
4598 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4600 &mut self.mob.living_entity.base
4601 }
4602 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4605 let mut values = Vec::new();
4606 self.pack_dirty_into(&mut values);
4607 if values.is_empty() { None } else { Some(values) }
4608 }
4609 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4610 self.mob.pack_dirty_into(values);
4611 if self.can_move.is_dirty() {
4612 values
4613 .push(DataValue {
4614 index: 16u8,
4615 serializer_id: 8i32,
4616 value: EntityData::Boolean(*self.can_move.get()),
4617 });
4618 self.can_move.clear_dirty();
4619 }
4620 if self.is_active.is_dirty() {
4621 values
4622 .push(DataValue {
4623 index: 17u8,
4624 serializer_id: 8i32,
4625 value: EntityData::Boolean(*self.is_active.get()),
4626 });
4627 self.is_active.clear_dirty();
4628 }
4629 if self.is_tearing_down.is_dirty() {
4630 values
4631 .push(DataValue {
4632 index: 18u8,
4633 serializer_id: 8i32,
4634 value: EntityData::Boolean(*self.is_tearing_down.get()),
4635 });
4636 self.is_tearing_down.clear_dirty();
4637 }
4638 if self.home_pos.is_dirty() {
4639 values
4640 .push(DataValue {
4641 index: 19u8,
4642 serializer_id: 11i32,
4643 value: EntityData::OptionalBlockPos(self.home_pos.get().clone()),
4644 });
4645 self.home_pos.clear_dirty();
4646 }
4647 }
4648 pub fn pack_all(&self) -> Vec<DataValue> {
4650 let mut values = Vec::new();
4651 self.pack_all_into(&mut values);
4652 values
4653 }
4654 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4655 self.mob.pack_all_into(values);
4656 if !self.can_move.is_default() {
4657 values
4658 .push(DataValue {
4659 index: 16u8,
4660 serializer_id: 8i32,
4661 value: EntityData::Boolean(*self.can_move.get()),
4662 });
4663 }
4664 if !self.is_active.is_default() {
4665 values
4666 .push(DataValue {
4667 index: 17u8,
4668 serializer_id: 8i32,
4669 value: EntityData::Boolean(*self.is_active.get()),
4670 });
4671 }
4672 if !self.is_tearing_down.is_default() {
4673 values
4674 .push(DataValue {
4675 index: 18u8,
4676 serializer_id: 8i32,
4677 value: EntityData::Boolean(*self.is_tearing_down.get()),
4678 });
4679 }
4680 if !self.home_pos.is_default() {
4681 values
4682 .push(DataValue {
4683 index: 19u8,
4684 serializer_id: 11i32,
4685 value: EntityData::OptionalBlockPos(self.home_pos.get().clone()),
4686 });
4687 }
4688 }
4689 pub fn is_dirty(&self) -> bool {
4691 self.mob.is_dirty() || self.can_move.is_dirty() || self.is_active.is_dirty()
4692 || self.is_tearing_down.is_dirty() || self.home_pos.is_dirty()
4693 }
4694}
4695impl Default for CreakingEntityData {
4696 fn default() -> Self {
4697 Self::new()
4698 }
4699}
4700impl VanillaEntityData for CreakingEntityData {
4701 fn base(&self) -> &BaseEntityData {
4702 CreakingEntityData::base(self)
4703 }
4704 fn base_mut(&mut self) -> &mut BaseEntityData {
4705 CreakingEntityData::base_mut(self)
4706 }
4707 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4708 CreakingEntityData::pack_dirty(self)
4709 }
4710 fn pack_all(&self) -> Vec<DataValue> {
4711 CreakingEntityData::pack_all(self)
4712 }
4713 fn is_dirty(&self) -> bool {
4714 CreakingEntityData::is_dirty(self)
4715 }
4716}
4717impl VanillaLivingEntityData for CreakingEntityData {
4718 fn living_entity(&self) -> &LivingEntityData {
4719 CreakingEntityData::living_entity(self)
4720 }
4721 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4722 CreakingEntityData::living_entity_mut(self)
4723 }
4724}
4725#[derive(Debug, Clone)]
4727pub struct CreeperEntityData {
4728 pub mob: MobEntityData,
4729 pub swell_dir: SyncedValue<i32>,
4730 pub is_powered: SyncedValue<bool>,
4731 pub is_ignited: SyncedValue<bool>,
4732}
4733impl CreeperEntityData {
4734 pub fn new() -> Self {
4736 Self {
4737 mob: MobEntityData::new(),
4738 swell_dir: SyncedValue::new(-1i32),
4739 is_powered: SyncedValue::new(false),
4740 is_ignited: SyncedValue::new(false),
4741 }
4742 }
4743 pub fn creeper(&self) -> &CreeperEntityData {
4745 self
4746 }
4747 pub fn creeper_mut(&mut self) -> &mut CreeperEntityData {
4749 self
4750 }
4751 pub fn mob(&self) -> &MobEntityData {
4753 &self.mob
4754 }
4755 pub fn mob_mut(&mut self) -> &mut MobEntityData {
4757 &mut self.mob
4758 }
4759 pub fn living_entity(&self) -> &LivingEntityData {
4761 &self.mob.living_entity
4762 }
4763 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4765 &mut self.mob.living_entity
4766 }
4767 pub fn base(&self) -> &BaseEntityData {
4769 &self.mob.living_entity.base
4770 }
4771 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4773 &mut self.mob.living_entity.base
4774 }
4775 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4778 let mut values = Vec::new();
4779 self.pack_dirty_into(&mut values);
4780 if values.is_empty() { None } else { Some(values) }
4781 }
4782 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4783 self.mob.pack_dirty_into(values);
4784 if self.swell_dir.is_dirty() {
4785 values
4786 .push(DataValue {
4787 index: 16u8,
4788 serializer_id: 1i32,
4789 value: EntityData::Int(*self.swell_dir.get()),
4790 });
4791 self.swell_dir.clear_dirty();
4792 }
4793 if self.is_powered.is_dirty() {
4794 values
4795 .push(DataValue {
4796 index: 17u8,
4797 serializer_id: 8i32,
4798 value: EntityData::Boolean(*self.is_powered.get()),
4799 });
4800 self.is_powered.clear_dirty();
4801 }
4802 if self.is_ignited.is_dirty() {
4803 values
4804 .push(DataValue {
4805 index: 18u8,
4806 serializer_id: 8i32,
4807 value: EntityData::Boolean(*self.is_ignited.get()),
4808 });
4809 self.is_ignited.clear_dirty();
4810 }
4811 }
4812 pub fn pack_all(&self) -> Vec<DataValue> {
4814 let mut values = Vec::new();
4815 self.pack_all_into(&mut values);
4816 values
4817 }
4818 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4819 self.mob.pack_all_into(values);
4820 if !self.swell_dir.is_default() {
4821 values
4822 .push(DataValue {
4823 index: 16u8,
4824 serializer_id: 1i32,
4825 value: EntityData::Int(*self.swell_dir.get()),
4826 });
4827 }
4828 if !self.is_powered.is_default() {
4829 values
4830 .push(DataValue {
4831 index: 17u8,
4832 serializer_id: 8i32,
4833 value: EntityData::Boolean(*self.is_powered.get()),
4834 });
4835 }
4836 if !self.is_ignited.is_default() {
4837 values
4838 .push(DataValue {
4839 index: 18u8,
4840 serializer_id: 8i32,
4841 value: EntityData::Boolean(*self.is_ignited.get()),
4842 });
4843 }
4844 }
4845 pub fn is_dirty(&self) -> bool {
4847 self.mob.is_dirty() || self.swell_dir.is_dirty() || self.is_powered.is_dirty()
4848 || self.is_ignited.is_dirty()
4849 }
4850}
4851impl Default for CreeperEntityData {
4852 fn default() -> Self {
4853 Self::new()
4854 }
4855}
4856impl VanillaEntityData for CreeperEntityData {
4857 fn base(&self) -> &BaseEntityData {
4858 CreeperEntityData::base(self)
4859 }
4860 fn base_mut(&mut self) -> &mut BaseEntityData {
4861 CreeperEntityData::base_mut(self)
4862 }
4863 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4864 CreeperEntityData::pack_dirty(self)
4865 }
4866 fn pack_all(&self) -> Vec<DataValue> {
4867 CreeperEntityData::pack_all(self)
4868 }
4869 fn is_dirty(&self) -> bool {
4870 CreeperEntityData::is_dirty(self)
4871 }
4872}
4873impl VanillaLivingEntityData for CreeperEntityData {
4874 fn living_entity(&self) -> &LivingEntityData {
4875 CreeperEntityData::living_entity(self)
4876 }
4877 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
4878 CreeperEntityData::living_entity_mut(self)
4879 }
4880}
4881#[derive(Debug, Clone)]
4883pub struct CushionEntityData {
4884 pub base: BaseEntityData,
4885 pub color: SyncedValue<crate::dye_color::DyeColor>,
4886}
4887impl CushionEntityData {
4888 pub fn new() -> Self {
4890 Self {
4891 base: BaseEntityData::new(),
4892 color: SyncedValue::new(crate::dye_color::DyeColor::White),
4893 }
4894 }
4895 pub fn cushion(&self) -> &CushionEntityData {
4897 self
4898 }
4899 pub fn cushion_mut(&mut self) -> &mut CushionEntityData {
4901 self
4902 }
4903 pub fn base(&self) -> &BaseEntityData {
4905 &self.base
4906 }
4907 pub fn base_mut(&mut self) -> &mut BaseEntityData {
4909 &mut self.base
4910 }
4911 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4914 let mut values = Vec::new();
4915 self.pack_dirty_into(&mut values);
4916 if values.is_empty() { None } else { Some(values) }
4917 }
4918 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
4919 self.base.pack_dirty_into(values);
4920 if self.color.is_dirty() {
4921 values
4922 .push(DataValue {
4923 index: 8u8,
4924 serializer_id: 43i32,
4925 value: EntityData::DyeColor(*self.color.get()),
4926 });
4927 self.color.clear_dirty();
4928 }
4929 }
4930 pub fn pack_all(&self) -> Vec<DataValue> {
4932 let mut values = Vec::new();
4933 self.pack_all_into(&mut values);
4934 values
4935 }
4936 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
4937 self.base.pack_all_into(values);
4938 if !self.color.is_default() {
4939 values
4940 .push(DataValue {
4941 index: 8u8,
4942 serializer_id: 43i32,
4943 value: EntityData::DyeColor(*self.color.get()),
4944 });
4945 }
4946 }
4947 pub fn is_dirty(&self) -> bool {
4949 self.base.is_dirty() || self.color.is_dirty()
4950 }
4951}
4952impl Default for CushionEntityData {
4953 fn default() -> Self {
4954 Self::new()
4955 }
4956}
4957impl VanillaEntityData for CushionEntityData {
4958 fn base(&self) -> &BaseEntityData {
4959 CushionEntityData::base(self)
4960 }
4961 fn base_mut(&mut self) -> &mut BaseEntityData {
4962 CushionEntityData::base_mut(self)
4963 }
4964 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
4965 CushionEntityData::pack_dirty(self)
4966 }
4967 fn pack_all(&self) -> Vec<DataValue> {
4968 CushionEntityData::pack_all(self)
4969 }
4970 fn is_dirty(&self) -> bool {
4971 CushionEntityData::is_dirty(self)
4972 }
4973}
4974#[derive(Debug, Clone)]
4976pub struct DolphinEntityData {
4977 pub ageable_mob: AgeableMobEntityData,
4978 pub got_fish: SyncedValue<bool>,
4979 pub moistness_level: SyncedValue<i32>,
4980}
4981impl DolphinEntityData {
4982 pub fn new() -> Self {
4984 let mut data = Self {
4985 ageable_mob: AgeableMobEntityData::new(),
4986 got_fish: SyncedValue::new(false),
4987 moistness_level: SyncedValue::new(2400i32),
4988 };
4989 data.ageable_mob.mob.living_entity.base.air_supply = SyncedValue::new(4800i32);
4990 data
4991 }
4992 pub fn dolphin(&self) -> &DolphinEntityData {
4994 self
4995 }
4996 pub fn dolphin_mut(&mut self) -> &mut DolphinEntityData {
4998 self
4999 }
5000 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
5002 &self.ageable_mob
5003 }
5004 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
5006 &mut self.ageable_mob
5007 }
5008 pub fn mob(&self) -> &MobEntityData {
5010 &self.ageable_mob.mob
5011 }
5012 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5014 &mut self.ageable_mob.mob
5015 }
5016 pub fn living_entity(&self) -> &LivingEntityData {
5018 &self.ageable_mob.mob.living_entity
5019 }
5020 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5022 &mut self.ageable_mob.mob.living_entity
5023 }
5024 pub fn base(&self) -> &BaseEntityData {
5026 &self.ageable_mob.mob.living_entity.base
5027 }
5028 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5030 &mut self.ageable_mob.mob.living_entity.base
5031 }
5032 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5035 let mut values = Vec::new();
5036 self.pack_dirty_into(&mut values);
5037 if values.is_empty() { None } else { Some(values) }
5038 }
5039 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5040 self.ageable_mob.pack_dirty_into(values);
5041 if self.got_fish.is_dirty() {
5042 values
5043 .push(DataValue {
5044 index: 18u8,
5045 serializer_id: 8i32,
5046 value: EntityData::Boolean(*self.got_fish.get()),
5047 });
5048 self.got_fish.clear_dirty();
5049 }
5050 if self.moistness_level.is_dirty() {
5051 values
5052 .push(DataValue {
5053 index: 19u8,
5054 serializer_id: 1i32,
5055 value: EntityData::Int(*self.moistness_level.get()),
5056 });
5057 self.moistness_level.clear_dirty();
5058 }
5059 }
5060 pub fn pack_all(&self) -> Vec<DataValue> {
5062 let mut values = Vec::new();
5063 self.pack_all_into(&mut values);
5064 values
5065 }
5066 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5067 self.ageable_mob.pack_all_into(values);
5068 if !self.got_fish.is_default() {
5069 values
5070 .push(DataValue {
5071 index: 18u8,
5072 serializer_id: 8i32,
5073 value: EntityData::Boolean(*self.got_fish.get()),
5074 });
5075 }
5076 if !self.moistness_level.is_default() {
5077 values
5078 .push(DataValue {
5079 index: 19u8,
5080 serializer_id: 1i32,
5081 value: EntityData::Int(*self.moistness_level.get()),
5082 });
5083 }
5084 }
5085 pub fn is_dirty(&self) -> bool {
5087 self.ageable_mob.is_dirty() || self.got_fish.is_dirty()
5088 || self.moistness_level.is_dirty()
5089 }
5090}
5091impl Default for DolphinEntityData {
5092 fn default() -> Self {
5093 Self::new()
5094 }
5095}
5096impl VanillaEntityData for DolphinEntityData {
5097 fn base(&self) -> &BaseEntityData {
5098 DolphinEntityData::base(self)
5099 }
5100 fn base_mut(&mut self) -> &mut BaseEntityData {
5101 DolphinEntityData::base_mut(self)
5102 }
5103 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5104 DolphinEntityData::pack_dirty(self)
5105 }
5106 fn pack_all(&self) -> Vec<DataValue> {
5107 DolphinEntityData::pack_all(self)
5108 }
5109 fn is_dirty(&self) -> bool {
5110 DolphinEntityData::is_dirty(self)
5111 }
5112}
5113impl VanillaLivingEntityData for DolphinEntityData {
5114 fn living_entity(&self) -> &LivingEntityData {
5115 DolphinEntityData::living_entity(self)
5116 }
5117 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5118 DolphinEntityData::living_entity_mut(self)
5119 }
5120}
5121#[derive(Debug, Clone)]
5123pub struct AbstractChestedHorseEntityData {
5124 pub abstract_horse: AbstractHorseEntityData,
5125 pub id_chest: SyncedValue<bool>,
5126}
5127impl AbstractChestedHorseEntityData {
5128 pub fn new() -> Self {
5130 Self {
5131 abstract_horse: AbstractHorseEntityData::new(),
5132 id_chest: SyncedValue::new(false),
5133 }
5134 }
5135 pub fn abstract_chested_horse(&self) -> &AbstractChestedHorseEntityData {
5137 self
5138 }
5139 pub fn abstract_chested_horse_mut(&mut self) -> &mut AbstractChestedHorseEntityData {
5141 self
5142 }
5143 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
5145 &self.abstract_horse
5146 }
5147 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
5149 &mut self.abstract_horse
5150 }
5151 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
5153 &self.abstract_horse.ageable_mob
5154 }
5155 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
5157 &mut self.abstract_horse.ageable_mob
5158 }
5159 pub fn mob(&self) -> &MobEntityData {
5161 &self.abstract_horse.ageable_mob.mob
5162 }
5163 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5165 &mut self.abstract_horse.ageable_mob.mob
5166 }
5167 pub fn living_entity(&self) -> &LivingEntityData {
5169 &self.abstract_horse.ageable_mob.mob.living_entity
5170 }
5171 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5173 &mut self.abstract_horse.ageable_mob.mob.living_entity
5174 }
5175 pub fn base(&self) -> &BaseEntityData {
5177 &self.abstract_horse.ageable_mob.mob.living_entity.base
5178 }
5179 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5181 &mut self.abstract_horse.ageable_mob.mob.living_entity.base
5182 }
5183 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5186 let mut values = Vec::new();
5187 self.pack_dirty_into(&mut values);
5188 if values.is_empty() { None } else { Some(values) }
5189 }
5190 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5191 self.abstract_horse.pack_dirty_into(values);
5192 if self.id_chest.is_dirty() {
5193 values
5194 .push(DataValue {
5195 index: 19u8,
5196 serializer_id: 8i32,
5197 value: EntityData::Boolean(*self.id_chest.get()),
5198 });
5199 self.id_chest.clear_dirty();
5200 }
5201 }
5202 pub fn pack_all(&self) -> Vec<DataValue> {
5204 let mut values = Vec::new();
5205 self.pack_all_into(&mut values);
5206 values
5207 }
5208 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5209 self.abstract_horse.pack_all_into(values);
5210 if !self.id_chest.is_default() {
5211 values
5212 .push(DataValue {
5213 index: 19u8,
5214 serializer_id: 8i32,
5215 value: EntityData::Boolean(*self.id_chest.get()),
5216 });
5217 }
5218 }
5219 pub fn is_dirty(&self) -> bool {
5221 self.abstract_horse.is_dirty() || self.id_chest.is_dirty()
5222 }
5223}
5224impl Default for AbstractChestedHorseEntityData {
5225 fn default() -> Self {
5226 Self::new()
5227 }
5228}
5229impl VanillaEntityData for AbstractChestedHorseEntityData {
5230 fn base(&self) -> &BaseEntityData {
5231 AbstractChestedHorseEntityData::base(self)
5232 }
5233 fn base_mut(&mut self) -> &mut BaseEntityData {
5234 AbstractChestedHorseEntityData::base_mut(self)
5235 }
5236 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5237 AbstractChestedHorseEntityData::pack_dirty(self)
5238 }
5239 fn pack_all(&self) -> Vec<DataValue> {
5240 AbstractChestedHorseEntityData::pack_all(self)
5241 }
5242 fn is_dirty(&self) -> bool {
5243 AbstractChestedHorseEntityData::is_dirty(self)
5244 }
5245}
5246impl VanillaLivingEntityData for AbstractChestedHorseEntityData {
5247 fn living_entity(&self) -> &LivingEntityData {
5248 AbstractChestedHorseEntityData::living_entity(self)
5249 }
5250 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5251 AbstractChestedHorseEntityData::living_entity_mut(self)
5252 }
5253}
5254#[derive(Debug, Clone)]
5256pub struct ZombieEntityData {
5257 pub mob: MobEntityData,
5258 pub baby: SyncedValue<bool>,
5259 pub special_type: SyncedValue<i32>,
5260 pub drowned_conversion: SyncedValue<bool>,
5261}
5262impl ZombieEntityData {
5263 pub fn new() -> Self {
5265 Self {
5266 mob: MobEntityData::new(),
5267 baby: SyncedValue::new(false),
5268 special_type: SyncedValue::new(0i32),
5269 drowned_conversion: SyncedValue::new(false),
5270 }
5271 }
5272 pub fn zombie(&self) -> &ZombieEntityData {
5274 self
5275 }
5276 pub fn zombie_mut(&mut self) -> &mut ZombieEntityData {
5278 self
5279 }
5280 pub fn mob(&self) -> &MobEntityData {
5282 &self.mob
5283 }
5284 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5286 &mut self.mob
5287 }
5288 pub fn living_entity(&self) -> &LivingEntityData {
5290 &self.mob.living_entity
5291 }
5292 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5294 &mut self.mob.living_entity
5295 }
5296 pub fn base(&self) -> &BaseEntityData {
5298 &self.mob.living_entity.base
5299 }
5300 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5302 &mut self.mob.living_entity.base
5303 }
5304 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5307 let mut values = Vec::new();
5308 self.pack_dirty_into(&mut values);
5309 if values.is_empty() { None } else { Some(values) }
5310 }
5311 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5312 self.mob.pack_dirty_into(values);
5313 if self.baby.is_dirty() {
5314 values
5315 .push(DataValue {
5316 index: 16u8,
5317 serializer_id: 8i32,
5318 value: EntityData::Boolean(*self.baby.get()),
5319 });
5320 self.baby.clear_dirty();
5321 }
5322 if self.special_type.is_dirty() {
5323 values
5324 .push(DataValue {
5325 index: 17u8,
5326 serializer_id: 1i32,
5327 value: EntityData::Int(*self.special_type.get()),
5328 });
5329 self.special_type.clear_dirty();
5330 }
5331 if self.drowned_conversion.is_dirty() {
5332 values
5333 .push(DataValue {
5334 index: 18u8,
5335 serializer_id: 8i32,
5336 value: EntityData::Boolean(*self.drowned_conversion.get()),
5337 });
5338 self.drowned_conversion.clear_dirty();
5339 }
5340 }
5341 pub fn pack_all(&self) -> Vec<DataValue> {
5343 let mut values = Vec::new();
5344 self.pack_all_into(&mut values);
5345 values
5346 }
5347 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5348 self.mob.pack_all_into(values);
5349 if !self.baby.is_default() {
5350 values
5351 .push(DataValue {
5352 index: 16u8,
5353 serializer_id: 8i32,
5354 value: EntityData::Boolean(*self.baby.get()),
5355 });
5356 }
5357 if !self.special_type.is_default() {
5358 values
5359 .push(DataValue {
5360 index: 17u8,
5361 serializer_id: 1i32,
5362 value: EntityData::Int(*self.special_type.get()),
5363 });
5364 }
5365 if !self.drowned_conversion.is_default() {
5366 values
5367 .push(DataValue {
5368 index: 18u8,
5369 serializer_id: 8i32,
5370 value: EntityData::Boolean(*self.drowned_conversion.get()),
5371 });
5372 }
5373 }
5374 pub fn is_dirty(&self) -> bool {
5376 self.mob.is_dirty() || self.baby.is_dirty() || self.special_type.is_dirty()
5377 || self.drowned_conversion.is_dirty()
5378 }
5379}
5380impl Default for ZombieEntityData {
5381 fn default() -> Self {
5382 Self::new()
5383 }
5384}
5385impl VanillaEntityData for ZombieEntityData {
5386 fn base(&self) -> &BaseEntityData {
5387 ZombieEntityData::base(self)
5388 }
5389 fn base_mut(&mut self) -> &mut BaseEntityData {
5390 ZombieEntityData::base_mut(self)
5391 }
5392 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5393 ZombieEntityData::pack_dirty(self)
5394 }
5395 fn pack_all(&self) -> Vec<DataValue> {
5396 ZombieEntityData::pack_all(self)
5397 }
5398 fn is_dirty(&self) -> bool {
5399 ZombieEntityData::is_dirty(self)
5400 }
5401}
5402impl VanillaLivingEntityData for ZombieEntityData {
5403 fn living_entity(&self) -> &LivingEntityData {
5404 ZombieEntityData::living_entity(self)
5405 }
5406 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5407 ZombieEntityData::living_entity_mut(self)
5408 }
5409}
5410#[derive(Debug, Clone)]
5412pub struct ThrowableItemProjectileEntityData {
5413 pub base: BaseEntityData,
5414 pub item_stack: SyncedValue<ItemStack>,
5415}
5416impl ThrowableItemProjectileEntityData {
5417 pub fn new() -> Self {
5419 Self {
5420 base: BaseEntityData::new(),
5421 item_stack: SyncedValue::new(
5422 ItemStack::with_count(&*crate::vanilla_items::EGG, 1i32),
5423 ),
5424 }
5425 }
5426 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
5428 self
5429 }
5430 pub fn throwable_item_projectile_mut(
5432 &mut self,
5433 ) -> &mut ThrowableItemProjectileEntityData {
5434 self
5435 }
5436 pub fn base(&self) -> &BaseEntityData {
5438 &self.base
5439 }
5440 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5442 &mut self.base
5443 }
5444 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5447 let mut values = Vec::new();
5448 self.pack_dirty_into(&mut values);
5449 if values.is_empty() { None } else { Some(values) }
5450 }
5451 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5452 self.base.pack_dirty_into(values);
5453 if self.item_stack.is_dirty() {
5454 values
5455 .push(DataValue {
5456 index: 8u8,
5457 serializer_id: 7i32,
5458 value: EntityData::ItemStack(self.item_stack.get().clone()),
5459 });
5460 self.item_stack.clear_dirty();
5461 }
5462 }
5463 pub fn pack_all(&self) -> Vec<DataValue> {
5465 let mut values = Vec::new();
5466 self.pack_all_into(&mut values);
5467 values
5468 }
5469 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5470 self.base.pack_all_into(values);
5471 if !self.item_stack.is_default() {
5472 values
5473 .push(DataValue {
5474 index: 8u8,
5475 serializer_id: 7i32,
5476 value: EntityData::ItemStack(self.item_stack.get().clone()),
5477 });
5478 }
5479 }
5480 pub fn is_dirty(&self) -> bool {
5482 self.base.is_dirty() || self.item_stack.is_dirty()
5483 }
5484}
5485impl Default for ThrowableItemProjectileEntityData {
5486 fn default() -> Self {
5487 Self::new()
5488 }
5489}
5490impl VanillaEntityData for ThrowableItemProjectileEntityData {
5491 fn base(&self) -> &BaseEntityData {
5492 ThrowableItemProjectileEntityData::base(self)
5493 }
5494 fn base_mut(&mut self) -> &mut BaseEntityData {
5495 ThrowableItemProjectileEntityData::base_mut(self)
5496 }
5497 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5498 ThrowableItemProjectileEntityData::pack_dirty(self)
5499 }
5500 fn pack_all(&self) -> Vec<DataValue> {
5501 ThrowableItemProjectileEntityData::pack_all(self)
5502 }
5503 fn is_dirty(&self) -> bool {
5504 ThrowableItemProjectileEntityData::is_dirty(self)
5505 }
5506}
5507#[derive(Debug, Clone)]
5509pub struct GuardianEntityData {
5510 pub mob: MobEntityData,
5511 pub id_moving: SyncedValue<bool>,
5512 pub id_attack_target: SyncedValue<i32>,
5513}
5514impl GuardianEntityData {
5515 pub fn new() -> Self {
5517 Self {
5518 mob: MobEntityData::new(),
5519 id_moving: SyncedValue::new(false),
5520 id_attack_target: SyncedValue::new(0i32),
5521 }
5522 }
5523 pub fn guardian(&self) -> &GuardianEntityData {
5525 self
5526 }
5527 pub fn guardian_mut(&mut self) -> &mut GuardianEntityData {
5529 self
5530 }
5531 pub fn mob(&self) -> &MobEntityData {
5533 &self.mob
5534 }
5535 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5537 &mut self.mob
5538 }
5539 pub fn living_entity(&self) -> &LivingEntityData {
5541 &self.mob.living_entity
5542 }
5543 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5545 &mut self.mob.living_entity
5546 }
5547 pub fn base(&self) -> &BaseEntityData {
5549 &self.mob.living_entity.base
5550 }
5551 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5553 &mut self.mob.living_entity.base
5554 }
5555 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5558 let mut values = Vec::new();
5559 self.pack_dirty_into(&mut values);
5560 if values.is_empty() { None } else { Some(values) }
5561 }
5562 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5563 self.mob.pack_dirty_into(values);
5564 if self.id_moving.is_dirty() {
5565 values
5566 .push(DataValue {
5567 index: 16u8,
5568 serializer_id: 8i32,
5569 value: EntityData::Boolean(*self.id_moving.get()),
5570 });
5571 self.id_moving.clear_dirty();
5572 }
5573 if self.id_attack_target.is_dirty() {
5574 values
5575 .push(DataValue {
5576 index: 17u8,
5577 serializer_id: 1i32,
5578 value: EntityData::Int(*self.id_attack_target.get()),
5579 });
5580 self.id_attack_target.clear_dirty();
5581 }
5582 }
5583 pub fn pack_all(&self) -> Vec<DataValue> {
5585 let mut values = Vec::new();
5586 self.pack_all_into(&mut values);
5587 values
5588 }
5589 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5590 self.mob.pack_all_into(values);
5591 if !self.id_moving.is_default() {
5592 values
5593 .push(DataValue {
5594 index: 16u8,
5595 serializer_id: 8i32,
5596 value: EntityData::Boolean(*self.id_moving.get()),
5597 });
5598 }
5599 if !self.id_attack_target.is_default() {
5600 values
5601 .push(DataValue {
5602 index: 17u8,
5603 serializer_id: 1i32,
5604 value: EntityData::Int(*self.id_attack_target.get()),
5605 });
5606 }
5607 }
5608 pub fn is_dirty(&self) -> bool {
5610 self.mob.is_dirty() || self.id_moving.is_dirty()
5611 || self.id_attack_target.is_dirty()
5612 }
5613}
5614impl Default for GuardianEntityData {
5615 fn default() -> Self {
5616 Self::new()
5617 }
5618}
5619impl VanillaEntityData for GuardianEntityData {
5620 fn base(&self) -> &BaseEntityData {
5621 GuardianEntityData::base(self)
5622 }
5623 fn base_mut(&mut self) -> &mut BaseEntityData {
5624 GuardianEntityData::base_mut(self)
5625 }
5626 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5627 GuardianEntityData::pack_dirty(self)
5628 }
5629 fn pack_all(&self) -> Vec<DataValue> {
5630 GuardianEntityData::pack_all(self)
5631 }
5632 fn is_dirty(&self) -> bool {
5633 GuardianEntityData::is_dirty(self)
5634 }
5635}
5636impl VanillaLivingEntityData for GuardianEntityData {
5637 fn living_entity(&self) -> &LivingEntityData {
5638 GuardianEntityData::living_entity(self)
5639 }
5640 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5641 GuardianEntityData::living_entity_mut(self)
5642 }
5643}
5644#[derive(Debug, Clone)]
5646pub struct EndermanEntityData {
5647 pub mob: MobEntityData,
5648 pub carry_state: SyncedValue<Option<BlockStateId>>,
5649 pub creepy: SyncedValue<bool>,
5650 pub stared_at: SyncedValue<bool>,
5651}
5652impl EndermanEntityData {
5653 pub fn new() -> Self {
5655 Self {
5656 mob: MobEntityData::new(),
5657 carry_state: SyncedValue::new(None),
5658 creepy: SyncedValue::new(false),
5659 stared_at: SyncedValue::new(false),
5660 }
5661 }
5662 pub fn enderman(&self) -> &EndermanEntityData {
5664 self
5665 }
5666 pub fn enderman_mut(&mut self) -> &mut EndermanEntityData {
5668 self
5669 }
5670 pub fn mob(&self) -> &MobEntityData {
5672 &self.mob
5673 }
5674 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5676 &mut self.mob
5677 }
5678 pub fn living_entity(&self) -> &LivingEntityData {
5680 &self.mob.living_entity
5681 }
5682 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5684 &mut self.mob.living_entity
5685 }
5686 pub fn base(&self) -> &BaseEntityData {
5688 &self.mob.living_entity.base
5689 }
5690 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5692 &mut self.mob.living_entity.base
5693 }
5694 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5697 let mut values = Vec::new();
5698 self.pack_dirty_into(&mut values);
5699 if values.is_empty() { None } else { Some(values) }
5700 }
5701 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5702 self.mob.pack_dirty_into(values);
5703 if self.carry_state.is_dirty() {
5704 values
5705 .push(DataValue {
5706 index: 16u8,
5707 serializer_id: 15i32,
5708 value: EntityData::OptionalBlockState(self.carry_state.get().clone()),
5709 });
5710 self.carry_state.clear_dirty();
5711 }
5712 if self.creepy.is_dirty() {
5713 values
5714 .push(DataValue {
5715 index: 17u8,
5716 serializer_id: 8i32,
5717 value: EntityData::Boolean(*self.creepy.get()),
5718 });
5719 self.creepy.clear_dirty();
5720 }
5721 if self.stared_at.is_dirty() {
5722 values
5723 .push(DataValue {
5724 index: 18u8,
5725 serializer_id: 8i32,
5726 value: EntityData::Boolean(*self.stared_at.get()),
5727 });
5728 self.stared_at.clear_dirty();
5729 }
5730 }
5731 pub fn pack_all(&self) -> Vec<DataValue> {
5733 let mut values = Vec::new();
5734 self.pack_all_into(&mut values);
5735 values
5736 }
5737 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5738 self.mob.pack_all_into(values);
5739 if !self.carry_state.is_default() {
5740 values
5741 .push(DataValue {
5742 index: 16u8,
5743 serializer_id: 15i32,
5744 value: EntityData::OptionalBlockState(self.carry_state.get().clone()),
5745 });
5746 }
5747 if !self.creepy.is_default() {
5748 values
5749 .push(DataValue {
5750 index: 17u8,
5751 serializer_id: 8i32,
5752 value: EntityData::Boolean(*self.creepy.get()),
5753 });
5754 }
5755 if !self.stared_at.is_default() {
5756 values
5757 .push(DataValue {
5758 index: 18u8,
5759 serializer_id: 8i32,
5760 value: EntityData::Boolean(*self.stared_at.get()),
5761 });
5762 }
5763 }
5764 pub fn is_dirty(&self) -> bool {
5766 self.mob.is_dirty() || self.carry_state.is_dirty() || self.creepy.is_dirty()
5767 || self.stared_at.is_dirty()
5768 }
5769}
5770impl Default for EndermanEntityData {
5771 fn default() -> Self {
5772 Self::new()
5773 }
5774}
5775impl VanillaEntityData for EndermanEntityData {
5776 fn base(&self) -> &BaseEntityData {
5777 EndermanEntityData::base(self)
5778 }
5779 fn base_mut(&mut self) -> &mut BaseEntityData {
5780 EndermanEntityData::base_mut(self)
5781 }
5782 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5783 EndermanEntityData::pack_dirty(self)
5784 }
5785 fn pack_all(&self) -> Vec<DataValue> {
5786 EndermanEntityData::pack_all(self)
5787 }
5788 fn is_dirty(&self) -> bool {
5789 EndermanEntityData::is_dirty(self)
5790 }
5791}
5792impl VanillaLivingEntityData for EndermanEntityData {
5793 fn living_entity(&self) -> &LivingEntityData {
5794 EndermanEntityData::living_entity(self)
5795 }
5796 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5797 EndermanEntityData::living_entity_mut(self)
5798 }
5799}
5800#[derive(Debug, Clone)]
5802pub struct EnderDragonEntityData {
5803 pub mob: MobEntityData,
5804 pub phase: SyncedValue<i32>,
5805}
5806impl EnderDragonEntityData {
5807 pub fn new() -> Self {
5809 Self {
5810 mob: MobEntityData::new(),
5811 phase: SyncedValue::new(10i32),
5812 }
5813 }
5814 pub fn ender_dragon(&self) -> &EnderDragonEntityData {
5816 self
5817 }
5818 pub fn ender_dragon_mut(&mut self) -> &mut EnderDragonEntityData {
5820 self
5821 }
5822 pub fn mob(&self) -> &MobEntityData {
5824 &self.mob
5825 }
5826 pub fn mob_mut(&mut self) -> &mut MobEntityData {
5828 &mut self.mob
5829 }
5830 pub fn living_entity(&self) -> &LivingEntityData {
5832 &self.mob.living_entity
5833 }
5834 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5836 &mut self.mob.living_entity
5837 }
5838 pub fn base(&self) -> &BaseEntityData {
5840 &self.mob.living_entity.base
5841 }
5842 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5844 &mut self.mob.living_entity.base
5845 }
5846 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5849 let mut values = Vec::new();
5850 self.pack_dirty_into(&mut values);
5851 if values.is_empty() { None } else { Some(values) }
5852 }
5853 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5854 self.mob.pack_dirty_into(values);
5855 if self.phase.is_dirty() {
5856 values
5857 .push(DataValue {
5858 index: 16u8,
5859 serializer_id: 1i32,
5860 value: EntityData::Int(*self.phase.get()),
5861 });
5862 self.phase.clear_dirty();
5863 }
5864 }
5865 pub fn pack_all(&self) -> Vec<DataValue> {
5867 let mut values = Vec::new();
5868 self.pack_all_into(&mut values);
5869 values
5870 }
5871 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5872 self.mob.pack_all_into(values);
5873 if !self.phase.is_default() {
5874 values
5875 .push(DataValue {
5876 index: 16u8,
5877 serializer_id: 1i32,
5878 value: EntityData::Int(*self.phase.get()),
5879 });
5880 }
5881 }
5882 pub fn is_dirty(&self) -> bool {
5884 self.mob.is_dirty() || self.phase.is_dirty()
5885 }
5886}
5887impl Default for EnderDragonEntityData {
5888 fn default() -> Self {
5889 Self::new()
5890 }
5891}
5892impl VanillaEntityData for EnderDragonEntityData {
5893 fn base(&self) -> &BaseEntityData {
5894 EnderDragonEntityData::base(self)
5895 }
5896 fn base_mut(&mut self) -> &mut BaseEntityData {
5897 EnderDragonEntityData::base_mut(self)
5898 }
5899 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5900 EnderDragonEntityData::pack_dirty(self)
5901 }
5902 fn pack_all(&self) -> Vec<DataValue> {
5903 EnderDragonEntityData::pack_all(self)
5904 }
5905 fn is_dirty(&self) -> bool {
5906 EnderDragonEntityData::is_dirty(self)
5907 }
5908}
5909impl VanillaLivingEntityData for EnderDragonEntityData {
5910 fn living_entity(&self) -> &LivingEntityData {
5911 EnderDragonEntityData::living_entity(self)
5912 }
5913 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
5914 EnderDragonEntityData::living_entity_mut(self)
5915 }
5916}
5917#[derive(Debug, Clone)]
5919pub struct EndCrystalEntityData {
5920 pub base: BaseEntityData,
5921 pub beam_target: SyncedValue<Option<BlockPos>>,
5922 pub show_bottom: SyncedValue<bool>,
5923}
5924impl EndCrystalEntityData {
5925 pub fn new() -> Self {
5927 Self {
5928 base: BaseEntityData::new(),
5929 beam_target: SyncedValue::new(None),
5930 show_bottom: SyncedValue::new(true),
5931 }
5932 }
5933 pub fn end_crystal(&self) -> &EndCrystalEntityData {
5935 self
5936 }
5937 pub fn end_crystal_mut(&mut self) -> &mut EndCrystalEntityData {
5939 self
5940 }
5941 pub fn base(&self) -> &BaseEntityData {
5943 &self.base
5944 }
5945 pub fn base_mut(&mut self) -> &mut BaseEntityData {
5947 &mut self.base
5948 }
5949 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
5952 let mut values = Vec::new();
5953 self.pack_dirty_into(&mut values);
5954 if values.is_empty() { None } else { Some(values) }
5955 }
5956 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
5957 self.base.pack_dirty_into(values);
5958 if self.beam_target.is_dirty() {
5959 values
5960 .push(DataValue {
5961 index: 8u8,
5962 serializer_id: 11i32,
5963 value: EntityData::OptionalBlockPos(self.beam_target.get().clone()),
5964 });
5965 self.beam_target.clear_dirty();
5966 }
5967 if self.show_bottom.is_dirty() {
5968 values
5969 .push(DataValue {
5970 index: 9u8,
5971 serializer_id: 8i32,
5972 value: EntityData::Boolean(*self.show_bottom.get()),
5973 });
5974 self.show_bottom.clear_dirty();
5975 }
5976 }
5977 pub fn pack_all(&self) -> Vec<DataValue> {
5979 let mut values = Vec::new();
5980 self.pack_all_into(&mut values);
5981 values
5982 }
5983 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
5984 self.base.pack_all_into(values);
5985 if !self.beam_target.is_default() {
5986 values
5987 .push(DataValue {
5988 index: 8u8,
5989 serializer_id: 11i32,
5990 value: EntityData::OptionalBlockPos(self.beam_target.get().clone()),
5991 });
5992 }
5993 if !self.show_bottom.is_default() {
5994 values
5995 .push(DataValue {
5996 index: 9u8,
5997 serializer_id: 8i32,
5998 value: EntityData::Boolean(*self.show_bottom.get()),
5999 });
6000 }
6001 }
6002 pub fn is_dirty(&self) -> bool {
6004 self.base.is_dirty() || self.beam_target.is_dirty()
6005 || self.show_bottom.is_dirty()
6006 }
6007}
6008impl Default for EndCrystalEntityData {
6009 fn default() -> Self {
6010 Self::new()
6011 }
6012}
6013impl VanillaEntityData for EndCrystalEntityData {
6014 fn base(&self) -> &BaseEntityData {
6015 EndCrystalEntityData::base(self)
6016 }
6017 fn base_mut(&mut self) -> &mut BaseEntityData {
6018 EndCrystalEntityData::base_mut(self)
6019 }
6020 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6021 EndCrystalEntityData::pack_dirty(self)
6022 }
6023 fn pack_all(&self) -> Vec<DataValue> {
6024 EndCrystalEntityData::pack_all(self)
6025 }
6026 fn is_dirty(&self) -> bool {
6027 EndCrystalEntityData::is_dirty(self)
6028 }
6029}
6030#[derive(Debug, Clone)]
6032pub struct RaiderEntityData {
6033 pub mob: MobEntityData,
6034 pub is_celebrating: SyncedValue<bool>,
6035}
6036impl RaiderEntityData {
6037 pub fn new() -> Self {
6039 Self {
6040 mob: MobEntityData::new(),
6041 is_celebrating: SyncedValue::new(false),
6042 }
6043 }
6044 pub fn raider(&self) -> &RaiderEntityData {
6046 self
6047 }
6048 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
6050 self
6051 }
6052 pub fn mob(&self) -> &MobEntityData {
6054 &self.mob
6055 }
6056 pub fn mob_mut(&mut self) -> &mut MobEntityData {
6058 &mut self.mob
6059 }
6060 pub fn living_entity(&self) -> &LivingEntityData {
6062 &self.mob.living_entity
6063 }
6064 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6066 &mut self.mob.living_entity
6067 }
6068 pub fn base(&self) -> &BaseEntityData {
6070 &self.mob.living_entity.base
6071 }
6072 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6074 &mut self.mob.living_entity.base
6075 }
6076 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6079 let mut values = Vec::new();
6080 self.pack_dirty_into(&mut values);
6081 if values.is_empty() { None } else { Some(values) }
6082 }
6083 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6084 self.mob.pack_dirty_into(values);
6085 if self.is_celebrating.is_dirty() {
6086 values
6087 .push(DataValue {
6088 index: 16u8,
6089 serializer_id: 8i32,
6090 value: EntityData::Boolean(*self.is_celebrating.get()),
6091 });
6092 self.is_celebrating.clear_dirty();
6093 }
6094 }
6095 pub fn pack_all(&self) -> Vec<DataValue> {
6097 let mut values = Vec::new();
6098 self.pack_all_into(&mut values);
6099 values
6100 }
6101 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6102 self.mob.pack_all_into(values);
6103 if !self.is_celebrating.is_default() {
6104 values
6105 .push(DataValue {
6106 index: 16u8,
6107 serializer_id: 8i32,
6108 value: EntityData::Boolean(*self.is_celebrating.get()),
6109 });
6110 }
6111 }
6112 pub fn is_dirty(&self) -> bool {
6114 self.mob.is_dirty() || self.is_celebrating.is_dirty()
6115 }
6116}
6117impl Default for RaiderEntityData {
6118 fn default() -> Self {
6119 Self::new()
6120 }
6121}
6122impl VanillaEntityData for RaiderEntityData {
6123 fn base(&self) -> &BaseEntityData {
6124 RaiderEntityData::base(self)
6125 }
6126 fn base_mut(&mut self) -> &mut BaseEntityData {
6127 RaiderEntityData::base_mut(self)
6128 }
6129 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6130 RaiderEntityData::pack_dirty(self)
6131 }
6132 fn pack_all(&self) -> Vec<DataValue> {
6133 RaiderEntityData::pack_all(self)
6134 }
6135 fn is_dirty(&self) -> bool {
6136 RaiderEntityData::is_dirty(self)
6137 }
6138}
6139impl VanillaLivingEntityData for RaiderEntityData {
6140 fn living_entity(&self) -> &LivingEntityData {
6141 RaiderEntityData::living_entity(self)
6142 }
6143 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6144 RaiderEntityData::living_entity_mut(self)
6145 }
6146}
6147#[derive(Debug, Clone)]
6149pub struct SpellcasterIllagerEntityData {
6150 pub raider: RaiderEntityData,
6151 pub spell_casting: SyncedValue<i8>,
6152}
6153impl SpellcasterIllagerEntityData {
6154 pub fn new() -> Self {
6156 Self {
6157 raider: RaiderEntityData::new(),
6158 spell_casting: SyncedValue::new(0i8),
6159 }
6160 }
6161 pub fn spellcaster_illager(&self) -> &SpellcasterIllagerEntityData {
6163 self
6164 }
6165 pub fn spellcaster_illager_mut(&mut self) -> &mut SpellcasterIllagerEntityData {
6167 self
6168 }
6169 pub fn raider(&self) -> &RaiderEntityData {
6171 &self.raider
6172 }
6173 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
6175 &mut self.raider
6176 }
6177 pub fn mob(&self) -> &MobEntityData {
6179 &self.raider.mob
6180 }
6181 pub fn mob_mut(&mut self) -> &mut MobEntityData {
6183 &mut self.raider.mob
6184 }
6185 pub fn living_entity(&self) -> &LivingEntityData {
6187 &self.raider.mob.living_entity
6188 }
6189 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6191 &mut self.raider.mob.living_entity
6192 }
6193 pub fn base(&self) -> &BaseEntityData {
6195 &self.raider.mob.living_entity.base
6196 }
6197 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6199 &mut self.raider.mob.living_entity.base
6200 }
6201 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6204 let mut values = Vec::new();
6205 self.pack_dirty_into(&mut values);
6206 if values.is_empty() { None } else { Some(values) }
6207 }
6208 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6209 self.raider.pack_dirty_into(values);
6210 if self.spell_casting.is_dirty() {
6211 values
6212 .push(DataValue {
6213 index: 17u8,
6214 serializer_id: 0i32,
6215 value: EntityData::Byte(*self.spell_casting.get()),
6216 });
6217 self.spell_casting.clear_dirty();
6218 }
6219 }
6220 pub fn pack_all(&self) -> Vec<DataValue> {
6222 let mut values = Vec::new();
6223 self.pack_all_into(&mut values);
6224 values
6225 }
6226 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6227 self.raider.pack_all_into(values);
6228 if !self.spell_casting.is_default() {
6229 values
6230 .push(DataValue {
6231 index: 17u8,
6232 serializer_id: 0i32,
6233 value: EntityData::Byte(*self.spell_casting.get()),
6234 });
6235 }
6236 }
6237 pub fn is_dirty(&self) -> bool {
6239 self.raider.is_dirty() || self.spell_casting.is_dirty()
6240 }
6241}
6242impl Default for SpellcasterIllagerEntityData {
6243 fn default() -> Self {
6244 Self::new()
6245 }
6246}
6247impl VanillaEntityData for SpellcasterIllagerEntityData {
6248 fn base(&self) -> &BaseEntityData {
6249 SpellcasterIllagerEntityData::base(self)
6250 }
6251 fn base_mut(&mut self) -> &mut BaseEntityData {
6252 SpellcasterIllagerEntityData::base_mut(self)
6253 }
6254 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6255 SpellcasterIllagerEntityData::pack_dirty(self)
6256 }
6257 fn pack_all(&self) -> Vec<DataValue> {
6258 SpellcasterIllagerEntityData::pack_all(self)
6259 }
6260 fn is_dirty(&self) -> bool {
6261 SpellcasterIllagerEntityData::is_dirty(self)
6262 }
6263}
6264impl VanillaLivingEntityData for SpellcasterIllagerEntityData {
6265 fn living_entity(&self) -> &LivingEntityData {
6266 SpellcasterIllagerEntityData::living_entity(self)
6267 }
6268 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6269 SpellcasterIllagerEntityData::living_entity_mut(self)
6270 }
6271}
6272#[derive(Debug, Clone)]
6274pub struct ExperienceOrbEntityData {
6275 pub base: BaseEntityData,
6276 pub value: SyncedValue<i32>,
6277}
6278impl ExperienceOrbEntityData {
6279 pub fn new() -> Self {
6281 Self {
6282 base: BaseEntityData::new(),
6283 value: SyncedValue::new(0i32),
6284 }
6285 }
6286 pub fn experience_orb(&self) -> &ExperienceOrbEntityData {
6288 self
6289 }
6290 pub fn experience_orb_mut(&mut self) -> &mut ExperienceOrbEntityData {
6292 self
6293 }
6294 pub fn base(&self) -> &BaseEntityData {
6296 &self.base
6297 }
6298 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6300 &mut self.base
6301 }
6302 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6305 let mut values = Vec::new();
6306 self.pack_dirty_into(&mut values);
6307 if values.is_empty() { None } else { Some(values) }
6308 }
6309 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6310 self.base.pack_dirty_into(values);
6311 if self.value.is_dirty() {
6312 values
6313 .push(DataValue {
6314 index: 8u8,
6315 serializer_id: 1i32,
6316 value: EntityData::Int(*self.value.get()),
6317 });
6318 self.value.clear_dirty();
6319 }
6320 }
6321 pub fn pack_all(&self) -> Vec<DataValue> {
6323 let mut values = Vec::new();
6324 self.pack_all_into(&mut values);
6325 values
6326 }
6327 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6328 self.base.pack_all_into(values);
6329 if !self.value.is_default() {
6330 values
6331 .push(DataValue {
6332 index: 8u8,
6333 serializer_id: 1i32,
6334 value: EntityData::Int(*self.value.get()),
6335 });
6336 }
6337 }
6338 pub fn is_dirty(&self) -> bool {
6340 self.base.is_dirty() || self.value.is_dirty()
6341 }
6342}
6343impl Default for ExperienceOrbEntityData {
6344 fn default() -> Self {
6345 Self::new()
6346 }
6347}
6348impl VanillaEntityData for ExperienceOrbEntityData {
6349 fn base(&self) -> &BaseEntityData {
6350 ExperienceOrbEntityData::base(self)
6351 }
6352 fn base_mut(&mut self) -> &mut BaseEntityData {
6353 ExperienceOrbEntityData::base_mut(self)
6354 }
6355 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6356 ExperienceOrbEntityData::pack_dirty(self)
6357 }
6358 fn pack_all(&self) -> Vec<DataValue> {
6359 ExperienceOrbEntityData::pack_all(self)
6360 }
6361 fn is_dirty(&self) -> bool {
6362 ExperienceOrbEntityData::is_dirty(self)
6363 }
6364}
6365#[derive(Debug, Clone)]
6367pub struct EyeOfEnderEntityData {
6368 pub base: BaseEntityData,
6369 pub item_stack: SyncedValue<ItemStack>,
6370}
6371impl EyeOfEnderEntityData {
6372 pub fn new() -> Self {
6374 Self {
6375 base: BaseEntityData::new(),
6376 item_stack: SyncedValue::new(
6377 ItemStack::with_count(&*crate::vanilla_items::ENDER_EYE, 1i32),
6378 ),
6379 }
6380 }
6381 pub fn eye_of_ender(&self) -> &EyeOfEnderEntityData {
6383 self
6384 }
6385 pub fn eye_of_ender_mut(&mut self) -> &mut EyeOfEnderEntityData {
6387 self
6388 }
6389 pub fn base(&self) -> &BaseEntityData {
6391 &self.base
6392 }
6393 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6395 &mut self.base
6396 }
6397 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6400 let mut values = Vec::new();
6401 self.pack_dirty_into(&mut values);
6402 if values.is_empty() { None } else { Some(values) }
6403 }
6404 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6405 self.base.pack_dirty_into(values);
6406 if self.item_stack.is_dirty() {
6407 values
6408 .push(DataValue {
6409 index: 8u8,
6410 serializer_id: 7i32,
6411 value: EntityData::ItemStack(self.item_stack.get().clone()),
6412 });
6413 self.item_stack.clear_dirty();
6414 }
6415 }
6416 pub fn pack_all(&self) -> Vec<DataValue> {
6418 let mut values = Vec::new();
6419 self.pack_all_into(&mut values);
6420 values
6421 }
6422 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6423 self.base.pack_all_into(values);
6424 if !self.item_stack.is_default() {
6425 values
6426 .push(DataValue {
6427 index: 8u8,
6428 serializer_id: 7i32,
6429 value: EntityData::ItemStack(self.item_stack.get().clone()),
6430 });
6431 }
6432 }
6433 pub fn is_dirty(&self) -> bool {
6435 self.base.is_dirty() || self.item_stack.is_dirty()
6436 }
6437}
6438impl Default for EyeOfEnderEntityData {
6439 fn default() -> Self {
6440 Self::new()
6441 }
6442}
6443impl VanillaEntityData for EyeOfEnderEntityData {
6444 fn base(&self) -> &BaseEntityData {
6445 EyeOfEnderEntityData::base(self)
6446 }
6447 fn base_mut(&mut self) -> &mut BaseEntityData {
6448 EyeOfEnderEntityData::base_mut(self)
6449 }
6450 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6451 EyeOfEnderEntityData::pack_dirty(self)
6452 }
6453 fn pack_all(&self) -> Vec<DataValue> {
6454 EyeOfEnderEntityData::pack_all(self)
6455 }
6456 fn is_dirty(&self) -> bool {
6457 EyeOfEnderEntityData::is_dirty(self)
6458 }
6459}
6460#[derive(Debug, Clone)]
6462pub struct FallingBlockEntityData {
6463 pub base: BaseEntityData,
6464 pub start_pos: SyncedValue<BlockPos>,
6465}
6466impl FallingBlockEntityData {
6467 pub fn new() -> Self {
6469 Self {
6470 base: BaseEntityData::new(),
6471 start_pos: SyncedValue::new(BlockPos::new(0i32, 0i32, 0i32)),
6472 }
6473 }
6474 pub fn falling_block_entity(&self) -> &FallingBlockEntityData {
6476 self
6477 }
6478 pub fn falling_block_entity_mut(&mut self) -> &mut FallingBlockEntityData {
6480 self
6481 }
6482 pub fn base(&self) -> &BaseEntityData {
6484 &self.base
6485 }
6486 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6488 &mut self.base
6489 }
6490 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6493 let mut values = Vec::new();
6494 self.pack_dirty_into(&mut values);
6495 if values.is_empty() { None } else { Some(values) }
6496 }
6497 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6498 self.base.pack_dirty_into(values);
6499 if self.start_pos.is_dirty() {
6500 values
6501 .push(DataValue {
6502 index: 8u8,
6503 serializer_id: 10i32,
6504 value: EntityData::BlockPos(*self.start_pos.get()),
6505 });
6506 self.start_pos.clear_dirty();
6507 }
6508 }
6509 pub fn pack_all(&self) -> Vec<DataValue> {
6511 let mut values = Vec::new();
6512 self.pack_all_into(&mut values);
6513 values
6514 }
6515 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6516 self.base.pack_all_into(values);
6517 if !self.start_pos.is_default() {
6518 values
6519 .push(DataValue {
6520 index: 8u8,
6521 serializer_id: 10i32,
6522 value: EntityData::BlockPos(*self.start_pos.get()),
6523 });
6524 }
6525 }
6526 pub fn is_dirty(&self) -> bool {
6528 self.base.is_dirty() || self.start_pos.is_dirty()
6529 }
6530}
6531impl Default for FallingBlockEntityData {
6532 fn default() -> Self {
6533 Self::new()
6534 }
6535}
6536impl VanillaEntityData for FallingBlockEntityData {
6537 fn base(&self) -> &BaseEntityData {
6538 FallingBlockEntityData::base(self)
6539 }
6540 fn base_mut(&mut self) -> &mut BaseEntityData {
6541 FallingBlockEntityData::base_mut(self)
6542 }
6543 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6544 FallingBlockEntityData::pack_dirty(self)
6545 }
6546 fn pack_all(&self) -> Vec<DataValue> {
6547 FallingBlockEntityData::pack_all(self)
6548 }
6549 fn is_dirty(&self) -> bool {
6550 FallingBlockEntityData::is_dirty(self)
6551 }
6552}
6553#[derive(Debug, Clone)]
6555pub struct FireballEntityData {
6556 pub base: BaseEntityData,
6557 pub item_stack: SyncedValue<ItemStack>,
6558}
6559impl FireballEntityData {
6560 pub fn new() -> Self {
6562 Self {
6563 base: BaseEntityData::new(),
6564 item_stack: SyncedValue::new(
6565 ItemStack::with_count(&*crate::vanilla_items::FIRE_CHARGE, 1i32),
6566 ),
6567 }
6568 }
6569 pub fn fireball(&self) -> &FireballEntityData {
6571 self
6572 }
6573 pub fn fireball_mut(&mut self) -> &mut FireballEntityData {
6575 self
6576 }
6577 pub fn base(&self) -> &BaseEntityData {
6579 &self.base
6580 }
6581 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6583 &mut self.base
6584 }
6585 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6588 let mut values = Vec::new();
6589 self.pack_dirty_into(&mut values);
6590 if values.is_empty() { None } else { Some(values) }
6591 }
6592 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6593 self.base.pack_dirty_into(values);
6594 if self.item_stack.is_dirty() {
6595 values
6596 .push(DataValue {
6597 index: 8u8,
6598 serializer_id: 7i32,
6599 value: EntityData::ItemStack(self.item_stack.get().clone()),
6600 });
6601 self.item_stack.clear_dirty();
6602 }
6603 }
6604 pub fn pack_all(&self) -> Vec<DataValue> {
6606 let mut values = Vec::new();
6607 self.pack_all_into(&mut values);
6608 values
6609 }
6610 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6611 self.base.pack_all_into(values);
6612 if !self.item_stack.is_default() {
6613 values
6614 .push(DataValue {
6615 index: 8u8,
6616 serializer_id: 7i32,
6617 value: EntityData::ItemStack(self.item_stack.get().clone()),
6618 });
6619 }
6620 }
6621 pub fn is_dirty(&self) -> bool {
6623 self.base.is_dirty() || self.item_stack.is_dirty()
6624 }
6625}
6626impl Default for FireballEntityData {
6627 fn default() -> Self {
6628 Self::new()
6629 }
6630}
6631impl VanillaEntityData for FireballEntityData {
6632 fn base(&self) -> &BaseEntityData {
6633 FireballEntityData::base(self)
6634 }
6635 fn base_mut(&mut self) -> &mut BaseEntityData {
6636 FireballEntityData::base_mut(self)
6637 }
6638 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6639 FireballEntityData::pack_dirty(self)
6640 }
6641 fn pack_all(&self) -> Vec<DataValue> {
6642 FireballEntityData::pack_all(self)
6643 }
6644 fn is_dirty(&self) -> bool {
6645 FireballEntityData::is_dirty(self)
6646 }
6647}
6648#[derive(Debug, Clone)]
6650pub struct FireworkRocketEntityData {
6651 pub base: BaseEntityData,
6652 pub id_fireworks_item: SyncedValue<ItemStack>,
6653 pub attached_to_target: SyncedValue<Option<u32>>,
6654 pub shot_at_angle: SyncedValue<bool>,
6655}
6656impl FireworkRocketEntityData {
6657 pub fn new() -> Self {
6659 Self {
6660 base: BaseEntityData::new(),
6661 id_fireworks_item: SyncedValue::new(
6662 ItemStack::with_count(&*crate::vanilla_items::FIREWORK_ROCKET, 1i32),
6663 ),
6664 attached_to_target: SyncedValue::new(None),
6665 shot_at_angle: SyncedValue::new(false),
6666 }
6667 }
6668 pub fn firework_rocket_entity(&self) -> &FireworkRocketEntityData {
6670 self
6671 }
6672 pub fn firework_rocket_entity_mut(&mut self) -> &mut FireworkRocketEntityData {
6674 self
6675 }
6676 pub fn base(&self) -> &BaseEntityData {
6678 &self.base
6679 }
6680 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6682 &mut self.base
6683 }
6684 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6687 let mut values = Vec::new();
6688 self.pack_dirty_into(&mut values);
6689 if values.is_empty() { None } else { Some(values) }
6690 }
6691 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6692 self.base.pack_dirty_into(values);
6693 if self.id_fireworks_item.is_dirty() {
6694 values
6695 .push(DataValue {
6696 index: 8u8,
6697 serializer_id: 7i32,
6698 value: EntityData::ItemStack(self.id_fireworks_item.get().clone()),
6699 });
6700 self.id_fireworks_item.clear_dirty();
6701 }
6702 if self.attached_to_target.is_dirty() {
6703 values
6704 .push(DataValue {
6705 index: 9u8,
6706 serializer_id: 19i32,
6707 value: EntityData::OptionalUnsignedInt(
6708 self.attached_to_target.get().clone(),
6709 ),
6710 });
6711 self.attached_to_target.clear_dirty();
6712 }
6713 if self.shot_at_angle.is_dirty() {
6714 values
6715 .push(DataValue {
6716 index: 10u8,
6717 serializer_id: 8i32,
6718 value: EntityData::Boolean(*self.shot_at_angle.get()),
6719 });
6720 self.shot_at_angle.clear_dirty();
6721 }
6722 }
6723 pub fn pack_all(&self) -> Vec<DataValue> {
6725 let mut values = Vec::new();
6726 self.pack_all_into(&mut values);
6727 values
6728 }
6729 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6730 self.base.pack_all_into(values);
6731 if !self.id_fireworks_item.is_default() {
6732 values
6733 .push(DataValue {
6734 index: 8u8,
6735 serializer_id: 7i32,
6736 value: EntityData::ItemStack(self.id_fireworks_item.get().clone()),
6737 });
6738 }
6739 if !self.attached_to_target.is_default() {
6740 values
6741 .push(DataValue {
6742 index: 9u8,
6743 serializer_id: 19i32,
6744 value: EntityData::OptionalUnsignedInt(
6745 self.attached_to_target.get().clone(),
6746 ),
6747 });
6748 }
6749 if !self.shot_at_angle.is_default() {
6750 values
6751 .push(DataValue {
6752 index: 10u8,
6753 serializer_id: 8i32,
6754 value: EntityData::Boolean(*self.shot_at_angle.get()),
6755 });
6756 }
6757 }
6758 pub fn is_dirty(&self) -> bool {
6760 self.base.is_dirty() || self.id_fireworks_item.is_dirty()
6761 || self.attached_to_target.is_dirty() || self.shot_at_angle.is_dirty()
6762 }
6763}
6764impl Default for FireworkRocketEntityData {
6765 fn default() -> Self {
6766 Self::new()
6767 }
6768}
6769impl VanillaEntityData for FireworkRocketEntityData {
6770 fn base(&self) -> &BaseEntityData {
6771 FireworkRocketEntityData::base(self)
6772 }
6773 fn base_mut(&mut self) -> &mut BaseEntityData {
6774 FireworkRocketEntityData::base_mut(self)
6775 }
6776 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6777 FireworkRocketEntityData::pack_dirty(self)
6778 }
6779 fn pack_all(&self) -> Vec<DataValue> {
6780 FireworkRocketEntityData::pack_all(self)
6781 }
6782 fn is_dirty(&self) -> bool {
6783 FireworkRocketEntityData::is_dirty(self)
6784 }
6785}
6786#[derive(Debug, Clone)]
6788pub struct FoxEntityData {
6789 pub ageable_mob: AgeableMobEntityData,
6790 pub variant_type: SyncedValue<i32>,
6791 pub flags: SyncedValue<i8>,
6792 pub trusted_id_0: SyncedValue<Option<Uuid>>,
6793 pub trusted_id_1: SyncedValue<Option<Uuid>>,
6794}
6795impl FoxEntityData {
6796 pub fn new() -> Self {
6798 Self {
6799 ageable_mob: AgeableMobEntityData::new(),
6800 variant_type: SyncedValue::new(0i32),
6801 flags: SyncedValue::new(0i8),
6802 trusted_id_0: SyncedValue::new(None),
6803 trusted_id_1: SyncedValue::new(None),
6804 }
6805 }
6806 pub fn fox(&self) -> &FoxEntityData {
6808 self
6809 }
6810 pub fn fox_mut(&mut self) -> &mut FoxEntityData {
6812 self
6813 }
6814 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
6816 &self.ageable_mob
6817 }
6818 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
6820 &mut self.ageable_mob
6821 }
6822 pub fn mob(&self) -> &MobEntityData {
6824 &self.ageable_mob.mob
6825 }
6826 pub fn mob_mut(&mut self) -> &mut MobEntityData {
6828 &mut self.ageable_mob.mob
6829 }
6830 pub fn living_entity(&self) -> &LivingEntityData {
6832 &self.ageable_mob.mob.living_entity
6833 }
6834 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6836 &mut self.ageable_mob.mob.living_entity
6837 }
6838 pub fn base(&self) -> &BaseEntityData {
6840 &self.ageable_mob.mob.living_entity.base
6841 }
6842 pub fn base_mut(&mut self) -> &mut BaseEntityData {
6844 &mut self.ageable_mob.mob.living_entity.base
6845 }
6846 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6849 let mut values = Vec::new();
6850 self.pack_dirty_into(&mut values);
6851 if values.is_empty() { None } else { Some(values) }
6852 }
6853 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
6854 self.ageable_mob.pack_dirty_into(values);
6855 if self.variant_type.is_dirty() {
6856 values
6857 .push(DataValue {
6858 index: 18u8,
6859 serializer_id: 1i32,
6860 value: EntityData::Int(*self.variant_type.get()),
6861 });
6862 self.variant_type.clear_dirty();
6863 }
6864 if self.flags.is_dirty() {
6865 values
6866 .push(DataValue {
6867 index: 19u8,
6868 serializer_id: 0i32,
6869 value: EntityData::Byte(*self.flags.get()),
6870 });
6871 self.flags.clear_dirty();
6872 }
6873 if self.trusted_id_0.is_dirty() {
6874 values
6875 .push(DataValue {
6876 index: 20u8,
6877 serializer_id: 13i32,
6878 value: EntityData::OptionalLivingEntityRef(
6879 self.trusted_id_0.get().clone(),
6880 ),
6881 });
6882 self.trusted_id_0.clear_dirty();
6883 }
6884 if self.trusted_id_1.is_dirty() {
6885 values
6886 .push(DataValue {
6887 index: 21u8,
6888 serializer_id: 13i32,
6889 value: EntityData::OptionalLivingEntityRef(
6890 self.trusted_id_1.get().clone(),
6891 ),
6892 });
6893 self.trusted_id_1.clear_dirty();
6894 }
6895 }
6896 pub fn pack_all(&self) -> Vec<DataValue> {
6898 let mut values = Vec::new();
6899 self.pack_all_into(&mut values);
6900 values
6901 }
6902 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
6903 self.ageable_mob.pack_all_into(values);
6904 if !self.variant_type.is_default() {
6905 values
6906 .push(DataValue {
6907 index: 18u8,
6908 serializer_id: 1i32,
6909 value: EntityData::Int(*self.variant_type.get()),
6910 });
6911 }
6912 if !self.flags.is_default() {
6913 values
6914 .push(DataValue {
6915 index: 19u8,
6916 serializer_id: 0i32,
6917 value: EntityData::Byte(*self.flags.get()),
6918 });
6919 }
6920 if !self.trusted_id_0.is_default() {
6921 values
6922 .push(DataValue {
6923 index: 20u8,
6924 serializer_id: 13i32,
6925 value: EntityData::OptionalLivingEntityRef(
6926 self.trusted_id_0.get().clone(),
6927 ),
6928 });
6929 }
6930 if !self.trusted_id_1.is_default() {
6931 values
6932 .push(DataValue {
6933 index: 21u8,
6934 serializer_id: 13i32,
6935 value: EntityData::OptionalLivingEntityRef(
6936 self.trusted_id_1.get().clone(),
6937 ),
6938 });
6939 }
6940 }
6941 pub fn is_dirty(&self) -> bool {
6943 self.ageable_mob.is_dirty() || self.variant_type.is_dirty()
6944 || self.flags.is_dirty() || self.trusted_id_0.is_dirty()
6945 || self.trusted_id_1.is_dirty()
6946 }
6947}
6948impl Default for FoxEntityData {
6949 fn default() -> Self {
6950 Self::new()
6951 }
6952}
6953impl VanillaEntityData for FoxEntityData {
6954 fn base(&self) -> &BaseEntityData {
6955 FoxEntityData::base(self)
6956 }
6957 fn base_mut(&mut self) -> &mut BaseEntityData {
6958 FoxEntityData::base_mut(self)
6959 }
6960 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
6961 FoxEntityData::pack_dirty(self)
6962 }
6963 fn pack_all(&self) -> Vec<DataValue> {
6964 FoxEntityData::pack_all(self)
6965 }
6966 fn is_dirty(&self) -> bool {
6967 FoxEntityData::is_dirty(self)
6968 }
6969}
6970impl VanillaLivingEntityData for FoxEntityData {
6971 fn living_entity(&self) -> &LivingEntityData {
6972 FoxEntityData::living_entity(self)
6973 }
6974 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
6975 FoxEntityData::living_entity_mut(self)
6976 }
6977}
6978#[derive(Debug, Clone)]
6980pub struct FrogEntityData {
6981 pub ageable_mob: AgeableMobEntityData,
6982 pub variant: SyncedValue<RegistryReference<crate::frog_variant::FrogVariant>>,
6983 pub tongue_target: SyncedValue<Option<u32>>,
6984}
6985impl FrogEntityData {
6986 pub fn new() -> Self {
6988 Self {
6989 ageable_mob: AgeableMobEntityData::new(),
6990 variant: SyncedValue::new(
6991 RegistryReference::new(&crate::vanilla_frog_variants::TEMPERATE),
6992 ),
6993 tongue_target: SyncedValue::new(None),
6994 }
6995 }
6996 pub fn frog(&self) -> &FrogEntityData {
6998 self
6999 }
7000 pub fn frog_mut(&mut self) -> &mut FrogEntityData {
7002 self
7003 }
7004 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
7006 &self.ageable_mob
7007 }
7008 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
7010 &mut self.ageable_mob
7011 }
7012 pub fn mob(&self) -> &MobEntityData {
7014 &self.ageable_mob.mob
7015 }
7016 pub fn mob_mut(&mut self) -> &mut MobEntityData {
7018 &mut self.ageable_mob.mob
7019 }
7020 pub fn living_entity(&self) -> &LivingEntityData {
7022 &self.ageable_mob.mob.living_entity
7023 }
7024 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7026 &mut self.ageable_mob.mob.living_entity
7027 }
7028 pub fn base(&self) -> &BaseEntityData {
7030 &self.ageable_mob.mob.living_entity.base
7031 }
7032 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7034 &mut self.ageable_mob.mob.living_entity.base
7035 }
7036 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7039 let mut values = Vec::new();
7040 self.pack_dirty_into(&mut values);
7041 if values.is_empty() { None } else { Some(values) }
7042 }
7043 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7044 self.ageable_mob.pack_dirty_into(values);
7045 if self.variant.is_dirty() {
7046 values
7047 .push(DataValue {
7048 index: 18u8,
7049 serializer_id: 27i32,
7050 value: EntityData::FrogVariant(*self.variant.get()),
7051 });
7052 self.variant.clear_dirty();
7053 }
7054 if self.tongue_target.is_dirty() {
7055 values
7056 .push(DataValue {
7057 index: 19u8,
7058 serializer_id: 19i32,
7059 value: EntityData::OptionalUnsignedInt(
7060 self.tongue_target.get().clone(),
7061 ),
7062 });
7063 self.tongue_target.clear_dirty();
7064 }
7065 }
7066 pub fn pack_all(&self) -> Vec<DataValue> {
7068 let mut values = Vec::new();
7069 self.pack_all_into(&mut values);
7070 values
7071 }
7072 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7073 self.ageable_mob.pack_all_into(values);
7074 if !self.variant.is_default() {
7075 values
7076 .push(DataValue {
7077 index: 18u8,
7078 serializer_id: 27i32,
7079 value: EntityData::FrogVariant(*self.variant.get()),
7080 });
7081 }
7082 if !self.tongue_target.is_default() {
7083 values
7084 .push(DataValue {
7085 index: 19u8,
7086 serializer_id: 19i32,
7087 value: EntityData::OptionalUnsignedInt(
7088 self.tongue_target.get().clone(),
7089 ),
7090 });
7091 }
7092 }
7093 pub fn is_dirty(&self) -> bool {
7095 self.ageable_mob.is_dirty() || self.variant.is_dirty()
7096 || self.tongue_target.is_dirty()
7097 }
7098}
7099impl Default for FrogEntityData {
7100 fn default() -> Self {
7101 Self::new()
7102 }
7103}
7104impl VanillaEntityData for FrogEntityData {
7105 fn base(&self) -> &BaseEntityData {
7106 FrogEntityData::base(self)
7107 }
7108 fn base_mut(&mut self) -> &mut BaseEntityData {
7109 FrogEntityData::base_mut(self)
7110 }
7111 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7112 FrogEntityData::pack_dirty(self)
7113 }
7114 fn pack_all(&self) -> Vec<DataValue> {
7115 FrogEntityData::pack_all(self)
7116 }
7117 fn is_dirty(&self) -> bool {
7118 FrogEntityData::is_dirty(self)
7119 }
7120}
7121impl VanillaLivingEntityData for FrogEntityData {
7122 fn living_entity(&self) -> &LivingEntityData {
7123 FrogEntityData::living_entity(self)
7124 }
7125 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7126 FrogEntityData::living_entity_mut(self)
7127 }
7128}
7129#[derive(Debug, Clone)]
7131pub struct MinecartFurnaceEntityData {
7132 pub abstract_minecart: AbstractMinecartEntityData,
7133 pub id_fuel: SyncedValue<bool>,
7134}
7135impl MinecartFurnaceEntityData {
7136 pub fn new() -> Self {
7138 Self {
7139 abstract_minecart: AbstractMinecartEntityData::new(),
7140 id_fuel: SyncedValue::new(false),
7141 }
7142 }
7143 pub fn minecart_furnace(&self) -> &MinecartFurnaceEntityData {
7145 self
7146 }
7147 pub fn minecart_furnace_mut(&mut self) -> &mut MinecartFurnaceEntityData {
7149 self
7150 }
7151 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
7153 &self.abstract_minecart
7154 }
7155 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
7157 &mut self.abstract_minecart
7158 }
7159 pub fn vehicle_entity(&self) -> &VehicleEntityData {
7161 &self.abstract_minecart.vehicle_entity
7162 }
7163 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
7165 &mut self.abstract_minecart.vehicle_entity
7166 }
7167 pub fn base(&self) -> &BaseEntityData {
7169 &self.abstract_minecart.vehicle_entity.base
7170 }
7171 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7173 &mut self.abstract_minecart.vehicle_entity.base
7174 }
7175 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7178 let mut values = Vec::new();
7179 self.pack_dirty_into(&mut values);
7180 if values.is_empty() { None } else { Some(values) }
7181 }
7182 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7183 self.abstract_minecart.pack_dirty_into(values);
7184 if self.id_fuel.is_dirty() {
7185 values
7186 .push(DataValue {
7187 index: 13u8,
7188 serializer_id: 8i32,
7189 value: EntityData::Boolean(*self.id_fuel.get()),
7190 });
7191 self.id_fuel.clear_dirty();
7192 }
7193 }
7194 pub fn pack_all(&self) -> Vec<DataValue> {
7196 let mut values = Vec::new();
7197 self.pack_all_into(&mut values);
7198 values
7199 }
7200 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7201 self.abstract_minecart.pack_all_into(values);
7202 if !self.id_fuel.is_default() {
7203 values
7204 .push(DataValue {
7205 index: 13u8,
7206 serializer_id: 8i32,
7207 value: EntityData::Boolean(*self.id_fuel.get()),
7208 });
7209 }
7210 }
7211 pub fn is_dirty(&self) -> bool {
7213 self.abstract_minecart.is_dirty() || self.id_fuel.is_dirty()
7214 }
7215}
7216impl Default for MinecartFurnaceEntityData {
7217 fn default() -> Self {
7218 Self::new()
7219 }
7220}
7221impl VanillaEntityData for MinecartFurnaceEntityData {
7222 fn base(&self) -> &BaseEntityData {
7223 MinecartFurnaceEntityData::base(self)
7224 }
7225 fn base_mut(&mut self) -> &mut BaseEntityData {
7226 MinecartFurnaceEntityData::base_mut(self)
7227 }
7228 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7229 MinecartFurnaceEntityData::pack_dirty(self)
7230 }
7231 fn pack_all(&self) -> Vec<DataValue> {
7232 MinecartFurnaceEntityData::pack_all(self)
7233 }
7234 fn is_dirty(&self) -> bool {
7235 MinecartFurnaceEntityData::is_dirty(self)
7236 }
7237}
7238#[derive(Debug, Clone)]
7240pub struct GhastEntityData {
7241 pub mob: MobEntityData,
7242 pub is_charging: SyncedValue<bool>,
7243}
7244impl GhastEntityData {
7245 pub fn new() -> Self {
7247 Self {
7248 mob: MobEntityData::new(),
7249 is_charging: SyncedValue::new(false),
7250 }
7251 }
7252 pub fn ghast(&self) -> &GhastEntityData {
7254 self
7255 }
7256 pub fn ghast_mut(&mut self) -> &mut GhastEntityData {
7258 self
7259 }
7260 pub fn mob(&self) -> &MobEntityData {
7262 &self.mob
7263 }
7264 pub fn mob_mut(&mut self) -> &mut MobEntityData {
7266 &mut self.mob
7267 }
7268 pub fn living_entity(&self) -> &LivingEntityData {
7270 &self.mob.living_entity
7271 }
7272 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7274 &mut self.mob.living_entity
7275 }
7276 pub fn base(&self) -> &BaseEntityData {
7278 &self.mob.living_entity.base
7279 }
7280 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7282 &mut self.mob.living_entity.base
7283 }
7284 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7287 let mut values = Vec::new();
7288 self.pack_dirty_into(&mut values);
7289 if values.is_empty() { None } else { Some(values) }
7290 }
7291 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7292 self.mob.pack_dirty_into(values);
7293 if self.is_charging.is_dirty() {
7294 values
7295 .push(DataValue {
7296 index: 16u8,
7297 serializer_id: 8i32,
7298 value: EntityData::Boolean(*self.is_charging.get()),
7299 });
7300 self.is_charging.clear_dirty();
7301 }
7302 }
7303 pub fn pack_all(&self) -> Vec<DataValue> {
7305 let mut values = Vec::new();
7306 self.pack_all_into(&mut values);
7307 values
7308 }
7309 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7310 self.mob.pack_all_into(values);
7311 if !self.is_charging.is_default() {
7312 values
7313 .push(DataValue {
7314 index: 16u8,
7315 serializer_id: 8i32,
7316 value: EntityData::Boolean(*self.is_charging.get()),
7317 });
7318 }
7319 }
7320 pub fn is_dirty(&self) -> bool {
7322 self.mob.is_dirty() || self.is_charging.is_dirty()
7323 }
7324}
7325impl Default for GhastEntityData {
7326 fn default() -> Self {
7327 Self::new()
7328 }
7329}
7330impl VanillaEntityData for GhastEntityData {
7331 fn base(&self) -> &BaseEntityData {
7332 GhastEntityData::base(self)
7333 }
7334 fn base_mut(&mut self) -> &mut BaseEntityData {
7335 GhastEntityData::base_mut(self)
7336 }
7337 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7338 GhastEntityData::pack_dirty(self)
7339 }
7340 fn pack_all(&self) -> Vec<DataValue> {
7341 GhastEntityData::pack_all(self)
7342 }
7343 fn is_dirty(&self) -> bool {
7344 GhastEntityData::is_dirty(self)
7345 }
7346}
7347impl VanillaLivingEntityData for GhastEntityData {
7348 fn living_entity(&self) -> &LivingEntityData {
7349 GhastEntityData::living_entity(self)
7350 }
7351 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7352 GhastEntityData::living_entity_mut(self)
7353 }
7354}
7355#[derive(Debug, Clone)]
7357pub struct HappyGhastEntityData {
7358 pub ageable_mob: AgeableMobEntityData,
7359 pub is_leash_holder: SyncedValue<bool>,
7360 pub stays_still: SyncedValue<bool>,
7361}
7362impl HappyGhastEntityData {
7363 pub fn new() -> Self {
7365 Self {
7366 ageable_mob: AgeableMobEntityData::new(),
7367 is_leash_holder: SyncedValue::new(false),
7368 stays_still: SyncedValue::new(false),
7369 }
7370 }
7371 pub fn happy_ghast(&self) -> &HappyGhastEntityData {
7373 self
7374 }
7375 pub fn happy_ghast_mut(&mut self) -> &mut HappyGhastEntityData {
7377 self
7378 }
7379 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
7381 &self.ageable_mob
7382 }
7383 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
7385 &mut self.ageable_mob
7386 }
7387 pub fn mob(&self) -> &MobEntityData {
7389 &self.ageable_mob.mob
7390 }
7391 pub fn mob_mut(&mut self) -> &mut MobEntityData {
7393 &mut self.ageable_mob.mob
7394 }
7395 pub fn living_entity(&self) -> &LivingEntityData {
7397 &self.ageable_mob.mob.living_entity
7398 }
7399 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7401 &mut self.ageable_mob.mob.living_entity
7402 }
7403 pub fn base(&self) -> &BaseEntityData {
7405 &self.ageable_mob.mob.living_entity.base
7406 }
7407 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7409 &mut self.ageable_mob.mob.living_entity.base
7410 }
7411 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7414 let mut values = Vec::new();
7415 self.pack_dirty_into(&mut values);
7416 if values.is_empty() { None } else { Some(values) }
7417 }
7418 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7419 self.ageable_mob.pack_dirty_into(values);
7420 if self.is_leash_holder.is_dirty() {
7421 values
7422 .push(DataValue {
7423 index: 18u8,
7424 serializer_id: 8i32,
7425 value: EntityData::Boolean(*self.is_leash_holder.get()),
7426 });
7427 self.is_leash_holder.clear_dirty();
7428 }
7429 if self.stays_still.is_dirty() {
7430 values
7431 .push(DataValue {
7432 index: 19u8,
7433 serializer_id: 8i32,
7434 value: EntityData::Boolean(*self.stays_still.get()),
7435 });
7436 self.stays_still.clear_dirty();
7437 }
7438 }
7439 pub fn pack_all(&self) -> Vec<DataValue> {
7441 let mut values = Vec::new();
7442 self.pack_all_into(&mut values);
7443 values
7444 }
7445 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7446 self.ageable_mob.pack_all_into(values);
7447 if !self.is_leash_holder.is_default() {
7448 values
7449 .push(DataValue {
7450 index: 18u8,
7451 serializer_id: 8i32,
7452 value: EntityData::Boolean(*self.is_leash_holder.get()),
7453 });
7454 }
7455 if !self.stays_still.is_default() {
7456 values
7457 .push(DataValue {
7458 index: 19u8,
7459 serializer_id: 8i32,
7460 value: EntityData::Boolean(*self.stays_still.get()),
7461 });
7462 }
7463 }
7464 pub fn is_dirty(&self) -> bool {
7466 self.ageable_mob.is_dirty() || self.is_leash_holder.is_dirty()
7467 || self.stays_still.is_dirty()
7468 }
7469}
7470impl Default for HappyGhastEntityData {
7471 fn default() -> Self {
7472 Self::new()
7473 }
7474}
7475impl VanillaEntityData for HappyGhastEntityData {
7476 fn base(&self) -> &BaseEntityData {
7477 HappyGhastEntityData::base(self)
7478 }
7479 fn base_mut(&mut self) -> &mut BaseEntityData {
7480 HappyGhastEntityData::base_mut(self)
7481 }
7482 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7483 HappyGhastEntityData::pack_dirty(self)
7484 }
7485 fn pack_all(&self) -> Vec<DataValue> {
7486 HappyGhastEntityData::pack_all(self)
7487 }
7488 fn is_dirty(&self) -> bool {
7489 HappyGhastEntityData::is_dirty(self)
7490 }
7491}
7492impl VanillaLivingEntityData for HappyGhastEntityData {
7493 fn living_entity(&self) -> &LivingEntityData {
7494 HappyGhastEntityData::living_entity(self)
7495 }
7496 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7497 HappyGhastEntityData::living_entity_mut(self)
7498 }
7499}
7500#[derive(Debug, Clone)]
7502pub struct HangingEntityData {
7503 pub base: BaseEntityData,
7504 pub direction: SyncedValue<Direction>,
7505}
7506impl HangingEntityData {
7507 pub fn new() -> Self {
7509 Self {
7510 base: BaseEntityData::new(),
7511 direction: SyncedValue::new(Direction::South),
7512 }
7513 }
7514 pub fn hanging_entity(&self) -> &HangingEntityData {
7516 self
7517 }
7518 pub fn hanging_entity_mut(&mut self) -> &mut HangingEntityData {
7520 self
7521 }
7522 pub fn base(&self) -> &BaseEntityData {
7524 &self.base
7525 }
7526 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7528 &mut self.base
7529 }
7530 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7533 let mut values = Vec::new();
7534 self.pack_dirty_into(&mut values);
7535 if values.is_empty() { None } else { Some(values) }
7536 }
7537 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7538 self.base.pack_dirty_into(values);
7539 if self.direction.is_dirty() {
7540 values
7541 .push(DataValue {
7542 index: 8u8,
7543 serializer_id: 12i32,
7544 value: EntityData::Direction(*self.direction.get()),
7545 });
7546 self.direction.clear_dirty();
7547 }
7548 }
7549 pub fn pack_all(&self) -> Vec<DataValue> {
7551 let mut values = Vec::new();
7552 self.pack_all_into(&mut values);
7553 values
7554 }
7555 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7556 self.base.pack_all_into(values);
7557 if !self.direction.is_default() {
7558 values
7559 .push(DataValue {
7560 index: 8u8,
7561 serializer_id: 12i32,
7562 value: EntityData::Direction(*self.direction.get()),
7563 });
7564 }
7565 }
7566 pub fn is_dirty(&self) -> bool {
7568 self.base.is_dirty() || self.direction.is_dirty()
7569 }
7570}
7571impl Default for HangingEntityData {
7572 fn default() -> Self {
7573 Self::new()
7574 }
7575}
7576impl VanillaEntityData for HangingEntityData {
7577 fn base(&self) -> &BaseEntityData {
7578 HangingEntityData::base(self)
7579 }
7580 fn base_mut(&mut self) -> &mut BaseEntityData {
7581 HangingEntityData::base_mut(self)
7582 }
7583 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7584 HangingEntityData::pack_dirty(self)
7585 }
7586 fn pack_all(&self) -> Vec<DataValue> {
7587 HangingEntityData::pack_all(self)
7588 }
7589 fn is_dirty(&self) -> bool {
7590 HangingEntityData::is_dirty(self)
7591 }
7592}
7593#[derive(Debug, Clone)]
7595pub struct ItemFrameEntityData {
7596 pub hanging_entity: HangingEntityData,
7597 pub item: SyncedValue<ItemStack>,
7598 pub rotation: SyncedValue<i32>,
7599}
7600impl ItemFrameEntityData {
7601 pub fn new() -> Self {
7603 Self {
7604 hanging_entity: HangingEntityData::new(),
7605 item: SyncedValue::new(ItemStack::empty()),
7606 rotation: SyncedValue::new(0i32),
7607 }
7608 }
7609 pub fn item_frame(&self) -> &ItemFrameEntityData {
7611 self
7612 }
7613 pub fn item_frame_mut(&mut self) -> &mut ItemFrameEntityData {
7615 self
7616 }
7617 pub fn hanging_entity(&self) -> &HangingEntityData {
7619 &self.hanging_entity
7620 }
7621 pub fn hanging_entity_mut(&mut self) -> &mut HangingEntityData {
7623 &mut self.hanging_entity
7624 }
7625 pub fn base(&self) -> &BaseEntityData {
7627 &self.hanging_entity.base
7628 }
7629 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7631 &mut self.hanging_entity.base
7632 }
7633 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7636 let mut values = Vec::new();
7637 self.pack_dirty_into(&mut values);
7638 if values.is_empty() { None } else { Some(values) }
7639 }
7640 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7641 self.hanging_entity.pack_dirty_into(values);
7642 if self.item.is_dirty() {
7643 values
7644 .push(DataValue {
7645 index: 9u8,
7646 serializer_id: 7i32,
7647 value: EntityData::ItemStack(self.item.get().clone()),
7648 });
7649 self.item.clear_dirty();
7650 }
7651 if self.rotation.is_dirty() {
7652 values
7653 .push(DataValue {
7654 index: 10u8,
7655 serializer_id: 1i32,
7656 value: EntityData::Int(*self.rotation.get()),
7657 });
7658 self.rotation.clear_dirty();
7659 }
7660 }
7661 pub fn pack_all(&self) -> Vec<DataValue> {
7663 let mut values = Vec::new();
7664 self.pack_all_into(&mut values);
7665 values
7666 }
7667 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7668 self.hanging_entity.pack_all_into(values);
7669 if !self.item.is_default() {
7670 values
7671 .push(DataValue {
7672 index: 9u8,
7673 serializer_id: 7i32,
7674 value: EntityData::ItemStack(self.item.get().clone()),
7675 });
7676 }
7677 if !self.rotation.is_default() {
7678 values
7679 .push(DataValue {
7680 index: 10u8,
7681 serializer_id: 1i32,
7682 value: EntityData::Int(*self.rotation.get()),
7683 });
7684 }
7685 }
7686 pub fn is_dirty(&self) -> bool {
7688 self.hanging_entity.is_dirty() || self.item.is_dirty()
7689 || self.rotation.is_dirty()
7690 }
7691}
7692impl Default for ItemFrameEntityData {
7693 fn default() -> Self {
7694 Self::new()
7695 }
7696}
7697impl VanillaEntityData for ItemFrameEntityData {
7698 fn base(&self) -> &BaseEntityData {
7699 ItemFrameEntityData::base(self)
7700 }
7701 fn base_mut(&mut self) -> &mut BaseEntityData {
7702 ItemFrameEntityData::base_mut(self)
7703 }
7704 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7705 ItemFrameEntityData::pack_dirty(self)
7706 }
7707 fn pack_all(&self) -> Vec<DataValue> {
7708 ItemFrameEntityData::pack_all(self)
7709 }
7710 fn is_dirty(&self) -> bool {
7711 ItemFrameEntityData::is_dirty(self)
7712 }
7713}
7714#[derive(Debug, Clone)]
7716pub struct GlowSquidEntityData {
7717 pub ageable_mob: AgeableMobEntityData,
7718 pub dark_ticks_remaining: SyncedValue<i32>,
7719}
7720impl GlowSquidEntityData {
7721 pub fn new() -> Self {
7723 Self {
7724 ageable_mob: AgeableMobEntityData::new(),
7725 dark_ticks_remaining: SyncedValue::new(0i32),
7726 }
7727 }
7728 pub fn glow_squid(&self) -> &GlowSquidEntityData {
7730 self
7731 }
7732 pub fn glow_squid_mut(&mut self) -> &mut GlowSquidEntityData {
7734 self
7735 }
7736 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
7738 &self.ageable_mob
7739 }
7740 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
7742 &mut self.ageable_mob
7743 }
7744 pub fn mob(&self) -> &MobEntityData {
7746 &self.ageable_mob.mob
7747 }
7748 pub fn mob_mut(&mut self) -> &mut MobEntityData {
7750 &mut self.ageable_mob.mob
7751 }
7752 pub fn living_entity(&self) -> &LivingEntityData {
7754 &self.ageable_mob.mob.living_entity
7755 }
7756 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7758 &mut self.ageable_mob.mob.living_entity
7759 }
7760 pub fn base(&self) -> &BaseEntityData {
7762 &self.ageable_mob.mob.living_entity.base
7763 }
7764 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7766 &mut self.ageable_mob.mob.living_entity.base
7767 }
7768 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7771 let mut values = Vec::new();
7772 self.pack_dirty_into(&mut values);
7773 if values.is_empty() { None } else { Some(values) }
7774 }
7775 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7776 self.ageable_mob.pack_dirty_into(values);
7777 if self.dark_ticks_remaining.is_dirty() {
7778 values
7779 .push(DataValue {
7780 index: 18u8,
7781 serializer_id: 1i32,
7782 value: EntityData::Int(*self.dark_ticks_remaining.get()),
7783 });
7784 self.dark_ticks_remaining.clear_dirty();
7785 }
7786 }
7787 pub fn pack_all(&self) -> Vec<DataValue> {
7789 let mut values = Vec::new();
7790 self.pack_all_into(&mut values);
7791 values
7792 }
7793 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7794 self.ageable_mob.pack_all_into(values);
7795 if !self.dark_ticks_remaining.is_default() {
7796 values
7797 .push(DataValue {
7798 index: 18u8,
7799 serializer_id: 1i32,
7800 value: EntityData::Int(*self.dark_ticks_remaining.get()),
7801 });
7802 }
7803 }
7804 pub fn is_dirty(&self) -> bool {
7806 self.ageable_mob.is_dirty() || self.dark_ticks_remaining.is_dirty()
7807 }
7808}
7809impl Default for GlowSquidEntityData {
7810 fn default() -> Self {
7811 Self::new()
7812 }
7813}
7814impl VanillaEntityData for GlowSquidEntityData {
7815 fn base(&self) -> &BaseEntityData {
7816 GlowSquidEntityData::base(self)
7817 }
7818 fn base_mut(&mut self) -> &mut BaseEntityData {
7819 GlowSquidEntityData::base_mut(self)
7820 }
7821 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7822 GlowSquidEntityData::pack_dirty(self)
7823 }
7824 fn pack_all(&self) -> Vec<DataValue> {
7825 GlowSquidEntityData::pack_all(self)
7826 }
7827 fn is_dirty(&self) -> bool {
7828 GlowSquidEntityData::is_dirty(self)
7829 }
7830}
7831impl VanillaLivingEntityData for GlowSquidEntityData {
7832 fn living_entity(&self) -> &LivingEntityData {
7833 GlowSquidEntityData::living_entity(self)
7834 }
7835 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7836 GlowSquidEntityData::living_entity_mut(self)
7837 }
7838}
7839#[derive(Debug, Clone)]
7841pub struct GoatEntityData {
7842 pub ageable_mob: AgeableMobEntityData,
7843 pub is_screaming_goat: SyncedValue<bool>,
7844 pub has_left_horn: SyncedValue<bool>,
7845 pub has_right_horn: SyncedValue<bool>,
7846}
7847impl GoatEntityData {
7848 pub fn new() -> Self {
7850 Self {
7851 ageable_mob: AgeableMobEntityData::new(),
7852 is_screaming_goat: SyncedValue::new(false),
7853 has_left_horn: SyncedValue::new(true),
7854 has_right_horn: SyncedValue::new(true),
7855 }
7856 }
7857 pub fn goat(&self) -> &GoatEntityData {
7859 self
7860 }
7861 pub fn goat_mut(&mut self) -> &mut GoatEntityData {
7863 self
7864 }
7865 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
7867 &self.ageable_mob
7868 }
7869 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
7871 &mut self.ageable_mob
7872 }
7873 pub fn mob(&self) -> &MobEntityData {
7875 &self.ageable_mob.mob
7876 }
7877 pub fn mob_mut(&mut self) -> &mut MobEntityData {
7879 &mut self.ageable_mob.mob
7880 }
7881 pub fn living_entity(&self) -> &LivingEntityData {
7883 &self.ageable_mob.mob.living_entity
7884 }
7885 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
7887 &mut self.ageable_mob.mob.living_entity
7888 }
7889 pub fn base(&self) -> &BaseEntityData {
7891 &self.ageable_mob.mob.living_entity.base
7892 }
7893 pub fn base_mut(&mut self) -> &mut BaseEntityData {
7895 &mut self.ageable_mob.mob.living_entity.base
7896 }
7897 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7900 let mut values = Vec::new();
7901 self.pack_dirty_into(&mut values);
7902 if values.is_empty() { None } else { Some(values) }
7903 }
7904 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
7905 self.ageable_mob.pack_dirty_into(values);
7906 if self.is_screaming_goat.is_dirty() {
7907 values
7908 .push(DataValue {
7909 index: 18u8,
7910 serializer_id: 8i32,
7911 value: EntityData::Boolean(*self.is_screaming_goat.get()),
7912 });
7913 self.is_screaming_goat.clear_dirty();
7914 }
7915 if self.has_left_horn.is_dirty() {
7916 values
7917 .push(DataValue {
7918 index: 19u8,
7919 serializer_id: 8i32,
7920 value: EntityData::Boolean(*self.has_left_horn.get()),
7921 });
7922 self.has_left_horn.clear_dirty();
7923 }
7924 if self.has_right_horn.is_dirty() {
7925 values
7926 .push(DataValue {
7927 index: 20u8,
7928 serializer_id: 8i32,
7929 value: EntityData::Boolean(*self.has_right_horn.get()),
7930 });
7931 self.has_right_horn.clear_dirty();
7932 }
7933 }
7934 pub fn pack_all(&self) -> Vec<DataValue> {
7936 let mut values = Vec::new();
7937 self.pack_all_into(&mut values);
7938 values
7939 }
7940 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
7941 self.ageable_mob.pack_all_into(values);
7942 if !self.is_screaming_goat.is_default() {
7943 values
7944 .push(DataValue {
7945 index: 18u8,
7946 serializer_id: 8i32,
7947 value: EntityData::Boolean(*self.is_screaming_goat.get()),
7948 });
7949 }
7950 if !self.has_left_horn.is_default() {
7951 values
7952 .push(DataValue {
7953 index: 19u8,
7954 serializer_id: 8i32,
7955 value: EntityData::Boolean(*self.has_left_horn.get()),
7956 });
7957 }
7958 if !self.has_right_horn.is_default() {
7959 values
7960 .push(DataValue {
7961 index: 20u8,
7962 serializer_id: 8i32,
7963 value: EntityData::Boolean(*self.has_right_horn.get()),
7964 });
7965 }
7966 }
7967 pub fn is_dirty(&self) -> bool {
7969 self.ageable_mob.is_dirty() || self.is_screaming_goat.is_dirty()
7970 || self.has_left_horn.is_dirty() || self.has_right_horn.is_dirty()
7971 }
7972}
7973impl Default for GoatEntityData {
7974 fn default() -> Self {
7975 Self::new()
7976 }
7977}
7978impl VanillaEntityData for GoatEntityData {
7979 fn base(&self) -> &BaseEntityData {
7980 GoatEntityData::base(self)
7981 }
7982 fn base_mut(&mut self) -> &mut BaseEntityData {
7983 GoatEntityData::base_mut(self)
7984 }
7985 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
7986 GoatEntityData::pack_dirty(self)
7987 }
7988 fn pack_all(&self) -> Vec<DataValue> {
7989 GoatEntityData::pack_all(self)
7990 }
7991 fn is_dirty(&self) -> bool {
7992 GoatEntityData::is_dirty(self)
7993 }
7994}
7995impl VanillaLivingEntityData for GoatEntityData {
7996 fn living_entity(&self) -> &LivingEntityData {
7997 GoatEntityData::living_entity(self)
7998 }
7999 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8000 GoatEntityData::living_entity_mut(self)
8001 }
8002}
8003#[derive(Debug, Clone)]
8005pub struct HoglinEntityData {
8006 pub ageable_mob: AgeableMobEntityData,
8007 pub immune_to_zombification: SyncedValue<bool>,
8008}
8009impl HoglinEntityData {
8010 pub fn new() -> Self {
8012 Self {
8013 ageable_mob: AgeableMobEntityData::new(),
8014 immune_to_zombification: SyncedValue::new(false),
8015 }
8016 }
8017 pub fn hoglin(&self) -> &HoglinEntityData {
8019 self
8020 }
8021 pub fn hoglin_mut(&mut self) -> &mut HoglinEntityData {
8023 self
8024 }
8025 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
8027 &self.ageable_mob
8028 }
8029 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
8031 &mut self.ageable_mob
8032 }
8033 pub fn mob(&self) -> &MobEntityData {
8035 &self.ageable_mob.mob
8036 }
8037 pub fn mob_mut(&mut self) -> &mut MobEntityData {
8039 &mut self.ageable_mob.mob
8040 }
8041 pub fn living_entity(&self) -> &LivingEntityData {
8043 &self.ageable_mob.mob.living_entity
8044 }
8045 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8047 &mut self.ageable_mob.mob.living_entity
8048 }
8049 pub fn base(&self) -> &BaseEntityData {
8051 &self.ageable_mob.mob.living_entity.base
8052 }
8053 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8055 &mut self.ageable_mob.mob.living_entity.base
8056 }
8057 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8060 let mut values = Vec::new();
8061 self.pack_dirty_into(&mut values);
8062 if values.is_empty() { None } else { Some(values) }
8063 }
8064 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8065 self.ageable_mob.pack_dirty_into(values);
8066 if self.immune_to_zombification.is_dirty() {
8067 values
8068 .push(DataValue {
8069 index: 18u8,
8070 serializer_id: 8i32,
8071 value: EntityData::Boolean(*self.immune_to_zombification.get()),
8072 });
8073 self.immune_to_zombification.clear_dirty();
8074 }
8075 }
8076 pub fn pack_all(&self) -> Vec<DataValue> {
8078 let mut values = Vec::new();
8079 self.pack_all_into(&mut values);
8080 values
8081 }
8082 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8083 self.ageable_mob.pack_all_into(values);
8084 if !self.immune_to_zombification.is_default() {
8085 values
8086 .push(DataValue {
8087 index: 18u8,
8088 serializer_id: 8i32,
8089 value: EntityData::Boolean(*self.immune_to_zombification.get()),
8090 });
8091 }
8092 }
8093 pub fn is_dirty(&self) -> bool {
8095 self.ageable_mob.is_dirty() || self.immune_to_zombification.is_dirty()
8096 }
8097}
8098impl Default for HoglinEntityData {
8099 fn default() -> Self {
8100 Self::new()
8101 }
8102}
8103impl VanillaEntityData for HoglinEntityData {
8104 fn base(&self) -> &BaseEntityData {
8105 HoglinEntityData::base(self)
8106 }
8107 fn base_mut(&mut self) -> &mut BaseEntityData {
8108 HoglinEntityData::base_mut(self)
8109 }
8110 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8111 HoglinEntityData::pack_dirty(self)
8112 }
8113 fn pack_all(&self) -> Vec<DataValue> {
8114 HoglinEntityData::pack_all(self)
8115 }
8116 fn is_dirty(&self) -> bool {
8117 HoglinEntityData::is_dirty(self)
8118 }
8119}
8120impl VanillaLivingEntityData for HoglinEntityData {
8121 fn living_entity(&self) -> &LivingEntityData {
8122 HoglinEntityData::living_entity(self)
8123 }
8124 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8125 HoglinEntityData::living_entity_mut(self)
8126 }
8127}
8128#[derive(Debug, Clone)]
8130pub struct HorseEntityData {
8131 pub abstract_horse: AbstractHorseEntityData,
8132 pub id_type_variant: SyncedValue<i32>,
8133}
8134impl HorseEntityData {
8135 pub fn new() -> Self {
8137 Self {
8138 abstract_horse: AbstractHorseEntityData::new(),
8139 id_type_variant: SyncedValue::new(0i32),
8140 }
8141 }
8142 pub fn horse(&self) -> &HorseEntityData {
8144 self
8145 }
8146 pub fn horse_mut(&mut self) -> &mut HorseEntityData {
8148 self
8149 }
8150 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
8152 &self.abstract_horse
8153 }
8154 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
8156 &mut self.abstract_horse
8157 }
8158 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
8160 &self.abstract_horse.ageable_mob
8161 }
8162 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
8164 &mut self.abstract_horse.ageable_mob
8165 }
8166 pub fn mob(&self) -> &MobEntityData {
8168 &self.abstract_horse.ageable_mob.mob
8169 }
8170 pub fn mob_mut(&mut self) -> &mut MobEntityData {
8172 &mut self.abstract_horse.ageable_mob.mob
8173 }
8174 pub fn living_entity(&self) -> &LivingEntityData {
8176 &self.abstract_horse.ageable_mob.mob.living_entity
8177 }
8178 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8180 &mut self.abstract_horse.ageable_mob.mob.living_entity
8181 }
8182 pub fn base(&self) -> &BaseEntityData {
8184 &self.abstract_horse.ageable_mob.mob.living_entity.base
8185 }
8186 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8188 &mut self.abstract_horse.ageable_mob.mob.living_entity.base
8189 }
8190 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8193 let mut values = Vec::new();
8194 self.pack_dirty_into(&mut values);
8195 if values.is_empty() { None } else { Some(values) }
8196 }
8197 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8198 self.abstract_horse.pack_dirty_into(values);
8199 if self.id_type_variant.is_dirty() {
8200 values
8201 .push(DataValue {
8202 index: 19u8,
8203 serializer_id: 1i32,
8204 value: EntityData::Int(*self.id_type_variant.get()),
8205 });
8206 self.id_type_variant.clear_dirty();
8207 }
8208 }
8209 pub fn pack_all(&self) -> Vec<DataValue> {
8211 let mut values = Vec::new();
8212 self.pack_all_into(&mut values);
8213 values
8214 }
8215 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8216 self.abstract_horse.pack_all_into(values);
8217 if !self.id_type_variant.is_default() {
8218 values
8219 .push(DataValue {
8220 index: 19u8,
8221 serializer_id: 1i32,
8222 value: EntityData::Int(*self.id_type_variant.get()),
8223 });
8224 }
8225 }
8226 pub fn is_dirty(&self) -> bool {
8228 self.abstract_horse.is_dirty() || self.id_type_variant.is_dirty()
8229 }
8230}
8231impl Default for HorseEntityData {
8232 fn default() -> Self {
8233 Self::new()
8234 }
8235}
8236impl VanillaEntityData for HorseEntityData {
8237 fn base(&self) -> &BaseEntityData {
8238 HorseEntityData::base(self)
8239 }
8240 fn base_mut(&mut self) -> &mut BaseEntityData {
8241 HorseEntityData::base_mut(self)
8242 }
8243 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8244 HorseEntityData::pack_dirty(self)
8245 }
8246 fn pack_all(&self) -> Vec<DataValue> {
8247 HorseEntityData::pack_all(self)
8248 }
8249 fn is_dirty(&self) -> bool {
8250 HorseEntityData::is_dirty(self)
8251 }
8252}
8253impl VanillaLivingEntityData for HorseEntityData {
8254 fn living_entity(&self) -> &LivingEntityData {
8255 HorseEntityData::living_entity(self)
8256 }
8257 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8258 HorseEntityData::living_entity_mut(self)
8259 }
8260}
8261#[derive(Debug, Clone)]
8263pub struct InteractionEntityData {
8264 pub base: BaseEntityData,
8265 pub width: SyncedValue<f32>,
8266 pub height: SyncedValue<f32>,
8267 pub response: SyncedValue<bool>,
8268}
8269impl InteractionEntityData {
8270 pub fn new() -> Self {
8272 Self {
8273 base: BaseEntityData::new(),
8274 width: SyncedValue::new(1f32),
8275 height: SyncedValue::new(1f32),
8276 response: SyncedValue::new(false),
8277 }
8278 }
8279 pub fn interaction(&self) -> &InteractionEntityData {
8281 self
8282 }
8283 pub fn interaction_mut(&mut self) -> &mut InteractionEntityData {
8285 self
8286 }
8287 pub fn base(&self) -> &BaseEntityData {
8289 &self.base
8290 }
8291 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8293 &mut self.base
8294 }
8295 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8298 let mut values = Vec::new();
8299 self.pack_dirty_into(&mut values);
8300 if values.is_empty() { None } else { Some(values) }
8301 }
8302 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8303 self.base.pack_dirty_into(values);
8304 if self.width.is_dirty() {
8305 values
8306 .push(DataValue {
8307 index: 8u8,
8308 serializer_id: 3i32,
8309 value: EntityData::Float(*self.width.get()),
8310 });
8311 self.width.clear_dirty();
8312 }
8313 if self.height.is_dirty() {
8314 values
8315 .push(DataValue {
8316 index: 9u8,
8317 serializer_id: 3i32,
8318 value: EntityData::Float(*self.height.get()),
8319 });
8320 self.height.clear_dirty();
8321 }
8322 if self.response.is_dirty() {
8323 values
8324 .push(DataValue {
8325 index: 10u8,
8326 serializer_id: 8i32,
8327 value: EntityData::Boolean(*self.response.get()),
8328 });
8329 self.response.clear_dirty();
8330 }
8331 }
8332 pub fn pack_all(&self) -> Vec<DataValue> {
8334 let mut values = Vec::new();
8335 self.pack_all_into(&mut values);
8336 values
8337 }
8338 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8339 self.base.pack_all_into(values);
8340 if !self.width.is_default() {
8341 values
8342 .push(DataValue {
8343 index: 8u8,
8344 serializer_id: 3i32,
8345 value: EntityData::Float(*self.width.get()),
8346 });
8347 }
8348 if !self.height.is_default() {
8349 values
8350 .push(DataValue {
8351 index: 9u8,
8352 serializer_id: 3i32,
8353 value: EntityData::Float(*self.height.get()),
8354 });
8355 }
8356 if !self.response.is_default() {
8357 values
8358 .push(DataValue {
8359 index: 10u8,
8360 serializer_id: 8i32,
8361 value: EntityData::Boolean(*self.response.get()),
8362 });
8363 }
8364 }
8365 pub fn is_dirty(&self) -> bool {
8367 self.base.is_dirty() || self.width.is_dirty() || self.height.is_dirty()
8368 || self.response.is_dirty()
8369 }
8370}
8371impl Default for InteractionEntityData {
8372 fn default() -> Self {
8373 Self::new()
8374 }
8375}
8376impl VanillaEntityData for InteractionEntityData {
8377 fn base(&self) -> &BaseEntityData {
8378 InteractionEntityData::base(self)
8379 }
8380 fn base_mut(&mut self) -> &mut BaseEntityData {
8381 InteractionEntityData::base_mut(self)
8382 }
8383 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8384 InteractionEntityData::pack_dirty(self)
8385 }
8386 fn pack_all(&self) -> Vec<DataValue> {
8387 InteractionEntityData::pack_all(self)
8388 }
8389 fn is_dirty(&self) -> bool {
8390 InteractionEntityData::is_dirty(self)
8391 }
8392}
8393#[derive(Debug, Clone)]
8395pub struct IronGolemEntityData {
8396 pub mob: MobEntityData,
8397 pub flags: SyncedValue<i8>,
8398}
8399impl IronGolemEntityData {
8400 pub fn new() -> Self {
8402 Self {
8403 mob: MobEntityData::new(),
8404 flags: SyncedValue::new(0i8),
8405 }
8406 }
8407 pub fn iron_golem(&self) -> &IronGolemEntityData {
8409 self
8410 }
8411 pub fn iron_golem_mut(&mut self) -> &mut IronGolemEntityData {
8413 self
8414 }
8415 pub fn mob(&self) -> &MobEntityData {
8417 &self.mob
8418 }
8419 pub fn mob_mut(&mut self) -> &mut MobEntityData {
8421 &mut self.mob
8422 }
8423 pub fn living_entity(&self) -> &LivingEntityData {
8425 &self.mob.living_entity
8426 }
8427 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8429 &mut self.mob.living_entity
8430 }
8431 pub fn base(&self) -> &BaseEntityData {
8433 &self.mob.living_entity.base
8434 }
8435 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8437 &mut self.mob.living_entity.base
8438 }
8439 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8442 let mut values = Vec::new();
8443 self.pack_dirty_into(&mut values);
8444 if values.is_empty() { None } else { Some(values) }
8445 }
8446 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8447 self.mob.pack_dirty_into(values);
8448 if self.flags.is_dirty() {
8449 values
8450 .push(DataValue {
8451 index: 16u8,
8452 serializer_id: 0i32,
8453 value: EntityData::Byte(*self.flags.get()),
8454 });
8455 self.flags.clear_dirty();
8456 }
8457 }
8458 pub fn pack_all(&self) -> Vec<DataValue> {
8460 let mut values = Vec::new();
8461 self.pack_all_into(&mut values);
8462 values
8463 }
8464 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8465 self.mob.pack_all_into(values);
8466 if !self.flags.is_default() {
8467 values
8468 .push(DataValue {
8469 index: 16u8,
8470 serializer_id: 0i32,
8471 value: EntityData::Byte(*self.flags.get()),
8472 });
8473 }
8474 }
8475 pub fn is_dirty(&self) -> bool {
8477 self.mob.is_dirty() || self.flags.is_dirty()
8478 }
8479}
8480impl Default for IronGolemEntityData {
8481 fn default() -> Self {
8482 Self::new()
8483 }
8484}
8485impl VanillaEntityData for IronGolemEntityData {
8486 fn base(&self) -> &BaseEntityData {
8487 IronGolemEntityData::base(self)
8488 }
8489 fn base_mut(&mut self) -> &mut BaseEntityData {
8490 IronGolemEntityData::base_mut(self)
8491 }
8492 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8493 IronGolemEntityData::pack_dirty(self)
8494 }
8495 fn pack_all(&self) -> Vec<DataValue> {
8496 IronGolemEntityData::pack_all(self)
8497 }
8498 fn is_dirty(&self) -> bool {
8499 IronGolemEntityData::is_dirty(self)
8500 }
8501}
8502impl VanillaLivingEntityData for IronGolemEntityData {
8503 fn living_entity(&self) -> &LivingEntityData {
8504 IronGolemEntityData::living_entity(self)
8505 }
8506 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8507 IronGolemEntityData::living_entity_mut(self)
8508 }
8509}
8510#[derive(Debug, Clone)]
8512pub struct ItemEntityData {
8513 pub base: BaseEntityData,
8514 pub item: SyncedValue<ItemStack>,
8515}
8516impl ItemEntityData {
8517 pub fn new() -> Self {
8519 Self {
8520 base: BaseEntityData::new(),
8521 item: SyncedValue::new(ItemStack::empty()),
8522 }
8523 }
8524 pub fn item_entity(&self) -> &ItemEntityData {
8526 self
8527 }
8528 pub fn item_entity_mut(&mut self) -> &mut ItemEntityData {
8530 self
8531 }
8532 pub fn base(&self) -> &BaseEntityData {
8534 &self.base
8535 }
8536 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8538 &mut self.base
8539 }
8540 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8543 let mut values = Vec::new();
8544 self.pack_dirty_into(&mut values);
8545 if values.is_empty() { None } else { Some(values) }
8546 }
8547 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8548 self.base.pack_dirty_into(values);
8549 if self.item.is_dirty() {
8550 values
8551 .push(DataValue {
8552 index: 8u8,
8553 serializer_id: 7i32,
8554 value: EntityData::ItemStack(self.item.get().clone()),
8555 });
8556 self.item.clear_dirty();
8557 }
8558 }
8559 pub fn pack_all(&self) -> Vec<DataValue> {
8561 let mut values = Vec::new();
8562 self.pack_all_into(&mut values);
8563 values
8564 }
8565 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8566 self.base.pack_all_into(values);
8567 if !self.item.is_default() {
8568 values
8569 .push(DataValue {
8570 index: 8u8,
8571 serializer_id: 7i32,
8572 value: EntityData::ItemStack(self.item.get().clone()),
8573 });
8574 }
8575 }
8576 pub fn is_dirty(&self) -> bool {
8578 self.base.is_dirty() || self.item.is_dirty()
8579 }
8580}
8581impl Default for ItemEntityData {
8582 fn default() -> Self {
8583 Self::new()
8584 }
8585}
8586impl VanillaEntityData for ItemEntityData {
8587 fn base(&self) -> &BaseEntityData {
8588 ItemEntityData::base(self)
8589 }
8590 fn base_mut(&mut self) -> &mut BaseEntityData {
8591 ItemEntityData::base_mut(self)
8592 }
8593 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8594 ItemEntityData::pack_dirty(self)
8595 }
8596 fn pack_all(&self) -> Vec<DataValue> {
8597 ItemEntityData::pack_all(self)
8598 }
8599 fn is_dirty(&self) -> bool {
8600 ItemEntityData::is_dirty(self)
8601 }
8602}
8603#[derive(Debug, Clone)]
8605pub struct ItemDisplayEntityData {
8606 pub display: DisplayEntityData,
8607 pub item_stack: SyncedValue<ItemStack>,
8608 pub item_display: SyncedValue<i8>,
8609}
8610impl ItemDisplayEntityData {
8611 pub fn new() -> Self {
8613 Self {
8614 display: DisplayEntityData::new(),
8615 item_stack: SyncedValue::new(ItemStack::empty()),
8616 item_display: SyncedValue::new(0i8),
8617 }
8618 }
8619 pub fn item_display(&self) -> &ItemDisplayEntityData {
8621 self
8622 }
8623 pub fn item_display_mut(&mut self) -> &mut ItemDisplayEntityData {
8625 self
8626 }
8627 pub fn display(&self) -> &DisplayEntityData {
8629 &self.display
8630 }
8631 pub fn display_mut(&mut self) -> &mut DisplayEntityData {
8633 &mut self.display
8634 }
8635 pub fn base(&self) -> &BaseEntityData {
8637 &self.display.base
8638 }
8639 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8641 &mut self.display.base
8642 }
8643 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8646 let mut values = Vec::new();
8647 self.pack_dirty_into(&mut values);
8648 if values.is_empty() { None } else { Some(values) }
8649 }
8650 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8651 self.display.pack_dirty_into(values);
8652 if self.item_stack.is_dirty() {
8653 values
8654 .push(DataValue {
8655 index: 23u8,
8656 serializer_id: 7i32,
8657 value: EntityData::ItemStack(self.item_stack.get().clone()),
8658 });
8659 self.item_stack.clear_dirty();
8660 }
8661 if self.item_display.is_dirty() {
8662 values
8663 .push(DataValue {
8664 index: 24u8,
8665 serializer_id: 0i32,
8666 value: EntityData::Byte(*self.item_display.get()),
8667 });
8668 self.item_display.clear_dirty();
8669 }
8670 }
8671 pub fn pack_all(&self) -> Vec<DataValue> {
8673 let mut values = Vec::new();
8674 self.pack_all_into(&mut values);
8675 values
8676 }
8677 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8678 self.display.pack_all_into(values);
8679 if !self.item_stack.is_default() {
8680 values
8681 .push(DataValue {
8682 index: 23u8,
8683 serializer_id: 7i32,
8684 value: EntityData::ItemStack(self.item_stack.get().clone()),
8685 });
8686 }
8687 if !self.item_display.is_default() {
8688 values
8689 .push(DataValue {
8690 index: 24u8,
8691 serializer_id: 0i32,
8692 value: EntityData::Byte(*self.item_display.get()),
8693 });
8694 }
8695 }
8696 pub fn is_dirty(&self) -> bool {
8698 self.display.is_dirty() || self.item_stack.is_dirty()
8699 || self.item_display.is_dirty()
8700 }
8701}
8702impl Default for ItemDisplayEntityData {
8703 fn default() -> Self {
8704 Self::new()
8705 }
8706}
8707impl VanillaEntityData for ItemDisplayEntityData {
8708 fn base(&self) -> &BaseEntityData {
8709 ItemDisplayEntityData::base(self)
8710 }
8711 fn base_mut(&mut self) -> &mut BaseEntityData {
8712 ItemDisplayEntityData::base_mut(self)
8713 }
8714 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8715 ItemDisplayEntityData::pack_dirty(self)
8716 }
8717 fn pack_all(&self) -> Vec<DataValue> {
8718 ItemDisplayEntityData::pack_all(self)
8719 }
8720 fn is_dirty(&self) -> bool {
8721 ItemDisplayEntityData::is_dirty(self)
8722 }
8723}
8724#[derive(Debug, Clone)]
8726pub struct LlamaEntityData {
8727 pub abstract_chested_horse: AbstractChestedHorseEntityData,
8728 pub strength: SyncedValue<i32>,
8729 pub variant: SyncedValue<i32>,
8730}
8731impl LlamaEntityData {
8732 pub fn new() -> Self {
8734 Self {
8735 abstract_chested_horse: AbstractChestedHorseEntityData::new(),
8736 strength: SyncedValue::new(0i32),
8737 variant: SyncedValue::new(0i32),
8738 }
8739 }
8740 pub fn llama(&self) -> &LlamaEntityData {
8742 self
8743 }
8744 pub fn llama_mut(&mut self) -> &mut LlamaEntityData {
8746 self
8747 }
8748 pub fn abstract_chested_horse(&self) -> &AbstractChestedHorseEntityData {
8750 &self.abstract_chested_horse
8751 }
8752 pub fn abstract_chested_horse_mut(&mut self) -> &mut AbstractChestedHorseEntityData {
8754 &mut self.abstract_chested_horse
8755 }
8756 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
8758 &self.abstract_chested_horse.abstract_horse
8759 }
8760 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
8762 &mut self.abstract_chested_horse.abstract_horse
8763 }
8764 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
8766 &self.abstract_chested_horse.abstract_horse.ageable_mob
8767 }
8768 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
8770 &mut self.abstract_chested_horse.abstract_horse.ageable_mob
8771 }
8772 pub fn mob(&self) -> &MobEntityData {
8774 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob
8775 }
8776 pub fn mob_mut(&mut self) -> &mut MobEntityData {
8778 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob
8779 }
8780 pub fn living_entity(&self) -> &LivingEntityData {
8782 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
8783 }
8784 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8786 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
8787 }
8788 pub fn base(&self) -> &BaseEntityData {
8790 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity.base
8791 }
8792 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8794 &mut self
8795 .abstract_chested_horse
8796 .abstract_horse
8797 .ageable_mob
8798 .mob
8799 .living_entity
8800 .base
8801 }
8802 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8805 let mut values = Vec::new();
8806 self.pack_dirty_into(&mut values);
8807 if values.is_empty() { None } else { Some(values) }
8808 }
8809 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8810 self.abstract_chested_horse.pack_dirty_into(values);
8811 if self.strength.is_dirty() {
8812 values
8813 .push(DataValue {
8814 index: 20u8,
8815 serializer_id: 1i32,
8816 value: EntityData::Int(*self.strength.get()),
8817 });
8818 self.strength.clear_dirty();
8819 }
8820 if self.variant.is_dirty() {
8821 values
8822 .push(DataValue {
8823 index: 21u8,
8824 serializer_id: 1i32,
8825 value: EntityData::Int(*self.variant.get()),
8826 });
8827 self.variant.clear_dirty();
8828 }
8829 }
8830 pub fn pack_all(&self) -> Vec<DataValue> {
8832 let mut values = Vec::new();
8833 self.pack_all_into(&mut values);
8834 values
8835 }
8836 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8837 self.abstract_chested_horse.pack_all_into(values);
8838 if !self.strength.is_default() {
8839 values
8840 .push(DataValue {
8841 index: 20u8,
8842 serializer_id: 1i32,
8843 value: EntityData::Int(*self.strength.get()),
8844 });
8845 }
8846 if !self.variant.is_default() {
8847 values
8848 .push(DataValue {
8849 index: 21u8,
8850 serializer_id: 1i32,
8851 value: EntityData::Int(*self.variant.get()),
8852 });
8853 }
8854 }
8855 pub fn is_dirty(&self) -> bool {
8857 self.abstract_chested_horse.is_dirty() || self.strength.is_dirty()
8858 || self.variant.is_dirty()
8859 }
8860}
8861impl Default for LlamaEntityData {
8862 fn default() -> Self {
8863 Self::new()
8864 }
8865}
8866impl VanillaEntityData for LlamaEntityData {
8867 fn base(&self) -> &BaseEntityData {
8868 LlamaEntityData::base(self)
8869 }
8870 fn base_mut(&mut self) -> &mut BaseEntityData {
8871 LlamaEntityData::base_mut(self)
8872 }
8873 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8874 LlamaEntityData::pack_dirty(self)
8875 }
8876 fn pack_all(&self) -> Vec<DataValue> {
8877 LlamaEntityData::pack_all(self)
8878 }
8879 fn is_dirty(&self) -> bool {
8880 LlamaEntityData::is_dirty(self)
8881 }
8882}
8883impl VanillaLivingEntityData for LlamaEntityData {
8884 fn living_entity(&self) -> &LivingEntityData {
8885 LlamaEntityData::living_entity(self)
8886 }
8887 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8888 LlamaEntityData::living_entity_mut(self)
8889 }
8890}
8891#[derive(Debug, Clone)]
8893pub struct AbstractCubeMobEntityData {
8894 pub ageable_mob: AgeableMobEntityData,
8895 pub id_size: SyncedValue<i32>,
8896}
8897impl AbstractCubeMobEntityData {
8898 pub fn new() -> Self {
8900 Self {
8901 ageable_mob: AgeableMobEntityData::new(),
8902 id_size: SyncedValue::new(1i32),
8903 }
8904 }
8905 pub fn abstract_cube_mob(&self) -> &AbstractCubeMobEntityData {
8907 self
8908 }
8909 pub fn abstract_cube_mob_mut(&mut self) -> &mut AbstractCubeMobEntityData {
8911 self
8912 }
8913 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
8915 &self.ageable_mob
8916 }
8917 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
8919 &mut self.ageable_mob
8920 }
8921 pub fn mob(&self) -> &MobEntityData {
8923 &self.ageable_mob.mob
8924 }
8925 pub fn mob_mut(&mut self) -> &mut MobEntityData {
8927 &mut self.ageable_mob.mob
8928 }
8929 pub fn living_entity(&self) -> &LivingEntityData {
8931 &self.ageable_mob.mob.living_entity
8932 }
8933 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
8935 &mut self.ageable_mob.mob.living_entity
8936 }
8937 pub fn base(&self) -> &BaseEntityData {
8939 &self.ageable_mob.mob.living_entity.base
8940 }
8941 pub fn base_mut(&mut self) -> &mut BaseEntityData {
8943 &mut self.ageable_mob.mob.living_entity.base
8944 }
8945 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8948 let mut values = Vec::new();
8949 self.pack_dirty_into(&mut values);
8950 if values.is_empty() { None } else { Some(values) }
8951 }
8952 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
8953 self.ageable_mob.pack_dirty_into(values);
8954 if self.id_size.is_dirty() {
8955 values
8956 .push(DataValue {
8957 index: 18u8,
8958 serializer_id: 1i32,
8959 value: EntityData::Int(*self.id_size.get()),
8960 });
8961 self.id_size.clear_dirty();
8962 }
8963 }
8964 pub fn pack_all(&self) -> Vec<DataValue> {
8966 let mut values = Vec::new();
8967 self.pack_all_into(&mut values);
8968 values
8969 }
8970 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
8971 self.ageable_mob.pack_all_into(values);
8972 if !self.id_size.is_default() {
8973 values
8974 .push(DataValue {
8975 index: 18u8,
8976 serializer_id: 1i32,
8977 value: EntityData::Int(*self.id_size.get()),
8978 });
8979 }
8980 }
8981 pub fn is_dirty(&self) -> bool {
8983 self.ageable_mob.is_dirty() || self.id_size.is_dirty()
8984 }
8985}
8986impl Default for AbstractCubeMobEntityData {
8987 fn default() -> Self {
8988 Self::new()
8989 }
8990}
8991impl VanillaEntityData for AbstractCubeMobEntityData {
8992 fn base(&self) -> &BaseEntityData {
8993 AbstractCubeMobEntityData::base(self)
8994 }
8995 fn base_mut(&mut self) -> &mut BaseEntityData {
8996 AbstractCubeMobEntityData::base_mut(self)
8997 }
8998 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
8999 AbstractCubeMobEntityData::pack_dirty(self)
9000 }
9001 fn pack_all(&self) -> Vec<DataValue> {
9002 AbstractCubeMobEntityData::pack_all(self)
9003 }
9004 fn is_dirty(&self) -> bool {
9005 AbstractCubeMobEntityData::is_dirty(self)
9006 }
9007}
9008impl VanillaLivingEntityData for AbstractCubeMobEntityData {
9009 fn living_entity(&self) -> &LivingEntityData {
9010 AbstractCubeMobEntityData::living_entity(self)
9011 }
9012 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9013 AbstractCubeMobEntityData::living_entity_mut(self)
9014 }
9015}
9016#[derive(Debug, Clone)]
9018pub struct AvatarEntityData {
9019 pub living_entity: LivingEntityData,
9020 pub player_main_hand: SyncedValue<HumanoidArm>,
9021 pub player_mode_customization: SyncedValue<i8>,
9022}
9023impl AvatarEntityData {
9024 pub fn new() -> Self {
9026 Self {
9027 living_entity: LivingEntityData::new(),
9028 player_main_hand: SyncedValue::new(HumanoidArm::Right),
9029 player_mode_customization: SyncedValue::new(0i8),
9030 }
9031 }
9032 pub fn avatar(&self) -> &AvatarEntityData {
9034 self
9035 }
9036 pub fn avatar_mut(&mut self) -> &mut AvatarEntityData {
9038 self
9039 }
9040 pub fn living_entity(&self) -> &LivingEntityData {
9042 &self.living_entity
9043 }
9044 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9046 &mut self.living_entity
9047 }
9048 pub fn base(&self) -> &BaseEntityData {
9050 &self.living_entity.base
9051 }
9052 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9054 &mut self.living_entity.base
9055 }
9056 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9059 let mut values = Vec::new();
9060 self.pack_dirty_into(&mut values);
9061 if values.is_empty() { None } else { Some(values) }
9062 }
9063 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9064 self.living_entity.pack_dirty_into(values);
9065 if self.player_main_hand.is_dirty() {
9066 values
9067 .push(DataValue {
9068 index: 15u8,
9069 serializer_id: 42i32,
9070 value: EntityData::HumanoidArm(*self.player_main_hand.get()),
9071 });
9072 self.player_main_hand.clear_dirty();
9073 }
9074 if self.player_mode_customization.is_dirty() {
9075 values
9076 .push(DataValue {
9077 index: 16u8,
9078 serializer_id: 0i32,
9079 value: EntityData::Byte(*self.player_mode_customization.get()),
9080 });
9081 self.player_mode_customization.clear_dirty();
9082 }
9083 }
9084 pub fn pack_all(&self) -> Vec<DataValue> {
9086 let mut values = Vec::new();
9087 self.pack_all_into(&mut values);
9088 values
9089 }
9090 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9091 self.living_entity.pack_all_into(values);
9092 if !self.player_main_hand.is_default() {
9093 values
9094 .push(DataValue {
9095 index: 15u8,
9096 serializer_id: 42i32,
9097 value: EntityData::HumanoidArm(*self.player_main_hand.get()),
9098 });
9099 }
9100 if !self.player_mode_customization.is_default() {
9101 values
9102 .push(DataValue {
9103 index: 16u8,
9104 serializer_id: 0i32,
9105 value: EntityData::Byte(*self.player_mode_customization.get()),
9106 });
9107 }
9108 }
9109 pub fn is_dirty(&self) -> bool {
9111 self.living_entity.is_dirty() || self.player_main_hand.is_dirty()
9112 || self.player_mode_customization.is_dirty()
9113 }
9114}
9115impl Default for AvatarEntityData {
9116 fn default() -> Self {
9117 Self::new()
9118 }
9119}
9120impl VanillaEntityData for AvatarEntityData {
9121 fn base(&self) -> &BaseEntityData {
9122 AvatarEntityData::base(self)
9123 }
9124 fn base_mut(&mut self) -> &mut BaseEntityData {
9125 AvatarEntityData::base_mut(self)
9126 }
9127 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9128 AvatarEntityData::pack_dirty(self)
9129 }
9130 fn pack_all(&self) -> Vec<DataValue> {
9131 AvatarEntityData::pack_all(self)
9132 }
9133 fn is_dirty(&self) -> bool {
9134 AvatarEntityData::is_dirty(self)
9135 }
9136}
9137impl VanillaLivingEntityData for AvatarEntityData {
9138 fn living_entity(&self) -> &LivingEntityData {
9139 AvatarEntityData::living_entity(self)
9140 }
9141 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9142 AvatarEntityData::living_entity_mut(self)
9143 }
9144}
9145#[derive(Debug, Clone)]
9147pub struct MannequinEntityData {
9148 pub avatar: AvatarEntityData,
9149 pub profile: SyncedValue<ResolvableProfile>,
9150 pub immovable: SyncedValue<bool>,
9151 pub description: SyncedValue<Option<Box<TextComponent>>>,
9152}
9153impl MannequinEntityData {
9154 pub fn new() -> Self {
9156 Self {
9157 avatar: AvatarEntityData::new(),
9158 profile: SyncedValue::new(ResolvableProfile::default()),
9159 immovable: SyncedValue::new(false),
9160 description: SyncedValue::new(Some(Box::new(TextComponent::plain("NPC")))),
9161 }
9162 }
9163 pub fn mannequin(&self) -> &MannequinEntityData {
9165 self
9166 }
9167 pub fn mannequin_mut(&mut self) -> &mut MannequinEntityData {
9169 self
9170 }
9171 pub fn avatar(&self) -> &AvatarEntityData {
9173 &self.avatar
9174 }
9175 pub fn avatar_mut(&mut self) -> &mut AvatarEntityData {
9177 &mut self.avatar
9178 }
9179 pub fn living_entity(&self) -> &LivingEntityData {
9181 &self.avatar.living_entity
9182 }
9183 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9185 &mut self.avatar.living_entity
9186 }
9187 pub fn base(&self) -> &BaseEntityData {
9189 &self.avatar.living_entity.base
9190 }
9191 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9193 &mut self.avatar.living_entity.base
9194 }
9195 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9198 let mut values = Vec::new();
9199 self.pack_dirty_into(&mut values);
9200 if values.is_empty() { None } else { Some(values) }
9201 }
9202 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9203 self.avatar.pack_dirty_into(values);
9204 if self.profile.is_dirty() {
9205 values
9206 .push(DataValue {
9207 index: 17u8,
9208 serializer_id: 41i32,
9209 value: EntityData::ResolvableProfile(self.profile.get().clone()),
9210 });
9211 self.profile.clear_dirty();
9212 }
9213 if self.immovable.is_dirty() {
9214 values
9215 .push(DataValue {
9216 index: 18u8,
9217 serializer_id: 8i32,
9218 value: EntityData::Boolean(*self.immovable.get()),
9219 });
9220 self.immovable.clear_dirty();
9221 }
9222 if self.description.is_dirty() {
9223 values
9224 .push(DataValue {
9225 index: 19u8,
9226 serializer_id: 6i32,
9227 value: EntityData::OptionalComponent(self.description.get().clone()),
9228 });
9229 self.description.clear_dirty();
9230 }
9231 }
9232 pub fn pack_all(&self) -> Vec<DataValue> {
9234 let mut values = Vec::new();
9235 self.pack_all_into(&mut values);
9236 values
9237 }
9238 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9239 self.avatar.pack_all_into(values);
9240 if !self.profile.is_default() {
9241 values
9242 .push(DataValue {
9243 index: 17u8,
9244 serializer_id: 41i32,
9245 value: EntityData::ResolvableProfile(self.profile.get().clone()),
9246 });
9247 }
9248 if !self.immovable.is_default() {
9249 values
9250 .push(DataValue {
9251 index: 18u8,
9252 serializer_id: 8i32,
9253 value: EntityData::Boolean(*self.immovable.get()),
9254 });
9255 }
9256 if !self.description.is_default() {
9257 values
9258 .push(DataValue {
9259 index: 19u8,
9260 serializer_id: 6i32,
9261 value: EntityData::OptionalComponent(self.description.get().clone()),
9262 });
9263 }
9264 }
9265 pub fn is_dirty(&self) -> bool {
9267 self.avatar.is_dirty() || self.profile.is_dirty() || self.immovable.is_dirty()
9268 || self.description.is_dirty()
9269 }
9270}
9271impl Default for MannequinEntityData {
9272 fn default() -> Self {
9273 Self::new()
9274 }
9275}
9276impl VanillaEntityData for MannequinEntityData {
9277 fn base(&self) -> &BaseEntityData {
9278 MannequinEntityData::base(self)
9279 }
9280 fn base_mut(&mut self) -> &mut BaseEntityData {
9281 MannequinEntityData::base_mut(self)
9282 }
9283 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9284 MannequinEntityData::pack_dirty(self)
9285 }
9286 fn pack_all(&self) -> Vec<DataValue> {
9287 MannequinEntityData::pack_all(self)
9288 }
9289 fn is_dirty(&self) -> bool {
9290 MannequinEntityData::is_dirty(self)
9291 }
9292}
9293impl VanillaLivingEntityData for MannequinEntityData {
9294 fn living_entity(&self) -> &LivingEntityData {
9295 MannequinEntityData::living_entity(self)
9296 }
9297 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9298 MannequinEntityData::living_entity_mut(self)
9299 }
9300}
9301#[derive(Debug, Clone)]
9303pub struct MushroomCowEntityData {
9304 pub ageable_mob: AgeableMobEntityData,
9305 pub variant_type: SyncedValue<i32>,
9306}
9307impl MushroomCowEntityData {
9308 pub fn new() -> Self {
9310 Self {
9311 ageable_mob: AgeableMobEntityData::new(),
9312 variant_type: SyncedValue::new(0i32),
9313 }
9314 }
9315 pub fn mushroom_cow(&self) -> &MushroomCowEntityData {
9317 self
9318 }
9319 pub fn mushroom_cow_mut(&mut self) -> &mut MushroomCowEntityData {
9321 self
9322 }
9323 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
9325 &self.ageable_mob
9326 }
9327 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
9329 &mut self.ageable_mob
9330 }
9331 pub fn mob(&self) -> &MobEntityData {
9333 &self.ageable_mob.mob
9334 }
9335 pub fn mob_mut(&mut self) -> &mut MobEntityData {
9337 &mut self.ageable_mob.mob
9338 }
9339 pub fn living_entity(&self) -> &LivingEntityData {
9341 &self.ageable_mob.mob.living_entity
9342 }
9343 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9345 &mut self.ageable_mob.mob.living_entity
9346 }
9347 pub fn base(&self) -> &BaseEntityData {
9349 &self.ageable_mob.mob.living_entity.base
9350 }
9351 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9353 &mut self.ageable_mob.mob.living_entity.base
9354 }
9355 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9358 let mut values = Vec::new();
9359 self.pack_dirty_into(&mut values);
9360 if values.is_empty() { None } else { Some(values) }
9361 }
9362 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9363 self.ageable_mob.pack_dirty_into(values);
9364 if self.variant_type.is_dirty() {
9365 values
9366 .push(DataValue {
9367 index: 18u8,
9368 serializer_id: 1i32,
9369 value: EntityData::Int(*self.variant_type.get()),
9370 });
9371 self.variant_type.clear_dirty();
9372 }
9373 }
9374 pub fn pack_all(&self) -> Vec<DataValue> {
9376 let mut values = Vec::new();
9377 self.pack_all_into(&mut values);
9378 values
9379 }
9380 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9381 self.ageable_mob.pack_all_into(values);
9382 if !self.variant_type.is_default() {
9383 values
9384 .push(DataValue {
9385 index: 18u8,
9386 serializer_id: 1i32,
9387 value: EntityData::Int(*self.variant_type.get()),
9388 });
9389 }
9390 }
9391 pub fn is_dirty(&self) -> bool {
9393 self.ageable_mob.is_dirty() || self.variant_type.is_dirty()
9394 }
9395}
9396impl Default for MushroomCowEntityData {
9397 fn default() -> Self {
9398 Self::new()
9399 }
9400}
9401impl VanillaEntityData for MushroomCowEntityData {
9402 fn base(&self) -> &BaseEntityData {
9403 MushroomCowEntityData::base(self)
9404 }
9405 fn base_mut(&mut self) -> &mut BaseEntityData {
9406 MushroomCowEntityData::base_mut(self)
9407 }
9408 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9409 MushroomCowEntityData::pack_dirty(self)
9410 }
9411 fn pack_all(&self) -> Vec<DataValue> {
9412 MushroomCowEntityData::pack_all(self)
9413 }
9414 fn is_dirty(&self) -> bool {
9415 MushroomCowEntityData::is_dirty(self)
9416 }
9417}
9418impl VanillaLivingEntityData for MushroomCowEntityData {
9419 fn living_entity(&self) -> &LivingEntityData {
9420 MushroomCowEntityData::living_entity(self)
9421 }
9422 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9423 MushroomCowEntityData::living_entity_mut(self)
9424 }
9425}
9426#[derive(Debug, Clone)]
9428pub struct AbstractNautilusEntityData {
9429 pub tamable_animal: TamableAnimalEntityData,
9430 pub dash: SyncedValue<bool>,
9431}
9432impl AbstractNautilusEntityData {
9433 pub fn new() -> Self {
9435 Self {
9436 tamable_animal: TamableAnimalEntityData::new(),
9437 dash: SyncedValue::new(false),
9438 }
9439 }
9440 pub fn abstract_nautilus(&self) -> &AbstractNautilusEntityData {
9442 self
9443 }
9444 pub fn abstract_nautilus_mut(&mut self) -> &mut AbstractNautilusEntityData {
9446 self
9447 }
9448 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
9450 &self.tamable_animal
9451 }
9452 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
9454 &mut self.tamable_animal
9455 }
9456 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
9458 &self.tamable_animal.ageable_mob
9459 }
9460 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
9462 &mut self.tamable_animal.ageable_mob
9463 }
9464 pub fn mob(&self) -> &MobEntityData {
9466 &self.tamable_animal.ageable_mob.mob
9467 }
9468 pub fn mob_mut(&mut self) -> &mut MobEntityData {
9470 &mut self.tamable_animal.ageable_mob.mob
9471 }
9472 pub fn living_entity(&self) -> &LivingEntityData {
9474 &self.tamable_animal.ageable_mob.mob.living_entity
9475 }
9476 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9478 &mut self.tamable_animal.ageable_mob.mob.living_entity
9479 }
9480 pub fn base(&self) -> &BaseEntityData {
9482 &self.tamable_animal.ageable_mob.mob.living_entity.base
9483 }
9484 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9486 &mut self.tamable_animal.ageable_mob.mob.living_entity.base
9487 }
9488 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9491 let mut values = Vec::new();
9492 self.pack_dirty_into(&mut values);
9493 if values.is_empty() { None } else { Some(values) }
9494 }
9495 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9496 self.tamable_animal.pack_dirty_into(values);
9497 if self.dash.is_dirty() {
9498 values
9499 .push(DataValue {
9500 index: 20u8,
9501 serializer_id: 8i32,
9502 value: EntityData::Boolean(*self.dash.get()),
9503 });
9504 self.dash.clear_dirty();
9505 }
9506 }
9507 pub fn pack_all(&self) -> Vec<DataValue> {
9509 let mut values = Vec::new();
9510 self.pack_all_into(&mut values);
9511 values
9512 }
9513 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9514 self.tamable_animal.pack_all_into(values);
9515 if !self.dash.is_default() {
9516 values
9517 .push(DataValue {
9518 index: 20u8,
9519 serializer_id: 8i32,
9520 value: EntityData::Boolean(*self.dash.get()),
9521 });
9522 }
9523 }
9524 pub fn is_dirty(&self) -> bool {
9526 self.tamable_animal.is_dirty() || self.dash.is_dirty()
9527 }
9528}
9529impl Default for AbstractNautilusEntityData {
9530 fn default() -> Self {
9531 Self::new()
9532 }
9533}
9534impl VanillaEntityData for AbstractNautilusEntityData {
9535 fn base(&self) -> &BaseEntityData {
9536 AbstractNautilusEntityData::base(self)
9537 }
9538 fn base_mut(&mut self) -> &mut BaseEntityData {
9539 AbstractNautilusEntityData::base_mut(self)
9540 }
9541 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9542 AbstractNautilusEntityData::pack_dirty(self)
9543 }
9544 fn pack_all(&self) -> Vec<DataValue> {
9545 AbstractNautilusEntityData::pack_all(self)
9546 }
9547 fn is_dirty(&self) -> bool {
9548 AbstractNautilusEntityData::is_dirty(self)
9549 }
9550}
9551impl VanillaLivingEntityData for AbstractNautilusEntityData {
9552 fn living_entity(&self) -> &LivingEntityData {
9553 AbstractNautilusEntityData::living_entity(self)
9554 }
9555 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9556 AbstractNautilusEntityData::living_entity_mut(self)
9557 }
9558}
9559#[derive(Debug, Clone)]
9561pub struct OcelotEntityData {
9562 pub ageable_mob: AgeableMobEntityData,
9563 pub trusting: SyncedValue<bool>,
9564}
9565impl OcelotEntityData {
9566 pub fn new() -> Self {
9568 Self {
9569 ageable_mob: AgeableMobEntityData::new(),
9570 trusting: SyncedValue::new(false),
9571 }
9572 }
9573 pub fn ocelot(&self) -> &OcelotEntityData {
9575 self
9576 }
9577 pub fn ocelot_mut(&mut self) -> &mut OcelotEntityData {
9579 self
9580 }
9581 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
9583 &self.ageable_mob
9584 }
9585 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
9587 &mut self.ageable_mob
9588 }
9589 pub fn mob(&self) -> &MobEntityData {
9591 &self.ageable_mob.mob
9592 }
9593 pub fn mob_mut(&mut self) -> &mut MobEntityData {
9595 &mut self.ageable_mob.mob
9596 }
9597 pub fn living_entity(&self) -> &LivingEntityData {
9599 &self.ageable_mob.mob.living_entity
9600 }
9601 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9603 &mut self.ageable_mob.mob.living_entity
9604 }
9605 pub fn base(&self) -> &BaseEntityData {
9607 &self.ageable_mob.mob.living_entity.base
9608 }
9609 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9611 &mut self.ageable_mob.mob.living_entity.base
9612 }
9613 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9616 let mut values = Vec::new();
9617 self.pack_dirty_into(&mut values);
9618 if values.is_empty() { None } else { Some(values) }
9619 }
9620 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9621 self.ageable_mob.pack_dirty_into(values);
9622 if self.trusting.is_dirty() {
9623 values
9624 .push(DataValue {
9625 index: 18u8,
9626 serializer_id: 8i32,
9627 value: EntityData::Boolean(*self.trusting.get()),
9628 });
9629 self.trusting.clear_dirty();
9630 }
9631 }
9632 pub fn pack_all(&self) -> Vec<DataValue> {
9634 let mut values = Vec::new();
9635 self.pack_all_into(&mut values);
9636 values
9637 }
9638 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9639 self.ageable_mob.pack_all_into(values);
9640 if !self.trusting.is_default() {
9641 values
9642 .push(DataValue {
9643 index: 18u8,
9644 serializer_id: 8i32,
9645 value: EntityData::Boolean(*self.trusting.get()),
9646 });
9647 }
9648 }
9649 pub fn is_dirty(&self) -> bool {
9651 self.ageable_mob.is_dirty() || self.trusting.is_dirty()
9652 }
9653}
9654impl Default for OcelotEntityData {
9655 fn default() -> Self {
9656 Self::new()
9657 }
9658}
9659impl VanillaEntityData for OcelotEntityData {
9660 fn base(&self) -> &BaseEntityData {
9661 OcelotEntityData::base(self)
9662 }
9663 fn base_mut(&mut self) -> &mut BaseEntityData {
9664 OcelotEntityData::base_mut(self)
9665 }
9666 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9667 OcelotEntityData::pack_dirty(self)
9668 }
9669 fn pack_all(&self) -> Vec<DataValue> {
9670 OcelotEntityData::pack_all(self)
9671 }
9672 fn is_dirty(&self) -> bool {
9673 OcelotEntityData::is_dirty(self)
9674 }
9675}
9676impl VanillaLivingEntityData for OcelotEntityData {
9677 fn living_entity(&self) -> &LivingEntityData {
9678 OcelotEntityData::living_entity(self)
9679 }
9680 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9681 OcelotEntityData::living_entity_mut(self)
9682 }
9683}
9684#[derive(Debug, Clone)]
9686pub struct OminousItemSpawnerEntityData {
9687 pub base: BaseEntityData,
9688 pub item: SyncedValue<ItemStack>,
9689}
9690impl OminousItemSpawnerEntityData {
9691 pub fn new() -> Self {
9693 Self {
9694 base: BaseEntityData::new(),
9695 item: SyncedValue::new(ItemStack::empty()),
9696 }
9697 }
9698 pub fn ominous_item_spawner(&self) -> &OminousItemSpawnerEntityData {
9700 self
9701 }
9702 pub fn ominous_item_spawner_mut(&mut self) -> &mut OminousItemSpawnerEntityData {
9704 self
9705 }
9706 pub fn base(&self) -> &BaseEntityData {
9708 &self.base
9709 }
9710 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9712 &mut self.base
9713 }
9714 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9717 let mut values = Vec::new();
9718 self.pack_dirty_into(&mut values);
9719 if values.is_empty() { None } else { Some(values) }
9720 }
9721 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9722 self.base.pack_dirty_into(values);
9723 if self.item.is_dirty() {
9724 values
9725 .push(DataValue {
9726 index: 8u8,
9727 serializer_id: 7i32,
9728 value: EntityData::ItemStack(self.item.get().clone()),
9729 });
9730 self.item.clear_dirty();
9731 }
9732 }
9733 pub fn pack_all(&self) -> Vec<DataValue> {
9735 let mut values = Vec::new();
9736 self.pack_all_into(&mut values);
9737 values
9738 }
9739 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9740 self.base.pack_all_into(values);
9741 if !self.item.is_default() {
9742 values
9743 .push(DataValue {
9744 index: 8u8,
9745 serializer_id: 7i32,
9746 value: EntityData::ItemStack(self.item.get().clone()),
9747 });
9748 }
9749 }
9750 pub fn is_dirty(&self) -> bool {
9752 self.base.is_dirty() || self.item.is_dirty()
9753 }
9754}
9755impl Default for OminousItemSpawnerEntityData {
9756 fn default() -> Self {
9757 Self::new()
9758 }
9759}
9760impl VanillaEntityData for OminousItemSpawnerEntityData {
9761 fn base(&self) -> &BaseEntityData {
9762 OminousItemSpawnerEntityData::base(self)
9763 }
9764 fn base_mut(&mut self) -> &mut BaseEntityData {
9765 OminousItemSpawnerEntityData::base_mut(self)
9766 }
9767 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9768 OminousItemSpawnerEntityData::pack_dirty(self)
9769 }
9770 fn pack_all(&self) -> Vec<DataValue> {
9771 OminousItemSpawnerEntityData::pack_all(self)
9772 }
9773 fn is_dirty(&self) -> bool {
9774 OminousItemSpawnerEntityData::is_dirty(self)
9775 }
9776}
9777#[derive(Debug, Clone)]
9779pub struct PaintingEntityData {
9780 pub hanging_entity: HangingEntityData,
9781 pub painting_variant: SyncedValue<
9782 RegistryReference<crate::painting_variant::PaintingVariant>,
9783 >,
9784}
9785impl PaintingEntityData {
9786 pub fn new() -> Self {
9788 Self {
9789 hanging_entity: HangingEntityData::new(),
9790 painting_variant: SyncedValue::new(
9791 RegistryReference::new(&crate::vanilla_painting_variants::ALBAN),
9792 ),
9793 }
9794 }
9795 pub fn painting(&self) -> &PaintingEntityData {
9797 self
9798 }
9799 pub fn painting_mut(&mut self) -> &mut PaintingEntityData {
9801 self
9802 }
9803 pub fn hanging_entity(&self) -> &HangingEntityData {
9805 &self.hanging_entity
9806 }
9807 pub fn hanging_entity_mut(&mut self) -> &mut HangingEntityData {
9809 &mut self.hanging_entity
9810 }
9811 pub fn base(&self) -> &BaseEntityData {
9813 &self.hanging_entity.base
9814 }
9815 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9817 &mut self.hanging_entity.base
9818 }
9819 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9822 let mut values = Vec::new();
9823 self.pack_dirty_into(&mut values);
9824 if values.is_empty() { None } else { Some(values) }
9825 }
9826 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9827 self.hanging_entity.pack_dirty_into(values);
9828 if self.painting_variant.is_dirty() {
9829 values
9830 .push(DataValue {
9831 index: 9u8,
9832 serializer_id: 34i32,
9833 value: EntityData::PaintingVariant(*self.painting_variant.get()),
9834 });
9835 self.painting_variant.clear_dirty();
9836 }
9837 }
9838 pub fn pack_all(&self) -> Vec<DataValue> {
9840 let mut values = Vec::new();
9841 self.pack_all_into(&mut values);
9842 values
9843 }
9844 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
9845 self.hanging_entity.pack_all_into(values);
9846 if !self.painting_variant.is_default() {
9847 values
9848 .push(DataValue {
9849 index: 9u8,
9850 serializer_id: 34i32,
9851 value: EntityData::PaintingVariant(*self.painting_variant.get()),
9852 });
9853 }
9854 }
9855 pub fn is_dirty(&self) -> bool {
9857 self.hanging_entity.is_dirty() || self.painting_variant.is_dirty()
9858 }
9859}
9860impl Default for PaintingEntityData {
9861 fn default() -> Self {
9862 Self::new()
9863 }
9864}
9865impl VanillaEntityData for PaintingEntityData {
9866 fn base(&self) -> &BaseEntityData {
9867 PaintingEntityData::base(self)
9868 }
9869 fn base_mut(&mut self) -> &mut BaseEntityData {
9870 PaintingEntityData::base_mut(self)
9871 }
9872 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9873 PaintingEntityData::pack_dirty(self)
9874 }
9875 fn pack_all(&self) -> Vec<DataValue> {
9876 PaintingEntityData::pack_all(self)
9877 }
9878 fn is_dirty(&self) -> bool {
9879 PaintingEntityData::is_dirty(self)
9880 }
9881}
9882#[derive(Debug, Clone)]
9884pub struct PandaEntityData {
9885 pub ageable_mob: AgeableMobEntityData,
9886 pub unhappy_counter: SyncedValue<i32>,
9887 pub sneeze_counter: SyncedValue<i32>,
9888 pub eat_counter: SyncedValue<i32>,
9889 pub main_gene: SyncedValue<i8>,
9890 pub hidden_gene: SyncedValue<i8>,
9891 pub id_flags: SyncedValue<i8>,
9892}
9893impl PandaEntityData {
9894 pub fn new() -> Self {
9896 Self {
9897 ageable_mob: AgeableMobEntityData::new(),
9898 unhappy_counter: SyncedValue::new(0i32),
9899 sneeze_counter: SyncedValue::new(0i32),
9900 eat_counter: SyncedValue::new(0i32),
9901 main_gene: SyncedValue::new(0i8),
9902 hidden_gene: SyncedValue::new(0i8),
9903 id_flags: SyncedValue::new(0i8),
9904 }
9905 }
9906 pub fn panda(&self) -> &PandaEntityData {
9908 self
9909 }
9910 pub fn panda_mut(&mut self) -> &mut PandaEntityData {
9912 self
9913 }
9914 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
9916 &self.ageable_mob
9917 }
9918 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
9920 &mut self.ageable_mob
9921 }
9922 pub fn mob(&self) -> &MobEntityData {
9924 &self.ageable_mob.mob
9925 }
9926 pub fn mob_mut(&mut self) -> &mut MobEntityData {
9928 &mut self.ageable_mob.mob
9929 }
9930 pub fn living_entity(&self) -> &LivingEntityData {
9932 &self.ageable_mob.mob.living_entity
9933 }
9934 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
9936 &mut self.ageable_mob.mob.living_entity
9937 }
9938 pub fn base(&self) -> &BaseEntityData {
9940 &self.ageable_mob.mob.living_entity.base
9941 }
9942 pub fn base_mut(&mut self) -> &mut BaseEntityData {
9944 &mut self.ageable_mob.mob.living_entity.base
9945 }
9946 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
9949 let mut values = Vec::new();
9950 self.pack_dirty_into(&mut values);
9951 if values.is_empty() { None } else { Some(values) }
9952 }
9953 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
9954 self.ageable_mob.pack_dirty_into(values);
9955 if self.unhappy_counter.is_dirty() {
9956 values
9957 .push(DataValue {
9958 index: 18u8,
9959 serializer_id: 1i32,
9960 value: EntityData::Int(*self.unhappy_counter.get()),
9961 });
9962 self.unhappy_counter.clear_dirty();
9963 }
9964 if self.sneeze_counter.is_dirty() {
9965 values
9966 .push(DataValue {
9967 index: 19u8,
9968 serializer_id: 1i32,
9969 value: EntityData::Int(*self.sneeze_counter.get()),
9970 });
9971 self.sneeze_counter.clear_dirty();
9972 }
9973 if self.eat_counter.is_dirty() {
9974 values
9975 .push(DataValue {
9976 index: 20u8,
9977 serializer_id: 1i32,
9978 value: EntityData::Int(*self.eat_counter.get()),
9979 });
9980 self.eat_counter.clear_dirty();
9981 }
9982 if self.main_gene.is_dirty() {
9983 values
9984 .push(DataValue {
9985 index: 21u8,
9986 serializer_id: 0i32,
9987 value: EntityData::Byte(*self.main_gene.get()),
9988 });
9989 self.main_gene.clear_dirty();
9990 }
9991 if self.hidden_gene.is_dirty() {
9992 values
9993 .push(DataValue {
9994 index: 22u8,
9995 serializer_id: 0i32,
9996 value: EntityData::Byte(*self.hidden_gene.get()),
9997 });
9998 self.hidden_gene.clear_dirty();
9999 }
10000 if self.id_flags.is_dirty() {
10001 values
10002 .push(DataValue {
10003 index: 23u8,
10004 serializer_id: 0i32,
10005 value: EntityData::Byte(*self.id_flags.get()),
10006 });
10007 self.id_flags.clear_dirty();
10008 }
10009 }
10010 pub fn pack_all(&self) -> Vec<DataValue> {
10012 let mut values = Vec::new();
10013 self.pack_all_into(&mut values);
10014 values
10015 }
10016 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10017 self.ageable_mob.pack_all_into(values);
10018 if !self.unhappy_counter.is_default() {
10019 values
10020 .push(DataValue {
10021 index: 18u8,
10022 serializer_id: 1i32,
10023 value: EntityData::Int(*self.unhappy_counter.get()),
10024 });
10025 }
10026 if !self.sneeze_counter.is_default() {
10027 values
10028 .push(DataValue {
10029 index: 19u8,
10030 serializer_id: 1i32,
10031 value: EntityData::Int(*self.sneeze_counter.get()),
10032 });
10033 }
10034 if !self.eat_counter.is_default() {
10035 values
10036 .push(DataValue {
10037 index: 20u8,
10038 serializer_id: 1i32,
10039 value: EntityData::Int(*self.eat_counter.get()),
10040 });
10041 }
10042 if !self.main_gene.is_default() {
10043 values
10044 .push(DataValue {
10045 index: 21u8,
10046 serializer_id: 0i32,
10047 value: EntityData::Byte(*self.main_gene.get()),
10048 });
10049 }
10050 if !self.hidden_gene.is_default() {
10051 values
10052 .push(DataValue {
10053 index: 22u8,
10054 serializer_id: 0i32,
10055 value: EntityData::Byte(*self.hidden_gene.get()),
10056 });
10057 }
10058 if !self.id_flags.is_default() {
10059 values
10060 .push(DataValue {
10061 index: 23u8,
10062 serializer_id: 0i32,
10063 value: EntityData::Byte(*self.id_flags.get()),
10064 });
10065 }
10066 }
10067 pub fn is_dirty(&self) -> bool {
10069 self.ageable_mob.is_dirty() || self.unhappy_counter.is_dirty()
10070 || self.sneeze_counter.is_dirty() || self.eat_counter.is_dirty()
10071 || self.main_gene.is_dirty() || self.hidden_gene.is_dirty()
10072 || self.id_flags.is_dirty()
10073 }
10074}
10075impl Default for PandaEntityData {
10076 fn default() -> Self {
10077 Self::new()
10078 }
10079}
10080impl VanillaEntityData for PandaEntityData {
10081 fn base(&self) -> &BaseEntityData {
10082 PandaEntityData::base(self)
10083 }
10084 fn base_mut(&mut self) -> &mut BaseEntityData {
10085 PandaEntityData::base_mut(self)
10086 }
10087 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10088 PandaEntityData::pack_dirty(self)
10089 }
10090 fn pack_all(&self) -> Vec<DataValue> {
10091 PandaEntityData::pack_all(self)
10092 }
10093 fn is_dirty(&self) -> bool {
10094 PandaEntityData::is_dirty(self)
10095 }
10096}
10097impl VanillaLivingEntityData for PandaEntityData {
10098 fn living_entity(&self) -> &LivingEntityData {
10099 PandaEntityData::living_entity(self)
10100 }
10101 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10102 PandaEntityData::living_entity_mut(self)
10103 }
10104}
10105#[derive(Debug, Clone)]
10107pub struct ParrotEntityData {
10108 pub tamable_animal: TamableAnimalEntityData,
10109 pub variant: SyncedValue<i32>,
10110}
10111impl ParrotEntityData {
10112 pub fn new() -> Self {
10114 Self {
10115 tamable_animal: TamableAnimalEntityData::new(),
10116 variant: SyncedValue::new(0i32),
10117 }
10118 }
10119 pub fn parrot(&self) -> &ParrotEntityData {
10121 self
10122 }
10123 pub fn parrot_mut(&mut self) -> &mut ParrotEntityData {
10125 self
10126 }
10127 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
10129 &self.tamable_animal
10130 }
10131 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
10133 &mut self.tamable_animal
10134 }
10135 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
10137 &self.tamable_animal.ageable_mob
10138 }
10139 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
10141 &mut self.tamable_animal.ageable_mob
10142 }
10143 pub fn mob(&self) -> &MobEntityData {
10145 &self.tamable_animal.ageable_mob.mob
10146 }
10147 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10149 &mut self.tamable_animal.ageable_mob.mob
10150 }
10151 pub fn living_entity(&self) -> &LivingEntityData {
10153 &self.tamable_animal.ageable_mob.mob.living_entity
10154 }
10155 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10157 &mut self.tamable_animal.ageable_mob.mob.living_entity
10158 }
10159 pub fn base(&self) -> &BaseEntityData {
10161 &self.tamable_animal.ageable_mob.mob.living_entity.base
10162 }
10163 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10165 &mut self.tamable_animal.ageable_mob.mob.living_entity.base
10166 }
10167 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10170 let mut values = Vec::new();
10171 self.pack_dirty_into(&mut values);
10172 if values.is_empty() { None } else { Some(values) }
10173 }
10174 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10175 self.tamable_animal.pack_dirty_into(values);
10176 if self.variant.is_dirty() {
10177 values
10178 .push(DataValue {
10179 index: 20u8,
10180 serializer_id: 1i32,
10181 value: EntityData::Int(*self.variant.get()),
10182 });
10183 self.variant.clear_dirty();
10184 }
10185 }
10186 pub fn pack_all(&self) -> Vec<DataValue> {
10188 let mut values = Vec::new();
10189 self.pack_all_into(&mut values);
10190 values
10191 }
10192 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10193 self.tamable_animal.pack_all_into(values);
10194 if !self.variant.is_default() {
10195 values
10196 .push(DataValue {
10197 index: 20u8,
10198 serializer_id: 1i32,
10199 value: EntityData::Int(*self.variant.get()),
10200 });
10201 }
10202 }
10203 pub fn is_dirty(&self) -> bool {
10205 self.tamable_animal.is_dirty() || self.variant.is_dirty()
10206 }
10207}
10208impl Default for ParrotEntityData {
10209 fn default() -> Self {
10210 Self::new()
10211 }
10212}
10213impl VanillaEntityData for ParrotEntityData {
10214 fn base(&self) -> &BaseEntityData {
10215 ParrotEntityData::base(self)
10216 }
10217 fn base_mut(&mut self) -> &mut BaseEntityData {
10218 ParrotEntityData::base_mut(self)
10219 }
10220 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10221 ParrotEntityData::pack_dirty(self)
10222 }
10223 fn pack_all(&self) -> Vec<DataValue> {
10224 ParrotEntityData::pack_all(self)
10225 }
10226 fn is_dirty(&self) -> bool {
10227 ParrotEntityData::is_dirty(self)
10228 }
10229}
10230impl VanillaLivingEntityData for ParrotEntityData {
10231 fn living_entity(&self) -> &LivingEntityData {
10232 ParrotEntityData::living_entity(self)
10233 }
10234 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10235 ParrotEntityData::living_entity_mut(self)
10236 }
10237}
10238#[derive(Debug, Clone)]
10240pub struct PhantomEntityData {
10241 pub mob: MobEntityData,
10242 pub id_size: SyncedValue<i32>,
10243}
10244impl PhantomEntityData {
10245 pub fn new() -> Self {
10247 Self {
10248 mob: MobEntityData::new(),
10249 id_size: SyncedValue::new(0i32),
10250 }
10251 }
10252 pub fn phantom(&self) -> &PhantomEntityData {
10254 self
10255 }
10256 pub fn phantom_mut(&mut self) -> &mut PhantomEntityData {
10258 self
10259 }
10260 pub fn mob(&self) -> &MobEntityData {
10262 &self.mob
10263 }
10264 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10266 &mut self.mob
10267 }
10268 pub fn living_entity(&self) -> &LivingEntityData {
10270 &self.mob.living_entity
10271 }
10272 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10274 &mut self.mob.living_entity
10275 }
10276 pub fn base(&self) -> &BaseEntityData {
10278 &self.mob.living_entity.base
10279 }
10280 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10282 &mut self.mob.living_entity.base
10283 }
10284 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10287 let mut values = Vec::new();
10288 self.pack_dirty_into(&mut values);
10289 if values.is_empty() { None } else { Some(values) }
10290 }
10291 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10292 self.mob.pack_dirty_into(values);
10293 if self.id_size.is_dirty() {
10294 values
10295 .push(DataValue {
10296 index: 16u8,
10297 serializer_id: 1i32,
10298 value: EntityData::Int(*self.id_size.get()),
10299 });
10300 self.id_size.clear_dirty();
10301 }
10302 }
10303 pub fn pack_all(&self) -> Vec<DataValue> {
10305 let mut values = Vec::new();
10306 self.pack_all_into(&mut values);
10307 values
10308 }
10309 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10310 self.mob.pack_all_into(values);
10311 if !self.id_size.is_default() {
10312 values
10313 .push(DataValue {
10314 index: 16u8,
10315 serializer_id: 1i32,
10316 value: EntityData::Int(*self.id_size.get()),
10317 });
10318 }
10319 }
10320 pub fn is_dirty(&self) -> bool {
10322 self.mob.is_dirty() || self.id_size.is_dirty()
10323 }
10324}
10325impl Default for PhantomEntityData {
10326 fn default() -> Self {
10327 Self::new()
10328 }
10329}
10330impl VanillaEntityData for PhantomEntityData {
10331 fn base(&self) -> &BaseEntityData {
10332 PhantomEntityData::base(self)
10333 }
10334 fn base_mut(&mut self) -> &mut BaseEntityData {
10335 PhantomEntityData::base_mut(self)
10336 }
10337 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10338 PhantomEntityData::pack_dirty(self)
10339 }
10340 fn pack_all(&self) -> Vec<DataValue> {
10341 PhantomEntityData::pack_all(self)
10342 }
10343 fn is_dirty(&self) -> bool {
10344 PhantomEntityData::is_dirty(self)
10345 }
10346}
10347impl VanillaLivingEntityData for PhantomEntityData {
10348 fn living_entity(&self) -> &LivingEntityData {
10349 PhantomEntityData::living_entity(self)
10350 }
10351 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10352 PhantomEntityData::living_entity_mut(self)
10353 }
10354}
10355#[derive(Debug, Clone)]
10357pub struct PigEntityData {
10358 pub ageable_mob: AgeableMobEntityData,
10359 pub boost_time: SyncedValue<i32>,
10360 pub variant: SyncedValue<RegistryReference<crate::pig_variant::PigVariant>>,
10361 pub sound_variant: SyncedValue<
10362 RegistryReference<crate::pig_sound_variant::PigSoundVariant>,
10363 >,
10364}
10365impl PigEntityData {
10366 pub fn new() -> Self {
10368 Self {
10369 ageable_mob: AgeableMobEntityData::new(),
10370 boost_time: SyncedValue::new(0i32),
10371 variant: SyncedValue::new(
10372 RegistryReference::new(&crate::vanilla_pig_variants::TEMPERATE),
10373 ),
10374 sound_variant: SyncedValue::new(
10375 RegistryReference::new(&crate::vanilla_pig_sound_variants::CLASSIC),
10376 ),
10377 }
10378 }
10379 pub fn pig(&self) -> &PigEntityData {
10381 self
10382 }
10383 pub fn pig_mut(&mut self) -> &mut PigEntityData {
10385 self
10386 }
10387 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
10389 &self.ageable_mob
10390 }
10391 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
10393 &mut self.ageable_mob
10394 }
10395 pub fn mob(&self) -> &MobEntityData {
10397 &self.ageable_mob.mob
10398 }
10399 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10401 &mut self.ageable_mob.mob
10402 }
10403 pub fn living_entity(&self) -> &LivingEntityData {
10405 &self.ageable_mob.mob.living_entity
10406 }
10407 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10409 &mut self.ageable_mob.mob.living_entity
10410 }
10411 pub fn base(&self) -> &BaseEntityData {
10413 &self.ageable_mob.mob.living_entity.base
10414 }
10415 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10417 &mut self.ageable_mob.mob.living_entity.base
10418 }
10419 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10422 let mut values = Vec::new();
10423 self.pack_dirty_into(&mut values);
10424 if values.is_empty() { None } else { Some(values) }
10425 }
10426 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10427 self.ageable_mob.pack_dirty_into(values);
10428 if self.boost_time.is_dirty() {
10429 values
10430 .push(DataValue {
10431 index: 18u8,
10432 serializer_id: 1i32,
10433 value: EntityData::Int(*self.boost_time.get()),
10434 });
10435 self.boost_time.clear_dirty();
10436 }
10437 if self.variant.is_dirty() {
10438 values
10439 .push(DataValue {
10440 index: 19u8,
10441 serializer_id: 28i32,
10442 value: EntityData::PigVariant(*self.variant.get()),
10443 });
10444 self.variant.clear_dirty();
10445 }
10446 if self.sound_variant.is_dirty() {
10447 values
10448 .push(DataValue {
10449 index: 20u8,
10450 serializer_id: 29i32,
10451 value: EntityData::PigSoundVariant(*self.sound_variant.get()),
10452 });
10453 self.sound_variant.clear_dirty();
10454 }
10455 }
10456 pub fn pack_all(&self) -> Vec<DataValue> {
10458 let mut values = Vec::new();
10459 self.pack_all_into(&mut values);
10460 values
10461 }
10462 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10463 self.ageable_mob.pack_all_into(values);
10464 if !self.boost_time.is_default() {
10465 values
10466 .push(DataValue {
10467 index: 18u8,
10468 serializer_id: 1i32,
10469 value: EntityData::Int(*self.boost_time.get()),
10470 });
10471 }
10472 if !self.variant.is_default() {
10473 values
10474 .push(DataValue {
10475 index: 19u8,
10476 serializer_id: 28i32,
10477 value: EntityData::PigVariant(*self.variant.get()),
10478 });
10479 }
10480 if !self.sound_variant.is_default() {
10481 values
10482 .push(DataValue {
10483 index: 20u8,
10484 serializer_id: 29i32,
10485 value: EntityData::PigSoundVariant(*self.sound_variant.get()),
10486 });
10487 }
10488 }
10489 pub fn is_dirty(&self) -> bool {
10491 self.ageable_mob.is_dirty() || self.boost_time.is_dirty()
10492 || self.variant.is_dirty() || self.sound_variant.is_dirty()
10493 }
10494}
10495impl Default for PigEntityData {
10496 fn default() -> Self {
10497 Self::new()
10498 }
10499}
10500impl VanillaEntityData for PigEntityData {
10501 fn base(&self) -> &BaseEntityData {
10502 PigEntityData::base(self)
10503 }
10504 fn base_mut(&mut self) -> &mut BaseEntityData {
10505 PigEntityData::base_mut(self)
10506 }
10507 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10508 PigEntityData::pack_dirty(self)
10509 }
10510 fn pack_all(&self) -> Vec<DataValue> {
10511 PigEntityData::pack_all(self)
10512 }
10513 fn is_dirty(&self) -> bool {
10514 PigEntityData::is_dirty(self)
10515 }
10516}
10517impl VanillaLivingEntityData for PigEntityData {
10518 fn living_entity(&self) -> &LivingEntityData {
10519 PigEntityData::living_entity(self)
10520 }
10521 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10522 PigEntityData::living_entity_mut(self)
10523 }
10524}
10525#[derive(Debug, Clone)]
10527pub struct AbstractPiglinEntityData {
10528 pub mob: MobEntityData,
10529 pub immune_to_zombification: SyncedValue<bool>,
10530}
10531impl AbstractPiglinEntityData {
10532 pub fn new() -> Self {
10534 Self {
10535 mob: MobEntityData::new(),
10536 immune_to_zombification: SyncedValue::new(false),
10537 }
10538 }
10539 pub fn abstract_piglin(&self) -> &AbstractPiglinEntityData {
10541 self
10542 }
10543 pub fn abstract_piglin_mut(&mut self) -> &mut AbstractPiglinEntityData {
10545 self
10546 }
10547 pub fn mob(&self) -> &MobEntityData {
10549 &self.mob
10550 }
10551 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10553 &mut self.mob
10554 }
10555 pub fn living_entity(&self) -> &LivingEntityData {
10557 &self.mob.living_entity
10558 }
10559 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10561 &mut self.mob.living_entity
10562 }
10563 pub fn base(&self) -> &BaseEntityData {
10565 &self.mob.living_entity.base
10566 }
10567 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10569 &mut self.mob.living_entity.base
10570 }
10571 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10574 let mut values = Vec::new();
10575 self.pack_dirty_into(&mut values);
10576 if values.is_empty() { None } else { Some(values) }
10577 }
10578 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10579 self.mob.pack_dirty_into(values);
10580 if self.immune_to_zombification.is_dirty() {
10581 values
10582 .push(DataValue {
10583 index: 16u8,
10584 serializer_id: 8i32,
10585 value: EntityData::Boolean(*self.immune_to_zombification.get()),
10586 });
10587 self.immune_to_zombification.clear_dirty();
10588 }
10589 }
10590 pub fn pack_all(&self) -> Vec<DataValue> {
10592 let mut values = Vec::new();
10593 self.pack_all_into(&mut values);
10594 values
10595 }
10596 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10597 self.mob.pack_all_into(values);
10598 if !self.immune_to_zombification.is_default() {
10599 values
10600 .push(DataValue {
10601 index: 16u8,
10602 serializer_id: 8i32,
10603 value: EntityData::Boolean(*self.immune_to_zombification.get()),
10604 });
10605 }
10606 }
10607 pub fn is_dirty(&self) -> bool {
10609 self.mob.is_dirty() || self.immune_to_zombification.is_dirty()
10610 }
10611}
10612impl Default for AbstractPiglinEntityData {
10613 fn default() -> Self {
10614 Self::new()
10615 }
10616}
10617impl VanillaEntityData for AbstractPiglinEntityData {
10618 fn base(&self) -> &BaseEntityData {
10619 AbstractPiglinEntityData::base(self)
10620 }
10621 fn base_mut(&mut self) -> &mut BaseEntityData {
10622 AbstractPiglinEntityData::base_mut(self)
10623 }
10624 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10625 AbstractPiglinEntityData::pack_dirty(self)
10626 }
10627 fn pack_all(&self) -> Vec<DataValue> {
10628 AbstractPiglinEntityData::pack_all(self)
10629 }
10630 fn is_dirty(&self) -> bool {
10631 AbstractPiglinEntityData::is_dirty(self)
10632 }
10633}
10634impl VanillaLivingEntityData for AbstractPiglinEntityData {
10635 fn living_entity(&self) -> &LivingEntityData {
10636 AbstractPiglinEntityData::living_entity(self)
10637 }
10638 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10639 AbstractPiglinEntityData::living_entity_mut(self)
10640 }
10641}
10642#[derive(Debug, Clone)]
10644pub struct PiglinEntityData {
10645 pub abstract_piglin: AbstractPiglinEntityData,
10646 pub baby: SyncedValue<bool>,
10647 pub is_charging_crossbow: SyncedValue<bool>,
10648 pub is_dancing: SyncedValue<bool>,
10649}
10650impl PiglinEntityData {
10651 pub fn new() -> Self {
10653 Self {
10654 abstract_piglin: AbstractPiglinEntityData::new(),
10655 baby: SyncedValue::new(false),
10656 is_charging_crossbow: SyncedValue::new(false),
10657 is_dancing: SyncedValue::new(false),
10658 }
10659 }
10660 pub fn piglin(&self) -> &PiglinEntityData {
10662 self
10663 }
10664 pub fn piglin_mut(&mut self) -> &mut PiglinEntityData {
10666 self
10667 }
10668 pub fn abstract_piglin(&self) -> &AbstractPiglinEntityData {
10670 &self.abstract_piglin
10671 }
10672 pub fn abstract_piglin_mut(&mut self) -> &mut AbstractPiglinEntityData {
10674 &mut self.abstract_piglin
10675 }
10676 pub fn mob(&self) -> &MobEntityData {
10678 &self.abstract_piglin.mob
10679 }
10680 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10682 &mut self.abstract_piglin.mob
10683 }
10684 pub fn living_entity(&self) -> &LivingEntityData {
10686 &self.abstract_piglin.mob.living_entity
10687 }
10688 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10690 &mut self.abstract_piglin.mob.living_entity
10691 }
10692 pub fn base(&self) -> &BaseEntityData {
10694 &self.abstract_piglin.mob.living_entity.base
10695 }
10696 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10698 &mut self.abstract_piglin.mob.living_entity.base
10699 }
10700 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10703 let mut values = Vec::new();
10704 self.pack_dirty_into(&mut values);
10705 if values.is_empty() { None } else { Some(values) }
10706 }
10707 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10708 self.abstract_piglin.pack_dirty_into(values);
10709 if self.baby.is_dirty() {
10710 values
10711 .push(DataValue {
10712 index: 17u8,
10713 serializer_id: 8i32,
10714 value: EntityData::Boolean(*self.baby.get()),
10715 });
10716 self.baby.clear_dirty();
10717 }
10718 if self.is_charging_crossbow.is_dirty() {
10719 values
10720 .push(DataValue {
10721 index: 18u8,
10722 serializer_id: 8i32,
10723 value: EntityData::Boolean(*self.is_charging_crossbow.get()),
10724 });
10725 self.is_charging_crossbow.clear_dirty();
10726 }
10727 if self.is_dancing.is_dirty() {
10728 values
10729 .push(DataValue {
10730 index: 19u8,
10731 serializer_id: 8i32,
10732 value: EntityData::Boolean(*self.is_dancing.get()),
10733 });
10734 self.is_dancing.clear_dirty();
10735 }
10736 }
10737 pub fn pack_all(&self) -> Vec<DataValue> {
10739 let mut values = Vec::new();
10740 self.pack_all_into(&mut values);
10741 values
10742 }
10743 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10744 self.abstract_piglin.pack_all_into(values);
10745 if !self.baby.is_default() {
10746 values
10747 .push(DataValue {
10748 index: 17u8,
10749 serializer_id: 8i32,
10750 value: EntityData::Boolean(*self.baby.get()),
10751 });
10752 }
10753 if !self.is_charging_crossbow.is_default() {
10754 values
10755 .push(DataValue {
10756 index: 18u8,
10757 serializer_id: 8i32,
10758 value: EntityData::Boolean(*self.is_charging_crossbow.get()),
10759 });
10760 }
10761 if !self.is_dancing.is_default() {
10762 values
10763 .push(DataValue {
10764 index: 19u8,
10765 serializer_id: 8i32,
10766 value: EntityData::Boolean(*self.is_dancing.get()),
10767 });
10768 }
10769 }
10770 pub fn is_dirty(&self) -> bool {
10772 self.abstract_piglin.is_dirty() || self.baby.is_dirty()
10773 || self.is_charging_crossbow.is_dirty() || self.is_dancing.is_dirty()
10774 }
10775}
10776impl Default for PiglinEntityData {
10777 fn default() -> Self {
10778 Self::new()
10779 }
10780}
10781impl VanillaEntityData for PiglinEntityData {
10782 fn base(&self) -> &BaseEntityData {
10783 PiglinEntityData::base(self)
10784 }
10785 fn base_mut(&mut self) -> &mut BaseEntityData {
10786 PiglinEntityData::base_mut(self)
10787 }
10788 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10789 PiglinEntityData::pack_dirty(self)
10790 }
10791 fn pack_all(&self) -> Vec<DataValue> {
10792 PiglinEntityData::pack_all(self)
10793 }
10794 fn is_dirty(&self) -> bool {
10795 PiglinEntityData::is_dirty(self)
10796 }
10797}
10798impl VanillaLivingEntityData for PiglinEntityData {
10799 fn living_entity(&self) -> &LivingEntityData {
10800 PiglinEntityData::living_entity(self)
10801 }
10802 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10803 PiglinEntityData::living_entity_mut(self)
10804 }
10805}
10806#[derive(Debug, Clone)]
10808pub struct PillagerEntityData {
10809 pub raider: RaiderEntityData,
10810 pub is_charging_crossbow: SyncedValue<bool>,
10811}
10812impl PillagerEntityData {
10813 pub fn new() -> Self {
10815 Self {
10816 raider: RaiderEntityData::new(),
10817 is_charging_crossbow: SyncedValue::new(false),
10818 }
10819 }
10820 pub fn pillager(&self) -> &PillagerEntityData {
10822 self
10823 }
10824 pub fn pillager_mut(&mut self) -> &mut PillagerEntityData {
10826 self
10827 }
10828 pub fn raider(&self) -> &RaiderEntityData {
10830 &self.raider
10831 }
10832 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
10834 &mut self.raider
10835 }
10836 pub fn mob(&self) -> &MobEntityData {
10838 &self.raider.mob
10839 }
10840 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10842 &mut self.raider.mob
10843 }
10844 pub fn living_entity(&self) -> &LivingEntityData {
10846 &self.raider.mob.living_entity
10847 }
10848 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10850 &mut self.raider.mob.living_entity
10851 }
10852 pub fn base(&self) -> &BaseEntityData {
10854 &self.raider.mob.living_entity.base
10855 }
10856 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10858 &mut self.raider.mob.living_entity.base
10859 }
10860 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10863 let mut values = Vec::new();
10864 self.pack_dirty_into(&mut values);
10865 if values.is_empty() { None } else { Some(values) }
10866 }
10867 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10868 self.raider.pack_dirty_into(values);
10869 if self.is_charging_crossbow.is_dirty() {
10870 values
10871 .push(DataValue {
10872 index: 17u8,
10873 serializer_id: 8i32,
10874 value: EntityData::Boolean(*self.is_charging_crossbow.get()),
10875 });
10876 self.is_charging_crossbow.clear_dirty();
10877 }
10878 }
10879 pub fn pack_all(&self) -> Vec<DataValue> {
10881 let mut values = Vec::new();
10882 self.pack_all_into(&mut values);
10883 values
10884 }
10885 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
10886 self.raider.pack_all_into(values);
10887 if !self.is_charging_crossbow.is_default() {
10888 values
10889 .push(DataValue {
10890 index: 17u8,
10891 serializer_id: 8i32,
10892 value: EntityData::Boolean(*self.is_charging_crossbow.get()),
10893 });
10894 }
10895 }
10896 pub fn is_dirty(&self) -> bool {
10898 self.raider.is_dirty() || self.is_charging_crossbow.is_dirty()
10899 }
10900}
10901impl Default for PillagerEntityData {
10902 fn default() -> Self {
10903 Self::new()
10904 }
10905}
10906impl VanillaEntityData for PillagerEntityData {
10907 fn base(&self) -> &BaseEntityData {
10908 PillagerEntityData::base(self)
10909 }
10910 fn base_mut(&mut self) -> &mut BaseEntityData {
10911 PillagerEntityData::base_mut(self)
10912 }
10913 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10914 PillagerEntityData::pack_dirty(self)
10915 }
10916 fn pack_all(&self) -> Vec<DataValue> {
10917 PillagerEntityData::pack_all(self)
10918 }
10919 fn is_dirty(&self) -> bool {
10920 PillagerEntityData::is_dirty(self)
10921 }
10922}
10923impl VanillaLivingEntityData for PillagerEntityData {
10924 fn living_entity(&self) -> &LivingEntityData {
10925 PillagerEntityData::living_entity(self)
10926 }
10927 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10928 PillagerEntityData::living_entity_mut(self)
10929 }
10930}
10931#[derive(Debug, Clone)]
10933pub struct PolarBearEntityData {
10934 pub ageable_mob: AgeableMobEntityData,
10935 pub standing: SyncedValue<bool>,
10936}
10937impl PolarBearEntityData {
10938 pub fn new() -> Self {
10940 Self {
10941 ageable_mob: AgeableMobEntityData::new(),
10942 standing: SyncedValue::new(false),
10943 }
10944 }
10945 pub fn polar_bear(&self) -> &PolarBearEntityData {
10947 self
10948 }
10949 pub fn polar_bear_mut(&mut self) -> &mut PolarBearEntityData {
10951 self
10952 }
10953 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
10955 &self.ageable_mob
10956 }
10957 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
10959 &mut self.ageable_mob
10960 }
10961 pub fn mob(&self) -> &MobEntityData {
10963 &self.ageable_mob.mob
10964 }
10965 pub fn mob_mut(&mut self) -> &mut MobEntityData {
10967 &mut self.ageable_mob.mob
10968 }
10969 pub fn living_entity(&self) -> &LivingEntityData {
10971 &self.ageable_mob.mob.living_entity
10972 }
10973 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
10975 &mut self.ageable_mob.mob.living_entity
10976 }
10977 pub fn base(&self) -> &BaseEntityData {
10979 &self.ageable_mob.mob.living_entity.base
10980 }
10981 pub fn base_mut(&mut self) -> &mut BaseEntityData {
10983 &mut self.ageable_mob.mob.living_entity.base
10984 }
10985 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
10988 let mut values = Vec::new();
10989 self.pack_dirty_into(&mut values);
10990 if values.is_empty() { None } else { Some(values) }
10991 }
10992 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
10993 self.ageable_mob.pack_dirty_into(values);
10994 if self.standing.is_dirty() {
10995 values
10996 .push(DataValue {
10997 index: 18u8,
10998 serializer_id: 8i32,
10999 value: EntityData::Boolean(*self.standing.get()),
11000 });
11001 self.standing.clear_dirty();
11002 }
11003 }
11004 pub fn pack_all(&self) -> Vec<DataValue> {
11006 let mut values = Vec::new();
11007 self.pack_all_into(&mut values);
11008 values
11009 }
11010 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11011 self.ageable_mob.pack_all_into(values);
11012 if !self.standing.is_default() {
11013 values
11014 .push(DataValue {
11015 index: 18u8,
11016 serializer_id: 8i32,
11017 value: EntityData::Boolean(*self.standing.get()),
11018 });
11019 }
11020 }
11021 pub fn is_dirty(&self) -> bool {
11023 self.ageable_mob.is_dirty() || self.standing.is_dirty()
11024 }
11025}
11026impl Default for PolarBearEntityData {
11027 fn default() -> Self {
11028 Self::new()
11029 }
11030}
11031impl VanillaEntityData for PolarBearEntityData {
11032 fn base(&self) -> &BaseEntityData {
11033 PolarBearEntityData::base(self)
11034 }
11035 fn base_mut(&mut self) -> &mut BaseEntityData {
11036 PolarBearEntityData::base_mut(self)
11037 }
11038 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11039 PolarBearEntityData::pack_dirty(self)
11040 }
11041 fn pack_all(&self) -> Vec<DataValue> {
11042 PolarBearEntityData::pack_all(self)
11043 }
11044 fn is_dirty(&self) -> bool {
11045 PolarBearEntityData::is_dirty(self)
11046 }
11047}
11048impl VanillaLivingEntityData for PolarBearEntityData {
11049 fn living_entity(&self) -> &LivingEntityData {
11050 PolarBearEntityData::living_entity(self)
11051 }
11052 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11053 PolarBearEntityData::living_entity_mut(self)
11054 }
11055}
11056#[derive(Debug, Clone)]
11058pub struct PufferfishEntityData {
11059 pub abstract_fish: AbstractFishEntityData,
11060 pub puff_state: SyncedValue<i32>,
11061}
11062impl PufferfishEntityData {
11063 pub fn new() -> Self {
11065 Self {
11066 abstract_fish: AbstractFishEntityData::new(),
11067 puff_state: SyncedValue::new(0i32),
11068 }
11069 }
11070 pub fn pufferfish(&self) -> &PufferfishEntityData {
11072 self
11073 }
11074 pub fn pufferfish_mut(&mut self) -> &mut PufferfishEntityData {
11076 self
11077 }
11078 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
11080 &self.abstract_fish
11081 }
11082 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
11084 &mut self.abstract_fish
11085 }
11086 pub fn mob(&self) -> &MobEntityData {
11088 &self.abstract_fish.mob
11089 }
11090 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11092 &mut self.abstract_fish.mob
11093 }
11094 pub fn living_entity(&self) -> &LivingEntityData {
11096 &self.abstract_fish.mob.living_entity
11097 }
11098 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11100 &mut self.abstract_fish.mob.living_entity
11101 }
11102 pub fn base(&self) -> &BaseEntityData {
11104 &self.abstract_fish.mob.living_entity.base
11105 }
11106 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11108 &mut self.abstract_fish.mob.living_entity.base
11109 }
11110 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11113 let mut values = Vec::new();
11114 self.pack_dirty_into(&mut values);
11115 if values.is_empty() { None } else { Some(values) }
11116 }
11117 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11118 self.abstract_fish.pack_dirty_into(values);
11119 if self.puff_state.is_dirty() {
11120 values
11121 .push(DataValue {
11122 index: 17u8,
11123 serializer_id: 1i32,
11124 value: EntityData::Int(*self.puff_state.get()),
11125 });
11126 self.puff_state.clear_dirty();
11127 }
11128 }
11129 pub fn pack_all(&self) -> Vec<DataValue> {
11131 let mut values = Vec::new();
11132 self.pack_all_into(&mut values);
11133 values
11134 }
11135 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11136 self.abstract_fish.pack_all_into(values);
11137 if !self.puff_state.is_default() {
11138 values
11139 .push(DataValue {
11140 index: 17u8,
11141 serializer_id: 1i32,
11142 value: EntityData::Int(*self.puff_state.get()),
11143 });
11144 }
11145 }
11146 pub fn is_dirty(&self) -> bool {
11148 self.abstract_fish.is_dirty() || self.puff_state.is_dirty()
11149 }
11150}
11151impl Default for PufferfishEntityData {
11152 fn default() -> Self {
11153 Self::new()
11154 }
11155}
11156impl VanillaEntityData for PufferfishEntityData {
11157 fn base(&self) -> &BaseEntityData {
11158 PufferfishEntityData::base(self)
11159 }
11160 fn base_mut(&mut self) -> &mut BaseEntityData {
11161 PufferfishEntityData::base_mut(self)
11162 }
11163 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11164 PufferfishEntityData::pack_dirty(self)
11165 }
11166 fn pack_all(&self) -> Vec<DataValue> {
11167 PufferfishEntityData::pack_all(self)
11168 }
11169 fn is_dirty(&self) -> bool {
11170 PufferfishEntityData::is_dirty(self)
11171 }
11172}
11173impl VanillaLivingEntityData for PufferfishEntityData {
11174 fn living_entity(&self) -> &LivingEntityData {
11175 PufferfishEntityData::living_entity(self)
11176 }
11177 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11178 PufferfishEntityData::living_entity_mut(self)
11179 }
11180}
11181#[derive(Debug, Clone)]
11183pub struct RabbitEntityData {
11184 pub ageable_mob: AgeableMobEntityData,
11185 pub variant_type: SyncedValue<i32>,
11186}
11187impl RabbitEntityData {
11188 pub fn new() -> Self {
11190 Self {
11191 ageable_mob: AgeableMobEntityData::new(),
11192 variant_type: SyncedValue::new(0i32),
11193 }
11194 }
11195 pub fn rabbit(&self) -> &RabbitEntityData {
11197 self
11198 }
11199 pub fn rabbit_mut(&mut self) -> &mut RabbitEntityData {
11201 self
11202 }
11203 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
11205 &self.ageable_mob
11206 }
11207 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
11209 &mut self.ageable_mob
11210 }
11211 pub fn mob(&self) -> &MobEntityData {
11213 &self.ageable_mob.mob
11214 }
11215 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11217 &mut self.ageable_mob.mob
11218 }
11219 pub fn living_entity(&self) -> &LivingEntityData {
11221 &self.ageable_mob.mob.living_entity
11222 }
11223 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11225 &mut self.ageable_mob.mob.living_entity
11226 }
11227 pub fn base(&self) -> &BaseEntityData {
11229 &self.ageable_mob.mob.living_entity.base
11230 }
11231 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11233 &mut self.ageable_mob.mob.living_entity.base
11234 }
11235 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11238 let mut values = Vec::new();
11239 self.pack_dirty_into(&mut values);
11240 if values.is_empty() { None } else { Some(values) }
11241 }
11242 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11243 self.ageable_mob.pack_dirty_into(values);
11244 if self.variant_type.is_dirty() {
11245 values
11246 .push(DataValue {
11247 index: 18u8,
11248 serializer_id: 1i32,
11249 value: EntityData::Int(*self.variant_type.get()),
11250 });
11251 self.variant_type.clear_dirty();
11252 }
11253 }
11254 pub fn pack_all(&self) -> Vec<DataValue> {
11256 let mut values = Vec::new();
11257 self.pack_all_into(&mut values);
11258 values
11259 }
11260 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11261 self.ageable_mob.pack_all_into(values);
11262 if !self.variant_type.is_default() {
11263 values
11264 .push(DataValue {
11265 index: 18u8,
11266 serializer_id: 1i32,
11267 value: EntityData::Int(*self.variant_type.get()),
11268 });
11269 }
11270 }
11271 pub fn is_dirty(&self) -> bool {
11273 self.ageable_mob.is_dirty() || self.variant_type.is_dirty()
11274 }
11275}
11276impl Default for RabbitEntityData {
11277 fn default() -> Self {
11278 Self::new()
11279 }
11280}
11281impl VanillaEntityData for RabbitEntityData {
11282 fn base(&self) -> &BaseEntityData {
11283 RabbitEntityData::base(self)
11284 }
11285 fn base_mut(&mut self) -> &mut BaseEntityData {
11286 RabbitEntityData::base_mut(self)
11287 }
11288 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11289 RabbitEntityData::pack_dirty(self)
11290 }
11291 fn pack_all(&self) -> Vec<DataValue> {
11292 RabbitEntityData::pack_all(self)
11293 }
11294 fn is_dirty(&self) -> bool {
11295 RabbitEntityData::is_dirty(self)
11296 }
11297}
11298impl VanillaLivingEntityData for RabbitEntityData {
11299 fn living_entity(&self) -> &LivingEntityData {
11300 RabbitEntityData::living_entity(self)
11301 }
11302 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11303 RabbitEntityData::living_entity_mut(self)
11304 }
11305}
11306#[derive(Debug, Clone)]
11308pub struct SalmonEntityData {
11309 pub abstract_fish: AbstractFishEntityData,
11310 pub variant_type: SyncedValue<i32>,
11311}
11312impl SalmonEntityData {
11313 pub fn new() -> Self {
11315 Self {
11316 abstract_fish: AbstractFishEntityData::new(),
11317 variant_type: SyncedValue::new(1i32),
11318 }
11319 }
11320 pub fn salmon(&self) -> &SalmonEntityData {
11322 self
11323 }
11324 pub fn salmon_mut(&mut self) -> &mut SalmonEntityData {
11326 self
11327 }
11328 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
11330 &self.abstract_fish
11331 }
11332 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
11334 &mut self.abstract_fish
11335 }
11336 pub fn mob(&self) -> &MobEntityData {
11338 &self.abstract_fish.mob
11339 }
11340 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11342 &mut self.abstract_fish.mob
11343 }
11344 pub fn living_entity(&self) -> &LivingEntityData {
11346 &self.abstract_fish.mob.living_entity
11347 }
11348 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11350 &mut self.abstract_fish.mob.living_entity
11351 }
11352 pub fn base(&self) -> &BaseEntityData {
11354 &self.abstract_fish.mob.living_entity.base
11355 }
11356 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11358 &mut self.abstract_fish.mob.living_entity.base
11359 }
11360 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11363 let mut values = Vec::new();
11364 self.pack_dirty_into(&mut values);
11365 if values.is_empty() { None } else { Some(values) }
11366 }
11367 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11368 self.abstract_fish.pack_dirty_into(values);
11369 if self.variant_type.is_dirty() {
11370 values
11371 .push(DataValue {
11372 index: 17u8,
11373 serializer_id: 1i32,
11374 value: EntityData::Int(*self.variant_type.get()),
11375 });
11376 self.variant_type.clear_dirty();
11377 }
11378 }
11379 pub fn pack_all(&self) -> Vec<DataValue> {
11381 let mut values = Vec::new();
11382 self.pack_all_into(&mut values);
11383 values
11384 }
11385 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11386 self.abstract_fish.pack_all_into(values);
11387 if !self.variant_type.is_default() {
11388 values
11389 .push(DataValue {
11390 index: 17u8,
11391 serializer_id: 1i32,
11392 value: EntityData::Int(*self.variant_type.get()),
11393 });
11394 }
11395 }
11396 pub fn is_dirty(&self) -> bool {
11398 self.abstract_fish.is_dirty() || self.variant_type.is_dirty()
11399 }
11400}
11401impl Default for SalmonEntityData {
11402 fn default() -> Self {
11403 Self::new()
11404 }
11405}
11406impl VanillaEntityData for SalmonEntityData {
11407 fn base(&self) -> &BaseEntityData {
11408 SalmonEntityData::base(self)
11409 }
11410 fn base_mut(&mut self) -> &mut BaseEntityData {
11411 SalmonEntityData::base_mut(self)
11412 }
11413 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11414 SalmonEntityData::pack_dirty(self)
11415 }
11416 fn pack_all(&self) -> Vec<DataValue> {
11417 SalmonEntityData::pack_all(self)
11418 }
11419 fn is_dirty(&self) -> bool {
11420 SalmonEntityData::is_dirty(self)
11421 }
11422}
11423impl VanillaLivingEntityData for SalmonEntityData {
11424 fn living_entity(&self) -> &LivingEntityData {
11425 SalmonEntityData::living_entity(self)
11426 }
11427 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11428 SalmonEntityData::living_entity_mut(self)
11429 }
11430}
11431#[derive(Debug, Clone)]
11433pub struct SheepEntityData {
11434 pub ageable_mob: AgeableMobEntityData,
11435 pub wool: SyncedValue<i8>,
11436}
11437impl SheepEntityData {
11438 pub fn new() -> Self {
11440 Self {
11441 ageable_mob: AgeableMobEntityData::new(),
11442 wool: SyncedValue::new(0i8),
11443 }
11444 }
11445 pub fn sheep(&self) -> &SheepEntityData {
11447 self
11448 }
11449 pub fn sheep_mut(&mut self) -> &mut SheepEntityData {
11451 self
11452 }
11453 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
11455 &self.ageable_mob
11456 }
11457 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
11459 &mut self.ageable_mob
11460 }
11461 pub fn mob(&self) -> &MobEntityData {
11463 &self.ageable_mob.mob
11464 }
11465 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11467 &mut self.ageable_mob.mob
11468 }
11469 pub fn living_entity(&self) -> &LivingEntityData {
11471 &self.ageable_mob.mob.living_entity
11472 }
11473 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11475 &mut self.ageable_mob.mob.living_entity
11476 }
11477 pub fn base(&self) -> &BaseEntityData {
11479 &self.ageable_mob.mob.living_entity.base
11480 }
11481 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11483 &mut self.ageable_mob.mob.living_entity.base
11484 }
11485 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11488 let mut values = Vec::new();
11489 self.pack_dirty_into(&mut values);
11490 if values.is_empty() { None } else { Some(values) }
11491 }
11492 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11493 self.ageable_mob.pack_dirty_into(values);
11494 if self.wool.is_dirty() {
11495 values
11496 .push(DataValue {
11497 index: 18u8,
11498 serializer_id: 0i32,
11499 value: EntityData::Byte(*self.wool.get()),
11500 });
11501 self.wool.clear_dirty();
11502 }
11503 }
11504 pub fn pack_all(&self) -> Vec<DataValue> {
11506 let mut values = Vec::new();
11507 self.pack_all_into(&mut values);
11508 values
11509 }
11510 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11511 self.ageable_mob.pack_all_into(values);
11512 if !self.wool.is_default() {
11513 values
11514 .push(DataValue {
11515 index: 18u8,
11516 serializer_id: 0i32,
11517 value: EntityData::Byte(*self.wool.get()),
11518 });
11519 }
11520 }
11521 pub fn is_dirty(&self) -> bool {
11523 self.ageable_mob.is_dirty() || self.wool.is_dirty()
11524 }
11525}
11526impl Default for SheepEntityData {
11527 fn default() -> Self {
11528 Self::new()
11529 }
11530}
11531impl VanillaEntityData for SheepEntityData {
11532 fn base(&self) -> &BaseEntityData {
11533 SheepEntityData::base(self)
11534 }
11535 fn base_mut(&mut self) -> &mut BaseEntityData {
11536 SheepEntityData::base_mut(self)
11537 }
11538 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11539 SheepEntityData::pack_dirty(self)
11540 }
11541 fn pack_all(&self) -> Vec<DataValue> {
11542 SheepEntityData::pack_all(self)
11543 }
11544 fn is_dirty(&self) -> bool {
11545 SheepEntityData::is_dirty(self)
11546 }
11547}
11548impl VanillaLivingEntityData for SheepEntityData {
11549 fn living_entity(&self) -> &LivingEntityData {
11550 SheepEntityData::living_entity(self)
11551 }
11552 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11553 SheepEntityData::living_entity_mut(self)
11554 }
11555}
11556#[derive(Debug, Clone)]
11558pub struct ShulkerEntityData {
11559 pub mob: MobEntityData,
11560 pub attach_face: SyncedValue<Direction>,
11561 pub peek: SyncedValue<i8>,
11562 pub color: SyncedValue<i8>,
11563}
11564impl ShulkerEntityData {
11565 pub fn new() -> Self {
11567 Self {
11568 mob: MobEntityData::new(),
11569 attach_face: SyncedValue::new(Direction::Down),
11570 peek: SyncedValue::new(0i8),
11571 color: SyncedValue::new(16i8),
11572 }
11573 }
11574 pub fn shulker(&self) -> &ShulkerEntityData {
11576 self
11577 }
11578 pub fn shulker_mut(&mut self) -> &mut ShulkerEntityData {
11580 self
11581 }
11582 pub fn mob(&self) -> &MobEntityData {
11584 &self.mob
11585 }
11586 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11588 &mut self.mob
11589 }
11590 pub fn living_entity(&self) -> &LivingEntityData {
11592 &self.mob.living_entity
11593 }
11594 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11596 &mut self.mob.living_entity
11597 }
11598 pub fn base(&self) -> &BaseEntityData {
11600 &self.mob.living_entity.base
11601 }
11602 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11604 &mut self.mob.living_entity.base
11605 }
11606 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11609 let mut values = Vec::new();
11610 self.pack_dirty_into(&mut values);
11611 if values.is_empty() { None } else { Some(values) }
11612 }
11613 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11614 self.mob.pack_dirty_into(values);
11615 if self.attach_face.is_dirty() {
11616 values
11617 .push(DataValue {
11618 index: 16u8,
11619 serializer_id: 12i32,
11620 value: EntityData::Direction(*self.attach_face.get()),
11621 });
11622 self.attach_face.clear_dirty();
11623 }
11624 if self.peek.is_dirty() {
11625 values
11626 .push(DataValue {
11627 index: 17u8,
11628 serializer_id: 0i32,
11629 value: EntityData::Byte(*self.peek.get()),
11630 });
11631 self.peek.clear_dirty();
11632 }
11633 if self.color.is_dirty() {
11634 values
11635 .push(DataValue {
11636 index: 18u8,
11637 serializer_id: 0i32,
11638 value: EntityData::Byte(*self.color.get()),
11639 });
11640 self.color.clear_dirty();
11641 }
11642 }
11643 pub fn pack_all(&self) -> Vec<DataValue> {
11645 let mut values = Vec::new();
11646 self.pack_all_into(&mut values);
11647 values
11648 }
11649 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11650 self.mob.pack_all_into(values);
11651 if !self.attach_face.is_default() {
11652 values
11653 .push(DataValue {
11654 index: 16u8,
11655 serializer_id: 12i32,
11656 value: EntityData::Direction(*self.attach_face.get()),
11657 });
11658 }
11659 if !self.peek.is_default() {
11660 values
11661 .push(DataValue {
11662 index: 17u8,
11663 serializer_id: 0i32,
11664 value: EntityData::Byte(*self.peek.get()),
11665 });
11666 }
11667 if !self.color.is_default() {
11668 values
11669 .push(DataValue {
11670 index: 18u8,
11671 serializer_id: 0i32,
11672 value: EntityData::Byte(*self.color.get()),
11673 });
11674 }
11675 }
11676 pub fn is_dirty(&self) -> bool {
11678 self.mob.is_dirty() || self.attach_face.is_dirty() || self.peek.is_dirty()
11679 || self.color.is_dirty()
11680 }
11681}
11682impl Default for ShulkerEntityData {
11683 fn default() -> Self {
11684 Self::new()
11685 }
11686}
11687impl VanillaEntityData for ShulkerEntityData {
11688 fn base(&self) -> &BaseEntityData {
11689 ShulkerEntityData::base(self)
11690 }
11691 fn base_mut(&mut self) -> &mut BaseEntityData {
11692 ShulkerEntityData::base_mut(self)
11693 }
11694 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11695 ShulkerEntityData::pack_dirty(self)
11696 }
11697 fn pack_all(&self) -> Vec<DataValue> {
11698 ShulkerEntityData::pack_all(self)
11699 }
11700 fn is_dirty(&self) -> bool {
11701 ShulkerEntityData::is_dirty(self)
11702 }
11703}
11704impl VanillaLivingEntityData for ShulkerEntityData {
11705 fn living_entity(&self) -> &LivingEntityData {
11706 ShulkerEntityData::living_entity(self)
11707 }
11708 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11709 ShulkerEntityData::living_entity_mut(self)
11710 }
11711}
11712#[derive(Debug, Clone)]
11714pub struct SkeletonEntityData {
11715 pub mob: MobEntityData,
11716 pub stray_conversion: SyncedValue<bool>,
11717}
11718impl SkeletonEntityData {
11719 pub fn new() -> Self {
11721 Self {
11722 mob: MobEntityData::new(),
11723 stray_conversion: SyncedValue::new(false),
11724 }
11725 }
11726 pub fn skeleton(&self) -> &SkeletonEntityData {
11728 self
11729 }
11730 pub fn skeleton_mut(&mut self) -> &mut SkeletonEntityData {
11732 self
11733 }
11734 pub fn mob(&self) -> &MobEntityData {
11736 &self.mob
11737 }
11738 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11740 &mut self.mob
11741 }
11742 pub fn living_entity(&self) -> &LivingEntityData {
11744 &self.mob.living_entity
11745 }
11746 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11748 &mut self.mob.living_entity
11749 }
11750 pub fn base(&self) -> &BaseEntityData {
11752 &self.mob.living_entity.base
11753 }
11754 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11756 &mut self.mob.living_entity.base
11757 }
11758 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11761 let mut values = Vec::new();
11762 self.pack_dirty_into(&mut values);
11763 if values.is_empty() { None } else { Some(values) }
11764 }
11765 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11766 self.mob.pack_dirty_into(values);
11767 if self.stray_conversion.is_dirty() {
11768 values
11769 .push(DataValue {
11770 index: 16u8,
11771 serializer_id: 8i32,
11772 value: EntityData::Boolean(*self.stray_conversion.get()),
11773 });
11774 self.stray_conversion.clear_dirty();
11775 }
11776 }
11777 pub fn pack_all(&self) -> Vec<DataValue> {
11779 let mut values = Vec::new();
11780 self.pack_all_into(&mut values);
11781 values
11782 }
11783 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11784 self.mob.pack_all_into(values);
11785 if !self.stray_conversion.is_default() {
11786 values
11787 .push(DataValue {
11788 index: 16u8,
11789 serializer_id: 8i32,
11790 value: EntityData::Boolean(*self.stray_conversion.get()),
11791 });
11792 }
11793 }
11794 pub fn is_dirty(&self) -> bool {
11796 self.mob.is_dirty() || self.stray_conversion.is_dirty()
11797 }
11798}
11799impl Default for SkeletonEntityData {
11800 fn default() -> Self {
11801 Self::new()
11802 }
11803}
11804impl VanillaEntityData for SkeletonEntityData {
11805 fn base(&self) -> &BaseEntityData {
11806 SkeletonEntityData::base(self)
11807 }
11808 fn base_mut(&mut self) -> &mut BaseEntityData {
11809 SkeletonEntityData::base_mut(self)
11810 }
11811 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11812 SkeletonEntityData::pack_dirty(self)
11813 }
11814 fn pack_all(&self) -> Vec<DataValue> {
11815 SkeletonEntityData::pack_all(self)
11816 }
11817 fn is_dirty(&self) -> bool {
11818 SkeletonEntityData::is_dirty(self)
11819 }
11820}
11821impl VanillaLivingEntityData for SkeletonEntityData {
11822 fn living_entity(&self) -> &LivingEntityData {
11823 SkeletonEntityData::living_entity(self)
11824 }
11825 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11826 SkeletonEntityData::living_entity_mut(self)
11827 }
11828}
11829#[derive(Debug, Clone)]
11831pub struct SnifferEntityData {
11832 pub ageable_mob: AgeableMobEntityData,
11833 pub state: SyncedValue<SnifferState>,
11834 pub drop_seed_at_tick: SyncedValue<i32>,
11835}
11836impl SnifferEntityData {
11837 pub fn new() -> Self {
11839 Self {
11840 ageable_mob: AgeableMobEntityData::new(),
11841 state: SyncedValue::new(SnifferState::Idling),
11842 drop_seed_at_tick: SyncedValue::new(0i32),
11843 }
11844 }
11845 pub fn sniffer(&self) -> &SnifferEntityData {
11847 self
11848 }
11849 pub fn sniffer_mut(&mut self) -> &mut SnifferEntityData {
11851 self
11852 }
11853 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
11855 &self.ageable_mob
11856 }
11857 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
11859 &mut self.ageable_mob
11860 }
11861 pub fn mob(&self) -> &MobEntityData {
11863 &self.ageable_mob.mob
11864 }
11865 pub fn mob_mut(&mut self) -> &mut MobEntityData {
11867 &mut self.ageable_mob.mob
11868 }
11869 pub fn living_entity(&self) -> &LivingEntityData {
11871 &self.ageable_mob.mob.living_entity
11872 }
11873 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11875 &mut self.ageable_mob.mob.living_entity
11876 }
11877 pub fn base(&self) -> &BaseEntityData {
11879 &self.ageable_mob.mob.living_entity.base
11880 }
11881 pub fn base_mut(&mut self) -> &mut BaseEntityData {
11883 &mut self.ageable_mob.mob.living_entity.base
11884 }
11885 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11888 let mut values = Vec::new();
11889 self.pack_dirty_into(&mut values);
11890 if values.is_empty() { None } else { Some(values) }
11891 }
11892 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
11893 self.ageable_mob.pack_dirty_into(values);
11894 if self.state.is_dirty() {
11895 values
11896 .push(DataValue {
11897 index: 18u8,
11898 serializer_id: 35i32,
11899 value: EntityData::SnifferState(*self.state.get()),
11900 });
11901 self.state.clear_dirty();
11902 }
11903 if self.drop_seed_at_tick.is_dirty() {
11904 values
11905 .push(DataValue {
11906 index: 19u8,
11907 serializer_id: 1i32,
11908 value: EntityData::Int(*self.drop_seed_at_tick.get()),
11909 });
11910 self.drop_seed_at_tick.clear_dirty();
11911 }
11912 }
11913 pub fn pack_all(&self) -> Vec<DataValue> {
11915 let mut values = Vec::new();
11916 self.pack_all_into(&mut values);
11917 values
11918 }
11919 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
11920 self.ageable_mob.pack_all_into(values);
11921 if !self.state.is_default() {
11922 values
11923 .push(DataValue {
11924 index: 18u8,
11925 serializer_id: 35i32,
11926 value: EntityData::SnifferState(*self.state.get()),
11927 });
11928 }
11929 if !self.drop_seed_at_tick.is_default() {
11930 values
11931 .push(DataValue {
11932 index: 19u8,
11933 serializer_id: 1i32,
11934 value: EntityData::Int(*self.drop_seed_at_tick.get()),
11935 });
11936 }
11937 }
11938 pub fn is_dirty(&self) -> bool {
11940 self.ageable_mob.is_dirty() || self.state.is_dirty()
11941 || self.drop_seed_at_tick.is_dirty()
11942 }
11943}
11944impl Default for SnifferEntityData {
11945 fn default() -> Self {
11946 Self::new()
11947 }
11948}
11949impl VanillaEntityData for SnifferEntityData {
11950 fn base(&self) -> &BaseEntityData {
11951 SnifferEntityData::base(self)
11952 }
11953 fn base_mut(&mut self) -> &mut BaseEntityData {
11954 SnifferEntityData::base_mut(self)
11955 }
11956 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
11957 SnifferEntityData::pack_dirty(self)
11958 }
11959 fn pack_all(&self) -> Vec<DataValue> {
11960 SnifferEntityData::pack_all(self)
11961 }
11962 fn is_dirty(&self) -> bool {
11963 SnifferEntityData::is_dirty(self)
11964 }
11965}
11966impl VanillaLivingEntityData for SnifferEntityData {
11967 fn living_entity(&self) -> &LivingEntityData {
11968 SnifferEntityData::living_entity(self)
11969 }
11970 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
11971 SnifferEntityData::living_entity_mut(self)
11972 }
11973}
11974#[derive(Debug, Clone)]
11976pub struct SnowGolemEntityData {
11977 pub mob: MobEntityData,
11978 pub pumpkin: SyncedValue<i8>,
11979}
11980impl SnowGolemEntityData {
11981 pub fn new() -> Self {
11983 Self {
11984 mob: MobEntityData::new(),
11985 pumpkin: SyncedValue::new(16i8),
11986 }
11987 }
11988 pub fn snow_golem(&self) -> &SnowGolemEntityData {
11990 self
11991 }
11992 pub fn snow_golem_mut(&mut self) -> &mut SnowGolemEntityData {
11994 self
11995 }
11996 pub fn mob(&self) -> &MobEntityData {
11998 &self.mob
11999 }
12000 pub fn mob_mut(&mut self) -> &mut MobEntityData {
12002 &mut self.mob
12003 }
12004 pub fn living_entity(&self) -> &LivingEntityData {
12006 &self.mob.living_entity
12007 }
12008 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12010 &mut self.mob.living_entity
12011 }
12012 pub fn base(&self) -> &BaseEntityData {
12014 &self.mob.living_entity.base
12015 }
12016 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12018 &mut self.mob.living_entity.base
12019 }
12020 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12023 let mut values = Vec::new();
12024 self.pack_dirty_into(&mut values);
12025 if values.is_empty() { None } else { Some(values) }
12026 }
12027 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12028 self.mob.pack_dirty_into(values);
12029 if self.pumpkin.is_dirty() {
12030 values
12031 .push(DataValue {
12032 index: 16u8,
12033 serializer_id: 0i32,
12034 value: EntityData::Byte(*self.pumpkin.get()),
12035 });
12036 self.pumpkin.clear_dirty();
12037 }
12038 }
12039 pub fn pack_all(&self) -> Vec<DataValue> {
12041 let mut values = Vec::new();
12042 self.pack_all_into(&mut values);
12043 values
12044 }
12045 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12046 self.mob.pack_all_into(values);
12047 if !self.pumpkin.is_default() {
12048 values
12049 .push(DataValue {
12050 index: 16u8,
12051 serializer_id: 0i32,
12052 value: EntityData::Byte(*self.pumpkin.get()),
12053 });
12054 }
12055 }
12056 pub fn is_dirty(&self) -> bool {
12058 self.mob.is_dirty() || self.pumpkin.is_dirty()
12059 }
12060}
12061impl Default for SnowGolemEntityData {
12062 fn default() -> Self {
12063 Self::new()
12064 }
12065}
12066impl VanillaEntityData for SnowGolemEntityData {
12067 fn base(&self) -> &BaseEntityData {
12068 SnowGolemEntityData::base(self)
12069 }
12070 fn base_mut(&mut self) -> &mut BaseEntityData {
12071 SnowGolemEntityData::base_mut(self)
12072 }
12073 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12074 SnowGolemEntityData::pack_dirty(self)
12075 }
12076 fn pack_all(&self) -> Vec<DataValue> {
12077 SnowGolemEntityData::pack_all(self)
12078 }
12079 fn is_dirty(&self) -> bool {
12080 SnowGolemEntityData::is_dirty(self)
12081 }
12082}
12083impl VanillaLivingEntityData for SnowGolemEntityData {
12084 fn living_entity(&self) -> &LivingEntityData {
12085 SnowGolemEntityData::living_entity(self)
12086 }
12087 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12088 SnowGolemEntityData::living_entity_mut(self)
12089 }
12090}
12091#[derive(Debug, Clone)]
12093pub struct StriderEntityData {
12094 pub ageable_mob: AgeableMobEntityData,
12095 pub boost_time: SyncedValue<i32>,
12096 pub suffocating: SyncedValue<bool>,
12097}
12098impl StriderEntityData {
12099 pub fn new() -> Self {
12101 Self {
12102 ageable_mob: AgeableMobEntityData::new(),
12103 boost_time: SyncedValue::new(0i32),
12104 suffocating: SyncedValue::new(false),
12105 }
12106 }
12107 pub fn strider(&self) -> &StriderEntityData {
12109 self
12110 }
12111 pub fn strider_mut(&mut self) -> &mut StriderEntityData {
12113 self
12114 }
12115 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
12117 &self.ageable_mob
12118 }
12119 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
12121 &mut self.ageable_mob
12122 }
12123 pub fn mob(&self) -> &MobEntityData {
12125 &self.ageable_mob.mob
12126 }
12127 pub fn mob_mut(&mut self) -> &mut MobEntityData {
12129 &mut self.ageable_mob.mob
12130 }
12131 pub fn living_entity(&self) -> &LivingEntityData {
12133 &self.ageable_mob.mob.living_entity
12134 }
12135 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12137 &mut self.ageable_mob.mob.living_entity
12138 }
12139 pub fn base(&self) -> &BaseEntityData {
12141 &self.ageable_mob.mob.living_entity.base
12142 }
12143 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12145 &mut self.ageable_mob.mob.living_entity.base
12146 }
12147 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12150 let mut values = Vec::new();
12151 self.pack_dirty_into(&mut values);
12152 if values.is_empty() { None } else { Some(values) }
12153 }
12154 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12155 self.ageable_mob.pack_dirty_into(values);
12156 if self.boost_time.is_dirty() {
12157 values
12158 .push(DataValue {
12159 index: 18u8,
12160 serializer_id: 1i32,
12161 value: EntityData::Int(*self.boost_time.get()),
12162 });
12163 self.boost_time.clear_dirty();
12164 }
12165 if self.suffocating.is_dirty() {
12166 values
12167 .push(DataValue {
12168 index: 19u8,
12169 serializer_id: 8i32,
12170 value: EntityData::Boolean(*self.suffocating.get()),
12171 });
12172 self.suffocating.clear_dirty();
12173 }
12174 }
12175 pub fn pack_all(&self) -> Vec<DataValue> {
12177 let mut values = Vec::new();
12178 self.pack_all_into(&mut values);
12179 values
12180 }
12181 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12182 self.ageable_mob.pack_all_into(values);
12183 if !self.boost_time.is_default() {
12184 values
12185 .push(DataValue {
12186 index: 18u8,
12187 serializer_id: 1i32,
12188 value: EntityData::Int(*self.boost_time.get()),
12189 });
12190 }
12191 if !self.suffocating.is_default() {
12192 values
12193 .push(DataValue {
12194 index: 19u8,
12195 serializer_id: 8i32,
12196 value: EntityData::Boolean(*self.suffocating.get()),
12197 });
12198 }
12199 }
12200 pub fn is_dirty(&self) -> bool {
12202 self.ageable_mob.is_dirty() || self.boost_time.is_dirty()
12203 || self.suffocating.is_dirty()
12204 }
12205}
12206impl Default for StriderEntityData {
12207 fn default() -> Self {
12208 Self::new()
12209 }
12210}
12211impl VanillaEntityData for StriderEntityData {
12212 fn base(&self) -> &BaseEntityData {
12213 StriderEntityData::base(self)
12214 }
12215 fn base_mut(&mut self) -> &mut BaseEntityData {
12216 StriderEntityData::base_mut(self)
12217 }
12218 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12219 StriderEntityData::pack_dirty(self)
12220 }
12221 fn pack_all(&self) -> Vec<DataValue> {
12222 StriderEntityData::pack_all(self)
12223 }
12224 fn is_dirty(&self) -> bool {
12225 StriderEntityData::is_dirty(self)
12226 }
12227}
12228impl VanillaLivingEntityData for StriderEntityData {
12229 fn living_entity(&self) -> &LivingEntityData {
12230 StriderEntityData::living_entity(self)
12231 }
12232 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12233 StriderEntityData::living_entity_mut(self)
12234 }
12235}
12236#[derive(Debug, Clone)]
12238pub struct SulfurCubeEntityData {
12239 pub abstract_cube_mob: AbstractCubeMobEntityData,
12240 pub max_fuse: SyncedValue<i32>,
12241 pub from_bucket: SyncedValue<bool>,
12242}
12243impl SulfurCubeEntityData {
12244 pub fn new() -> Self {
12246 Self {
12247 abstract_cube_mob: AbstractCubeMobEntityData::new(),
12248 max_fuse: SyncedValue::new(-1i32),
12249 from_bucket: SyncedValue::new(false),
12250 }
12251 }
12252 pub fn sulfur_cube(&self) -> &SulfurCubeEntityData {
12254 self
12255 }
12256 pub fn sulfur_cube_mut(&mut self) -> &mut SulfurCubeEntityData {
12258 self
12259 }
12260 pub fn abstract_cube_mob(&self) -> &AbstractCubeMobEntityData {
12262 &self.abstract_cube_mob
12263 }
12264 pub fn abstract_cube_mob_mut(&mut self) -> &mut AbstractCubeMobEntityData {
12266 &mut self.abstract_cube_mob
12267 }
12268 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
12270 &self.abstract_cube_mob.ageable_mob
12271 }
12272 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
12274 &mut self.abstract_cube_mob.ageable_mob
12275 }
12276 pub fn mob(&self) -> &MobEntityData {
12278 &self.abstract_cube_mob.ageable_mob.mob
12279 }
12280 pub fn mob_mut(&mut self) -> &mut MobEntityData {
12282 &mut self.abstract_cube_mob.ageable_mob.mob
12283 }
12284 pub fn living_entity(&self) -> &LivingEntityData {
12286 &self.abstract_cube_mob.ageable_mob.mob.living_entity
12287 }
12288 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12290 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity
12291 }
12292 pub fn base(&self) -> &BaseEntityData {
12294 &self.abstract_cube_mob.ageable_mob.mob.living_entity.base
12295 }
12296 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12298 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity.base
12299 }
12300 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12303 let mut values = Vec::new();
12304 self.pack_dirty_into(&mut values);
12305 if values.is_empty() { None } else { Some(values) }
12306 }
12307 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12308 self.abstract_cube_mob.pack_dirty_into(values);
12309 if self.max_fuse.is_dirty() {
12310 values
12311 .push(DataValue {
12312 index: 19u8,
12313 serializer_id: 1i32,
12314 value: EntityData::Int(*self.max_fuse.get()),
12315 });
12316 self.max_fuse.clear_dirty();
12317 }
12318 if self.from_bucket.is_dirty() {
12319 values
12320 .push(DataValue {
12321 index: 20u8,
12322 serializer_id: 8i32,
12323 value: EntityData::Boolean(*self.from_bucket.get()),
12324 });
12325 self.from_bucket.clear_dirty();
12326 }
12327 }
12328 pub fn pack_all(&self) -> Vec<DataValue> {
12330 let mut values = Vec::new();
12331 self.pack_all_into(&mut values);
12332 values
12333 }
12334 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12335 self.abstract_cube_mob.pack_all_into(values);
12336 if !self.max_fuse.is_default() {
12337 values
12338 .push(DataValue {
12339 index: 19u8,
12340 serializer_id: 1i32,
12341 value: EntityData::Int(*self.max_fuse.get()),
12342 });
12343 }
12344 if !self.from_bucket.is_default() {
12345 values
12346 .push(DataValue {
12347 index: 20u8,
12348 serializer_id: 8i32,
12349 value: EntityData::Boolean(*self.from_bucket.get()),
12350 });
12351 }
12352 }
12353 pub fn is_dirty(&self) -> bool {
12355 self.abstract_cube_mob.is_dirty() || self.max_fuse.is_dirty()
12356 || self.from_bucket.is_dirty()
12357 }
12358}
12359impl Default for SulfurCubeEntityData {
12360 fn default() -> Self {
12361 Self::new()
12362 }
12363}
12364impl VanillaEntityData for SulfurCubeEntityData {
12365 fn base(&self) -> &BaseEntityData {
12366 SulfurCubeEntityData::base(self)
12367 }
12368 fn base_mut(&mut self) -> &mut BaseEntityData {
12369 SulfurCubeEntityData::base_mut(self)
12370 }
12371 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12372 SulfurCubeEntityData::pack_dirty(self)
12373 }
12374 fn pack_all(&self) -> Vec<DataValue> {
12375 SulfurCubeEntityData::pack_all(self)
12376 }
12377 fn is_dirty(&self) -> bool {
12378 SulfurCubeEntityData::is_dirty(self)
12379 }
12380}
12381impl VanillaLivingEntityData for SulfurCubeEntityData {
12382 fn living_entity(&self) -> &LivingEntityData {
12383 SulfurCubeEntityData::living_entity(self)
12384 }
12385 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12386 SulfurCubeEntityData::living_entity_mut(self)
12387 }
12388}
12389#[derive(Debug, Clone)]
12391pub struct TadpoleEntityData {
12392 pub abstract_fish: AbstractFishEntityData,
12393 pub age_locked: SyncedValue<bool>,
12394}
12395impl TadpoleEntityData {
12396 pub fn new() -> Self {
12398 Self {
12399 abstract_fish: AbstractFishEntityData::new(),
12400 age_locked: SyncedValue::new(false),
12401 }
12402 }
12403 pub fn tadpole(&self) -> &TadpoleEntityData {
12405 self
12406 }
12407 pub fn tadpole_mut(&mut self) -> &mut TadpoleEntityData {
12409 self
12410 }
12411 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
12413 &self.abstract_fish
12414 }
12415 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
12417 &mut self.abstract_fish
12418 }
12419 pub fn mob(&self) -> &MobEntityData {
12421 &self.abstract_fish.mob
12422 }
12423 pub fn mob_mut(&mut self) -> &mut MobEntityData {
12425 &mut self.abstract_fish.mob
12426 }
12427 pub fn living_entity(&self) -> &LivingEntityData {
12429 &self.abstract_fish.mob.living_entity
12430 }
12431 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12433 &mut self.abstract_fish.mob.living_entity
12434 }
12435 pub fn base(&self) -> &BaseEntityData {
12437 &self.abstract_fish.mob.living_entity.base
12438 }
12439 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12441 &mut self.abstract_fish.mob.living_entity.base
12442 }
12443 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12446 let mut values = Vec::new();
12447 self.pack_dirty_into(&mut values);
12448 if values.is_empty() { None } else { Some(values) }
12449 }
12450 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12451 self.abstract_fish.pack_dirty_into(values);
12452 if self.age_locked.is_dirty() {
12453 values
12454 .push(DataValue {
12455 index: 17u8,
12456 serializer_id: 8i32,
12457 value: EntityData::Boolean(*self.age_locked.get()),
12458 });
12459 self.age_locked.clear_dirty();
12460 }
12461 }
12462 pub fn pack_all(&self) -> Vec<DataValue> {
12464 let mut values = Vec::new();
12465 self.pack_all_into(&mut values);
12466 values
12467 }
12468 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12469 self.abstract_fish.pack_all_into(values);
12470 if !self.age_locked.is_default() {
12471 values
12472 .push(DataValue {
12473 index: 17u8,
12474 serializer_id: 8i32,
12475 value: EntityData::Boolean(*self.age_locked.get()),
12476 });
12477 }
12478 }
12479 pub fn is_dirty(&self) -> bool {
12481 self.abstract_fish.is_dirty() || self.age_locked.is_dirty()
12482 }
12483}
12484impl Default for TadpoleEntityData {
12485 fn default() -> Self {
12486 Self::new()
12487 }
12488}
12489impl VanillaEntityData for TadpoleEntityData {
12490 fn base(&self) -> &BaseEntityData {
12491 TadpoleEntityData::base(self)
12492 }
12493 fn base_mut(&mut self) -> &mut BaseEntityData {
12494 TadpoleEntityData::base_mut(self)
12495 }
12496 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12497 TadpoleEntityData::pack_dirty(self)
12498 }
12499 fn pack_all(&self) -> Vec<DataValue> {
12500 TadpoleEntityData::pack_all(self)
12501 }
12502 fn is_dirty(&self) -> bool {
12503 TadpoleEntityData::is_dirty(self)
12504 }
12505}
12506impl VanillaLivingEntityData for TadpoleEntityData {
12507 fn living_entity(&self) -> &LivingEntityData {
12508 TadpoleEntityData::living_entity(self)
12509 }
12510 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12511 TadpoleEntityData::living_entity_mut(self)
12512 }
12513}
12514#[derive(Debug, Clone)]
12516pub struct TextDisplayEntityData {
12517 pub display: DisplayEntityData,
12518 pub text: SyncedValue<Box<TextComponent>>,
12519 pub line_width: SyncedValue<i32>,
12520 pub background_color: SyncedValue<i32>,
12521 pub text_opacity: SyncedValue<i8>,
12522 pub style_flags: SyncedValue<i8>,
12523}
12524impl TextDisplayEntityData {
12525 pub fn new() -> Self {
12527 Self {
12528 display: DisplayEntityData::new(),
12529 text: SyncedValue::new(Box::new(TextComponent::default())),
12530 line_width: SyncedValue::new(200i32),
12531 background_color: SyncedValue::new(1073741824i32),
12532 text_opacity: SyncedValue::new(-1i8),
12533 style_flags: SyncedValue::new(0i8),
12534 }
12535 }
12536 pub fn text_display(&self) -> &TextDisplayEntityData {
12538 self
12539 }
12540 pub fn text_display_mut(&mut self) -> &mut TextDisplayEntityData {
12542 self
12543 }
12544 pub fn display(&self) -> &DisplayEntityData {
12546 &self.display
12547 }
12548 pub fn display_mut(&mut self) -> &mut DisplayEntityData {
12550 &mut self.display
12551 }
12552 pub fn base(&self) -> &BaseEntityData {
12554 &self.display.base
12555 }
12556 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12558 &mut self.display.base
12559 }
12560 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12563 let mut values = Vec::new();
12564 self.pack_dirty_into(&mut values);
12565 if values.is_empty() { None } else { Some(values) }
12566 }
12567 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12568 self.display.pack_dirty_into(values);
12569 if self.text.is_dirty() {
12570 values
12571 .push(DataValue {
12572 index: 23u8,
12573 serializer_id: 5i32,
12574 value: EntityData::Component(self.text.get().clone()),
12575 });
12576 self.text.clear_dirty();
12577 }
12578 if self.line_width.is_dirty() {
12579 values
12580 .push(DataValue {
12581 index: 24u8,
12582 serializer_id: 1i32,
12583 value: EntityData::Int(*self.line_width.get()),
12584 });
12585 self.line_width.clear_dirty();
12586 }
12587 if self.background_color.is_dirty() {
12588 values
12589 .push(DataValue {
12590 index: 25u8,
12591 serializer_id: 1i32,
12592 value: EntityData::Int(*self.background_color.get()),
12593 });
12594 self.background_color.clear_dirty();
12595 }
12596 if self.text_opacity.is_dirty() {
12597 values
12598 .push(DataValue {
12599 index: 26u8,
12600 serializer_id: 0i32,
12601 value: EntityData::Byte(*self.text_opacity.get()),
12602 });
12603 self.text_opacity.clear_dirty();
12604 }
12605 if self.style_flags.is_dirty() {
12606 values
12607 .push(DataValue {
12608 index: 27u8,
12609 serializer_id: 0i32,
12610 value: EntityData::Byte(*self.style_flags.get()),
12611 });
12612 self.style_flags.clear_dirty();
12613 }
12614 }
12615 pub fn pack_all(&self) -> Vec<DataValue> {
12617 let mut values = Vec::new();
12618 self.pack_all_into(&mut values);
12619 values
12620 }
12621 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12622 self.display.pack_all_into(values);
12623 if !self.text.is_default() {
12624 values
12625 .push(DataValue {
12626 index: 23u8,
12627 serializer_id: 5i32,
12628 value: EntityData::Component(self.text.get().clone()),
12629 });
12630 }
12631 if !self.line_width.is_default() {
12632 values
12633 .push(DataValue {
12634 index: 24u8,
12635 serializer_id: 1i32,
12636 value: EntityData::Int(*self.line_width.get()),
12637 });
12638 }
12639 if !self.background_color.is_default() {
12640 values
12641 .push(DataValue {
12642 index: 25u8,
12643 serializer_id: 1i32,
12644 value: EntityData::Int(*self.background_color.get()),
12645 });
12646 }
12647 if !self.text_opacity.is_default() {
12648 values
12649 .push(DataValue {
12650 index: 26u8,
12651 serializer_id: 0i32,
12652 value: EntityData::Byte(*self.text_opacity.get()),
12653 });
12654 }
12655 if !self.style_flags.is_default() {
12656 values
12657 .push(DataValue {
12658 index: 27u8,
12659 serializer_id: 0i32,
12660 value: EntityData::Byte(*self.style_flags.get()),
12661 });
12662 }
12663 }
12664 pub fn is_dirty(&self) -> bool {
12666 self.display.is_dirty() || self.text.is_dirty() || self.line_width.is_dirty()
12667 || self.background_color.is_dirty() || self.text_opacity.is_dirty()
12668 || self.style_flags.is_dirty()
12669 }
12670}
12671impl Default for TextDisplayEntityData {
12672 fn default() -> Self {
12673 Self::new()
12674 }
12675}
12676impl VanillaEntityData for TextDisplayEntityData {
12677 fn base(&self) -> &BaseEntityData {
12678 TextDisplayEntityData::base(self)
12679 }
12680 fn base_mut(&mut self) -> &mut BaseEntityData {
12681 TextDisplayEntityData::base_mut(self)
12682 }
12683 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12684 TextDisplayEntityData::pack_dirty(self)
12685 }
12686 fn pack_all(&self) -> Vec<DataValue> {
12687 TextDisplayEntityData::pack_all(self)
12688 }
12689 fn is_dirty(&self) -> bool {
12690 TextDisplayEntityData::is_dirty(self)
12691 }
12692}
12693#[derive(Debug, Clone)]
12695pub struct PrimedTntEntityData {
12696 pub base: BaseEntityData,
12697 pub fuse: SyncedValue<i32>,
12698 pub block_state: SyncedValue<BlockStateId>,
12699}
12700impl PrimedTntEntityData {
12701 pub fn new() -> Self {
12703 Self {
12704 base: BaseEntityData::new(),
12705 fuse: SyncedValue::new(80i32),
12706 block_state: SyncedValue::new(crate::vanilla_blocks::TNT.default_state()),
12707 }
12708 }
12709 pub fn primed_tnt(&self) -> &PrimedTntEntityData {
12711 self
12712 }
12713 pub fn primed_tnt_mut(&mut self) -> &mut PrimedTntEntityData {
12715 self
12716 }
12717 pub fn base(&self) -> &BaseEntityData {
12719 &self.base
12720 }
12721 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12723 &mut self.base
12724 }
12725 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12728 let mut values = Vec::new();
12729 self.pack_dirty_into(&mut values);
12730 if values.is_empty() { None } else { Some(values) }
12731 }
12732 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12733 self.base.pack_dirty_into(values);
12734 if self.fuse.is_dirty() {
12735 values
12736 .push(DataValue {
12737 index: 8u8,
12738 serializer_id: 1i32,
12739 value: EntityData::Int(*self.fuse.get()),
12740 });
12741 self.fuse.clear_dirty();
12742 }
12743 if self.block_state.is_dirty() {
12744 values
12745 .push(DataValue {
12746 index: 9u8,
12747 serializer_id: 14i32,
12748 value: EntityData::BlockState(*self.block_state.get()),
12749 });
12750 self.block_state.clear_dirty();
12751 }
12752 }
12753 pub fn pack_all(&self) -> Vec<DataValue> {
12755 let mut values = Vec::new();
12756 self.pack_all_into(&mut values);
12757 values
12758 }
12759 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12760 self.base.pack_all_into(values);
12761 if !self.fuse.is_default() {
12762 values
12763 .push(DataValue {
12764 index: 8u8,
12765 serializer_id: 1i32,
12766 value: EntityData::Int(*self.fuse.get()),
12767 });
12768 }
12769 if !self.block_state.is_default() {
12770 values
12771 .push(DataValue {
12772 index: 9u8,
12773 serializer_id: 14i32,
12774 value: EntityData::BlockState(*self.block_state.get()),
12775 });
12776 }
12777 }
12778 pub fn is_dirty(&self) -> bool {
12780 self.base.is_dirty() || self.fuse.is_dirty() || self.block_state.is_dirty()
12781 }
12782}
12783impl Default for PrimedTntEntityData {
12784 fn default() -> Self {
12785 Self::new()
12786 }
12787}
12788impl VanillaEntityData for PrimedTntEntityData {
12789 fn base(&self) -> &BaseEntityData {
12790 PrimedTntEntityData::base(self)
12791 }
12792 fn base_mut(&mut self) -> &mut BaseEntityData {
12793 PrimedTntEntityData::base_mut(self)
12794 }
12795 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12796 PrimedTntEntityData::pack_dirty(self)
12797 }
12798 fn pack_all(&self) -> Vec<DataValue> {
12799 PrimedTntEntityData::pack_all(self)
12800 }
12801 fn is_dirty(&self) -> bool {
12802 PrimedTntEntityData::is_dirty(self)
12803 }
12804}
12805#[derive(Debug, Clone)]
12807pub struct ThrownTridentEntityData {
12808 pub abstract_arrow: AbstractArrowEntityData,
12809 pub id_loyalty: SyncedValue<i8>,
12810 pub id_foil: SyncedValue<bool>,
12811}
12812impl ThrownTridentEntityData {
12813 pub fn new() -> Self {
12815 Self {
12816 abstract_arrow: AbstractArrowEntityData::new(),
12817 id_loyalty: SyncedValue::new(0i8),
12818 id_foil: SyncedValue::new(false),
12819 }
12820 }
12821 pub fn thrown_trident(&self) -> &ThrownTridentEntityData {
12823 self
12824 }
12825 pub fn thrown_trident_mut(&mut self) -> &mut ThrownTridentEntityData {
12827 self
12828 }
12829 pub fn abstract_arrow(&self) -> &AbstractArrowEntityData {
12831 &self.abstract_arrow
12832 }
12833 pub fn abstract_arrow_mut(&mut self) -> &mut AbstractArrowEntityData {
12835 &mut self.abstract_arrow
12836 }
12837 pub fn base(&self) -> &BaseEntityData {
12839 &self.abstract_arrow.base
12840 }
12841 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12843 &mut self.abstract_arrow.base
12844 }
12845 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12848 let mut values = Vec::new();
12849 self.pack_dirty_into(&mut values);
12850 if values.is_empty() { None } else { Some(values) }
12851 }
12852 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12853 self.abstract_arrow.pack_dirty_into(values);
12854 if self.id_loyalty.is_dirty() {
12855 values
12856 .push(DataValue {
12857 index: 11u8,
12858 serializer_id: 0i32,
12859 value: EntityData::Byte(*self.id_loyalty.get()),
12860 });
12861 self.id_loyalty.clear_dirty();
12862 }
12863 if self.id_foil.is_dirty() {
12864 values
12865 .push(DataValue {
12866 index: 12u8,
12867 serializer_id: 8i32,
12868 value: EntityData::Boolean(*self.id_foil.get()),
12869 });
12870 self.id_foil.clear_dirty();
12871 }
12872 }
12873 pub fn pack_all(&self) -> Vec<DataValue> {
12875 let mut values = Vec::new();
12876 self.pack_all_into(&mut values);
12877 values
12878 }
12879 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
12880 self.abstract_arrow.pack_all_into(values);
12881 if !self.id_loyalty.is_default() {
12882 values
12883 .push(DataValue {
12884 index: 11u8,
12885 serializer_id: 0i32,
12886 value: EntityData::Byte(*self.id_loyalty.get()),
12887 });
12888 }
12889 if !self.id_foil.is_default() {
12890 values
12891 .push(DataValue {
12892 index: 12u8,
12893 serializer_id: 8i32,
12894 value: EntityData::Boolean(*self.id_foil.get()),
12895 });
12896 }
12897 }
12898 pub fn is_dirty(&self) -> bool {
12900 self.abstract_arrow.is_dirty() || self.id_loyalty.is_dirty()
12901 || self.id_foil.is_dirty()
12902 }
12903}
12904impl Default for ThrownTridentEntityData {
12905 fn default() -> Self {
12906 Self::new()
12907 }
12908}
12909impl VanillaEntityData for ThrownTridentEntityData {
12910 fn base(&self) -> &BaseEntityData {
12911 ThrownTridentEntityData::base(self)
12912 }
12913 fn base_mut(&mut self) -> &mut BaseEntityData {
12914 ThrownTridentEntityData::base_mut(self)
12915 }
12916 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12917 ThrownTridentEntityData::pack_dirty(self)
12918 }
12919 fn pack_all(&self) -> Vec<DataValue> {
12920 ThrownTridentEntityData::pack_all(self)
12921 }
12922 fn is_dirty(&self) -> bool {
12923 ThrownTridentEntityData::is_dirty(self)
12924 }
12925}
12926#[derive(Debug, Clone)]
12928pub struct TropicalFishEntityData {
12929 pub abstract_fish: AbstractFishEntityData,
12930 pub id_type_variant: SyncedValue<i32>,
12931}
12932impl TropicalFishEntityData {
12933 pub fn new() -> Self {
12935 Self {
12936 abstract_fish: AbstractFishEntityData::new(),
12937 id_type_variant: SyncedValue::new(0i32),
12938 }
12939 }
12940 pub fn tropical_fish(&self) -> &TropicalFishEntityData {
12942 self
12943 }
12944 pub fn tropical_fish_mut(&mut self) -> &mut TropicalFishEntityData {
12946 self
12947 }
12948 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
12950 &self.abstract_fish
12951 }
12952 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
12954 &mut self.abstract_fish
12955 }
12956 pub fn mob(&self) -> &MobEntityData {
12958 &self.abstract_fish.mob
12959 }
12960 pub fn mob_mut(&mut self) -> &mut MobEntityData {
12962 &mut self.abstract_fish.mob
12963 }
12964 pub fn living_entity(&self) -> &LivingEntityData {
12966 &self.abstract_fish.mob.living_entity
12967 }
12968 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
12970 &mut self.abstract_fish.mob.living_entity
12971 }
12972 pub fn base(&self) -> &BaseEntityData {
12974 &self.abstract_fish.mob.living_entity.base
12975 }
12976 pub fn base_mut(&mut self) -> &mut BaseEntityData {
12978 &mut self.abstract_fish.mob.living_entity.base
12979 }
12980 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
12983 let mut values = Vec::new();
12984 self.pack_dirty_into(&mut values);
12985 if values.is_empty() { None } else { Some(values) }
12986 }
12987 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
12988 self.abstract_fish.pack_dirty_into(values);
12989 if self.id_type_variant.is_dirty() {
12990 values
12991 .push(DataValue {
12992 index: 17u8,
12993 serializer_id: 1i32,
12994 value: EntityData::Int(*self.id_type_variant.get()),
12995 });
12996 self.id_type_variant.clear_dirty();
12997 }
12998 }
12999 pub fn pack_all(&self) -> Vec<DataValue> {
13001 let mut values = Vec::new();
13002 self.pack_all_into(&mut values);
13003 values
13004 }
13005 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13006 self.abstract_fish.pack_all_into(values);
13007 if !self.id_type_variant.is_default() {
13008 values
13009 .push(DataValue {
13010 index: 17u8,
13011 serializer_id: 1i32,
13012 value: EntityData::Int(*self.id_type_variant.get()),
13013 });
13014 }
13015 }
13016 pub fn is_dirty(&self) -> bool {
13018 self.abstract_fish.is_dirty() || self.id_type_variant.is_dirty()
13019 }
13020}
13021impl Default for TropicalFishEntityData {
13022 fn default() -> Self {
13023 Self::new()
13024 }
13025}
13026impl VanillaEntityData for TropicalFishEntityData {
13027 fn base(&self) -> &BaseEntityData {
13028 TropicalFishEntityData::base(self)
13029 }
13030 fn base_mut(&mut self) -> &mut BaseEntityData {
13031 TropicalFishEntityData::base_mut(self)
13032 }
13033 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13034 TropicalFishEntityData::pack_dirty(self)
13035 }
13036 fn pack_all(&self) -> Vec<DataValue> {
13037 TropicalFishEntityData::pack_all(self)
13038 }
13039 fn is_dirty(&self) -> bool {
13040 TropicalFishEntityData::is_dirty(self)
13041 }
13042}
13043impl VanillaLivingEntityData for TropicalFishEntityData {
13044 fn living_entity(&self) -> &LivingEntityData {
13045 TropicalFishEntityData::living_entity(self)
13046 }
13047 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13048 TropicalFishEntityData::living_entity_mut(self)
13049 }
13050}
13051#[derive(Debug, Clone)]
13053pub struct TurtleEntityData {
13054 pub ageable_mob: AgeableMobEntityData,
13055 pub has_egg: SyncedValue<bool>,
13056 pub laying_egg: SyncedValue<bool>,
13057}
13058impl TurtleEntityData {
13059 pub fn new() -> Self {
13061 Self {
13062 ageable_mob: AgeableMobEntityData::new(),
13063 has_egg: SyncedValue::new(false),
13064 laying_egg: SyncedValue::new(false),
13065 }
13066 }
13067 pub fn turtle(&self) -> &TurtleEntityData {
13069 self
13070 }
13071 pub fn turtle_mut(&mut self) -> &mut TurtleEntityData {
13073 self
13074 }
13075 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
13077 &self.ageable_mob
13078 }
13079 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
13081 &mut self.ageable_mob
13082 }
13083 pub fn mob(&self) -> &MobEntityData {
13085 &self.ageable_mob.mob
13086 }
13087 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13089 &mut self.ageable_mob.mob
13090 }
13091 pub fn living_entity(&self) -> &LivingEntityData {
13093 &self.ageable_mob.mob.living_entity
13094 }
13095 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13097 &mut self.ageable_mob.mob.living_entity
13098 }
13099 pub fn base(&self) -> &BaseEntityData {
13101 &self.ageable_mob.mob.living_entity.base
13102 }
13103 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13105 &mut self.ageable_mob.mob.living_entity.base
13106 }
13107 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13110 let mut values = Vec::new();
13111 self.pack_dirty_into(&mut values);
13112 if values.is_empty() { None } else { Some(values) }
13113 }
13114 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13115 self.ageable_mob.pack_dirty_into(values);
13116 if self.has_egg.is_dirty() {
13117 values
13118 .push(DataValue {
13119 index: 18u8,
13120 serializer_id: 8i32,
13121 value: EntityData::Boolean(*self.has_egg.get()),
13122 });
13123 self.has_egg.clear_dirty();
13124 }
13125 if self.laying_egg.is_dirty() {
13126 values
13127 .push(DataValue {
13128 index: 19u8,
13129 serializer_id: 8i32,
13130 value: EntityData::Boolean(*self.laying_egg.get()),
13131 });
13132 self.laying_egg.clear_dirty();
13133 }
13134 }
13135 pub fn pack_all(&self) -> Vec<DataValue> {
13137 let mut values = Vec::new();
13138 self.pack_all_into(&mut values);
13139 values
13140 }
13141 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13142 self.ageable_mob.pack_all_into(values);
13143 if !self.has_egg.is_default() {
13144 values
13145 .push(DataValue {
13146 index: 18u8,
13147 serializer_id: 8i32,
13148 value: EntityData::Boolean(*self.has_egg.get()),
13149 });
13150 }
13151 if !self.laying_egg.is_default() {
13152 values
13153 .push(DataValue {
13154 index: 19u8,
13155 serializer_id: 8i32,
13156 value: EntityData::Boolean(*self.laying_egg.get()),
13157 });
13158 }
13159 }
13160 pub fn is_dirty(&self) -> bool {
13162 self.ageable_mob.is_dirty() || self.has_egg.is_dirty()
13163 || self.laying_egg.is_dirty()
13164 }
13165}
13166impl Default for TurtleEntityData {
13167 fn default() -> Self {
13168 Self::new()
13169 }
13170}
13171impl VanillaEntityData for TurtleEntityData {
13172 fn base(&self) -> &BaseEntityData {
13173 TurtleEntityData::base(self)
13174 }
13175 fn base_mut(&mut self) -> &mut BaseEntityData {
13176 TurtleEntityData::base_mut(self)
13177 }
13178 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13179 TurtleEntityData::pack_dirty(self)
13180 }
13181 fn pack_all(&self) -> Vec<DataValue> {
13182 TurtleEntityData::pack_all(self)
13183 }
13184 fn is_dirty(&self) -> bool {
13185 TurtleEntityData::is_dirty(self)
13186 }
13187}
13188impl VanillaLivingEntityData for TurtleEntityData {
13189 fn living_entity(&self) -> &LivingEntityData {
13190 TurtleEntityData::living_entity(self)
13191 }
13192 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13193 TurtleEntityData::living_entity_mut(self)
13194 }
13195}
13196#[derive(Debug, Clone)]
13198pub struct VexEntityData {
13199 pub mob: MobEntityData,
13200 pub flags: SyncedValue<i8>,
13201}
13202impl VexEntityData {
13203 pub fn new() -> Self {
13205 Self {
13206 mob: MobEntityData::new(),
13207 flags: SyncedValue::new(0i8),
13208 }
13209 }
13210 pub fn vex(&self) -> &VexEntityData {
13212 self
13213 }
13214 pub fn vex_mut(&mut self) -> &mut VexEntityData {
13216 self
13217 }
13218 pub fn mob(&self) -> &MobEntityData {
13220 &self.mob
13221 }
13222 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13224 &mut self.mob
13225 }
13226 pub fn living_entity(&self) -> &LivingEntityData {
13228 &self.mob.living_entity
13229 }
13230 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13232 &mut self.mob.living_entity
13233 }
13234 pub fn base(&self) -> &BaseEntityData {
13236 &self.mob.living_entity.base
13237 }
13238 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13240 &mut self.mob.living_entity.base
13241 }
13242 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13245 let mut values = Vec::new();
13246 self.pack_dirty_into(&mut values);
13247 if values.is_empty() { None } else { Some(values) }
13248 }
13249 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13250 self.mob.pack_dirty_into(values);
13251 if self.flags.is_dirty() {
13252 values
13253 .push(DataValue {
13254 index: 16u8,
13255 serializer_id: 0i32,
13256 value: EntityData::Byte(*self.flags.get()),
13257 });
13258 self.flags.clear_dirty();
13259 }
13260 }
13261 pub fn pack_all(&self) -> Vec<DataValue> {
13263 let mut values = Vec::new();
13264 self.pack_all_into(&mut values);
13265 values
13266 }
13267 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13268 self.mob.pack_all_into(values);
13269 if !self.flags.is_default() {
13270 values
13271 .push(DataValue {
13272 index: 16u8,
13273 serializer_id: 0i32,
13274 value: EntityData::Byte(*self.flags.get()),
13275 });
13276 }
13277 }
13278 pub fn is_dirty(&self) -> bool {
13280 self.mob.is_dirty() || self.flags.is_dirty()
13281 }
13282}
13283impl Default for VexEntityData {
13284 fn default() -> Self {
13285 Self::new()
13286 }
13287}
13288impl VanillaEntityData for VexEntityData {
13289 fn base(&self) -> &BaseEntityData {
13290 VexEntityData::base(self)
13291 }
13292 fn base_mut(&mut self) -> &mut BaseEntityData {
13293 VexEntityData::base_mut(self)
13294 }
13295 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13296 VexEntityData::pack_dirty(self)
13297 }
13298 fn pack_all(&self) -> Vec<DataValue> {
13299 VexEntityData::pack_all(self)
13300 }
13301 fn is_dirty(&self) -> bool {
13302 VexEntityData::is_dirty(self)
13303 }
13304}
13305impl VanillaLivingEntityData for VexEntityData {
13306 fn living_entity(&self) -> &LivingEntityData {
13307 VexEntityData::living_entity(self)
13308 }
13309 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13310 VexEntityData::living_entity_mut(self)
13311 }
13312}
13313#[derive(Debug, Clone)]
13315pub struct AbstractVillagerEntityData {
13316 pub ageable_mob: AgeableMobEntityData,
13317 pub unhappy_counter: SyncedValue<i32>,
13318}
13319impl AbstractVillagerEntityData {
13320 pub fn new() -> Self {
13322 Self {
13323 ageable_mob: AgeableMobEntityData::new(),
13324 unhappy_counter: SyncedValue::new(0i32),
13325 }
13326 }
13327 pub fn abstract_villager(&self) -> &AbstractVillagerEntityData {
13329 self
13330 }
13331 pub fn abstract_villager_mut(&mut self) -> &mut AbstractVillagerEntityData {
13333 self
13334 }
13335 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
13337 &self.ageable_mob
13338 }
13339 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
13341 &mut self.ageable_mob
13342 }
13343 pub fn mob(&self) -> &MobEntityData {
13345 &self.ageable_mob.mob
13346 }
13347 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13349 &mut self.ageable_mob.mob
13350 }
13351 pub fn living_entity(&self) -> &LivingEntityData {
13353 &self.ageable_mob.mob.living_entity
13354 }
13355 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13357 &mut self.ageable_mob.mob.living_entity
13358 }
13359 pub fn base(&self) -> &BaseEntityData {
13361 &self.ageable_mob.mob.living_entity.base
13362 }
13363 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13365 &mut self.ageable_mob.mob.living_entity.base
13366 }
13367 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13370 let mut values = Vec::new();
13371 self.pack_dirty_into(&mut values);
13372 if values.is_empty() { None } else { Some(values) }
13373 }
13374 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13375 self.ageable_mob.pack_dirty_into(values);
13376 if self.unhappy_counter.is_dirty() {
13377 values
13378 .push(DataValue {
13379 index: 18u8,
13380 serializer_id: 1i32,
13381 value: EntityData::Int(*self.unhappy_counter.get()),
13382 });
13383 self.unhappy_counter.clear_dirty();
13384 }
13385 }
13386 pub fn pack_all(&self) -> Vec<DataValue> {
13388 let mut values = Vec::new();
13389 self.pack_all_into(&mut values);
13390 values
13391 }
13392 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13393 self.ageable_mob.pack_all_into(values);
13394 if !self.unhappy_counter.is_default() {
13395 values
13396 .push(DataValue {
13397 index: 18u8,
13398 serializer_id: 1i32,
13399 value: EntityData::Int(*self.unhappy_counter.get()),
13400 });
13401 }
13402 }
13403 pub fn is_dirty(&self) -> bool {
13405 self.ageable_mob.is_dirty() || self.unhappy_counter.is_dirty()
13406 }
13407}
13408impl Default for AbstractVillagerEntityData {
13409 fn default() -> Self {
13410 Self::new()
13411 }
13412}
13413impl VanillaEntityData for AbstractVillagerEntityData {
13414 fn base(&self) -> &BaseEntityData {
13415 AbstractVillagerEntityData::base(self)
13416 }
13417 fn base_mut(&mut self) -> &mut BaseEntityData {
13418 AbstractVillagerEntityData::base_mut(self)
13419 }
13420 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13421 AbstractVillagerEntityData::pack_dirty(self)
13422 }
13423 fn pack_all(&self) -> Vec<DataValue> {
13424 AbstractVillagerEntityData::pack_all(self)
13425 }
13426 fn is_dirty(&self) -> bool {
13427 AbstractVillagerEntityData::is_dirty(self)
13428 }
13429}
13430impl VanillaLivingEntityData for AbstractVillagerEntityData {
13431 fn living_entity(&self) -> &LivingEntityData {
13432 AbstractVillagerEntityData::living_entity(self)
13433 }
13434 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13435 AbstractVillagerEntityData::living_entity_mut(self)
13436 }
13437}
13438#[derive(Debug, Clone)]
13440pub struct VillagerEntityData {
13441 pub abstract_villager: AbstractVillagerEntityData,
13442 pub villager_data: SyncedValue<VillagerData>,
13443 pub villager_data_finalized: SyncedValue<bool>,
13444}
13445impl VillagerEntityData {
13446 pub fn new() -> Self {
13448 Self {
13449 abstract_villager: AbstractVillagerEntityData::new(),
13450 villager_data: SyncedValue::new(VillagerData::new(2, 0, 1i32)),
13451 villager_data_finalized: SyncedValue::new(false),
13452 }
13453 }
13454 pub fn villager(&self) -> &VillagerEntityData {
13456 self
13457 }
13458 pub fn villager_mut(&mut self) -> &mut VillagerEntityData {
13460 self
13461 }
13462 pub fn abstract_villager(&self) -> &AbstractVillagerEntityData {
13464 &self.abstract_villager
13465 }
13466 pub fn abstract_villager_mut(&mut self) -> &mut AbstractVillagerEntityData {
13468 &mut self.abstract_villager
13469 }
13470 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
13472 &self.abstract_villager.ageable_mob
13473 }
13474 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
13476 &mut self.abstract_villager.ageable_mob
13477 }
13478 pub fn mob(&self) -> &MobEntityData {
13480 &self.abstract_villager.ageable_mob.mob
13481 }
13482 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13484 &mut self.abstract_villager.ageable_mob.mob
13485 }
13486 pub fn living_entity(&self) -> &LivingEntityData {
13488 &self.abstract_villager.ageable_mob.mob.living_entity
13489 }
13490 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13492 &mut self.abstract_villager.ageable_mob.mob.living_entity
13493 }
13494 pub fn base(&self) -> &BaseEntityData {
13496 &self.abstract_villager.ageable_mob.mob.living_entity.base
13497 }
13498 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13500 &mut self.abstract_villager.ageable_mob.mob.living_entity.base
13501 }
13502 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13505 let mut values = Vec::new();
13506 self.pack_dirty_into(&mut values);
13507 if values.is_empty() { None } else { Some(values) }
13508 }
13509 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13510 self.abstract_villager.pack_dirty_into(values);
13511 if self.villager_data.is_dirty() {
13512 values
13513 .push(DataValue {
13514 index: 19u8,
13515 serializer_id: 18i32,
13516 value: EntityData::VillagerData(self.villager_data.get().clone()),
13517 });
13518 self.villager_data.clear_dirty();
13519 }
13520 if self.villager_data_finalized.is_dirty() {
13521 values
13522 .push(DataValue {
13523 index: 20u8,
13524 serializer_id: 8i32,
13525 value: EntityData::Boolean(*self.villager_data_finalized.get()),
13526 });
13527 self.villager_data_finalized.clear_dirty();
13528 }
13529 }
13530 pub fn pack_all(&self) -> Vec<DataValue> {
13532 let mut values = Vec::new();
13533 self.pack_all_into(&mut values);
13534 values
13535 }
13536 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13537 self.abstract_villager.pack_all_into(values);
13538 if !self.villager_data.is_default() {
13539 values
13540 .push(DataValue {
13541 index: 19u8,
13542 serializer_id: 18i32,
13543 value: EntityData::VillagerData(self.villager_data.get().clone()),
13544 });
13545 }
13546 if !self.villager_data_finalized.is_default() {
13547 values
13548 .push(DataValue {
13549 index: 20u8,
13550 serializer_id: 8i32,
13551 value: EntityData::Boolean(*self.villager_data_finalized.get()),
13552 });
13553 }
13554 }
13555 pub fn is_dirty(&self) -> bool {
13557 self.abstract_villager.is_dirty() || self.villager_data.is_dirty()
13558 || self.villager_data_finalized.is_dirty()
13559 }
13560}
13561impl Default for VillagerEntityData {
13562 fn default() -> Self {
13563 Self::new()
13564 }
13565}
13566impl VanillaEntityData for VillagerEntityData {
13567 fn base(&self) -> &BaseEntityData {
13568 VillagerEntityData::base(self)
13569 }
13570 fn base_mut(&mut self) -> &mut BaseEntityData {
13571 VillagerEntityData::base_mut(self)
13572 }
13573 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13574 VillagerEntityData::pack_dirty(self)
13575 }
13576 fn pack_all(&self) -> Vec<DataValue> {
13577 VillagerEntityData::pack_all(self)
13578 }
13579 fn is_dirty(&self) -> bool {
13580 VillagerEntityData::is_dirty(self)
13581 }
13582}
13583impl VanillaLivingEntityData for VillagerEntityData {
13584 fn living_entity(&self) -> &LivingEntityData {
13585 VillagerEntityData::living_entity(self)
13586 }
13587 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13588 VillagerEntityData::living_entity_mut(self)
13589 }
13590}
13591#[derive(Debug, Clone)]
13593pub struct WardenEntityData {
13594 pub mob: MobEntityData,
13595 pub client_anger_level: SyncedValue<i32>,
13596}
13597impl WardenEntityData {
13598 pub fn new() -> Self {
13600 Self {
13601 mob: MobEntityData::new(),
13602 client_anger_level: SyncedValue::new(0i32),
13603 }
13604 }
13605 pub fn warden(&self) -> &WardenEntityData {
13607 self
13608 }
13609 pub fn warden_mut(&mut self) -> &mut WardenEntityData {
13611 self
13612 }
13613 pub fn mob(&self) -> &MobEntityData {
13615 &self.mob
13616 }
13617 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13619 &mut self.mob
13620 }
13621 pub fn living_entity(&self) -> &LivingEntityData {
13623 &self.mob.living_entity
13624 }
13625 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13627 &mut self.mob.living_entity
13628 }
13629 pub fn base(&self) -> &BaseEntityData {
13631 &self.mob.living_entity.base
13632 }
13633 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13635 &mut self.mob.living_entity.base
13636 }
13637 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13640 let mut values = Vec::new();
13641 self.pack_dirty_into(&mut values);
13642 if values.is_empty() { None } else { Some(values) }
13643 }
13644 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13645 self.mob.pack_dirty_into(values);
13646 if self.client_anger_level.is_dirty() {
13647 values
13648 .push(DataValue {
13649 index: 16u8,
13650 serializer_id: 1i32,
13651 value: EntityData::Int(*self.client_anger_level.get()),
13652 });
13653 self.client_anger_level.clear_dirty();
13654 }
13655 }
13656 pub fn pack_all(&self) -> Vec<DataValue> {
13658 let mut values = Vec::new();
13659 self.pack_all_into(&mut values);
13660 values
13661 }
13662 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13663 self.mob.pack_all_into(values);
13664 if !self.client_anger_level.is_default() {
13665 values
13666 .push(DataValue {
13667 index: 16u8,
13668 serializer_id: 1i32,
13669 value: EntityData::Int(*self.client_anger_level.get()),
13670 });
13671 }
13672 }
13673 pub fn is_dirty(&self) -> bool {
13675 self.mob.is_dirty() || self.client_anger_level.is_dirty()
13676 }
13677}
13678impl Default for WardenEntityData {
13679 fn default() -> Self {
13680 Self::new()
13681 }
13682}
13683impl VanillaEntityData for WardenEntityData {
13684 fn base(&self) -> &BaseEntityData {
13685 WardenEntityData::base(self)
13686 }
13687 fn base_mut(&mut self) -> &mut BaseEntityData {
13688 WardenEntityData::base_mut(self)
13689 }
13690 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13691 WardenEntityData::pack_dirty(self)
13692 }
13693 fn pack_all(&self) -> Vec<DataValue> {
13694 WardenEntityData::pack_all(self)
13695 }
13696 fn is_dirty(&self) -> bool {
13697 WardenEntityData::is_dirty(self)
13698 }
13699}
13700impl VanillaLivingEntityData for WardenEntityData {
13701 fn living_entity(&self) -> &LivingEntityData {
13702 WardenEntityData::living_entity(self)
13703 }
13704 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13705 WardenEntityData::living_entity_mut(self)
13706 }
13707}
13708#[derive(Debug, Clone)]
13710pub struct WitchEntityData {
13711 pub raider: RaiderEntityData,
13712 pub using_item: SyncedValue<bool>,
13713}
13714impl WitchEntityData {
13715 pub fn new() -> Self {
13717 Self {
13718 raider: RaiderEntityData::new(),
13719 using_item: SyncedValue::new(false),
13720 }
13721 }
13722 pub fn witch(&self) -> &WitchEntityData {
13724 self
13725 }
13726 pub fn witch_mut(&mut self) -> &mut WitchEntityData {
13728 self
13729 }
13730 pub fn raider(&self) -> &RaiderEntityData {
13732 &self.raider
13733 }
13734 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
13736 &mut self.raider
13737 }
13738 pub fn mob(&self) -> &MobEntityData {
13740 &self.raider.mob
13741 }
13742 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13744 &mut self.raider.mob
13745 }
13746 pub fn living_entity(&self) -> &LivingEntityData {
13748 &self.raider.mob.living_entity
13749 }
13750 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13752 &mut self.raider.mob.living_entity
13753 }
13754 pub fn base(&self) -> &BaseEntityData {
13756 &self.raider.mob.living_entity.base
13757 }
13758 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13760 &mut self.raider.mob.living_entity.base
13761 }
13762 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13765 let mut values = Vec::new();
13766 self.pack_dirty_into(&mut values);
13767 if values.is_empty() { None } else { Some(values) }
13768 }
13769 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13770 self.raider.pack_dirty_into(values);
13771 if self.using_item.is_dirty() {
13772 values
13773 .push(DataValue {
13774 index: 17u8,
13775 serializer_id: 8i32,
13776 value: EntityData::Boolean(*self.using_item.get()),
13777 });
13778 self.using_item.clear_dirty();
13779 }
13780 }
13781 pub fn pack_all(&self) -> Vec<DataValue> {
13783 let mut values = Vec::new();
13784 self.pack_all_into(&mut values);
13785 values
13786 }
13787 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13788 self.raider.pack_all_into(values);
13789 if !self.using_item.is_default() {
13790 values
13791 .push(DataValue {
13792 index: 17u8,
13793 serializer_id: 8i32,
13794 value: EntityData::Boolean(*self.using_item.get()),
13795 });
13796 }
13797 }
13798 pub fn is_dirty(&self) -> bool {
13800 self.raider.is_dirty() || self.using_item.is_dirty()
13801 }
13802}
13803impl Default for WitchEntityData {
13804 fn default() -> Self {
13805 Self::new()
13806 }
13807}
13808impl VanillaEntityData for WitchEntityData {
13809 fn base(&self) -> &BaseEntityData {
13810 WitchEntityData::base(self)
13811 }
13812 fn base_mut(&mut self) -> &mut BaseEntityData {
13813 WitchEntityData::base_mut(self)
13814 }
13815 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13816 WitchEntityData::pack_dirty(self)
13817 }
13818 fn pack_all(&self) -> Vec<DataValue> {
13819 WitchEntityData::pack_all(self)
13820 }
13821 fn is_dirty(&self) -> bool {
13822 WitchEntityData::is_dirty(self)
13823 }
13824}
13825impl VanillaLivingEntityData for WitchEntityData {
13826 fn living_entity(&self) -> &LivingEntityData {
13827 WitchEntityData::living_entity(self)
13828 }
13829 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13830 WitchEntityData::living_entity_mut(self)
13831 }
13832}
13833#[derive(Debug, Clone)]
13835pub struct WitherBossEntityData {
13836 pub mob: MobEntityData,
13837 pub target_a: SyncedValue<i32>,
13838 pub target_b: SyncedValue<i32>,
13839 pub target_c: SyncedValue<i32>,
13840 pub id_inv: SyncedValue<i32>,
13841}
13842impl WitherBossEntityData {
13843 pub fn new() -> Self {
13845 Self {
13846 mob: MobEntityData::new(),
13847 target_a: SyncedValue::new(0i32),
13848 target_b: SyncedValue::new(0i32),
13849 target_c: SyncedValue::new(0i32),
13850 id_inv: SyncedValue::new(0i32),
13851 }
13852 }
13853 pub fn wither_boss(&self) -> &WitherBossEntityData {
13855 self
13856 }
13857 pub fn wither_boss_mut(&mut self) -> &mut WitherBossEntityData {
13859 self
13860 }
13861 pub fn mob(&self) -> &MobEntityData {
13863 &self.mob
13864 }
13865 pub fn mob_mut(&mut self) -> &mut MobEntityData {
13867 &mut self.mob
13868 }
13869 pub fn living_entity(&self) -> &LivingEntityData {
13871 &self.mob.living_entity
13872 }
13873 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
13875 &mut self.mob.living_entity
13876 }
13877 pub fn base(&self) -> &BaseEntityData {
13879 &self.mob.living_entity.base
13880 }
13881 pub fn base_mut(&mut self) -> &mut BaseEntityData {
13883 &mut self.mob.living_entity.base
13884 }
13885 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13888 let mut values = Vec::new();
13889 self.pack_dirty_into(&mut values);
13890 if values.is_empty() { None } else { Some(values) }
13891 }
13892 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
13893 self.mob.pack_dirty_into(values);
13894 if self.target_a.is_dirty() {
13895 values
13896 .push(DataValue {
13897 index: 16u8,
13898 serializer_id: 1i32,
13899 value: EntityData::Int(*self.target_a.get()),
13900 });
13901 self.target_a.clear_dirty();
13902 }
13903 if self.target_b.is_dirty() {
13904 values
13905 .push(DataValue {
13906 index: 17u8,
13907 serializer_id: 1i32,
13908 value: EntityData::Int(*self.target_b.get()),
13909 });
13910 self.target_b.clear_dirty();
13911 }
13912 if self.target_c.is_dirty() {
13913 values
13914 .push(DataValue {
13915 index: 18u8,
13916 serializer_id: 1i32,
13917 value: EntityData::Int(*self.target_c.get()),
13918 });
13919 self.target_c.clear_dirty();
13920 }
13921 if self.id_inv.is_dirty() {
13922 values
13923 .push(DataValue {
13924 index: 19u8,
13925 serializer_id: 1i32,
13926 value: EntityData::Int(*self.id_inv.get()),
13927 });
13928 self.id_inv.clear_dirty();
13929 }
13930 }
13931 pub fn pack_all(&self) -> Vec<DataValue> {
13933 let mut values = Vec::new();
13934 self.pack_all_into(&mut values);
13935 values
13936 }
13937 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
13938 self.mob.pack_all_into(values);
13939 if !self.target_a.is_default() {
13940 values
13941 .push(DataValue {
13942 index: 16u8,
13943 serializer_id: 1i32,
13944 value: EntityData::Int(*self.target_a.get()),
13945 });
13946 }
13947 if !self.target_b.is_default() {
13948 values
13949 .push(DataValue {
13950 index: 17u8,
13951 serializer_id: 1i32,
13952 value: EntityData::Int(*self.target_b.get()),
13953 });
13954 }
13955 if !self.target_c.is_default() {
13956 values
13957 .push(DataValue {
13958 index: 18u8,
13959 serializer_id: 1i32,
13960 value: EntityData::Int(*self.target_c.get()),
13961 });
13962 }
13963 if !self.id_inv.is_default() {
13964 values
13965 .push(DataValue {
13966 index: 19u8,
13967 serializer_id: 1i32,
13968 value: EntityData::Int(*self.id_inv.get()),
13969 });
13970 }
13971 }
13972 pub fn is_dirty(&self) -> bool {
13974 self.mob.is_dirty() || self.target_a.is_dirty() || self.target_b.is_dirty()
13975 || self.target_c.is_dirty() || self.id_inv.is_dirty()
13976 }
13977}
13978impl Default for WitherBossEntityData {
13979 fn default() -> Self {
13980 Self::new()
13981 }
13982}
13983impl VanillaEntityData for WitherBossEntityData {
13984 fn base(&self) -> &BaseEntityData {
13985 WitherBossEntityData::base(self)
13986 }
13987 fn base_mut(&mut self) -> &mut BaseEntityData {
13988 WitherBossEntityData::base_mut(self)
13989 }
13990 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
13991 WitherBossEntityData::pack_dirty(self)
13992 }
13993 fn pack_all(&self) -> Vec<DataValue> {
13994 WitherBossEntityData::pack_all(self)
13995 }
13996 fn is_dirty(&self) -> bool {
13997 WitherBossEntityData::is_dirty(self)
13998 }
13999}
14000impl VanillaLivingEntityData for WitherBossEntityData {
14001 fn living_entity(&self) -> &LivingEntityData {
14002 WitherBossEntityData::living_entity(self)
14003 }
14004 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14005 WitherBossEntityData::living_entity_mut(self)
14006 }
14007}
14008#[derive(Debug, Clone)]
14010pub struct WitherSkullEntityData {
14011 pub base: BaseEntityData,
14012 pub dangerous: SyncedValue<bool>,
14013}
14014impl WitherSkullEntityData {
14015 pub fn new() -> Self {
14017 Self {
14018 base: BaseEntityData::new(),
14019 dangerous: SyncedValue::new(false),
14020 }
14021 }
14022 pub fn wither_skull(&self) -> &WitherSkullEntityData {
14024 self
14025 }
14026 pub fn wither_skull_mut(&mut self) -> &mut WitherSkullEntityData {
14028 self
14029 }
14030 pub fn base(&self) -> &BaseEntityData {
14032 &self.base
14033 }
14034 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14036 &mut self.base
14037 }
14038 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14041 let mut values = Vec::new();
14042 self.pack_dirty_into(&mut values);
14043 if values.is_empty() { None } else { Some(values) }
14044 }
14045 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14046 self.base.pack_dirty_into(values);
14047 if self.dangerous.is_dirty() {
14048 values
14049 .push(DataValue {
14050 index: 8u8,
14051 serializer_id: 8i32,
14052 value: EntityData::Boolean(*self.dangerous.get()),
14053 });
14054 self.dangerous.clear_dirty();
14055 }
14056 }
14057 pub fn pack_all(&self) -> Vec<DataValue> {
14059 let mut values = Vec::new();
14060 self.pack_all_into(&mut values);
14061 values
14062 }
14063 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14064 self.base.pack_all_into(values);
14065 if !self.dangerous.is_default() {
14066 values
14067 .push(DataValue {
14068 index: 8u8,
14069 serializer_id: 8i32,
14070 value: EntityData::Boolean(*self.dangerous.get()),
14071 });
14072 }
14073 }
14074 pub fn is_dirty(&self) -> bool {
14076 self.base.is_dirty() || self.dangerous.is_dirty()
14077 }
14078}
14079impl Default for WitherSkullEntityData {
14080 fn default() -> Self {
14081 Self::new()
14082 }
14083}
14084impl VanillaEntityData for WitherSkullEntityData {
14085 fn base(&self) -> &BaseEntityData {
14086 WitherSkullEntityData::base(self)
14087 }
14088 fn base_mut(&mut self) -> &mut BaseEntityData {
14089 WitherSkullEntityData::base_mut(self)
14090 }
14091 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14092 WitherSkullEntityData::pack_dirty(self)
14093 }
14094 fn pack_all(&self) -> Vec<DataValue> {
14095 WitherSkullEntityData::pack_all(self)
14096 }
14097 fn is_dirty(&self) -> bool {
14098 WitherSkullEntityData::is_dirty(self)
14099 }
14100}
14101#[derive(Debug, Clone)]
14103pub struct WolfEntityData {
14104 pub tamable_animal: TamableAnimalEntityData,
14105 pub interested: SyncedValue<bool>,
14106 pub collar_color: SyncedValue<i32>,
14107 pub anger_end_time: SyncedValue<i64>,
14108 pub variant: SyncedValue<RegistryReference<crate::wolf_variant::WolfVariant>>,
14109 pub sound_variant: SyncedValue<
14110 RegistryReference<crate::wolf_sound_variant::WolfSoundVariant>,
14111 >,
14112}
14113impl WolfEntityData {
14114 pub fn new() -> Self {
14116 Self {
14117 tamable_animal: TamableAnimalEntityData::new(),
14118 interested: SyncedValue::new(false),
14119 collar_color: SyncedValue::new(14i32),
14120 anger_end_time: SyncedValue::new(-1i64),
14121 variant: SyncedValue::new(
14122 RegistryReference::new(&crate::vanilla_wolf_variants::PALE),
14123 ),
14124 sound_variant: SyncedValue::new(
14125 RegistryReference::new(&crate::vanilla_wolf_sound_variants::CLASSIC),
14126 ),
14127 }
14128 }
14129 pub fn wolf(&self) -> &WolfEntityData {
14131 self
14132 }
14133 pub fn wolf_mut(&mut self) -> &mut WolfEntityData {
14135 self
14136 }
14137 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
14139 &self.tamable_animal
14140 }
14141 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
14143 &mut self.tamable_animal
14144 }
14145 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
14147 &self.tamable_animal.ageable_mob
14148 }
14149 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
14151 &mut self.tamable_animal.ageable_mob
14152 }
14153 pub fn mob(&self) -> &MobEntityData {
14155 &self.tamable_animal.ageable_mob.mob
14156 }
14157 pub fn mob_mut(&mut self) -> &mut MobEntityData {
14159 &mut self.tamable_animal.ageable_mob.mob
14160 }
14161 pub fn living_entity(&self) -> &LivingEntityData {
14163 &self.tamable_animal.ageable_mob.mob.living_entity
14164 }
14165 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14167 &mut self.tamable_animal.ageable_mob.mob.living_entity
14168 }
14169 pub fn base(&self) -> &BaseEntityData {
14171 &self.tamable_animal.ageable_mob.mob.living_entity.base
14172 }
14173 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14175 &mut self.tamable_animal.ageable_mob.mob.living_entity.base
14176 }
14177 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14180 let mut values = Vec::new();
14181 self.pack_dirty_into(&mut values);
14182 if values.is_empty() { None } else { Some(values) }
14183 }
14184 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14185 self.tamable_animal.pack_dirty_into(values);
14186 if self.interested.is_dirty() {
14187 values
14188 .push(DataValue {
14189 index: 20u8,
14190 serializer_id: 8i32,
14191 value: EntityData::Boolean(*self.interested.get()),
14192 });
14193 self.interested.clear_dirty();
14194 }
14195 if self.collar_color.is_dirty() {
14196 values
14197 .push(DataValue {
14198 index: 21u8,
14199 serializer_id: 1i32,
14200 value: EntityData::Int(*self.collar_color.get()),
14201 });
14202 self.collar_color.clear_dirty();
14203 }
14204 if self.anger_end_time.is_dirty() {
14205 values
14206 .push(DataValue {
14207 index: 22u8,
14208 serializer_id: 2i32,
14209 value: EntityData::Long(*self.anger_end_time.get()),
14210 });
14211 self.anger_end_time.clear_dirty();
14212 }
14213 if self.variant.is_dirty() {
14214 values
14215 .push(DataValue {
14216 index: 23u8,
14217 serializer_id: 25i32,
14218 value: EntityData::WolfVariant(*self.variant.get()),
14219 });
14220 self.variant.clear_dirty();
14221 }
14222 if self.sound_variant.is_dirty() {
14223 values
14224 .push(DataValue {
14225 index: 24u8,
14226 serializer_id: 26i32,
14227 value: EntityData::WolfSoundVariant(*self.sound_variant.get()),
14228 });
14229 self.sound_variant.clear_dirty();
14230 }
14231 }
14232 pub fn pack_all(&self) -> Vec<DataValue> {
14234 let mut values = Vec::new();
14235 self.pack_all_into(&mut values);
14236 values
14237 }
14238 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14239 self.tamable_animal.pack_all_into(values);
14240 if !self.interested.is_default() {
14241 values
14242 .push(DataValue {
14243 index: 20u8,
14244 serializer_id: 8i32,
14245 value: EntityData::Boolean(*self.interested.get()),
14246 });
14247 }
14248 if !self.collar_color.is_default() {
14249 values
14250 .push(DataValue {
14251 index: 21u8,
14252 serializer_id: 1i32,
14253 value: EntityData::Int(*self.collar_color.get()),
14254 });
14255 }
14256 if !self.anger_end_time.is_default() {
14257 values
14258 .push(DataValue {
14259 index: 22u8,
14260 serializer_id: 2i32,
14261 value: EntityData::Long(*self.anger_end_time.get()),
14262 });
14263 }
14264 if !self.variant.is_default() {
14265 values
14266 .push(DataValue {
14267 index: 23u8,
14268 serializer_id: 25i32,
14269 value: EntityData::WolfVariant(*self.variant.get()),
14270 });
14271 }
14272 if !self.sound_variant.is_default() {
14273 values
14274 .push(DataValue {
14275 index: 24u8,
14276 serializer_id: 26i32,
14277 value: EntityData::WolfSoundVariant(*self.sound_variant.get()),
14278 });
14279 }
14280 }
14281 pub fn is_dirty(&self) -> bool {
14283 self.tamable_animal.is_dirty() || self.interested.is_dirty()
14284 || self.collar_color.is_dirty() || self.anger_end_time.is_dirty()
14285 || self.variant.is_dirty() || self.sound_variant.is_dirty()
14286 }
14287}
14288impl Default for WolfEntityData {
14289 fn default() -> Self {
14290 Self::new()
14291 }
14292}
14293impl VanillaEntityData for WolfEntityData {
14294 fn base(&self) -> &BaseEntityData {
14295 WolfEntityData::base(self)
14296 }
14297 fn base_mut(&mut self) -> &mut BaseEntityData {
14298 WolfEntityData::base_mut(self)
14299 }
14300 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14301 WolfEntityData::pack_dirty(self)
14302 }
14303 fn pack_all(&self) -> Vec<DataValue> {
14304 WolfEntityData::pack_all(self)
14305 }
14306 fn is_dirty(&self) -> bool {
14307 WolfEntityData::is_dirty(self)
14308 }
14309}
14310impl VanillaLivingEntityData for WolfEntityData {
14311 fn living_entity(&self) -> &LivingEntityData {
14312 WolfEntityData::living_entity(self)
14313 }
14314 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14315 WolfEntityData::living_entity_mut(self)
14316 }
14317}
14318#[derive(Debug, Clone)]
14320pub struct ZoglinEntityData {
14321 pub mob: MobEntityData,
14322 pub baby: SyncedValue<bool>,
14323}
14324impl ZoglinEntityData {
14325 pub fn new() -> Self {
14327 Self {
14328 mob: MobEntityData::new(),
14329 baby: SyncedValue::new(false),
14330 }
14331 }
14332 pub fn zoglin(&self) -> &ZoglinEntityData {
14334 self
14335 }
14336 pub fn zoglin_mut(&mut self) -> &mut ZoglinEntityData {
14338 self
14339 }
14340 pub fn mob(&self) -> &MobEntityData {
14342 &self.mob
14343 }
14344 pub fn mob_mut(&mut self) -> &mut MobEntityData {
14346 &mut self.mob
14347 }
14348 pub fn living_entity(&self) -> &LivingEntityData {
14350 &self.mob.living_entity
14351 }
14352 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14354 &mut self.mob.living_entity
14355 }
14356 pub fn base(&self) -> &BaseEntityData {
14358 &self.mob.living_entity.base
14359 }
14360 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14362 &mut self.mob.living_entity.base
14363 }
14364 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14367 let mut values = Vec::new();
14368 self.pack_dirty_into(&mut values);
14369 if values.is_empty() { None } else { Some(values) }
14370 }
14371 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14372 self.mob.pack_dirty_into(values);
14373 if self.baby.is_dirty() {
14374 values
14375 .push(DataValue {
14376 index: 16u8,
14377 serializer_id: 8i32,
14378 value: EntityData::Boolean(*self.baby.get()),
14379 });
14380 self.baby.clear_dirty();
14381 }
14382 }
14383 pub fn pack_all(&self) -> Vec<DataValue> {
14385 let mut values = Vec::new();
14386 self.pack_all_into(&mut values);
14387 values
14388 }
14389 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14390 self.mob.pack_all_into(values);
14391 if !self.baby.is_default() {
14392 values
14393 .push(DataValue {
14394 index: 16u8,
14395 serializer_id: 8i32,
14396 value: EntityData::Boolean(*self.baby.get()),
14397 });
14398 }
14399 }
14400 pub fn is_dirty(&self) -> bool {
14402 self.mob.is_dirty() || self.baby.is_dirty()
14403 }
14404}
14405impl Default for ZoglinEntityData {
14406 fn default() -> Self {
14407 Self::new()
14408 }
14409}
14410impl VanillaEntityData for ZoglinEntityData {
14411 fn base(&self) -> &BaseEntityData {
14412 ZoglinEntityData::base(self)
14413 }
14414 fn base_mut(&mut self) -> &mut BaseEntityData {
14415 ZoglinEntityData::base_mut(self)
14416 }
14417 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14418 ZoglinEntityData::pack_dirty(self)
14419 }
14420 fn pack_all(&self) -> Vec<DataValue> {
14421 ZoglinEntityData::pack_all(self)
14422 }
14423 fn is_dirty(&self) -> bool {
14424 ZoglinEntityData::is_dirty(self)
14425 }
14426}
14427impl VanillaLivingEntityData for ZoglinEntityData {
14428 fn living_entity(&self) -> &LivingEntityData {
14429 ZoglinEntityData::living_entity(self)
14430 }
14431 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14432 ZoglinEntityData::living_entity_mut(self)
14433 }
14434}
14435#[derive(Debug, Clone)]
14437pub struct ZombieNautilusEntityData {
14438 pub abstract_nautilus: AbstractNautilusEntityData,
14439 pub variant: SyncedValue<
14440 RegistryReference<crate::zombie_nautilus_variant::ZombieNautilusVariant>,
14441 >,
14442}
14443impl ZombieNautilusEntityData {
14444 pub fn new() -> Self {
14446 Self {
14447 abstract_nautilus: AbstractNautilusEntityData::new(),
14448 variant: SyncedValue::new(
14449 RegistryReference::new(
14450 &crate::vanilla_zombie_nautilus_variants::TEMPERATE,
14451 ),
14452 ),
14453 }
14454 }
14455 pub fn zombie_nautilus(&self) -> &ZombieNautilusEntityData {
14457 self
14458 }
14459 pub fn zombie_nautilus_mut(&mut self) -> &mut ZombieNautilusEntityData {
14461 self
14462 }
14463 pub fn abstract_nautilus(&self) -> &AbstractNautilusEntityData {
14465 &self.abstract_nautilus
14466 }
14467 pub fn abstract_nautilus_mut(&mut self) -> &mut AbstractNautilusEntityData {
14469 &mut self.abstract_nautilus
14470 }
14471 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
14473 &self.abstract_nautilus.tamable_animal
14474 }
14475 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
14477 &mut self.abstract_nautilus.tamable_animal
14478 }
14479 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
14481 &self.abstract_nautilus.tamable_animal.ageable_mob
14482 }
14483 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
14485 &mut self.abstract_nautilus.tamable_animal.ageable_mob
14486 }
14487 pub fn mob(&self) -> &MobEntityData {
14489 &self.abstract_nautilus.tamable_animal.ageable_mob.mob
14490 }
14491 pub fn mob_mut(&mut self) -> &mut MobEntityData {
14493 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob
14494 }
14495 pub fn living_entity(&self) -> &LivingEntityData {
14497 &self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity
14498 }
14499 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14501 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity
14502 }
14503 pub fn base(&self) -> &BaseEntityData {
14505 &self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity.base
14506 }
14507 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14509 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity.base
14510 }
14511 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14514 let mut values = Vec::new();
14515 self.pack_dirty_into(&mut values);
14516 if values.is_empty() { None } else { Some(values) }
14517 }
14518 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14519 self.abstract_nautilus.pack_dirty_into(values);
14520 if self.variant.is_dirty() {
14521 values
14522 .push(DataValue {
14523 index: 21u8,
14524 serializer_id: 32i32,
14525 value: EntityData::ZombieNautilusVariant(*self.variant.get()),
14526 });
14527 self.variant.clear_dirty();
14528 }
14529 }
14530 pub fn pack_all(&self) -> Vec<DataValue> {
14532 let mut values = Vec::new();
14533 self.pack_all_into(&mut values);
14534 values
14535 }
14536 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14537 self.abstract_nautilus.pack_all_into(values);
14538 if !self.variant.is_default() {
14539 values
14540 .push(DataValue {
14541 index: 21u8,
14542 serializer_id: 32i32,
14543 value: EntityData::ZombieNautilusVariant(*self.variant.get()),
14544 });
14545 }
14546 }
14547 pub fn is_dirty(&self) -> bool {
14549 self.abstract_nautilus.is_dirty() || self.variant.is_dirty()
14550 }
14551}
14552impl Default for ZombieNautilusEntityData {
14553 fn default() -> Self {
14554 Self::new()
14555 }
14556}
14557impl VanillaEntityData for ZombieNautilusEntityData {
14558 fn base(&self) -> &BaseEntityData {
14559 ZombieNautilusEntityData::base(self)
14560 }
14561 fn base_mut(&mut self) -> &mut BaseEntityData {
14562 ZombieNautilusEntityData::base_mut(self)
14563 }
14564 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14565 ZombieNautilusEntityData::pack_dirty(self)
14566 }
14567 fn pack_all(&self) -> Vec<DataValue> {
14568 ZombieNautilusEntityData::pack_all(self)
14569 }
14570 fn is_dirty(&self) -> bool {
14571 ZombieNautilusEntityData::is_dirty(self)
14572 }
14573}
14574impl VanillaLivingEntityData for ZombieNautilusEntityData {
14575 fn living_entity(&self) -> &LivingEntityData {
14576 ZombieNautilusEntityData::living_entity(self)
14577 }
14578 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14579 ZombieNautilusEntityData::living_entity_mut(self)
14580 }
14581}
14582#[derive(Debug, Clone)]
14584pub struct ZombieVillagerEntityData {
14585 pub zombie: ZombieEntityData,
14586 pub converting: SyncedValue<bool>,
14587 pub villager_data: SyncedValue<VillagerData>,
14588 pub villager_data_finalized: SyncedValue<bool>,
14589}
14590impl ZombieVillagerEntityData {
14591 pub fn new(random: &mut impl Random) -> Self {
14593 Self {
14594 zombie: ZombieEntityData::new(),
14595 converting: SyncedValue::new(false),
14596 villager_data: SyncedValue::new({
14597 let mut data = VillagerData::new(2, 0, 1i32);
14598 data.profession = crate::entity_data::random_villager_profession_id(
14599 random,
14600 crate::REGISTRY.villager_professions.len(),
14601 data.profession,
14602 );
14603 data
14604 }),
14605 villager_data_finalized: SyncedValue::new(false),
14606 }
14607 }
14608 pub fn zombie_villager(&self) -> &ZombieVillagerEntityData {
14610 self
14611 }
14612 pub fn zombie_villager_mut(&mut self) -> &mut ZombieVillagerEntityData {
14614 self
14615 }
14616 pub fn zombie(&self) -> &ZombieEntityData {
14618 &self.zombie
14619 }
14620 pub fn zombie_mut(&mut self) -> &mut ZombieEntityData {
14622 &mut self.zombie
14623 }
14624 pub fn mob(&self) -> &MobEntityData {
14626 &self.zombie.mob
14627 }
14628 pub fn mob_mut(&mut self) -> &mut MobEntityData {
14630 &mut self.zombie.mob
14631 }
14632 pub fn living_entity(&self) -> &LivingEntityData {
14634 &self.zombie.mob.living_entity
14635 }
14636 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14638 &mut self.zombie.mob.living_entity
14639 }
14640 pub fn base(&self) -> &BaseEntityData {
14642 &self.zombie.mob.living_entity.base
14643 }
14644 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14646 &mut self.zombie.mob.living_entity.base
14647 }
14648 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14651 let mut values = Vec::new();
14652 self.pack_dirty_into(&mut values);
14653 if values.is_empty() { None } else { Some(values) }
14654 }
14655 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14656 self.zombie.pack_dirty_into(values);
14657 if self.converting.is_dirty() {
14658 values
14659 .push(DataValue {
14660 index: 19u8,
14661 serializer_id: 8i32,
14662 value: EntityData::Boolean(*self.converting.get()),
14663 });
14664 self.converting.clear_dirty();
14665 }
14666 if self.villager_data.is_dirty() {
14667 values
14668 .push(DataValue {
14669 index: 20u8,
14670 serializer_id: 18i32,
14671 value: EntityData::VillagerData(self.villager_data.get().clone()),
14672 });
14673 self.villager_data.clear_dirty();
14674 }
14675 if self.villager_data_finalized.is_dirty() {
14676 values
14677 .push(DataValue {
14678 index: 21u8,
14679 serializer_id: 8i32,
14680 value: EntityData::Boolean(*self.villager_data_finalized.get()),
14681 });
14682 self.villager_data_finalized.clear_dirty();
14683 }
14684 }
14685 pub fn pack_all(&self) -> Vec<DataValue> {
14687 let mut values = Vec::new();
14688 self.pack_all_into(&mut values);
14689 values
14690 }
14691 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14692 self.zombie.pack_all_into(values);
14693 if !self.converting.is_default() {
14694 values
14695 .push(DataValue {
14696 index: 19u8,
14697 serializer_id: 8i32,
14698 value: EntityData::Boolean(*self.converting.get()),
14699 });
14700 }
14701 if !self.villager_data.is_default() {
14702 values
14703 .push(DataValue {
14704 index: 20u8,
14705 serializer_id: 18i32,
14706 value: EntityData::VillagerData(self.villager_data.get().clone()),
14707 });
14708 }
14709 if !self.villager_data_finalized.is_default() {
14710 values
14711 .push(DataValue {
14712 index: 21u8,
14713 serializer_id: 8i32,
14714 value: EntityData::Boolean(*self.villager_data_finalized.get()),
14715 });
14716 }
14717 }
14718 pub fn is_dirty(&self) -> bool {
14720 self.zombie.is_dirty() || self.converting.is_dirty()
14721 || self.villager_data.is_dirty() || self.villager_data_finalized.is_dirty()
14722 }
14723}
14724impl VanillaEntityData for ZombieVillagerEntityData {
14725 fn base(&self) -> &BaseEntityData {
14726 ZombieVillagerEntityData::base(self)
14727 }
14728 fn base_mut(&mut self) -> &mut BaseEntityData {
14729 ZombieVillagerEntityData::base_mut(self)
14730 }
14731 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14732 ZombieVillagerEntityData::pack_dirty(self)
14733 }
14734 fn pack_all(&self) -> Vec<DataValue> {
14735 ZombieVillagerEntityData::pack_all(self)
14736 }
14737 fn is_dirty(&self) -> bool {
14738 ZombieVillagerEntityData::is_dirty(self)
14739 }
14740}
14741impl VanillaLivingEntityData for ZombieVillagerEntityData {
14742 fn living_entity(&self) -> &LivingEntityData {
14743 ZombieVillagerEntityData::living_entity(self)
14744 }
14745 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14746 ZombieVillagerEntityData::living_entity_mut(self)
14747 }
14748}
14749#[derive(Debug, Clone)]
14751pub struct PlayerEntityData {
14752 pub avatar: AvatarEntityData,
14753 pub player_absorption: SyncedValue<f32>,
14754 pub score: SyncedValue<i32>,
14755 pub shoulder_parrot_left: SyncedValue<Option<u32>>,
14756 pub shoulder_parrot_right: SyncedValue<Option<u32>>,
14757}
14758impl PlayerEntityData {
14759 pub fn new() -> Self {
14761 Self {
14762 avatar: AvatarEntityData::new(),
14763 player_absorption: SyncedValue::new(0f32),
14764 score: SyncedValue::new(0i32),
14765 shoulder_parrot_left: SyncedValue::new(None),
14766 shoulder_parrot_right: SyncedValue::new(None),
14767 }
14768 }
14769 pub fn player(&self) -> &PlayerEntityData {
14771 self
14772 }
14773 pub fn player_mut(&mut self) -> &mut PlayerEntityData {
14775 self
14776 }
14777 pub fn avatar(&self) -> &AvatarEntityData {
14779 &self.avatar
14780 }
14781 pub fn avatar_mut(&mut self) -> &mut AvatarEntityData {
14783 &mut self.avatar
14784 }
14785 pub fn living_entity(&self) -> &LivingEntityData {
14787 &self.avatar.living_entity
14788 }
14789 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14791 &mut self.avatar.living_entity
14792 }
14793 pub fn base(&self) -> &BaseEntityData {
14795 &self.avatar.living_entity.base
14796 }
14797 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14799 &mut self.avatar.living_entity.base
14800 }
14801 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14804 let mut values = Vec::new();
14805 self.pack_dirty_into(&mut values);
14806 if values.is_empty() { None } else { Some(values) }
14807 }
14808 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14809 self.avatar.pack_dirty_into(values);
14810 if self.player_absorption.is_dirty() {
14811 values
14812 .push(DataValue {
14813 index: 17u8,
14814 serializer_id: 3i32,
14815 value: EntityData::Float(*self.player_absorption.get()),
14816 });
14817 self.player_absorption.clear_dirty();
14818 }
14819 if self.score.is_dirty() {
14820 values
14821 .push(DataValue {
14822 index: 18u8,
14823 serializer_id: 1i32,
14824 value: EntityData::Int(*self.score.get()),
14825 });
14826 self.score.clear_dirty();
14827 }
14828 if self.shoulder_parrot_left.is_dirty() {
14829 values
14830 .push(DataValue {
14831 index: 19u8,
14832 serializer_id: 19i32,
14833 value: EntityData::OptionalUnsignedInt(
14834 self.shoulder_parrot_left.get().clone(),
14835 ),
14836 });
14837 self.shoulder_parrot_left.clear_dirty();
14838 }
14839 if self.shoulder_parrot_right.is_dirty() {
14840 values
14841 .push(DataValue {
14842 index: 20u8,
14843 serializer_id: 19i32,
14844 value: EntityData::OptionalUnsignedInt(
14845 self.shoulder_parrot_right.get().clone(),
14846 ),
14847 });
14848 self.shoulder_parrot_right.clear_dirty();
14849 }
14850 }
14851 pub fn pack_all(&self) -> Vec<DataValue> {
14853 let mut values = Vec::new();
14854 self.pack_all_into(&mut values);
14855 values
14856 }
14857 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
14858 self.avatar.pack_all_into(values);
14859 if !self.player_absorption.is_default() {
14860 values
14861 .push(DataValue {
14862 index: 17u8,
14863 serializer_id: 3i32,
14864 value: EntityData::Float(*self.player_absorption.get()),
14865 });
14866 }
14867 if !self.score.is_default() {
14868 values
14869 .push(DataValue {
14870 index: 18u8,
14871 serializer_id: 1i32,
14872 value: EntityData::Int(*self.score.get()),
14873 });
14874 }
14875 if !self.shoulder_parrot_left.is_default() {
14876 values
14877 .push(DataValue {
14878 index: 19u8,
14879 serializer_id: 19i32,
14880 value: EntityData::OptionalUnsignedInt(
14881 self.shoulder_parrot_left.get().clone(),
14882 ),
14883 });
14884 }
14885 if !self.shoulder_parrot_right.is_default() {
14886 values
14887 .push(DataValue {
14888 index: 20u8,
14889 serializer_id: 19i32,
14890 value: EntityData::OptionalUnsignedInt(
14891 self.shoulder_parrot_right.get().clone(),
14892 ),
14893 });
14894 }
14895 }
14896 pub fn is_dirty(&self) -> bool {
14898 self.avatar.is_dirty() || self.player_absorption.is_dirty()
14899 || self.score.is_dirty() || self.shoulder_parrot_left.is_dirty()
14900 || self.shoulder_parrot_right.is_dirty()
14901 }
14902}
14903impl Default for PlayerEntityData {
14904 fn default() -> Self {
14905 Self::new()
14906 }
14907}
14908impl VanillaEntityData for PlayerEntityData {
14909 fn base(&self) -> &BaseEntityData {
14910 PlayerEntityData::base(self)
14911 }
14912 fn base_mut(&mut self) -> &mut BaseEntityData {
14913 PlayerEntityData::base_mut(self)
14914 }
14915 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14916 PlayerEntityData::pack_dirty(self)
14917 }
14918 fn pack_all(&self) -> Vec<DataValue> {
14919 PlayerEntityData::pack_all(self)
14920 }
14921 fn is_dirty(&self) -> bool {
14922 PlayerEntityData::is_dirty(self)
14923 }
14924}
14925impl VanillaLivingEntityData for PlayerEntityData {
14926 fn living_entity(&self) -> &LivingEntityData {
14927 PlayerEntityData::living_entity(self)
14928 }
14929 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
14930 PlayerEntityData::living_entity_mut(self)
14931 }
14932}
14933#[derive(Debug, Clone)]
14935pub struct FishingHookEntityData {
14936 pub base: BaseEntityData,
14937 pub hooked_entity: SyncedValue<i32>,
14938 pub biting: SyncedValue<bool>,
14939}
14940impl FishingHookEntityData {
14941 pub fn new() -> Self {
14943 Self {
14944 base: BaseEntityData::new(),
14945 hooked_entity: SyncedValue::new(0i32),
14946 biting: SyncedValue::new(false),
14947 }
14948 }
14949 pub fn fishing_hook(&self) -> &FishingHookEntityData {
14951 self
14952 }
14953 pub fn fishing_hook_mut(&mut self) -> &mut FishingHookEntityData {
14955 self
14956 }
14957 pub fn base(&self) -> &BaseEntityData {
14959 &self.base
14960 }
14961 pub fn base_mut(&mut self) -> &mut BaseEntityData {
14963 &mut self.base
14964 }
14965 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
14968 let mut values = Vec::new();
14969 self.pack_dirty_into(&mut values);
14970 if values.is_empty() { None } else { Some(values) }
14971 }
14972 fn pack_dirty_into(&mut self, values: &mut Vec<DataValue>) {
14973 self.base.pack_dirty_into(values);
14974 if self.hooked_entity.is_dirty() {
14975 values
14976 .push(DataValue {
14977 index: 8u8,
14978 serializer_id: 1i32,
14979 value: EntityData::Int(*self.hooked_entity.get()),
14980 });
14981 self.hooked_entity.clear_dirty();
14982 }
14983 if self.biting.is_dirty() {
14984 values
14985 .push(DataValue {
14986 index: 9u8,
14987 serializer_id: 8i32,
14988 value: EntityData::Boolean(*self.biting.get()),
14989 });
14990 self.biting.clear_dirty();
14991 }
14992 }
14993 pub fn pack_all(&self) -> Vec<DataValue> {
14995 let mut values = Vec::new();
14996 self.pack_all_into(&mut values);
14997 values
14998 }
14999 fn pack_all_into(&self, values: &mut Vec<DataValue>) {
15000 self.base.pack_all_into(values);
15001 if !self.hooked_entity.is_default() {
15002 values
15003 .push(DataValue {
15004 index: 8u8,
15005 serializer_id: 1i32,
15006 value: EntityData::Int(*self.hooked_entity.get()),
15007 });
15008 }
15009 if !self.biting.is_default() {
15010 values
15011 .push(DataValue {
15012 index: 9u8,
15013 serializer_id: 8i32,
15014 value: EntityData::Boolean(*self.biting.get()),
15015 });
15016 }
15017 }
15018 pub fn is_dirty(&self) -> bool {
15020 self.base.is_dirty() || self.hooked_entity.is_dirty() || self.biting.is_dirty()
15021 }
15022}
15023impl Default for FishingHookEntityData {
15024 fn default() -> Self {
15025 Self::new()
15026 }
15027}
15028impl VanillaEntityData for FishingHookEntityData {
15029 fn base(&self) -> &BaseEntityData {
15030 FishingHookEntityData::base(self)
15031 }
15032 fn base_mut(&mut self) -> &mut BaseEntityData {
15033 FishingHookEntityData::base_mut(self)
15034 }
15035 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15036 FishingHookEntityData::pack_dirty(self)
15037 }
15038 fn pack_all(&self) -> Vec<DataValue> {
15039 FishingHookEntityData::pack_all(self)
15040 }
15041 fn is_dirty(&self) -> bool {
15042 FishingHookEntityData::is_dirty(self)
15043 }
15044}
15045#[derive(Debug, Clone)]
15047pub struct AcaciaBoatEntityData {
15048 pub abstract_boat: AbstractBoatEntityData,
15049}
15050impl AcaciaBoatEntityData {
15051 pub fn new() -> Self {
15053 Self {
15054 abstract_boat: AbstractBoatEntityData::new(),
15055 }
15056 }
15057 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15059 &self.abstract_boat
15060 }
15061 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15063 &mut self.abstract_boat
15064 }
15065 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15067 &self.abstract_boat.vehicle_entity
15068 }
15069 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15071 &mut self.abstract_boat.vehicle_entity
15072 }
15073 pub fn base(&self) -> &BaseEntityData {
15075 &self.abstract_boat.vehicle_entity.base
15076 }
15077 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15079 &mut self.abstract_boat.vehicle_entity.base
15080 }
15081 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15084 self.abstract_boat.pack_dirty()
15085 }
15086 pub fn pack_all(&self) -> Vec<DataValue> {
15088 self.abstract_boat.pack_all()
15089 }
15090 pub fn is_dirty(&self) -> bool {
15092 self.abstract_boat.is_dirty()
15093 }
15094}
15095impl Default for AcaciaBoatEntityData {
15096 fn default() -> Self {
15097 Self::new()
15098 }
15099}
15100impl VanillaEntityData for AcaciaBoatEntityData {
15101 fn base(&self) -> &BaseEntityData {
15102 AcaciaBoatEntityData::base(self)
15103 }
15104 fn base_mut(&mut self) -> &mut BaseEntityData {
15105 AcaciaBoatEntityData::base_mut(self)
15106 }
15107 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15108 AcaciaBoatEntityData::pack_dirty(self)
15109 }
15110 fn pack_all(&self) -> Vec<DataValue> {
15111 AcaciaBoatEntityData::pack_all(self)
15112 }
15113 fn is_dirty(&self) -> bool {
15114 AcaciaBoatEntityData::is_dirty(self)
15115 }
15116}
15117#[derive(Debug, Clone)]
15119pub struct AcaciaChestBoatEntityData {
15120 pub abstract_boat: AbstractBoatEntityData,
15121}
15122impl AcaciaChestBoatEntityData {
15123 pub fn new() -> Self {
15125 Self {
15126 abstract_boat: AbstractBoatEntityData::new(),
15127 }
15128 }
15129 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15131 &self.abstract_boat
15132 }
15133 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15135 &mut self.abstract_boat
15136 }
15137 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15139 &self.abstract_boat.vehicle_entity
15140 }
15141 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15143 &mut self.abstract_boat.vehicle_entity
15144 }
15145 pub fn base(&self) -> &BaseEntityData {
15147 &self.abstract_boat.vehicle_entity.base
15148 }
15149 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15151 &mut self.abstract_boat.vehicle_entity.base
15152 }
15153 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15156 self.abstract_boat.pack_dirty()
15157 }
15158 pub fn pack_all(&self) -> Vec<DataValue> {
15160 self.abstract_boat.pack_all()
15161 }
15162 pub fn is_dirty(&self) -> bool {
15164 self.abstract_boat.is_dirty()
15165 }
15166}
15167impl Default for AcaciaChestBoatEntityData {
15168 fn default() -> Self {
15169 Self::new()
15170 }
15171}
15172impl VanillaEntityData for AcaciaChestBoatEntityData {
15173 fn base(&self) -> &BaseEntityData {
15174 AcaciaChestBoatEntityData::base(self)
15175 }
15176 fn base_mut(&mut self) -> &mut BaseEntityData {
15177 AcaciaChestBoatEntityData::base_mut(self)
15178 }
15179 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15180 AcaciaChestBoatEntityData::pack_dirty(self)
15181 }
15182 fn pack_all(&self) -> Vec<DataValue> {
15183 AcaciaChestBoatEntityData::pack_all(self)
15184 }
15185 fn is_dirty(&self) -> bool {
15186 AcaciaChestBoatEntityData::is_dirty(self)
15187 }
15188}
15189#[derive(Debug, Clone)]
15191pub struct BambooChestRaftEntityData {
15192 pub abstract_boat: AbstractBoatEntityData,
15193}
15194impl BambooChestRaftEntityData {
15195 pub fn new() -> Self {
15197 Self {
15198 abstract_boat: AbstractBoatEntityData::new(),
15199 }
15200 }
15201 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15203 &self.abstract_boat
15204 }
15205 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15207 &mut self.abstract_boat
15208 }
15209 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15211 &self.abstract_boat.vehicle_entity
15212 }
15213 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15215 &mut self.abstract_boat.vehicle_entity
15216 }
15217 pub fn base(&self) -> &BaseEntityData {
15219 &self.abstract_boat.vehicle_entity.base
15220 }
15221 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15223 &mut self.abstract_boat.vehicle_entity.base
15224 }
15225 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15228 self.abstract_boat.pack_dirty()
15229 }
15230 pub fn pack_all(&self) -> Vec<DataValue> {
15232 self.abstract_boat.pack_all()
15233 }
15234 pub fn is_dirty(&self) -> bool {
15236 self.abstract_boat.is_dirty()
15237 }
15238}
15239impl Default for BambooChestRaftEntityData {
15240 fn default() -> Self {
15241 Self::new()
15242 }
15243}
15244impl VanillaEntityData for BambooChestRaftEntityData {
15245 fn base(&self) -> &BaseEntityData {
15246 BambooChestRaftEntityData::base(self)
15247 }
15248 fn base_mut(&mut self) -> &mut BaseEntityData {
15249 BambooChestRaftEntityData::base_mut(self)
15250 }
15251 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15252 BambooChestRaftEntityData::pack_dirty(self)
15253 }
15254 fn pack_all(&self) -> Vec<DataValue> {
15255 BambooChestRaftEntityData::pack_all(self)
15256 }
15257 fn is_dirty(&self) -> bool {
15258 BambooChestRaftEntityData::is_dirty(self)
15259 }
15260}
15261#[derive(Debug, Clone)]
15263pub struct BambooRaftEntityData {
15264 pub abstract_boat: AbstractBoatEntityData,
15265}
15266impl BambooRaftEntityData {
15267 pub fn new() -> Self {
15269 Self {
15270 abstract_boat: AbstractBoatEntityData::new(),
15271 }
15272 }
15273 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15275 &self.abstract_boat
15276 }
15277 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15279 &mut self.abstract_boat
15280 }
15281 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15283 &self.abstract_boat.vehicle_entity
15284 }
15285 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15287 &mut self.abstract_boat.vehicle_entity
15288 }
15289 pub fn base(&self) -> &BaseEntityData {
15291 &self.abstract_boat.vehicle_entity.base
15292 }
15293 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15295 &mut self.abstract_boat.vehicle_entity.base
15296 }
15297 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15300 self.abstract_boat.pack_dirty()
15301 }
15302 pub fn pack_all(&self) -> Vec<DataValue> {
15304 self.abstract_boat.pack_all()
15305 }
15306 pub fn is_dirty(&self) -> bool {
15308 self.abstract_boat.is_dirty()
15309 }
15310}
15311impl Default for BambooRaftEntityData {
15312 fn default() -> Self {
15313 Self::new()
15314 }
15315}
15316impl VanillaEntityData for BambooRaftEntityData {
15317 fn base(&self) -> &BaseEntityData {
15318 BambooRaftEntityData::base(self)
15319 }
15320 fn base_mut(&mut self) -> &mut BaseEntityData {
15321 BambooRaftEntityData::base_mut(self)
15322 }
15323 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15324 BambooRaftEntityData::pack_dirty(self)
15325 }
15326 fn pack_all(&self) -> Vec<DataValue> {
15327 BambooRaftEntityData::pack_all(self)
15328 }
15329 fn is_dirty(&self) -> bool {
15330 BambooRaftEntityData::is_dirty(self)
15331 }
15332}
15333#[derive(Debug, Clone)]
15335pub struct BirchBoatEntityData {
15336 pub abstract_boat: AbstractBoatEntityData,
15337}
15338impl BirchBoatEntityData {
15339 pub fn new() -> Self {
15341 Self {
15342 abstract_boat: AbstractBoatEntityData::new(),
15343 }
15344 }
15345 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15347 &self.abstract_boat
15348 }
15349 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15351 &mut self.abstract_boat
15352 }
15353 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15355 &self.abstract_boat.vehicle_entity
15356 }
15357 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15359 &mut self.abstract_boat.vehicle_entity
15360 }
15361 pub fn base(&self) -> &BaseEntityData {
15363 &self.abstract_boat.vehicle_entity.base
15364 }
15365 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15367 &mut self.abstract_boat.vehicle_entity.base
15368 }
15369 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15372 self.abstract_boat.pack_dirty()
15373 }
15374 pub fn pack_all(&self) -> Vec<DataValue> {
15376 self.abstract_boat.pack_all()
15377 }
15378 pub fn is_dirty(&self) -> bool {
15380 self.abstract_boat.is_dirty()
15381 }
15382}
15383impl Default for BirchBoatEntityData {
15384 fn default() -> Self {
15385 Self::new()
15386 }
15387}
15388impl VanillaEntityData for BirchBoatEntityData {
15389 fn base(&self) -> &BaseEntityData {
15390 BirchBoatEntityData::base(self)
15391 }
15392 fn base_mut(&mut self) -> &mut BaseEntityData {
15393 BirchBoatEntityData::base_mut(self)
15394 }
15395 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15396 BirchBoatEntityData::pack_dirty(self)
15397 }
15398 fn pack_all(&self) -> Vec<DataValue> {
15399 BirchBoatEntityData::pack_all(self)
15400 }
15401 fn is_dirty(&self) -> bool {
15402 BirchBoatEntityData::is_dirty(self)
15403 }
15404}
15405#[derive(Debug, Clone)]
15407pub struct BirchChestBoatEntityData {
15408 pub abstract_boat: AbstractBoatEntityData,
15409}
15410impl BirchChestBoatEntityData {
15411 pub fn new() -> Self {
15413 Self {
15414 abstract_boat: AbstractBoatEntityData::new(),
15415 }
15416 }
15417 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15419 &self.abstract_boat
15420 }
15421 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15423 &mut self.abstract_boat
15424 }
15425 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15427 &self.abstract_boat.vehicle_entity
15428 }
15429 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15431 &mut self.abstract_boat.vehicle_entity
15432 }
15433 pub fn base(&self) -> &BaseEntityData {
15435 &self.abstract_boat.vehicle_entity.base
15436 }
15437 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15439 &mut self.abstract_boat.vehicle_entity.base
15440 }
15441 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15444 self.abstract_boat.pack_dirty()
15445 }
15446 pub fn pack_all(&self) -> Vec<DataValue> {
15448 self.abstract_boat.pack_all()
15449 }
15450 pub fn is_dirty(&self) -> bool {
15452 self.abstract_boat.is_dirty()
15453 }
15454}
15455impl Default for BirchChestBoatEntityData {
15456 fn default() -> Self {
15457 Self::new()
15458 }
15459}
15460impl VanillaEntityData for BirchChestBoatEntityData {
15461 fn base(&self) -> &BaseEntityData {
15462 BirchChestBoatEntityData::base(self)
15463 }
15464 fn base_mut(&mut self) -> &mut BaseEntityData {
15465 BirchChestBoatEntityData::base_mut(self)
15466 }
15467 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15468 BirchChestBoatEntityData::pack_dirty(self)
15469 }
15470 fn pack_all(&self) -> Vec<DataValue> {
15471 BirchChestBoatEntityData::pack_all(self)
15472 }
15473 fn is_dirty(&self) -> bool {
15474 BirchChestBoatEntityData::is_dirty(self)
15475 }
15476}
15477#[derive(Debug, Clone)]
15479pub struct BreezeEntityData {
15480 pub mob: MobEntityData,
15481}
15482impl BreezeEntityData {
15483 pub fn new() -> Self {
15485 Self { mob: MobEntityData::new() }
15486 }
15487 pub fn mob(&self) -> &MobEntityData {
15489 &self.mob
15490 }
15491 pub fn mob_mut(&mut self) -> &mut MobEntityData {
15493 &mut self.mob
15494 }
15495 pub fn living_entity(&self) -> &LivingEntityData {
15497 &self.mob.living_entity
15498 }
15499 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15501 &mut self.mob.living_entity
15502 }
15503 pub fn base(&self) -> &BaseEntityData {
15505 &self.mob.living_entity.base
15506 }
15507 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15509 &mut self.mob.living_entity.base
15510 }
15511 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15514 self.mob.pack_dirty()
15515 }
15516 pub fn pack_all(&self) -> Vec<DataValue> {
15518 self.mob.pack_all()
15519 }
15520 pub fn is_dirty(&self) -> bool {
15522 self.mob.is_dirty()
15523 }
15524}
15525impl Default for BreezeEntityData {
15526 fn default() -> Self {
15527 Self::new()
15528 }
15529}
15530impl VanillaEntityData for BreezeEntityData {
15531 fn base(&self) -> &BaseEntityData {
15532 BreezeEntityData::base(self)
15533 }
15534 fn base_mut(&mut self) -> &mut BaseEntityData {
15535 BreezeEntityData::base_mut(self)
15536 }
15537 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15538 BreezeEntityData::pack_dirty(self)
15539 }
15540 fn pack_all(&self) -> Vec<DataValue> {
15541 BreezeEntityData::pack_all(self)
15542 }
15543 fn is_dirty(&self) -> bool {
15544 BreezeEntityData::is_dirty(self)
15545 }
15546}
15547impl VanillaLivingEntityData for BreezeEntityData {
15548 fn living_entity(&self) -> &LivingEntityData {
15549 BreezeEntityData::living_entity(self)
15550 }
15551 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15552 BreezeEntityData::living_entity_mut(self)
15553 }
15554}
15555#[derive(Debug, Clone)]
15557pub struct BreezeWindChargeEntityData {
15558 pub base: BaseEntityData,
15559}
15560impl BreezeWindChargeEntityData {
15561 pub fn new() -> Self {
15563 Self {
15564 base: BaseEntityData::new(),
15565 }
15566 }
15567 pub fn base(&self) -> &BaseEntityData {
15569 &self.base
15570 }
15571 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15573 &mut self.base
15574 }
15575 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15578 self.base.pack_dirty()
15579 }
15580 pub fn pack_all(&self) -> Vec<DataValue> {
15582 self.base.pack_all()
15583 }
15584 pub fn is_dirty(&self) -> bool {
15586 self.base.is_dirty()
15587 }
15588}
15589impl Default for BreezeWindChargeEntityData {
15590 fn default() -> Self {
15591 Self::new()
15592 }
15593}
15594impl VanillaEntityData for BreezeWindChargeEntityData {
15595 fn base(&self) -> &BaseEntityData {
15596 BreezeWindChargeEntityData::base(self)
15597 }
15598 fn base_mut(&mut self) -> &mut BaseEntityData {
15599 BreezeWindChargeEntityData::base_mut(self)
15600 }
15601 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15602 BreezeWindChargeEntityData::pack_dirty(self)
15603 }
15604 fn pack_all(&self) -> Vec<DataValue> {
15605 BreezeWindChargeEntityData::pack_all(self)
15606 }
15607 fn is_dirty(&self) -> bool {
15608 BreezeWindChargeEntityData::is_dirty(self)
15609 }
15610}
15611#[derive(Debug, Clone)]
15613pub struct CamelHuskEntityData {
15614 pub camel: CamelEntityData,
15615}
15616impl CamelHuskEntityData {
15617 pub fn new() -> Self {
15619 Self {
15620 camel: CamelEntityData::new(),
15621 }
15622 }
15623 pub fn camel(&self) -> &CamelEntityData {
15625 &self.camel
15626 }
15627 pub fn camel_mut(&mut self) -> &mut CamelEntityData {
15629 &mut self.camel
15630 }
15631 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
15633 &self.camel.abstract_horse
15634 }
15635 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
15637 &mut self.camel.abstract_horse
15638 }
15639 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
15641 &self.camel.abstract_horse.ageable_mob
15642 }
15643 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
15645 &mut self.camel.abstract_horse.ageable_mob
15646 }
15647 pub fn mob(&self) -> &MobEntityData {
15649 &self.camel.abstract_horse.ageable_mob.mob
15650 }
15651 pub fn mob_mut(&mut self) -> &mut MobEntityData {
15653 &mut self.camel.abstract_horse.ageable_mob.mob
15654 }
15655 pub fn living_entity(&self) -> &LivingEntityData {
15657 &self.camel.abstract_horse.ageable_mob.mob.living_entity
15658 }
15659 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15661 &mut self.camel.abstract_horse.ageable_mob.mob.living_entity
15662 }
15663 pub fn base(&self) -> &BaseEntityData {
15665 &self.camel.abstract_horse.ageable_mob.mob.living_entity.base
15666 }
15667 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15669 &mut self.camel.abstract_horse.ageable_mob.mob.living_entity.base
15670 }
15671 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15674 self.camel.pack_dirty()
15675 }
15676 pub fn pack_all(&self) -> Vec<DataValue> {
15678 self.camel.pack_all()
15679 }
15680 pub fn is_dirty(&self) -> bool {
15682 self.camel.is_dirty()
15683 }
15684}
15685impl Default for CamelHuskEntityData {
15686 fn default() -> Self {
15687 Self::new()
15688 }
15689}
15690impl VanillaEntityData for CamelHuskEntityData {
15691 fn base(&self) -> &BaseEntityData {
15692 CamelHuskEntityData::base(self)
15693 }
15694 fn base_mut(&mut self) -> &mut BaseEntityData {
15695 CamelHuskEntityData::base_mut(self)
15696 }
15697 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15698 CamelHuskEntityData::pack_dirty(self)
15699 }
15700 fn pack_all(&self) -> Vec<DataValue> {
15701 CamelHuskEntityData::pack_all(self)
15702 }
15703 fn is_dirty(&self) -> bool {
15704 CamelHuskEntityData::is_dirty(self)
15705 }
15706}
15707impl VanillaLivingEntityData for CamelHuskEntityData {
15708 fn living_entity(&self) -> &LivingEntityData {
15709 CamelHuskEntityData::living_entity(self)
15710 }
15711 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15712 CamelHuskEntityData::living_entity_mut(self)
15713 }
15714}
15715#[derive(Debug, Clone)]
15717pub struct CaveSpiderEntityData {
15718 pub spider: SpiderEntityData,
15719}
15720impl CaveSpiderEntityData {
15721 pub fn new() -> Self {
15723 Self {
15724 spider: SpiderEntityData::new(),
15725 }
15726 }
15727 pub fn spider(&self) -> &SpiderEntityData {
15729 &self.spider
15730 }
15731 pub fn spider_mut(&mut self) -> &mut SpiderEntityData {
15733 &mut self.spider
15734 }
15735 pub fn mob(&self) -> &MobEntityData {
15737 &self.spider.mob
15738 }
15739 pub fn mob_mut(&mut self) -> &mut MobEntityData {
15741 &mut self.spider.mob
15742 }
15743 pub fn living_entity(&self) -> &LivingEntityData {
15745 &self.spider.mob.living_entity
15746 }
15747 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15749 &mut self.spider.mob.living_entity
15750 }
15751 pub fn base(&self) -> &BaseEntityData {
15753 &self.spider.mob.living_entity.base
15754 }
15755 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15757 &mut self.spider.mob.living_entity.base
15758 }
15759 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15762 self.spider.pack_dirty()
15763 }
15764 pub fn pack_all(&self) -> Vec<DataValue> {
15766 self.spider.pack_all()
15767 }
15768 pub fn is_dirty(&self) -> bool {
15770 self.spider.is_dirty()
15771 }
15772}
15773impl Default for CaveSpiderEntityData {
15774 fn default() -> Self {
15775 Self::new()
15776 }
15777}
15778impl VanillaEntityData for CaveSpiderEntityData {
15779 fn base(&self) -> &BaseEntityData {
15780 CaveSpiderEntityData::base(self)
15781 }
15782 fn base_mut(&mut self) -> &mut BaseEntityData {
15783 CaveSpiderEntityData::base_mut(self)
15784 }
15785 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15786 CaveSpiderEntityData::pack_dirty(self)
15787 }
15788 fn pack_all(&self) -> Vec<DataValue> {
15789 CaveSpiderEntityData::pack_all(self)
15790 }
15791 fn is_dirty(&self) -> bool {
15792 CaveSpiderEntityData::is_dirty(self)
15793 }
15794}
15795impl VanillaLivingEntityData for CaveSpiderEntityData {
15796 fn living_entity(&self) -> &LivingEntityData {
15797 CaveSpiderEntityData::living_entity(self)
15798 }
15799 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
15800 CaveSpiderEntityData::living_entity_mut(self)
15801 }
15802}
15803#[derive(Debug, Clone)]
15805pub struct CherryBoatEntityData {
15806 pub abstract_boat: AbstractBoatEntityData,
15807}
15808impl CherryBoatEntityData {
15809 pub fn new() -> Self {
15811 Self {
15812 abstract_boat: AbstractBoatEntityData::new(),
15813 }
15814 }
15815 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15817 &self.abstract_boat
15818 }
15819 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15821 &mut self.abstract_boat
15822 }
15823 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15825 &self.abstract_boat.vehicle_entity
15826 }
15827 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15829 &mut self.abstract_boat.vehicle_entity
15830 }
15831 pub fn base(&self) -> &BaseEntityData {
15833 &self.abstract_boat.vehicle_entity.base
15834 }
15835 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15837 &mut self.abstract_boat.vehicle_entity.base
15838 }
15839 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15842 self.abstract_boat.pack_dirty()
15843 }
15844 pub fn pack_all(&self) -> Vec<DataValue> {
15846 self.abstract_boat.pack_all()
15847 }
15848 pub fn is_dirty(&self) -> bool {
15850 self.abstract_boat.is_dirty()
15851 }
15852}
15853impl Default for CherryBoatEntityData {
15854 fn default() -> Self {
15855 Self::new()
15856 }
15857}
15858impl VanillaEntityData for CherryBoatEntityData {
15859 fn base(&self) -> &BaseEntityData {
15860 CherryBoatEntityData::base(self)
15861 }
15862 fn base_mut(&mut self) -> &mut BaseEntityData {
15863 CherryBoatEntityData::base_mut(self)
15864 }
15865 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15866 CherryBoatEntityData::pack_dirty(self)
15867 }
15868 fn pack_all(&self) -> Vec<DataValue> {
15869 CherryBoatEntityData::pack_all(self)
15870 }
15871 fn is_dirty(&self) -> bool {
15872 CherryBoatEntityData::is_dirty(self)
15873 }
15874}
15875#[derive(Debug, Clone)]
15877pub struct CherryChestBoatEntityData {
15878 pub abstract_boat: AbstractBoatEntityData,
15879}
15880impl CherryChestBoatEntityData {
15881 pub fn new() -> Self {
15883 Self {
15884 abstract_boat: AbstractBoatEntityData::new(),
15885 }
15886 }
15887 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
15889 &self.abstract_boat
15890 }
15891 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
15893 &mut self.abstract_boat
15894 }
15895 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15897 &self.abstract_boat.vehicle_entity
15898 }
15899 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15901 &mut self.abstract_boat.vehicle_entity
15902 }
15903 pub fn base(&self) -> &BaseEntityData {
15905 &self.abstract_boat.vehicle_entity.base
15906 }
15907 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15909 &mut self.abstract_boat.vehicle_entity.base
15910 }
15911 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15914 self.abstract_boat.pack_dirty()
15915 }
15916 pub fn pack_all(&self) -> Vec<DataValue> {
15918 self.abstract_boat.pack_all()
15919 }
15920 pub fn is_dirty(&self) -> bool {
15922 self.abstract_boat.is_dirty()
15923 }
15924}
15925impl Default for CherryChestBoatEntityData {
15926 fn default() -> Self {
15927 Self::new()
15928 }
15929}
15930impl VanillaEntityData for CherryChestBoatEntityData {
15931 fn base(&self) -> &BaseEntityData {
15932 CherryChestBoatEntityData::base(self)
15933 }
15934 fn base_mut(&mut self) -> &mut BaseEntityData {
15935 CherryChestBoatEntityData::base_mut(self)
15936 }
15937 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15938 CherryChestBoatEntityData::pack_dirty(self)
15939 }
15940 fn pack_all(&self) -> Vec<DataValue> {
15941 CherryChestBoatEntityData::pack_all(self)
15942 }
15943 fn is_dirty(&self) -> bool {
15944 CherryChestBoatEntityData::is_dirty(self)
15945 }
15946}
15947#[derive(Debug, Clone)]
15949pub struct ChestMinecartEntityData {
15950 pub abstract_minecart: AbstractMinecartEntityData,
15951}
15952impl ChestMinecartEntityData {
15953 pub fn new() -> Self {
15955 Self {
15956 abstract_minecart: AbstractMinecartEntityData::new(),
15957 }
15958 }
15959 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
15961 &self.abstract_minecart
15962 }
15963 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
15965 &mut self.abstract_minecart
15966 }
15967 pub fn vehicle_entity(&self) -> &VehicleEntityData {
15969 &self.abstract_minecart.vehicle_entity
15970 }
15971 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
15973 &mut self.abstract_minecart.vehicle_entity
15974 }
15975 pub fn base(&self) -> &BaseEntityData {
15977 &self.abstract_minecart.vehicle_entity.base
15978 }
15979 pub fn base_mut(&mut self) -> &mut BaseEntityData {
15981 &mut self.abstract_minecart.vehicle_entity.base
15982 }
15983 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
15986 self.abstract_minecart.pack_dirty()
15987 }
15988 pub fn pack_all(&self) -> Vec<DataValue> {
15990 self.abstract_minecart.pack_all()
15991 }
15992 pub fn is_dirty(&self) -> bool {
15994 self.abstract_minecart.is_dirty()
15995 }
15996}
15997impl Default for ChestMinecartEntityData {
15998 fn default() -> Self {
15999 Self::new()
16000 }
16001}
16002impl VanillaEntityData for ChestMinecartEntityData {
16003 fn base(&self) -> &BaseEntityData {
16004 ChestMinecartEntityData::base(self)
16005 }
16006 fn base_mut(&mut self) -> &mut BaseEntityData {
16007 ChestMinecartEntityData::base_mut(self)
16008 }
16009 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16010 ChestMinecartEntityData::pack_dirty(self)
16011 }
16012 fn pack_all(&self) -> Vec<DataValue> {
16013 ChestMinecartEntityData::pack_all(self)
16014 }
16015 fn is_dirty(&self) -> bool {
16016 ChestMinecartEntityData::is_dirty(self)
16017 }
16018}
16019#[derive(Debug, Clone)]
16021pub struct CodEntityData {
16022 pub abstract_fish: AbstractFishEntityData,
16023}
16024impl CodEntityData {
16025 pub fn new() -> Self {
16027 Self {
16028 abstract_fish: AbstractFishEntityData::new(),
16029 }
16030 }
16031 pub fn abstract_fish(&self) -> &AbstractFishEntityData {
16033 &self.abstract_fish
16034 }
16035 pub fn abstract_fish_mut(&mut self) -> &mut AbstractFishEntityData {
16037 &mut self.abstract_fish
16038 }
16039 pub fn mob(&self) -> &MobEntityData {
16041 &self.abstract_fish.mob
16042 }
16043 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16045 &mut self.abstract_fish.mob
16046 }
16047 pub fn living_entity(&self) -> &LivingEntityData {
16049 &self.abstract_fish.mob.living_entity
16050 }
16051 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16053 &mut self.abstract_fish.mob.living_entity
16054 }
16055 pub fn base(&self) -> &BaseEntityData {
16057 &self.abstract_fish.mob.living_entity.base
16058 }
16059 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16061 &mut self.abstract_fish.mob.living_entity.base
16062 }
16063 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16066 self.abstract_fish.pack_dirty()
16067 }
16068 pub fn pack_all(&self) -> Vec<DataValue> {
16070 self.abstract_fish.pack_all()
16071 }
16072 pub fn is_dirty(&self) -> bool {
16074 self.abstract_fish.is_dirty()
16075 }
16076}
16077impl Default for CodEntityData {
16078 fn default() -> Self {
16079 Self::new()
16080 }
16081}
16082impl VanillaEntityData for CodEntityData {
16083 fn base(&self) -> &BaseEntityData {
16084 CodEntityData::base(self)
16085 }
16086 fn base_mut(&mut self) -> &mut BaseEntityData {
16087 CodEntityData::base_mut(self)
16088 }
16089 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16090 CodEntityData::pack_dirty(self)
16091 }
16092 fn pack_all(&self) -> Vec<DataValue> {
16093 CodEntityData::pack_all(self)
16094 }
16095 fn is_dirty(&self) -> bool {
16096 CodEntityData::is_dirty(self)
16097 }
16098}
16099impl VanillaLivingEntityData for CodEntityData {
16100 fn living_entity(&self) -> &LivingEntityData {
16101 CodEntityData::living_entity(self)
16102 }
16103 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16104 CodEntityData::living_entity_mut(self)
16105 }
16106}
16107#[derive(Debug, Clone)]
16109pub struct CommandBlockMinecartEntityData {
16110 pub minecart_command_block: MinecartCommandBlockEntityData,
16111}
16112impl CommandBlockMinecartEntityData {
16113 pub fn new() -> Self {
16115 let mut data = MinecartCommandBlockEntityData::new();
16116 data.abstract_minecart.id_display_offset = SyncedValue::new(6i32);
16117 Self {
16118 minecart_command_block: data,
16119 }
16120 }
16121 pub fn minecart_command_block(&self) -> &MinecartCommandBlockEntityData {
16123 &self.minecart_command_block
16124 }
16125 pub fn minecart_command_block_mut(&mut self) -> &mut MinecartCommandBlockEntityData {
16127 &mut self.minecart_command_block
16128 }
16129 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
16131 &self.minecart_command_block.abstract_minecart
16132 }
16133 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
16135 &mut self.minecart_command_block.abstract_minecart
16136 }
16137 pub fn vehicle_entity(&self) -> &VehicleEntityData {
16139 &self.minecart_command_block.abstract_minecart.vehicle_entity
16140 }
16141 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
16143 &mut self.minecart_command_block.abstract_minecart.vehicle_entity
16144 }
16145 pub fn base(&self) -> &BaseEntityData {
16147 &self.minecart_command_block.abstract_minecart.vehicle_entity.base
16148 }
16149 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16151 &mut self.minecart_command_block.abstract_minecart.vehicle_entity.base
16152 }
16153 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16156 self.minecart_command_block.pack_dirty()
16157 }
16158 pub fn pack_all(&self) -> Vec<DataValue> {
16160 self.minecart_command_block.pack_all()
16161 }
16162 pub fn is_dirty(&self) -> bool {
16164 self.minecart_command_block.is_dirty()
16165 }
16166}
16167impl Default for CommandBlockMinecartEntityData {
16168 fn default() -> Self {
16169 Self::new()
16170 }
16171}
16172impl VanillaEntityData for CommandBlockMinecartEntityData {
16173 fn base(&self) -> &BaseEntityData {
16174 CommandBlockMinecartEntityData::base(self)
16175 }
16176 fn base_mut(&mut self) -> &mut BaseEntityData {
16177 CommandBlockMinecartEntityData::base_mut(self)
16178 }
16179 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16180 CommandBlockMinecartEntityData::pack_dirty(self)
16181 }
16182 fn pack_all(&self) -> Vec<DataValue> {
16183 CommandBlockMinecartEntityData::pack_all(self)
16184 }
16185 fn is_dirty(&self) -> bool {
16186 CommandBlockMinecartEntityData::is_dirty(self)
16187 }
16188}
16189#[derive(Debug, Clone)]
16191pub struct DarkOakBoatEntityData {
16192 pub abstract_boat: AbstractBoatEntityData,
16193}
16194impl DarkOakBoatEntityData {
16195 pub fn new() -> Self {
16197 Self {
16198 abstract_boat: AbstractBoatEntityData::new(),
16199 }
16200 }
16201 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
16203 &self.abstract_boat
16204 }
16205 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
16207 &mut self.abstract_boat
16208 }
16209 pub fn vehicle_entity(&self) -> &VehicleEntityData {
16211 &self.abstract_boat.vehicle_entity
16212 }
16213 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
16215 &mut self.abstract_boat.vehicle_entity
16216 }
16217 pub fn base(&self) -> &BaseEntityData {
16219 &self.abstract_boat.vehicle_entity.base
16220 }
16221 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16223 &mut self.abstract_boat.vehicle_entity.base
16224 }
16225 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16228 self.abstract_boat.pack_dirty()
16229 }
16230 pub fn pack_all(&self) -> Vec<DataValue> {
16232 self.abstract_boat.pack_all()
16233 }
16234 pub fn is_dirty(&self) -> bool {
16236 self.abstract_boat.is_dirty()
16237 }
16238}
16239impl Default for DarkOakBoatEntityData {
16240 fn default() -> Self {
16241 Self::new()
16242 }
16243}
16244impl VanillaEntityData for DarkOakBoatEntityData {
16245 fn base(&self) -> &BaseEntityData {
16246 DarkOakBoatEntityData::base(self)
16247 }
16248 fn base_mut(&mut self) -> &mut BaseEntityData {
16249 DarkOakBoatEntityData::base_mut(self)
16250 }
16251 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16252 DarkOakBoatEntityData::pack_dirty(self)
16253 }
16254 fn pack_all(&self) -> Vec<DataValue> {
16255 DarkOakBoatEntityData::pack_all(self)
16256 }
16257 fn is_dirty(&self) -> bool {
16258 DarkOakBoatEntityData::is_dirty(self)
16259 }
16260}
16261#[derive(Debug, Clone)]
16263pub struct DarkOakChestBoatEntityData {
16264 pub abstract_boat: AbstractBoatEntityData,
16265}
16266impl DarkOakChestBoatEntityData {
16267 pub fn new() -> Self {
16269 Self {
16270 abstract_boat: AbstractBoatEntityData::new(),
16271 }
16272 }
16273 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
16275 &self.abstract_boat
16276 }
16277 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
16279 &mut self.abstract_boat
16280 }
16281 pub fn vehicle_entity(&self) -> &VehicleEntityData {
16283 &self.abstract_boat.vehicle_entity
16284 }
16285 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
16287 &mut self.abstract_boat.vehicle_entity
16288 }
16289 pub fn base(&self) -> &BaseEntityData {
16291 &self.abstract_boat.vehicle_entity.base
16292 }
16293 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16295 &mut self.abstract_boat.vehicle_entity.base
16296 }
16297 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16300 self.abstract_boat.pack_dirty()
16301 }
16302 pub fn pack_all(&self) -> Vec<DataValue> {
16304 self.abstract_boat.pack_all()
16305 }
16306 pub fn is_dirty(&self) -> bool {
16308 self.abstract_boat.is_dirty()
16309 }
16310}
16311impl Default for DarkOakChestBoatEntityData {
16312 fn default() -> Self {
16313 Self::new()
16314 }
16315}
16316impl VanillaEntityData for DarkOakChestBoatEntityData {
16317 fn base(&self) -> &BaseEntityData {
16318 DarkOakChestBoatEntityData::base(self)
16319 }
16320 fn base_mut(&mut self) -> &mut BaseEntityData {
16321 DarkOakChestBoatEntityData::base_mut(self)
16322 }
16323 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16324 DarkOakChestBoatEntityData::pack_dirty(self)
16325 }
16326 fn pack_all(&self) -> Vec<DataValue> {
16327 DarkOakChestBoatEntityData::pack_all(self)
16328 }
16329 fn is_dirty(&self) -> bool {
16330 DarkOakChestBoatEntityData::is_dirty(self)
16331 }
16332}
16333#[derive(Debug, Clone)]
16335pub struct DonkeyEntityData {
16336 pub abstract_chested_horse: AbstractChestedHorseEntityData,
16337}
16338impl DonkeyEntityData {
16339 pub fn new() -> Self {
16341 Self {
16342 abstract_chested_horse: AbstractChestedHorseEntityData::new(),
16343 }
16344 }
16345 pub fn abstract_chested_horse(&self) -> &AbstractChestedHorseEntityData {
16347 &self.abstract_chested_horse
16348 }
16349 pub fn abstract_chested_horse_mut(&mut self) -> &mut AbstractChestedHorseEntityData {
16351 &mut self.abstract_chested_horse
16352 }
16353 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
16355 &self.abstract_chested_horse.abstract_horse
16356 }
16357 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
16359 &mut self.abstract_chested_horse.abstract_horse
16360 }
16361 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
16363 &self.abstract_chested_horse.abstract_horse.ageable_mob
16364 }
16365 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
16367 &mut self.abstract_chested_horse.abstract_horse.ageable_mob
16368 }
16369 pub fn mob(&self) -> &MobEntityData {
16371 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob
16372 }
16373 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16375 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob
16376 }
16377 pub fn living_entity(&self) -> &LivingEntityData {
16379 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
16380 }
16381 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16383 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
16384 }
16385 pub fn base(&self) -> &BaseEntityData {
16387 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity.base
16388 }
16389 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16391 &mut self
16392 .abstract_chested_horse
16393 .abstract_horse
16394 .ageable_mob
16395 .mob
16396 .living_entity
16397 .base
16398 }
16399 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16402 self.abstract_chested_horse.pack_dirty()
16403 }
16404 pub fn pack_all(&self) -> Vec<DataValue> {
16406 self.abstract_chested_horse.pack_all()
16407 }
16408 pub fn is_dirty(&self) -> bool {
16410 self.abstract_chested_horse.is_dirty()
16411 }
16412}
16413impl Default for DonkeyEntityData {
16414 fn default() -> Self {
16415 Self::new()
16416 }
16417}
16418impl VanillaEntityData for DonkeyEntityData {
16419 fn base(&self) -> &BaseEntityData {
16420 DonkeyEntityData::base(self)
16421 }
16422 fn base_mut(&mut self) -> &mut BaseEntityData {
16423 DonkeyEntityData::base_mut(self)
16424 }
16425 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16426 DonkeyEntityData::pack_dirty(self)
16427 }
16428 fn pack_all(&self) -> Vec<DataValue> {
16429 DonkeyEntityData::pack_all(self)
16430 }
16431 fn is_dirty(&self) -> bool {
16432 DonkeyEntityData::is_dirty(self)
16433 }
16434}
16435impl VanillaLivingEntityData for DonkeyEntityData {
16436 fn living_entity(&self) -> &LivingEntityData {
16437 DonkeyEntityData::living_entity(self)
16438 }
16439 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16440 DonkeyEntityData::living_entity_mut(self)
16441 }
16442}
16443#[derive(Debug, Clone)]
16445pub struct DragonFireballEntityData {
16446 pub base: BaseEntityData,
16447}
16448impl DragonFireballEntityData {
16449 pub fn new() -> Self {
16451 Self {
16452 base: BaseEntityData::new(),
16453 }
16454 }
16455 pub fn base(&self) -> &BaseEntityData {
16457 &self.base
16458 }
16459 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16461 &mut self.base
16462 }
16463 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16466 self.base.pack_dirty()
16467 }
16468 pub fn pack_all(&self) -> Vec<DataValue> {
16470 self.base.pack_all()
16471 }
16472 pub fn is_dirty(&self) -> bool {
16474 self.base.is_dirty()
16475 }
16476}
16477impl Default for DragonFireballEntityData {
16478 fn default() -> Self {
16479 Self::new()
16480 }
16481}
16482impl VanillaEntityData for DragonFireballEntityData {
16483 fn base(&self) -> &BaseEntityData {
16484 DragonFireballEntityData::base(self)
16485 }
16486 fn base_mut(&mut self) -> &mut BaseEntityData {
16487 DragonFireballEntityData::base_mut(self)
16488 }
16489 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16490 DragonFireballEntityData::pack_dirty(self)
16491 }
16492 fn pack_all(&self) -> Vec<DataValue> {
16493 DragonFireballEntityData::pack_all(self)
16494 }
16495 fn is_dirty(&self) -> bool {
16496 DragonFireballEntityData::is_dirty(self)
16497 }
16498}
16499#[derive(Debug, Clone)]
16501pub struct DrownedEntityData {
16502 pub zombie: ZombieEntityData,
16503}
16504impl DrownedEntityData {
16505 pub fn new() -> Self {
16507 Self {
16508 zombie: ZombieEntityData::new(),
16509 }
16510 }
16511 pub fn zombie(&self) -> &ZombieEntityData {
16513 &self.zombie
16514 }
16515 pub fn zombie_mut(&mut self) -> &mut ZombieEntityData {
16517 &mut self.zombie
16518 }
16519 pub fn mob(&self) -> &MobEntityData {
16521 &self.zombie.mob
16522 }
16523 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16525 &mut self.zombie.mob
16526 }
16527 pub fn living_entity(&self) -> &LivingEntityData {
16529 &self.zombie.mob.living_entity
16530 }
16531 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16533 &mut self.zombie.mob.living_entity
16534 }
16535 pub fn base(&self) -> &BaseEntityData {
16537 &self.zombie.mob.living_entity.base
16538 }
16539 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16541 &mut self.zombie.mob.living_entity.base
16542 }
16543 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16546 self.zombie.pack_dirty()
16547 }
16548 pub fn pack_all(&self) -> Vec<DataValue> {
16550 self.zombie.pack_all()
16551 }
16552 pub fn is_dirty(&self) -> bool {
16554 self.zombie.is_dirty()
16555 }
16556}
16557impl Default for DrownedEntityData {
16558 fn default() -> Self {
16559 Self::new()
16560 }
16561}
16562impl VanillaEntityData for DrownedEntityData {
16563 fn base(&self) -> &BaseEntityData {
16564 DrownedEntityData::base(self)
16565 }
16566 fn base_mut(&mut self) -> &mut BaseEntityData {
16567 DrownedEntityData::base_mut(self)
16568 }
16569 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16570 DrownedEntityData::pack_dirty(self)
16571 }
16572 fn pack_all(&self) -> Vec<DataValue> {
16573 DrownedEntityData::pack_all(self)
16574 }
16575 fn is_dirty(&self) -> bool {
16576 DrownedEntityData::is_dirty(self)
16577 }
16578}
16579impl VanillaLivingEntityData for DrownedEntityData {
16580 fn living_entity(&self) -> &LivingEntityData {
16581 DrownedEntityData::living_entity(self)
16582 }
16583 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16584 DrownedEntityData::living_entity_mut(self)
16585 }
16586}
16587#[derive(Debug, Clone)]
16589pub struct EggEntityData {
16590 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
16591}
16592impl EggEntityData {
16593 pub fn new() -> Self {
16595 Self {
16596 throwable_item_projectile: ThrowableItemProjectileEntityData::new(),
16597 }
16598 }
16599 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
16601 &self.throwable_item_projectile
16602 }
16603 pub fn throwable_item_projectile_mut(
16605 &mut self,
16606 ) -> &mut ThrowableItemProjectileEntityData {
16607 &mut self.throwable_item_projectile
16608 }
16609 pub fn base(&self) -> &BaseEntityData {
16611 &self.throwable_item_projectile.base
16612 }
16613 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16615 &mut self.throwable_item_projectile.base
16616 }
16617 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16620 self.throwable_item_projectile.pack_dirty()
16621 }
16622 pub fn pack_all(&self) -> Vec<DataValue> {
16624 self.throwable_item_projectile.pack_all()
16625 }
16626 pub fn is_dirty(&self) -> bool {
16628 self.throwable_item_projectile.is_dirty()
16629 }
16630}
16631impl Default for EggEntityData {
16632 fn default() -> Self {
16633 Self::new()
16634 }
16635}
16636impl VanillaEntityData for EggEntityData {
16637 fn base(&self) -> &BaseEntityData {
16638 EggEntityData::base(self)
16639 }
16640 fn base_mut(&mut self) -> &mut BaseEntityData {
16641 EggEntityData::base_mut(self)
16642 }
16643 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16644 EggEntityData::pack_dirty(self)
16645 }
16646 fn pack_all(&self) -> Vec<DataValue> {
16647 EggEntityData::pack_all(self)
16648 }
16649 fn is_dirty(&self) -> bool {
16650 EggEntityData::is_dirty(self)
16651 }
16652}
16653#[derive(Debug, Clone)]
16655pub struct ElderGuardianEntityData {
16656 pub guardian: GuardianEntityData,
16657}
16658impl ElderGuardianEntityData {
16659 pub fn new() -> Self {
16661 Self {
16662 guardian: GuardianEntityData::new(),
16663 }
16664 }
16665 pub fn guardian(&self) -> &GuardianEntityData {
16667 &self.guardian
16668 }
16669 pub fn guardian_mut(&mut self) -> &mut GuardianEntityData {
16671 &mut self.guardian
16672 }
16673 pub fn mob(&self) -> &MobEntityData {
16675 &self.guardian.mob
16676 }
16677 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16679 &mut self.guardian.mob
16680 }
16681 pub fn living_entity(&self) -> &LivingEntityData {
16683 &self.guardian.mob.living_entity
16684 }
16685 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16687 &mut self.guardian.mob.living_entity
16688 }
16689 pub fn base(&self) -> &BaseEntityData {
16691 &self.guardian.mob.living_entity.base
16692 }
16693 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16695 &mut self.guardian.mob.living_entity.base
16696 }
16697 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16700 self.guardian.pack_dirty()
16701 }
16702 pub fn pack_all(&self) -> Vec<DataValue> {
16704 self.guardian.pack_all()
16705 }
16706 pub fn is_dirty(&self) -> bool {
16708 self.guardian.is_dirty()
16709 }
16710}
16711impl Default for ElderGuardianEntityData {
16712 fn default() -> Self {
16713 Self::new()
16714 }
16715}
16716impl VanillaEntityData for ElderGuardianEntityData {
16717 fn base(&self) -> &BaseEntityData {
16718 ElderGuardianEntityData::base(self)
16719 }
16720 fn base_mut(&mut self) -> &mut BaseEntityData {
16721 ElderGuardianEntityData::base_mut(self)
16722 }
16723 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16724 ElderGuardianEntityData::pack_dirty(self)
16725 }
16726 fn pack_all(&self) -> Vec<DataValue> {
16727 ElderGuardianEntityData::pack_all(self)
16728 }
16729 fn is_dirty(&self) -> bool {
16730 ElderGuardianEntityData::is_dirty(self)
16731 }
16732}
16733impl VanillaLivingEntityData for ElderGuardianEntityData {
16734 fn living_entity(&self) -> &LivingEntityData {
16735 ElderGuardianEntityData::living_entity(self)
16736 }
16737 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16738 ElderGuardianEntityData::living_entity_mut(self)
16739 }
16740}
16741#[derive(Debug, Clone)]
16743pub struct EndermiteEntityData {
16744 pub mob: MobEntityData,
16745}
16746impl EndermiteEntityData {
16747 pub fn new() -> Self {
16749 Self { mob: MobEntityData::new() }
16750 }
16751 pub fn mob(&self) -> &MobEntityData {
16753 &self.mob
16754 }
16755 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16757 &mut self.mob
16758 }
16759 pub fn living_entity(&self) -> &LivingEntityData {
16761 &self.mob.living_entity
16762 }
16763 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16765 &mut self.mob.living_entity
16766 }
16767 pub fn base(&self) -> &BaseEntityData {
16769 &self.mob.living_entity.base
16770 }
16771 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16773 &mut self.mob.living_entity.base
16774 }
16775 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16778 self.mob.pack_dirty()
16779 }
16780 pub fn pack_all(&self) -> Vec<DataValue> {
16782 self.mob.pack_all()
16783 }
16784 pub fn is_dirty(&self) -> bool {
16786 self.mob.is_dirty()
16787 }
16788}
16789impl Default for EndermiteEntityData {
16790 fn default() -> Self {
16791 Self::new()
16792 }
16793}
16794impl VanillaEntityData for EndermiteEntityData {
16795 fn base(&self) -> &BaseEntityData {
16796 EndermiteEntityData::base(self)
16797 }
16798 fn base_mut(&mut self) -> &mut BaseEntityData {
16799 EndermiteEntityData::base_mut(self)
16800 }
16801 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16802 EndermiteEntityData::pack_dirty(self)
16803 }
16804 fn pack_all(&self) -> Vec<DataValue> {
16805 EndermiteEntityData::pack_all(self)
16806 }
16807 fn is_dirty(&self) -> bool {
16808 EndermiteEntityData::is_dirty(self)
16809 }
16810}
16811impl VanillaLivingEntityData for EndermiteEntityData {
16812 fn living_entity(&self) -> &LivingEntityData {
16813 EndermiteEntityData::living_entity(self)
16814 }
16815 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16816 EndermiteEntityData::living_entity_mut(self)
16817 }
16818}
16819#[derive(Debug, Clone)]
16821pub struct EnderPearlEntityData {
16822 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
16823}
16824impl EnderPearlEntityData {
16825 pub fn new() -> Self {
16827 let mut data = ThrowableItemProjectileEntityData::new();
16828 data.item_stack = SyncedValue::new(
16829 ItemStack::with_count(&*crate::vanilla_items::ENDER_PEARL, 1i32),
16830 );
16831 Self {
16832 throwable_item_projectile: data,
16833 }
16834 }
16835 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
16837 &self.throwable_item_projectile
16838 }
16839 pub fn throwable_item_projectile_mut(
16841 &mut self,
16842 ) -> &mut ThrowableItemProjectileEntityData {
16843 &mut self.throwable_item_projectile
16844 }
16845 pub fn base(&self) -> &BaseEntityData {
16847 &self.throwable_item_projectile.base
16848 }
16849 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16851 &mut self.throwable_item_projectile.base
16852 }
16853 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16856 self.throwable_item_projectile.pack_dirty()
16857 }
16858 pub fn pack_all(&self) -> Vec<DataValue> {
16860 self.throwable_item_projectile.pack_all()
16861 }
16862 pub fn is_dirty(&self) -> bool {
16864 self.throwable_item_projectile.is_dirty()
16865 }
16866}
16867impl Default for EnderPearlEntityData {
16868 fn default() -> Self {
16869 Self::new()
16870 }
16871}
16872impl VanillaEntityData for EnderPearlEntityData {
16873 fn base(&self) -> &BaseEntityData {
16874 EnderPearlEntityData::base(self)
16875 }
16876 fn base_mut(&mut self) -> &mut BaseEntityData {
16877 EnderPearlEntityData::base_mut(self)
16878 }
16879 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16880 EnderPearlEntityData::pack_dirty(self)
16881 }
16882 fn pack_all(&self) -> Vec<DataValue> {
16883 EnderPearlEntityData::pack_all(self)
16884 }
16885 fn is_dirty(&self) -> bool {
16886 EnderPearlEntityData::is_dirty(self)
16887 }
16888}
16889#[derive(Debug, Clone)]
16891pub struct EvokerEntityData {
16892 pub spellcaster_illager: SpellcasterIllagerEntityData,
16893}
16894impl EvokerEntityData {
16895 pub fn new() -> Self {
16897 Self {
16898 spellcaster_illager: SpellcasterIllagerEntityData::new(),
16899 }
16900 }
16901 pub fn spellcaster_illager(&self) -> &SpellcasterIllagerEntityData {
16903 &self.spellcaster_illager
16904 }
16905 pub fn spellcaster_illager_mut(&mut self) -> &mut SpellcasterIllagerEntityData {
16907 &mut self.spellcaster_illager
16908 }
16909 pub fn raider(&self) -> &RaiderEntityData {
16911 &self.spellcaster_illager.raider
16912 }
16913 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
16915 &mut self.spellcaster_illager.raider
16916 }
16917 pub fn mob(&self) -> &MobEntityData {
16919 &self.spellcaster_illager.raider.mob
16920 }
16921 pub fn mob_mut(&mut self) -> &mut MobEntityData {
16923 &mut self.spellcaster_illager.raider.mob
16924 }
16925 pub fn living_entity(&self) -> &LivingEntityData {
16927 &self.spellcaster_illager.raider.mob.living_entity
16928 }
16929 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16931 &mut self.spellcaster_illager.raider.mob.living_entity
16932 }
16933 pub fn base(&self) -> &BaseEntityData {
16935 &self.spellcaster_illager.raider.mob.living_entity.base
16936 }
16937 pub fn base_mut(&mut self) -> &mut BaseEntityData {
16939 &mut self.spellcaster_illager.raider.mob.living_entity.base
16940 }
16941 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16944 self.spellcaster_illager.pack_dirty()
16945 }
16946 pub fn pack_all(&self) -> Vec<DataValue> {
16948 self.spellcaster_illager.pack_all()
16949 }
16950 pub fn is_dirty(&self) -> bool {
16952 self.spellcaster_illager.is_dirty()
16953 }
16954}
16955impl Default for EvokerEntityData {
16956 fn default() -> Self {
16957 Self::new()
16958 }
16959}
16960impl VanillaEntityData for EvokerEntityData {
16961 fn base(&self) -> &BaseEntityData {
16962 EvokerEntityData::base(self)
16963 }
16964 fn base_mut(&mut self) -> &mut BaseEntityData {
16965 EvokerEntityData::base_mut(self)
16966 }
16967 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
16968 EvokerEntityData::pack_dirty(self)
16969 }
16970 fn pack_all(&self) -> Vec<DataValue> {
16971 EvokerEntityData::pack_all(self)
16972 }
16973 fn is_dirty(&self) -> bool {
16974 EvokerEntityData::is_dirty(self)
16975 }
16976}
16977impl VanillaLivingEntityData for EvokerEntityData {
16978 fn living_entity(&self) -> &LivingEntityData {
16979 EvokerEntityData::living_entity(self)
16980 }
16981 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
16982 EvokerEntityData::living_entity_mut(self)
16983 }
16984}
16985#[derive(Debug, Clone)]
16987pub struct EvokerFangsEntityData {
16988 pub base: BaseEntityData,
16989}
16990impl EvokerFangsEntityData {
16991 pub fn new() -> Self {
16993 Self {
16994 base: BaseEntityData::new(),
16995 }
16996 }
16997 pub fn base(&self) -> &BaseEntityData {
16999 &self.base
17000 }
17001 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17003 &mut self.base
17004 }
17005 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17008 self.base.pack_dirty()
17009 }
17010 pub fn pack_all(&self) -> Vec<DataValue> {
17012 self.base.pack_all()
17013 }
17014 pub fn is_dirty(&self) -> bool {
17016 self.base.is_dirty()
17017 }
17018}
17019impl Default for EvokerFangsEntityData {
17020 fn default() -> Self {
17021 Self::new()
17022 }
17023}
17024impl VanillaEntityData for EvokerFangsEntityData {
17025 fn base(&self) -> &BaseEntityData {
17026 EvokerFangsEntityData::base(self)
17027 }
17028 fn base_mut(&mut self) -> &mut BaseEntityData {
17029 EvokerFangsEntityData::base_mut(self)
17030 }
17031 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17032 EvokerFangsEntityData::pack_dirty(self)
17033 }
17034 fn pack_all(&self) -> Vec<DataValue> {
17035 EvokerFangsEntityData::pack_all(self)
17036 }
17037 fn is_dirty(&self) -> bool {
17038 EvokerFangsEntityData::is_dirty(self)
17039 }
17040}
17041#[derive(Debug, Clone)]
17043pub struct ExperienceBottleEntityData {
17044 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
17045}
17046impl ExperienceBottleEntityData {
17047 pub fn new() -> Self {
17049 let mut data = ThrowableItemProjectileEntityData::new();
17050 data.item_stack = SyncedValue::new(
17051 ItemStack::with_count(&*crate::vanilla_items::EXPERIENCE_BOTTLE, 1i32),
17052 );
17053 Self {
17054 throwable_item_projectile: data,
17055 }
17056 }
17057 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
17059 &self.throwable_item_projectile
17060 }
17061 pub fn throwable_item_projectile_mut(
17063 &mut self,
17064 ) -> &mut ThrowableItemProjectileEntityData {
17065 &mut self.throwable_item_projectile
17066 }
17067 pub fn base(&self) -> &BaseEntityData {
17069 &self.throwable_item_projectile.base
17070 }
17071 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17073 &mut self.throwable_item_projectile.base
17074 }
17075 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17078 self.throwable_item_projectile.pack_dirty()
17079 }
17080 pub fn pack_all(&self) -> Vec<DataValue> {
17082 self.throwable_item_projectile.pack_all()
17083 }
17084 pub fn is_dirty(&self) -> bool {
17086 self.throwable_item_projectile.is_dirty()
17087 }
17088}
17089impl Default for ExperienceBottleEntityData {
17090 fn default() -> Self {
17091 Self::new()
17092 }
17093}
17094impl VanillaEntityData for ExperienceBottleEntityData {
17095 fn base(&self) -> &BaseEntityData {
17096 ExperienceBottleEntityData::base(self)
17097 }
17098 fn base_mut(&mut self) -> &mut BaseEntityData {
17099 ExperienceBottleEntityData::base_mut(self)
17100 }
17101 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17102 ExperienceBottleEntityData::pack_dirty(self)
17103 }
17104 fn pack_all(&self) -> Vec<DataValue> {
17105 ExperienceBottleEntityData::pack_all(self)
17106 }
17107 fn is_dirty(&self) -> bool {
17108 ExperienceBottleEntityData::is_dirty(self)
17109 }
17110}
17111#[derive(Debug, Clone)]
17113pub struct FurnaceMinecartEntityData {
17114 pub minecart_furnace: MinecartFurnaceEntityData,
17115}
17116impl FurnaceMinecartEntityData {
17117 pub fn new() -> Self {
17119 let mut data = MinecartFurnaceEntityData::new();
17120 data.abstract_minecart.id_display_offset = SyncedValue::new(6i32);
17121 Self { minecart_furnace: data }
17122 }
17123 pub fn minecart_furnace(&self) -> &MinecartFurnaceEntityData {
17125 &self.minecart_furnace
17126 }
17127 pub fn minecart_furnace_mut(&mut self) -> &mut MinecartFurnaceEntityData {
17129 &mut self.minecart_furnace
17130 }
17131 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
17133 &self.minecart_furnace.abstract_minecart
17134 }
17135 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
17137 &mut self.minecart_furnace.abstract_minecart
17138 }
17139 pub fn vehicle_entity(&self) -> &VehicleEntityData {
17141 &self.minecart_furnace.abstract_minecart.vehicle_entity
17142 }
17143 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
17145 &mut self.minecart_furnace.abstract_minecart.vehicle_entity
17146 }
17147 pub fn base(&self) -> &BaseEntityData {
17149 &self.minecart_furnace.abstract_minecart.vehicle_entity.base
17150 }
17151 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17153 &mut self.minecart_furnace.abstract_minecart.vehicle_entity.base
17154 }
17155 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17158 self.minecart_furnace.pack_dirty()
17159 }
17160 pub fn pack_all(&self) -> Vec<DataValue> {
17162 self.minecart_furnace.pack_all()
17163 }
17164 pub fn is_dirty(&self) -> bool {
17166 self.minecart_furnace.is_dirty()
17167 }
17168}
17169impl Default for FurnaceMinecartEntityData {
17170 fn default() -> Self {
17171 Self::new()
17172 }
17173}
17174impl VanillaEntityData for FurnaceMinecartEntityData {
17175 fn base(&self) -> &BaseEntityData {
17176 FurnaceMinecartEntityData::base(self)
17177 }
17178 fn base_mut(&mut self) -> &mut BaseEntityData {
17179 FurnaceMinecartEntityData::base_mut(self)
17180 }
17181 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17182 FurnaceMinecartEntityData::pack_dirty(self)
17183 }
17184 fn pack_all(&self) -> Vec<DataValue> {
17185 FurnaceMinecartEntityData::pack_all(self)
17186 }
17187 fn is_dirty(&self) -> bool {
17188 FurnaceMinecartEntityData::is_dirty(self)
17189 }
17190}
17191#[derive(Debug, Clone)]
17193pub struct GiantEntityData {
17194 pub mob: MobEntityData,
17195}
17196impl GiantEntityData {
17197 pub fn new() -> Self {
17199 Self { mob: MobEntityData::new() }
17200 }
17201 pub fn mob(&self) -> &MobEntityData {
17203 &self.mob
17204 }
17205 pub fn mob_mut(&mut self) -> &mut MobEntityData {
17207 &mut self.mob
17208 }
17209 pub fn living_entity(&self) -> &LivingEntityData {
17211 &self.mob.living_entity
17212 }
17213 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17215 &mut self.mob.living_entity
17216 }
17217 pub fn base(&self) -> &BaseEntityData {
17219 &self.mob.living_entity.base
17220 }
17221 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17223 &mut self.mob.living_entity.base
17224 }
17225 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17228 self.mob.pack_dirty()
17229 }
17230 pub fn pack_all(&self) -> Vec<DataValue> {
17232 self.mob.pack_all()
17233 }
17234 pub fn is_dirty(&self) -> bool {
17236 self.mob.is_dirty()
17237 }
17238}
17239impl Default for GiantEntityData {
17240 fn default() -> Self {
17241 Self::new()
17242 }
17243}
17244impl VanillaEntityData for GiantEntityData {
17245 fn base(&self) -> &BaseEntityData {
17246 GiantEntityData::base(self)
17247 }
17248 fn base_mut(&mut self) -> &mut BaseEntityData {
17249 GiantEntityData::base_mut(self)
17250 }
17251 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17252 GiantEntityData::pack_dirty(self)
17253 }
17254 fn pack_all(&self) -> Vec<DataValue> {
17255 GiantEntityData::pack_all(self)
17256 }
17257 fn is_dirty(&self) -> bool {
17258 GiantEntityData::is_dirty(self)
17259 }
17260}
17261impl VanillaLivingEntityData for GiantEntityData {
17262 fn living_entity(&self) -> &LivingEntityData {
17263 GiantEntityData::living_entity(self)
17264 }
17265 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17266 GiantEntityData::living_entity_mut(self)
17267 }
17268}
17269#[derive(Debug, Clone)]
17271pub struct GlowItemFrameEntityData {
17272 pub item_frame: ItemFrameEntityData,
17273}
17274impl GlowItemFrameEntityData {
17275 pub fn new() -> Self {
17277 Self {
17278 item_frame: ItemFrameEntityData::new(),
17279 }
17280 }
17281 pub fn item_frame(&self) -> &ItemFrameEntityData {
17283 &self.item_frame
17284 }
17285 pub fn item_frame_mut(&mut self) -> &mut ItemFrameEntityData {
17287 &mut self.item_frame
17288 }
17289 pub fn hanging_entity(&self) -> &HangingEntityData {
17291 &self.item_frame.hanging_entity
17292 }
17293 pub fn hanging_entity_mut(&mut self) -> &mut HangingEntityData {
17295 &mut self.item_frame.hanging_entity
17296 }
17297 pub fn base(&self) -> &BaseEntityData {
17299 &self.item_frame.hanging_entity.base
17300 }
17301 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17303 &mut self.item_frame.hanging_entity.base
17304 }
17305 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17308 self.item_frame.pack_dirty()
17309 }
17310 pub fn pack_all(&self) -> Vec<DataValue> {
17312 self.item_frame.pack_all()
17313 }
17314 pub fn is_dirty(&self) -> bool {
17316 self.item_frame.is_dirty()
17317 }
17318}
17319impl Default for GlowItemFrameEntityData {
17320 fn default() -> Self {
17321 Self::new()
17322 }
17323}
17324impl VanillaEntityData for GlowItemFrameEntityData {
17325 fn base(&self) -> &BaseEntityData {
17326 GlowItemFrameEntityData::base(self)
17327 }
17328 fn base_mut(&mut self) -> &mut BaseEntityData {
17329 GlowItemFrameEntityData::base_mut(self)
17330 }
17331 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17332 GlowItemFrameEntityData::pack_dirty(self)
17333 }
17334 fn pack_all(&self) -> Vec<DataValue> {
17335 GlowItemFrameEntityData::pack_all(self)
17336 }
17337 fn is_dirty(&self) -> bool {
17338 GlowItemFrameEntityData::is_dirty(self)
17339 }
17340}
17341#[derive(Debug, Clone)]
17343pub struct HopperMinecartEntityData {
17344 pub abstract_minecart: AbstractMinecartEntityData,
17345}
17346impl HopperMinecartEntityData {
17347 pub fn new() -> Self {
17349 let mut data = AbstractMinecartEntityData::new();
17350 data.id_display_offset = SyncedValue::new(1i32);
17351 Self { abstract_minecart: data }
17352 }
17353 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
17355 &self.abstract_minecart
17356 }
17357 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
17359 &mut self.abstract_minecart
17360 }
17361 pub fn vehicle_entity(&self) -> &VehicleEntityData {
17363 &self.abstract_minecart.vehicle_entity
17364 }
17365 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
17367 &mut self.abstract_minecart.vehicle_entity
17368 }
17369 pub fn base(&self) -> &BaseEntityData {
17371 &self.abstract_minecart.vehicle_entity.base
17372 }
17373 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17375 &mut self.abstract_minecart.vehicle_entity.base
17376 }
17377 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17380 self.abstract_minecart.pack_dirty()
17381 }
17382 pub fn pack_all(&self) -> Vec<DataValue> {
17384 self.abstract_minecart.pack_all()
17385 }
17386 pub fn is_dirty(&self) -> bool {
17388 self.abstract_minecart.is_dirty()
17389 }
17390}
17391impl Default for HopperMinecartEntityData {
17392 fn default() -> Self {
17393 Self::new()
17394 }
17395}
17396impl VanillaEntityData for HopperMinecartEntityData {
17397 fn base(&self) -> &BaseEntityData {
17398 HopperMinecartEntityData::base(self)
17399 }
17400 fn base_mut(&mut self) -> &mut BaseEntityData {
17401 HopperMinecartEntityData::base_mut(self)
17402 }
17403 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17404 HopperMinecartEntityData::pack_dirty(self)
17405 }
17406 fn pack_all(&self) -> Vec<DataValue> {
17407 HopperMinecartEntityData::pack_all(self)
17408 }
17409 fn is_dirty(&self) -> bool {
17410 HopperMinecartEntityData::is_dirty(self)
17411 }
17412}
17413#[derive(Debug, Clone)]
17415pub struct HuskEntityData {
17416 pub zombie: ZombieEntityData,
17417}
17418impl HuskEntityData {
17419 pub fn new() -> Self {
17421 Self {
17422 zombie: ZombieEntityData::new(),
17423 }
17424 }
17425 pub fn zombie(&self) -> &ZombieEntityData {
17427 &self.zombie
17428 }
17429 pub fn zombie_mut(&mut self) -> &mut ZombieEntityData {
17431 &mut self.zombie
17432 }
17433 pub fn mob(&self) -> &MobEntityData {
17435 &self.zombie.mob
17436 }
17437 pub fn mob_mut(&mut self) -> &mut MobEntityData {
17439 &mut self.zombie.mob
17440 }
17441 pub fn living_entity(&self) -> &LivingEntityData {
17443 &self.zombie.mob.living_entity
17444 }
17445 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17447 &mut self.zombie.mob.living_entity
17448 }
17449 pub fn base(&self) -> &BaseEntityData {
17451 &self.zombie.mob.living_entity.base
17452 }
17453 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17455 &mut self.zombie.mob.living_entity.base
17456 }
17457 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17460 self.zombie.pack_dirty()
17461 }
17462 pub fn pack_all(&self) -> Vec<DataValue> {
17464 self.zombie.pack_all()
17465 }
17466 pub fn is_dirty(&self) -> bool {
17468 self.zombie.is_dirty()
17469 }
17470}
17471impl Default for HuskEntityData {
17472 fn default() -> Self {
17473 Self::new()
17474 }
17475}
17476impl VanillaEntityData for HuskEntityData {
17477 fn base(&self) -> &BaseEntityData {
17478 HuskEntityData::base(self)
17479 }
17480 fn base_mut(&mut self) -> &mut BaseEntityData {
17481 HuskEntityData::base_mut(self)
17482 }
17483 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17484 HuskEntityData::pack_dirty(self)
17485 }
17486 fn pack_all(&self) -> Vec<DataValue> {
17487 HuskEntityData::pack_all(self)
17488 }
17489 fn is_dirty(&self) -> bool {
17490 HuskEntityData::is_dirty(self)
17491 }
17492}
17493impl VanillaLivingEntityData for HuskEntityData {
17494 fn living_entity(&self) -> &LivingEntityData {
17495 HuskEntityData::living_entity(self)
17496 }
17497 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17498 HuskEntityData::living_entity_mut(self)
17499 }
17500}
17501#[derive(Debug, Clone)]
17503pub struct IllusionerEntityData {
17504 pub spellcaster_illager: SpellcasterIllagerEntityData,
17505}
17506impl IllusionerEntityData {
17507 pub fn new() -> Self {
17509 Self {
17510 spellcaster_illager: SpellcasterIllagerEntityData::new(),
17511 }
17512 }
17513 pub fn spellcaster_illager(&self) -> &SpellcasterIllagerEntityData {
17515 &self.spellcaster_illager
17516 }
17517 pub fn spellcaster_illager_mut(&mut self) -> &mut SpellcasterIllagerEntityData {
17519 &mut self.spellcaster_illager
17520 }
17521 pub fn raider(&self) -> &RaiderEntityData {
17523 &self.spellcaster_illager.raider
17524 }
17525 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
17527 &mut self.spellcaster_illager.raider
17528 }
17529 pub fn mob(&self) -> &MobEntityData {
17531 &self.spellcaster_illager.raider.mob
17532 }
17533 pub fn mob_mut(&mut self) -> &mut MobEntityData {
17535 &mut self.spellcaster_illager.raider.mob
17536 }
17537 pub fn living_entity(&self) -> &LivingEntityData {
17539 &self.spellcaster_illager.raider.mob.living_entity
17540 }
17541 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17543 &mut self.spellcaster_illager.raider.mob.living_entity
17544 }
17545 pub fn base(&self) -> &BaseEntityData {
17547 &self.spellcaster_illager.raider.mob.living_entity.base
17548 }
17549 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17551 &mut self.spellcaster_illager.raider.mob.living_entity.base
17552 }
17553 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17556 self.spellcaster_illager.pack_dirty()
17557 }
17558 pub fn pack_all(&self) -> Vec<DataValue> {
17560 self.spellcaster_illager.pack_all()
17561 }
17562 pub fn is_dirty(&self) -> bool {
17564 self.spellcaster_illager.is_dirty()
17565 }
17566}
17567impl Default for IllusionerEntityData {
17568 fn default() -> Self {
17569 Self::new()
17570 }
17571}
17572impl VanillaEntityData for IllusionerEntityData {
17573 fn base(&self) -> &BaseEntityData {
17574 IllusionerEntityData::base(self)
17575 }
17576 fn base_mut(&mut self) -> &mut BaseEntityData {
17577 IllusionerEntityData::base_mut(self)
17578 }
17579 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17580 IllusionerEntityData::pack_dirty(self)
17581 }
17582 fn pack_all(&self) -> Vec<DataValue> {
17583 IllusionerEntityData::pack_all(self)
17584 }
17585 fn is_dirty(&self) -> bool {
17586 IllusionerEntityData::is_dirty(self)
17587 }
17588}
17589impl VanillaLivingEntityData for IllusionerEntityData {
17590 fn living_entity(&self) -> &LivingEntityData {
17591 IllusionerEntityData::living_entity(self)
17592 }
17593 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17594 IllusionerEntityData::living_entity_mut(self)
17595 }
17596}
17597#[derive(Debug, Clone)]
17599pub struct JungleBoatEntityData {
17600 pub abstract_boat: AbstractBoatEntityData,
17601}
17602impl JungleBoatEntityData {
17603 pub fn new() -> Self {
17605 Self {
17606 abstract_boat: AbstractBoatEntityData::new(),
17607 }
17608 }
17609 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
17611 &self.abstract_boat
17612 }
17613 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
17615 &mut self.abstract_boat
17616 }
17617 pub fn vehicle_entity(&self) -> &VehicleEntityData {
17619 &self.abstract_boat.vehicle_entity
17620 }
17621 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
17623 &mut self.abstract_boat.vehicle_entity
17624 }
17625 pub fn base(&self) -> &BaseEntityData {
17627 &self.abstract_boat.vehicle_entity.base
17628 }
17629 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17631 &mut self.abstract_boat.vehicle_entity.base
17632 }
17633 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17636 self.abstract_boat.pack_dirty()
17637 }
17638 pub fn pack_all(&self) -> Vec<DataValue> {
17640 self.abstract_boat.pack_all()
17641 }
17642 pub fn is_dirty(&self) -> bool {
17644 self.abstract_boat.is_dirty()
17645 }
17646}
17647impl Default for JungleBoatEntityData {
17648 fn default() -> Self {
17649 Self::new()
17650 }
17651}
17652impl VanillaEntityData for JungleBoatEntityData {
17653 fn base(&self) -> &BaseEntityData {
17654 JungleBoatEntityData::base(self)
17655 }
17656 fn base_mut(&mut self) -> &mut BaseEntityData {
17657 JungleBoatEntityData::base_mut(self)
17658 }
17659 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17660 JungleBoatEntityData::pack_dirty(self)
17661 }
17662 fn pack_all(&self) -> Vec<DataValue> {
17663 JungleBoatEntityData::pack_all(self)
17664 }
17665 fn is_dirty(&self) -> bool {
17666 JungleBoatEntityData::is_dirty(self)
17667 }
17668}
17669#[derive(Debug, Clone)]
17671pub struct JungleChestBoatEntityData {
17672 pub abstract_boat: AbstractBoatEntityData,
17673}
17674impl JungleChestBoatEntityData {
17675 pub fn new() -> Self {
17677 Self {
17678 abstract_boat: AbstractBoatEntityData::new(),
17679 }
17680 }
17681 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
17683 &self.abstract_boat
17684 }
17685 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
17687 &mut self.abstract_boat
17688 }
17689 pub fn vehicle_entity(&self) -> &VehicleEntityData {
17691 &self.abstract_boat.vehicle_entity
17692 }
17693 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
17695 &mut self.abstract_boat.vehicle_entity
17696 }
17697 pub fn base(&self) -> &BaseEntityData {
17699 &self.abstract_boat.vehicle_entity.base
17700 }
17701 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17703 &mut self.abstract_boat.vehicle_entity.base
17704 }
17705 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17708 self.abstract_boat.pack_dirty()
17709 }
17710 pub fn pack_all(&self) -> Vec<DataValue> {
17712 self.abstract_boat.pack_all()
17713 }
17714 pub fn is_dirty(&self) -> bool {
17716 self.abstract_boat.is_dirty()
17717 }
17718}
17719impl Default for JungleChestBoatEntityData {
17720 fn default() -> Self {
17721 Self::new()
17722 }
17723}
17724impl VanillaEntityData for JungleChestBoatEntityData {
17725 fn base(&self) -> &BaseEntityData {
17726 JungleChestBoatEntityData::base(self)
17727 }
17728 fn base_mut(&mut self) -> &mut BaseEntityData {
17729 JungleChestBoatEntityData::base_mut(self)
17730 }
17731 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17732 JungleChestBoatEntityData::pack_dirty(self)
17733 }
17734 fn pack_all(&self) -> Vec<DataValue> {
17735 JungleChestBoatEntityData::pack_all(self)
17736 }
17737 fn is_dirty(&self) -> bool {
17738 JungleChestBoatEntityData::is_dirty(self)
17739 }
17740}
17741#[derive(Debug, Clone)]
17743pub struct LeashKnotEntityData {
17744 pub base: BaseEntityData,
17745}
17746impl LeashKnotEntityData {
17747 pub fn new() -> Self {
17749 Self {
17750 base: BaseEntityData::new(),
17751 }
17752 }
17753 pub fn base(&self) -> &BaseEntityData {
17755 &self.base
17756 }
17757 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17759 &mut self.base
17760 }
17761 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17764 self.base.pack_dirty()
17765 }
17766 pub fn pack_all(&self) -> Vec<DataValue> {
17768 self.base.pack_all()
17769 }
17770 pub fn is_dirty(&self) -> bool {
17772 self.base.is_dirty()
17773 }
17774}
17775impl Default for LeashKnotEntityData {
17776 fn default() -> Self {
17777 Self::new()
17778 }
17779}
17780impl VanillaEntityData for LeashKnotEntityData {
17781 fn base(&self) -> &BaseEntityData {
17782 LeashKnotEntityData::base(self)
17783 }
17784 fn base_mut(&mut self) -> &mut BaseEntityData {
17785 LeashKnotEntityData::base_mut(self)
17786 }
17787 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17788 LeashKnotEntityData::pack_dirty(self)
17789 }
17790 fn pack_all(&self) -> Vec<DataValue> {
17791 LeashKnotEntityData::pack_all(self)
17792 }
17793 fn is_dirty(&self) -> bool {
17794 LeashKnotEntityData::is_dirty(self)
17795 }
17796}
17797#[derive(Debug, Clone)]
17799pub struct LightningBoltEntityData {
17800 pub base: BaseEntityData,
17801}
17802impl LightningBoltEntityData {
17803 pub fn new() -> Self {
17805 Self {
17806 base: BaseEntityData::new(),
17807 }
17808 }
17809 pub fn base(&self) -> &BaseEntityData {
17811 &self.base
17812 }
17813 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17815 &mut self.base
17816 }
17817 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17820 self.base.pack_dirty()
17821 }
17822 pub fn pack_all(&self) -> Vec<DataValue> {
17824 self.base.pack_all()
17825 }
17826 pub fn is_dirty(&self) -> bool {
17828 self.base.is_dirty()
17829 }
17830}
17831impl Default for LightningBoltEntityData {
17832 fn default() -> Self {
17833 Self::new()
17834 }
17835}
17836impl VanillaEntityData for LightningBoltEntityData {
17837 fn base(&self) -> &BaseEntityData {
17838 LightningBoltEntityData::base(self)
17839 }
17840 fn base_mut(&mut self) -> &mut BaseEntityData {
17841 LightningBoltEntityData::base_mut(self)
17842 }
17843 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17844 LightningBoltEntityData::pack_dirty(self)
17845 }
17846 fn pack_all(&self) -> Vec<DataValue> {
17847 LightningBoltEntityData::pack_all(self)
17848 }
17849 fn is_dirty(&self) -> bool {
17850 LightningBoltEntityData::is_dirty(self)
17851 }
17852}
17853#[derive(Debug, Clone)]
17855pub struct LlamaSpitEntityData {
17856 pub base: BaseEntityData,
17857}
17858impl LlamaSpitEntityData {
17859 pub fn new() -> Self {
17861 Self {
17862 base: BaseEntityData::new(),
17863 }
17864 }
17865 pub fn base(&self) -> &BaseEntityData {
17867 &self.base
17868 }
17869 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17871 &mut self.base
17872 }
17873 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17876 self.base.pack_dirty()
17877 }
17878 pub fn pack_all(&self) -> Vec<DataValue> {
17880 self.base.pack_all()
17881 }
17882 pub fn is_dirty(&self) -> bool {
17884 self.base.is_dirty()
17885 }
17886}
17887impl Default for LlamaSpitEntityData {
17888 fn default() -> Self {
17889 Self::new()
17890 }
17891}
17892impl VanillaEntityData for LlamaSpitEntityData {
17893 fn base(&self) -> &BaseEntityData {
17894 LlamaSpitEntityData::base(self)
17895 }
17896 fn base_mut(&mut self) -> &mut BaseEntityData {
17897 LlamaSpitEntityData::base_mut(self)
17898 }
17899 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17900 LlamaSpitEntityData::pack_dirty(self)
17901 }
17902 fn pack_all(&self) -> Vec<DataValue> {
17903 LlamaSpitEntityData::pack_all(self)
17904 }
17905 fn is_dirty(&self) -> bool {
17906 LlamaSpitEntityData::is_dirty(self)
17907 }
17908}
17909#[derive(Debug, Clone)]
17911pub struct MagmaCubeEntityData {
17912 pub abstract_cube_mob: AbstractCubeMobEntityData,
17913}
17914impl MagmaCubeEntityData {
17915 pub fn new() -> Self {
17917 Self {
17918 abstract_cube_mob: AbstractCubeMobEntityData::new(),
17919 }
17920 }
17921 pub fn abstract_cube_mob(&self) -> &AbstractCubeMobEntityData {
17923 &self.abstract_cube_mob
17924 }
17925 pub fn abstract_cube_mob_mut(&mut self) -> &mut AbstractCubeMobEntityData {
17927 &mut self.abstract_cube_mob
17928 }
17929 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
17931 &self.abstract_cube_mob.ageable_mob
17932 }
17933 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
17935 &mut self.abstract_cube_mob.ageable_mob
17936 }
17937 pub fn mob(&self) -> &MobEntityData {
17939 &self.abstract_cube_mob.ageable_mob.mob
17940 }
17941 pub fn mob_mut(&mut self) -> &mut MobEntityData {
17943 &mut self.abstract_cube_mob.ageable_mob.mob
17944 }
17945 pub fn living_entity(&self) -> &LivingEntityData {
17947 &self.abstract_cube_mob.ageable_mob.mob.living_entity
17948 }
17949 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
17951 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity
17952 }
17953 pub fn base(&self) -> &BaseEntityData {
17955 &self.abstract_cube_mob.ageable_mob.mob.living_entity.base
17956 }
17957 pub fn base_mut(&mut self) -> &mut BaseEntityData {
17959 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity.base
17960 }
17961 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17964 self.abstract_cube_mob.pack_dirty()
17965 }
17966 pub fn pack_all(&self) -> Vec<DataValue> {
17968 self.abstract_cube_mob.pack_all()
17969 }
17970 pub fn is_dirty(&self) -> bool {
17972 self.abstract_cube_mob.is_dirty()
17973 }
17974}
17975impl Default for MagmaCubeEntityData {
17976 fn default() -> Self {
17977 Self::new()
17978 }
17979}
17980impl VanillaEntityData for MagmaCubeEntityData {
17981 fn base(&self) -> &BaseEntityData {
17982 MagmaCubeEntityData::base(self)
17983 }
17984 fn base_mut(&mut self) -> &mut BaseEntityData {
17985 MagmaCubeEntityData::base_mut(self)
17986 }
17987 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
17988 MagmaCubeEntityData::pack_dirty(self)
17989 }
17990 fn pack_all(&self) -> Vec<DataValue> {
17991 MagmaCubeEntityData::pack_all(self)
17992 }
17993 fn is_dirty(&self) -> bool {
17994 MagmaCubeEntityData::is_dirty(self)
17995 }
17996}
17997impl VanillaLivingEntityData for MagmaCubeEntityData {
17998 fn living_entity(&self) -> &LivingEntityData {
17999 MagmaCubeEntityData::living_entity(self)
18000 }
18001 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18002 MagmaCubeEntityData::living_entity_mut(self)
18003 }
18004}
18005#[derive(Debug, Clone)]
18007pub struct MangroveBoatEntityData {
18008 pub abstract_boat: AbstractBoatEntityData,
18009}
18010impl MangroveBoatEntityData {
18011 pub fn new() -> Self {
18013 Self {
18014 abstract_boat: AbstractBoatEntityData::new(),
18015 }
18016 }
18017 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18019 &self.abstract_boat
18020 }
18021 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18023 &mut self.abstract_boat
18024 }
18025 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18027 &self.abstract_boat.vehicle_entity
18028 }
18029 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18031 &mut self.abstract_boat.vehicle_entity
18032 }
18033 pub fn base(&self) -> &BaseEntityData {
18035 &self.abstract_boat.vehicle_entity.base
18036 }
18037 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18039 &mut self.abstract_boat.vehicle_entity.base
18040 }
18041 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18044 self.abstract_boat.pack_dirty()
18045 }
18046 pub fn pack_all(&self) -> Vec<DataValue> {
18048 self.abstract_boat.pack_all()
18049 }
18050 pub fn is_dirty(&self) -> bool {
18052 self.abstract_boat.is_dirty()
18053 }
18054}
18055impl Default for MangroveBoatEntityData {
18056 fn default() -> Self {
18057 Self::new()
18058 }
18059}
18060impl VanillaEntityData for MangroveBoatEntityData {
18061 fn base(&self) -> &BaseEntityData {
18062 MangroveBoatEntityData::base(self)
18063 }
18064 fn base_mut(&mut self) -> &mut BaseEntityData {
18065 MangroveBoatEntityData::base_mut(self)
18066 }
18067 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18068 MangroveBoatEntityData::pack_dirty(self)
18069 }
18070 fn pack_all(&self) -> Vec<DataValue> {
18071 MangroveBoatEntityData::pack_all(self)
18072 }
18073 fn is_dirty(&self) -> bool {
18074 MangroveBoatEntityData::is_dirty(self)
18075 }
18076}
18077#[derive(Debug, Clone)]
18079pub struct MangroveChestBoatEntityData {
18080 pub abstract_boat: AbstractBoatEntityData,
18081}
18082impl MangroveChestBoatEntityData {
18083 pub fn new() -> Self {
18085 Self {
18086 abstract_boat: AbstractBoatEntityData::new(),
18087 }
18088 }
18089 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18091 &self.abstract_boat
18092 }
18093 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18095 &mut self.abstract_boat
18096 }
18097 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18099 &self.abstract_boat.vehicle_entity
18100 }
18101 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18103 &mut self.abstract_boat.vehicle_entity
18104 }
18105 pub fn base(&self) -> &BaseEntityData {
18107 &self.abstract_boat.vehicle_entity.base
18108 }
18109 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18111 &mut self.abstract_boat.vehicle_entity.base
18112 }
18113 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18116 self.abstract_boat.pack_dirty()
18117 }
18118 pub fn pack_all(&self) -> Vec<DataValue> {
18120 self.abstract_boat.pack_all()
18121 }
18122 pub fn is_dirty(&self) -> bool {
18124 self.abstract_boat.is_dirty()
18125 }
18126}
18127impl Default for MangroveChestBoatEntityData {
18128 fn default() -> Self {
18129 Self::new()
18130 }
18131}
18132impl VanillaEntityData for MangroveChestBoatEntityData {
18133 fn base(&self) -> &BaseEntityData {
18134 MangroveChestBoatEntityData::base(self)
18135 }
18136 fn base_mut(&mut self) -> &mut BaseEntityData {
18137 MangroveChestBoatEntityData::base_mut(self)
18138 }
18139 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18140 MangroveChestBoatEntityData::pack_dirty(self)
18141 }
18142 fn pack_all(&self) -> Vec<DataValue> {
18143 MangroveChestBoatEntityData::pack_all(self)
18144 }
18145 fn is_dirty(&self) -> bool {
18146 MangroveChestBoatEntityData::is_dirty(self)
18147 }
18148}
18149#[derive(Debug, Clone)]
18151pub struct MarkerEntityData {
18152 pub base: BaseEntityData,
18153}
18154impl MarkerEntityData {
18155 pub fn new() -> Self {
18157 Self {
18158 base: BaseEntityData::new(),
18159 }
18160 }
18161 pub fn base(&self) -> &BaseEntityData {
18163 &self.base
18164 }
18165 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18167 &mut self.base
18168 }
18169 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18172 self.base.pack_dirty()
18173 }
18174 pub fn pack_all(&self) -> Vec<DataValue> {
18176 self.base.pack_all()
18177 }
18178 pub fn is_dirty(&self) -> bool {
18180 self.base.is_dirty()
18181 }
18182}
18183impl Default for MarkerEntityData {
18184 fn default() -> Self {
18185 Self::new()
18186 }
18187}
18188impl VanillaEntityData for MarkerEntityData {
18189 fn base(&self) -> &BaseEntityData {
18190 MarkerEntityData::base(self)
18191 }
18192 fn base_mut(&mut self) -> &mut BaseEntityData {
18193 MarkerEntityData::base_mut(self)
18194 }
18195 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18196 MarkerEntityData::pack_dirty(self)
18197 }
18198 fn pack_all(&self) -> Vec<DataValue> {
18199 MarkerEntityData::pack_all(self)
18200 }
18201 fn is_dirty(&self) -> bool {
18202 MarkerEntityData::is_dirty(self)
18203 }
18204}
18205#[derive(Debug, Clone)]
18207pub struct MinecartEntityData {
18208 pub abstract_minecart: AbstractMinecartEntityData,
18209}
18210impl MinecartEntityData {
18211 pub fn new() -> Self {
18213 let mut data = AbstractMinecartEntityData::new();
18214 data.id_display_offset = SyncedValue::new(6i32);
18215 Self { abstract_minecart: data }
18216 }
18217 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
18219 &self.abstract_minecart
18220 }
18221 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
18223 &mut self.abstract_minecart
18224 }
18225 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18227 &self.abstract_minecart.vehicle_entity
18228 }
18229 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18231 &mut self.abstract_minecart.vehicle_entity
18232 }
18233 pub fn base(&self) -> &BaseEntityData {
18235 &self.abstract_minecart.vehicle_entity.base
18236 }
18237 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18239 &mut self.abstract_minecart.vehicle_entity.base
18240 }
18241 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18244 self.abstract_minecart.pack_dirty()
18245 }
18246 pub fn pack_all(&self) -> Vec<DataValue> {
18248 self.abstract_minecart.pack_all()
18249 }
18250 pub fn is_dirty(&self) -> bool {
18252 self.abstract_minecart.is_dirty()
18253 }
18254}
18255impl Default for MinecartEntityData {
18256 fn default() -> Self {
18257 Self::new()
18258 }
18259}
18260impl VanillaEntityData for MinecartEntityData {
18261 fn base(&self) -> &BaseEntityData {
18262 MinecartEntityData::base(self)
18263 }
18264 fn base_mut(&mut self) -> &mut BaseEntityData {
18265 MinecartEntityData::base_mut(self)
18266 }
18267 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18268 MinecartEntityData::pack_dirty(self)
18269 }
18270 fn pack_all(&self) -> Vec<DataValue> {
18271 MinecartEntityData::pack_all(self)
18272 }
18273 fn is_dirty(&self) -> bool {
18274 MinecartEntityData::is_dirty(self)
18275 }
18276}
18277#[derive(Debug, Clone)]
18279pub struct MooshroomEntityData {
18280 pub mushroom_cow: MushroomCowEntityData,
18281}
18282impl MooshroomEntityData {
18283 pub fn new() -> Self {
18285 Self {
18286 mushroom_cow: MushroomCowEntityData::new(),
18287 }
18288 }
18289 pub fn mushroom_cow(&self) -> &MushroomCowEntityData {
18291 &self.mushroom_cow
18292 }
18293 pub fn mushroom_cow_mut(&mut self) -> &mut MushroomCowEntityData {
18295 &mut self.mushroom_cow
18296 }
18297 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
18299 &self.mushroom_cow.ageable_mob
18300 }
18301 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
18303 &mut self.mushroom_cow.ageable_mob
18304 }
18305 pub fn mob(&self) -> &MobEntityData {
18307 &self.mushroom_cow.ageable_mob.mob
18308 }
18309 pub fn mob_mut(&mut self) -> &mut MobEntityData {
18311 &mut self.mushroom_cow.ageable_mob.mob
18312 }
18313 pub fn living_entity(&self) -> &LivingEntityData {
18315 &self.mushroom_cow.ageable_mob.mob.living_entity
18316 }
18317 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18319 &mut self.mushroom_cow.ageable_mob.mob.living_entity
18320 }
18321 pub fn base(&self) -> &BaseEntityData {
18323 &self.mushroom_cow.ageable_mob.mob.living_entity.base
18324 }
18325 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18327 &mut self.mushroom_cow.ageable_mob.mob.living_entity.base
18328 }
18329 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18332 self.mushroom_cow.pack_dirty()
18333 }
18334 pub fn pack_all(&self) -> Vec<DataValue> {
18336 self.mushroom_cow.pack_all()
18337 }
18338 pub fn is_dirty(&self) -> bool {
18340 self.mushroom_cow.is_dirty()
18341 }
18342}
18343impl Default for MooshroomEntityData {
18344 fn default() -> Self {
18345 Self::new()
18346 }
18347}
18348impl VanillaEntityData for MooshroomEntityData {
18349 fn base(&self) -> &BaseEntityData {
18350 MooshroomEntityData::base(self)
18351 }
18352 fn base_mut(&mut self) -> &mut BaseEntityData {
18353 MooshroomEntityData::base_mut(self)
18354 }
18355 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18356 MooshroomEntityData::pack_dirty(self)
18357 }
18358 fn pack_all(&self) -> Vec<DataValue> {
18359 MooshroomEntityData::pack_all(self)
18360 }
18361 fn is_dirty(&self) -> bool {
18362 MooshroomEntityData::is_dirty(self)
18363 }
18364}
18365impl VanillaLivingEntityData for MooshroomEntityData {
18366 fn living_entity(&self) -> &LivingEntityData {
18367 MooshroomEntityData::living_entity(self)
18368 }
18369 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18370 MooshroomEntityData::living_entity_mut(self)
18371 }
18372}
18373#[derive(Debug, Clone)]
18375pub struct MuleEntityData {
18376 pub abstract_chested_horse: AbstractChestedHorseEntityData,
18377}
18378impl MuleEntityData {
18379 pub fn new() -> Self {
18381 Self {
18382 abstract_chested_horse: AbstractChestedHorseEntityData::new(),
18383 }
18384 }
18385 pub fn abstract_chested_horse(&self) -> &AbstractChestedHorseEntityData {
18387 &self.abstract_chested_horse
18388 }
18389 pub fn abstract_chested_horse_mut(&mut self) -> &mut AbstractChestedHorseEntityData {
18391 &mut self.abstract_chested_horse
18392 }
18393 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
18395 &self.abstract_chested_horse.abstract_horse
18396 }
18397 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
18399 &mut self.abstract_chested_horse.abstract_horse
18400 }
18401 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
18403 &self.abstract_chested_horse.abstract_horse.ageable_mob
18404 }
18405 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
18407 &mut self.abstract_chested_horse.abstract_horse.ageable_mob
18408 }
18409 pub fn mob(&self) -> &MobEntityData {
18411 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob
18412 }
18413 pub fn mob_mut(&mut self) -> &mut MobEntityData {
18415 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob
18416 }
18417 pub fn living_entity(&self) -> &LivingEntityData {
18419 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
18420 }
18421 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18423 &mut self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
18424 }
18425 pub fn base(&self) -> &BaseEntityData {
18427 &self.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity.base
18428 }
18429 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18431 &mut self
18432 .abstract_chested_horse
18433 .abstract_horse
18434 .ageable_mob
18435 .mob
18436 .living_entity
18437 .base
18438 }
18439 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18442 self.abstract_chested_horse.pack_dirty()
18443 }
18444 pub fn pack_all(&self) -> Vec<DataValue> {
18446 self.abstract_chested_horse.pack_all()
18447 }
18448 pub fn is_dirty(&self) -> bool {
18450 self.abstract_chested_horse.is_dirty()
18451 }
18452}
18453impl Default for MuleEntityData {
18454 fn default() -> Self {
18455 Self::new()
18456 }
18457}
18458impl VanillaEntityData for MuleEntityData {
18459 fn base(&self) -> &BaseEntityData {
18460 MuleEntityData::base(self)
18461 }
18462 fn base_mut(&mut self) -> &mut BaseEntityData {
18463 MuleEntityData::base_mut(self)
18464 }
18465 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18466 MuleEntityData::pack_dirty(self)
18467 }
18468 fn pack_all(&self) -> Vec<DataValue> {
18469 MuleEntityData::pack_all(self)
18470 }
18471 fn is_dirty(&self) -> bool {
18472 MuleEntityData::is_dirty(self)
18473 }
18474}
18475impl VanillaLivingEntityData for MuleEntityData {
18476 fn living_entity(&self) -> &LivingEntityData {
18477 MuleEntityData::living_entity(self)
18478 }
18479 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18480 MuleEntityData::living_entity_mut(self)
18481 }
18482}
18483#[derive(Debug, Clone)]
18485pub struct NautilusEntityData {
18486 pub abstract_nautilus: AbstractNautilusEntityData,
18487}
18488impl NautilusEntityData {
18489 pub fn new() -> Self {
18491 Self {
18492 abstract_nautilus: AbstractNautilusEntityData::new(),
18493 }
18494 }
18495 pub fn abstract_nautilus(&self) -> &AbstractNautilusEntityData {
18497 &self.abstract_nautilus
18498 }
18499 pub fn abstract_nautilus_mut(&mut self) -> &mut AbstractNautilusEntityData {
18501 &mut self.abstract_nautilus
18502 }
18503 pub fn tamable_animal(&self) -> &TamableAnimalEntityData {
18505 &self.abstract_nautilus.tamable_animal
18506 }
18507 pub fn tamable_animal_mut(&mut self) -> &mut TamableAnimalEntityData {
18509 &mut self.abstract_nautilus.tamable_animal
18510 }
18511 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
18513 &self.abstract_nautilus.tamable_animal.ageable_mob
18514 }
18515 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
18517 &mut self.abstract_nautilus.tamable_animal.ageable_mob
18518 }
18519 pub fn mob(&self) -> &MobEntityData {
18521 &self.abstract_nautilus.tamable_animal.ageable_mob.mob
18522 }
18523 pub fn mob_mut(&mut self) -> &mut MobEntityData {
18525 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob
18526 }
18527 pub fn living_entity(&self) -> &LivingEntityData {
18529 &self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity
18530 }
18531 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18533 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity
18534 }
18535 pub fn base(&self) -> &BaseEntityData {
18537 &self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity.base
18538 }
18539 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18541 &mut self.abstract_nautilus.tamable_animal.ageable_mob.mob.living_entity.base
18542 }
18543 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18546 self.abstract_nautilus.pack_dirty()
18547 }
18548 pub fn pack_all(&self) -> Vec<DataValue> {
18550 self.abstract_nautilus.pack_all()
18551 }
18552 pub fn is_dirty(&self) -> bool {
18554 self.abstract_nautilus.is_dirty()
18555 }
18556}
18557impl Default for NautilusEntityData {
18558 fn default() -> Self {
18559 Self::new()
18560 }
18561}
18562impl VanillaEntityData for NautilusEntityData {
18563 fn base(&self) -> &BaseEntityData {
18564 NautilusEntityData::base(self)
18565 }
18566 fn base_mut(&mut self) -> &mut BaseEntityData {
18567 NautilusEntityData::base_mut(self)
18568 }
18569 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18570 NautilusEntityData::pack_dirty(self)
18571 }
18572 fn pack_all(&self) -> Vec<DataValue> {
18573 NautilusEntityData::pack_all(self)
18574 }
18575 fn is_dirty(&self) -> bool {
18576 NautilusEntityData::is_dirty(self)
18577 }
18578}
18579impl VanillaLivingEntityData for NautilusEntityData {
18580 fn living_entity(&self) -> &LivingEntityData {
18581 NautilusEntityData::living_entity(self)
18582 }
18583 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18584 NautilusEntityData::living_entity_mut(self)
18585 }
18586}
18587#[derive(Debug, Clone)]
18589pub struct OakBoatEntityData {
18590 pub abstract_boat: AbstractBoatEntityData,
18591}
18592impl OakBoatEntityData {
18593 pub fn new() -> Self {
18595 Self {
18596 abstract_boat: AbstractBoatEntityData::new(),
18597 }
18598 }
18599 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18601 &self.abstract_boat
18602 }
18603 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18605 &mut self.abstract_boat
18606 }
18607 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18609 &self.abstract_boat.vehicle_entity
18610 }
18611 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18613 &mut self.abstract_boat.vehicle_entity
18614 }
18615 pub fn base(&self) -> &BaseEntityData {
18617 &self.abstract_boat.vehicle_entity.base
18618 }
18619 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18621 &mut self.abstract_boat.vehicle_entity.base
18622 }
18623 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18626 self.abstract_boat.pack_dirty()
18627 }
18628 pub fn pack_all(&self) -> Vec<DataValue> {
18630 self.abstract_boat.pack_all()
18631 }
18632 pub fn is_dirty(&self) -> bool {
18634 self.abstract_boat.is_dirty()
18635 }
18636}
18637impl Default for OakBoatEntityData {
18638 fn default() -> Self {
18639 Self::new()
18640 }
18641}
18642impl VanillaEntityData for OakBoatEntityData {
18643 fn base(&self) -> &BaseEntityData {
18644 OakBoatEntityData::base(self)
18645 }
18646 fn base_mut(&mut self) -> &mut BaseEntityData {
18647 OakBoatEntityData::base_mut(self)
18648 }
18649 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18650 OakBoatEntityData::pack_dirty(self)
18651 }
18652 fn pack_all(&self) -> Vec<DataValue> {
18653 OakBoatEntityData::pack_all(self)
18654 }
18655 fn is_dirty(&self) -> bool {
18656 OakBoatEntityData::is_dirty(self)
18657 }
18658}
18659#[derive(Debug, Clone)]
18661pub struct OakChestBoatEntityData {
18662 pub abstract_boat: AbstractBoatEntityData,
18663}
18664impl OakChestBoatEntityData {
18665 pub fn new() -> Self {
18667 Self {
18668 abstract_boat: AbstractBoatEntityData::new(),
18669 }
18670 }
18671 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18673 &self.abstract_boat
18674 }
18675 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18677 &mut self.abstract_boat
18678 }
18679 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18681 &self.abstract_boat.vehicle_entity
18682 }
18683 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18685 &mut self.abstract_boat.vehicle_entity
18686 }
18687 pub fn base(&self) -> &BaseEntityData {
18689 &self.abstract_boat.vehicle_entity.base
18690 }
18691 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18693 &mut self.abstract_boat.vehicle_entity.base
18694 }
18695 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18698 self.abstract_boat.pack_dirty()
18699 }
18700 pub fn pack_all(&self) -> Vec<DataValue> {
18702 self.abstract_boat.pack_all()
18703 }
18704 pub fn is_dirty(&self) -> bool {
18706 self.abstract_boat.is_dirty()
18707 }
18708}
18709impl Default for OakChestBoatEntityData {
18710 fn default() -> Self {
18711 Self::new()
18712 }
18713}
18714impl VanillaEntityData for OakChestBoatEntityData {
18715 fn base(&self) -> &BaseEntityData {
18716 OakChestBoatEntityData::base(self)
18717 }
18718 fn base_mut(&mut self) -> &mut BaseEntityData {
18719 OakChestBoatEntityData::base_mut(self)
18720 }
18721 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18722 OakChestBoatEntityData::pack_dirty(self)
18723 }
18724 fn pack_all(&self) -> Vec<DataValue> {
18725 OakChestBoatEntityData::pack_all(self)
18726 }
18727 fn is_dirty(&self) -> bool {
18728 OakChestBoatEntityData::is_dirty(self)
18729 }
18730}
18731#[derive(Debug, Clone)]
18733pub struct PaleOakBoatEntityData {
18734 pub abstract_boat: AbstractBoatEntityData,
18735}
18736impl PaleOakBoatEntityData {
18737 pub fn new() -> Self {
18739 Self {
18740 abstract_boat: AbstractBoatEntityData::new(),
18741 }
18742 }
18743 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18745 &self.abstract_boat
18746 }
18747 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18749 &mut self.abstract_boat
18750 }
18751 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18753 &self.abstract_boat.vehicle_entity
18754 }
18755 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18757 &mut self.abstract_boat.vehicle_entity
18758 }
18759 pub fn base(&self) -> &BaseEntityData {
18761 &self.abstract_boat.vehicle_entity.base
18762 }
18763 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18765 &mut self.abstract_boat.vehicle_entity.base
18766 }
18767 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18770 self.abstract_boat.pack_dirty()
18771 }
18772 pub fn pack_all(&self) -> Vec<DataValue> {
18774 self.abstract_boat.pack_all()
18775 }
18776 pub fn is_dirty(&self) -> bool {
18778 self.abstract_boat.is_dirty()
18779 }
18780}
18781impl Default for PaleOakBoatEntityData {
18782 fn default() -> Self {
18783 Self::new()
18784 }
18785}
18786impl VanillaEntityData for PaleOakBoatEntityData {
18787 fn base(&self) -> &BaseEntityData {
18788 PaleOakBoatEntityData::base(self)
18789 }
18790 fn base_mut(&mut self) -> &mut BaseEntityData {
18791 PaleOakBoatEntityData::base_mut(self)
18792 }
18793 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18794 PaleOakBoatEntityData::pack_dirty(self)
18795 }
18796 fn pack_all(&self) -> Vec<DataValue> {
18797 PaleOakBoatEntityData::pack_all(self)
18798 }
18799 fn is_dirty(&self) -> bool {
18800 PaleOakBoatEntityData::is_dirty(self)
18801 }
18802}
18803#[derive(Debug, Clone)]
18805pub struct PaleOakChestBoatEntityData {
18806 pub abstract_boat: AbstractBoatEntityData,
18807}
18808impl PaleOakChestBoatEntityData {
18809 pub fn new() -> Self {
18811 Self {
18812 abstract_boat: AbstractBoatEntityData::new(),
18813 }
18814 }
18815 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
18817 &self.abstract_boat
18818 }
18819 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
18821 &mut self.abstract_boat
18822 }
18823 pub fn vehicle_entity(&self) -> &VehicleEntityData {
18825 &self.abstract_boat.vehicle_entity
18826 }
18827 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
18829 &mut self.abstract_boat.vehicle_entity
18830 }
18831 pub fn base(&self) -> &BaseEntityData {
18833 &self.abstract_boat.vehicle_entity.base
18834 }
18835 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18837 &mut self.abstract_boat.vehicle_entity.base
18838 }
18839 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18842 self.abstract_boat.pack_dirty()
18843 }
18844 pub fn pack_all(&self) -> Vec<DataValue> {
18846 self.abstract_boat.pack_all()
18847 }
18848 pub fn is_dirty(&self) -> bool {
18850 self.abstract_boat.is_dirty()
18851 }
18852}
18853impl Default for PaleOakChestBoatEntityData {
18854 fn default() -> Self {
18855 Self::new()
18856 }
18857}
18858impl VanillaEntityData for PaleOakChestBoatEntityData {
18859 fn base(&self) -> &BaseEntityData {
18860 PaleOakChestBoatEntityData::base(self)
18861 }
18862 fn base_mut(&mut self) -> &mut BaseEntityData {
18863 PaleOakChestBoatEntityData::base_mut(self)
18864 }
18865 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18866 PaleOakChestBoatEntityData::pack_dirty(self)
18867 }
18868 fn pack_all(&self) -> Vec<DataValue> {
18869 PaleOakChestBoatEntityData::pack_all(self)
18870 }
18871 fn is_dirty(&self) -> bool {
18872 PaleOakChestBoatEntityData::is_dirty(self)
18873 }
18874}
18875#[derive(Debug, Clone)]
18877pub struct ParchedEntityData {
18878 pub mob: MobEntityData,
18879}
18880impl ParchedEntityData {
18881 pub fn new() -> Self {
18883 Self { mob: MobEntityData::new() }
18884 }
18885 pub fn mob(&self) -> &MobEntityData {
18887 &self.mob
18888 }
18889 pub fn mob_mut(&mut self) -> &mut MobEntityData {
18891 &mut self.mob
18892 }
18893 pub fn living_entity(&self) -> &LivingEntityData {
18895 &self.mob.living_entity
18896 }
18897 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18899 &mut self.mob.living_entity
18900 }
18901 pub fn base(&self) -> &BaseEntityData {
18903 &self.mob.living_entity.base
18904 }
18905 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18907 &mut self.mob.living_entity.base
18908 }
18909 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18912 self.mob.pack_dirty()
18913 }
18914 pub fn pack_all(&self) -> Vec<DataValue> {
18916 self.mob.pack_all()
18917 }
18918 pub fn is_dirty(&self) -> bool {
18920 self.mob.is_dirty()
18921 }
18922}
18923impl Default for ParchedEntityData {
18924 fn default() -> Self {
18925 Self::new()
18926 }
18927}
18928impl VanillaEntityData for ParchedEntityData {
18929 fn base(&self) -> &BaseEntityData {
18930 ParchedEntityData::base(self)
18931 }
18932 fn base_mut(&mut self) -> &mut BaseEntityData {
18933 ParchedEntityData::base_mut(self)
18934 }
18935 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
18936 ParchedEntityData::pack_dirty(self)
18937 }
18938 fn pack_all(&self) -> Vec<DataValue> {
18939 ParchedEntityData::pack_all(self)
18940 }
18941 fn is_dirty(&self) -> bool {
18942 ParchedEntityData::is_dirty(self)
18943 }
18944}
18945impl VanillaLivingEntityData for ParchedEntityData {
18946 fn living_entity(&self) -> &LivingEntityData {
18947 ParchedEntityData::living_entity(self)
18948 }
18949 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18950 ParchedEntityData::living_entity_mut(self)
18951 }
18952}
18953#[derive(Debug, Clone)]
18955pub struct PiglinBruteEntityData {
18956 pub abstract_piglin: AbstractPiglinEntityData,
18957}
18958impl PiglinBruteEntityData {
18959 pub fn new() -> Self {
18961 Self {
18962 abstract_piglin: AbstractPiglinEntityData::new(),
18963 }
18964 }
18965 pub fn abstract_piglin(&self) -> &AbstractPiglinEntityData {
18967 &self.abstract_piglin
18968 }
18969 pub fn abstract_piglin_mut(&mut self) -> &mut AbstractPiglinEntityData {
18971 &mut self.abstract_piglin
18972 }
18973 pub fn mob(&self) -> &MobEntityData {
18975 &self.abstract_piglin.mob
18976 }
18977 pub fn mob_mut(&mut self) -> &mut MobEntityData {
18979 &mut self.abstract_piglin.mob
18980 }
18981 pub fn living_entity(&self) -> &LivingEntityData {
18983 &self.abstract_piglin.mob.living_entity
18984 }
18985 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
18987 &mut self.abstract_piglin.mob.living_entity
18988 }
18989 pub fn base(&self) -> &BaseEntityData {
18991 &self.abstract_piglin.mob.living_entity.base
18992 }
18993 pub fn base_mut(&mut self) -> &mut BaseEntityData {
18995 &mut self.abstract_piglin.mob.living_entity.base
18996 }
18997 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19000 self.abstract_piglin.pack_dirty()
19001 }
19002 pub fn pack_all(&self) -> Vec<DataValue> {
19004 self.abstract_piglin.pack_all()
19005 }
19006 pub fn is_dirty(&self) -> bool {
19008 self.abstract_piglin.is_dirty()
19009 }
19010}
19011impl Default for PiglinBruteEntityData {
19012 fn default() -> Self {
19013 Self::new()
19014 }
19015}
19016impl VanillaEntityData for PiglinBruteEntityData {
19017 fn base(&self) -> &BaseEntityData {
19018 PiglinBruteEntityData::base(self)
19019 }
19020 fn base_mut(&mut self) -> &mut BaseEntityData {
19021 PiglinBruteEntityData::base_mut(self)
19022 }
19023 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19024 PiglinBruteEntityData::pack_dirty(self)
19025 }
19026 fn pack_all(&self) -> Vec<DataValue> {
19027 PiglinBruteEntityData::pack_all(self)
19028 }
19029 fn is_dirty(&self) -> bool {
19030 PiglinBruteEntityData::is_dirty(self)
19031 }
19032}
19033impl VanillaLivingEntityData for PiglinBruteEntityData {
19034 fn living_entity(&self) -> &LivingEntityData {
19035 PiglinBruteEntityData::living_entity(self)
19036 }
19037 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19038 PiglinBruteEntityData::living_entity_mut(self)
19039 }
19040}
19041#[derive(Debug, Clone)]
19043pub struct PoplarBoatEntityData {
19044 pub abstract_boat: AbstractBoatEntityData,
19045}
19046impl PoplarBoatEntityData {
19047 pub fn new() -> Self {
19049 Self {
19050 abstract_boat: AbstractBoatEntityData::new(),
19051 }
19052 }
19053 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
19055 &self.abstract_boat
19056 }
19057 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
19059 &mut self.abstract_boat
19060 }
19061 pub fn vehicle_entity(&self) -> &VehicleEntityData {
19063 &self.abstract_boat.vehicle_entity
19064 }
19065 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
19067 &mut self.abstract_boat.vehicle_entity
19068 }
19069 pub fn base(&self) -> &BaseEntityData {
19071 &self.abstract_boat.vehicle_entity.base
19072 }
19073 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19075 &mut self.abstract_boat.vehicle_entity.base
19076 }
19077 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19080 self.abstract_boat.pack_dirty()
19081 }
19082 pub fn pack_all(&self) -> Vec<DataValue> {
19084 self.abstract_boat.pack_all()
19085 }
19086 pub fn is_dirty(&self) -> bool {
19088 self.abstract_boat.is_dirty()
19089 }
19090}
19091impl Default for PoplarBoatEntityData {
19092 fn default() -> Self {
19093 Self::new()
19094 }
19095}
19096impl VanillaEntityData for PoplarBoatEntityData {
19097 fn base(&self) -> &BaseEntityData {
19098 PoplarBoatEntityData::base(self)
19099 }
19100 fn base_mut(&mut self) -> &mut BaseEntityData {
19101 PoplarBoatEntityData::base_mut(self)
19102 }
19103 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19104 PoplarBoatEntityData::pack_dirty(self)
19105 }
19106 fn pack_all(&self) -> Vec<DataValue> {
19107 PoplarBoatEntityData::pack_all(self)
19108 }
19109 fn is_dirty(&self) -> bool {
19110 PoplarBoatEntityData::is_dirty(self)
19111 }
19112}
19113#[derive(Debug, Clone)]
19115pub struct PoplarChestBoatEntityData {
19116 pub abstract_boat: AbstractBoatEntityData,
19117}
19118impl PoplarChestBoatEntityData {
19119 pub fn new() -> Self {
19121 Self {
19122 abstract_boat: AbstractBoatEntityData::new(),
19123 }
19124 }
19125 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
19127 &self.abstract_boat
19128 }
19129 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
19131 &mut self.abstract_boat
19132 }
19133 pub fn vehicle_entity(&self) -> &VehicleEntityData {
19135 &self.abstract_boat.vehicle_entity
19136 }
19137 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
19139 &mut self.abstract_boat.vehicle_entity
19140 }
19141 pub fn base(&self) -> &BaseEntityData {
19143 &self.abstract_boat.vehicle_entity.base
19144 }
19145 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19147 &mut self.abstract_boat.vehicle_entity.base
19148 }
19149 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19152 self.abstract_boat.pack_dirty()
19153 }
19154 pub fn pack_all(&self) -> Vec<DataValue> {
19156 self.abstract_boat.pack_all()
19157 }
19158 pub fn is_dirty(&self) -> bool {
19160 self.abstract_boat.is_dirty()
19161 }
19162}
19163impl Default for PoplarChestBoatEntityData {
19164 fn default() -> Self {
19165 Self::new()
19166 }
19167}
19168impl VanillaEntityData for PoplarChestBoatEntityData {
19169 fn base(&self) -> &BaseEntityData {
19170 PoplarChestBoatEntityData::base(self)
19171 }
19172 fn base_mut(&mut self) -> &mut BaseEntityData {
19173 PoplarChestBoatEntityData::base_mut(self)
19174 }
19175 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19176 PoplarChestBoatEntityData::pack_dirty(self)
19177 }
19178 fn pack_all(&self) -> Vec<DataValue> {
19179 PoplarChestBoatEntityData::pack_all(self)
19180 }
19181 fn is_dirty(&self) -> bool {
19182 PoplarChestBoatEntityData::is_dirty(self)
19183 }
19184}
19185#[derive(Debug, Clone)]
19187pub struct SplashPotionEntityData {
19188 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
19189}
19190impl SplashPotionEntityData {
19191 pub fn new() -> Self {
19193 let mut data = ThrowableItemProjectileEntityData::new();
19194 data.item_stack = SyncedValue::new(
19195 ItemStack::with_count(&*crate::vanilla_items::SPLASH_POTION, 1i32),
19196 );
19197 Self {
19198 throwable_item_projectile: data,
19199 }
19200 }
19201 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
19203 &self.throwable_item_projectile
19204 }
19205 pub fn throwable_item_projectile_mut(
19207 &mut self,
19208 ) -> &mut ThrowableItemProjectileEntityData {
19209 &mut self.throwable_item_projectile
19210 }
19211 pub fn base(&self) -> &BaseEntityData {
19213 &self.throwable_item_projectile.base
19214 }
19215 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19217 &mut self.throwable_item_projectile.base
19218 }
19219 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19222 self.throwable_item_projectile.pack_dirty()
19223 }
19224 pub fn pack_all(&self) -> Vec<DataValue> {
19226 self.throwable_item_projectile.pack_all()
19227 }
19228 pub fn is_dirty(&self) -> bool {
19230 self.throwable_item_projectile.is_dirty()
19231 }
19232}
19233impl Default for SplashPotionEntityData {
19234 fn default() -> Self {
19235 Self::new()
19236 }
19237}
19238impl VanillaEntityData for SplashPotionEntityData {
19239 fn base(&self) -> &BaseEntityData {
19240 SplashPotionEntityData::base(self)
19241 }
19242 fn base_mut(&mut self) -> &mut BaseEntityData {
19243 SplashPotionEntityData::base_mut(self)
19244 }
19245 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19246 SplashPotionEntityData::pack_dirty(self)
19247 }
19248 fn pack_all(&self) -> Vec<DataValue> {
19249 SplashPotionEntityData::pack_all(self)
19250 }
19251 fn is_dirty(&self) -> bool {
19252 SplashPotionEntityData::is_dirty(self)
19253 }
19254}
19255#[derive(Debug, Clone)]
19257pub struct LingeringPotionEntityData {
19258 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
19259}
19260impl LingeringPotionEntityData {
19261 pub fn new() -> Self {
19263 let mut data = ThrowableItemProjectileEntityData::new();
19264 data.item_stack = SyncedValue::new(
19265 ItemStack::with_count(&*crate::vanilla_items::LINGERING_POTION, 1i32),
19266 );
19267 Self {
19268 throwable_item_projectile: data,
19269 }
19270 }
19271 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
19273 &self.throwable_item_projectile
19274 }
19275 pub fn throwable_item_projectile_mut(
19277 &mut self,
19278 ) -> &mut ThrowableItemProjectileEntityData {
19279 &mut self.throwable_item_projectile
19280 }
19281 pub fn base(&self) -> &BaseEntityData {
19283 &self.throwable_item_projectile.base
19284 }
19285 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19287 &mut self.throwable_item_projectile.base
19288 }
19289 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19292 self.throwable_item_projectile.pack_dirty()
19293 }
19294 pub fn pack_all(&self) -> Vec<DataValue> {
19296 self.throwable_item_projectile.pack_all()
19297 }
19298 pub fn is_dirty(&self) -> bool {
19300 self.throwable_item_projectile.is_dirty()
19301 }
19302}
19303impl Default for LingeringPotionEntityData {
19304 fn default() -> Self {
19305 Self::new()
19306 }
19307}
19308impl VanillaEntityData for LingeringPotionEntityData {
19309 fn base(&self) -> &BaseEntityData {
19310 LingeringPotionEntityData::base(self)
19311 }
19312 fn base_mut(&mut self) -> &mut BaseEntityData {
19313 LingeringPotionEntityData::base_mut(self)
19314 }
19315 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19316 LingeringPotionEntityData::pack_dirty(self)
19317 }
19318 fn pack_all(&self) -> Vec<DataValue> {
19319 LingeringPotionEntityData::pack_all(self)
19320 }
19321 fn is_dirty(&self) -> bool {
19322 LingeringPotionEntityData::is_dirty(self)
19323 }
19324}
19325#[derive(Debug, Clone)]
19327pub struct RavagerEntityData {
19328 pub raider: RaiderEntityData,
19329}
19330impl RavagerEntityData {
19331 pub fn new() -> Self {
19333 Self {
19334 raider: RaiderEntityData::new(),
19335 }
19336 }
19337 pub fn raider(&self) -> &RaiderEntityData {
19339 &self.raider
19340 }
19341 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
19343 &mut self.raider
19344 }
19345 pub fn mob(&self) -> &MobEntityData {
19347 &self.raider.mob
19348 }
19349 pub fn mob_mut(&mut self) -> &mut MobEntityData {
19351 &mut self.raider.mob
19352 }
19353 pub fn living_entity(&self) -> &LivingEntityData {
19355 &self.raider.mob.living_entity
19356 }
19357 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19359 &mut self.raider.mob.living_entity
19360 }
19361 pub fn base(&self) -> &BaseEntityData {
19363 &self.raider.mob.living_entity.base
19364 }
19365 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19367 &mut self.raider.mob.living_entity.base
19368 }
19369 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19372 self.raider.pack_dirty()
19373 }
19374 pub fn pack_all(&self) -> Vec<DataValue> {
19376 self.raider.pack_all()
19377 }
19378 pub fn is_dirty(&self) -> bool {
19380 self.raider.is_dirty()
19381 }
19382}
19383impl Default for RavagerEntityData {
19384 fn default() -> Self {
19385 Self::new()
19386 }
19387}
19388impl VanillaEntityData for RavagerEntityData {
19389 fn base(&self) -> &BaseEntityData {
19390 RavagerEntityData::base(self)
19391 }
19392 fn base_mut(&mut self) -> &mut BaseEntityData {
19393 RavagerEntityData::base_mut(self)
19394 }
19395 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19396 RavagerEntityData::pack_dirty(self)
19397 }
19398 fn pack_all(&self) -> Vec<DataValue> {
19399 RavagerEntityData::pack_all(self)
19400 }
19401 fn is_dirty(&self) -> bool {
19402 RavagerEntityData::is_dirty(self)
19403 }
19404}
19405impl VanillaLivingEntityData for RavagerEntityData {
19406 fn living_entity(&self) -> &LivingEntityData {
19407 RavagerEntityData::living_entity(self)
19408 }
19409 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19410 RavagerEntityData::living_entity_mut(self)
19411 }
19412}
19413#[derive(Debug, Clone)]
19415pub struct ShulkerBulletEntityData {
19416 pub base: BaseEntityData,
19417}
19418impl ShulkerBulletEntityData {
19419 pub fn new() -> Self {
19421 Self {
19422 base: BaseEntityData::new(),
19423 }
19424 }
19425 pub fn base(&self) -> &BaseEntityData {
19427 &self.base
19428 }
19429 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19431 &mut self.base
19432 }
19433 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19436 self.base.pack_dirty()
19437 }
19438 pub fn pack_all(&self) -> Vec<DataValue> {
19440 self.base.pack_all()
19441 }
19442 pub fn is_dirty(&self) -> bool {
19444 self.base.is_dirty()
19445 }
19446}
19447impl Default for ShulkerBulletEntityData {
19448 fn default() -> Self {
19449 Self::new()
19450 }
19451}
19452impl VanillaEntityData for ShulkerBulletEntityData {
19453 fn base(&self) -> &BaseEntityData {
19454 ShulkerBulletEntityData::base(self)
19455 }
19456 fn base_mut(&mut self) -> &mut BaseEntityData {
19457 ShulkerBulletEntityData::base_mut(self)
19458 }
19459 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19460 ShulkerBulletEntityData::pack_dirty(self)
19461 }
19462 fn pack_all(&self) -> Vec<DataValue> {
19463 ShulkerBulletEntityData::pack_all(self)
19464 }
19465 fn is_dirty(&self) -> bool {
19466 ShulkerBulletEntityData::is_dirty(self)
19467 }
19468}
19469#[derive(Debug, Clone)]
19471pub struct SilverfishEntityData {
19472 pub mob: MobEntityData,
19473}
19474impl SilverfishEntityData {
19475 pub fn new() -> Self {
19477 Self { mob: MobEntityData::new() }
19478 }
19479 pub fn mob(&self) -> &MobEntityData {
19481 &self.mob
19482 }
19483 pub fn mob_mut(&mut self) -> &mut MobEntityData {
19485 &mut self.mob
19486 }
19487 pub fn living_entity(&self) -> &LivingEntityData {
19489 &self.mob.living_entity
19490 }
19491 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19493 &mut self.mob.living_entity
19494 }
19495 pub fn base(&self) -> &BaseEntityData {
19497 &self.mob.living_entity.base
19498 }
19499 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19501 &mut self.mob.living_entity.base
19502 }
19503 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19506 self.mob.pack_dirty()
19507 }
19508 pub fn pack_all(&self) -> Vec<DataValue> {
19510 self.mob.pack_all()
19511 }
19512 pub fn is_dirty(&self) -> bool {
19514 self.mob.is_dirty()
19515 }
19516}
19517impl Default for SilverfishEntityData {
19518 fn default() -> Self {
19519 Self::new()
19520 }
19521}
19522impl VanillaEntityData for SilverfishEntityData {
19523 fn base(&self) -> &BaseEntityData {
19524 SilverfishEntityData::base(self)
19525 }
19526 fn base_mut(&mut self) -> &mut BaseEntityData {
19527 SilverfishEntityData::base_mut(self)
19528 }
19529 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19530 SilverfishEntityData::pack_dirty(self)
19531 }
19532 fn pack_all(&self) -> Vec<DataValue> {
19533 SilverfishEntityData::pack_all(self)
19534 }
19535 fn is_dirty(&self) -> bool {
19536 SilverfishEntityData::is_dirty(self)
19537 }
19538}
19539impl VanillaLivingEntityData for SilverfishEntityData {
19540 fn living_entity(&self) -> &LivingEntityData {
19541 SilverfishEntityData::living_entity(self)
19542 }
19543 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19544 SilverfishEntityData::living_entity_mut(self)
19545 }
19546}
19547#[derive(Debug, Clone)]
19549pub struct SkeletonHorseEntityData {
19550 pub abstract_horse: AbstractHorseEntityData,
19551}
19552impl SkeletonHorseEntityData {
19553 pub fn new() -> Self {
19555 Self {
19556 abstract_horse: AbstractHorseEntityData::new(),
19557 }
19558 }
19559 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
19561 &self.abstract_horse
19562 }
19563 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
19565 &mut self.abstract_horse
19566 }
19567 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
19569 &self.abstract_horse.ageable_mob
19570 }
19571 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
19573 &mut self.abstract_horse.ageable_mob
19574 }
19575 pub fn mob(&self) -> &MobEntityData {
19577 &self.abstract_horse.ageable_mob.mob
19578 }
19579 pub fn mob_mut(&mut self) -> &mut MobEntityData {
19581 &mut self.abstract_horse.ageable_mob.mob
19582 }
19583 pub fn living_entity(&self) -> &LivingEntityData {
19585 &self.abstract_horse.ageable_mob.mob.living_entity
19586 }
19587 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19589 &mut self.abstract_horse.ageable_mob.mob.living_entity
19590 }
19591 pub fn base(&self) -> &BaseEntityData {
19593 &self.abstract_horse.ageable_mob.mob.living_entity.base
19594 }
19595 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19597 &mut self.abstract_horse.ageable_mob.mob.living_entity.base
19598 }
19599 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19602 self.abstract_horse.pack_dirty()
19603 }
19604 pub fn pack_all(&self) -> Vec<DataValue> {
19606 self.abstract_horse.pack_all()
19607 }
19608 pub fn is_dirty(&self) -> bool {
19610 self.abstract_horse.is_dirty()
19611 }
19612}
19613impl Default for SkeletonHorseEntityData {
19614 fn default() -> Self {
19615 Self::new()
19616 }
19617}
19618impl VanillaEntityData for SkeletonHorseEntityData {
19619 fn base(&self) -> &BaseEntityData {
19620 SkeletonHorseEntityData::base(self)
19621 }
19622 fn base_mut(&mut self) -> &mut BaseEntityData {
19623 SkeletonHorseEntityData::base_mut(self)
19624 }
19625 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19626 SkeletonHorseEntityData::pack_dirty(self)
19627 }
19628 fn pack_all(&self) -> Vec<DataValue> {
19629 SkeletonHorseEntityData::pack_all(self)
19630 }
19631 fn is_dirty(&self) -> bool {
19632 SkeletonHorseEntityData::is_dirty(self)
19633 }
19634}
19635impl VanillaLivingEntityData for SkeletonHorseEntityData {
19636 fn living_entity(&self) -> &LivingEntityData {
19637 SkeletonHorseEntityData::living_entity(self)
19638 }
19639 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19640 SkeletonHorseEntityData::living_entity_mut(self)
19641 }
19642}
19643#[derive(Debug, Clone)]
19645pub struct SlimeEntityData {
19646 pub abstract_cube_mob: AbstractCubeMobEntityData,
19647}
19648impl SlimeEntityData {
19649 pub fn new() -> Self {
19651 Self {
19652 abstract_cube_mob: AbstractCubeMobEntityData::new(),
19653 }
19654 }
19655 pub fn abstract_cube_mob(&self) -> &AbstractCubeMobEntityData {
19657 &self.abstract_cube_mob
19658 }
19659 pub fn abstract_cube_mob_mut(&mut self) -> &mut AbstractCubeMobEntityData {
19661 &mut self.abstract_cube_mob
19662 }
19663 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
19665 &self.abstract_cube_mob.ageable_mob
19666 }
19667 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
19669 &mut self.abstract_cube_mob.ageable_mob
19670 }
19671 pub fn mob(&self) -> &MobEntityData {
19673 &self.abstract_cube_mob.ageable_mob.mob
19674 }
19675 pub fn mob_mut(&mut self) -> &mut MobEntityData {
19677 &mut self.abstract_cube_mob.ageable_mob.mob
19678 }
19679 pub fn living_entity(&self) -> &LivingEntityData {
19681 &self.abstract_cube_mob.ageable_mob.mob.living_entity
19682 }
19683 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19685 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity
19686 }
19687 pub fn base(&self) -> &BaseEntityData {
19689 &self.abstract_cube_mob.ageable_mob.mob.living_entity.base
19690 }
19691 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19693 &mut self.abstract_cube_mob.ageable_mob.mob.living_entity.base
19694 }
19695 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19698 self.abstract_cube_mob.pack_dirty()
19699 }
19700 pub fn pack_all(&self) -> Vec<DataValue> {
19702 self.abstract_cube_mob.pack_all()
19703 }
19704 pub fn is_dirty(&self) -> bool {
19706 self.abstract_cube_mob.is_dirty()
19707 }
19708}
19709impl Default for SlimeEntityData {
19710 fn default() -> Self {
19711 Self::new()
19712 }
19713}
19714impl VanillaEntityData for SlimeEntityData {
19715 fn base(&self) -> &BaseEntityData {
19716 SlimeEntityData::base(self)
19717 }
19718 fn base_mut(&mut self) -> &mut BaseEntityData {
19719 SlimeEntityData::base_mut(self)
19720 }
19721 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19722 SlimeEntityData::pack_dirty(self)
19723 }
19724 fn pack_all(&self) -> Vec<DataValue> {
19725 SlimeEntityData::pack_all(self)
19726 }
19727 fn is_dirty(&self) -> bool {
19728 SlimeEntityData::is_dirty(self)
19729 }
19730}
19731impl VanillaLivingEntityData for SlimeEntityData {
19732 fn living_entity(&self) -> &LivingEntityData {
19733 SlimeEntityData::living_entity(self)
19734 }
19735 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
19736 SlimeEntityData::living_entity_mut(self)
19737 }
19738}
19739#[derive(Debug, Clone)]
19741pub struct SmallFireballEntityData {
19742 pub fireball: FireballEntityData,
19743}
19744impl SmallFireballEntityData {
19745 pub fn new() -> Self {
19747 Self {
19748 fireball: FireballEntityData::new(),
19749 }
19750 }
19751 pub fn fireball(&self) -> &FireballEntityData {
19753 &self.fireball
19754 }
19755 pub fn fireball_mut(&mut self) -> &mut FireballEntityData {
19757 &mut self.fireball
19758 }
19759 pub fn base(&self) -> &BaseEntityData {
19761 &self.fireball.base
19762 }
19763 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19765 &mut self.fireball.base
19766 }
19767 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19770 self.fireball.pack_dirty()
19771 }
19772 pub fn pack_all(&self) -> Vec<DataValue> {
19774 self.fireball.pack_all()
19775 }
19776 pub fn is_dirty(&self) -> bool {
19778 self.fireball.is_dirty()
19779 }
19780}
19781impl Default for SmallFireballEntityData {
19782 fn default() -> Self {
19783 Self::new()
19784 }
19785}
19786impl VanillaEntityData for SmallFireballEntityData {
19787 fn base(&self) -> &BaseEntityData {
19788 SmallFireballEntityData::base(self)
19789 }
19790 fn base_mut(&mut self) -> &mut BaseEntityData {
19791 SmallFireballEntityData::base_mut(self)
19792 }
19793 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19794 SmallFireballEntityData::pack_dirty(self)
19795 }
19796 fn pack_all(&self) -> Vec<DataValue> {
19797 SmallFireballEntityData::pack_all(self)
19798 }
19799 fn is_dirty(&self) -> bool {
19800 SmallFireballEntityData::is_dirty(self)
19801 }
19802}
19803#[derive(Debug, Clone)]
19805pub struct SnowballEntityData {
19806 pub throwable_item_projectile: ThrowableItemProjectileEntityData,
19807}
19808impl SnowballEntityData {
19809 pub fn new() -> Self {
19811 let mut data = ThrowableItemProjectileEntityData::new();
19812 data.item_stack = SyncedValue::new(
19813 ItemStack::with_count(&*crate::vanilla_items::SNOWBALL, 1i32),
19814 );
19815 Self {
19816 throwable_item_projectile: data,
19817 }
19818 }
19819 pub fn throwable_item_projectile(&self) -> &ThrowableItemProjectileEntityData {
19821 &self.throwable_item_projectile
19822 }
19823 pub fn throwable_item_projectile_mut(
19825 &mut self,
19826 ) -> &mut ThrowableItemProjectileEntityData {
19827 &mut self.throwable_item_projectile
19828 }
19829 pub fn base(&self) -> &BaseEntityData {
19831 &self.throwable_item_projectile.base
19832 }
19833 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19835 &mut self.throwable_item_projectile.base
19836 }
19837 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19840 self.throwable_item_projectile.pack_dirty()
19841 }
19842 pub fn pack_all(&self) -> Vec<DataValue> {
19844 self.throwable_item_projectile.pack_all()
19845 }
19846 pub fn is_dirty(&self) -> bool {
19848 self.throwable_item_projectile.is_dirty()
19849 }
19850}
19851impl Default for SnowballEntityData {
19852 fn default() -> Self {
19853 Self::new()
19854 }
19855}
19856impl VanillaEntityData for SnowballEntityData {
19857 fn base(&self) -> &BaseEntityData {
19858 SnowballEntityData::base(self)
19859 }
19860 fn base_mut(&mut self) -> &mut BaseEntityData {
19861 SnowballEntityData::base_mut(self)
19862 }
19863 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19864 SnowballEntityData::pack_dirty(self)
19865 }
19866 fn pack_all(&self) -> Vec<DataValue> {
19867 SnowballEntityData::pack_all(self)
19868 }
19869 fn is_dirty(&self) -> bool {
19870 SnowballEntityData::is_dirty(self)
19871 }
19872}
19873#[derive(Debug, Clone)]
19875pub struct SpawnerMinecartEntityData {
19876 pub abstract_minecart: AbstractMinecartEntityData,
19877}
19878impl SpawnerMinecartEntityData {
19879 pub fn new() -> Self {
19881 let mut data = AbstractMinecartEntityData::new();
19882 data.id_display_offset = SyncedValue::new(6i32);
19883 Self { abstract_minecart: data }
19884 }
19885 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
19887 &self.abstract_minecart
19888 }
19889 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
19891 &mut self.abstract_minecart
19892 }
19893 pub fn vehicle_entity(&self) -> &VehicleEntityData {
19895 &self.abstract_minecart.vehicle_entity
19896 }
19897 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
19899 &mut self.abstract_minecart.vehicle_entity
19900 }
19901 pub fn base(&self) -> &BaseEntityData {
19903 &self.abstract_minecart.vehicle_entity.base
19904 }
19905 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19907 &mut self.abstract_minecart.vehicle_entity.base
19908 }
19909 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19912 self.abstract_minecart.pack_dirty()
19913 }
19914 pub fn pack_all(&self) -> Vec<DataValue> {
19916 self.abstract_minecart.pack_all()
19917 }
19918 pub fn is_dirty(&self) -> bool {
19920 self.abstract_minecart.is_dirty()
19921 }
19922}
19923impl Default for SpawnerMinecartEntityData {
19924 fn default() -> Self {
19925 Self::new()
19926 }
19927}
19928impl VanillaEntityData for SpawnerMinecartEntityData {
19929 fn base(&self) -> &BaseEntityData {
19930 SpawnerMinecartEntityData::base(self)
19931 }
19932 fn base_mut(&mut self) -> &mut BaseEntityData {
19933 SpawnerMinecartEntityData::base_mut(self)
19934 }
19935 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19936 SpawnerMinecartEntityData::pack_dirty(self)
19937 }
19938 fn pack_all(&self) -> Vec<DataValue> {
19939 SpawnerMinecartEntityData::pack_all(self)
19940 }
19941 fn is_dirty(&self) -> bool {
19942 SpawnerMinecartEntityData::is_dirty(self)
19943 }
19944}
19945#[derive(Debug, Clone)]
19947pub struct SpectralArrowEntityData {
19948 pub abstract_arrow: AbstractArrowEntityData,
19949}
19950impl SpectralArrowEntityData {
19951 pub fn new() -> Self {
19953 Self {
19954 abstract_arrow: AbstractArrowEntityData::new(),
19955 }
19956 }
19957 pub fn abstract_arrow(&self) -> &AbstractArrowEntityData {
19959 &self.abstract_arrow
19960 }
19961 pub fn abstract_arrow_mut(&mut self) -> &mut AbstractArrowEntityData {
19963 &mut self.abstract_arrow
19964 }
19965 pub fn base(&self) -> &BaseEntityData {
19967 &self.abstract_arrow.base
19968 }
19969 pub fn base_mut(&mut self) -> &mut BaseEntityData {
19971 &mut self.abstract_arrow.base
19972 }
19973 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
19976 self.abstract_arrow.pack_dirty()
19977 }
19978 pub fn pack_all(&self) -> Vec<DataValue> {
19980 self.abstract_arrow.pack_all()
19981 }
19982 pub fn is_dirty(&self) -> bool {
19984 self.abstract_arrow.is_dirty()
19985 }
19986}
19987impl Default for SpectralArrowEntityData {
19988 fn default() -> Self {
19989 Self::new()
19990 }
19991}
19992impl VanillaEntityData for SpectralArrowEntityData {
19993 fn base(&self) -> &BaseEntityData {
19994 SpectralArrowEntityData::base(self)
19995 }
19996 fn base_mut(&mut self) -> &mut BaseEntityData {
19997 SpectralArrowEntityData::base_mut(self)
19998 }
19999 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20000 SpectralArrowEntityData::pack_dirty(self)
20001 }
20002 fn pack_all(&self) -> Vec<DataValue> {
20003 SpectralArrowEntityData::pack_all(self)
20004 }
20005 fn is_dirty(&self) -> bool {
20006 SpectralArrowEntityData::is_dirty(self)
20007 }
20008}
20009#[derive(Debug, Clone)]
20011pub struct SpruceBoatEntityData {
20012 pub abstract_boat: AbstractBoatEntityData,
20013}
20014impl SpruceBoatEntityData {
20015 pub fn new() -> Self {
20017 Self {
20018 abstract_boat: AbstractBoatEntityData::new(),
20019 }
20020 }
20021 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
20023 &self.abstract_boat
20024 }
20025 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
20027 &mut self.abstract_boat
20028 }
20029 pub fn vehicle_entity(&self) -> &VehicleEntityData {
20031 &self.abstract_boat.vehicle_entity
20032 }
20033 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
20035 &mut self.abstract_boat.vehicle_entity
20036 }
20037 pub fn base(&self) -> &BaseEntityData {
20039 &self.abstract_boat.vehicle_entity.base
20040 }
20041 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20043 &mut self.abstract_boat.vehicle_entity.base
20044 }
20045 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20048 self.abstract_boat.pack_dirty()
20049 }
20050 pub fn pack_all(&self) -> Vec<DataValue> {
20052 self.abstract_boat.pack_all()
20053 }
20054 pub fn is_dirty(&self) -> bool {
20056 self.abstract_boat.is_dirty()
20057 }
20058}
20059impl Default for SpruceBoatEntityData {
20060 fn default() -> Self {
20061 Self::new()
20062 }
20063}
20064impl VanillaEntityData for SpruceBoatEntityData {
20065 fn base(&self) -> &BaseEntityData {
20066 SpruceBoatEntityData::base(self)
20067 }
20068 fn base_mut(&mut self) -> &mut BaseEntityData {
20069 SpruceBoatEntityData::base_mut(self)
20070 }
20071 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20072 SpruceBoatEntityData::pack_dirty(self)
20073 }
20074 fn pack_all(&self) -> Vec<DataValue> {
20075 SpruceBoatEntityData::pack_all(self)
20076 }
20077 fn is_dirty(&self) -> bool {
20078 SpruceBoatEntityData::is_dirty(self)
20079 }
20080}
20081#[derive(Debug, Clone)]
20083pub struct SpruceChestBoatEntityData {
20084 pub abstract_boat: AbstractBoatEntityData,
20085}
20086impl SpruceChestBoatEntityData {
20087 pub fn new() -> Self {
20089 Self {
20090 abstract_boat: AbstractBoatEntityData::new(),
20091 }
20092 }
20093 pub fn abstract_boat(&self) -> &AbstractBoatEntityData {
20095 &self.abstract_boat
20096 }
20097 pub fn abstract_boat_mut(&mut self) -> &mut AbstractBoatEntityData {
20099 &mut self.abstract_boat
20100 }
20101 pub fn vehicle_entity(&self) -> &VehicleEntityData {
20103 &self.abstract_boat.vehicle_entity
20104 }
20105 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
20107 &mut self.abstract_boat.vehicle_entity
20108 }
20109 pub fn base(&self) -> &BaseEntityData {
20111 &self.abstract_boat.vehicle_entity.base
20112 }
20113 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20115 &mut self.abstract_boat.vehicle_entity.base
20116 }
20117 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20120 self.abstract_boat.pack_dirty()
20121 }
20122 pub fn pack_all(&self) -> Vec<DataValue> {
20124 self.abstract_boat.pack_all()
20125 }
20126 pub fn is_dirty(&self) -> bool {
20128 self.abstract_boat.is_dirty()
20129 }
20130}
20131impl Default for SpruceChestBoatEntityData {
20132 fn default() -> Self {
20133 Self::new()
20134 }
20135}
20136impl VanillaEntityData for SpruceChestBoatEntityData {
20137 fn base(&self) -> &BaseEntityData {
20138 SpruceChestBoatEntityData::base(self)
20139 }
20140 fn base_mut(&mut self) -> &mut BaseEntityData {
20141 SpruceChestBoatEntityData::base_mut(self)
20142 }
20143 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20144 SpruceChestBoatEntityData::pack_dirty(self)
20145 }
20146 fn pack_all(&self) -> Vec<DataValue> {
20147 SpruceChestBoatEntityData::pack_all(self)
20148 }
20149 fn is_dirty(&self) -> bool {
20150 SpruceChestBoatEntityData::is_dirty(self)
20151 }
20152}
20153#[derive(Debug, Clone)]
20155pub struct SquidEntityData {
20156 pub ageable_mob: AgeableMobEntityData,
20157}
20158impl SquidEntityData {
20159 pub fn new() -> Self {
20161 Self {
20162 ageable_mob: AgeableMobEntityData::new(),
20163 }
20164 }
20165 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
20167 &self.ageable_mob
20168 }
20169 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
20171 &mut self.ageable_mob
20172 }
20173 pub fn mob(&self) -> &MobEntityData {
20175 &self.ageable_mob.mob
20176 }
20177 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20179 &mut self.ageable_mob.mob
20180 }
20181 pub fn living_entity(&self) -> &LivingEntityData {
20183 &self.ageable_mob.mob.living_entity
20184 }
20185 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20187 &mut self.ageable_mob.mob.living_entity
20188 }
20189 pub fn base(&self) -> &BaseEntityData {
20191 &self.ageable_mob.mob.living_entity.base
20192 }
20193 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20195 &mut self.ageable_mob.mob.living_entity.base
20196 }
20197 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20200 self.ageable_mob.pack_dirty()
20201 }
20202 pub fn pack_all(&self) -> Vec<DataValue> {
20204 self.ageable_mob.pack_all()
20205 }
20206 pub fn is_dirty(&self) -> bool {
20208 self.ageable_mob.is_dirty()
20209 }
20210}
20211impl Default for SquidEntityData {
20212 fn default() -> Self {
20213 Self::new()
20214 }
20215}
20216impl VanillaEntityData for SquidEntityData {
20217 fn base(&self) -> &BaseEntityData {
20218 SquidEntityData::base(self)
20219 }
20220 fn base_mut(&mut self) -> &mut BaseEntityData {
20221 SquidEntityData::base_mut(self)
20222 }
20223 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20224 SquidEntityData::pack_dirty(self)
20225 }
20226 fn pack_all(&self) -> Vec<DataValue> {
20227 SquidEntityData::pack_all(self)
20228 }
20229 fn is_dirty(&self) -> bool {
20230 SquidEntityData::is_dirty(self)
20231 }
20232}
20233impl VanillaLivingEntityData for SquidEntityData {
20234 fn living_entity(&self) -> &LivingEntityData {
20235 SquidEntityData::living_entity(self)
20236 }
20237 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20238 SquidEntityData::living_entity_mut(self)
20239 }
20240}
20241#[derive(Debug, Clone)]
20243pub struct StrayEntityData {
20244 pub mob: MobEntityData,
20245}
20246impl StrayEntityData {
20247 pub fn new() -> Self {
20249 Self { mob: MobEntityData::new() }
20250 }
20251 pub fn mob(&self) -> &MobEntityData {
20253 &self.mob
20254 }
20255 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20257 &mut self.mob
20258 }
20259 pub fn living_entity(&self) -> &LivingEntityData {
20261 &self.mob.living_entity
20262 }
20263 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20265 &mut self.mob.living_entity
20266 }
20267 pub fn base(&self) -> &BaseEntityData {
20269 &self.mob.living_entity.base
20270 }
20271 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20273 &mut self.mob.living_entity.base
20274 }
20275 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20278 self.mob.pack_dirty()
20279 }
20280 pub fn pack_all(&self) -> Vec<DataValue> {
20282 self.mob.pack_all()
20283 }
20284 pub fn is_dirty(&self) -> bool {
20286 self.mob.is_dirty()
20287 }
20288}
20289impl Default for StrayEntityData {
20290 fn default() -> Self {
20291 Self::new()
20292 }
20293}
20294impl VanillaEntityData for StrayEntityData {
20295 fn base(&self) -> &BaseEntityData {
20296 StrayEntityData::base(self)
20297 }
20298 fn base_mut(&mut self) -> &mut BaseEntityData {
20299 StrayEntityData::base_mut(self)
20300 }
20301 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20302 StrayEntityData::pack_dirty(self)
20303 }
20304 fn pack_all(&self) -> Vec<DataValue> {
20305 StrayEntityData::pack_all(self)
20306 }
20307 fn is_dirty(&self) -> bool {
20308 StrayEntityData::is_dirty(self)
20309 }
20310}
20311impl VanillaLivingEntityData for StrayEntityData {
20312 fn living_entity(&self) -> &LivingEntityData {
20313 StrayEntityData::living_entity(self)
20314 }
20315 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20316 StrayEntityData::living_entity_mut(self)
20317 }
20318}
20319#[derive(Debug, Clone)]
20321pub struct TntEntityData {
20322 pub primed_tnt: PrimedTntEntityData,
20323}
20324impl TntEntityData {
20325 pub fn new() -> Self {
20327 Self {
20328 primed_tnt: PrimedTntEntityData::new(),
20329 }
20330 }
20331 pub fn primed_tnt(&self) -> &PrimedTntEntityData {
20333 &self.primed_tnt
20334 }
20335 pub fn primed_tnt_mut(&mut self) -> &mut PrimedTntEntityData {
20337 &mut self.primed_tnt
20338 }
20339 pub fn base(&self) -> &BaseEntityData {
20341 &self.primed_tnt.base
20342 }
20343 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20345 &mut self.primed_tnt.base
20346 }
20347 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20350 self.primed_tnt.pack_dirty()
20351 }
20352 pub fn pack_all(&self) -> Vec<DataValue> {
20354 self.primed_tnt.pack_all()
20355 }
20356 pub fn is_dirty(&self) -> bool {
20358 self.primed_tnt.is_dirty()
20359 }
20360}
20361impl Default for TntEntityData {
20362 fn default() -> Self {
20363 Self::new()
20364 }
20365}
20366impl VanillaEntityData for TntEntityData {
20367 fn base(&self) -> &BaseEntityData {
20368 TntEntityData::base(self)
20369 }
20370 fn base_mut(&mut self) -> &mut BaseEntityData {
20371 TntEntityData::base_mut(self)
20372 }
20373 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20374 TntEntityData::pack_dirty(self)
20375 }
20376 fn pack_all(&self) -> Vec<DataValue> {
20377 TntEntityData::pack_all(self)
20378 }
20379 fn is_dirty(&self) -> bool {
20380 TntEntityData::is_dirty(self)
20381 }
20382}
20383#[derive(Debug, Clone)]
20385pub struct TntMinecartEntityData {
20386 pub abstract_minecart: AbstractMinecartEntityData,
20387}
20388impl TntMinecartEntityData {
20389 pub fn new() -> Self {
20391 let mut data = AbstractMinecartEntityData::new();
20392 data.id_display_offset = SyncedValue::new(6i32);
20393 Self { abstract_minecart: data }
20394 }
20395 pub fn abstract_minecart(&self) -> &AbstractMinecartEntityData {
20397 &self.abstract_minecart
20398 }
20399 pub fn abstract_minecart_mut(&mut self) -> &mut AbstractMinecartEntityData {
20401 &mut self.abstract_minecart
20402 }
20403 pub fn vehicle_entity(&self) -> &VehicleEntityData {
20405 &self.abstract_minecart.vehicle_entity
20406 }
20407 pub fn vehicle_entity_mut(&mut self) -> &mut VehicleEntityData {
20409 &mut self.abstract_minecart.vehicle_entity
20410 }
20411 pub fn base(&self) -> &BaseEntityData {
20413 &self.abstract_minecart.vehicle_entity.base
20414 }
20415 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20417 &mut self.abstract_minecart.vehicle_entity.base
20418 }
20419 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20422 self.abstract_minecart.pack_dirty()
20423 }
20424 pub fn pack_all(&self) -> Vec<DataValue> {
20426 self.abstract_minecart.pack_all()
20427 }
20428 pub fn is_dirty(&self) -> bool {
20430 self.abstract_minecart.is_dirty()
20431 }
20432}
20433impl Default for TntMinecartEntityData {
20434 fn default() -> Self {
20435 Self::new()
20436 }
20437}
20438impl VanillaEntityData for TntMinecartEntityData {
20439 fn base(&self) -> &BaseEntityData {
20440 TntMinecartEntityData::base(self)
20441 }
20442 fn base_mut(&mut self) -> &mut BaseEntityData {
20443 TntMinecartEntityData::base_mut(self)
20444 }
20445 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20446 TntMinecartEntityData::pack_dirty(self)
20447 }
20448 fn pack_all(&self) -> Vec<DataValue> {
20449 TntMinecartEntityData::pack_all(self)
20450 }
20451 fn is_dirty(&self) -> bool {
20452 TntMinecartEntityData::is_dirty(self)
20453 }
20454}
20455#[derive(Debug, Clone)]
20457pub struct TraderLlamaEntityData {
20458 pub llama: LlamaEntityData,
20459}
20460impl TraderLlamaEntityData {
20461 pub fn new() -> Self {
20463 Self {
20464 llama: LlamaEntityData::new(),
20465 }
20466 }
20467 pub fn llama(&self) -> &LlamaEntityData {
20469 &self.llama
20470 }
20471 pub fn llama_mut(&mut self) -> &mut LlamaEntityData {
20473 &mut self.llama
20474 }
20475 pub fn abstract_chested_horse(&self) -> &AbstractChestedHorseEntityData {
20477 &self.llama.abstract_chested_horse
20478 }
20479 pub fn abstract_chested_horse_mut(&mut self) -> &mut AbstractChestedHorseEntityData {
20481 &mut self.llama.abstract_chested_horse
20482 }
20483 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
20485 &self.llama.abstract_chested_horse.abstract_horse
20486 }
20487 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
20489 &mut self.llama.abstract_chested_horse.abstract_horse
20490 }
20491 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
20493 &self.llama.abstract_chested_horse.abstract_horse.ageable_mob
20494 }
20495 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
20497 &mut self.llama.abstract_chested_horse.abstract_horse.ageable_mob
20498 }
20499 pub fn mob(&self) -> &MobEntityData {
20501 &self.llama.abstract_chested_horse.abstract_horse.ageable_mob.mob
20502 }
20503 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20505 &mut self.llama.abstract_chested_horse.abstract_horse.ageable_mob.mob
20506 }
20507 pub fn living_entity(&self) -> &LivingEntityData {
20509 &self.llama.abstract_chested_horse.abstract_horse.ageable_mob.mob.living_entity
20510 }
20511 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20513 &mut self
20514 .llama
20515 .abstract_chested_horse
20516 .abstract_horse
20517 .ageable_mob
20518 .mob
20519 .living_entity
20520 }
20521 pub fn base(&self) -> &BaseEntityData {
20523 &self
20524 .llama
20525 .abstract_chested_horse
20526 .abstract_horse
20527 .ageable_mob
20528 .mob
20529 .living_entity
20530 .base
20531 }
20532 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20534 &mut self
20535 .llama
20536 .abstract_chested_horse
20537 .abstract_horse
20538 .ageable_mob
20539 .mob
20540 .living_entity
20541 .base
20542 }
20543 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20546 self.llama.pack_dirty()
20547 }
20548 pub fn pack_all(&self) -> Vec<DataValue> {
20550 self.llama.pack_all()
20551 }
20552 pub fn is_dirty(&self) -> bool {
20554 self.llama.is_dirty()
20555 }
20556}
20557impl Default for TraderLlamaEntityData {
20558 fn default() -> Self {
20559 Self::new()
20560 }
20561}
20562impl VanillaEntityData for TraderLlamaEntityData {
20563 fn base(&self) -> &BaseEntityData {
20564 TraderLlamaEntityData::base(self)
20565 }
20566 fn base_mut(&mut self) -> &mut BaseEntityData {
20567 TraderLlamaEntityData::base_mut(self)
20568 }
20569 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20570 TraderLlamaEntityData::pack_dirty(self)
20571 }
20572 fn pack_all(&self) -> Vec<DataValue> {
20573 TraderLlamaEntityData::pack_all(self)
20574 }
20575 fn is_dirty(&self) -> bool {
20576 TraderLlamaEntityData::is_dirty(self)
20577 }
20578}
20579impl VanillaLivingEntityData for TraderLlamaEntityData {
20580 fn living_entity(&self) -> &LivingEntityData {
20581 TraderLlamaEntityData::living_entity(self)
20582 }
20583 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20584 TraderLlamaEntityData::living_entity_mut(self)
20585 }
20586}
20587#[derive(Debug, Clone)]
20589pub struct TridentEntityData {
20590 pub thrown_trident: ThrownTridentEntityData,
20591}
20592impl TridentEntityData {
20593 pub fn new() -> Self {
20595 Self {
20596 thrown_trident: ThrownTridentEntityData::new(),
20597 }
20598 }
20599 pub fn thrown_trident(&self) -> &ThrownTridentEntityData {
20601 &self.thrown_trident
20602 }
20603 pub fn thrown_trident_mut(&mut self) -> &mut ThrownTridentEntityData {
20605 &mut self.thrown_trident
20606 }
20607 pub fn abstract_arrow(&self) -> &AbstractArrowEntityData {
20609 &self.thrown_trident.abstract_arrow
20610 }
20611 pub fn abstract_arrow_mut(&mut self) -> &mut AbstractArrowEntityData {
20613 &mut self.thrown_trident.abstract_arrow
20614 }
20615 pub fn base(&self) -> &BaseEntityData {
20617 &self.thrown_trident.abstract_arrow.base
20618 }
20619 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20621 &mut self.thrown_trident.abstract_arrow.base
20622 }
20623 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20626 self.thrown_trident.pack_dirty()
20627 }
20628 pub fn pack_all(&self) -> Vec<DataValue> {
20630 self.thrown_trident.pack_all()
20631 }
20632 pub fn is_dirty(&self) -> bool {
20634 self.thrown_trident.is_dirty()
20635 }
20636}
20637impl Default for TridentEntityData {
20638 fn default() -> Self {
20639 Self::new()
20640 }
20641}
20642impl VanillaEntityData for TridentEntityData {
20643 fn base(&self) -> &BaseEntityData {
20644 TridentEntityData::base(self)
20645 }
20646 fn base_mut(&mut self) -> &mut BaseEntityData {
20647 TridentEntityData::base_mut(self)
20648 }
20649 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20650 TridentEntityData::pack_dirty(self)
20651 }
20652 fn pack_all(&self) -> Vec<DataValue> {
20653 TridentEntityData::pack_all(self)
20654 }
20655 fn is_dirty(&self) -> bool {
20656 TridentEntityData::is_dirty(self)
20657 }
20658}
20659#[derive(Debug, Clone)]
20661pub struct VindicatorEntityData {
20662 pub raider: RaiderEntityData,
20663}
20664impl VindicatorEntityData {
20665 pub fn new() -> Self {
20667 Self {
20668 raider: RaiderEntityData::new(),
20669 }
20670 }
20671 pub fn raider(&self) -> &RaiderEntityData {
20673 &self.raider
20674 }
20675 pub fn raider_mut(&mut self) -> &mut RaiderEntityData {
20677 &mut self.raider
20678 }
20679 pub fn mob(&self) -> &MobEntityData {
20681 &self.raider.mob
20682 }
20683 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20685 &mut self.raider.mob
20686 }
20687 pub fn living_entity(&self) -> &LivingEntityData {
20689 &self.raider.mob.living_entity
20690 }
20691 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20693 &mut self.raider.mob.living_entity
20694 }
20695 pub fn base(&self) -> &BaseEntityData {
20697 &self.raider.mob.living_entity.base
20698 }
20699 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20701 &mut self.raider.mob.living_entity.base
20702 }
20703 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20706 self.raider.pack_dirty()
20707 }
20708 pub fn pack_all(&self) -> Vec<DataValue> {
20710 self.raider.pack_all()
20711 }
20712 pub fn is_dirty(&self) -> bool {
20714 self.raider.is_dirty()
20715 }
20716}
20717impl Default for VindicatorEntityData {
20718 fn default() -> Self {
20719 Self::new()
20720 }
20721}
20722impl VanillaEntityData for VindicatorEntityData {
20723 fn base(&self) -> &BaseEntityData {
20724 VindicatorEntityData::base(self)
20725 }
20726 fn base_mut(&mut self) -> &mut BaseEntityData {
20727 VindicatorEntityData::base_mut(self)
20728 }
20729 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20730 VindicatorEntityData::pack_dirty(self)
20731 }
20732 fn pack_all(&self) -> Vec<DataValue> {
20733 VindicatorEntityData::pack_all(self)
20734 }
20735 fn is_dirty(&self) -> bool {
20736 VindicatorEntityData::is_dirty(self)
20737 }
20738}
20739impl VanillaLivingEntityData for VindicatorEntityData {
20740 fn living_entity(&self) -> &LivingEntityData {
20741 VindicatorEntityData::living_entity(self)
20742 }
20743 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20744 VindicatorEntityData::living_entity_mut(self)
20745 }
20746}
20747#[derive(Debug, Clone)]
20749pub struct WanderingTraderEntityData {
20750 pub abstract_villager: AbstractVillagerEntityData,
20751}
20752impl WanderingTraderEntityData {
20753 pub fn new() -> Self {
20755 Self {
20756 abstract_villager: AbstractVillagerEntityData::new(),
20757 }
20758 }
20759 pub fn abstract_villager(&self) -> &AbstractVillagerEntityData {
20761 &self.abstract_villager
20762 }
20763 pub fn abstract_villager_mut(&mut self) -> &mut AbstractVillagerEntityData {
20765 &mut self.abstract_villager
20766 }
20767 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
20769 &self.abstract_villager.ageable_mob
20770 }
20771 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
20773 &mut self.abstract_villager.ageable_mob
20774 }
20775 pub fn mob(&self) -> &MobEntityData {
20777 &self.abstract_villager.ageable_mob.mob
20778 }
20779 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20781 &mut self.abstract_villager.ageable_mob.mob
20782 }
20783 pub fn living_entity(&self) -> &LivingEntityData {
20785 &self.abstract_villager.ageable_mob.mob.living_entity
20786 }
20787 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20789 &mut self.abstract_villager.ageable_mob.mob.living_entity
20790 }
20791 pub fn base(&self) -> &BaseEntityData {
20793 &self.abstract_villager.ageable_mob.mob.living_entity.base
20794 }
20795 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20797 &mut self.abstract_villager.ageable_mob.mob.living_entity.base
20798 }
20799 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20802 self.abstract_villager.pack_dirty()
20803 }
20804 pub fn pack_all(&self) -> Vec<DataValue> {
20806 self.abstract_villager.pack_all()
20807 }
20808 pub fn is_dirty(&self) -> bool {
20810 self.abstract_villager.is_dirty()
20811 }
20812}
20813impl Default for WanderingTraderEntityData {
20814 fn default() -> Self {
20815 Self::new()
20816 }
20817}
20818impl VanillaEntityData for WanderingTraderEntityData {
20819 fn base(&self) -> &BaseEntityData {
20820 WanderingTraderEntityData::base(self)
20821 }
20822 fn base_mut(&mut self) -> &mut BaseEntityData {
20823 WanderingTraderEntityData::base_mut(self)
20824 }
20825 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20826 WanderingTraderEntityData::pack_dirty(self)
20827 }
20828 fn pack_all(&self) -> Vec<DataValue> {
20829 WanderingTraderEntityData::pack_all(self)
20830 }
20831 fn is_dirty(&self) -> bool {
20832 WanderingTraderEntityData::is_dirty(self)
20833 }
20834}
20835impl VanillaLivingEntityData for WanderingTraderEntityData {
20836 fn living_entity(&self) -> &LivingEntityData {
20837 WanderingTraderEntityData::living_entity(self)
20838 }
20839 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20840 WanderingTraderEntityData::living_entity_mut(self)
20841 }
20842}
20843#[derive(Debug, Clone)]
20845pub struct WindChargeEntityData {
20846 pub base: BaseEntityData,
20847}
20848impl WindChargeEntityData {
20849 pub fn new() -> Self {
20851 Self {
20852 base: BaseEntityData::new(),
20853 }
20854 }
20855 pub fn base(&self) -> &BaseEntityData {
20857 &self.base
20858 }
20859 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20861 &mut self.base
20862 }
20863 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20866 self.base.pack_dirty()
20867 }
20868 pub fn pack_all(&self) -> Vec<DataValue> {
20870 self.base.pack_all()
20871 }
20872 pub fn is_dirty(&self) -> bool {
20874 self.base.is_dirty()
20875 }
20876}
20877impl Default for WindChargeEntityData {
20878 fn default() -> Self {
20879 Self::new()
20880 }
20881}
20882impl VanillaEntityData for WindChargeEntityData {
20883 fn base(&self) -> &BaseEntityData {
20884 WindChargeEntityData::base(self)
20885 }
20886 fn base_mut(&mut self) -> &mut BaseEntityData {
20887 WindChargeEntityData::base_mut(self)
20888 }
20889 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20890 WindChargeEntityData::pack_dirty(self)
20891 }
20892 fn pack_all(&self) -> Vec<DataValue> {
20893 WindChargeEntityData::pack_all(self)
20894 }
20895 fn is_dirty(&self) -> bool {
20896 WindChargeEntityData::is_dirty(self)
20897 }
20898}
20899#[derive(Debug, Clone)]
20901pub struct WitherEntityData {
20902 pub wither_boss: WitherBossEntityData,
20903}
20904impl WitherEntityData {
20905 pub fn new() -> Self {
20907 Self {
20908 wither_boss: WitherBossEntityData::new(),
20909 }
20910 }
20911 pub fn wither_boss(&self) -> &WitherBossEntityData {
20913 &self.wither_boss
20914 }
20915 pub fn wither_boss_mut(&mut self) -> &mut WitherBossEntityData {
20917 &mut self.wither_boss
20918 }
20919 pub fn mob(&self) -> &MobEntityData {
20921 &self.wither_boss.mob
20922 }
20923 pub fn mob_mut(&mut self) -> &mut MobEntityData {
20925 &mut self.wither_boss.mob
20926 }
20927 pub fn living_entity(&self) -> &LivingEntityData {
20929 &self.wither_boss.mob.living_entity
20930 }
20931 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20933 &mut self.wither_boss.mob.living_entity
20934 }
20935 pub fn base(&self) -> &BaseEntityData {
20937 &self.wither_boss.mob.living_entity.base
20938 }
20939 pub fn base_mut(&mut self) -> &mut BaseEntityData {
20941 &mut self.wither_boss.mob.living_entity.base
20942 }
20943 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20946 self.wither_boss.pack_dirty()
20947 }
20948 pub fn pack_all(&self) -> Vec<DataValue> {
20950 self.wither_boss.pack_all()
20951 }
20952 pub fn is_dirty(&self) -> bool {
20954 self.wither_boss.is_dirty()
20955 }
20956}
20957impl Default for WitherEntityData {
20958 fn default() -> Self {
20959 Self::new()
20960 }
20961}
20962impl VanillaEntityData for WitherEntityData {
20963 fn base(&self) -> &BaseEntityData {
20964 WitherEntityData::base(self)
20965 }
20966 fn base_mut(&mut self) -> &mut BaseEntityData {
20967 WitherEntityData::base_mut(self)
20968 }
20969 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
20970 WitherEntityData::pack_dirty(self)
20971 }
20972 fn pack_all(&self) -> Vec<DataValue> {
20973 WitherEntityData::pack_all(self)
20974 }
20975 fn is_dirty(&self) -> bool {
20976 WitherEntityData::is_dirty(self)
20977 }
20978}
20979impl VanillaLivingEntityData for WitherEntityData {
20980 fn living_entity(&self) -> &LivingEntityData {
20981 WitherEntityData::living_entity(self)
20982 }
20983 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
20984 WitherEntityData::living_entity_mut(self)
20985 }
20986}
20987#[derive(Debug, Clone)]
20989pub struct WitherSkeletonEntityData {
20990 pub mob: MobEntityData,
20991}
20992impl WitherSkeletonEntityData {
20993 pub fn new() -> Self {
20995 Self { mob: MobEntityData::new() }
20996 }
20997 pub fn mob(&self) -> &MobEntityData {
20999 &self.mob
21000 }
21001 pub fn mob_mut(&mut self) -> &mut MobEntityData {
21003 &mut self.mob
21004 }
21005 pub fn living_entity(&self) -> &LivingEntityData {
21007 &self.mob.living_entity
21008 }
21009 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21011 &mut self.mob.living_entity
21012 }
21013 pub fn base(&self) -> &BaseEntityData {
21015 &self.mob.living_entity.base
21016 }
21017 pub fn base_mut(&mut self) -> &mut BaseEntityData {
21019 &mut self.mob.living_entity.base
21020 }
21021 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21024 self.mob.pack_dirty()
21025 }
21026 pub fn pack_all(&self) -> Vec<DataValue> {
21028 self.mob.pack_all()
21029 }
21030 pub fn is_dirty(&self) -> bool {
21032 self.mob.is_dirty()
21033 }
21034}
21035impl Default for WitherSkeletonEntityData {
21036 fn default() -> Self {
21037 Self::new()
21038 }
21039}
21040impl VanillaEntityData for WitherSkeletonEntityData {
21041 fn base(&self) -> &BaseEntityData {
21042 WitherSkeletonEntityData::base(self)
21043 }
21044 fn base_mut(&mut self) -> &mut BaseEntityData {
21045 WitherSkeletonEntityData::base_mut(self)
21046 }
21047 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21048 WitherSkeletonEntityData::pack_dirty(self)
21049 }
21050 fn pack_all(&self) -> Vec<DataValue> {
21051 WitherSkeletonEntityData::pack_all(self)
21052 }
21053 fn is_dirty(&self) -> bool {
21054 WitherSkeletonEntityData::is_dirty(self)
21055 }
21056}
21057impl VanillaLivingEntityData for WitherSkeletonEntityData {
21058 fn living_entity(&self) -> &LivingEntityData {
21059 WitherSkeletonEntityData::living_entity(self)
21060 }
21061 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21062 WitherSkeletonEntityData::living_entity_mut(self)
21063 }
21064}
21065#[derive(Debug, Clone)]
21067pub struct ZombieHorseEntityData {
21068 pub abstract_horse: AbstractHorseEntityData,
21069}
21070impl ZombieHorseEntityData {
21071 pub fn new() -> Self {
21073 Self {
21074 abstract_horse: AbstractHorseEntityData::new(),
21075 }
21076 }
21077 pub fn abstract_horse(&self) -> &AbstractHorseEntityData {
21079 &self.abstract_horse
21080 }
21081 pub fn abstract_horse_mut(&mut self) -> &mut AbstractHorseEntityData {
21083 &mut self.abstract_horse
21084 }
21085 pub fn ageable_mob(&self) -> &AgeableMobEntityData {
21087 &self.abstract_horse.ageable_mob
21088 }
21089 pub fn ageable_mob_mut(&mut self) -> &mut AgeableMobEntityData {
21091 &mut self.abstract_horse.ageable_mob
21092 }
21093 pub fn mob(&self) -> &MobEntityData {
21095 &self.abstract_horse.ageable_mob.mob
21096 }
21097 pub fn mob_mut(&mut self) -> &mut MobEntityData {
21099 &mut self.abstract_horse.ageable_mob.mob
21100 }
21101 pub fn living_entity(&self) -> &LivingEntityData {
21103 &self.abstract_horse.ageable_mob.mob.living_entity
21104 }
21105 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21107 &mut self.abstract_horse.ageable_mob.mob.living_entity
21108 }
21109 pub fn base(&self) -> &BaseEntityData {
21111 &self.abstract_horse.ageable_mob.mob.living_entity.base
21112 }
21113 pub fn base_mut(&mut self) -> &mut BaseEntityData {
21115 &mut self.abstract_horse.ageable_mob.mob.living_entity.base
21116 }
21117 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21120 self.abstract_horse.pack_dirty()
21121 }
21122 pub fn pack_all(&self) -> Vec<DataValue> {
21124 self.abstract_horse.pack_all()
21125 }
21126 pub fn is_dirty(&self) -> bool {
21128 self.abstract_horse.is_dirty()
21129 }
21130}
21131impl Default for ZombieHorseEntityData {
21132 fn default() -> Self {
21133 Self::new()
21134 }
21135}
21136impl VanillaEntityData for ZombieHorseEntityData {
21137 fn base(&self) -> &BaseEntityData {
21138 ZombieHorseEntityData::base(self)
21139 }
21140 fn base_mut(&mut self) -> &mut BaseEntityData {
21141 ZombieHorseEntityData::base_mut(self)
21142 }
21143 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21144 ZombieHorseEntityData::pack_dirty(self)
21145 }
21146 fn pack_all(&self) -> Vec<DataValue> {
21147 ZombieHorseEntityData::pack_all(self)
21148 }
21149 fn is_dirty(&self) -> bool {
21150 ZombieHorseEntityData::is_dirty(self)
21151 }
21152}
21153impl VanillaLivingEntityData for ZombieHorseEntityData {
21154 fn living_entity(&self) -> &LivingEntityData {
21155 ZombieHorseEntityData::living_entity(self)
21156 }
21157 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21158 ZombieHorseEntityData::living_entity_mut(self)
21159 }
21160}
21161#[derive(Debug, Clone)]
21163pub struct ZombifiedPiglinEntityData {
21164 pub zombie: ZombieEntityData,
21165}
21166impl ZombifiedPiglinEntityData {
21167 pub fn new() -> Self {
21169 Self {
21170 zombie: ZombieEntityData::new(),
21171 }
21172 }
21173 pub fn zombie(&self) -> &ZombieEntityData {
21175 &self.zombie
21176 }
21177 pub fn zombie_mut(&mut self) -> &mut ZombieEntityData {
21179 &mut self.zombie
21180 }
21181 pub fn mob(&self) -> &MobEntityData {
21183 &self.zombie.mob
21184 }
21185 pub fn mob_mut(&mut self) -> &mut MobEntityData {
21187 &mut self.zombie.mob
21188 }
21189 pub fn living_entity(&self) -> &LivingEntityData {
21191 &self.zombie.mob.living_entity
21192 }
21193 pub fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21195 &mut self.zombie.mob.living_entity
21196 }
21197 pub fn base(&self) -> &BaseEntityData {
21199 &self.zombie.mob.living_entity.base
21200 }
21201 pub fn base_mut(&mut self) -> &mut BaseEntityData {
21203 &mut self.zombie.mob.living_entity.base
21204 }
21205 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21208 self.zombie.pack_dirty()
21209 }
21210 pub fn pack_all(&self) -> Vec<DataValue> {
21212 self.zombie.pack_all()
21213 }
21214 pub fn is_dirty(&self) -> bool {
21216 self.zombie.is_dirty()
21217 }
21218}
21219impl Default for ZombifiedPiglinEntityData {
21220 fn default() -> Self {
21221 Self::new()
21222 }
21223}
21224impl VanillaEntityData for ZombifiedPiglinEntityData {
21225 fn base(&self) -> &BaseEntityData {
21226 ZombifiedPiglinEntityData::base(self)
21227 }
21228 fn base_mut(&mut self) -> &mut BaseEntityData {
21229 ZombifiedPiglinEntityData::base_mut(self)
21230 }
21231 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21232 ZombifiedPiglinEntityData::pack_dirty(self)
21233 }
21234 fn pack_all(&self) -> Vec<DataValue> {
21235 ZombifiedPiglinEntityData::pack_all(self)
21236 }
21237 fn is_dirty(&self) -> bool {
21238 ZombifiedPiglinEntityData::is_dirty(self)
21239 }
21240}
21241impl VanillaLivingEntityData for ZombifiedPiglinEntityData {
21242 fn living_entity(&self) -> &LivingEntityData {
21243 ZombifiedPiglinEntityData::living_entity(self)
21244 }
21245 fn living_entity_mut(&mut self) -> &mut LivingEntityData {
21246 ZombifiedPiglinEntityData::living_entity_mut(self)
21247 }
21248}
21249#[derive(Debug, Clone)]
21251pub struct FishingBobberEntityData {
21252 pub fishing_hook: FishingHookEntityData,
21253}
21254impl FishingBobberEntityData {
21255 pub fn new() -> Self {
21257 Self {
21258 fishing_hook: FishingHookEntityData::new(),
21259 }
21260 }
21261 pub fn fishing_hook(&self) -> &FishingHookEntityData {
21263 &self.fishing_hook
21264 }
21265 pub fn fishing_hook_mut(&mut self) -> &mut FishingHookEntityData {
21267 &mut self.fishing_hook
21268 }
21269 pub fn base(&self) -> &BaseEntityData {
21271 &self.fishing_hook.base
21272 }
21273 pub fn base_mut(&mut self) -> &mut BaseEntityData {
21275 &mut self.fishing_hook.base
21276 }
21277 pub fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21280 self.fishing_hook.pack_dirty()
21281 }
21282 pub fn pack_all(&self) -> Vec<DataValue> {
21284 self.fishing_hook.pack_all()
21285 }
21286 pub fn is_dirty(&self) -> bool {
21288 self.fishing_hook.is_dirty()
21289 }
21290}
21291impl Default for FishingBobberEntityData {
21292 fn default() -> Self {
21293 Self::new()
21294 }
21295}
21296impl VanillaEntityData for FishingBobberEntityData {
21297 fn base(&self) -> &BaseEntityData {
21298 FishingBobberEntityData::base(self)
21299 }
21300 fn base_mut(&mut self) -> &mut BaseEntityData {
21301 FishingBobberEntityData::base_mut(self)
21302 }
21303 fn pack_dirty(&mut self) -> Option<Vec<DataValue>> {
21304 FishingBobberEntityData::pack_dirty(self)
21305 }
21306 fn pack_all(&self) -> Vec<DataValue> {
21307 FishingBobberEntityData::pack_all(self)
21308 }
21309 fn is_dirty(&self) -> bool {
21310 FishingBobberEntityData::is_dirty(self)
21311 }
21312}