Botcraft 26.2
Loading...
Searching...
No Matches
Entity.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <any>
4#include <chrono>
5#include <map>
6#include <memory>
7#include <optional>
8#include <shared_mutex>
9
10#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
12#endif
15
17
20
21#if USE_GUI
23#endif
24
25namespace Botcraft
26{
27 enum class EntityType;
28#if PROTOCOL_VERSION < 458 /* < 1.14 */
29 enum class ObjectEntityType;
30#endif
31
33 {
35 unsigned char amplifier;
36 std::chrono::steady_clock::time_point end;
37 };
38
39 enum class EntitySharedFlagsId : char
40 {
41 OnFire = 0,
42 ShiftKeyDown = 1,
43 // 2 is unused? Maybe in previous versions
44 Sprinting = 3,
45 Swimming = 4,
46 Invisible = 5,
47 Glowing = 6,
48 FallFlying = 7
49 };
50
51 class Entity
52 {
53 protected:
54#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
55 static constexpr int metadata_count = 8;
56#elif PROTOCOL_VERSION > 404 /* > 1.13.2 */
57 static constexpr int metadata_count = 7;
58#else
59 static constexpr int metadata_count = 6;
60#endif
61 static const std::array<std::string, metadata_count> metadata_names;
62 static constexpr int hierarchy_metadata_count = 0;
63
64 public:
65 Entity();
66 virtual ~Entity();
67
68 // Object related stuff
69 virtual std::string GetName() const = 0;
70 virtual EntityType GetType() const = 0;
71 AABB GetCollider() const;
72 double GetWidth() const;
73 double GetHeight() const;
74
75 // Metadata stuff
76 void LoadMetadataFromRawArray(const std::vector<unsigned char>& data);
77 virtual void SetMetadataValue(const int index, const std::any& value);
78
79 char GetDataSharedFlagsId() const;
80 bool GetDataSharedFlagsId(const EntitySharedFlagsId id) const;
81 int GetDataAirSupplyId() const;
82#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
83 std::optional<ProtocolCraft::Chat> GetDataCustomName() const;
84#else
85 std::string GetDataCustomName() const;
86#endif
87 bool GetDataCustomNameVisible() const;
88 bool GetDataSilent() const;
89 bool GetDataNoGravity() const;
90#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
91 Pose GetDataPose() const;
92#endif
93#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
94 int GetDataTicksFrozen() const;
95#endif
96
97 void SetDataSharedFlagsId(const char data_shared_flags_id);
98 void SetDataSharedFlagsId(const EntitySharedFlagsId id, const bool b);
99 void SetDataAirSupplyId(const int data_air_supply_id);
100#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
101 void SetDataCustomName(const std::optional<ProtocolCraft::Chat>& data_custom_name);
102#else
103 void SetDataCustomName(const std::string& data_custom_name);
104#endif
105 void SetDataCustomNameVisible(const bool data_custom_name_visible);
106 void SetDataSilent(const bool data_silent);
107 void SetDataNoGravity(const bool data_no_gravity);
108#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
109 void SetDataPose(const Pose data_pose);
110#endif
111#if PROTOCOL_VERSION > 754 /* > 1.16.5 */
112 void SetDataTicksFrozen(const int data_ticks_frozen);
113#endif
114
115 // Generic properties getter
116 int GetEntityID() const;
119 double GetX() const;
120 double GetY() const;
121 double GetZ() const;
122 float GetYaw() const;
123 float GetPitch() const;
125 double GetSpeedX() const;
126 double GetSpeedY() const;
127 double GetSpeedZ() const;
128 bool GetOnGround() const;
129 std::map<EquipmentSlot, ProtocolCraft::Slot> GetEquipments() const;
131 std::vector<EntityEffect> GetEffects() const;
132#if USE_GUI
133 std::vector<Renderer::Face> GetFaces(const bool reset_uptodate_status);
134 bool GetAreRenderedFacesUpToDate() const;
135#endif
136
137 // Generic properties setter
138 void SetEntityID(const int entity_id_);
139 void SetUUID(const ProtocolCraft::UUID& uuid_);
140 virtual void SetPosition(const Vector3<double>& position_);
141 virtual void SetX(const double x_);
142 virtual void SetY(const double y_);
143 virtual void SetZ(const double z_);
144 virtual void SetYaw(const float yaw_);
145 virtual void SetPitch(const float pitch_);
146 void SetSpeed(const Vector3<double>& speed_);
147 void SetSpeedX(const double speed_x_);
148 void SetSpeedY(const double speed_y_);
149 void SetSpeedZ(const double speed_z_);
150 void SetOnGround(const bool on_ground_);
151 void SetEquipment(const EquipmentSlot slot, const ProtocolCraft::Slot& item);
152 void SetEffects(const std::vector<EntityEffect>& effects_);
153 void AddEffect(const EntityEffect& effect);
154 void RemoveEffect(const EntityEffectType type);
155#if USE_GUI
156 void SetAreRenderedFacesUpToDate(const bool are_rendered_faces_up_to_date_);
157#endif
158
159 // In case it's needed one day, could be useful
161
162 virtual bool IsLocalPlayer() const;
163 virtual bool IsRemotePlayer() const;
164 // Can be used to know if an entity has a certain virtual type as ancestor
165 virtual bool IsLivingEntity() const;
166 virtual bool IsAbstractArrow() const;
167 virtual bool IsAnimal() const;
168 virtual bool IsAmbientCreature() const;
169 virtual bool IsMonster() const;
170#if PROTOCOL_VERSION > 761 /* > 1.19.3 */
171 virtual bool IsDisplay() const;
172#endif
173#if PROTOCOL_VERSION > 764 /* > 1.20.2 */
174 virtual bool IsVehicle() const;
175#endif
176 virtual bool IsTamableAnimal() const;
177 virtual bool IsAbstractSchoolingFish() const;
178 virtual bool IsWaterAnimal() const;
179 virtual bool IsAbstractChestedHorse() const;
180 virtual bool IsAbstractHurtingProjectile() const;
181 virtual bool IsMob() const;
182 virtual bool IsSpellcasterIllager() const;
183#if PROTOCOL_VERSION > 578 /* > 1.15.2 */
184 virtual bool IsProjectile() const;
185#endif
186#if PROTOCOL_VERSION < 771 /* < 1.21.6 */
187 virtual bool IsFlyingMob() const;
188#endif
189 virtual bool IsAbstractHorse() const;
190 virtual bool IsAbstractGolem() const;
191 virtual bool IsHangingEntity() const;
192 virtual bool IsFireball() const;
193 virtual bool IsAbstractMinecart() const;
194#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
195 virtual bool IsAbstractCow() const;
196#endif
197 virtual bool IsAbstractMinecartContainer() const;
198 virtual bool IsShoulderRidingEntity() const;
199#if PROTOCOL_VERSION > 736 /* > 1.16.1 */
200 virtual bool IsAbstractPiglin() const;
201#endif
202 virtual bool IsAbstractIllager() const;
203#if PROTOCOL_VERSION > 769 /* > 1.21.4 */
204 virtual bool IsAbstractThrownPotion() const;
205#endif
206 virtual bool IsAbstractFish() const;
207#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
208 virtual bool IsRaider() const;
209#endif
210 virtual bool IsAbstractSkeleton() const;
211 virtual bool IsThrowableItemProjectile() const;
212#if PROTOCOL_VERSION > 477 /* > 1.14 */
213 virtual bool IsAbstractVillager() const;
214#endif
215 virtual bool IsAgeableMob() const;
216 virtual bool IsPathfinderMob() const;
217#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
218 virtual bool IsPatrollingMonster() const;
219#endif
220 virtual bool IsThrowableProjectile() const;
221#if PROTOCOL_VERSION > 765 /* > 1.20.4 */
222 virtual bool IsAbstractWindCharge() const;
223#endif
224#if PROTOCOL_VERSION > 766 /* > 1.20.6 */
225 virtual bool IsBlockAttachedEntity() const;
226#endif
227#if PROTOCOL_VERSION > 767 /* > 1.21.1 */
228 virtual bool IsAbstractBoat() const;
229 virtual bool IsAbstractChestBoat() const;
230 virtual bool IsAgeableWaterCreature() const;
231 virtual bool IsBoat() const;
232 virtual bool IsChestBoat() const;
233 virtual bool IsChestRaft() const;
234 virtual bool IsRaft() const;
235#endif
236#if PROTOCOL_VERSION > 772 /* > 1.21.8 */
237 virtual bool IsAvatar() const;
238#endif
239#if PROTOCOL_VERSION > 773 /* > 1.21.10 */
240 virtual bool IsAbstractNautilus() const;
241#endif
242#if PROTOCOL_VERSION > 775 /* > 26.1.2 */
243 virtual bool IsAbstractCubeMob() const;
244#endif
245
246 // Factory stuff
247 static std::shared_ptr<Entity> CreateEntity(const EntityType type);
248#if PROTOCOL_VERSION < 458 /* < 1.14 */
249 static std::shared_ptr<Entity> CreateObjectEntity(const ObjectEntityType type);
250#endif
251
252 protected:
253#if USE_GUI
254 virtual void InitializeFaces();
255 void OnSizeUpdated();
256#endif
257 char GetDataSharedFlagsIdImpl() const;
259 void SetDataSharedFlagsIdImpl(const char data_shared_flags_id);
260 void SetDataSharedFlagsIdImpl(const EntitySharedFlagsId id, const bool b);
261#if PROTOCOL_VERSION > 404 /* > 1.13.2 */
262 Pose GetDataPoseImpl() const;
263 void SetDataPoseImpl(const Pose data_pose);
264#endif
265 AABB GetColliderImpl() const;
266 virtual double GetWidthImpl() const;
267 virtual double GetHeightImpl() const;
268
269 protected:
270 mutable std::shared_mutex entity_mutex;
271
275 float yaw;
276 float pitch;
279 /// @brief Items on this entity. Note that for the local player
280 /// this will **NOT** be populated. Check corresponding
281 /// player inventory slots instead.
282 std::map<EquipmentSlot, ProtocolCraft::Slot> equipments;
283 std::vector<EntityEffect> effects;
284
285 std::map<std::string, std::any> metadata;
286
287#if USE_GUI
288 //All the faces of this model
289 std::vector<FaceDescriptor> face_descriptors;
290 std::vector<Renderer::Face> faces;
291
293#endif
294 };
295
296 enum class EntityType
297 {
298 None = -1,
299#if PROTOCOL_VERSION > 775 /* > 26.1.2 */
300 AcaciaBoat = 0,
301 AcaciaChestBoat = 1,
302 Allay = 2,
303 AreaEffectCloud = 3,
304 Armadillo = 4,
305 ArmorStand = 5,
306 Arrow = 6,
307 Axolotl = 7,
308 ChestRaft = 8,
309 Raft = 9,
310 Bat = 10,
311 Bee = 11,
312 BirchBoat = 12,
313 BirchChestBoat = 13,
314 Blaze = 14,
316 Bogged = 16,
317 Breeze = 17,
318 BreezeWindCharge = 18,
319 Camel = 19,
320 CamelHusk = 20,
321 Cat = 21,
322 CaveSpider = 22,
323 CherryBoat = 23,
324 CherryChestBoat = 24,
325 MinecartChest = 25,
326 Chicken = 26,
327 Cod = 27,
328 CopperGolem = 28,
330 Cow = 30,
331 Creaking = 31,
332 Creeper = 32,
333 DarkOakBoat = 33,
334 DarkOakChestBoat = 34,
335 Dolphin = 35,
336 Donkey = 36,
337 DragonFireball = 37,
338 Drowned = 38,
339 ThrownEgg = 39,
340 ElderGuardian = 40,
341 EnderMan = 41,
342 Endermite = 42,
343 EnderDragon = 43,
344 ThrownEnderpearl = 44,
345 EndCrystal = 45,
346 Evoker = 46,
347 EvokerFangs = 47,
349 ExperienceOrb = 49,
350 EyeOfEnder = 50,
352 LargeFireball = 52,
354 Fox = 54,
355 Frog = 55,
356 MinecartFurnace = 56,
357 Ghast = 57,
358 HappyGhast = 58,
359 Giant = 59,
360 GlowItemFrame = 60,
361 GlowSquid = 61,
362 Goat = 62,
363 Guardian = 63,
364 Hoglin = 64,
365 MinecartHopper = 65,
366 Horse = 66,
367 Husk = 67,
368 Illusioner = 68,
369 Interaction = 69,
370 IronGolem = 70,
371 ItemEntity = 71,
373 ItemFrame = 73,
374 JungleBoat = 74,
375 JungleChestBoat = 75,
377 LightningBolt = 77,
378 Llama = 78,
379 LlamaSpit = 79,
380 MagmaCube = 80,
381 MangroveBoat = 81,
383 Mannequin = 83,
384 Marker = 84,
385 Minecart = 85,
386 MushroomCow = 86,
387 Mule = 87,
388 Nautilus = 88,
389 OakBoat = 89,
390 OakChestBoat = 90,
391 Ocelot = 91,
393 Painting = 93,
394 PaleOakBoat = 94,
395 PaleOakChestBoat = 95,
396 Panda = 96,
397 Parched = 97,
398 Parrot = 98,
399 Phantom = 99,
400 Pig = 100,
401 Piglin = 101,
402 PiglinBrute = 102,
403 Pillager = 103,
404 PolarBear = 104,
405 ThrownSplashPotion = 105,
407 Pufferfish = 107,
408 Rabbit = 108,
409 Ravager = 109,
410 Salmon = 110,
411 Sheep = 111,
412 Shulker = 112,
413 ShulkerBullet = 113,
414 Silverfish = 114,
415 Skeleton = 115,
416 SkeletonHorse = 116,
417 Slime = 117,
418 SmallFireball = 118,
419 Sniffer = 119,
420 Snowball = 120,
421 SnowGolem = 121,
422 MinecartSpawner = 122,
423 SpectralArrow = 123,
424 Spider = 124,
425 SpruceBoat = 125,
426 SpruceChestBoat = 126,
427 Squid = 127,
428 Stray = 128,
429 Strider = 129,
430 SulfurCube = 130,
431 Tadpole = 131,
432 DisplayTextDisplay = 132,
433 PrimedTnt = 133,
434 MinecartTNT = 134,
435 TraderLlama = 135,
436 ThrownTrident = 136,
437 TropicalFish = 137,
438 Turtle = 138,
439 Vex = 139,
440 Villager = 140,
441 Vindicator = 141,
442 WanderingTrader = 142,
443 Warden = 143,
444 WindCharge = 144,
445 Witch = 145,
446 WitherBoss = 146,
447 WitherSkeleton = 147,
448 WitherSkull = 148,
449 Wolf = 149,
450 Zoglin = 150,
451 Zombie = 151,
452 ZombieHorse = 152,
453 ZombieNautilus = 153,
454 ZombieVillager = 154,
455 ZombifiedPiglin = 155,
456 Player = 156,
457 FishingHook = 157,
458#elif PROTOCOL_VERSION > 773 /* > 1.21.10 */
459 AcaciaBoat = 0,
460 AcaciaChestBoat = 1,
461 Allay = 2,
462 AreaEffectCloud = 3,
463 Armadillo = 4,
464 ArmorStand = 5,
465 Arrow = 6,
466 Axolotl = 7,
467 ChestRaft = 8,
468 Raft = 9,
469 Bat = 10,
470 Bee = 11,
471 BirchBoat = 12,
472 BirchChestBoat = 13,
473 Blaze = 14,
475 Bogged = 16,
476 Breeze = 17,
477 BreezeWindCharge = 18,
478 Camel = 19,
479 CamelHusk = 20,
480 Cat = 21,
481 CaveSpider = 22,
482 CherryBoat = 23,
483 CherryChestBoat = 24,
484 MinecartChest = 25,
485 Chicken = 26,
486 Cod = 27,
487 CopperGolem = 28,
489 Cow = 30,
490 Creaking = 31,
491 Creeper = 32,
492 DarkOakBoat = 33,
493 DarkOakChestBoat = 34,
494 Dolphin = 35,
495 Donkey = 36,
496 DragonFireball = 37,
497 Drowned = 38,
498 ThrownEgg = 39,
499 ElderGuardian = 40,
500 EnderMan = 41,
501 Endermite = 42,
502 EnderDragon = 43,
503 ThrownEnderpearl = 44,
504 EndCrystal = 45,
505 Evoker = 46,
506 EvokerFangs = 47,
508 ExperienceOrb = 49,
509 EyeOfEnder = 50,
511 LargeFireball = 52,
513 Fox = 54,
514 Frog = 55,
515 MinecartFurnace = 56,
516 Ghast = 57,
517 HappyGhast = 58,
518 Giant = 59,
519 GlowItemFrame = 60,
520 GlowSquid = 61,
521 Goat = 62,
522 Guardian = 63,
523 Hoglin = 64,
524 MinecartHopper = 65,
525 Horse = 66,
526 Husk = 67,
527 Illusioner = 68,
528 Interaction = 69,
529 IronGolem = 70,
530 ItemEntity = 71,
532 ItemFrame = 73,
533 JungleBoat = 74,
534 JungleChestBoat = 75,
536 LightningBolt = 77,
537 Llama = 78,
538 LlamaSpit = 79,
539 MagmaCube = 80,
540 MangroveBoat = 81,
542 Mannequin = 83,
543 Marker = 84,
544 Minecart = 85,
545 MushroomCow = 86,
546 Mule = 87,
547 Nautilus = 88,
548 OakBoat = 89,
549 OakChestBoat = 90,
550 Ocelot = 91,
552 Painting = 93,
553 PaleOakBoat = 94,
554 PaleOakChestBoat = 95,
555 Panda = 96,
556 Parched = 97,
557 Parrot = 98,
558 Phantom = 99,
559 Pig = 100,
560 Piglin = 101,
561 PiglinBrute = 102,
562 Pillager = 103,
563 PolarBear = 104,
564 ThrownSplashPotion = 105,
566 Pufferfish = 107,
567 Rabbit = 108,
568 Ravager = 109,
569 Salmon = 110,
570 Sheep = 111,
571 Shulker = 112,
572 ShulkerBullet = 113,
573 Silverfish = 114,
574 Skeleton = 115,
575 SkeletonHorse = 116,
576 Slime = 117,
577 SmallFireball = 118,
578 Sniffer = 119,
579 Snowball = 120,
580 SnowGolem = 121,
581 MinecartSpawner = 122,
582 SpectralArrow = 123,
583 Spider = 124,
584 SpruceBoat = 125,
585 SpruceChestBoat = 126,
586 Squid = 127,
587 Stray = 128,
588 Strider = 129,
589 Tadpole = 130,
590 DisplayTextDisplay = 131,
591 PrimedTnt = 132,
592 MinecartTNT = 133,
593 TraderLlama = 134,
594 ThrownTrident = 135,
595 TropicalFish = 136,
596 Turtle = 137,
597 Vex = 138,
598 Villager = 139,
599 Vindicator = 140,
600 WanderingTrader = 141,
601 Warden = 142,
602 WindCharge = 143,
603 Witch = 144,
604 WitherBoss = 145,
605 WitherSkeleton = 146,
606 WitherSkull = 147,
607 Wolf = 148,
608 Zoglin = 149,
609 Zombie = 150,
610 ZombieHorse = 151,
611 ZombieNautilus = 152,
612 ZombieVillager = 153,
613 ZombifiedPiglin = 154,
614 Player = 155,
615 FishingHook = 156,
616#elif PROTOCOL_VERSION > 772 /* > 1.21.8 */
617 AcaciaBoat = 0,
618 AcaciaChestBoat = 1,
619 Allay = 2,
620 AreaEffectCloud = 3,
621 Armadillo = 4,
622 ArmorStand = 5,
623 Arrow = 6,
624 Axolotl = 7,
625 ChestRaft = 8,
626 Raft = 9,
627 Bat = 10,
628 Bee = 11,
629 BirchBoat = 12,
630 BirchChestBoat = 13,
631 Blaze = 14,
633 Bogged = 16,
634 Breeze = 17,
635 BreezeWindCharge = 18,
636 Camel = 19,
637 Cat = 20,
638 CaveSpider = 21,
639 CherryBoat = 22,
640 CherryChestBoat = 23,
641 MinecartChest = 24,
642 Chicken = 25,
643 Cod = 26,
644 CopperGolem = 27,
646 Cow = 29,
647 Creaking = 30,
648 Creeper = 31,
649 DarkOakBoat = 32,
650 DarkOakChestBoat = 33,
651 Dolphin = 34,
652 Donkey = 35,
653 DragonFireball = 36,
654 Drowned = 37,
655 ThrownEgg = 38,
656 ElderGuardian = 39,
657 EnderMan = 40,
658 Endermite = 41,
659 EnderDragon = 42,
660 ThrownEnderpearl = 43,
661 EndCrystal = 44,
662 Evoker = 45,
663 EvokerFangs = 46,
665 ExperienceOrb = 48,
666 EyeOfEnder = 49,
668 LargeFireball = 51,
670 Fox = 53,
671 Frog = 54,
672 MinecartFurnace = 55,
673 Ghast = 56,
674 HappyGhast = 57,
675 Giant = 58,
676 GlowItemFrame = 59,
677 GlowSquid = 60,
678 Goat = 61,
679 Guardian = 62,
680 Hoglin = 63,
681 MinecartHopper = 64,
682 Horse = 65,
683 Husk = 66,
684 Illusioner = 67,
685 Interaction = 68,
686 IronGolem = 69,
687 ItemEntity = 70,
689 ItemFrame = 72,
690 JungleBoat = 73,
691 JungleChestBoat = 74,
693 LightningBolt = 76,
694 Llama = 77,
695 LlamaSpit = 78,
696 MagmaCube = 79,
697 MangroveBoat = 80,
699 Mannequin = 82,
700 Marker = 83,
701 Minecart = 84,
702 MushroomCow = 85,
703 Mule = 86,
704 OakBoat = 87,
705 OakChestBoat = 88,
706 Ocelot = 89,
708 Painting = 91,
709 PaleOakBoat = 92,
710 PaleOakChestBoat = 93,
711 Panda = 94,
712 Parrot = 95,
713 Phantom = 96,
714 Pig = 97,
715 Piglin = 98,
716 PiglinBrute = 99,
717 Pillager = 100,
718 PolarBear = 101,
719 ThrownSplashPotion = 102,
721 Pufferfish = 104,
722 Rabbit = 105,
723 Ravager = 106,
724 Salmon = 107,
725 Sheep = 108,
726 Shulker = 109,
727 ShulkerBullet = 110,
728 Silverfish = 111,
729 Skeleton = 112,
730 SkeletonHorse = 113,
731 Slime = 114,
732 SmallFireball = 115,
733 Sniffer = 116,
734 Snowball = 117,
735 SnowGolem = 118,
736 MinecartSpawner = 119,
737 SpectralArrow = 120,
738 Spider = 121,
739 SpruceBoat = 122,
740 SpruceChestBoat = 123,
741 Squid = 124,
742 Stray = 125,
743 Strider = 126,
744 Tadpole = 127,
745 DisplayTextDisplay = 128,
746 PrimedTnt = 129,
747 MinecartTNT = 130,
748 TraderLlama = 131,
749 ThrownTrident = 132,
750 TropicalFish = 133,
751 Turtle = 134,
752 Vex = 135,
753 Villager = 136,
754 Vindicator = 137,
755 WanderingTrader = 138,
756 Warden = 139,
757 WindCharge = 140,
758 Witch = 141,
759 WitherBoss = 142,
760 WitherSkeleton = 143,
761 WitherSkull = 144,
762 Wolf = 145,
763 Zoglin = 146,
764 Zombie = 147,
765 ZombieHorse = 148,
766 ZombieVillager = 149,
767 ZombifiedPiglin = 150,
768 Player = 151,
769 FishingHook = 152,
770#elif PROTOCOL_VERSION > 770 /* > 1.21.5 */
771 AcaciaBoat = 0,
772 AcaciaChestBoat = 1,
773 Allay = 2,
774 AreaEffectCloud = 3,
775 Armadillo = 4,
776 ArmorStand = 5,
777 Arrow = 6,
778 Axolotl = 7,
779 ChestRaft = 8,
780 Raft = 9,
781 Bat = 10,
782 Bee = 11,
783 BirchBoat = 12,
784 BirchChestBoat = 13,
785 Blaze = 14,
787 Bogged = 16,
788 Breeze = 17,
789 BreezeWindCharge = 18,
790 Camel = 19,
791 Cat = 20,
792 CaveSpider = 21,
793 CherryBoat = 22,
794 CherryChestBoat = 23,
795 MinecartChest = 24,
796 Chicken = 25,
797 Cod = 26,
799 Cow = 28,
800 Creaking = 29,
801 Creeper = 30,
802 DarkOakBoat = 31,
803 DarkOakChestBoat = 32,
804 Dolphin = 33,
805 Donkey = 34,
806 DragonFireball = 35,
807 Drowned = 36,
808 ThrownEgg = 37,
809 ElderGuardian = 38,
810 EnderMan = 39,
811 Endermite = 40,
812 EnderDragon = 41,
813 ThrownEnderpearl = 42,
814 EndCrystal = 43,
815 Evoker = 44,
816 EvokerFangs = 45,
818 ExperienceOrb = 47,
819 EyeOfEnder = 48,
821 LargeFireball = 50,
823 Fox = 52,
824 Frog = 53,
825 MinecartFurnace = 54,
826 Ghast = 55,
827 HappyGhast = 56,
828 Giant = 57,
829 GlowItemFrame = 58,
830 GlowSquid = 59,
831 Goat = 60,
832 Guardian = 61,
833 Hoglin = 62,
834 MinecartHopper = 63,
835 Horse = 64,
836 Husk = 65,
837 Illusioner = 66,
838 Interaction = 67,
839 IronGolem = 68,
840 ItemEntity = 69,
842 ItemFrame = 71,
843 JungleBoat = 72,
844 JungleChestBoat = 73,
846 LightningBolt = 75,
847 Llama = 76,
848 LlamaSpit = 77,
849 MagmaCube = 78,
850 MangroveBoat = 79,
852 Marker = 81,
853 Minecart = 82,
854 MushroomCow = 83,
855 Mule = 84,
856 OakBoat = 85,
857 OakChestBoat = 86,
858 Ocelot = 87,
860 Painting = 89,
861 PaleOakBoat = 90,
862 PaleOakChestBoat = 91,
863 Panda = 92,
864 Parrot = 93,
865 Phantom = 94,
866 Pig = 95,
867 Piglin = 96,
868 PiglinBrute = 97,
869 Pillager = 98,
870 PolarBear = 99,
871 ThrownSplashPotion = 100,
873 Pufferfish = 102,
874 Rabbit = 103,
875 Ravager = 104,
876 Salmon = 105,
877 Sheep = 106,
878 Shulker = 107,
879 ShulkerBullet = 108,
880 Silverfish = 109,
881 Skeleton = 110,
882 SkeletonHorse = 111,
883 Slime = 112,
884 SmallFireball = 113,
885 Sniffer = 114,
886 Snowball = 115,
887 SnowGolem = 116,
888 MinecartSpawner = 117,
889 SpectralArrow = 118,
890 Spider = 119,
891 SpruceBoat = 120,
892 SpruceChestBoat = 121,
893 Squid = 122,
894 Stray = 123,
895 Strider = 124,
896 Tadpole = 125,
897 DisplayTextDisplay = 126,
898 PrimedTnt = 127,
899 MinecartTNT = 128,
900 TraderLlama = 129,
901 ThrownTrident = 130,
902 TropicalFish = 131,
903 Turtle = 132,
904 Vex = 133,
905 Villager = 134,
906 Vindicator = 135,
907 WanderingTrader = 136,
908 Warden = 137,
909 WindCharge = 138,
910 Witch = 139,
911 WitherBoss = 140,
912 WitherSkeleton = 141,
913 WitherSkull = 142,
914 Wolf = 143,
915 Zoglin = 144,
916 Zombie = 145,
917 ZombieHorse = 146,
918 ZombieVillager = 147,
919 ZombifiedPiglin = 148,
920 Player = 149,
921 FishingHook = 150,
922#elif PROTOCOL_VERSION > 769 /* > 1.21.4 */
923 AcaciaBoat = 0,
924 AcaciaChestBoat = 1,
925 Allay = 2,
926 AreaEffectCloud = 3,
927 Armadillo = 4,
928 ArmorStand = 5,
929 Arrow = 6,
930 Axolotl = 7,
931 ChestRaft = 8,
932 Raft = 9,
933 Bat = 10,
934 Bee = 11,
935 BirchBoat = 12,
936 BirchChestBoat = 13,
937 Blaze = 14,
939 Bogged = 16,
940 Breeze = 17,
941 BreezeWindCharge = 18,
942 Camel = 19,
943 Cat = 20,
944 CaveSpider = 21,
945 CherryBoat = 22,
946 CherryChestBoat = 23,
947 MinecartChest = 24,
948 Chicken = 25,
949 Cod = 26,
951 Cow = 28,
952 Creaking = 29,
953 Creeper = 30,
954 DarkOakBoat = 31,
955 DarkOakChestBoat = 32,
956 Dolphin = 33,
957 Donkey = 34,
958 DragonFireball = 35,
959 Drowned = 36,
960 ThrownEgg = 37,
961 ElderGuardian = 38,
962 EnderMan = 39,
963 Endermite = 40,
964 EnderDragon = 41,
965 ThrownEnderpearl = 42,
966 EndCrystal = 43,
967 Evoker = 44,
968 EvokerFangs = 45,
970 ExperienceOrb = 47,
971 EyeOfEnder = 48,
973 LargeFireball = 50,
975 Fox = 52,
976 Frog = 53,
977 MinecartFurnace = 54,
978 Ghast = 55,
979 Giant = 56,
980 GlowItemFrame = 57,
981 GlowSquid = 58,
982 Goat = 59,
983 Guardian = 60,
984 Hoglin = 61,
985 MinecartHopper = 62,
986 Horse = 63,
987 Husk = 64,
988 Illusioner = 65,
989 Interaction = 66,
990 IronGolem = 67,
991 ItemEntity = 68,
993 ItemFrame = 70,
994 JungleBoat = 71,
995 JungleChestBoat = 72,
997 LightningBolt = 74,
998 Llama = 75,
999 LlamaSpit = 76,
1000 MagmaCube = 77,
1001 MangroveBoat = 78,
1002 MangroveChestBoat = 79,
1003 Marker = 80,
1004 Minecart = 81,
1005 MushroomCow = 82,
1006 Mule = 83,
1007 OakBoat = 84,
1008 OakChestBoat = 85,
1009 Ocelot = 86,
1010 OminousItemSpawner = 87,
1011 Painting = 88,
1012 PaleOakBoat = 89,
1013 PaleOakChestBoat = 90,
1014 Panda = 91,
1015 Parrot = 92,
1016 Phantom = 93,
1017 Pig = 94,
1018 Piglin = 95,
1019 PiglinBrute = 96,
1020 Pillager = 97,
1021 PolarBear = 98,
1022 ThrownSplashPotion = 99,
1024 Pufferfish = 101,
1025 Rabbit = 102,
1026 Ravager = 103,
1027 Salmon = 104,
1028 Sheep = 105,
1029 Shulker = 106,
1030 ShulkerBullet = 107,
1031 Silverfish = 108,
1032 Skeleton = 109,
1033 SkeletonHorse = 110,
1034 Slime = 111,
1035 SmallFireball = 112,
1036 Sniffer = 113,
1037 Snowball = 114,
1038 SnowGolem = 115,
1039 MinecartSpawner = 116,
1040 SpectralArrow = 117,
1041 Spider = 118,
1042 SpruceBoat = 119,
1043 SpruceChestBoat = 120,
1044 Squid = 121,
1045 Stray = 122,
1046 Strider = 123,
1047 Tadpole = 124,
1048 DisplayTextDisplay = 125,
1049 PrimedTnt = 126,
1050 MinecartTNT = 127,
1051 TraderLlama = 128,
1052 ThrownTrident = 129,
1053 TropicalFish = 130,
1054 Turtle = 131,
1055 Vex = 132,
1056 Villager = 133,
1057 Vindicator = 134,
1058 WanderingTrader = 135,
1059 Warden = 136,
1060 WindCharge = 137,
1061 Witch = 138,
1062 WitherBoss = 139,
1063 WitherSkeleton = 140,
1064 WitherSkull = 141,
1065 Wolf = 142,
1066 Zoglin = 143,
1067 Zombie = 144,
1068 ZombieHorse = 145,
1069 ZombieVillager = 146,
1070 ZombifiedPiglin = 147,
1071 Player = 148,
1072 FishingHook = 149,
1073#elif PROTOCOL_VERSION > 768 /* > 1.21.3 */
1074 AcaciaBoat = 0,
1075 AcaciaChestBoat = 1,
1076 Allay = 2,
1077 AreaEffectCloud = 3,
1078 Armadillo = 4,
1079 ArmorStand = 5,
1080 Arrow = 6,
1081 Axolotl = 7,
1082 ChestRaft = 8,
1083 Raft = 9,
1084 Bat = 10,
1085 Bee = 11,
1086 BirchBoat = 12,
1087 BirchChestBoat = 13,
1088 Blaze = 14,
1090 Bogged = 16,
1091 Breeze = 17,
1092 BreezeWindCharge = 18,
1093 Camel = 19,
1094 Cat = 20,
1095 CaveSpider = 21,
1096 CherryBoat = 22,
1097 CherryChestBoat = 23,
1098 MinecartChest = 24,
1099 Chicken = 25,
1100 Cod = 26,
1102 Cow = 28,
1103 Creaking = 29,
1104 Creeper = 30,
1105 DarkOakBoat = 31,
1106 DarkOakChestBoat = 32,
1107 Dolphin = 33,
1108 Donkey = 34,
1109 DragonFireball = 35,
1110 Drowned = 36,
1111 ThrownEgg = 37,
1112 ElderGuardian = 38,
1113 EnderMan = 39,
1114 Endermite = 40,
1115 EnderDragon = 41,
1116 ThrownEnderpearl = 42,
1117 EndCrystal = 43,
1118 Evoker = 44,
1119 EvokerFangs = 45,
1121 ExperienceOrb = 47,
1122 EyeOfEnder = 48,
1123 FallingBlockEntity = 49,
1124 LargeFireball = 50,
1126 Fox = 52,
1127 Frog = 53,
1128 MinecartFurnace = 54,
1129 Ghast = 55,
1130 Giant = 56,
1131 GlowItemFrame = 57,
1132 GlowSquid = 58,
1133 Goat = 59,
1134 Guardian = 60,
1135 Hoglin = 61,
1136 MinecartHopper = 62,
1137 Horse = 63,
1138 Husk = 64,
1139 Illusioner = 65,
1140 Interaction = 66,
1141 IronGolem = 67,
1142 ItemEntity = 68,
1143 DisplayItemDisplay = 69,
1144 ItemFrame = 70,
1145 JungleBoat = 71,
1146 JungleChestBoat = 72,
1148 LightningBolt = 74,
1149 Llama = 75,
1150 LlamaSpit = 76,
1151 MagmaCube = 77,
1152 MangroveBoat = 78,
1153 MangroveChestBoat = 79,
1154 Marker = 80,
1155 Minecart = 81,
1156 MushroomCow = 82,
1157 Mule = 83,
1158 OakBoat = 84,
1159 OakChestBoat = 85,
1160 Ocelot = 86,
1161 OminousItemSpawner = 87,
1162 Painting = 88,
1163 PaleOakBoat = 89,
1164 PaleOakChestBoat = 90,
1165 Panda = 91,
1166 Parrot = 92,
1167 Phantom = 93,
1168 Pig = 94,
1169 Piglin = 95,
1170 PiglinBrute = 96,
1171 Pillager = 97,
1172 PolarBear = 98,
1173 ThrownPotion = 99,
1174 Pufferfish = 100,
1175 Rabbit = 101,
1176 Ravager = 102,
1177 Salmon = 103,
1178 Sheep = 104,
1179 Shulker = 105,
1180 ShulkerBullet = 106,
1181 Silverfish = 107,
1182 Skeleton = 108,
1183 SkeletonHorse = 109,
1184 Slime = 110,
1185 SmallFireball = 111,
1186 Sniffer = 112,
1187 Snowball = 113,
1188 SnowGolem = 114,
1189 MinecartSpawner = 115,
1190 SpectralArrow = 116,
1191 Spider = 117,
1192 SpruceBoat = 118,
1193 SpruceChestBoat = 119,
1194 Squid = 120,
1195 Stray = 121,
1196 Strider = 122,
1197 Tadpole = 123,
1198 DisplayTextDisplay = 124,
1199 PrimedTnt = 125,
1200 MinecartTNT = 126,
1201 TraderLlama = 127,
1202 ThrownTrident = 128,
1203 TropicalFish = 129,
1204 Turtle = 130,
1205 Vex = 131,
1206 Villager = 132,
1207 Vindicator = 133,
1208 WanderingTrader = 134,
1209 Warden = 135,
1210 WindCharge = 136,
1211 Witch = 137,
1212 WitherBoss = 138,
1213 WitherSkeleton = 139,
1214 WitherSkull = 140,
1215 Wolf = 141,
1216 Zoglin = 142,
1217 Zombie = 143,
1218 ZombieHorse = 144,
1219 ZombieVillager = 145,
1220 ZombifiedPiglin = 146,
1221 Player = 147,
1222 FishingHook = 148,
1223#elif PROTOCOL_VERSION > 767 /* > 1.21.1 */
1224 AcaciaBoat = 0,
1225 AcaciaChestBoat = 1,
1226 Allay = 2,
1227 AreaEffectCloud = 3,
1228 Armadillo = 4,
1229 ArmorStand = 5,
1230 Arrow = 6,
1231 Axolotl = 7,
1232 ChestRaft = 8,
1233 Raft = 9,
1234 Bat = 10,
1235 Bee = 11,
1236 BirchBoat = 12,
1237 BirchChestBoat = 13,
1238 Blaze = 14,
1240 Bogged = 16,
1241 Breeze = 17,
1242 BreezeWindCharge = 18,
1243 Camel = 19,
1244 Cat = 20,
1245 CaveSpider = 21,
1246 CherryBoat = 22,
1247 CherryChestBoat = 23,
1248 MinecartChest = 24,
1249 Chicken = 25,
1250 Cod = 26,
1252 Cow = 28,
1253 Creaking = 29,
1254 CreakingTransient = 30,
1255 Creeper = 31,
1256 DarkOakBoat = 32,
1257 DarkOakChestBoat = 33,
1258 Dolphin = 34,
1259 Donkey = 35,
1260 DragonFireball = 36,
1261 Drowned = 37,
1262 ThrownEgg = 38,
1263 ElderGuardian = 39,
1264 EnderMan = 40,
1265 Endermite = 41,
1266 EnderDragon = 42,
1267 ThrownEnderpearl = 43,
1268 EndCrystal = 44,
1269 Evoker = 45,
1270 EvokerFangs = 46,
1272 ExperienceOrb = 48,
1273 EyeOfEnder = 49,
1274 FallingBlockEntity = 50,
1275 LargeFireball = 51,
1277 Fox = 53,
1278 Frog = 54,
1279 MinecartFurnace = 55,
1280 Ghast = 56,
1281 Giant = 57,
1282 GlowItemFrame = 58,
1283 GlowSquid = 59,
1284 Goat = 60,
1285 Guardian = 61,
1286 Hoglin = 62,
1287 MinecartHopper = 63,
1288 Horse = 64,
1289 Husk = 65,
1290 Illusioner = 66,
1291 Interaction = 67,
1292 IronGolem = 68,
1293 ItemEntity = 69,
1294 DisplayItemDisplay = 70,
1295 ItemFrame = 71,
1296 JungleBoat = 72,
1297 JungleChestBoat = 73,
1299 LightningBolt = 75,
1300 Llama = 76,
1301 LlamaSpit = 77,
1302 MagmaCube = 78,
1303 MangroveBoat = 79,
1304 MangroveChestBoat = 80,
1305 Marker = 81,
1306 Minecart = 82,
1307 MushroomCow = 83,
1308 Mule = 84,
1309 OakBoat = 85,
1310 OakChestBoat = 86,
1311 Ocelot = 87,
1312 OminousItemSpawner = 88,
1313 Painting = 89,
1314 PaleOakBoat = 90,
1315 PaleOakChestBoat = 91,
1316 Panda = 92,
1317 Parrot = 93,
1318 Phantom = 94,
1319 Pig = 95,
1320 Piglin = 96,
1321 PiglinBrute = 97,
1322 Pillager = 98,
1323 PolarBear = 99,
1324 ThrownPotion = 100,
1325 Pufferfish = 101,
1326 Rabbit = 102,
1327 Ravager = 103,
1328 Salmon = 104,
1329 Sheep = 105,
1330 Shulker = 106,
1331 ShulkerBullet = 107,
1332 Silverfish = 108,
1333 Skeleton = 109,
1334 SkeletonHorse = 110,
1335 Slime = 111,
1336 SmallFireball = 112,
1337 Sniffer = 113,
1338 Snowball = 114,
1339 SnowGolem = 115,
1340 MinecartSpawner = 116,
1341 SpectralArrow = 117,
1342 Spider = 118,
1343 SpruceBoat = 119,
1344 SpruceChestBoat = 120,
1345 Squid = 121,
1346 Stray = 122,
1347 Strider = 123,
1348 Tadpole = 124,
1349 DisplayTextDisplay = 125,
1350 PrimedTnt = 126,
1351 MinecartTNT = 127,
1352 TraderLlama = 128,
1353 ThrownTrident = 129,
1354 TropicalFish = 130,
1355 Turtle = 131,
1356 Vex = 132,
1357 Villager = 133,
1358 Vindicator = 134,
1359 WanderingTrader = 135,
1360 Warden = 136,
1361 WindCharge = 137,
1362 Witch = 138,
1363 WitherBoss = 139,
1364 WitherSkeleton = 140,
1365 WitherSkull = 141,
1366 Wolf = 142,
1367 Zoglin = 143,
1368 Zombie = 144,
1369 ZombieHorse = 145,
1370 ZombieVillager = 146,
1371 ZombifiedPiglin = 147,
1372 Player = 148,
1373 FishingHook = 149,
1374#elif PROTOCOL_VERSION > 765 /* > 1.20.4 */
1375 Allay = 0,
1376 AreaEffectCloud = 1,
1377 Armadillo = 2,
1378 ArmorStand = 3,
1379 Arrow = 4,
1380 Axolotl = 5,
1381 Bat = 6,
1382 Bee = 7,
1383 Blaze = 8,
1385 Boat = 10,
1386 Bogged = 11,
1387 Breeze = 12,
1388 BreezeWindCharge = 13,
1389 Camel = 14,
1390 Cat = 15,
1391 CaveSpider = 16,
1392 ChestBoat = 17,
1393 MinecartChest = 18,
1394 Chicken = 19,
1395 Cod = 20,
1397 Cow = 22,
1398 Creeper = 23,
1399 Dolphin = 24,
1400 Donkey = 25,
1401 DragonFireball = 26,
1402 Drowned = 27,
1403 ThrownEgg = 28,
1404 ElderGuardian = 29,
1405 EndCrystal = 30,
1406 EnderDragon = 31,
1407 ThrownEnderpearl = 32,
1408 EnderMan = 33,
1409 Endermite = 34,
1410 Evoker = 35,
1411 EvokerFangs = 36,
1413 ExperienceOrb = 38,
1414 EyeOfEnder = 39,
1415 FallingBlockEntity = 40,
1417 Fox = 42,
1418 Frog = 43,
1419 MinecartFurnace = 44,
1420 Ghast = 45,
1421 Giant = 46,
1422 GlowItemFrame = 47,
1423 GlowSquid = 48,
1424 Goat = 49,
1425 Guardian = 50,
1426 Hoglin = 51,
1427 MinecartHopper = 52,
1428 Horse = 53,
1429 Husk = 54,
1430 Illusioner = 55,
1431 Interaction = 56,
1432 IronGolem = 57,
1433 ItemEntity = 58,
1434 DisplayItemDisplay = 59,
1435 ItemFrame = 60,
1436 OminousItemSpawner = 61,
1437 LargeFireball = 62,
1439 LightningBolt = 64,
1440 Llama = 65,
1441 LlamaSpit = 66,
1442 MagmaCube = 67,
1443 Marker = 68,
1444 Minecart = 69,
1445 MushroomCow = 70,
1446 Mule = 71,
1447 Ocelot = 72,
1448 Painting = 73,
1449 Panda = 74,
1450 Parrot = 75,
1451 Phantom = 76,
1452 Pig = 77,
1453 Piglin = 78,
1454 PiglinBrute = 79,
1455 Pillager = 80,
1456 PolarBear = 81,
1457 ThrownPotion = 82,
1458 Pufferfish = 83,
1459 Rabbit = 84,
1460 Ravager = 85,
1461 Salmon = 86,
1462 Sheep = 87,
1463 Shulker = 88,
1464 ShulkerBullet = 89,
1465 Silverfish = 90,
1466 Skeleton = 91,
1467 SkeletonHorse = 92,
1468 Slime = 93,
1469 SmallFireball = 94,
1470 Sniffer = 95,
1471 SnowGolem = 96,
1472 Snowball = 97,
1473 MinecartSpawner = 98,
1474 SpectralArrow = 99,
1475 Spider = 100,
1476 Squid = 101,
1477 Stray = 102,
1478 Strider = 103,
1479 Tadpole = 104,
1480 DisplayTextDisplay = 105,
1481 PrimedTnt = 106,
1482 MinecartTNT = 107,
1483 TraderLlama = 108,
1484 ThrownTrident = 109,
1485 TropicalFish = 110,
1486 Turtle = 111,
1487 Vex = 112,
1488 Villager = 113,
1489 Vindicator = 114,
1490 WanderingTrader = 115,
1491 Warden = 116,
1492 WindCharge = 117,
1493 Witch = 118,
1494 WitherBoss = 119,
1495 WitherSkeleton = 120,
1496 WitherSkull = 121,
1497 Wolf = 122,
1498 Zoglin = 123,
1499 Zombie = 124,
1500 ZombieHorse = 125,
1501 ZombieVillager = 126,
1502 ZombifiedPiglin = 127,
1503 Player = 128,
1504 FishingHook = 129,
1505#elif PROTOCOL_VERSION > 764 /* > 1.20.2 */
1506 Allay = 0,
1507 AreaEffectCloud = 1,
1508 ArmorStand = 2,
1509 Arrow = 3,
1510 Axolotl = 4,
1511 Bat = 5,
1512 Bee = 6,
1513 Blaze = 7,
1515 Boat = 9,
1516 Breeze = 10,
1517 Camel = 11,
1518 Cat = 12,
1519 CaveSpider = 13,
1520 ChestBoat = 14,
1521 MinecartChest = 15,
1522 Chicken = 16,
1523 Cod = 17,
1525 Cow = 19,
1526 Creeper = 20,
1527 Dolphin = 21,
1528 Donkey = 22,
1529 DragonFireball = 23,
1530 Drowned = 24,
1531 ThrownEgg = 25,
1532 ElderGuardian = 26,
1533 EndCrystal = 27,
1534 EnderDragon = 28,
1535 ThrownEnderpearl = 29,
1536 EnderMan = 30,
1537 Endermite = 31,
1538 Evoker = 32,
1539 EvokerFangs = 33,
1541 ExperienceOrb = 35,
1542 EyeOfEnder = 36,
1543 FallingBlockEntity = 37,
1545 Fox = 39,
1546 Frog = 40,
1547 MinecartFurnace = 41,
1548 Ghast = 42,
1549 Giant = 43,
1550 GlowItemFrame = 44,
1551 GlowSquid = 45,
1552 Goat = 46,
1553 Guardian = 47,
1554 Hoglin = 48,
1555 MinecartHopper = 49,
1556 Horse = 50,
1557 Husk = 51,
1558 Illusioner = 52,
1559 Interaction = 53,
1560 IronGolem = 54,
1561 ItemEntity = 55,
1562 DisplayItemDisplay = 56,
1563 ItemFrame = 57,
1564 LargeFireball = 58,
1566 LightningBolt = 60,
1567 Llama = 61,
1568 LlamaSpit = 62,
1569 MagmaCube = 63,
1570 Marker = 64,
1571 Minecart = 65,
1572 MushroomCow = 66,
1573 Mule = 67,
1574 Ocelot = 68,
1575 Painting = 69,
1576 Panda = 70,
1577 Parrot = 71,
1578 Phantom = 72,
1579 Pig = 73,
1580 Piglin = 74,
1581 PiglinBrute = 75,
1582 Pillager = 76,
1583 PolarBear = 77,
1584 ThrownPotion = 78,
1585 Pufferfish = 79,
1586 Rabbit = 80,
1587 Ravager = 81,
1588 Salmon = 82,
1589 Sheep = 83,
1590 Shulker = 84,
1591 ShulkerBullet = 85,
1592 Silverfish = 86,
1593 Skeleton = 87,
1594 SkeletonHorse = 88,
1595 Slime = 89,
1596 SmallFireball = 90,
1597 Sniffer = 91,
1598 SnowGolem = 92,
1599 Snowball = 93,
1600 MinecartSpawner = 94,
1601 SpectralArrow = 95,
1602 Spider = 96,
1603 Squid = 97,
1604 Stray = 98,
1605 Strider = 99,
1606 Tadpole = 100,
1607 DisplayTextDisplay = 101,
1608 PrimedTnt = 102,
1609 MinecartTNT = 103,
1610 TraderLlama = 104,
1611 ThrownTrident = 105,
1612 TropicalFish = 106,
1613 Turtle = 107,
1614 Vex = 108,
1615 Villager = 109,
1616 Vindicator = 110,
1617 WanderingTrader = 111,
1618 Warden = 112,
1619 WindCharge = 113,
1620 Witch = 114,
1621 WitherBoss = 115,
1622 WitherSkeleton = 116,
1623 WitherSkull = 117,
1624 Wolf = 118,
1625 Zoglin = 119,
1626 Zombie = 120,
1627 ZombieHorse = 121,
1628 ZombieVillager = 122,
1629 ZombifiedPiglin = 123,
1630 Player = 124,
1631 FishingHook = 125,
1632#elif PROTOCOL_VERSION > 761 /* > 1.19.3 */
1633 Allay = 0,
1634 AreaEffectCloud = 1,
1635 ArmorStand = 2,
1636 Arrow = 3,
1637 Axolotl = 4,
1638 Bat = 5,
1639 Bee = 6,
1640 Blaze = 7,
1642 Boat = 9,
1643 Camel = 10,
1644 Cat = 11,
1645 CaveSpider = 12,
1646 ChestBoat = 13,
1647 MinecartChest = 14,
1648 Chicken = 15,
1649 Cod = 16,
1651 Cow = 18,
1652 Creeper = 19,
1653 Dolphin = 20,
1654 Donkey = 21,
1655 DragonFireball = 22,
1656 Drowned = 23,
1657 ThrownEgg = 24,
1658 ElderGuardian = 25,
1659 EndCrystal = 26,
1660 EnderDragon = 27,
1661 ThrownEnderpearl = 28,
1662 EnderMan = 29,
1663 Endermite = 30,
1664 Evoker = 31,
1665 EvokerFangs = 32,
1667 ExperienceOrb = 34,
1668 EyeOfEnder = 35,
1669 FallingBlockEntity = 36,
1671 Fox = 38,
1672 Frog = 39,
1673 MinecartFurnace = 40,
1674 Ghast = 41,
1675 Giant = 42,
1676 GlowItemFrame = 43,
1677 GlowSquid = 44,
1678 Goat = 45,
1679 Guardian = 46,
1680 Hoglin = 47,
1681 MinecartHopper = 48,
1682 Horse = 49,
1683 Husk = 50,
1684 Illusioner = 51,
1685 Interaction = 52,
1686 IronGolem = 53,
1687 ItemEntity = 54,
1688 DisplayItemDisplay = 55,
1689 ItemFrame = 56,
1690 LargeFireball = 57,
1692 LightningBolt = 59,
1693 Llama = 60,
1694 LlamaSpit = 61,
1695 MagmaCube = 62,
1696 Marker = 63,
1697 Minecart = 64,
1698 MushroomCow = 65,
1699 Mule = 66,
1700 Ocelot = 67,
1701 Painting = 68,
1702 Panda = 69,
1703 Parrot = 70,
1704 Phantom = 71,
1705 Pig = 72,
1706 Piglin = 73,
1707 PiglinBrute = 74,
1708 Pillager = 75,
1709 PolarBear = 76,
1710 ThrownPotion = 77,
1711 Pufferfish = 78,
1712 Rabbit = 79,
1713 Ravager = 80,
1714 Salmon = 81,
1715 Sheep = 82,
1716 Shulker = 83,
1717 ShulkerBullet = 84,
1718 Silverfish = 85,
1719 Skeleton = 86,
1720 SkeletonHorse = 87,
1721 Slime = 88,
1722 SmallFireball = 89,
1723 Sniffer = 90,
1724 SnowGolem = 91,
1725 Snowball = 92,
1726 MinecartSpawner = 93,
1727 SpectralArrow = 94,
1728 Spider = 95,
1729 Squid = 96,
1730 Stray = 97,
1731 Strider = 98,
1732 Tadpole = 99,
1733 DisplayTextDisplay = 100,
1734 PrimedTnt = 101,
1735 MinecartTNT = 102,
1736 TraderLlama = 103,
1737 ThrownTrident = 104,
1738 TropicalFish = 105,
1739 Turtle = 106,
1740 Vex = 107,
1741 Villager = 108,
1742 Vindicator = 109,
1743 WanderingTrader = 110,
1744 Warden = 111,
1745 Witch = 112,
1746 WitherBoss = 113,
1747 WitherSkeleton = 114,
1748 WitherSkull = 115,
1749 Wolf = 116,
1750 Zoglin = 117,
1751 Zombie = 118,
1752 ZombieHorse = 119,
1753 ZombieVillager = 120,
1754 ZombifiedPiglin = 121,
1755 Player = 122,
1756 FishingHook = 123,
1757#elif PROTOCOL_VERSION > 760 /* > 1.19.2 */
1758 Allay = 0,
1759 AreaEffectCloud = 1,
1760 ArmorStand = 2,
1761 Arrow = 3,
1762 Axolotl = 4,
1763 Bat = 5,
1764 Bee = 6,
1765 Blaze = 7,
1766 Boat = 8,
1767 ChestBoat = 9,
1768 Cat = 10,
1769 Camel = 11,
1770 CaveSpider = 12,
1771 Chicken = 13,
1772 Cod = 14,
1773 Cow = 15,
1774 Creeper = 16,
1775 Dolphin = 17,
1776 Donkey = 18,
1777 DragonFireball = 19,
1778 Drowned = 20,
1779 ElderGuardian = 21,
1780 EndCrystal = 22,
1781 EnderDragon = 23,
1782 EnderMan = 24,
1783 Endermite = 25,
1784 Evoker = 26,
1785 EvokerFangs = 27,
1786 ExperienceOrb = 28,
1787 EyeOfEnder = 29,
1788 FallingBlockEntity = 30,
1790 Fox = 32,
1791 Frog = 33,
1792 Ghast = 34,
1793 Giant = 35,
1794 GlowItemFrame = 36,
1795 GlowSquid = 37,
1796 Goat = 38,
1797 Guardian = 39,
1798 Hoglin = 40,
1799 Horse = 41,
1800 Husk = 42,
1801 Illusioner = 43,
1802 IronGolem = 44,
1803 ItemEntity = 45,
1804 ItemFrame = 46,
1805 LargeFireball = 47,
1807 LightningBolt = 49,
1808 Llama = 50,
1809 LlamaSpit = 51,
1810 MagmaCube = 52,
1811 Marker = 53,
1812 Minecart = 54,
1813 MinecartChest = 55,
1815 MinecartFurnace = 57,
1816 MinecartHopper = 58,
1817 MinecartSpawner = 59,
1818 MinecartTNT = 60,
1819 Mule = 61,
1820 MushroomCow = 62,
1821 Ocelot = 63,
1822 Painting = 64,
1823 Panda = 65,
1824 Parrot = 66,
1825 Phantom = 67,
1826 Pig = 68,
1827 Piglin = 69,
1828 PiglinBrute = 70,
1829 Pillager = 71,
1830 PolarBear = 72,
1831 PrimedTnt = 73,
1832 Pufferfish = 74,
1833 Rabbit = 75,
1834 Ravager = 76,
1835 Salmon = 77,
1836 Sheep = 78,
1837 Shulker = 79,
1838 ShulkerBullet = 80,
1839 Silverfish = 81,
1840 Skeleton = 82,
1841 SkeletonHorse = 83,
1842 Slime = 84,
1843 SmallFireball = 85,
1844 SnowGolem = 86,
1845 Snowball = 87,
1846 SpectralArrow = 88,
1847 Spider = 89,
1848 Squid = 90,
1849 Stray = 91,
1850 Strider = 92,
1851 Tadpole = 93,
1852 ThrownEgg = 94,
1853 ThrownEnderpearl = 95,
1855 ThrownPotion = 97,
1856 ThrownTrident = 98,
1857 TraderLlama = 99,
1858 TropicalFish = 100,
1859 Turtle = 101,
1860 Vex = 102,
1861 Villager = 103,
1862 Vindicator = 104,
1863 WanderingTrader = 105,
1864 Warden = 106,
1865 Witch = 107,
1866 WitherBoss = 108,
1867 WitherSkeleton = 109,
1868 WitherSkull = 110,
1869 Wolf = 111,
1870 Zoglin = 112,
1871 Zombie = 113,
1872 ZombieHorse = 114,
1873 ZombieVillager = 115,
1874 ZombifiedPiglin = 116,
1875 Player = 117,
1876 FishingHook = 118,
1877#elif PROTOCOL_VERSION > 758 /* > 1.18.2 */
1878 Allay = 0,
1879 AreaEffectCloud = 1,
1880 ArmorStand = 2,
1881 Arrow = 3,
1882 Axolotl = 4,
1883 Bat = 5,
1884 Bee = 6,
1885 Blaze = 7,
1886 Boat = 8,
1887 ChestBoat = 9,
1888 Cat = 10,
1889 CaveSpider = 11,
1890 Chicken = 12,
1891 Cod = 13,
1892 Cow = 14,
1893 Creeper = 15,
1894 Dolphin = 16,
1895 Donkey = 17,
1896 DragonFireball = 18,
1897 Drowned = 19,
1898 ElderGuardian = 20,
1899 EndCrystal = 21,
1900 EnderDragon = 22,
1901 EnderMan = 23,
1902 Endermite = 24,
1903 Evoker = 25,
1904 EvokerFangs = 26,
1905 ExperienceOrb = 27,
1906 EyeOfEnder = 28,
1907 FallingBlockEntity = 29,
1909 Fox = 31,
1910 Frog = 32,
1911 Ghast = 33,
1912 Giant = 34,
1913 GlowItemFrame = 35,
1914 GlowSquid = 36,
1915 Goat = 37,
1916 Guardian = 38,
1917 Hoglin = 39,
1918 Horse = 40,
1919 Husk = 41,
1920 Illusioner = 42,
1921 IronGolem = 43,
1922 ItemEntity = 44,
1923 ItemFrame = 45,
1924 LargeFireball = 46,
1926 LightningBolt = 48,
1927 Llama = 49,
1928 LlamaSpit = 50,
1929 MagmaCube = 51,
1930 Marker = 52,
1931 Minecart = 53,
1932 MinecartChest = 54,
1934 MinecartFurnace = 56,
1935 MinecartHopper = 57,
1936 MinecartSpawner = 58,
1937 MinecartTNT = 59,
1938 Mule = 60,
1939 MushroomCow = 61,
1940 Ocelot = 62,
1941 Painting = 63,
1942 Panda = 64,
1943 Parrot = 65,
1944 Phantom = 66,
1945 Pig = 67,
1946 Piglin = 68,
1947 PiglinBrute = 69,
1948 Pillager = 70,
1949 PolarBear = 71,
1950 PrimedTnt = 72,
1951 Pufferfish = 73,
1952 Rabbit = 74,
1953 Ravager = 75,
1954 Salmon = 76,
1955 Sheep = 77,
1956 Shulker = 78,
1957 ShulkerBullet = 79,
1958 Silverfish = 80,
1959 Skeleton = 81,
1960 SkeletonHorse = 82,
1961 Slime = 83,
1962 SmallFireball = 84,
1963 SnowGolem = 85,
1964 Snowball = 86,
1965 SpectralArrow = 87,
1966 Spider = 88,
1967 Squid = 89,
1968 Stray = 90,
1969 Strider = 91,
1970 Tadpole = 92,
1971 ThrownEgg = 93,
1972 ThrownEnderpearl = 94,
1974 ThrownPotion = 96,
1975 ThrownTrident = 97,
1976 TraderLlama = 98,
1977 TropicalFish = 99,
1978 Turtle = 100,
1979 Vex = 101,
1980 Villager = 102,
1981 Vindicator = 103,
1982 WanderingTrader = 104,
1983 Warden = 105,
1984 Witch = 106,
1985 WitherBoss = 107,
1986 WitherSkeleton = 108,
1987 WitherSkull = 109,
1988 Wolf = 110,
1989 Zoglin = 111,
1990 Zombie = 112,
1991 ZombieHorse = 113,
1992 ZombieVillager = 114,
1993 ZombifiedPiglin = 115,
1994 Player = 116,
1995 FishingHook = 117,
1996#elif PROTOCOL_VERSION > 754 /* > 1.16.5 */
1997 AreaEffectCloud = 0,
1998 ArmorStand = 1,
1999 Arrow = 2,
2000 Axolotl = 3,
2001 Bat = 4,
2002 Bee = 5,
2003 Blaze = 6,
2004 Boat = 7,
2005 Cat = 8,
2006 CaveSpider = 9,
2007 Chicken = 10,
2008 Cod = 11,
2009 Cow = 12,
2010 Creeper = 13,
2011 Dolphin = 14,
2012 Donkey = 15,
2013 DragonFireball = 16,
2014 Drowned = 17,
2015 ElderGuardian = 18,
2016 EndCrystal = 19,
2017 EnderDragon = 20,
2018 EnderMan = 21,
2019 Endermite = 22,
2020 Evoker = 23,
2021 EvokerFangs = 24,
2022 ExperienceOrb = 25,
2023 EyeOfEnder = 26,
2024 FallingBlockEntity = 27,
2026 Fox = 29,
2027 Ghast = 30,
2028 Giant = 31,
2029 GlowItemFrame = 32,
2030 GlowSquid = 33,
2031 Goat = 34,
2032 Guardian = 35,
2033 Hoglin = 36,
2034 Horse = 37,
2035 Husk = 38,
2036 Illusioner = 39,
2037 IronGolem = 40,
2038 ItemEntity = 41,
2039 ItemFrame = 42,
2040 LargeFireball = 43,
2042 LightningBolt = 45,
2043 Llama = 46,
2044 LlamaSpit = 47,
2045 MagmaCube = 48,
2046 Marker = 49,
2047 Minecart = 50,
2048 MinecartChest = 51,
2050 MinecartFurnace = 53,
2051 MinecartHopper = 54,
2052 MinecartSpawner = 55,
2053 MinecartTNT = 56,
2054 Mule = 57,
2055 MushroomCow = 58,
2056 Ocelot = 59,
2057 Painting = 60,
2058 Panda = 61,
2059 Parrot = 62,
2060 Phantom = 63,
2061 Pig = 64,
2062 Piglin = 65,
2063 PiglinBrute = 66,
2064 Pillager = 67,
2065 PolarBear = 68,
2066 PrimedTnt = 69,
2067 Pufferfish = 70,
2068 Rabbit = 71,
2069 Ravager = 72,
2070 Salmon = 73,
2071 Sheep = 74,
2072 Shulker = 75,
2073 ShulkerBullet = 76,
2074 Silverfish = 77,
2075 Skeleton = 78,
2076 SkeletonHorse = 79,
2077 Slime = 80,
2078 SmallFireball = 81,
2079 SnowGolem = 82,
2080 Snowball = 83,
2081 SpectralArrow = 84,
2082 Spider = 85,
2083 Squid = 86,
2084 Stray = 87,
2085 Strider = 88,
2086 ThrownEgg = 89,
2087 ThrownEnderpearl = 90,
2089 ThrownPotion = 92,
2090 ThrownTrident = 93,
2091 TraderLlama = 94,
2092 TropicalFish = 95,
2093 Turtle = 96,
2094 Vex = 97,
2095 Villager = 98,
2096 Vindicator = 99,
2097 WanderingTrader = 100,
2098 Witch = 101,
2099 WitherBoss = 102,
2100 WitherSkeleton = 103,
2101 WitherSkull = 104,
2102 Wolf = 105,
2103 Zoglin = 106,
2104 Zombie = 107,
2105 ZombieHorse = 108,
2106 ZombieVillager = 109,
2107 ZombifiedPiglin = 110,
2108 Player = 111,
2109 FishingHook = 112,
2110#elif PROTOCOL_VERSION > 736 /* > 1.16.1 */
2111 AreaEffectCloud = 0,
2112 ArmorStand = 1,
2113 Arrow = 2,
2114 Bat = 3,
2115 Bee = 4,
2116 Blaze = 5,
2117 Boat = 6,
2118 Cat = 7,
2119 CaveSpider = 8,
2120 Chicken = 9,
2121 Cod = 10,
2122 Cow = 11,
2123 Creeper = 12,
2124 Dolphin = 13,
2125 Donkey = 14,
2126 DragonFireball = 15,
2127 Drowned = 16,
2128 ElderGuardian = 17,
2129 EndCrystal = 18,
2130 EnderDragon = 19,
2131 EnderMan = 20,
2132 Endermite = 21,
2133 Evoker = 22,
2134 EvokerFangs = 23,
2135 ExperienceOrb = 24,
2136 EyeOfEnder = 25,
2137 FallingBlockEntity = 26,
2139 Fox = 28,
2140 Ghast = 29,
2141 Giant = 30,
2142 Guardian = 31,
2143 Hoglin = 32,
2144 Horse = 33,
2145 Husk = 34,
2146 Illusioner = 35,
2147 IronGolem = 36,
2148 ItemEntity = 37,
2149 ItemFrame = 38,
2150 LargeFireball = 39,
2152 LightningBolt = 41,
2153 Llama = 42,
2154 LlamaSpit = 43,
2155 MagmaCube = 44,
2156 Minecart = 45,
2157 MinecartChest = 46,
2159 MinecartFurnace = 48,
2160 MinecartHopper = 49,
2161 MinecartSpawner = 50,
2162 MinecartTNT = 51,
2163 Mule = 52,
2164 MushroomCow = 53,
2165 Ocelot = 54,
2166 Painting = 55,
2167 Panda = 56,
2168 Parrot = 57,
2169 Phantom = 58,
2170 Pig = 59,
2171 Piglin = 60,
2172 PiglinBrute = 61,
2173 Pillager = 62,
2174 PolarBear = 63,
2175 PrimedTnt = 64,
2176 Pufferfish = 65,
2177 Rabbit = 66,
2178 Ravager = 67,
2179 Salmon = 68,
2180 Sheep = 69,
2181 Shulker = 70,
2182 ShulkerBullet = 71,
2183 Silverfish = 72,
2184 Skeleton = 73,
2185 SkeletonHorse = 74,
2186 Slime = 75,
2187 SmallFireball = 76,
2188 SnowGolem = 77,
2189 Snowball = 78,
2190 SpectralArrow = 79,
2191 Spider = 80,
2192 Squid = 81,
2193 Stray = 82,
2194 Strider = 83,
2195 ThrownEgg = 84,
2196 ThrownEnderpearl = 85,
2198 ThrownPotion = 87,
2199 ThrownTrident = 88,
2200 TraderLlama = 89,
2201 TropicalFish = 90,
2202 Turtle = 91,
2203 Vex = 92,
2204 Villager = 93,
2205 Vindicator = 94,
2206 WanderingTrader = 95,
2207 Witch = 96,
2208 WitherBoss = 97,
2209 WitherSkeleton = 98,
2210 WitherSkull = 99,
2211 Wolf = 100,
2212 Zoglin = 101,
2213 Zombie = 102,
2214 ZombieHorse = 103,
2215 ZombieVillager = 104,
2216 ZombifiedPiglin = 105,
2217 Player = 106,
2218 FishingHook = 107,
2219#elif PROTOCOL_VERSION > 578 /* > 1.15.2 */
2220 AreaEffectCloud = 0,
2221 ArmorStand = 1,
2222 Arrow = 2,
2223 Bat = 3,
2224 Bee = 4,
2225 Blaze = 5,
2226 Boat = 6,
2227 Cat = 7,
2228 CaveSpider = 8,
2229 Chicken = 9,
2230 Cod = 10,
2231 Cow = 11,
2232 Creeper = 12,
2233 Dolphin = 13,
2234 Donkey = 14,
2235 DragonFireball = 15,
2236 Drowned = 16,
2237 ElderGuardian = 17,
2238 EndCrystal = 18,
2239 EnderDragon = 19,
2240 EnderMan = 20,
2241 Endermite = 21,
2242 Evoker = 22,
2243 EvokerFangs = 23,
2244 ExperienceOrb = 24,
2245 EyeOfEnder = 25,
2246 FallingBlockEntity = 26,
2248 Fox = 28,
2249 Ghast = 29,
2250 Giant = 30,
2251 Guardian = 31,
2252 Hoglin = 32,
2253 Horse = 33,
2254 Husk = 34,
2255 Illusioner = 35,
2256 IronGolem = 36,
2257 ItemEntity = 37,
2258 ItemFrame = 38,
2259 LargeFireball = 39,
2261 LightningBolt = 41,
2262 Llama = 42,
2263 LlamaSpit = 43,
2264 MagmaCube = 44,
2265 Minecart = 45,
2266 MinecartChest = 46,
2268 MinecartFurnace = 48,
2269 MinecartHopper = 49,
2270 MinecartSpawner = 50,
2271 MinecartTNT = 51,
2272 Mule = 52,
2273 MushroomCow = 53,
2274 Ocelot = 54,
2275 Painting = 55,
2276 Panda = 56,
2277 Parrot = 57,
2278 Phantom = 58,
2279 Pig = 59,
2280 Piglin = 60,
2281 Pillager = 61,
2282 PolarBear = 62,
2283 PrimedTnt = 63,
2284 Pufferfish = 64,
2285 Rabbit = 65,
2286 Ravager = 66,
2287 Salmon = 67,
2288 Sheep = 68,
2289 Shulker = 69,
2290 ShulkerBullet = 70,
2291 Silverfish = 71,
2292 Skeleton = 72,
2293 SkeletonHorse = 73,
2294 Slime = 74,
2295 SmallFireball = 75,
2296 SnowGolem = 76,
2297 Snowball = 77,
2298 SpectralArrow = 78,
2299 Spider = 79,
2300 Squid = 80,
2301 Stray = 81,
2302 Strider = 82,
2303 ThrownEgg = 83,
2304 ThrownEnderpearl = 84,
2306 ThrownPotion = 86,
2307 ThrownTrident = 87,
2308 TraderLlama = 88,
2309 TropicalFish = 89,
2310 Turtle = 90,
2311 Vex = 91,
2312 Villager = 92,
2313 Vindicator = 93,
2314 WanderingTrader = 94,
2315 Witch = 95,
2316 WitherBoss = 96,
2317 WitherSkeleton = 97,
2318 WitherSkull = 98,
2319 Wolf = 99,
2320 Zoglin = 100,
2321 Zombie = 101,
2322 ZombieHorse = 102,
2323 ZombieVillager = 103,
2324 ZombifiedPiglin = 104,
2325 Player = 105,
2326 FishingHook = 106,
2327#elif PROTOCOL_VERSION > 498 /* > 1.14.4 */
2328 AreaEffectCloud = 0,
2329 ArmorStand = 1,
2330 Arrow = 2,
2331 Bat = 3,
2332 Bee = 4,
2333 Blaze = 5,
2334 Boat = 6,
2335 Cat = 7,
2336 CaveSpider = 8,
2337 Chicken = 9,
2338 Cod = 10,
2339 Cow = 11,
2340 Creeper = 12,
2341 Donkey = 13,
2342 Dolphin = 14,
2343 DragonFireball = 15,
2344 Drowned = 16,
2345 ElderGuardian = 17,
2346 EndCrystal = 18,
2347 EnderDragon = 19,
2348 EnderMan = 20,
2349 Endermite = 21,
2350 EvokerFangs = 22,
2351 Evoker = 23,
2352 ExperienceOrb = 24,
2353 EyeOfEnder = 25,
2354 FallingBlockEntity = 26,
2356 Fox = 28,
2357 Ghast = 29,
2358 Giant = 30,
2359 Guardian = 31,
2360 Horse = 32,
2361 Husk = 33,
2362 Illusioner = 34,
2363 ItemEntity = 35,
2364 ItemFrame = 36,
2365 LargeFireball = 37,
2367 Llama = 39,
2368 LlamaSpit = 40,
2369 MagmaCube = 41,
2370 Minecart = 42,
2371 MinecartChest = 43,
2373 MinecartFurnace = 45,
2374 MinecartHopper = 46,
2375 MinecartSpawner = 47,
2376 MinecartTNT = 48,
2377 Mule = 49,
2378 MushroomCow = 50,
2379 Ocelot = 51,
2380 Painting = 52,
2381 Panda = 53,
2382 Parrot = 54,
2383 Pig = 55,
2384 Pufferfish = 56,
2385 PigZombie = 57,
2386 PolarBear = 58,
2387 PrimedTnt = 59,
2388 Rabbit = 60,
2389 Salmon = 61,
2390 Sheep = 62,
2391 Shulker = 63,
2392 ShulkerBullet = 64,
2393 Silverfish = 65,
2394 Skeleton = 66,
2395 SkeletonHorse = 67,
2396 Slime = 68,
2397 SmallFireball = 69,
2398 SnowGolem = 70,
2399 Snowball = 71,
2400 SpectralArrow = 72,
2401 Spider = 73,
2402 Squid = 74,
2403 Stray = 75,
2404 TraderLlama = 76,
2405 TropicalFish = 77,
2406 Turtle = 78,
2407 ThrownEgg = 79,
2408 ThrownEnderpearl = 80,
2410 ThrownPotion = 82,
2411 ThrownTrident = 83,
2412 Vex = 84,
2413 Villager = 85,
2414 IronGolem = 86,
2415 Vindicator = 87,
2416 Pillager = 88,
2417 WanderingTrader = 89,
2418 Witch = 90,
2419 WitherBoss = 91,
2420 WitherSkeleton = 92,
2421 WitherSkull = 93,
2422 Wolf = 94,
2423 Zombie = 95,
2424 ZombieHorse = 96,
2425 ZombieVillager = 97,
2426 Phantom = 98,
2427 Ravager = 99,
2428 LightningBolt = 100,
2429 Player = 101,
2430 FishingHook = 102,
2431#elif PROTOCOL_VERSION > 404 /* > 1.13.2 */
2432 AreaEffectCloud = 0,
2433 ArmorStand = 1,
2434 Arrow = 2,
2435 Bat = 3,
2436 Blaze = 4,
2437 Boat = 5,
2438 Cat = 6,
2439 CaveSpider = 7,
2440 Chicken = 8,
2441 Cod = 9,
2442 Cow = 10,
2443 Creeper = 11,
2444 Donkey = 12,
2445 Dolphin = 13,
2446 DragonFireball = 14,
2447 Drowned = 15,
2448 ElderGuardian = 16,
2449 EndCrystal = 17,
2450 EnderDragon = 18,
2451 EnderMan = 19,
2452 Endermite = 20,
2453 EvokerFangs = 21,
2454 Evoker = 22,
2455 ExperienceOrb = 23,
2456 EyeOfEnder = 24,
2457 FallingBlockEntity = 25,
2459 Fox = 27,
2460 Ghast = 28,
2461 Giant = 29,
2462 Guardian = 30,
2463 Horse = 31,
2464 Husk = 32,
2465 Illusioner = 33,
2466 ItemEntity = 34,
2467 ItemFrame = 35,
2468 LargeFireball = 36,
2470 Llama = 38,
2471 LlamaSpit = 39,
2472 MagmaCube = 40,
2473 Minecart = 41,
2474 MinecartChest = 42,
2476 MinecartFurnace = 44,
2477 MinecartHopper = 45,
2478 MinecartSpawner = 46,
2479 MinecartTNT = 47,
2480 Mule = 48,
2481 MushroomCow = 49,
2482 Ocelot = 50,
2483 Painting = 51,
2484 Panda = 52,
2485 Parrot = 53,
2486 Pig = 54,
2487 Pufferfish = 55,
2488 PigZombie = 56,
2489 PolarBear = 57,
2490 PrimedTnt = 58,
2491 Rabbit = 59,
2492 Salmon = 60,
2493 Sheep = 61,
2494 Shulker = 62,
2495 ShulkerBullet = 63,
2496 Silverfish = 64,
2497 Skeleton = 65,
2498 SkeletonHorse = 66,
2499 Slime = 67,
2500 SmallFireball = 68,
2501 SnowGolem = 69,
2502 Snowball = 70,
2503 SpectralArrow = 71,
2504 Spider = 72,
2505 Squid = 73,
2506 Stray = 74,
2507 TraderLlama = 75,
2508 TropicalFish = 76,
2509 Turtle = 77,
2510 ThrownEgg = 78,
2511 ThrownEnderpearl = 79,
2513 ThrownPotion = 81,
2514 ThrownTrident = 82,
2515 Vex = 83,
2516 Villager = 84,
2517 IronGolem = 85,
2518 Vindicator = 86,
2519 Pillager = 87,
2520 WanderingTrader = 88,
2521 Witch = 89,
2522 WitherBoss = 90,
2523 WitherSkeleton = 91,
2524 WitherSkull = 92,
2525 Wolf = 93,
2526 Zombie = 94,
2527 ZombieHorse = 95,
2528 ZombieVillager = 96,
2529 Phantom = 97,
2530 Ravager = 98,
2531 LightningBolt = 99,
2532 Player = 100,
2533 FishingHook = 101,
2534#elif PROTOCOL_VERSION > 340 /* > 1.12.2 */
2535 AreaEffectCloud = 0,
2536 ArmorStand = 1,
2537 Arrow = 2,
2538 Bat = 3,
2539 Blaze = 4,
2540 Boat = 5,
2541 CaveSpider = 6,
2542 Chicken = 7,
2543 Cod = 8,
2544 Cow = 9,
2545 Creeper = 10,
2546 Donkey = 11,
2547 Dolphin = 12,
2548 DragonFireball = 13,
2549 Drowned = 14,
2550 ElderGuardian = 15,
2551 EndCrystal = 16,
2552 EnderDragon = 17,
2553 EnderMan = 18,
2554 Endermite = 19,
2555 EvokerFangs = 20,
2556 Evoker = 21,
2557 ExperienceOrb = 22,
2558 EyeOfEnder = 23,
2559 FallingBlockEntity = 24,
2561 Ghast = 26,
2562 Giant = 27,
2563 Guardian = 28,
2564 Horse = 29,
2565 Husk = 30,
2566 Illusioner = 31,
2567 ItemEntity = 32,
2568 ItemFrame = 33,
2569 LargeFireball = 34,
2571 Llama = 36,
2572 LlamaSpit = 37,
2573 MagmaCube = 38,
2574 Minecart = 39,
2575 MinecartChest = 40,
2577 MinecartFurnace = 42,
2578 MinecartHopper = 43,
2579 MinecartSpawner = 44,
2580 MinecartTNT = 45,
2581 Mule = 46,
2582 MushroomCow = 47,
2583 Ocelot = 48,
2584 Painting = 49,
2585 Parrot = 50,
2586 Pig = 51,
2587 Pufferfish = 52,
2588 PigZombie = 53,
2589 PolarBear = 54,
2590 PrimedTnt = 55,
2591 Rabbit = 56,
2592 Salmon = 57,
2593 Sheep = 58,
2594 Shulker = 59,
2595 ShulkerBullet = 60,
2596 Silverfish = 61,
2597 Skeleton = 62,
2598 SkeletonHorse = 63,
2599 Slime = 64,
2600 SmallFireball = 65,
2601 SnowGolem = 66,
2602 Snowball = 67,
2603 SpectralArrow = 68,
2604 Spider = 69,
2605 Squid = 70,
2606 Stray = 71,
2607 TropicalFish = 72,
2608 Turtle = 73,
2609 ThrownEgg = 74,
2610 ThrownEnderpearl = 75,
2612 ThrownPotion = 77,
2613 Vex = 78,
2614 Villager = 79,
2615 IronGolem = 80,
2616 Vindicator = 81,
2617 Witch = 82,
2618 WitherBoss = 83,
2619 WitherSkeleton = 84,
2620 WitherSkull = 85,
2621 Wolf = 86,
2622 Zombie = 87,
2623 ZombieHorse = 88,
2624 ZombieVillager = 89,
2625 Phantom = 90,
2626 LightningBolt = 91,
2627 Player = 92,
2628 FishingHook = 93,
2629 ThrownTrident = 94,
2630#else // 1.12.2
2631 FishingHook = -3,
2632 Player = -2,
2633 ItemEntity = 1,
2634 ExperienceOrb = 2,
2635 AreaEffectCloud = 3,
2636 ElderGuardian = 4,
2637 WitherSkeleton = 5,
2638 Stray = 6,
2639 ThrownEgg = 7,
2641 Painting = 9,
2642 Arrow = 10,
2643 Snowball = 11,
2644 LargeFireball = 12,
2645 SmallFireball = 13,
2646 ThrownEnderpearl = 14,
2647 EyeOfEnder = 15,
2648 ThrownPotion = 16,
2650 ItemFrame = 18,
2651 WitherSkull = 19,
2652 PrimedTnt = 20,
2653 FallingBlockEntity = 21,
2655 Husk = 23,
2656 SpectralArrow = 24,
2657 ShulkerBullet = 25,
2658 DragonFireball = 26,
2659 ZombieVillager = 27,
2660 SkeletonHorse = 28,
2661 ZombieHorse = 29,
2662 ArmorStand = 30,
2663 Donkey = 31,
2664 Mule = 32,
2665 EvokerFangs = 33,
2666 Evoker = 34,
2667 Vex = 35,
2668 Vindicator = 36,
2669 Illusioner = 37,
2671 Boat = 41,
2672 Minecart = 42,
2673 MinecartChest = 43,
2674 MinecartFurnace = 44,
2675 MinecartTNT = 45,
2676 MinecartHopper = 46,
2677 MinecartSpawner = 47,
2678 Creeper = 50,
2679 Skeleton = 51,
2680 Spider = 52,
2681 Giant = 53,
2682 Zombie = 54,
2683 Slime = 55,
2684 Ghast = 56,
2685 PigZombie = 57,
2686 EnderMan = 58,
2687 CaveSpider = 59,
2688 Silverfish = 60,
2689 Blaze = 61,
2690 MagmaCube = 62,
2691 EnderDragon = 63,
2692 WitherBoss = 64,
2693 Bat = 65,
2694 Witch = 66,
2695 Endermite = 67,
2696 Guardian = 68,
2697 Shulker = 69,
2698 Pig = 90,
2699 Sheep = 91,
2700 Cow = 92,
2701 Chicken = 93,
2702 Squid = 94,
2703 Wolf = 95,
2704 MushroomCow = 96,
2705 SnowGolem = 97,
2706 Ocelot = 98,
2707 IronGolem = 99,
2708 Horse = 100,
2709 Rabbit = 101,
2710 PolarBear = 102,
2711 Llama = 103,
2712 LlamaSpit = 104,
2713 Parrot = 105,
2714 Villager = 120,
2715 EndCrystal = 200,
2716#endif
2718 };
2719
2720#if PROTOCOL_VERSION < 458 /* < 1.14 */
2721 enum class ObjectEntityType
2722 {
2723 None = -1,
2724 Boat = 1,
2725 ItemEntity = 2,
2726 AreaEffectCloud = 3,
2727 PrimedTnt = 50,
2728 EndCrystal = 51,
2729 Arrow = 60,
2730 Snowball = 61,
2731 ThrownEgg = 62,
2732 LargeFireball = 63,
2733 SmallFireball = 64,
2734 ThrownEnderpearl = 65,
2735 WitherSkull = 66,
2736 ShulkerBullet = 67,
2737 LlamaSpit = 68,
2738 FallingBlockEntity = 70,
2739 ItemFrame = 71,
2740 EyeOfEnder = 72,
2741 ThrownPotion = 73,
2743 FireworkRocketEntity = 76,
2744 LeashFenceKnotEntity = 77,
2745 ArmorStand = 78,
2746 EvokerFangs = 79,
2747 FishingHook = 90,
2748 SpectralArrow = 91,
2749 DragonFireball = 93,
2750#if PROTOCOL_VERSION > 340 /* > 1.12.2 */
2751 ThrownTrident = 94,
2752#endif
2754 };
2755#endif
2756}
int GetDataTicksFrozen() const
Definition Entity.cpp:846
void OnSizeUpdated()
Definition Entity.cpp:2162
virtual EntityType GetType() const =0
bool GetOnGround() const
Definition Entity.cpp:993
ProtocolCraft::UUID uuid
Definition Entity.hpp:273
virtual double GetHeightImpl() const
Definition Entity.cpp:2230
void SetDataSilent(const bool data_silent)
Definition Entity.cpp:892
virtual ProtocolCraft::Json::Value Serialize() const
Definition Entity.cpp:1245
void SetDataPose(const Pose data_pose)
Definition Entity.cpp:905
std::map< EquipmentSlot, ProtocolCraft::Slot > equipments
Items on this entity.
Definition Entity.hpp:282
virtual void SetY(const double y_)
Definition Entity.cpp:1094
double GetZ() const
Definition Entity.cpp:951
virtual bool IsAbstractChestedHorse() const
Definition Entity.cpp:1350
virtual bool IsWaterAnimal() const
Definition Entity.cpp:1345
void SetEffects(const std::vector< EntityEffect > &effects_)
Definition Entity.cpp:1194
void SetDataAirSupplyId(const int data_air_supply_id)
Definition Entity.cpp:866
void SetDataSharedFlagsIdImpl(const char data_shared_flags_id)
Definition Entity.cpp:2187
Vector3< double > GetSpeed() const
Definition Entity.cpp:969
void SetUUID(const ProtocolCraft::UUID &uuid_)
Definition Entity.cpp:1053
std::map< EquipmentSlot, ProtocolCraft::Slot > GetEquipments() const
Definition Entity.cpp:999
Vector3< double > speed
Definition Entity.hpp:277
virtual bool IsAbstractArrow() const
Definition Entity.cpp:1301
virtual bool IsAbstractSkeleton() const
Definition Entity.cpp:1457
virtual bool IsAbstractPiglin() const
Definition Entity.cpp:1427
int GetEntityID() const
Definition Entity.cpp:921
virtual bool IsLocalPlayer() const
Definition Entity.cpp:1286
double GetHeight() const
Definition Entity.cpp:361
std::vector< EntityEffect > effects
Definition Entity.hpp:283
char GetDataSharedFlagsIdImpl() const
Definition Entity.cpp:2177
virtual bool IsRemotePlayer() const
Definition Entity.cpp:1291
virtual bool IsAbstractNautilus() const
Definition Entity.cpp:1555
bool GetDataSilent() const
Definition Entity.cpp:825
void SetDataPoseImpl(const Pose data_pose)
Definition Entity.cpp:2209
double GetSpeedX() const
Definition Entity.cpp:975
virtual bool IsAbstractBoat() const
Definition Entity.cpp:1511
virtual bool IsAbstractHurtingProjectile() const
Definition Entity.cpp:1355
ProtocolCraft::UUID GetUUID() const
Definition Entity.cpp:927
double GetY() const
Definition Entity.cpp:945
virtual bool IsAbstractSchoolingFish() const
Definition Entity.cpp:1340
void SetSpeed(const Vector3< double > &speed_)
Definition Entity.cpp:1158
virtual bool IsHangingEntity() const
Definition Entity.cpp:1394
bool GetAreRenderedFacesUpToDate() const
Definition Entity.cpp:1039
virtual void SetMetadataValue(const int index, const std::any &value)
Definition Entity.cpp:772
virtual bool IsSpellcasterIllager() const
Definition Entity.cpp:1365
virtual bool IsBlockAttachedEntity() const
Definition Entity.cpp:1504
static std::shared_ptr< Entity > CreateEntity(const EntityType type)
Definition Entity.cpp:1569
static constexpr int hierarchy_metadata_count
Definition Entity.hpp:62
virtual bool IsAbstractThrownPotion() const
Definition Entity.cpp:1439
AABB GetCollider() const
Definition Entity.cpp:349
static const std::array< std::string, metadata_count > metadata_names
Definition Entity.hpp:61
bool are_rendered_faces_up_to_date
Definition Entity.hpp:292
virtual double GetWidthImpl() const
Definition Entity.cpp:2225
virtual void SetZ(const double z_)
Definition Entity.cpp:1110
void SetEquipment(const EquipmentSlot slot, const ProtocolCraft::Slot &item)
Definition Entity.cpp:1188
std::vector< Renderer::Face > faces
Definition Entity.hpp:290
virtual bool IsLivingEntity() const
Definition Entity.cpp:1296
virtual bool IsChestBoat() const
Definition Entity.cpp:1531
double GetWidth() const
Definition Entity.cpp:355
virtual ~Entity()
Definition Entity.cpp:343
virtual bool IsPatrollingMonster() const
Definition Entity.cpp:1485
virtual bool IsProjectile() const
Definition Entity.cpp:1371
int GetDataAirSupplyId() const
Definition Entity.cpp:799
std::vector< EntityEffect > GetEffects() const
Definition Entity.cpp:1011
virtual bool IsAbstractMinecart() const
Definition Entity.cpp:1404
virtual bool IsAvatar() const
Definition Entity.cpp:1548
virtual bool IsDisplay() const
Definition Entity.cpp:1322
void SetSpeedY(const double speed_y_)
Definition Entity.cpp:1170
virtual bool IsAbstractMinecartContainer() const
Definition Entity.cpp:1416
void SetDataCustomName(const std::optional< ProtocolCraft::Chat > &data_custom_name)
Definition Entity.cpp:873
virtual bool IsAmbientCreature() const
Definition Entity.cpp:1311
virtual bool IsFireball() const
Definition Entity.cpp:1399
Pose GetDataPose() const
Definition Entity.cpp:838
std::shared_mutex entity_mutex
Definition Entity.hpp:270
void SetOnGround(const bool on_ground_)
Definition Entity.cpp:1182
virtual bool IsAnimal() const
Definition Entity.cpp:1306
std::vector< Renderer::Face > GetFaces(const bool reset_uptodate_status)
Definition Entity.cpp:1018
void SetSpeedX(const double speed_x_)
Definition Entity.cpp:1164
virtual bool IsAbstractFish() const
Definition Entity.cpp:1445
virtual bool IsAbstractCubeMob() const
Definition Entity.cpp:1562
virtual bool IsAgeableMob() const
Definition Entity.cpp:1474
virtual void SetX(const double x_)
Definition Entity.cpp:1078
virtual bool IsAbstractVillager() const
Definition Entity.cpp:1468
virtual void InitializeFaces()
Definition Entity.cpp:2080
virtual bool IsThrowableProjectile() const
Definition Entity.cpp:1491
virtual bool IsAbstractWindCharge() const
Definition Entity.cpp:1497
AABB GetColliderImpl() const
Definition Entity.cpp:2218
void SetDataSharedFlagsId(const char data_shared_flags_id)
Definition Entity.cpp:854
char GetDataSharedFlagsId() const
Definition Entity.cpp:787
virtual bool IsMob() const
Definition Entity.cpp:1360
virtual void SetYaw(const float yaw_)
Definition Entity.cpp:1126
virtual bool IsPathfinderMob() const
Definition Entity.cpp:1479
ProtocolCraft::Slot GetEquipment(const EquipmentSlot slot) const
Definition Entity.cpp:1005
void SetDataCustomNameVisible(const bool data_custom_name_visible)
Definition Entity.cpp:886
virtual bool IsVehicle() const
Definition Entity.cpp:1329
double GetSpeedY() const
Definition Entity.cpp:981
double GetSpeedZ() const
Definition Entity.cpp:987
virtual std::string GetName() const =0
Pose GetDataPoseImpl() const
Definition Entity.cpp:2204
virtual bool IsRaider() const
Definition Entity.cpp:1451
virtual void SetPitch(const float pitch_)
Definition Entity.cpp:1142
virtual bool IsThrowableItemProjectile() const
Definition Entity.cpp:1462
void SetEntityID(const int entity_id_)
Definition Entity.cpp:1047
virtual bool IsMonster() const
Definition Entity.cpp:1316
virtual bool IsTamableAnimal() const
Definition Entity.cpp:1335
void SetDataNoGravity(const bool data_no_gravity)
Definition Entity.cpp:898
bool GetDataCustomNameVisible() const
Definition Entity.cpp:819
virtual bool IsAbstractIllager() const
Definition Entity.cpp:1433
virtual bool IsAbstractHorse() const
Definition Entity.cpp:1384
std::map< std::string, std::any > metadata
Definition Entity.hpp:285
Vector3< double > position
Definition Entity.hpp:274
virtual bool IsAbstractCow() const
Definition Entity.cpp:1410
virtual bool IsAbstractChestBoat() const
Definition Entity.cpp:1516
void AddEffect(const EntityEffect &effect)
Definition Entity.cpp:1216
virtual bool IsChestRaft() const
Definition Entity.cpp:1536
virtual bool IsAbstractGolem() const
Definition Entity.cpp:1389
float GetYaw() const
Definition Entity.cpp:957
virtual bool IsAgeableWaterCreature() const
Definition Entity.cpp:1521
double GetX() const
Definition Entity.cpp:939
bool GetDataNoGravity() const
Definition Entity.cpp:831
void SetAreRenderedFacesUpToDate(const bool are_rendered_faces_up_to_date_)
Definition Entity.cpp:1237
Vector3< double > GetPosition() const
Definition Entity.cpp:933
void SetSpeedZ(const double speed_z_)
Definition Entity.cpp:1176
static constexpr int metadata_count
Definition Entity.hpp:55
std::vector< FaceDescriptor > face_descriptors
Definition Entity.hpp:289
std::optional< ProtocolCraft::Chat > GetDataCustomName() const
Definition Entity.cpp:806
virtual bool IsBoat() const
Definition Entity.cpp:1526
void LoadMetadataFromRawArray(const std::vector< unsigned char > &data)
Definition Entity.cpp:368
virtual bool IsRaft() const
Definition Entity.cpp:1541
virtual bool IsShoulderRidingEntity() const
Definition Entity.cpp:1421
float GetPitch() const
Definition Entity.cpp:963
void RemoveEffect(const EntityEffectType type)
Definition Entity.cpp:1200
virtual void SetPosition(const Vector3< double > &position_)
Definition Entity.cpp:1059
void SetDataTicksFrozen(const int data_ticks_frozen)
Definition Entity.cpp:913
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
Definition Json.hpp:45
EquipmentSlot
Definition Enums.hpp:282
EntityEffectType
Definition Enums.hpp:327
EntitySharedFlagsId
Definition Entity.hpp:40
std::array< unsigned char, 16 > UUID
std::chrono::steady_clock::time_point end
Definition Entity.hpp:36
unsigned char amplifier
Definition Entity.hpp:35
EntityEffectType type
Definition Entity.hpp:34