From 124ecd71c312e749417a7e105909a964ee7d20f9 Mon Sep 17 00:00:00 2001 From: Alexis Rossfelder Date: Wed, 15 May 2024 20:52:16 +0200 Subject: [PATCH] Added the Entity Metadata type * Modified the conf.py sphinx configuration file to ignore the custom fields used in the Entity Metadata type * Added the Entity Metadata type to the documentation * Added `scripts` to the .codeclimate.yml ignore list --- .codeclimate.yml | 5 + docs/api/types/entity_metadata.rst | 10 + docs/api/types/index.rst | 10 +- docs/api/types/nbt.rst | 3 + docs/conf.py | 18 + mcproto/types/entity/__init__.py | 300 + mcproto/types/entity/enums.py | 92 + mcproto/types/entity/generated.py | 11383 ++++++++++++++++ mcproto/types/entity/metadata.py | 459 + mcproto/types/entity/metadata_types.py | 670 + scripts/__init__.py | 0 scripts/entity_generator.py | 277 + scripts/entity_generator_data.py | 2878 ++++ tests/helpers.py | 1 + tests/mcproto/types/entity/__init__.py | 1 + tests/mcproto/types/entity/test_metadata.py | 90 + .../types/entity/test_metadata_types.py | 573 + 17 files changed, 16765 insertions(+), 5 deletions(-) create mode 100644 docs/api/types/entity_metadata.rst create mode 100644 mcproto/types/entity/__init__.py create mode 100644 mcproto/types/entity/enums.py create mode 100644 mcproto/types/entity/generated.py create mode 100644 mcproto/types/entity/metadata.py create mode 100644 mcproto/types/entity/metadata_types.py create mode 100644 scripts/__init__.py create mode 100644 scripts/entity_generator.py create mode 100644 scripts/entity_generator_data.py create mode 100644 tests/mcproto/types/entity/__init__.py create mode 100644 tests/mcproto/types/entity/test_metadata.py create mode 100644 tests/mcproto/types/entity/test_metadata_types.py diff --git a/.codeclimate.yml b/.codeclimate.yml index 6b2a2d79..ae90f11d 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -31,6 +31,11 @@ checks: return-statements: enabled: false + + exclude_patterns: - "tests/**" - ".github/**" + # The scripts directory is only there to provide quick scripts to generate things that are in the actual code + # They don't need testing as they are not meant to be used outside the developpment process + - "scripts/**" diff --git a/docs/api/types/entity_metadata.rst b/docs/api/types/entity_metadata.rst new file mode 100644 index 00000000..1e6918af --- /dev/null +++ b/docs/api/types/entity_metadata.rst @@ -0,0 +1,10 @@ +Entity Metadata +====================== + +This is the documentation for the NBT type used in Minecraft's network protocol. + + + + +.. automodule:: mcproto.types.entity + :no-undoc-members: diff --git a/docs/api/types/index.rst b/docs/api/types/index.rst index f17972a8..8fdfc67f 100644 --- a/docs/api/types/index.rst +++ b/docs/api/types/index.rst @@ -1,12 +1,12 @@ -.. api/types documentation master file +.. Types Documentation -======================= -API Types Documentation -======================= +Types Documentation +================================== -Welcome to the API Types documentation! This documentation provides information about the various types used in the API. +This folder contains the documentation for various types used in the project. .. toctree:: :maxdepth: 2 nbt.rst + entity_metadata.rst diff --git a/docs/api/types/nbt.rst b/docs/api/types/nbt.rst index e2a4398b..748d536f 100644 --- a/docs/api/types/nbt.rst +++ b/docs/api/types/nbt.rst @@ -1,6 +1,9 @@ NBT Format ========== +This is the documentation for the NBT type used in Minecraft's network protocol. + + .. automodule:: mcproto.types.nbt :members: :show-inheritance: diff --git a/docs/conf.py b/docs/conf.py index e14cbd82..8e959779 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,10 +12,13 @@ import sys import datetime from pathlib import Path +from typing import Any from packaging.version import parse as parse_version from typing_extensions import override +from mcproto.types.entity.metadata import _ProxyEntityMetadataEntry, _DefaultEntityMetadataEntry + if sys.version_info >= (3, 11): from tomllib import load as toml_parse else: @@ -117,6 +120,21 @@ "exclude-members": "__dict__,__weakref__", } + +def autodoc_skip_member(app: Any, what: str, name: str, obj: Any, skip: bool, options: Any) -> bool: + """Skip EntityMetadataEntry class fields as they are already documented in the docstring.""" + if isinstance(obj, type) and ( + issubclass(obj, _ProxyEntityMetadataEntry) or issubclass(obj, _DefaultEntityMetadataEntry) + ): + return True + return skip + + +def setup(app: Any) -> None: + """Set up the Sphinx app.""" + app.connect("autodoc-skip-member", autodoc_skip_member) + + # -- sphinx.ext.autosectionlabel --------------- # Automatically generate section labels: diff --git a/mcproto/types/entity/__init__.py b/mcproto/types/entity/__init__.py new file mode 100644 index 00000000..f5a2f4e0 --- /dev/null +++ b/mcproto/types/entity/__init__.py @@ -0,0 +1,300 @@ +from mcproto.types.entity.generated import ( + EntityEM, + InteractionEM, + DisplayEM, + BlockDisplayEM, + ItemDisplayEM, + TextDisplayEM, + ThrownItemProjectileEM, + ThrownEggEM, + ThrownEnderPearlEM, + ThrownExperienceBottleEM, + ThrownPotionEM, + ThrownSnowballEM, + EyeOfEnderEM, + FallingBlockEM, + AreaEffectCloudEM, + FishingHookEM, + AbstractArrowEM, + ArrowEM, + SpectralArrowEM, + ThrownTridentEM, + AbstractVehicleEM, + BoatEM, + ChestBoatEM, + AbstractMinecartEM, + MinecartEM, + AbstractMinecartContainerEM, + MinecartHopperEM, + MinecartChestEM, + MinecartFurnaceEM, + MinecartTNTEM, + MinecartSpawnerEM, + MinecartCommandBlockEM, + EndCrystalEM, + DragonFireballEM, + SmallFireballEM, + FireballEM, + WitherSkullEM, + FireworkRocketEM, + ItemFrameEM, + GlowingItemFrameEM, + PaintingEM, + ItemEntityEM, + LivingEntityEM, + PlayerEM, + ArmorStandEM, + MobEM, + AmbientCreatureEM, + BatEM, + PathfinderMobEM, + WaterAnimalEM, + SquidEM, + DolphinEM, + AbstractFishEM, + CodEM, + PufferFishEM, + SalmonEM, + TropicalFishEM, + TadpoleEM, + AgeableMobEM, + AnimalEM, + SnifferEM, + AbstractHorseEM, + HorseEM, + ZombieHorseEM, + SkeletonHorseEM, + CamelEM, + ChestedHorseEM, + DonkeyEM, + LlamaEM, + TraderLlamaEM, + MuleEM, + AxolotlEM, + BeeEM, + FoxEM, + FrogEM, + OcelotEM, + PandaEM, + PigEM, + RabbitEM, + TurtleEM, + PolarBearEM, + ChickenEM, + CowEM, + MooshroomEM, + HoglinEM, + SheepEM, + StriderEM, + GoatEM, + TameableAnimalEM, + CatEM, + WolfEM, + ParrotEM, + AbstractVillagerEM, + VillagerEM, + WanderingTraderEM, + AbstractGolemEM, + IronGolemEM, + SnowGolemEM, + ShulkerEM, + MonsterEM, + BasePiglinEM, + PiglinEM, + PiglinBruteEM, + BlazeEM, + CreeperEM, + EndermiteEM, + GiantEM, + GuardianEM, + ElderGuardianEM, + SilverfishEM, + RaiderEM, + AbstractIllagerEM, + VindicatorEM, + PillagerEM, + SpellcasterIllagerEM, + EvokerEM, + IllusionerEM, + RavagerEM, + WitchEM, + EvokerFangsEM, + VexEM, + AbstractSkeletonEM, + SkeletonEM, + WitherSkeletonEM, + StrayEM, + SpiderEM, + WardenEM, + WitherEM, + ZoglinEM, + ZombieEM, + ZombieVillagerEM, + HuskEM, + DrownedEM, + ZombifiedPiglinEM, + EndermanEM, + EnderDragonEM, + FlyingEM, + GhastEM, + PhantomEM, + SlimeEM, + LlamaSpitEM, + PrimedTntEM, +) + +###################################################################### +# This file is automatically generated by the entity generator script. +# You can modify it by changing what you want in the script. +###################################################################### + +from mcproto.types.entity.enums import Direction, Pose, SnifferState, DragonPhase + +__all__ = [ + "EntityEM", + "InteractionEM", + "DisplayEM", + "BlockDisplayEM", + "ItemDisplayEM", + "TextDisplayEM", + "ThrownItemProjectileEM", + "ThrownEggEM", + "ThrownEnderPearlEM", + "ThrownExperienceBottleEM", + "ThrownPotionEM", + "ThrownSnowballEM", + "EyeOfEnderEM", + "FallingBlockEM", + "AreaEffectCloudEM", + "FishingHookEM", + "AbstractArrowEM", + "ArrowEM", + "SpectralArrowEM", + "ThrownTridentEM", + "AbstractVehicleEM", + "BoatEM", + "ChestBoatEM", + "AbstractMinecartEM", + "MinecartEM", + "AbstractMinecartContainerEM", + "MinecartHopperEM", + "MinecartChestEM", + "MinecartFurnaceEM", + "MinecartTNTEM", + "MinecartSpawnerEM", + "MinecartCommandBlockEM", + "EndCrystalEM", + "DragonFireballEM", + "SmallFireballEM", + "FireballEM", + "WitherSkullEM", + "FireworkRocketEM", + "ItemFrameEM", + "GlowingItemFrameEM", + "PaintingEM", + "ItemEntityEM", + "LivingEntityEM", + "PlayerEM", + "ArmorStandEM", + "MobEM", + "AmbientCreatureEM", + "BatEM", + "PathfinderMobEM", + "WaterAnimalEM", + "SquidEM", + "DolphinEM", + "AbstractFishEM", + "CodEM", + "PufferFishEM", + "SalmonEM", + "TropicalFishEM", + "TadpoleEM", + "AgeableMobEM", + "AnimalEM", + "SnifferEM", + "AbstractHorseEM", + "HorseEM", + "ZombieHorseEM", + "SkeletonHorseEM", + "CamelEM", + "ChestedHorseEM", + "DonkeyEM", + "LlamaEM", + "TraderLlamaEM", + "MuleEM", + "AxolotlEM", + "BeeEM", + "FoxEM", + "FrogEM", + "OcelotEM", + "PandaEM", + "PigEM", + "RabbitEM", + "TurtleEM", + "PolarBearEM", + "ChickenEM", + "CowEM", + "MooshroomEM", + "HoglinEM", + "SheepEM", + "StriderEM", + "GoatEM", + "TameableAnimalEM", + "CatEM", + "WolfEM", + "ParrotEM", + "AbstractVillagerEM", + "VillagerEM", + "WanderingTraderEM", + "AbstractGolemEM", + "IronGolemEM", + "SnowGolemEM", + "ShulkerEM", + "MonsterEM", + "BasePiglinEM", + "PiglinEM", + "PiglinBruteEM", + "BlazeEM", + "CreeperEM", + "EndermiteEM", + "GiantEM", + "GuardianEM", + "ElderGuardianEM", + "SilverfishEM", + "RaiderEM", + "AbstractIllagerEM", + "VindicatorEM", + "PillagerEM", + "SpellcasterIllagerEM", + "EvokerEM", + "IllusionerEM", + "RavagerEM", + "WitchEM", + "EvokerFangsEM", + "VexEM", + "AbstractSkeletonEM", + "SkeletonEM", + "WitherSkeletonEM", + "StrayEM", + "SpiderEM", + "WardenEM", + "WitherEM", + "ZoglinEM", + "ZombieEM", + "ZombieVillagerEM", + "HuskEM", + "DrownedEM", + "ZombifiedPiglinEM", + "EndermanEM", + "EnderDragonEM", + "FlyingEM", + "GhastEM", + "PhantomEM", + "SlimeEM", + "LlamaSpitEM", + "PrimedTntEM", + "Direction", + "Pose", + "SnifferState", + "DragonPhase", +] diff --git a/mcproto/types/entity/enums.py b/mcproto/types/entity/enums.py new file mode 100644 index 00000000..4d1f5500 --- /dev/null +++ b/mcproto/types/entity/enums.py @@ -0,0 +1,92 @@ +from enum import IntEnum + + +class Direction(IntEnum): + """Represents a direction in the world.""" + + DOWN = 0 + """Towards the negative y-axis. (-y)""" + UP = 1 + """Towards the positive y-axis. (+y)""" + NORTH = 2 + """Towards the negative z-axis. (-z)""" + SOUTH = 3 + """Towards the positive z-axis. (+z)""" + WEST = 4 + """Towards the negative x-axis. (-x)""" + EAST = 5 + """Towards the positive x-axis. (+x)""" + + +class Pose(IntEnum): + """Represents a pose of an entity.""" + + STANDING = 0 + """The entity is standing. (default)""" + FALL_FLYING = 1 + """The entity is falling or flying.""" + SLEEPING = 2 + """The entity is sleeping. (e.g. in a bed)""" + SWIMMING = 3 + """The entity is swimming.""" + SPIN_ATTACK = 4 + """The entity is performing a spin attack (with a riptide trident).""" + SNEAKING = 5 + """The entity is sneaking.""" + LONG_JUMPING = 6 + """The entity is long jumping.""" + DYING = 7 + """The entity is dying""" + CROAKING = 8 + """The entity is croaking. (a frog)""" + USING_TONGUE = 9 + """The entity is using its tongue. (a frog)""" + SITTING = 10 + """The entity is sitting. (e.g. a pet)""" + ROARING = 11 + """The entity is roaring. (a warden)""" + SNIFFING = 12 + """The entity is sniffing.""" + EMERGING = 13 + """The entity is emerging from the ground. (a warden)""" + DIGGING = 14 + """The entity is digging.""" + + +class SnifferState(IntEnum): + """Represents the state of a sniffer.""" + + IDLING = 0 + FEELING_HAPPY = 1 + SCENTING = 2 + SNIFFING = 3 + SEARCHING = 4 + DIGGING = 5 + RISING = 6 + + +class DragonPhase(IntEnum): + """Represents the state the ender dragon is in.""" + + CIRCLING = 0 + """The dragon is circling around the portal.""" + STRAFING = 1 + """The dragon is strafing the player.""" + FLYING_TO_PORTAL = 2 + """The dragon is flying to the portal.""" + LANDING_ON_PORTAL = 3 + """The dragon is landing on the portal. (perching)""" + TAKING_OFF_FROM_PORTAL = 4 + """The dragon is taking off from the portal.""" + LANDED_BREATH_ATTACK = 5 + """The dragon has landed and is performing a breath attack.""" + LANDED_LOOKING_FOR_PLAYER = 6 + """The dragon has landed and is looking for the player.""" + LANDED_ROAR = 7 + """The dragon has landed and is roaring.""" + CHARGING_PLAYER = 8 + """The dragon is charging at the player.""" + FLYING_TO_PORTAL_TO_DIE = 9 + """The dragon is flying to the portal to die.""" + HOVERING_NO_AI = 10 + """The dragon is hovering in place with no AI. (default)""" diff --git a/mcproto/types/entity/generated.py b/mcproto/types/entity/generated.py new file mode 100644 index 00000000..84f35fa0 --- /dev/null +++ b/mcproto/types/entity/generated.py @@ -0,0 +1,11383 @@ +from __future__ import annotations +from typing import ClassVar, Any + +###################################################################### +# This file is automatically generated by the entity generator script. +# You can modify it by changing what you want in the script. +###################################################################### + +from mcproto.types.entity.enums import Direction, Pose, SnifferState, DragonPhase + +__all__ = [ + "EntityEM", + "InteractionEM", + "DisplayEM", + "BlockDisplayEM", + "ItemDisplayEM", + "TextDisplayEM", + "ThrownItemProjectileEM", + "ThrownEggEM", + "ThrownEnderPearlEM", + "ThrownExperienceBottleEM", + "ThrownPotionEM", + "ThrownSnowballEM", + "EyeOfEnderEM", + "FallingBlockEM", + "AreaEffectCloudEM", + "FishingHookEM", + "AbstractArrowEM", + "ArrowEM", + "SpectralArrowEM", + "ThrownTridentEM", + "AbstractVehicleEM", + "BoatEM", + "ChestBoatEM", + "AbstractMinecartEM", + "MinecartEM", + "AbstractMinecartContainerEM", + "MinecartHopperEM", + "MinecartChestEM", + "MinecartFurnaceEM", + "MinecartTNTEM", + "MinecartSpawnerEM", + "MinecartCommandBlockEM", + "EndCrystalEM", + "DragonFireballEM", + "SmallFireballEM", + "FireballEM", + "WitherSkullEM", + "FireworkRocketEM", + "ItemFrameEM", + "GlowingItemFrameEM", + "PaintingEM", + "ItemEntityEM", + "LivingEntityEM", + "PlayerEM", + "ArmorStandEM", + "MobEM", + "AmbientCreatureEM", + "BatEM", + "PathfinderMobEM", + "WaterAnimalEM", + "SquidEM", + "DolphinEM", + "AbstractFishEM", + "CodEM", + "PufferFishEM", + "SalmonEM", + "TropicalFishEM", + "TadpoleEM", + "AgeableMobEM", + "AnimalEM", + "SnifferEM", + "AbstractHorseEM", + "HorseEM", + "ZombieHorseEM", + "SkeletonHorseEM", + "CamelEM", + "ChestedHorseEM", + "DonkeyEM", + "LlamaEM", + "TraderLlamaEM", + "MuleEM", + "AxolotlEM", + "BeeEM", + "FoxEM", + "FrogEM", + "OcelotEM", + "PandaEM", + "PigEM", + "RabbitEM", + "TurtleEM", + "PolarBearEM", + "ChickenEM", + "CowEM", + "MooshroomEM", + "HoglinEM", + "SheepEM", + "StriderEM", + "GoatEM", + "TameableAnimalEM", + "CatEM", + "WolfEM", + "ParrotEM", + "AbstractVillagerEM", + "VillagerEM", + "WanderingTraderEM", + "AbstractGolemEM", + "IronGolemEM", + "SnowGolemEM", + "ShulkerEM", + "MonsterEM", + "BasePiglinEM", + "PiglinEM", + "PiglinBruteEM", + "BlazeEM", + "CreeperEM", + "EndermiteEM", + "GiantEM", + "GuardianEM", + "ElderGuardianEM", + "SilverfishEM", + "RaiderEM", + "AbstractIllagerEM", + "VindicatorEM", + "PillagerEM", + "SpellcasterIllagerEM", + "EvokerEM", + "IllusionerEM", + "RavagerEM", + "WitchEM", + "EvokerFangsEM", + "VexEM", + "AbstractSkeletonEM", + "SkeletonEM", + "WitherSkeletonEM", + "StrayEM", + "SpiderEM", + "WardenEM", + "WitherEM", + "ZoglinEM", + "ZombieEM", + "ZombieVillagerEM", + "HuskEM", + "DrownedEM", + "ZombifiedPiglinEM", + "EndermanEM", + "EnderDragonEM", + "FlyingEM", + "GhastEM", + "PhantomEM", + "SlimeEM", + "LlamaSpitEM", + "PrimedTntEM", + "Direction", + "Pose", + "SnifferState", + "DragonPhase", +] + + +from mcproto.types.entity.metadata import ( + proxy, + entry, + EntityMetadata, +) +from mcproto.types.entity.metadata_types import ( + DragonPhaseEME, + PoseEME, + SnifferStateEME, + Masked, + PositionEME, + RotationEME, + OptBlockStateEME, + CatVariantEME, + SlotEME, + ByteEME, + VillagerDataEME, + FloatEME, + ParticleEME, + QuaternionEME, + PaintingVariantEME, + Vector3EME, + NBTagEME, + OptVarIntEME, + DirectionEME, + StringEME, + OptPositionEME, + VarLongEME, + OptUUIDEME, + BooleanEME, + VarIntEME, + BlockStateEME, + TextComponentEME, + FrogVariantEME, +) +from mcproto.types.slot import Slot +from mcproto.types.chat import TextComponent +from mcproto.types.nbt import NBTag, EndNBT +from mcproto.types.vec3 import Position +from mcproto.types.uuid import UUID + + +class EntityEM(EntityMetadata): + """Base for all Entity classes. + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _entity_flags: ClassVar[int] = entry(ByteEME, 0) + is_on_fire: bool = proxy(_entity_flags, Masked, mask=0x1) + is_crouching: bool = proxy(_entity_flags, Masked, mask=0x2) + is_riding: bool = proxy(_entity_flags, Masked, mask=0x4) + is_sprinting: bool = proxy(_entity_flags, Masked, mask=0x8) + is_swimming: bool = proxy(_entity_flags, Masked, mask=0x10) + is_invisible: bool = proxy(_entity_flags, Masked, mask=0x20) + is_glowing: bool = proxy(_entity_flags, Masked, mask=0x40) + is_flying: bool = proxy(_entity_flags, Masked, mask=0x80) + air: int = entry(VarIntEME, 300) + custom_name: str = entry(StringEME, "") + is_custom_name_visible: bool = entry(BooleanEME, False) + is_silent: bool = entry(BooleanEME, False) + no_gravity: bool = entry(BooleanEME, False) + pose: Pose = entry(PoseEME, Pose.STANDING) + ticks_frozen: int = entry(VarIntEME, 0) + + __slots__ = () + + +class InteractionEM(EntityEM): + """Entity that can be interacted with. + + :param width: The width of the entity. + :type width: float, optional, default: 1.0 + :param height: The height of the entity. + :type height: float, optional, default: 1.0 + :param responsive: Whether the entity can be interacted with/attached + :type responsive: bool, optional, default: False + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + width: float = entry(FloatEME, 1.0) + height: float = entry(FloatEME, 1.0) + responsive: bool = entry(BooleanEME, False) + + __slots__ = () + + +class DisplayEM(EntityEM): + """Entity that are used to render something on the client. + + https://minecraft.wiki/w/Display + + :param interpolation_delay: Delay before starting interpolation. + If 0, interpolation starts immediately.(doesn't exist in newest snapshot) + :type interpolation_delay: int, optional, default: 0 + :param interpolation_translation_duration: Transformation interpolation duration. + :type interpolation_translation_duration: int, optional, default: 0 + :param interpolation_rotation_duration: Rotation interpolation duration. + :type interpolation_rotation_duration: int, optional, default: 0 + :param translation: Translation vector + :type translation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param scale: Scaling vector + :type scale: tuple[float, float, float], optional, default: (1.0, 1.0, 1.0) + :param rotation_left: See :attr:`rotation_right` + :type rotation_left: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param rotation_right: Initial rotation. This tag corresponds to the right-singular vector matrix after the + matrix singular value decomposition. + :type rotation_right: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param billboard_constraint: Billboard Constraints (0 = FIXED, 1 = VERTICAL, 2 = HORIZONTAL, 3 = CENTER) + Controls if this entity should pivot to face player when rendered. + :type billboard_constraint: int, optional, default: 0 + :param brightness_override: Brightness override (blockLight << 4 | skyLight << 20). By default the brightness + value is calculated from the light level of the block the entity is in. + :type brightness_override: int, optional, default: -1 + :param view_range: View range + :type view_range: float, optional, default: 1.0 + :param shadow_radius: Shadow radius. Value is treated as 64 when higher than 64. + If less than or equal to 0, the entity has no shadow. Interpolated + :type shadow_radius: float, optional, default: 0.0 + :param shadow_strength: Shadow strength. Interpolated + :type shadow_strength: float, optional, default: 0.0 + :param width: The maximum width of the entity. Rendering culling bounding box spans horizontally + `width/2` from entity position, and the part beyond will be culled. If set to 0, no culling on + both vertical and horizontal directions. + :type width: float, optional, default: 0.0 + :param height: The maximum height of the entity. Rendering culling bounding box spans vertically + `y` to `y+height`, and the part beyond will be culled. If set to 0, no culling on both + vertical and horizontal directions. + :type height: float, optional, default: 0.0 + :param glow_color_override: Overrides the glow border color. If 0, uses the color of the team that the display + entity is in. + :type glow_color_override: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + interpolation_delay: int = entry(VarIntEME, 0) + interpolation_translation_duration: int = entry(VarIntEME, 0) + interpolation_rotation_duration: int = entry(VarIntEME, 0) + translation: tuple[float, float, float] = entry(Vector3EME, (0.0, 0.0, 0.0)) + scale: tuple[float, float, float] = entry(Vector3EME, (1.0, 1.0, 1.0)) + rotation_left: tuple[float, float, float, float] = entry(QuaternionEME, (0.0, 0.0, 0.0, 1.0)) + rotation_right: tuple[float, float, float, float] = entry(QuaternionEME, (0.0, 0.0, 0.0, 1.0)) + billboard_constraint: int = entry(ByteEME, 0) + brightness_override: int = entry(VarIntEME, -1) + view_range: float = entry(FloatEME, 1.0) + shadow_radius: float = entry(FloatEME, 0.0) + shadow_strength: float = entry(FloatEME, 0.0) + width: float = entry(FloatEME, 0.0) + height: float = entry(FloatEME, 0.0) + glow_color_override: int = entry(VarIntEME, 0) + + __slots__ = () + + +class BlockDisplayEM(DisplayEM): + """Entity that are used to render a block on the client as a Display entity. + + https://minecraft.wiki/w/Display#Block_Displays + + :param block: The block state to display. Default is air. + :type block: int, optional, default: 0 + + Inherited from :class:`DisplayEM`: + + :param interpolation_delay: Delay before starting interpolation. + If 0, interpolation starts immediately.(doesn't exist in newest snapshot) + :type interpolation_delay: int, optional, default: 0 + :param interpolation_translation_duration: Transformation interpolation duration. + :type interpolation_translation_duration: int, optional, default: 0 + :param interpolation_rotation_duration: Rotation interpolation duration. + :type interpolation_rotation_duration: int, optional, default: 0 + :param translation: Translation vector + :type translation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param scale: Scaling vector + :type scale: tuple[float, float, float], optional, default: (1.0, 1.0, 1.0) + :param rotation_left: See :attr:`rotation_right` + :type rotation_left: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param rotation_right: Initial rotation. This tag corresponds to the right-singular vector matrix after the + matrix singular value decomposition. + :type rotation_right: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param billboard_constraint: Billboard Constraints (0 = FIXED, 1 = VERTICAL, 2 = HORIZONTAL, 3 = CENTER) + Controls if this entity should pivot to face player when rendered. + :type billboard_constraint: int, optional, default: 0 + :param brightness_override: Brightness override (blockLight << 4 | skyLight << 20). By default the brightness + value is calculated from the light level of the block the entity is in. + :type brightness_override: int, optional, default: -1 + :param view_range: View range + :type view_range: float, optional, default: 1.0 + :param shadow_radius: Shadow radius. Value is treated as 64 when higher than 64. + If less than or equal to 0, the entity has no shadow. Interpolated + :type shadow_radius: float, optional, default: 0.0 + :param shadow_strength: Shadow strength. Interpolated + :type shadow_strength: float, optional, default: 0.0 + :param width: The maximum width of the entity. Rendering culling bounding box spans horizontally + `width/2` from entity position, and the part beyond will be culled. If set to 0, no culling on + both vertical and horizontal directions. + :type width: float, optional, default: 0.0 + :param height: The maximum height of the entity. Rendering culling bounding box spans vertically + `y` to `y+height`, and the part beyond will be culled. If set to 0, no culling on both + vertical and horizontal directions. + :type height: float, optional, default: 0.0 + :param glow_color_override: Overrides the glow border color. If 0, uses the color of the team that the display + entity is in. + :type glow_color_override: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + block: int = entry(BlockStateEME, 0) + + __slots__ = () + + +class ItemDisplayEM(DisplayEM): + """Entity that are used to render an item on the client as a Display entity. + + https://minecraft.wiki/w/Display#Item_Displays + + :param item: The item to display. Default is an empty slot. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + :param display_type: Display type: (NONE, THIRD_PERSON_LEFT_HAND, THIRD_PERSON_RIGHT_HAND, + FIRST_PERSON_LEFT_HAND, FIRST_PERSON_RIGHT_HAND, HEAD, GUI, GROUND, FIXED). + :type display_type: int, optional, default: 0 + + Inherited from :class:`DisplayEM`: + + :param interpolation_delay: Delay before starting interpolation. + If 0, interpolation starts immediately.(doesn't exist in newest snapshot) + :type interpolation_delay: int, optional, default: 0 + :param interpolation_translation_duration: Transformation interpolation duration. + :type interpolation_translation_duration: int, optional, default: 0 + :param interpolation_rotation_duration: Rotation interpolation duration. + :type interpolation_rotation_duration: int, optional, default: 0 + :param translation: Translation vector + :type translation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param scale: Scaling vector + :type scale: tuple[float, float, float], optional, default: (1.0, 1.0, 1.0) + :param rotation_left: See :attr:`rotation_right` + :type rotation_left: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param rotation_right: Initial rotation. This tag corresponds to the right-singular vector matrix after the + matrix singular value decomposition. + :type rotation_right: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param billboard_constraint: Billboard Constraints (0 = FIXED, 1 = VERTICAL, 2 = HORIZONTAL, 3 = CENTER) + Controls if this entity should pivot to face player when rendered. + :type billboard_constraint: int, optional, default: 0 + :param brightness_override: Brightness override (blockLight << 4 | skyLight << 20). By default the brightness + value is calculated from the light level of the block the entity is in. + :type brightness_override: int, optional, default: -1 + :param view_range: View range + :type view_range: float, optional, default: 1.0 + :param shadow_radius: Shadow radius. Value is treated as 64 when higher than 64. + If less than or equal to 0, the entity has no shadow. Interpolated + :type shadow_radius: float, optional, default: 0.0 + :param shadow_strength: Shadow strength. Interpolated + :type shadow_strength: float, optional, default: 0.0 + :param width: The maximum width of the entity. Rendering culling bounding box spans horizontally + `width/2` from entity position, and the part beyond will be culled. If set to 0, no culling on + both vertical and horizontal directions. + :type width: float, optional, default: 0.0 + :param height: The maximum height of the entity. Rendering culling bounding box spans vertically + `y` to `y+height`, and the part beyond will be culled. If set to 0, no culling on both + vertical and horizontal directions. + :type height: float, optional, default: 0.0 + :param glow_color_override: Overrides the glow border color. If 0, uses the color of the team that the display + entity is in. + :type glow_color_override: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + display_type: int = entry(ByteEME, 0) + + __slots__ = () + + +class TextDisplayEM(DisplayEM): + """Entity that are used to render text on the client as a Display entity. + + https://minecraft.wiki/w/Display#Text_Displays + + :param text: The text to display. Default is an empty text component. + :type text: :class:`TextComponent`, optional, default: :attr:`TextComponent("")` + :param line_width: : Maximum line width used to split lines (note: new line can also + be added with \\n characters). + :type line_width: int, optional, default: 200 + :param background_color: Background color of the text. Default is 0x40000000. + :type background_color: int, optional, default: 1073741824 + :param has_shadow: Whether the text is displayed with shadow. (this affects :attr:`_display_flags`) + :type has_shadow: bool, optional + :param is_see_through: Whether the text is displayed as see-through. (this affects :attr:`_display_flags`) + :type is_see_through: bool, optional + :param use_default_background: Whether to use the default background color for the text + display. (this affects :attr:`_display_flags`) + :type use_default_background: bool, optional + :param align_left: Whether the text is aligned to the left. + Has priority over right (see also :attr:`align_right`) (this affects :attr:`_display_flags`) + :type align_left: bool, optional + :param align_right: Whether the text is aligned to the right. + Set both to false for center alignment. (this affects :attr:`_display_flags`) + :type align_right: bool, optional + + Inherited from :class:`DisplayEM`: + + :param interpolation_delay: Delay before starting interpolation. + If 0, interpolation starts immediately.(doesn't exist in newest snapshot) + :type interpolation_delay: int, optional, default: 0 + :param interpolation_translation_duration: Transformation interpolation duration. + :type interpolation_translation_duration: int, optional, default: 0 + :param interpolation_rotation_duration: Rotation interpolation duration. + :type interpolation_rotation_duration: int, optional, default: 0 + :param translation: Translation vector + :type translation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param scale: Scaling vector + :type scale: tuple[float, float, float], optional, default: (1.0, 1.0, 1.0) + :param rotation_left: See :attr:`rotation_right` + :type rotation_left: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param rotation_right: Initial rotation. This tag corresponds to the right-singular vector matrix after the + matrix singular value decomposition. + :type rotation_right: tuple[float, float, float, float], optional, default: (0.0, 0.0, 0.0, 1.0) + :param billboard_constraint: Billboard Constraints (0 = FIXED, 1 = VERTICAL, 2 = HORIZONTAL, 3 = CENTER) + Controls if this entity should pivot to face player when rendered. + :type billboard_constraint: int, optional, default: 0 + :param brightness_override: Brightness override (blockLight << 4 | skyLight << 20). By default the brightness + value is calculated from the light level of the block the entity is in. + :type brightness_override: int, optional, default: -1 + :param view_range: View range + :type view_range: float, optional, default: 1.0 + :param shadow_radius: Shadow radius. Value is treated as 64 when higher than 64. + If less than or equal to 0, the entity has no shadow. Interpolated + :type shadow_radius: float, optional, default: 0.0 + :param shadow_strength: Shadow strength. Interpolated + :type shadow_strength: float, optional, default: 0.0 + :param width: The maximum width of the entity. Rendering culling bounding box spans horizontally + `width/2` from entity position, and the part beyond will be culled. If set to 0, no culling on + both vertical and horizontal directions. + :type width: float, optional, default: 0.0 + :param height: The maximum height of the entity. Rendering culling bounding box spans vertically + `y` to `y+height`, and the part beyond will be culled. If set to 0, no culling on both + vertical and horizontal directions. + :type height: float, optional, default: 0.0 + :param glow_color_override: Overrides the glow border color. If 0, uses the color of the team that the display + entity is in. + :type glow_color_override: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + text: TextComponent = entry(TextComponentEME, TextComponent("")) + line_width: int = entry(VarIntEME, 200) + background_color: int = entry(VarIntEME, 1073741824) + _display_flags: ClassVar[int] = entry(ByteEME, 0) + has_shadow: bool = proxy(_display_flags, Masked, mask=0x1) + is_see_through: bool = proxy(_display_flags, Masked, mask=0x2) + use_default_background: bool = proxy(_display_flags, Masked, mask=0x4) + align_left: bool = proxy(_display_flags, Masked, mask=0x8) + align_right: bool = proxy(_display_flags, Masked, mask=0x10) + + __slots__ = () + + +class ThrownItemProjectileEM(EntityEM): + """Entity that represents a thrown item projectile. + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + + __slots__ = () + + +class ThrownEggEM(ThrownItemProjectileEM): + """Entity that represents a thrown egg projectile. + + Inherited from :class:`ThrownItemProjectileEM`: + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=True, item_id=NotImplemented, item_count=1)) + + __slots__ = () + + +class ThrownEnderPearlEM(ThrownItemProjectileEM): + """Entity that represents a thrown ender pearl projectile. + + Inherited from :class:`ThrownItemProjectileEM`: + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=True, item_id=NotImplemented, item_count=1)) + + __slots__ = () + + +class ThrownExperienceBottleEM(ThrownItemProjectileEM): + """Entity that represents a thrown experience bottle projectile. + + Inherited from :class:`ThrownItemProjectileEM`: + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=True, item_id=NotImplemented, item_count=1)) + + __slots__ = () + + +class ThrownPotionEM(ThrownItemProjectileEM): + """Entity that represents a thrown potion projectile. + + Inherited from :class:`ThrownItemProjectileEM`: + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=True, item_id=NotImplemented, item_count=1)) + + __slots__ = () + + +class ThrownSnowballEM(ThrownItemProjectileEM): + """Entity that represents a thrown snowball projectile. + + Inherited from :class:`ThrownItemProjectileEM`: + + :param item: The item that the projectile represents + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=True, item_id=NotImplemented, item_count=1)) + + __slots__ = () + + +class EyeOfEnderEM(EntityEM): + """Entity that represents an eye of ender. + + :param item: The item that the entity represents (usually an ender eye) + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + + __slots__ = () + + +class FallingBlockEM(EntityEM): + """Entity that represents a falling block. + + :param position: The spawn position of the falling block + :type position: tuple[int, int, int], optional, default: (0, 0, 0) + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + position: tuple[int, int, int] = entry(PositionEME, (0, 0, 0)) + + __slots__ = () + + +class AreaEffectCloudEM(EntityEM): + """Entity that represents an area effect cloud. + + :param radius: The radius of the area effect cloud. + :type radius: float, optional, default: 0.5 + :param color: Color of the cloud's particle effect. Only applicable for mob spell particles. + :type color: int, optional, default: 0 + :param single_point_effect: Whether to ignore the radius and show the effect as a single point, not an area. + :type single_point_effect: bool, optional, default: False + :param effect: The particle effect of the area effect cloud. + :type effect: tuple[int, Any], optional, default: (0, None) + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + radius: float = entry(FloatEME, 0.5) + color: int = entry(VarIntEME, 0) + single_point_effect: bool = entry(BooleanEME, False) + effect: tuple[int, Any] = entry(ParticleEME, (0, None)) + + __slots__ = () + + +class FishingHookEM(EntityEM): + """Entity that represents a fishing hook. + + :param hooked_entity_id: The ID of the hooked entity plus one, or 0 if there is no hooked entity. + :type hooked_entity_id: int, optional, default: 0 + :param is_catchable: Whether the fishing hook is catchable. + :type is_catchable: bool, optional, default: False + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + hooked_entity_id: int = entry(VarIntEME, 0) + is_catchable: bool = entry(BooleanEME, False) + + __slots__ = () + + +class AbstractArrowEM(EntityEM): + """Entity that represents an abstract arrow. + + :param is_critical: Whether the arrow is critical. (this affects :attr:`_arrow_flags`) + :type is_critical: bool, optional + :param is_noclip: Whether the arrow is noclip (used by loyalty tridents when + returning). (this affects :attr:`_arrow_flags`) + :type is_noclip: bool, optional + :param piercing_level: The piercing level of the arrow. + :type piercing_level: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _arrow_flags: ClassVar[int] = entry(ByteEME, 0) + is_critical: bool = proxy(_arrow_flags, Masked, mask=0x1) + is_noclip: bool = proxy(_arrow_flags, Masked, mask=0x2) + piercing_level: int = entry(ByteEME, 0) + + __slots__ = () + + +class ArrowEM(AbstractArrowEM): + """Entity that represents an arrow. + + :param color: Color of the arrow's particles. Set to -1 for no particles. + :type color: int, optional, default: -1 + + Inherited from :class:`AbstractArrowEM`: + + :param is_critical: Whether the arrow is critical. (this affects :attr:`_arrow_flags`) + :type is_critical: bool, optional + :param is_noclip: Whether the arrow is noclip (used by loyalty tridents when + returning). (this affects :attr:`_arrow_flags`) + :type is_noclip: bool, optional + :param piercing_level: The piercing level of the arrow. + :type piercing_level: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + color: int = entry(VarIntEME, -1) + + __slots__ = () + + +class SpectralArrowEM(AbstractArrowEM): + """Entity that represents a spectral arrow. + + Inherited from :class:`AbstractArrowEM`: + + :param is_critical: Whether the arrow is critical. (this affects :attr:`_arrow_flags`) + :type is_critical: bool, optional + :param is_noclip: Whether the arrow is noclip (used by loyalty tridents when + returning). (this affects :attr:`_arrow_flags`) + :type is_noclip: bool, optional + :param piercing_level: The piercing level of the arrow. + :type piercing_level: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class ThrownTridentEM(AbstractArrowEM): + """Entity that represents a thrown trident. + + :param loyalty_level: The loyalty level of the thrown trident (enchantment). + :type loyalty_level: int, optional, default: 0 + :param has_enchantment_glint: Whether the thrown trident has an enchantment glint. + :type has_enchantment_glint: bool, optional, default: False + + Inherited from :class:`AbstractArrowEM`: + + :param is_critical: Whether the arrow is critical. (this affects :attr:`_arrow_flags`) + :type is_critical: bool, optional + :param is_noclip: Whether the arrow is noclip (used by loyalty tridents when + returning). (this affects :attr:`_arrow_flags`) + :type is_noclip: bool, optional + :param piercing_level: The piercing level of the arrow. + :type piercing_level: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + loyalty_level: int = entry(VarIntEME, 0) + has_enchantment_glint: bool = entry(BooleanEME, False) + + __slots__ = () + + +class AbstractVehicleEM(EntityEM): + """Entity that represents an abstract vehicle. + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + shaking_power: int = entry(VarIntEME, 0) + shaking_direction: int = entry(VarIntEME, 1) + shaking_multiplier: float = entry(FloatEME, 0.0) + + __slots__ = () + + +class BoatEM(AbstractVehicleEM): + """Entity that represents a boat. + + :param boat_type: The type of the boat. (0 = oak, 1 = spruce, 2 = birch, 3 = jungle, + 4 = acacia, 5 = dark oak) + :type boat_type: int, optional, default: 0 + :param is_left_paddle_turning: Whether the left paddle of the boat is turning. + :type is_left_paddle_turning: bool, optional, default: False + :param is_right_paddle_turning: Whether the right paddle of the boat is turning. + :type is_right_paddle_turning: bool, optional, default: False + :param splash_timer: The splash timer of the boat. + :type splash_timer: int, optional, default: 0 + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + boat_type: int = entry(VarIntEME, 0) + is_left_paddle_turning: bool = entry(BooleanEME, False) + is_right_paddle_turning: bool = entry(BooleanEME, False) + splash_timer: int = entry(VarIntEME, 0) + + __slots__ = () + + +class ChestBoatEM(BoatEM): + """Entity that represents a chest boat. + + Inherited from :class:`BoatEM`: + + :param boat_type: The type of the boat. (0 = oak, 1 = spruce, 2 = birch, 3 = jungle, + 4 = acacia, 5 = dark oak) + :type boat_type: int, optional, default: 0 + :param is_left_paddle_turning: Whether the left paddle of the boat is turning. + :type is_left_paddle_turning: bool, optional, default: False + :param is_right_paddle_turning: Whether the right paddle of the boat is turning. + :type is_right_paddle_turning: bool, optional, default: False + :param splash_timer: The splash timer of the boat. + :type splash_timer: int, optional, default: 0 + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class AbstractMinecartEM(AbstractVehicleEM): + """Entity that represents an abstract minecart. + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + custom_block_id_and_damage: int = entry(VarIntEME, 0) + custom_block_y_position: int = entry(VarIntEME, 6) + show_custom_block: bool = entry(BooleanEME, False) + + __slots__ = () + + +class MinecartEM(AbstractMinecartEM): + """Entity that represents a minecart. + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class AbstractMinecartContainerEM(AbstractMinecartEM): + """Entity that represents an abstract minecart container. + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MinecartHopperEM(AbstractMinecartContainerEM): + """Entity that represents a minecart hopper. + + Inherited from :class:`AbstractMinecartContainerEM`: + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MinecartChestEM(AbstractMinecartContainerEM): + """Entity that represents a minecart chest. + + Inherited from :class:`AbstractMinecartContainerEM`: + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MinecartFurnaceEM(AbstractMinecartEM): + """Entity that represents a minecart furnace. + + :param has_fuel: Whether the furnace minecart has fuel. + :type has_fuel: bool, optional, default: False + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + has_fuel: bool = entry(BooleanEME, False) + + __slots__ = () + + +class MinecartTNTEM(AbstractMinecartEM): + """Entity that represents a minecart TNT. + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MinecartSpawnerEM(AbstractMinecartEM): + """Entity that represents a minecart spawner. + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MinecartCommandBlockEM(AbstractMinecartEM): + """Entity that represents a minecart command block. + + :param command: The command stored in the command block. + :type command: str, optional, default: "" + :param last_output: The last output from the command block. + :type last_output: :class:`TextComponent`, optional, default: :attr:`TextComponent("")` + + Inherited from :class:`AbstractMinecartEM`: + + :param custom_block_id_and_damage: The custom block ID and damage of the minecart. + :type custom_block_id_and_damage: int, optional, default: 0 + :param custom_block_y_position: The custom block Y position (in 16ths of a block) of the minecart. + :type custom_block_y_position: int, optional, default: 6 + :param show_custom_block: Whether to show the custom block of the minecart. + :type show_custom_block: bool, optional, default: False + + Inherited from :class:`AbstractVehicleEM`: + + :param shaking_power: The shaking power of the vehicle. + :type shaking_power: int, optional, default: 0 + :param shaking_direction: The shaking direction of the vehicle. + :type shaking_direction: int, optional, default: 1 + :param shaking_multiplier: The shaking multiplier of the vehicle. + :type shaking_multiplier: float, optional, default: 0.0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + command: str = entry(StringEME, "") + last_output: TextComponent = entry(TextComponentEME, TextComponent("")) + + __slots__ = () + + +class EndCrystalEM(EntityEM): + """Entity that represents an end crystal. + + :param beam_target: The position of the beam target. + :type beam_target: tuple[int, int, int]|None, optional, default: None + :param show_bottom: Whether the bottom of the end crystal is shown. + :type show_bottom: bool, optional, default: True + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + beam_target: tuple[int, int, int] | None = entry(OptPositionEME, None) + show_bottom: bool = entry(BooleanEME, True) + + __slots__ = () + + +class DragonFireballEM(EntityEM): + """Entity that represents a dragon fireball. + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SmallFireballEM(EntityEM): + """Entity that represents a small fireball. + + :param item: The item representing the small fireball. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + + __slots__ = () + + +class FireballEM(EntityEM): + """Entity that represents a fireball. + + :param item: The item representing the fireball. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + + __slots__ = () + + +class WitherSkullEM(EntityEM): + """Entity that represents a wither skull. + + :param is_invulnerable: Whether the wither skull is invulnerable. + :type is_invulnerable: bool, optional, default: False + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_invulnerable: bool = entry(BooleanEME, False) + + __slots__ = () + + +class FireworkRocketEM(EntityEM): + """Entity representing a firework rocket. + + :param firework_info: The information about the firework. + :type firework_info: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + :param shooter_entity_id: The entity ID of the entity that used the firework (for elytra boosting). + :type shooter_entity_id: int|None, optional, default: None + :param shot_at_angle: Whether the firework rocket was shot at an angle (from a crossbow). + :type shot_at_angle: bool, optional, default: False + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + firework_info: Slot = entry(SlotEME, Slot(present=False)) + shooter_entity_id: int | None = entry(OptVarIntEME, None) + shot_at_angle: bool = entry(BooleanEME, False) + + __slots__ = () + + +class ItemFrameEM(EntityEM): + """Entity representing an item frame. + + :param item: The item in the item frame. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + :param rotation: The rotation of the item frame. + :type rotation: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + rotation: int = entry(VarIntEME, 0) + + __slots__ = () + + +class GlowingItemFrameEM(ItemFrameEM): + """Entity representing a glowing item frame. + + Inherited from :class:`ItemFrameEM`: + + :param item: The item in the item frame. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + :param rotation: The rotation of the item frame. + :type rotation: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class PaintingEM(EntityEM): + """Entity representing a painting. + + :param painting_type: The type of painting variant. + :type painting_type: int, optional, default: 0 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + painting_type: int = entry(PaintingVariantEME, 0) + + __slots__ = () + + +class ItemEntityEM(EntityEM): + """Entity representing an item. + + :param item: The item in the item entity. + :type item: :class:`Slot`, optional, default: :attr:`Slot(present=False)` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + item: Slot = entry(SlotEME, Slot(present=False)) + + __slots__ = () + + +class LivingEntityEM(EntityEM): + """Entity that represents a living entity. + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _hand_states: ClassVar[int] = entry(ByteEME, 0) + is_hand_active: bool = proxy(_hand_states, Masked, mask=0x1) + active_hand: int = proxy(_hand_states, Masked, mask=0x2) + is_riptide_spin_attack: bool = proxy(_hand_states, Masked, mask=0x4) + health: float = entry(FloatEME, 1.0) + potion_effect_color: int = entry(VarIntEME, 0) + is_potion_effect_ambient: bool = entry(BooleanEME, False) + num_arrows: int = entry(VarIntEME, 0) + num_bee_stingers: int = entry(VarIntEME, 0) + sleeping_bed_location: Position | None = entry(OptPositionEME, None) + + __slots__ = () + + +class PlayerEM(LivingEntityEM): + """Player entity. + + :param additional_hearts: Additional hearts of the player. + :type additional_hearts: float, optional, default: 0.0 + :param score: The score of the player. + :type score: int, optional, default: 0 + :param cape_enabled: Whether the cape is enabled. (this affects :attr:`_displayed_skin_parts`) + :type cape_enabled: bool, optional + :param jacket_enabled: Whether the jacket is enabled. (this affects :attr:`_displayed_skin_parts`) + :type jacket_enabled: bool, optional + :param left_sleeve_enabled: Whether the left sleeve is enabled. (this affects :attr:`_displayed_skin_parts`) + :type left_sleeve_enabled: bool, optional + :param right_sleeve_enabled: Whether the right sleeve is enabled. (this affects :attr:`_displayed_skin_parts`) + :type right_sleeve_enabled: bool, optional + :param left_pants_leg_enabled: Whether the left pants leg is enabled. (this affects :attr:`_displayed_skin_parts`) + :type left_pants_leg_enabled: bool, optional + :param right_pants_leg_enabled: Whether the right pants leg is enabled. + (this affects :attr:`_displayed_skin_parts`) + :type right_pants_leg_enabled: bool, optional + :param hat_enabled: Whether the hat is enabled. (this affects :attr:`_displayed_skin_parts`) + :type hat_enabled: bool, optional + :param main_hand: The main hand of the player (0: Left, 1: Right). + :type main_hand: int, optional, default: 1 + :param left_shoulder_entity_data: Left shoulder entity data (for occupying parrot). + :type left_shoulder_entity_data: :class:`NBTag`, optional, default: :attr:`EndNBT()` + :param right_shoulder_entity_data: Right shoulder entity data (for occupying parrot). + :type right_shoulder_entity_data: :class:`NBTag`, optional, default: :attr:`EndNBT()` + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + additional_hearts: float = entry(FloatEME, 0.0) + score: int = entry(VarIntEME, 0) + _displayed_skin_parts: ClassVar[int] = entry(ByteEME, 0) + cape_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x1) + jacket_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x2) + left_sleeve_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x4) + right_sleeve_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x8) + left_pants_leg_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x10) + right_pants_leg_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x20) + hat_enabled: bool = proxy(_displayed_skin_parts, Masked, mask=0x40) + main_hand: int = entry(ByteEME, 1) + left_shoulder_entity_data: NBTag = entry(NBTagEME, EndNBT()) + right_shoulder_entity_data: NBTag = entry(NBTagEME, EndNBT()) + + __slots__ = () + + +class ArmorStandEM(LivingEntityEM): + """Entity representing an armor stand. + + :param is_small: Whether the armor stand is small. (this affects :attr:`_armorstand_flags`) + :type is_small: bool, optional + :param has_arms: Whether the armor stand has arms. (this affects :attr:`_armorstand_flags`) + :type has_arms: bool, optional + :param has_no_base_plate: Whether the armor stand has no base plate. (this affects :attr:`_armorstand_flags`) + :type has_no_base_plate: bool, optional + :param is_marker: Whether the armor stand is a marker. (this affects :attr:`_armorstand_flags`) + :type is_marker: bool, optional + :param head_rotation: Rotation of the armor stand's head. + :type head_rotation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param body_rotation: Rotation of the armor stand's body. + :type body_rotation: tuple[float, float, float], optional, default: (0.0, 0.0, 0.0) + :param left_arm_rotation: Rotation of the armor stand's left arm. + :type left_arm_rotation: tuple[float, float, float], optional, default: (-10.0, 0.0, -10.0) + :param right_arm_rotation: Rotation of the armor stand's right arm. + :type right_arm_rotation: tuple[float, float, float], optional, default: (-15.0, 0.0, 10.0) + :param left_leg_rotation: Rotation of the armor stand's left leg. + :type left_leg_rotation: tuple[float, float, float], optional, default: (-1.0, 0.0, -1.0) + :param right_leg_rotation: Rotation of the armor stand's right leg. + :type right_leg_rotation: tuple[float, float, float], optional, default: (1.0, 0.0, 1.0) + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _armorstand_flags: ClassVar[int] = entry(ByteEME, 0) + is_small: bool = proxy(_armorstand_flags, Masked, mask=0x1) + has_arms: bool = proxy(_armorstand_flags, Masked, mask=0x4) + has_no_base_plate: bool = proxy(_armorstand_flags, Masked, mask=0x8) + is_marker: bool = proxy(_armorstand_flags, Masked, mask=0x10) + head_rotation: tuple[float, float, float] = entry(RotationEME, (0.0, 0.0, 0.0)) + body_rotation: tuple[float, float, float] = entry(RotationEME, (0.0, 0.0, 0.0)) + left_arm_rotation: tuple[float, float, float] = entry(RotationEME, (-10.0, 0.0, -10.0)) + right_arm_rotation: tuple[float, float, float] = entry(RotationEME, (-15.0, 0.0, 10.0)) + left_leg_rotation: tuple[float, float, float] = entry(RotationEME, (-1.0, 0.0, -1.0)) + right_leg_rotation: tuple[float, float, float] = entry(RotationEME, (1.0, 0.0, 1.0)) + + __slots__ = () + + +class MobEM(LivingEntityEM): + """Generic mobile entity. + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _mob_flags: ClassVar[int] = entry(ByteEME, 0) + no_ai: bool = proxy(_mob_flags, Masked, mask=0x1) + is_left_handed: bool = proxy(_mob_flags, Masked, mask=0x2) + is_aggressive: bool = proxy(_mob_flags, Masked, mask=0x4) + + __slots__ = () + + +class AmbientCreatureEM(MobEM): + """Entity that represents an ambient creature. + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class BatEM(AmbientCreatureEM): + """Entity that represents a bat. + + :param is_hanging: Whether the bat is hanging upside down. (this affects :attr:`_bat_flags`) + :type is_hanging: bool, optional + + Inherited from :class:`AmbientCreatureEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _bat_flags: ClassVar[int] = entry(ByteEME, 0) + is_hanging: bool = proxy(_bat_flags, Masked, mask=0x1) + + __slots__ = () + + +class PathfinderMobEM(MobEM): + """Entity that represents a pathfinder mob. + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class WaterAnimalEM(PathfinderMobEM): + """Entity that represents a water-dwelling animal. + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SquidEM(WaterAnimalEM): + """Entity that represents a squid. + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class DolphinEM(WaterAnimalEM): + """Entity that represents a dolphin. + + :param treasure_position: The position of the dolphin's treasure. + :type treasure_position: tuple[int, int, int], optional, default: (0, 0, 0) + :param has_fish: Whether the dolphin has fish. + :type has_fish: bool, optional, default: False + :param moisture_level: The moisture level of the dolphin. + :type moisture_level: int, optional, default: 2400 + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + treasure_position: tuple[int, int, int] = entry(PositionEME, (0, 0, 0)) + has_fish: bool = entry(BooleanEME, False) + moisture_level: int = entry(VarIntEME, 2400) + + __slots__ = () + + +class AbstractFishEM(WaterAnimalEM): + """Entity that represents an abstract fish. + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + from_bucket: bool = entry(BooleanEME, False) + + __slots__ = () + + +class CodEM(AbstractFishEM): + """Entity that represents a cod fish. + + Inherited from :class:`AbstractFishEM`: + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class PufferFishEM(AbstractFishEM): + """Entity that represents a puffer fish. + + :param puff_state: The state of puffing of the puffer fish, varies from 0 to 2. + :type puff_state: int, optional, default: 0 + + Inherited from :class:`AbstractFishEM`: + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + puff_state: int = entry(VarIntEME, 0) + + __slots__ = () + + +class SalmonEM(AbstractFishEM): + """Entity that represents a salmon fish. + + Inherited from :class:`AbstractFishEM`: + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class TropicalFishEM(AbstractFishEM): + """Entity that represents a tropical fish. + + :param variant: The variant of the tropical fish. + :type variant: int, optional, default: 0 + + Inherited from :class:`AbstractFishEM`: + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: int = entry(VarIntEME, 0) + + __slots__ = () + + +class TadpoleEM(AbstractFishEM): + """Entity that represents a tadpole. + + Inherited from :class:`AbstractFishEM`: + + :param from_bucket: Whether the fish is from a bucket. + :type from_bucket: bool, optional, default: False + + Inherited from :class:`WaterAnimalEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class AgeableMobEM(PathfinderMobEM): + """Entity that represents an ageable mob. + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_baby: bool = entry(BooleanEME, False) + + __slots__ = () + + +class AnimalEM(AgeableMobEM): + """Entity that represents an animal. + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SnifferEM(AnimalEM): + """Entity that represents a sniffer. + + :param sniffer_state: The state of the sniffer. + :type sniffer_state: :class:`SnifferState`, optional, default: :attr:`SnifferState.IDLING` + :param drop_seed_at_tick: The tick at which the sniffer will drop seed. + :type drop_seed_at_tick: int, optional, default: 0 + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + sniffer_state: SnifferState = entry(SnifferStateEME, SnifferState.IDLING) + drop_seed_at_tick: int = entry(VarIntEME, 0) + + __slots__ = () + + +class AbstractHorseEM(AnimalEM): + """Entity that represents an abstract horse. + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _horse_flags: ClassVar[int] = entry(ByteEME, 0) + is_tame: bool = proxy(_horse_flags, Masked, mask=0x2) + is_saddled: bool = proxy(_horse_flags, Masked, mask=0x4) + has_bred: bool = proxy(_horse_flags, Masked, mask=0x8) + is_eating: bool = proxy(_horse_flags, Masked, mask=0x10) + is_rearing: bool = proxy(_horse_flags, Masked, mask=0x20) + is_mouth_open: bool = proxy(_horse_flags, Masked, mask=0x40) + + __slots__ = () + + +class HorseEM(AbstractHorseEM): + """Entity that represents a horse. + + :param variant: The variant of the horse representing its color and style. + :type variant: int, optional, default: 0 + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: int = entry(VarIntEME, 0) + + __slots__ = () + + +class ZombieHorseEM(AbstractHorseEM): + """Entity that represents a zombie horse. + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SkeletonHorseEM(AbstractHorseEM): + """Entity that represents a skeleton horse. + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class CamelEM(AbstractHorseEM): + """Entity that represents a camel. + + :param is_dashing: Whether the camel is dashing. + :type is_dashing: bool, optional, default: False + :param last_pose_change_tick: The tick at which the camel's pose was last changed. + :type last_pose_change_tick: int, optional, default: 0 + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_dashing: bool = entry(BooleanEME, False) + last_pose_change_tick: int = entry(VarLongEME, 0) + + __slots__ = () + + +class ChestedHorseEM(AbstractHorseEM): + """Entity that represents a horse with a chest. + + :param has_chest: Whether the horse has a chest. + :type has_chest: bool, optional, default: False + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + has_chest: bool = entry(BooleanEME, False) + + __slots__ = () + + +class DonkeyEM(ChestedHorseEM): + """Entity that represents a donkey. + + Inherited from :class:`ChestedHorseEM`: + + :param has_chest: Whether the horse has a chest. + :type has_chest: bool, optional, default: False + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class LlamaEM(ChestedHorseEM): + """Entity that represents a llama. + + :param strength: The strength of the llama, representing the number of columns of 3 slots in its + inventory once a chest is equipped. + :type strength: int, optional, default: 0 + :param carpet_color: The color of the carpet equipped on the llama, represented as a dye color. -1 if no + carpet is equipped. + :type carpet_color: int, optional, default: -1 + :param variant: The variant of the llama. + :type variant: int, optional, default: 0 + + Inherited from :class:`ChestedHorseEM`: + + :param has_chest: Whether the horse has a chest. + :type has_chest: bool, optional, default: False + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + strength: int = entry(VarIntEME, 0) + carpet_color: int = entry(VarIntEME, -1) + variant: int = entry(VarIntEME, 0) + + __slots__ = () + + +class TraderLlamaEM(LlamaEM): + """Entity that represents a trader llama. + + Inherited from :class:`LlamaEM`: + + :param strength: The strength of the llama, representing the number of columns of 3 slots in its + inventory once a chest is equipped. + :type strength: int, optional, default: 0 + :param carpet_color: The color of the carpet equipped on the llama, represented as a dye color. -1 if no + carpet is equipped. + :type carpet_color: int, optional, default: -1 + :param variant: The variant of the llama. + :type variant: int, optional, default: 0 + + Inherited from :class:`ChestedHorseEM`: + + :param has_chest: Whether the horse has a chest. + :type has_chest: bool, optional, default: False + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MuleEM(ChestedHorseEM): + """Entity that represents a mule. + + Inherited from :class:`ChestedHorseEM`: + + :param has_chest: Whether the horse has a chest. + :type has_chest: bool, optional, default: False + + Inherited from :class:`AbstractHorseEM`: + + :param is_tame: Whether the horse is tame. (this affects :attr:`_horse_flags`) + :type is_tame: bool, optional + :param is_saddled: Whether the horse is saddled. (this affects :attr:`_horse_flags`) + :type is_saddled: bool, optional + :param has_bred: Whether the horse has bred. (this affects :attr:`_horse_flags`) + :type has_bred: bool, optional + :param is_eating: Whether the horse is eating. (this affects :attr:`_horse_flags`) + :type is_eating: bool, optional + :param is_rearing: Whether the horse is rearing (on hind legs). (this affects :attr:`_horse_flags`) + :type is_rearing: bool, optional + :param is_mouth_open: Whether the horse's mouth is open. (this affects :attr:`_horse_flags`) + :type is_mouth_open: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class AxolotlEM(AnimalEM): + """Entity that represents an axolotl. + + :param variant: The variant of the axolotl. + :type variant: int, optional, default: 0 + :param is_playing_dead: Whether the axolotl is currently playing dead. + :type is_playing_dead: bool, optional, default: False + :param is_spawned_from_bucket: Whether the axolotl was spawned from a bucket. + :type is_spawned_from_bucket: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: int = entry(VarIntEME, 0) + is_playing_dead: bool = entry(BooleanEME, False) + is_spawned_from_bucket: bool = entry(BooleanEME, False) + + __slots__ = () + + +class BeeEM(AnimalEM): + """Entity that represents a bee. + + :param is_angry: Whether the bee is angry. (this affects :attr:`_bee_flags`) + :type is_angry: bool, optional + :param has_stung: Whether the bee has stung. (this affects :attr:`_bee_flags`) + :type has_stung: bool, optional + :param has_nectar: Whether the bee has nectar. (this affects :attr:`_bee_flags`) + :type has_nectar: bool, optional + :param anger_time: The time in ticks for which the bee remains angry. + :type anger_time: int, optional, default: 0 + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _bee_flags: ClassVar[int] = entry(ByteEME, 0) + is_angry: bool = proxy(_bee_flags, Masked, mask=0x2) + has_stung: bool = proxy(_bee_flags, Masked, mask=0x4) + has_nectar: bool = proxy(_bee_flags, Masked, mask=0x8) + anger_time: int = entry(VarIntEME, 0) + + __slots__ = () + + +class FoxEM(AnimalEM): + """Entity that represents a fox. + + :param fox_type: The type of the fox. + :type fox_type: int, optional, default: 0 + :param is_sitting: Whether the fox is sitting. (this affects :attr:`_fox_flags`) + :type is_sitting: bool, optional + :param is_fox_crouching: Whether the fox is crouching. (this affects :attr:`_fox_flags`) + :type is_fox_crouching: bool, optional + :param is_interested: Whether the fox is interested. (this affects :attr:`_fox_flags`) + :type is_interested: bool, optional + :param is_pouncing: Whether the fox is pouncing. (this affects :attr:`_fox_flags`) + :type is_pouncing: bool, optional + :param is_sleeping: Whether the fox is sleeping. (this affects :attr:`_fox_flags`) + :type is_sleeping: bool, optional + :param is_faceplanted: Whether the fox is faceplanted. (this affects :attr:`_fox_flags`) + :type is_faceplanted: bool, optional + :param is_defending: Whether the fox is defending. (this affects :attr:`_fox_flags`) + :type is_defending: bool, optional + :param trusted_uuid: The UUID of the player that the fox trusts. + :type trusted_uuid: :class:`UUID|None`, optional, default: :attr:`None` + :param trusted_uuid_2: Another player that the fox trusts. + :type trusted_uuid_2: :class:`UUID|None`, optional, default: :attr:`None` + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + fox_type: int = entry(VarIntEME, 0) + _fox_flags: ClassVar[int] = entry(ByteEME, 0) + is_sitting: bool = proxy(_fox_flags, Masked, mask=0x1) + is_fox_crouching: bool = proxy(_fox_flags, Masked, mask=0x4) + is_interested: bool = proxy(_fox_flags, Masked, mask=0x8) + is_pouncing: bool = proxy(_fox_flags, Masked, mask=0x10) + is_sleeping: bool = proxy(_fox_flags, Masked, mask=0x20) + is_faceplanted: bool = proxy(_fox_flags, Masked, mask=0x40) + is_defending: bool = proxy(_fox_flags, Masked, mask=0x80) + trusted_uuid: UUID | None = entry(OptUUIDEME, None) + trusted_uuid_2: UUID | None = entry(OptUUIDEME, None) + + __slots__ = () + + +class FrogEM(AnimalEM): + """Entity that represents a frog. + + :param variant: The variant of the frog. + :type variant: int, optional, default: 0 + :param tongue_target: The target of the frog's tongue. + :type tongue_target: int, optional, default: 0 + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: int = entry(FrogVariantEME, 0) + tongue_target: int = entry(OptVarIntEME, 0) + + __slots__ = () + + +class OcelotEM(AnimalEM): + """Entity that represents an ocelot. + + :param is_trusting: Whether the ocelot is trusting. + :type is_trusting: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_trusting: bool = entry(BooleanEME, False) + + __slots__ = () + + +class PandaEM(AnimalEM): + """Entity that represents a panda. + + :param breed_timer: The breed timer of the panda. + :type breed_timer: int, optional, default: 0 + :param sneeze_timer: The sneeze timer of the panda. + :type sneeze_timer: int, optional, default: 0 + :param eat_timer: The eat timer of the panda. + :type eat_timer: int, optional, default: 0 + :param main_gene: The main gene of the panda. + :type main_gene: int, optional, default: 0 + :param hidden_gene: The hidden gene of the panda. + :type hidden_gene: int, optional, default: 0 + :param is_sneezing: Whether the panda is sneezing. (this affects :attr:`_panda_flags`) + :type is_sneezing: bool, optional + :param is_rolling: Whether the panda is rolling. (this affects :attr:`_panda_flags`) + :type is_rolling: bool, optional + :param is_sitting: Whether the panda is sitting. (this affects :attr:`_panda_flags`) + :type is_sitting: bool, optional + :param is_on_back: Whether the panda is on its back. (this affects :attr:`_panda_flags`) + :type is_on_back: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + breed_timer: int = entry(VarIntEME, 0) + sneeze_timer: int = entry(VarIntEME, 0) + eat_timer: int = entry(VarIntEME, 0) + main_gene: int = entry(ByteEME, 0) + hidden_gene: int = entry(ByteEME, 0) + _panda_flags: ClassVar[int] = entry(ByteEME, 0) + is_sneezing: bool = proxy(_panda_flags, Masked, mask=0x2) + is_rolling: bool = proxy(_panda_flags, Masked, mask=0x4) + is_sitting: bool = proxy(_panda_flags, Masked, mask=0x8) + is_on_back: bool = proxy(_panda_flags, Masked, mask=0x10) + + __slots__ = () + + +class PigEM(AnimalEM): + """Entity that represents a pig. + + :param has_saddle: Whether the pig has a saddle. + :type has_saddle: bool, optional, default: False + :param boost_time: Total time to 'boost' with a carrot on a stick for. + :type boost_time: int, optional, default: 0 + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + has_saddle: bool = entry(BooleanEME, False) + boost_time: int = entry(VarIntEME, 0) + + __slots__ = () + + +class RabbitEM(AnimalEM): + """Entity that represents a rabbit. + + :param rabbit_type: The type of the rabbit. + :type rabbit_type: int, optional, default: 0 + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + rabbit_type: int = entry(VarIntEME, 0) + + __slots__ = () + + +class TurtleEM(AnimalEM): + """Entity that represents a turtle. + + :param home_pos: The home position of the turtle. + :type home_pos: tuple[int, int, int], optional, default: (0, 0, 0) + :param has_egg: Whether the turtle has an egg. + :type has_egg: bool, optional, default: False + :param is_laying_egg: Whether the turtle is laying an egg. + :type is_laying_egg: bool, optional, default: False + :param travel_pos: The travel position of the turtle. + :type travel_pos: tuple[int, int, int], optional, default: (0, 0, 0) + :param is_going_home: Whether the turtle is going home. + :type is_going_home: bool, optional, default: False + :param is_traveling: Whether the turtle is traveling. + :type is_traveling: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + home_pos: tuple[int, int, int] = entry(PositionEME, (0, 0, 0)) + has_egg: bool = entry(BooleanEME, False) + is_laying_egg: bool = entry(BooleanEME, False) + travel_pos: tuple[int, int, int] = entry(PositionEME, (0, 0, 0)) + is_going_home: bool = entry(BooleanEME, False) + is_traveling: bool = entry(BooleanEME, False) + + __slots__ = () + + +class PolarBearEM(AnimalEM): + """Entity that represents a polar bear. + + :param is_standing_up: Whether the polar bear is standing up. + :type is_standing_up: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_standing_up: bool = entry(BooleanEME, False) + + __slots__ = () + + +class ChickenEM(AnimalEM): + """Entity representing a chicken. + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class CowEM(AnimalEM): + """Entity representing a cow. + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class MooshroomEM(CowEM): + """Entity representing a mooshroom. + + :param variant: The variant of the mooshroom: 'red' or 'brown'. + :type variant: str, optional, default: "red" + + Inherited from :class:`CowEM`: + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: str = entry(StringEME, "red") + + __slots__ = () + + +class HoglinEM(AnimalEM): + """Entity representing a hoglin. + + :param immune_to_zombification: Whether the hoglin is immune to zombification. + :type immune_to_zombification: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + immune_to_zombification: bool = entry(BooleanEME, False) + + __slots__ = () + + +class SheepEM(AnimalEM): + """Entity representing a sheep. + + :param color_id: The color of the sheep. (this affects :attr:`_sheep_data`) + :type color_id: int, optional + :param is_sheared: Whether the sheep is sheared. (this affects :attr:`_sheep_data`) + :type is_sheared: bool, optional + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _sheep_data: ClassVar[int] = entry(ByteEME, 0) + color_id: int = proxy(_sheep_data, Masked, mask=0xF) + is_sheared: bool = proxy(_sheep_data, Masked, mask=0x10) + + __slots__ = () + + +class StriderEM(AnimalEM): + """Entity representing a strider. + + :param boost_duration: Total time to 'boost' with warped fungus on a stick. + :type boost_duration: int, optional, default: 0 + :param is_shaking: Whether the strider is shaking. (True unless riding a vehicle or on or in a block + tagged with strider_warm_blocks (default: lava)) + :type is_shaking: bool, optional, default: False + :param has_saddle: Whether the strider has a saddle. + :type has_saddle: bool, optional, default: False + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + boost_duration: int = entry(VarIntEME, 0) + is_shaking: bool = entry(BooleanEME, False) + has_saddle: bool = entry(BooleanEME, False) + + __slots__ = () + + +class GoatEM(AnimalEM): + """Entity representing a goat. + + :param is_screaming_goat: Whether the goat is a screaming goat. + :type is_screaming_goat: bool, optional, default: False + :param has_left_horn: Whether the goat has a left horn. + :type has_left_horn: bool, optional, default: True + :param has_right_horn: Whether the goat has a right horn. + :type has_right_horn: bool, optional, default: True + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_screaming_goat: bool = entry(BooleanEME, False) + has_left_horn: bool = entry(BooleanEME, True) + has_right_horn: bool = entry(BooleanEME, True) + + __slots__ = () + + +class TameableAnimalEM(AnimalEM): + """Entity representing a tameable animal. + + :param is_sitting: Whether the animal is sitting. (this affects :attr:`_tameable_data`) + :type is_sitting: bool, optional + :param is_tamed: Whether the animal is tamed. (this affects :attr:`_tameable_data`) + :type is_tamed: bool, optional + :param owner_uuid: The UUID of the owner, if the animal is tamed. + :type owner_uuid: :class:`UUID|None`, optional, default: :attr:`None` + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _tameable_data: ClassVar[int] = entry(ByteEME, 0) + is_sitting: bool = proxy(_tameable_data, Masked, mask=0x1) + is_tamed: bool = proxy(_tameable_data, Masked, mask=0x4) + owner_uuid: UUID | None = entry(OptUUIDEME, None) + + __slots__ = () + + +class CatEM(TameableAnimalEM): + """Entity representing a cat. + + :param cat_variant: The variant of the cat. + :type cat_variant: int, optional, default: 0 + :param is_lying: Whether the cat is lying down. + :type is_lying: bool, optional, default: False + :param is_relaxed: Unknown use. When true, the cat's head goes slightly upwards. + :type is_relaxed: bool, optional, default: False + :param collar_color: The color of the cat's collar, using dye values. + :type collar_color: int, optional, default: 14 + + Inherited from :class:`TameableAnimalEM`: + + :param is_sitting: Whether the animal is sitting. (this affects :attr:`_tameable_data`) + :type is_sitting: bool, optional + :param is_tamed: Whether the animal is tamed. (this affects :attr:`_tameable_data`) + :type is_tamed: bool, optional + :param owner_uuid: The UUID of the owner, if the animal is tamed. + :type owner_uuid: :class:`UUID|None`, optional, default: :attr:`None` + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + cat_variant: int = entry(CatVariantEME, 0) + is_lying: bool = entry(BooleanEME, False) + is_relaxed: bool = entry(BooleanEME, False) + collar_color: int = entry(VarIntEME, 14) + + __slots__ = () + + +class WolfEM(TameableAnimalEM): + """Entity representing a wolf. + + :param is_begging: Whether the wolf is begging. + :type is_begging: bool, optional, default: False + :param collar_color: The color of the wolf's collar, using dye values. + :type collar_color: int, optional, default: 14 + :param anger_time: The time for which the wolf remains angry. + :type anger_time: int, optional, default: 0 + + Inherited from :class:`TameableAnimalEM`: + + :param is_sitting: Whether the animal is sitting. (this affects :attr:`_tameable_data`) + :type is_sitting: bool, optional + :param is_tamed: Whether the animal is tamed. (this affects :attr:`_tameable_data`) + :type is_tamed: bool, optional + :param owner_uuid: The UUID of the owner, if the animal is tamed. + :type owner_uuid: :class:`UUID|None`, optional, default: :attr:`None` + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_begging: bool = entry(BooleanEME, False) + collar_color: int = entry(VarIntEME, 14) + anger_time: int = entry(VarIntEME, 0) + + __slots__ = () + + +class ParrotEM(TameableAnimalEM): + """Entity representing a parrot. + + :param variant: The variant of the parrot. + :type variant: int, optional, default: 0 + + Inherited from :class:`TameableAnimalEM`: + + :param is_sitting: Whether the animal is sitting. (this affects :attr:`_tameable_data`) + :type is_sitting: bool, optional + :param is_tamed: Whether the animal is tamed. (this affects :attr:`_tameable_data`) + :type is_tamed: bool, optional + :param owner_uuid: The UUID of the owner, if the animal is tamed. + :type owner_uuid: :class:`UUID|None`, optional, default: :attr:`None` + + Inherited from :class:`AnimalEM`: + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + variant: int = entry(VarIntEME, 0) + + __slots__ = () + + +class AbstractVillagerEM(AgeableMobEM): + """Entity representing an abstract villager. + + :param head_shake_timer: The head shake timer of the villager, starting at 40 and decrementing each tick. + :type head_shake_timer: int, optional, default: 0 + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + head_shake_timer: int = entry(VarIntEME, 0) + + __slots__ = () + + +class VillagerEM(AbstractVillagerEM): + """Entity representing a villager. + + :param villager_data: The data associated with the villager. + :type villager_data: tuple[int, int, int], optional, default: (0, 0, 0) + + Inherited from :class:`AbstractVillagerEM`: + + :param head_shake_timer: The head shake timer of the villager, starting at 40 and decrementing each tick. + :type head_shake_timer: int, optional, default: 0 + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + villager_data: tuple[int, int, int] = entry(VillagerDataEME, (0, 0, 0)) + + __slots__ = () + + +class WanderingTraderEM(AbstractVillagerEM): + """Entity representing a wandering trader. + + Inherited from :class:`AbstractVillagerEM`: + + :param head_shake_timer: The head shake timer of the villager, starting at 40 and decrementing each tick. + :type head_shake_timer: int, optional, default: 0 + + Inherited from :class:`AgeableMobEM`: + + :param is_baby: Whether the mob is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class AbstractGolemEM(PathfinderMobEM): + """Entity representing an abstract golem. + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class IronGolemEM(AbstractGolemEM): + """Entity representing an iron golem. + + :param is_player_created: Whether the iron golem was created by a player. (this affects :attr:`_iron_golem_flags`) + :type is_player_created: bool, optional + + Inherited from :class:`AbstractGolemEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _iron_golem_flags: ClassVar[int] = entry(ByteEME, 0) + is_player_created: bool = proxy(_iron_golem_flags, Masked, mask=0x1) + + __slots__ = () + + +class SnowGolemEM(AbstractGolemEM): + """Entity representing a snow golem. + + :param has_pumpkin: Whether the snow golem has a pumpkin on its head. (this affects :attr:`_snow_golem_flags`) + :type has_pumpkin: bool, optional + + Inherited from :class:`AbstractGolemEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _snow_golem_flags: ClassVar[int] = entry(ByteEME, 16) + has_pumpkin: bool = proxy(_snow_golem_flags, Masked, mask=0x10) + + __slots__ = () + + +class ShulkerEM(AbstractGolemEM): + """Entity representing a shulker. + + :param attach_face: The face to which the shulker is attached. + :type attach_face: :class:`Direction`, optional, default: :attr:`Direction.DOWN` + :param shield_height: The shield height of the shulker. + :type shield_height: int, optional, default: 0 + :param color: The color of the shulker, using dye color values. + :type color: int, optional, default: 16 + + Inherited from :class:`AbstractGolemEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + attach_face: Direction = entry(DirectionEME, Direction.DOWN) + shield_height: int = entry(ByteEME, 0) + color: int = entry(ByteEME, 16) + + __slots__ = () + + +class MonsterEM(PathfinderMobEM): + """Entity representing a monster. + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class BasePiglinEM(MonsterEM): + """Entity representing a base piglin. + + :param is_immune_to_zombification: Indicates if the piglin is immune to zombification. + :type is_immune_to_zombification: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_immune_to_zombification: bool = entry(BooleanEME, False) + + __slots__ = () + + +class PiglinEM(BasePiglinEM): + """Entity representing a piglin. + + :param is_baby: Indicates if the piglin is a baby. + :type is_baby: bool, optional, default: False + :param is_charging_crossbow: Indicates if the piglin is charging a crossbow. + :type is_charging_crossbow: bool, optional, default: False + :param is_dancing: Indicates if the piglin is dancing. + :type is_dancing: bool, optional, default: False + + Inherited from :class:`BasePiglinEM`: + + :param is_immune_to_zombification: Indicates if the piglin is immune to zombification. + :type is_immune_to_zombification: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_baby: bool = entry(BooleanEME, False) + is_charging_crossbow: bool = entry(BooleanEME, False) + is_dancing: bool = entry(BooleanEME, False) + + __slots__ = () + + +class PiglinBruteEM(BasePiglinEM): + """Entity representing a piglin brute. + + Inherited from :class:`BasePiglinEM`: + + :param is_immune_to_zombification: Indicates if the piglin is immune to zombification. + :type is_immune_to_zombification: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class BlazeEM(MonsterEM): + """Entity representing a blaze. + + :param is_blaze_on_fire: Whether the blaze is on fire. (this affects :attr:`_blaze_flags`) + :type is_blaze_on_fire: bool, optional + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _blaze_flags: ClassVar[int] = entry(ByteEME, 0) + is_blaze_on_fire: bool = proxy(_blaze_flags, Masked, mask=0x1) + + __slots__ = () + + +class CreeperEM(MonsterEM): + """Entity representing a creeper. + + :param state: The state of the creeper (-1 = idle, 1 = fuse). + :type state: int, optional, default: -1 + :param is_charged: Indicates if the creeper is charged. + :type is_charged: bool, optional, default: False + :param is_ignited: Indicates if the creeper is ignited. + :type is_ignited: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + state: int = entry(VarIntEME, -1) + is_charged: bool = entry(BooleanEME, False) + is_ignited: bool = entry(BooleanEME, False) + + __slots__ = () + + +class EndermiteEM(MonsterEM): + """Entity representing an endermite. + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class GiantEM(MonsterEM): + """Entity representing a giant. + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class GuardianEM(MonsterEM): + """Entity representing a guardian. + + :param is_retracting_spikes: Indicates if the guardian is retracting spikes. + :type is_retracting_spikes: bool, optional, default: False + :param target_eid: The Entity ID of the target. + :type target_eid: int, optional, default: 0 + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_retracting_spikes: bool = entry(BooleanEME, False) + target_eid: int = entry(VarIntEME, 0) + + __slots__ = () + + +class ElderGuardianEM(GuardianEM): + """Entity representing an elder guardian. + + Inherited from :class:`GuardianEM`: + + :param is_retracting_spikes: Indicates if the guardian is retracting spikes. + :type is_retracting_spikes: bool, optional, default: False + :param target_eid: The Entity ID of the target. + :type target_eid: int, optional, default: 0 + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SilverfishEM(MonsterEM): + """Entity representing a silverfish. + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class RaiderEM(MonsterEM): + """Entity representing a raider. + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_celebrating: bool = entry(BooleanEME, False) + + __slots__ = () + + +class AbstractIllagerEM(RaiderEM): + """Entity representing an abstract illager. + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class VindicatorEM(AbstractIllagerEM): + """Entity representing a vindicator. + + Inherited from :class:`AbstractIllagerEM`: + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class PillagerEM(AbstractIllagerEM): + """Entity representing a pillager. + + :param is_charging: Indicates if the pillager is charging. + :type is_charging: bool, optional, default: False + + Inherited from :class:`AbstractIllagerEM`: + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_charging: bool = entry(BooleanEME, False) + + __slots__ = () + + +class SpellcasterIllagerEM(AbstractIllagerEM): + """Entity representing a spellcaster illager. + + :param spell: The type of spell the illager is casting. (0: none, 1: summon vex, 2: attack, + 3: wololo, 4: disappear, 5: blindness) + :type spell: int, optional, default: 0 + + Inherited from :class:`AbstractIllagerEM`: + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + spell: int = entry(ByteEME, 0) + + __slots__ = () + + +class EvokerEM(SpellcasterIllagerEM): + """Entity representing an evoker. + + Inherited from :class:`SpellcasterIllagerEM`: + + :param spell: The type of spell the illager is casting. (0: none, 1: summon vex, 2: attack, + 3: wololo, 4: disappear, 5: blindness) + :type spell: int, optional, default: 0 + + Inherited from :class:`AbstractIllagerEM`: + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class IllusionerEM(SpellcasterIllagerEM): + """Entity representing an illusioner. + + Inherited from :class:`SpellcasterIllagerEM`: + + :param spell: The type of spell the illager is casting. (0: none, 1: summon vex, 2: attack, + 3: wololo, 4: disappear, 5: blindness) + :type spell: int, optional, default: 0 + + Inherited from :class:`AbstractIllagerEM`: + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class RavagerEM(RaiderEM): + """Entity representing a ravager. + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class WitchEM(RaiderEM): + """Entity representing a witch. + + :param is_drinking_potion: Indicates if the witch is drinking a potion. + :type is_drinking_potion: bool, optional, default: False + + Inherited from :class:`RaiderEM`: + + :param is_celebrating: Indicates if the raider is celebrating. + :type is_celebrating: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_drinking_potion: bool = entry(BooleanEME, False) + + __slots__ = () + + +class EvokerFangsEM(EntityEM): + """Entity representing evoker fangs. + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class VexEM(MonsterEM): + """Entity representing a vex. + + :param is_attacking: Indicates if the vex is charging. (this affects :attr:`_vex_flags`) + :type is_attacking: bool, optional + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _vex_flags: ClassVar[int] = entry(ByteEME, 0) + is_attacking: bool = proxy(_vex_flags, Masked, mask=0x1) + + __slots__ = () + + +class AbstractSkeletonEM(MonsterEM): + """Entity representing an abstract skeleton. + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SkeletonEM(AbstractSkeletonEM): + """Entity representing a skeleton. + + Inherited from :class:`AbstractSkeletonEM`: + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class WitherSkeletonEM(AbstractSkeletonEM): + """Entity representing a wither skeleton. + + Inherited from :class:`AbstractSkeletonEM`: + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class StrayEM(AbstractSkeletonEM): + """Entity representing a stray skeleton. + + Inherited from :class:`AbstractSkeletonEM`: + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class SpiderEM(MonsterEM): + """Entity representing a spider. + + :param is_climbing: Whether the spider is climbing. (this affects :attr:`_spider_flags`) + :type is_climbing: bool, optional + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + _spider_flags: ClassVar[int] = entry(ByteEME, 0) + is_climbing: bool = proxy(_spider_flags, Masked, mask=0x1) + + __slots__ = () + + +class WardenEM(MonsterEM): + """Entity representing a warden. + + :param anger_level: The level of anger of the warden. + :type anger_level: int, optional, default: 0 + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + anger_level: int = entry(VarIntEME, 0) + + __slots__ = () + + +class WitherEM(MonsterEM): + """Entity representing a wither. + + :param center_head_target: The entity ID of the target for the center head. (0 if no target) + :type center_head_target: int, optional, default: 0 + :param left_head_target: The entity ID of the target for the left head. (0 if no target) + :type left_head_target: int, optional, default: 0 + :param right_head_target: The entity ID of the target for the right head. (0 if no target) + :type right_head_target: int, optional, default: 0 + :param invulnerable_time: The amount of time the wither is invulnerable. + :type invulnerable_time: int, optional, default: 0 + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + center_head_target: int = entry(VarIntEME, 0) + left_head_target: int = entry(VarIntEME, 0) + right_head_target: int = entry(VarIntEME, 0) + invulnerable_time: int = entry(VarIntEME, 0) + + __slots__ = () + + +class ZoglinEM(MonsterEM): + """Entity representing a zoglin. + + :param is_baby: Indicates whether the zoglin is a baby. + :type is_baby: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_baby: bool = entry(BooleanEME, False) + + __slots__ = () + + +class ZombieEM(MonsterEM): + """Entity representing a zombie. + + :param is_baby: Indicates whether the zombie is a baby. + :type is_baby: bool, optional, default: False + :param _zombie_type: Unused metadata. (Previously used for zombie type) + :type _zombie_type: int, optional, default: 0 + :param is_becoming_drowned: Indicates whether the zombie is in the process of becoming a drowned. + :type is_becoming_drowned: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_baby: bool = entry(BooleanEME, False) + _zombie_type: int = entry(VarIntEME, 0) + is_becoming_drowned: bool = entry(BooleanEME, False) + + __slots__ = () + + +class ZombieVillagerEM(ZombieEM): + """Entity representing a zombie villager. + + :param is_converting: Indicates whether the zombie villager is currently converting. + :type is_converting: bool, optional, default: False + :param villager_data: The data of the villager associated with the zombie villager. + :type villager_data: tuple[int, int, int], optional, default: (0, 0, 0) + + Inherited from :class:`ZombieEM`: + + :param is_baby: Indicates whether the zombie is a baby. + :type is_baby: bool, optional, default: False + :param _zombie_type: Unused metadata. (Previously used for zombie type) + :type _zombie_type: int, optional, default: 0 + :param is_becoming_drowned: Indicates whether the zombie is in the process of becoming a drowned. + :type is_becoming_drowned: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_converting: bool = entry(BooleanEME, False) + villager_data: tuple[int, int, int] = entry(VillagerDataEME, (0, 0, 0)) + + __slots__ = () + + +class HuskEM(ZombieEM): + """Entity representing a husk. + + Inherited from :class:`ZombieEM`: + + :param is_baby: Indicates whether the zombie is a baby. + :type is_baby: bool, optional, default: False + :param _zombie_type: Unused metadata. (Previously used for zombie type) + :type _zombie_type: int, optional, default: 0 + :param is_becoming_drowned: Indicates whether the zombie is in the process of becoming a drowned. + :type is_becoming_drowned: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class DrownedEM(ZombieEM): + """Entity representing a drowned. + + Inherited from :class:`ZombieEM`: + + :param is_baby: Indicates whether the zombie is a baby. + :type is_baby: bool, optional, default: False + :param _zombie_type: Unused metadata. (Previously used for zombie type) + :type _zombie_type: int, optional, default: 0 + :param is_becoming_drowned: Indicates whether the zombie is in the process of becoming a drowned. + :type is_becoming_drowned: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class ZombifiedPiglinEM(ZombieEM): + """Entity representing a zombified piglin. + + Inherited from :class:`ZombieEM`: + + :param is_baby: Indicates whether the zombie is a baby. + :type is_baby: bool, optional, default: False + :param _zombie_type: Unused metadata. (Previously used for zombie type) + :type _zombie_type: int, optional, default: 0 + :param is_becoming_drowned: Indicates whether the zombie is in the process of becoming a drowned. + :type is_becoming_drowned: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class EndermanEM(MonsterEM): + """Entity representing an enderman. + + :param carried_block: The block the enderman is carrying. + :type carried_block: str, optional, default: "Absent" + :param is_screaming: Indicates if the enderman is screaming. + :type is_screaming: bool, optional, default: False + :param is_staring: Indicates if the enderman is staring. + :type is_staring: bool, optional, default: False + + Inherited from :class:`MonsterEM`: + + Inherited from :class:`PathfinderMobEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + carried_block: str = entry(OptBlockStateEME, "Absent") + is_screaming: bool = entry(BooleanEME, False) + is_staring: bool = entry(BooleanEME, False) + + __slots__ = () + + +class EnderDragonEM(MobEM): + """Entity representing an ender dragon. + + :param dragon_phase: The current phase of the ender dragon. + :type dragon_phase: :class:`DragonPhase`, optional, default: :attr:`DragonPhase.HOVERING_NO_AI` + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + dragon_phase: DragonPhase = entry(DragonPhaseEME, DragonPhase.HOVERING_NO_AI) + + __slots__ = () + + +class FlyingEM(MobEM): + """Base entity for flying mobs. + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class GhastEM(FlyingEM): + """Entity representing a ghast. + + :param is_attacking: Indicates if the ghast is attacking. + :type is_attacking: bool, optional, default: False + + Inherited from :class:`FlyingEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + is_attacking: bool = entry(BooleanEME, False) + + __slots__ = () + + +class PhantomEM(FlyingEM): + """Entity representing a phantom. + + :param size: The size of the phantom. + :type size: int, optional, default: 0 + + Inherited from :class:`FlyingEM`: + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + size: int = entry(VarIntEME, 0) + + __slots__ = () + + +class SlimeEM(MobEM): + """Entity representing a slime. + + :param size: The size of the slime. + :type size: int, optional, default: 1 + + Inherited from :class:`MobEM`: + + :param no_ai: Whether the mob has AI. (this affects :attr:`_mob_flags`) + :type no_ai: bool, optional + :param is_left_handed: Whether the mob is left-handed. (this affects :attr:`_mob_flags`) + :type is_left_handed: bool, optional + :param is_aggressive: Whether the mob is aggressive. (this affects :attr:`_mob_flags`) + :type is_aggressive: bool, optional + + Inherited from :class:`LivingEntityEM`: + + :param is_hand_active: Whether the hand is active. (this affects :attr:`_hand_states`) + :type is_hand_active: bool, optional + :param active_hand: Which hand is active (0 = main hand, 1 = offhand). (this affects :attr:`_hand_states`) + :type active_hand: int, optional + :param is_riptide_spin_attack: Whether the entity is in riptide spin attack. (this affects :attr:`_hand_states`) + :type is_riptide_spin_attack: bool, optional + :param health: The health of the living entity. + :type health: float, optional, default: 1.0 + :param potion_effect_color: Color of the potion effect (or 0 if there is no effect). + :type potion_effect_color: int, optional, default: 0 + :param is_potion_effect_ambient: Whether the potion effect is ambient: reduces the number of particles generated by + potions to 1/5 the normal amount. + :type is_potion_effect_ambient: bool, optional, default: False + :param num_arrows: Number of arrows in the entity. + :type num_arrows: int, optional, default: 0 + :param num_bee_stingers: Number of bee stingers in the entity. + :type num_bee_stingers: int, optional, default: 0 + :param sleeping_bed_location: Location of the bed that the entity is currently sleeping + in (Empty if it isn't sleeping). + :type sleeping_bed_location: :class:`Position|None`, optional, default: :attr:`None` + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + size: int = entry(VarIntEME, 1) + + __slots__ = () + + +class LlamaSpitEM(EntityEM): + """Entity representing spit from a llama. + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + __slots__ = () + + +class PrimedTntEM(EntityEM): + """Entity representing primed TNT. + + :param fuse_time: The fuse time for the primed TNT. + :type fuse_time: int, optional, default: 80 + + Inherited from :class:`EntityEM`: + + :param is_on_fire: Whether the entity is on fire. (this affects :attr:`_entity_flags`) + :type is_on_fire: bool, optional + :param is_crouching: Whether the entity is crouching. (this affects :attr:`_entity_flags`) + :type is_crouching: bool, optional + :param is_riding: [UNUSED] Whether the entity is riding something. (this affects :attr:`_entity_flags`) + :type is_riding: bool, optional + :param is_sprinting: Whether the entity is sprinting. (this affects :attr:`_entity_flags`) + :type is_sprinting: bool, optional + :param is_swimming: Whether the entity is swimming. (this affects :attr:`_entity_flags`) + :type is_swimming: bool, optional + :param is_invisible: Whether the entity is invisible. (this affects :attr:`_entity_flags`) + :type is_invisible: bool, optional + :param is_glowing: Whether the entity has a glowing effect. (this affects :attr:`_entity_flags`) + :type is_glowing: bool, optional + :param is_flying: Whether the entity is flying. (this affects :attr:`_entity_flags`) + :type is_flying: bool, optional + :param air: The amount of air the entity has. + :type air: int, optional, default: 300 + :param custom_name: The custom name of the entity. + :type custom_name: str, optional, default: "" + :param is_custom_name_visible: Whether the custom name is visible. + :type is_custom_name_visible: bool, optional, default: False + :param is_silent: Whether the entity is silent. + :type is_silent: bool, optional, default: False + :param no_gravity: Whether the entity should ignore gravity. + :type no_gravity: bool, optional, default: False + :param pose: The pose of the entity. Can be one of the following: STANDING, FALL_FLYING, + SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING. + :type pose: :class:`Pose`, optional, default: :attr:`Pose.STANDING` + :param ticks_frozen: The amount of ticks the entity has been in powdered snow for. + :type ticks_frozen: int, optional, default: 0 + + """ + + fuse_time: int = entry(VarIntEME, 80) + + __slots__ = () diff --git a/mcproto/types/entity/metadata.py b/mcproto/types/entity/metadata.py new file mode 100644 index 00000000..d9c0af44 --- /dev/null +++ b/mcproto/types/entity/metadata.py @@ -0,0 +1,459 @@ +from __future__ import annotations + +from abc import ABCMeta, abstractmethod +from typing import Any, ClassVar, Literal, TypeVar, Union, cast, final, get_type_hints, overload + + +from typing_extensions import override, dataclass_transform + +from mcproto.buffer import Buffer +from mcproto.protocol import StructFormat +from mcproto.types.abc import MCType + + +""" + BYTE = 0 + VARINT = 1 + VARLONG = 2 + FLOAT = 3 + STRING = 4 + TEXT_COMPONENT = 5 + OPT_TEXT_COMPONENT = 6 + SLOT = 7 + BOOLEAN = 8 + ROTATION = 9 + POSITION = 10 + OPT_POSITION = 11 + DIRECTION = 12 + OPT_UUID = 13 + BLOCK_STATE = 14 + NBT = 15 + PARTICLE = 16 + VILLAGER_DATA = 17 + OPT_VARINT = 18 + POSE = 19 + CAT_VARIANT = 20 + FROG_VARIANT = 21 + OPT_GLOBAL_POS = 22 + PAINTING_VARIANT = 23 + SNIFFER_STATE = 24 + VECTOR3 = 25 + QUATERNION = 26 +""" + + +class EntityMetadataEntry(MCType): + """Represents an entry in an entity metadata list. + + :param index: The index of the entry. + :param entry_type: The type of the entry. + :param value: The value of the entry. + :param default: The default value of the entry. + :param hidden: Whether the entry is hidden from the metadata list. + :param name: The name of the entry. This is used for debugging purposes and not always set. DO NOT RELY ON THIS + """ + + ENTRY_TYPE: ClassVar[int] = None # type: ignore + + index: int + value: Any + + __slots__ = ("index", "value", "hidden", "default", "name") + + def __init__( + self, index: int, value: Any = None, default: Any = None, hidden: bool = False, name: str | None = None + ): + self.index = index + self.value = default if value is None else value + self.hidden = hidden + self.default = default + self.name = name # for debugging purposes + + self.validate() + + def setter(self, value: Any) -> None: + """Set the value of the entry.""" + self.value = value + + def getter(self) -> Any: + """Get the value of the entry.""" + return self.value + + def _write_header(self, buf: Buffer) -> None: + """Write the index and type of the entry. + + :param buf: The buffer to write to. + """ + buf.write_value(StructFormat.UBYTE, self.index) + buf.write_varint(self.ENTRY_TYPE) + + @overload + @classmethod + def read_header(cls, buf: Buffer, return_type: Literal[True]) -> tuple[int, int]: ... + + @overload + @classmethod + def read_header(cls, buf: Buffer, return_type: Literal[False] = False) -> int: ... + + @classmethod + def read_header(cls, buf: Buffer, return_type: bool = False) -> tuple[int, int] | int: + """Read the index and type of the entry, and optionally return the type. + + :param buf: The buffer to read from. + :param return_type: Whether to return the type of the entry. If this is set to false, the type will be read but + not returned. + :return: The index of the entry. + + :raises ValueError: If return_type is False and the entity type does not match the expected type. + """ + index = buf.read_value(StructFormat.UBYTE) + if index == 0xFF: + if return_type: + return index, -1 + raise ValueError("Index 0xFF is reserved for the end of the metadata list.") + + entry_type = buf.read_varint() + if entry_type != cls.ENTRY_TYPE and not return_type: + raise TypeError(f"Expected entry type {cls.ENTRY_TYPE}, got {entry_type}.") + if return_type: + return index, entry_type + return index + + @override + def validate(self) -> None: + if self.index < 0 or self.index > 0xFF: + raise ValueError("Index must be between 0 and 0xFF.") + + @override + def __repr__(self) -> str: + return f"{self.__class__.__name__}(index={self.index}, value={self.value})" + + @override + def __eq__(self, value: object) -> bool: + if not isinstance(value, EntityMetadataEntry): + return NotImplemented + return self.index == value.index and self.value == value.value + + @classmethod + @abstractmethod + def read_value(cls, buf: Buffer) -> Any: + """Read the value of the entry from the buffer. + + :param buf: The buffer to read from. + :return: The value of the entry. + """ + ... + + @override + @classmethod + @final + def deserialize(cls, buf: Buffer) -> EntityMetadataEntry: + """Deserialize the entity metadata entry. + + :param buf: The buffer to read from. + :return: The entity metadata entry. + """ + index = cls.read_header(buf) + value = cls.read_value(buf) + return cls(index=index, value=value) + + +class ProxyEntityMetadataEntry(MCType): + """A proxy entity metadata entry which is used to designate a part of a metadata entry in a human-readable format. + + For example, this can be used to represent a certain mask for a ByteEME entry. + """ + + ENTRY_TYPE: ClassVar[int] = None # type: ignore + + bound_entry: EntityMetadataEntry + + __slots__ = ("bound_entry",) + + def __init__(self, bound_entry: EntityMetadataEntry, *args: Any, **kwargs: Any): + self.bound_entry = bound_entry + self.validate() + + @override + def serialize_to(self, buf: Buffer) -> None: + raise NotImplementedError("Proxy entity metadata entries cannot be serialized.") + + @override + @classmethod + def deserialize(cls, buf: Buffer) -> ProxyEntityMetadataEntry: + raise NotImplementedError("Proxy entity metadata entries cannot be deserialized.") + + @abstractmethod + def setter(self, value: Any) -> None: + """Set the value of the entry by modifying the bound entry.""" + ... + + @abstractmethod + def getter(self) -> Any: + """Get the value of the entry by reading the bound entry.""" + ... + + +EntityDefault = TypeVar("EntityDefault") + + +class _DefaultEntityMetadataEntry: + m_default: Any + m_type: type[EntityMetadataEntry] + m_index: int + + __slots__ = ("m_default", "m_type") + + +def entry(entry_type: type[EntityMetadataEntry], value: EntityDefault) -> EntityDefault: + """Create a entity metadata entry with the given value. + + :param entry_type: The type of the entry. + :param default: The default value of the entry. + :return: The default entity metadata entry. + """ + + class DefaultEntityMetadataEntry(_DefaultEntityMetadataEntry): + m_default = value + m_type = entry_type + m_index = -1 + + __slots__ = () + + # This will be taken care of by EntityMetadata + return DefaultEntityMetadataEntry # type: ignore + + +ProxyInitializer = TypeVar("ProxyInitializer") + + +class _ProxyEntityMetadataEntry: + """Class used to pass the bound entry and additional arguments to the proxy entity metadata entry. + + Explanation: + m_bound_entry: The real entry that the proxy will modify. + m_args: Additional arguments for the proxy entity metadata entry. + m_kwargs: Additional keyword arguments for the proxy entity metadata entry. + m_type: The type of the proxy entity metadata entry, this defines how the proxy will modify the real entry. + All of the above are set by the proxy() function. + + m_bound_index: The index of the bound entry in the metadata list. + This is set by the EntityMetadataCreator. + """ + + m_bound_entry: EntityMetadataEntry + m_args: tuple[Any] + m_kwargs: dict[str, Any] + m_type: type[ProxyEntityMetadataEntry] + m_bound_index: int + + __slots__ = ("m_bound_entry", "m_args", "m_kwargs", "m_type", "m_bound_index") + + +def proxy( + bound_entry: EntityDefault, # type: ignore # Used only once but I prefer to keep the type hint + proxy: type[ProxyEntityMetadataEntry], + *args: Any, + **kwargs: Any, +) -> ProxyInitializer: # type: ignore + """Initialize the proxy entity metadata entry with the given bound entry and additional arguments. + + :param bound_entry: The bound entry. + :param proxy: The proxy entity metadata entry type. + :param args: Additional arguments for the proxy entity metadata entry. + :param kwargs: Additional keyword arguments for the proxy entity metadata entry. + + :return: The proxy entity metadata entry initializer. + """ + if not isinstance(bound_entry, type): + raise TypeError("The bound entry must be an entity metadata entry type.") + if not issubclass(bound_entry, _DefaultEntityMetadataEntry): + raise TypeError("The bound entry must be an entity metadata entry.") + + class ProxyEntityMetadataEntry(_ProxyEntityMetadataEntry): + m_bound_entry = bound_entry # type: ignore # This will be taken care of by EntityMetadata + m_args = args + m_kwargs = kwargs + m_type = proxy + + m_bound_index = -1 + + __slots__ = () + + return ProxyEntityMetadataEntry # type: ignore + + +@dataclass_transform() # field_specifiers=(entry, proxy)) +class EntityMetadataCreator(ABCMeta): + """Metaclass for the EntityMetadata. + + This metaclass is used to create the EntityMetadata with the correct attributes to allow for using them + like dataclasses. + + The entry() and proxy() functions are used to set the attributes of the entity class. + ``` + """ + + m_defaults: ClassVar[dict[str, type[_DefaultEntityMetadataEntry | _ProxyEntityMetadataEntry]]] + m_index: ClassVar[dict[int, str]] + m_metadata: ClassVar[ + dict[str, EntityMetadataEntry | ProxyEntityMetadataEntry] + ] # This is not an actual classvar, but I + # Do not want it to appear in the __init__ signature + + def __new__(cls, name: str, bases: tuple[type], namespace: dict[str, Any]) -> EntityMetadata: + """Create a new EntityMetadata.""" + new_cls = super().__new__(cls, name, bases, namespace) + cls.setup_class(new_cls) + return cast("EntityMetadata", new_cls) + + def setup_class(cls: type[EntityMetadata]) -> None: + """Set up the class for the entity metadata. + + This function will create a few class attibutes : + - m_defaults: A dictionary that maps the names of the entries to their "setup class" (the return of entry() + or proxy()) + - m_index: A mapping of the names of the entity metadata entries to their index + + The m_metadata is mentionned here but nothing is created yet. __init__ will take care of this. + + """ + cls.m_defaults = {} + cls.m_index = {} + + bound_index: dict[int, int] = {} + current_index = 0 + # Iterate over the annotations to set up the metadata + for name in get_type_hints(cls): + # Default is assigned in the class definition + default = getattr(cls, name, None) + if default is None: + raise ValueError(f"Default value for {name} is not set. Use the entry() or proxy() functions.") + default = cast(Union[type[_DefaultEntityMetadataEntry], type[_ProxyEntityMetadataEntry]], default) + # Check if we have a default entry + if isinstance(default, type) and issubclass(default, _DefaultEntityMetadataEntry): + # Set the index of the entry + default.m_index = current_index + + # Add the index to the index mapping + cls.m_index[current_index] = name + + # Add the entry to the bound_index mapping to be used by the proxy entries + bound_index[id(default)] = current_index + + # Increment the index + current_index += 1 + elif isinstance(default, type) and issubclass(default, _ProxyEntityMetadataEntry): # type: ignore # We want to check anyways + # Find the bound entry + if id(default.m_bound_entry) not in bound_index: + raise ValueError(f"Bound entry for {name} is not set.") + bound_entry = bound_index[id(default.m_bound_entry)] + + # Set the index of the proxy entry + default.m_bound_index = bound_entry + else: + raise ValueError(f"Invalid default value for {name}. Use the entry() or proxy() functions.") # noqa: TRY004 + + # Add the entry to the defaults + cls.m_defaults[name] = default + + +class EntityMetadata(MCType, metaclass=EntityMetadataCreator): + """Base for all Entity classes. + + All the entity classes are subclasses of this class. + + You can set attributes of the entity class by using the entry() and proxy() functions. + + Example: + ```python + class EntityMetadata(EntityMetadata): + byte_entry: ClassVar[int] = entry(ByteEME, 0) # ByteEME is the type and 0 is the default value + varint_entry: int = entry(VarIntEME, 0) + proxy_entry: int = proxy(byte_entry, Masked, mask=0x01) + proxy_entry2: int = proxy(byte_entry, Masked, mask=0x02) + ``` + + Note that the extra arguments for the proxy() function are passed to the proxy class and that the + bound entry is passed as the first argument without quotes. + """ + + __slots__ = ("m_metadata",) + + def __init__(self, *args: None, **kwargs: Any) -> None: + if len(args) > 0: + raise ValueError( + "EntityMetadata does not accept positional arguments. Specify all metadata entries by name." + ) + self.m_metadata: dict[str, EntityMetadataEntry | ProxyEntityMetadataEntry] = {} + for name, default in self.m_defaults.items(): + if issubclass(default, _DefaultEntityMetadataEntry): + self.m_metadata[name] = default.m_type(index=default.m_index, default=default.m_default, name=name) + elif issubclass(default, _ProxyEntityMetadataEntry): # type: ignore # We want to check anyways + # Bound entry + bound_name = self.m_index[default.m_bound_index] + bound_entry = cast(EntityMetadataEntry, self.m_metadata[bound_name]) + self.m_metadata[name] = default.m_type(bound_entry, *default.m_args, **default.m_kwargs) + else: # pragma: no cover + raise ValueError(f"Invalid default value for {name}. Use the entry() or proxy() functions.") # noqa: TRY004 + + for name, value in kwargs.items(): + if name not in self.m_metadata: + raise ValueError(f"Unknown metadata entry {name}.") + self.m_metadata[name].setter(value) + + @override + def __setattr__(self, name: str, value: Any) -> None: + if name != "m_metadata" and hasattr(self, "m_metadata") and name in self.m_metadata: + self.m_metadata[name].setter(value) + else: + super().__setattr__(name, value) + + @override + def __getattribute__(self, name: str) -> Any: + if name != "m_metadata" and hasattr(self, "m_metadata") and name in self.m_metadata: + return self.m_metadata[name].getter() + return super().__getattribute__(name) + + @override + def __repr__(self) -> str: + # Iterate over m_metadata to get the string representation of the metadata + metadata: list[str] = [] + for name, entry in self.m_metadata.items(): + metadata.append(f"{name}={entry.getter()}") + return f"{self.__class__.__name__}({', '.join(metadata)})" + + @override + def serialize_to(self, buf: Buffer) -> None: + for entry in self.m_metadata.values(): + # Check if the value is a proxy entry + if isinstance(entry, ProxyEntityMetadataEntry): + continue + # Check if the value differs from the default value + if entry.value != entry.default: + entry.serialize_to(buf) + # Mark the end of the metadata list + buf.write_value(StructFormat.UBYTE, 0xFF) + + @override + @classmethod + def deserialize(cls, buf: Buffer) -> EntityMetadata: + from mcproto.types.entity.metadata_types import ASSOCIATIONS + + entries: list[tuple[int, Any]] = [] + + while True: + index, entry_type_index = EntityMetadataEntry.read_header(buf, return_type=True) + if index == 0xFF: + break + if entry_type_index not in ASSOCIATIONS: + raise TypeError(f"Unknown entry type {entry_type_index}.") + entry_type = ASSOCIATIONS[entry_type_index] + + entry = entry_type.read_value(buf) + entries.append((index, entry)) + + new_instance = cls() # Initialize the new instance with the default values + for index, value in entries: + new_instance.m_metadata[cls.m_index[index]].setter(value) + return new_instance diff --git a/mcproto/types/entity/metadata_types.py b/mcproto/types/entity/metadata_types.py new file mode 100644 index 00000000..60292ef6 --- /dev/null +++ b/mcproto/types/entity/metadata_types.py @@ -0,0 +1,670 @@ +from __future__ import annotations + +from enum import IntEnum +from typing import Any, ClassVar + +from typing_extensions import override + +from mcproto.buffer import Buffer +from mcproto.protocol import StructFormat +from mcproto.types.chat import TextComponent +from mcproto.types.entity.enums import Direction, Pose, SnifferState, DragonPhase +from mcproto.types.entity.metadata import EntityMetadataEntry, ProxyEntityMetadataEntry +from mcproto.types.identifier import Identifier +from mcproto.types.nbt import NBTag +from mcproto.types.quaternion import Quaternion +from mcproto.types.slot import Slot +from mcproto.types.vec3 import Position, Vec3 +from mcproto.types.uuid import UUID + + +class ByteEME(EntityMetadataEntry): + """Represents a byte entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 0 + __slots__ = () + + value: int + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_value(StructFormat.BYTE, self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> int: + return buf.read_value(StructFormat.BYTE) + + @override + def validate(self) -> None: + if not -128 <= self.value <= 127: + raise ValueError(f"Byte value {self.value} is out of range.") + super().validate() + + +class Masked(ProxyEntityMetadataEntry): + """Represents a masked entry in an entity metadata list.""" + + __slots__ = ("mask",) + + def __init__(self, bound_entry: EntityMetadataEntry, *, mask: int): + super().__init__(bound_entry) + self.mask = mask + + @override + def setter(self, value: int) -> None: + bound = self.bound_entry.getter() + # spread value over the mask + for i in range(32): + if self.mask & (1 << i): + bound = (bound & ~(1 << i)) | ((value & 1) << i) + value >>= 1 + self.bound_entry.setter(bound) + + @override + def getter(self) -> int: + # collect bits from the mask + value = 0 + bound = self.bound_entry.getter() + if bound == 0: # Save 32 iterations of a useless loop + return 0 + shift = 0 + for i in range(32): + if self.mask & (1 << i): + # Find the bit that is set and shift it back to the right position + value |= (bound & (1 << i)) >> (i - shift) + shift += 1 + return value + + +class VarIntEME(EntityMetadataEntry): + """Represents a varint entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 1 + __slots__ = () + + value: int + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_varint(self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Any: + return buf.read_varint() + + @override + def validate(self) -> None: + if not -(2**31) <= self.value < 2**31: + raise ValueError(f"VarInt value {self.value} is out of range.") + super().validate() + + +class _RegistryVarIntEME(VarIntEME): + """Represents a varint entry that refereces a registry ID in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = -1 + __slots__ = () + + +class _VarIntEnumEME(EntityMetadataEntry): + """Represents a varint entry that refereces an enum in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = -1 + __slots__ = () + ENUM: ClassVar[type[IntEnum]] = None # type: ignore + + value: IntEnum + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_varint(self.value.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> IntEnum: + value = buf.read_varint() + try: + value_enum = cls.ENUM(value) + except ValueError as e: + raise ValueError(f"Invalid value {value} for enum {cls.ENUM.__name__}.") from e + return value_enum + + @override + def validate(self) -> None: + super().validate() + try: + self.ENUM(self.value) + except ValueError as e: + raise ValueError(f"Invalid value {self.value} for enum {self.ENUM.__name__}.") from e + + +class VarLongEME(EntityMetadataEntry): + """Represents a varlong entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 2 + __slots__ = () + + value: int + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_varlong(self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> int: + return buf.read_varlong() + + @override + def validate(self) -> None: + if not -(2**63) <= self.value < 2**63: + raise ValueError(f"VarLong value {self.value} is out of range.") + super().validate() + + +class FloatEME(EntityMetadataEntry): + """Represents a float entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 3 + __slots__ = () + + value: float + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_value(StructFormat.FLOAT, self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> float: + return buf.read_value(StructFormat.FLOAT) + + +class StringEME(EntityMetadataEntry): + """Represents a string entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 4 + __slots__ = () + + value: str + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_utf(self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> str: + return buf.read_utf() + + @override + def validate(self) -> None: + if len(self.value) > 32767: + raise ValueError(f"String value {self.value} is too long.") + super().validate() + + +class TextComponentEME(EntityMetadataEntry): + """Represents a text component entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 5 + __slots__ = () + + value: TextComponent + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> TextComponent: + return TextComponent.deserialize(buf) + + +class OptTextComponentEME(EntityMetadataEntry): + """Represents an optional text component entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 6 + __slots__ = () + + value: TextComponent | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + # We use the old python True == 1 trick to represent a boolean + buf.write_value(StructFormat.BYTE, self.value is not None) + if self.value is not None: + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> TextComponent | None: + present = buf.read_value(StructFormat.BYTE) + if present: + return TextComponent.deserialize(buf) + return None + + +class SlotEME(EntityMetadataEntry): + """Represents a slot entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 7 + __slots__ = () + + value: Slot + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Slot: + return Slot.deserialize(buf) + + +class BooleanEME(EntityMetadataEntry): + """Represents a boolean entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 8 + __slots__ = () + + value: bool + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_value(StructFormat.BYTE, self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> bool: + return bool(buf.read_value(StructFormat.BYTE)) + + +class RotationEME(EntityMetadataEntry): + """Represents a rotation entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 9 + __slots__ = () + + value: Vec3 + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Vec3: + return Vec3.deserialize(buf) + + +class PositionEME(EntityMetadataEntry): + """Represents a position entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 10 + __slots__ = () + + value: Position + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Position: + return Position.deserialize(buf) + + +class OptPositionEME(EntityMetadataEntry): + """Represents an optional position entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 11 + __slots__ = () + + value: Position | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + # We use the old python True == 1 trick to represent a boolean + buf.write_value(StructFormat.BYTE, self.value is not None) + if self.value is not None: + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Position | None: + present = buf.read_value(StructFormat.BYTE) + if present: + return Position.deserialize(buf) + return None + + +class DirectionEME(EntityMetadataEntry): + """Represents a direction in the world.""" + + ENTRY_TYPE: ClassVar[int] = 12 + __slots__ = () + + value: Direction + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_value(StructFormat.BYTE, self.value) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Direction: + return Direction(buf.read_value(StructFormat.BYTE)) + + +class OptUUIDEME(EntityMetadataEntry): + """Represents an optional UUID entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 13 + __slots__ = () + + value: UUID | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + # We use the old python True == 1 trick to represent a boolean + buf.write_value(StructFormat.BYTE, self.value is not None) + if self.value is not None: + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> UUID | None: + present = buf.read_value(StructFormat.BYTE) + if present: + return UUID.deserialize(buf) + return None + + +class BlockStateEME(VarIntEME): + """Represents a block state in the world.""" + + ENTRY_TYPE: ClassVar[int] = 14 + __slots__ = () + + +class OptBlockStateEME(EntityMetadataEntry): + """Represents an optional block state in the world.""" + + ENTRY_TYPE: ClassVar[int] = 15 + __slots__ = () + + value: int | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + if self.value is not None: + buf.write_varint(self.value) + else: + buf.write_varint(0) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> int | None: + value = buf.read_varint() + if value == 0: + value = None + return value + + +class NBTagEME(EntityMetadataEntry): + """Represents an NBT entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 16 + __slots__ = () + + value: NBTag + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf, with_name=False) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> NBTag: + return NBTag.deserialize(buf, with_name=False) + + +class ParticleEME(EntityMetadataEntry): + """Represents a particle entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 17 + __slots__ = () + + value: tuple[int, Any] + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) # pragma: no cover + buf.write_varint(self.value[0]) # pragma: no cover + raise NotImplementedError("The rest of the particle data is not implemented yet.") # pragma: no cover + + @override + @classmethod + def read_value(cls, buf: Buffer) -> tuple[int, Any]: + value = buf.read_varint() # pragma: no cover # noqa: F841 + raise NotImplementedError("The rest of the particle data is not implemented yet.") + + +class VillagerDataEME(EntityMetadataEntry): + """Represents a villager data entry in an entity metadata list. + + This includes the type, profession, and level of the villager. + """ + + ENTRY_TYPE: ClassVar[int] = 18 + __slots__ = () + + value: tuple[int, int, int] + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + buf.write_varint(self.value[0]) + buf.write_varint(self.value[1]) + buf.write_varint(self.value[2]) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> tuple[int, int, int]: + return (buf.read_varint(), buf.read_varint(), buf.read_varint()) + + +class OptVarIntEME(EntityMetadataEntry): + """Represents an optional varint entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 19 + __slots__ = () + + value: int | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + # We use the old python True == 1 trick to represent a boolean + if self.value is not None: + buf.write_varint(self.value + 1) + else: + buf.write_varint(0) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> int | None: + value = buf.read_varint() - 1 + if value == -1: + value = None + return value + + +class PoseEME(_VarIntEnumEME): + """Represents a pose entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 20 + __slots__ = () + ENUM: ClassVar[type[IntEnum]] = Pose + + +class CatVariantEME(_RegistryVarIntEME): + """Represents a cat variant entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 21 + __slots__ = () + + +class FrogVariantEME(_RegistryVarIntEME): + """Represents a frog variant entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 22 + __slots__ = () + + +class DragonPhaseEME(_VarIntEnumEME): + """Represents a dragon phase entry in an entity metadata list. + + This is not a real type, because the type is VarInt, but the values are predefined. + """ + + ENTRY_TYPE: ClassVar[int] = 1 + __slots__ = () + ENUM: ClassVar[type[IntEnum]] = DragonPhase + + +class OptGlobalPositionEME(EntityMetadataEntry): + """Represents an optional global position entry in an entity metadata list. + + This includes an identifier for the dimension as well as the position in it. + """ + + ENTRY_TYPE: ClassVar[int] = 23 + __slots__ = () + + value: tuple[Identifier, Position] | None + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + # We use the old python True == 1 trick to represent a boolean + buf.write_value(StructFormat.BYTE, self.value is not None) + if self.value is not None: + self.value[0].serialize_to(buf) + self.value[1].serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> tuple[Identifier, Position] | None: + present = buf.read_value(StructFormat.BYTE) + if present: + return (Identifier.deserialize(buf), Position.deserialize(buf)) + return None + + +class PaintingVariantEME(_RegistryVarIntEME): + """Represents a painting variant entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 24 + __slots__ = () + + +class SnifferStateEME(_VarIntEnumEME): + """Represents a sniffer state entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 25 + __slots__ = () + ENUM: ClassVar[type[IntEnum]] = SnifferState + + +class Vector3EME(EntityMetadataEntry): + """Represents a vector3 entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 26 + __slots__ = () + + value: Vec3 + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Vec3: + return Vec3.deserialize(buf) + + +class QuaternionEME(EntityMetadataEntry): + """Represents a quaternion entry in an entity metadata list.""" + + ENTRY_TYPE: ClassVar[int] = 27 + __slots__ = () + + value: Quaternion + + @override + def serialize_to(self, buf: Buffer) -> None: + self._write_header(buf) + self.value.serialize_to(buf) + + @override + @classmethod + def read_value(cls, buf: Buffer) -> Quaternion: + return Quaternion.deserialize(buf) + + +ASSOCIATIONS = { + 0: ByteEME, + 1: VarIntEME, + 2: _RegistryVarIntEME, + 3: FloatEME, + 4: StringEME, + 5: TextComponentEME, + 6: OptTextComponentEME, + 7: SlotEME, + 8: BooleanEME, + 9: RotationEME, + 10: PositionEME, + 11: OptPositionEME, + 12: DirectionEME, + 13: OptUUIDEME, + 14: BlockStateEME, + 15: OptBlockStateEME, + 16: NBTagEME, + 17: ParticleEME, + 18: VillagerDataEME, + 19: OptVarIntEME, + 20: PoseEME, + 21: CatVariantEME, + 22: FrogVariantEME, + 23: OptGlobalPositionEME, + 24: PaintingVariantEME, + 25: SnifferStateEME, + 26: Vector3EME, + 27: QuaternionEME, +} diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/scripts/entity_generator.py b/scripts/entity_generator.py new file mode 100644 index 00000000..0a3105f3 --- /dev/null +++ b/scripts/entity_generator.py @@ -0,0 +1,277 @@ +from __future__ import annotations +from typing import List, Dict, Union, cast +from pathlib import Path +import subprocess +import sys + +from scripts.entity_generator_data import ENTITY_DATA, EntityData, Field + +BASE_CLASS = ''' +class {name}({base}): + """{class_description} + + {fields_docstring} + + """ + + {fields} + + __slots__ = () + +''' + + +ENTRY_FIELD = """{name}: {input} = entry({type}, {default})""" +INPUT_UNAVAILABLE = """ClassVar[{input}]""" +# Mark as ignore by sphinx +PROXY_FIELD = """{name}: {input} = proxy({target}, {type}, {kwargs})""" + +FIELD_DESCRIPTION = """:param {name}: {description} +:type {name}: {input}, optional, default: {default}""" +PROXY_DESCRIPTION = """:param {name}: {description} (this affects :attr:`{target}`) +:type {name}: {input}, optional""" +UNAVAILABLE_PREFIX = "_" +TYPE_SUFFIX = "EME" # EntityMetadataEntry +NAME_SUFFIX = "EM" # EntityMetadata + + +FILE_HEADER = """ +###################################################################### +# This file is automatically generated by the entity generator script. +# You can modify it by changing what you want in the script. +###################################################################### + +from mcproto.types.entity.enums import {enums} + +__all__ = [ + {all} +] +""" + +BASE_FILE = """ +from __future__ import annotations +from typing import ClassVar, Any +{header} + +from mcproto.types.entity.metadata import ( + proxy, + entry, + EntityMetadata, +) +from mcproto.types.entity.metadata_types import {types} +from mcproto.types.slot import Slot +from mcproto.types.chat import TextComponent +from mcproto.types.nbt import NBTag, EndNBT +from mcproto.types.vec3 import Position +from mcproto.types.uuid import UUID + +{classes} +""" +INIT_FILE = """ +from mcproto.types.entity.generated import {generated} +{header} +""" + +FILE_PATH = "mcproto/types/entity/generated.py" +INIT_PATH = "mcproto/types/entity/__init__.py" + +# This dictionary holds the decumentation for each entity to allow it to be appended to inherited classes +main_doc_repo: dict[str, str] = {} + + +def generate_class(entity_description: EntityData) -> tuple[str, set[str], set[str]]: # noqa: PLR0912 + """Generate a class from the entity description. + + :param entity_description: The entity description to generate the class from. + + :return: The generated string for the class, a set of used enums, and a set of used types. + """ + field_docs: list[str] = [] + fields: list[str] = [] + used_enums: set[str] = set() + used_types: set[str] = set() + name = entity_description["name"] + name = cast(str, name) + NAME_SUFFIX # EntityMetadata + base = entity_description.get("base", "EntityMetadata") + base = cast(str, base) + if base != "EntityMetadata": + base += NAME_SUFFIX + for variable in entity_description["fields"]: + variable = cast(Field, variable) + v_type = cast(str, variable["type"]) + v_name = cast(str, variable["name"]) + v_default = variable["default"] + v_input = variable["input"] + v_description = variable.get("description", "") + v_proxy = cast(List[Dict[str, Union[type, str, int]]], variable.get("proxy", [])) + v_available = variable.get("available", True) + v_enum = variable.get("enum", False) + + if v_enum: + used_enums.add(v_type) + v_default = f"{v_type}.{v_default}" + + v_type = v_type + TYPE_SUFFIX + used_types.add(v_type) + + if not v_available: + v_name = UNAVAILABLE_PREFIX + v_name + + if isinstance(v_input, type): + v_input = v_input.__name__ + v_input = cast(str, v_input) + + if v_input == "str": + v_default = f'"{v_default}"' + + if v_available: + if v_description: + if v_enum or not v_input.startswith(("str", "tuple", "float", "int", "bool")): + v_default_desc = f":attr:`{v_default}`" + v_input_desc = f":class:`{v_input}`" + else: + v_default_desc = v_default + v_input_desc = v_input + + field_docs.append( + FIELD_DESCRIPTION.format( + name=v_name, description=v_description, input=v_input_desc, default=v_default_desc + ) + ) + else: + v_input = INPUT_UNAVAILABLE.format(input=v_input) + + fields.append( + ENTRY_FIELD.format( + name=v_name, + input=v_input, + type=v_type, + default=v_default, + ) + ) + for proxy_field in v_proxy: + proxy_name = cast(str, proxy_field["name"]) + proxy_type = cast(str, proxy_field["type"]) + proxy_input = proxy_field.get("input", int) + proxy_description = proxy_field.get("description", "") + proxy_target = v_name + + if isinstance(proxy_input, type): + proxy_input = proxy_input.__name__ # convert the str type to "str" ... + + used_types.add(proxy_type) + + proxy_kwargs = "" + for k, v in proxy_field.items(): + if k not in ("name", "type", "input", "description"): + if k == "mask": + v = cast(int, v) + v = hex(v) # noqa: PLW2901 + proxy_kwargs += f"{k}={v}," + if proxy_kwargs: + proxy_kwargs = proxy_kwargs[:-1] # remove the last comma + + if proxy_description: + field_docs.append( + PROXY_DESCRIPTION.format( + name=proxy_name, + description=proxy_description, + target=proxy_target, + input=proxy_input, + ) + ) + + fields.append( + PROXY_FIELD.format( + name=proxy_name, + input=proxy_input, + target=proxy_target, + type=proxy_type, + kwargs=proxy_kwargs, + ) + ) + + # Split lines inside docstrings + + if base in main_doc_repo: + field_docs += ["", f"Inherited from :class:`{base}`:", ""] + [ + line.strip("\n\r\t").replace(" " * 4, "", 1) for line in main_doc_repo[base].split("\n") + ] + else: + print(f"Warning: {base} not found in main_doc_repo") # noqa: T201 + + if field_docs[0] == "": + field_docs = field_docs[1:] + field_docs_str = "\n ".join("\n".join(field_docs).split("\n")) + main_doc_repo[name] = field_docs_str + return ( + BASE_CLASS.format( + name=name, + base=base, + class_description=entity_description["description"], + fields_docstring=field_docs_str, + fields="\n ".join(fields), + ), + used_enums, + used_types, + ) + + +def write_files(entity_data: list[EntityData]) -> None: + """Generate the base file for the entities. + + :param entity_data: The entity data to generate the base file from. + + :return: The generated string for the base file. + """ + types: set[str] = set() + enums: set[str] = set() + all_classes: list[str] = [] + class_code: list[str] = [] + generated: list[str] = [] + for entity in entity_data: + class_str, used_enums, used_types = generate_class(entity) + entity_name = cast(str, entity["name"]) + NAME_SUFFIX + types.update(used_types) + enums.update(used_enums) + all_classes.append(entity_name) + class_code.append(class_str) + generated.append(entity_name) + all_classes_str = ",\n ".join(f'"{c}"' for c in all_classes + list(enums)) + types_str = ", ".join(types) + enums_str = ", ".join(enums) + generated_str = ", ".join(generated) + + header = FILE_HEADER.format( + enums=enums_str, + all=all_classes_str, + ) + with Path(FILE_PATH).open("w") as file: + file.write( + BASE_FILE.format( + types=types_str, + header=header, + classes="\n\n".join(class_code), + ) + ) + + with Path(INIT_PATH).open("w") as file: + file.write(INIT_FILE.format(header=header, generated=generated_str)) + + +def format_ruff(path: Path) -> None: + """Format the generated files with ruff. + + :param path: The path to the file to format. + """ + # Get the python site packages path + subprocess.run( + [sys.executable, "-m", "ruff", "format", str(path.absolute())], # noqa: S603 + check=True, + ) + + +if __name__ == "__main__": + write_files(ENTITY_DATA) + format_ruff(Path(FILE_PATH)) + format_ruff(Path(INIT_PATH)) diff --git a/scripts/entity_generator_data.py b/scripts/entity_generator_data.py new file mode 100644 index 00000000..f50f70e9 --- /dev/null +++ b/scripts/entity_generator_data.py @@ -0,0 +1,2878 @@ +from __future__ import annotations + +from typing import Dict, List, Union + +# Define a type for a single field in the entity data +Field = Dict[str, Union[type, str, int, bool, float, List[Dict[str, Union[type, str, int]]]]] + +# Define a type for the entire entity data dictionary +EntityData = Dict[str, Union[str, List[Field]]] + +ENTITY_DATA: list[EntityData] = [ + { # Entity + "name": "Entity", + "description": "Base for all Entity classes.", + "base": "EntityMetadata", + "fields": [ + { + "type": "Byte", + "name": "entity_flags", + "available": False, + "default": 0, + "input": int, + "proxy": [ + { + "type": "Masked", + "name": "is_on_fire", + "input": bool, + "description": "Whether the entity is on fire.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_crouching", + "input": bool, + "description": "Whether the entity is crouching.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "is_riding", + "input": bool, + "description": "[UNUSED] Whether the entity is riding something.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "is_sprinting", + "input": bool, + "description": "Whether the entity is sprinting.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "is_swimming", + "input": bool, + "description": "Whether the entity is swimming.", + "mask": 0x10, + }, + { + "type": "Masked", + "name": "is_invisible", + "input": bool, + "description": "Whether the entity is invisible.", + "mask": 0x20, + }, + { + "type": "Masked", + "name": "is_glowing", + "input": bool, + "description": "Whether the entity has a glowing effect.", + "mask": 0x40, + }, + { + "type": "Masked", + "name": "is_flying", + "input": bool, + "description": "Whether the entity is flying.", + "mask": 0x80, + }, + ], + "description": "Flags for the entity.", + }, + { + "type": "VarInt", + "name": "air", + "default": 300, + "input": int, + "description": "The amount of air the entity has.", + }, + { + "type": "String", + "name": "custom_name", + "default": "", + "input": str, + "description": "The custom name of the entity.", + }, + { + "type": "Boolean", + "name": "is_custom_name_visible", + "default": False, + "input": bool, + "description": "Whether the custom name is visible.", + }, + { + "type": "Boolean", + "name": "is_silent", + "default": False, + "input": bool, + "description": "Whether the entity is silent.", + }, + { + "type": "Boolean", + "name": "no_gravity", + "default": False, + "input": bool, + "description": "Whether the entity should ignore gravity.", + }, + { + "type": "Pose", + "name": "pose", + "default": "STANDING", + "input": "Pose", + "enum": True, + "description": "The pose of the entity. Can be one of the following: STANDING, FALL_FLYING,\n" + " SLEEPING, SWIMMING, SPIN_ATTACK, SNEAKING, DYING.", + }, + { + "type": "VarInt", + "name": "ticks_frozen", + "default": 0, + "input": int, + "description": "The amount of ticks the entity has been in powdered snow for.", + }, + ], + }, # End of Entity + { # Interaction + "name": "Interaction", + "description": "Entity that can be interacted with.", + "base": "Entity", + "fields": [ + { + "type": "Float", + "name": "width", + "default": 1.0, + "input": float, + "description": "The width of the entity.", + }, + { + "type": "Float", + "name": "height", + "default": 1.0, + "input": float, + "description": "The height of the entity.", + }, + { + "type": "Boolean", + "name": "responsive", + "default": False, + "input": bool, + "description": "Whether the entity can be interacted with/attached", + }, + ], + }, # End of Interaction + { # Display + "name": "Display", + "description": "Entity that are used to render something on the client.\n\n" + " https://minecraft.wiki/w/Display", + "base": "Entity", + "fields": [ + { + "type": "VarInt", + "name": "interpolation_delay", + "default": 0, + "input": int, + "description": "Delay before starting interpolation.\n If 0, interpolation starts immediately." + "(doesn't exist in newest snapshot)", + }, + { + "type": "VarInt", + "name": "interpolation_translation_duration", + "default": 0, + "input": int, + "description": "Transformation interpolation duration.", + }, + { + "type": "VarInt", + "name": "interpolation_rotation_duration", + "default": 0, + "input": int, + "description": "Rotation interpolation duration.", + }, + { + "type": "Vector3", + "name": "translation", + "default": "(0.0, 0.0, 0.0)", + "input": "tuple[float, float, float]", + "description": "Translation vector", + }, + { + "type": "Vector3", + "name": "scale", + "default": "(1.0, 1.0, 1.0)", + "input": "tuple[float, float, float]", + "description": "Scaling vector", + }, + { + "type": "Quaternion", + "name": "rotation_left", + "default": "(0.0, 0.0, 0.0, 1.0)", + "input": "tuple[float, float, float, float]", + "description": "See :attr:`rotation_right`", + }, + { + "type": "Quaternion", + "name": "rotation_right", + "default": "(0.0, 0.0, 0.0, 1.0)", + "input": "tuple[float, float, float, float]", + "description": "Initial rotation. This tag corresponds to the right-singular vector matrix after the\n" + " matrix singular value decomposition. ", + }, + { + "type": "Byte", + "name": "billboard_constraint", + "default": 0, + "input": int, + "description": "Billboard Constraints (0 = FIXED, 1 = VERTICAL, 2 = HORIZONTAL, 3 = CENTER)\n" + " Controls if this entity should pivot to face player when rendered.", + }, + { # Might need a proxy later for the components + "type": "VarInt", + "name": "brightness_override", + "default": -1, + "input": int, + "description": "Brightness override (blockLight << 4 | skyLight << 20). By default the brightness\n" + " value is calculated from the light level of the block the entity is in.", + }, + { + "type": "Float", + "name": "view_range", + "default": 1.0, + "input": float, + "description": "View range", + }, + { + "type": "Float", + "name": "shadow_radius", + "default": 0.0, + "input": float, + "description": "Shadow radius. Value is treated as 64 when higher than 64.\n" + " If less than or equal to 0, the entity has no shadow. Interpolated", + }, + { + "type": "Float", + "name": "shadow_strength", + "default": 0.0, + "input": float, + "description": "Shadow strength. Interpolated", + }, + { + "type": "Float", + "name": "width", + "default": 0.0, + "input": float, + "description": "The maximum width of the entity. Rendering culling bounding box spans horizontally\n" + " `width/2` from entity position, and the part beyond will be culled. If set to 0, no culling on\n" + " both vertical and horizontal directions.", + }, + { + "type": "Float", + "name": "height", + "default": 0.0, + "input": float, + "description": "The maximum height of the entity. Rendering culling bounding box spans vertically\n" + " `y` to `y+height`, and the part beyond will be culled. If set to 0, no culling on both\n" + " vertical and horizontal directions.", + }, + { + "type": "VarInt", + "name": "glow_color_override", + "default": 0, + "input": int, + "description": "Overrides the glow border color. If 0, uses the color of the team that the display\n" + " entity is in.", + }, + ], + }, # End of Display + { # Block Display + "name": "BlockDisplay", + "description": "Entity that are used to render a block on the client as a Display entity.\n\n" + " https://minecraft.wiki/w/Display#Block_Displays", + "base": "Display", + "fields": [ + { + "type": "BlockState", + "name": "block", + "default": 0, # minecraft:air + "input": int, + "description": "The block state to display. Default is air.", + }, + ], + }, # End of Block Display + { # Item Display + "name": "ItemDisplay", + "description": "Entity that are used to render an item on the client as a Display entity.\n\n" + " https://minecraft.wiki/w/Display#Item_Displays", + "base": "Display", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", # empty + "input": "Slot", + "description": "The item to display. Default is an empty slot.", + }, + { + "type": "Byte", + "name": "display_type", + "default": 0, + "input": int, + "description": "Display type: (NONE, THIRD_PERSON_LEFT_HAND, THIRD_PERSON_RIGHT_HAND,\n" + " FIRST_PERSON_LEFT_HAND, FIRST_PERSON_RIGHT_HAND, HEAD, GUI, GROUND, FIXED).", + }, + ], + }, # End of Item Display + { # Text Display + "name": "TextDisplay", + "description": "Entity that are used to render text on the client as a Display entity.\n\n" + " https://minecraft.wiki/w/Display#Text_Displays", + "base": "Display", + "fields": [ + { + "type": "TextComponent", + "name": "text", + "default": 'TextComponent("")', # empty + "input": "TextComponent", + "description": "The text to display. Default is an empty text component.", + }, + { + "type": "VarInt", + "name": "line_width", + "default": 200, + "input": int, + "description": ": Maximum line width used to split lines (note: new line can also\n" + " be added with \\\\n characters).", + }, + { + "type": "VarInt", + "name": "background_color", + "default": 1073741824, + "input": int, + "description": "Background color of the text. Default is 0x40000000.", + }, + { + "name": "display_flags", + "type": "Byte", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "has_shadow", + "input": bool, + "description": "Whether the text is displayed with shadow.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_see_through", + "input": bool, + "description": "Whether the text is displayed as see-through.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "use_default_background", + "input": bool, + "description": "Whether to use the default background color for the text\n display.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "align_left", + "input": bool, + "description": "Whether the text is aligned to the left.\n" + " Has priority over right (see also :attr:`align_right`)", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "align_right", + "input": bool, + "description": "Whether the text is aligned to the right.\n" + " Set both to false for center alignment.", + "mask": 0x10, + }, + ], + "description": "Flags for the text display.", + }, + ], + }, + { # Thrown Item Projectile + "name": "ThrownItemProjectile", + "description": "Entity that represents a thrown item projectile.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", # empty + "input": "Slot", + "description": "The item that the projectile represents", + } + ], + }, + { # Thrown Egg + "name": "ThrownEgg", + "description": "Entity that represents a thrown egg projectile.", + "base": "ThrownItemProjectile", + "fields": [ + { + "type": "Slot", + "name": "item", + # Registries not implemented yet + "default": "Slot(present=True, item_id=NotImplemented, item_count=1)", + "input": "Slot", + } + ], + }, + { # Thrown Ender Pearl + "name": "ThrownEnderPearl", + "description": "Entity that represents a thrown ender pearl projectile.", + "base": "ThrownItemProjectile", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=True, item_id=NotImplemented, item_count=1)", # same + "input": "Slot", + } + ], + }, + { # Thrown Experience Bottle + "name": "ThrownExperienceBottle", + "description": "Entity that represents a thrown experience bottle projectile.", + "base": "ThrownItemProjectile", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=True, item_id=NotImplemented, item_count=1)", # same + "input": "Slot", + } + ], + }, + { # Thrown Potion + "name": "ThrownPotion", + "description": "Entity that represents a thrown potion projectile.", + "base": "ThrownItemProjectile", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=True, item_id=NotImplemented, item_count=1)", # same + "input": "Slot", + } + ], + }, + { # Thrown Snowball + "name": "ThrownSnowball", + "description": "Entity that represents a thrown snowball projectile.", + "base": "ThrownItemProjectile", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=True, item_id=NotImplemented, item_count=1)", # same + "input": "Slot", + } + ], + }, + { # Eye of Ender + "name": "EyeOfEnder", + "description": "Entity that represents an eye of ender.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", # behaves like a minecraft:ender_eye + "input": "Slot", + "description": "The item that the entity represents (usually an ender eye)", + } + ], + }, + { # Falling Block + "name": "FallingBlock", + "description": "Entity that represents a falling block.", + "base": "Entity", + "fields": [ + { + "type": "Position", + "name": "position", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The spawn position of the falling block", + }, + ], + }, + { + "name": "AreaEffectCloud", + "description": "Entity that represents an area effect cloud.", + "base": "Entity", + "fields": [ + { + "type": "Float", + "name": "radius", + "default": 0.5, + "input": float, + "description": "The radius of the area effect cloud.", + }, + { + "type": "VarInt", + "name": "color", + "default": 0, + "input": int, + "description": "Color of the cloud's particle effect. Only applicable for mob spell particles.", + }, + { + "type": "Boolean", + "name": "single_point_effect", + "default": False, + "input": bool, + "description": "Whether to ignore the radius and show the effect as a single point, not an area.", + }, + { + "type": "Particle", + "name": "effect", + "default": "(0, None)", + "input": "tuple[int, Any]", + "description": "The particle effect of the area effect cloud.", + }, + ], + }, + { # Fishing Hook + "name": "FishingHook", + "description": "Entity that represents a fishing hook.", + "base": "Entity", + "fields": [ + { + "type": "VarInt", + "name": "hooked_entity_id", + "default": 0, + "input": int, + "description": "The ID of the hooked entity plus one, or 0 if there is no hooked entity.", + }, + { + "type": "Boolean", + "name": "is_catchable", + "default": False, + "input": bool, + "description": "Whether the fishing hook is catchable.", + }, + ], + }, + { # Abstract Arrow + "name": "AbstractArrow", + "description": "Entity that represents an abstract arrow.", + "base": "Entity", + "fields": [ + { + "type": "Byte", + "name": "arrow_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_critical", + "input": bool, + "description": "Whether the arrow is critical.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_noclip", + "input": bool, + "description": "Whether the arrow is noclip (used by loyalty tridents when\n returning).", + "mask": 0x02, + }, + ], + "description": "Flags for the arrow.", + }, + { + "type": "Byte", + "name": "piercing_level", + "default": 0, + "input": int, + "description": "The piercing level of the arrow.", + }, + ], + }, + { # Arrow + "name": "Arrow", + "description": "Entity that represents an arrow.", + "base": "AbstractArrow", + "fields": [ + { + "type": "VarInt", + "name": "color", + "default": -1, + "input": int, + "description": "Color of the arrow's particles. Set to -1 for no particles.", + } + ], + }, + { # Spectral Arrow + "name": "SpectralArrow", + "description": "Entity that represents a spectral arrow.", + "base": "AbstractArrow", + "fields": [], + }, + { # Thrown Trident + "name": "ThrownTrident", + "description": "Entity that represents a thrown trident.", + "base": "AbstractArrow", + "fields": [ + { + "type": "VarInt", + "name": "loyalty_level", + "default": 0, + "input": int, + "description": "The loyalty level of the thrown trident (enchantment).", + }, + { + "type": "Boolean", + "name": "has_enchantment_glint", + "default": False, + "input": bool, + "description": "Whether the thrown trident has an enchantment glint.", + }, + ], + }, + { + "name": "AbstractVehicle", + "description": "Entity that represents an abstract vehicle.", + "base": "Entity", + "fields": [ + { + "type": "VarInt", + "name": "shaking_power", + "default": 0, + "input": int, + "description": "The shaking power of the vehicle.", + }, + { + "type": "VarInt", + "name": "shaking_direction", + "default": 1, + "input": int, + "description": "The shaking direction of the vehicle.", + }, + { + "type": "Float", + "name": "shaking_multiplier", + "default": 0.0, + "input": float, + "description": "The shaking multiplier of the vehicle.", + }, + ], + }, + { + "name": "Boat", + "description": "Entity that represents a boat.", + "base": "AbstractVehicle", + "fields": [ + { + "type": "VarInt", + "name": "boat_type", + "default": 0, + "input": int, + "description": "The type of the boat. (0 = oak, 1 = spruce, 2 = birch, 3 = jungle,\n" + " 4 = acacia, 5 = dark oak)", + }, + { + "type": "Boolean", + "name": "is_left_paddle_turning", + "default": False, + "input": bool, + "description": "Whether the left paddle of the boat is turning.", + }, + { + "type": "Boolean", + "name": "is_right_paddle_turning", + "default": False, + "input": bool, + "description": "Whether the right paddle of the boat is turning.", + }, + { + "type": "VarInt", + "name": "splash_timer", + "default": 0, + "input": int, + "description": "The splash timer of the boat.", + }, + ], + }, + { + "name": "ChestBoat", + "description": "Entity that represents a chest boat.", + "base": "Boat", + "fields": [], + }, + { + "name": "AbstractMinecart", + "description": "Entity that represents an abstract minecart.", + "base": "AbstractVehicle", + "fields": [ + { + "type": "VarInt", + "name": "custom_block_id_and_damage", + "default": 0, + "input": int, + "description": "The custom block ID and damage of the minecart.", + }, + { + "type": "VarInt", + "name": "custom_block_y_position", + "default": 6, + "input": int, + "description": "The custom block Y position (in 16ths of a block) of the minecart.", + }, + { + "type": "Boolean", + "name": "show_custom_block", + "default": False, + "input": bool, + "description": "Whether to show the custom block of the minecart.", + }, + ], + }, + { + "name": "Minecart", + "description": "Entity that represents a minecart.", + "base": "AbstractMinecart", + "fields": [], + }, + { + "name": "AbstractMinecartContainer", + "description": "Entity that represents an abstract minecart container.", + "base": "AbstractMinecart", + "fields": [], + }, + { + "name": "MinecartHopper", + "description": "Entity that represents a minecart hopper.", + "base": "AbstractMinecartContainer", + "fields": [], + }, + { + "name": "MinecartChest", + "description": "Entity that represents a minecart chest.", + "base": "AbstractMinecartContainer", + "fields": [], + }, + { + "name": "MinecartFurnace", + "description": "Entity that represents a minecart furnace.", + "base": "AbstractMinecart", + "fields": [ + { + "type": "Boolean", + "name": "has_fuel", + "default": False, + "input": bool, + "description": "Whether the furnace minecart has fuel.", + } + ], + }, + { + "name": "MinecartTNT", + "description": "Entity that represents a minecart TNT.", + "base": "AbstractMinecart", + "fields": [], + }, + { + "name": "MinecartSpawner", + "description": "Entity that represents a minecart spawner.", + "base": "AbstractMinecart", + "fields": [], + }, + { + "name": "MinecartCommandBlock", + "description": "Entity that represents a minecart command block.", + "base": "AbstractMinecart", + "fields": [ + { + "type": "String", + "name": "command", + "default": "", + "input": str, + "description": "The command stored in the command block.", + }, + { + "type": "TextComponent", + "name": "last_output", + "default": 'TextComponent("")', + "input": "TextComponent", + "description": "The last output from the command block.", + }, + ], + }, + { + "name": "EndCrystal", + "description": "Entity that represents an end crystal.", + "base": "Entity", + "fields": [ + { + "type": "OptPosition", + "name": "beam_target", + "default": "None", + "input": "tuple[int, int, int]|None", + "description": "The position of the beam target.", + }, + { + "type": "Boolean", + "name": "show_bottom", + "default": True, + "input": bool, + "description": "Whether the bottom of the end crystal is shown.", + }, + ], + }, + { + "name": "DragonFireball", + "description": "Entity that represents a dragon fireball.", + "base": "Entity", + "fields": [], + }, + { + "name": "SmallFireball", + "description": "Entity that represents a small fireball.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", + "input": "Slot", + "description": "The item representing the small fireball.", + } + ], + }, + { + "name": "Fireball", + "description": "Entity that represents a fireball.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", + "input": "Slot", + "description": "The item representing the fireball.", + } + ], + }, + { + "name": "WitherSkull", + "description": "Entity that represents a wither skull.", + "base": "Entity", + "fields": [ + { + "type": "Boolean", + "name": "is_invulnerable", + "default": False, + "input": bool, + "description": "Whether the wither skull is invulnerable.", + } + ], + }, + { + "name": "FireworkRocket", + "description": "Entity representing a firework rocket.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "firework_info", + "default": "Slot(present=False)", + "input": "Slot", + "description": "The information about the firework.", + }, + { + "type": "OptVarInt", + "name": "shooter_entity_id", + "default": "None", + "input": "int|None", + "description": "The entity ID of the entity that used the firework (for elytra boosting).", + }, + { + "type": "Boolean", + "name": "shot_at_angle", + "default": False, + "input": bool, + "description": "Whether the firework rocket was shot at an angle (from a crossbow).", + }, + ], + }, + { + "name": "ItemFrame", + "description": "Entity representing an item frame.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", + "input": "Slot", + "description": "The item in the item frame.", + }, + { + "type": "VarInt", + "name": "rotation", + "default": 0, + "input": int, + "description": "The rotation of the item frame.", + }, + ], + }, + { + "name": "GlowingItemFrame", + "description": "Entity representing a glowing item frame.", + "base": "ItemFrame", + "fields": [], + }, + { + "name": "Painting", + "description": "Entity representing a painting.", + "base": "Entity", + "fields": [ + { + "type": "PaintingVariant", + "name": "painting_type", + "default": 0, + "input": "int", + "description": "The type of painting variant.", + } + ], + }, + { + "name": "ItemEntity", + "description": "Entity representing an item.", + "base": "Entity", + "fields": [ + { + "type": "Slot", + "name": "item", + "default": "Slot(present=False)", + "input": "Slot", + "description": "The item in the item entity.", + } + ], + }, + { + "name": "LivingEntity", + "description": "Entity that represents a living entity.", + "base": "Entity", + "fields": [ + { + "type": "Byte", + "name": "hand_states", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_hand_active", + "input": bool, + "description": "Whether the hand is active.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "active_hand", + "input": int, + "description": "Which hand is active (0 = main hand, 1 = offhand).", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "is_riptide_spin_attack", + "input": bool, + "description": "Whether the entity is in riptide spin attack.", + "mask": 0x04, + }, + ], + "description": "Bit mask indicating hand states.", + }, + { + "type": "Float", + "name": "health", + "default": 1.0, + "input": float, + "description": "The health of the living entity.", + }, + { + "type": "VarInt", + "name": "potion_effect_color", + "default": 0, + "input": int, + "description": "Color of the potion effect (or 0 if there is no effect).", + }, + { + "type": "Boolean", + "name": "is_potion_effect_ambient", + "default": False, + "input": bool, + "description": "Whether the potion effect is ambient: reduces the number of particles generated by\n" + " potions to 1/5 the normal amount.", + }, + { + "type": "VarInt", + "name": "num_arrows", + "default": 0, + "input": int, + "description": "Number of arrows in the entity.", + }, + { + "type": "VarInt", + "name": "num_bee_stingers", + "default": 0, + "input": int, + "description": "Number of bee stingers in the entity.", + }, + { + "type": "OptPosition", + "name": "sleeping_bed_location", + "default": "None", + "input": "Position|None", + "description": "Location of the bed that the entity is currently sleeping\n" + " in (Empty if it isn't sleeping).", + }, + ], + }, + { + "name": "Player", + "description": "Player entity.", + "base": "LivingEntity", + "fields": [ + { + "type": "Float", + "name": "additional_hearts", + "default": 0.0, + "input": float, + "description": "Additional hearts of the player.", + }, + { + "type": "VarInt", + "name": "score", + "default": 0, + "input": int, + "description": "The score of the player.", + }, + { + "type": "Byte", + "name": "displayed_skin_parts", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "cape_enabled", + "input": bool, + "description": "Whether the cape is enabled.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "jacket_enabled", + "input": bool, + "description": "Whether the jacket is enabled.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "left_sleeve_enabled", + "input": bool, + "description": "Whether the left sleeve is enabled.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "right_sleeve_enabled", + "input": bool, + "description": "Whether the right sleeve is enabled.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "left_pants_leg_enabled", + "input": bool, + "description": "Whether the left pants leg is enabled.", + "mask": 0x10, + }, + { + "type": "Masked", + "name": "right_pants_leg_enabled", + "input": bool, + "description": "Whether the right pants leg is enabled.\n" " ", + "mask": 0x20, + }, + { + "type": "Masked", + "name": "hat_enabled", + "input": bool, + "description": "Whether the hat is enabled.", + "mask": 0x40, + }, + ], + "description": "Bit mask indicating displayed skin parts.", + }, + { + "type": "Byte", + "name": "main_hand", + "default": 1, + "input": int, + "description": "The main hand of the player (0: Left, 1: Right).", + }, + { + "type": "NBTag", + "name": "left_shoulder_entity_data", + "default": "EndNBT()", + "input": "NBTag", + "description": "Left shoulder entity data (for occupying parrot).", + }, + { + "type": "NBTag", + "name": "right_shoulder_entity_data", + "default": "EndNBT()", + "input": "NBTag", + "description": "Right shoulder entity data (for occupying parrot).", + }, + ], + }, + { + "name": "ArmorStand", + "description": "Entity representing an armor stand.", + "base": "LivingEntity", + "fields": [ + { + "type": "Byte", + "name": "armorstand_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_small", + "input": bool, + "description": "Whether the armor stand is small.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "has_arms", + "input": bool, + "description": "Whether the armor stand has arms.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "has_no_base_plate", + "input": bool, + "description": "Whether the armor stand has no base plate.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "is_marker", + "input": bool, + "description": "Whether the armor stand is a marker.", + "mask": 0x10, + }, + ], + "description": "Bit mask indicating various properties of the armor stand.", + }, + { + "type": "Rotation", + "name": "head_rotation", + "default": "(0.0, 0.0, 0.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's head.", + }, + { + "type": "Rotation", + "name": "body_rotation", + "default": "(0.0, 0.0, 0.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's body.", + }, + { + "type": "Rotation", + "name": "left_arm_rotation", + "default": "(-10.0, 0.0, -10.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's left arm.", + }, + { + "type": "Rotation", + "name": "right_arm_rotation", + "default": "(-15.0, 0.0, 10.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's right arm.", + }, + { + "type": "Rotation", + "name": "left_leg_rotation", + "default": "(-1.0, 0.0, -1.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's left leg.", + }, + { + "type": "Rotation", + "name": "right_leg_rotation", + "default": "(1.0, 0.0, 1.0)", + "input": "tuple[float, float, float]", + "description": "Rotation of the armor stand's right leg.", + }, + ], + }, + { + "name": "Mob", + "description": "Generic mobile entity.", + "base": "LivingEntity", + "fields": [ + { + "type": "Byte", + "name": "mob_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "no_ai", + "input": bool, + "description": "Whether the mob has AI.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_left_handed", + "input": bool, + "description": "Whether the mob is left-handed.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "is_aggressive", + "input": bool, + "description": "Whether the mob is aggressive.", + "mask": 0x04, + }, + ], + "description": "Bit mask indicating various properties of the mob.", + } + ], + }, + { + "name": "AmbientCreature", + "description": "Entity that represents an ambient creature.", + "base": "Mob", + "fields": [], + }, + { + "name": "Bat", + "description": "Entity that represents a bat.", + "base": "AmbientCreature", + "fields": [ + { + "type": "Byte", + "name": "bat_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_hanging", + "input": bool, + "description": "Whether the bat is hanging upside down.", + "mask": 0x01, + } + ], + "description": "Flags of the bat.", + } + ], + }, + { + "name": "PathfinderMob", + "description": "Entity that represents a pathfinder mob.", + "base": "Mob", + "fields": [], + }, + { + "name": "WaterAnimal", + "description": "Entity that represents a water-dwelling animal.", + "base": "PathfinderMob", + "fields": [], + }, + { + "name": "Squid", + "description": "Entity that represents a squid.", + "base": "WaterAnimal", + "fields": [], + }, + { + "name": "Dolphin", + "description": "Entity that represents a dolphin.", + "base": "WaterAnimal", + "fields": [ + { + "type": "Position", + "name": "treasure_position", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The position of the dolphin's treasure.", + }, + { + "type": "Boolean", + "name": "has_fish", + "default": False, + "input": bool, + "description": "Whether the dolphin has fish.", + }, + { + "type": "VarInt", + "name": "moisture_level", + "default": 2400, + "input": int, + "description": "The moisture level of the dolphin.", + }, + ], + }, + { + "name": "AbstractFish", + "description": "Entity that represents an abstract fish.", + "base": "WaterAnimal", + "fields": [ + { + "type": "Boolean", + "name": "from_bucket", + "default": False, + "input": bool, + "description": "Whether the fish is from a bucket.", + } + ], + }, + { + "name": "Cod", + "description": "Entity that represents a cod fish.", + "base": "AbstractFish", + "fields": [], + }, + { + "name": "PufferFish", + "description": "Entity that represents a puffer fish.", + "base": "AbstractFish", + "fields": [ + { + "type": "VarInt", + "name": "puff_state", + "default": 0, + "input": int, + "description": "The state of puffing of the puffer fish, varies from 0 to 2.", + } + ], + }, + {"name": "Salmon", "description": "Entity that represents a salmon fish.", "base": "AbstractFish", "fields": []}, + { + "name": "TropicalFish", + "description": "Entity that represents a tropical fish.", + "base": "AbstractFish", + "fields": [ + { + "type": "VarInt", + "name": "variant", + "default": 0, + "input": int, + "description": "The variant of the tropical fish.", + } + ], + }, + {"name": "Tadpole", "description": "Entity that represents a tadpole.", "base": "AbstractFish", "fields": []}, + { + "name": "AgeableMob", + "description": "Entity that represents an ageable mob.", + "base": "PathfinderMob", + "fields": [ + { + "type": "Boolean", + "name": "is_baby", + "default": False, + "input": bool, + "description": "Whether the mob is a baby.", + } + ], + }, + { + "name": "Animal", + "description": "Entity that represents an animal.", + "base": "AgeableMob", + "fields": [], + }, + { + "name": "Sniffer", + "description": "Entity that represents a sniffer.", + "base": "Animal", + "fields": [ + { + "type": "SnifferState", + "name": "sniffer_state", + "default": "IDLING", + "input": "SnifferState", + "enum": True, + "description": "The state of the sniffer.", + }, + { + "type": "VarInt", + "name": "drop_seed_at_tick", + "default": 0, + "input": int, + "description": "The tick at which the sniffer will drop seed.", + }, + ], + }, + { + "name": "AbstractHorse", + "description": "Entity that represents an abstract horse.", + "base": "Animal", + "fields": [ + { + "type": "Byte", + "name": "horse_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_tame", + "input": bool, + "description": "Whether the horse is tame.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "is_saddled", + "input": bool, + "description": "Whether the horse is saddled.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "has_bred", + "input": bool, + "description": "Whether the horse has bred.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "is_eating", + "input": bool, + "description": "Whether the horse is eating.", + "mask": 0x10, + }, + { + "type": "Masked", + "name": "is_rearing", + "input": bool, + "description": "Whether the horse is rearing (on hind legs).", + "mask": 0x20, + }, + { + "type": "Masked", + "name": "is_mouth_open", + "input": bool, + "description": "Whether the horse's mouth is open.", + "mask": 0x40, + }, + ], + "description": "Flags for the horse.", + } + ], + }, + { + "name": "Horse", + "description": "Entity that represents a horse.", + "base": "AbstractHorse", + "fields": [ + { + "type": "VarInt", + "name": "variant", + "default": 0, + "input": int, + "description": "The variant of the horse representing its color and style.", + } + ], + }, + { + "name": "ZombieHorse", + "description": "Entity that represents a zombie horse.", + "base": "AbstractHorse", + "fields": [], + }, + { + "name": "SkeletonHorse", + "description": "Entity that represents a skeleton horse.", + "base": "AbstractHorse", + "fields": [], + }, + { + "name": "Camel", + "description": "Entity that represents a camel.", + "base": "AbstractHorse", + "fields": [ + { + "type": "Boolean", + "name": "is_dashing", + "default": False, + "input": bool, + "description": "Whether the camel is dashing.", + }, + { + "type": "VarLong", + "name": "last_pose_change_tick", + "default": 0, + "input": int, + "description": "The tick at which the camel's pose was last changed.", + }, + ], + }, + { + "name": "ChestedHorse", + "description": "Entity that represents a horse with a chest.", + "base": "AbstractHorse", + "fields": [ + { + "type": "Boolean", + "name": "has_chest", + "default": False, + "input": bool, + "description": "Whether the horse has a chest.", + } + ], + }, + { + "name": "Donkey", + "description": "Entity that represents a donkey.", + "base": "ChestedHorse", + "fields": [], + }, + { + "name": "Llama", + "description": "Entity that represents a llama.", + "base": "ChestedHorse", + "fields": [ + { + "type": "VarInt", + "name": "strength", + "default": 0, + "input": int, + "description": "The strength of the llama, representing the number of columns of 3 slots in its\n" + " inventory once a chest is equipped.", + }, + { + "type": "VarInt", + "name": "carpet_color", + "default": -1, + "input": int, + "description": "The color of the carpet equipped on the llama, represented as a dye color. -1 if no\n" + " carpet is equipped.", + }, + { + "type": "VarInt", + "name": "variant", + "default": 0, + "input": int, + "description": "The variant of the llama.", + }, + ], + }, + {"name": "TraderLlama", "description": "Entity that represents a trader llama.", "base": "Llama", "fields": []}, + {"name": "Mule", "description": "Entity that represents a mule.", "base": "ChestedHorse", "fields": []}, + { + "name": "Axolotl", + "description": "Entity that represents an axolotl.", + "base": "Animal", + "fields": [ + { + "type": "VarInt", + "name": "variant", + "default": 0, + "input": int, + "description": "The variant of the axolotl.", + }, + { + "type": "Boolean", + "name": "is_playing_dead", + "default": False, + "input": bool, + "description": "Whether the axolotl is currently playing dead.", + }, + { + "type": "Boolean", + "name": "is_spawned_from_bucket", + "default": False, + "input": bool, + "description": "Whether the axolotl was spawned from a bucket.", + }, + ], + }, + { + "name": "Bee", + "description": "Entity that represents a bee.", + "base": "Animal", + "fields": [ + { + "type": "Byte", + "name": "bee_flags", + "default": 0, + "input": int, + "available": False, + "description": "Flags representing various properties of the bee.", + "proxy": [ + { + "type": "Masked", + "name": "is_angry", + "input": bool, + "description": "Whether the bee is angry.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "has_stung", + "input": bool, + "description": "Whether the bee has stung.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "has_nectar", + "input": bool, + "description": "Whether the bee has nectar.", + "mask": 0x08, + }, + ], + }, + { + "type": "VarInt", + "name": "anger_time", + "default": 0, + "input": int, + "description": "The time in ticks for which the bee remains angry.", + }, + ], + }, + { + "name": "Fox", + "description": "Entity that represents a fox.", + "base": "Animal", + "fields": [ + { + "type": "VarInt", + "name": "fox_type", + "default": 0, + "input": int, + "description": "The type of the fox.", + }, + { + "type": "Byte", + "name": "fox_flags", + "default": 0, + "input": int, + "available": False, + "description": "Bit mask representing various states of the fox.", + "proxy": [ + { + "type": "Masked", + "name": "is_sitting", + "input": bool, + "description": "Whether the fox is sitting.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_fox_crouching", + "input": bool, + "description": "Whether the fox is crouching.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "is_interested", + "input": bool, + "description": "Whether the fox is interested.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "is_pouncing", + "input": bool, + "description": "Whether the fox is pouncing.", + "mask": 0x10, + }, + { + "type": "Masked", + "name": "is_sleeping", + "input": bool, + "description": "Whether the fox is sleeping.", + "mask": 0x20, + }, + { + "type": "Masked", + "name": "is_faceplanted", + "input": bool, + "description": "Whether the fox is faceplanted.", + "mask": 0x40, + }, + { + "type": "Masked", + "name": "is_defending", + "input": bool, + "description": "Whether the fox is defending.", + "mask": 0x80, + }, + ], + }, + { + "type": "OptUUID", + "name": "trusted_uuid", + "default": "None", + "input": "UUID|None", + "description": "The UUID of the player that the fox trusts.", + }, + { + "type": "OptUUID", + "name": "trusted_uuid_2", + "default": "None", + "input": "UUID|None", + "description": "Another player that the fox trusts.", + }, + ], + }, + { + "name": "Frog", + "description": "Entity that represents a frog.", + "base": "Animal", + "fields": [ + { + "type": "FrogVariant", + "name": "variant", + "default": 0, # No registry yet + "input": "int", + "description": "The variant of the frog.", + }, + { + "type": "OptVarInt", + "name": "tongue_target", + "default": 0, + "input": int, + "description": "The target of the frog's tongue.", + }, + ], + }, + { + "name": "Ocelot", + "description": "Entity that represents an ocelot.", + "base": "Animal", + "fields": [ + { + "type": "Boolean", + "name": "is_trusting", + "default": False, + "input": bool, + "description": "Whether the ocelot is trusting.", + } + ], + }, + { + "name": "Panda", + "description": "Entity that represents a panda.", + "base": "Animal", + "fields": [ + { + "type": "VarInt", + "name": "breed_timer", + "default": 0, + "input": int, + "description": "The breed timer of the panda.", + }, + { + "type": "VarInt", + "name": "sneeze_timer", + "default": 0, + "input": int, + "description": "The sneeze timer of the panda.", + }, + { + "type": "VarInt", + "name": "eat_timer", + "default": 0, + "input": int, + "description": "The eat timer of the panda.", + }, + { + "type": "Byte", + "name": "main_gene", + "default": 0, + "input": int, + "description": "The main gene of the panda.", + }, + { + "type": "Byte", + "name": "hidden_gene", + "default": 0, + "input": int, + "description": "The hidden gene of the panda.", + }, + { + "type": "Byte", + "name": "panda_flags", + "default": 0, + "input": int, + "available": False, + "description": "Bit mask representing various states of the panda.", + "proxy": [ + { + "type": "Masked", + "name": "is_sneezing", + "input": bool, + "description": "Whether the panda is sneezing.", + "mask": 0x02, + }, + { + "type": "Masked", + "name": "is_rolling", + "input": bool, + "description": "Whether the panda is rolling.", + "mask": 0x04, + }, + { + "type": "Masked", + "name": "is_sitting", + "input": bool, + "description": "Whether the panda is sitting.", + "mask": 0x08, + }, + { + "type": "Masked", + "name": "is_on_back", + "input": bool, + "description": "Whether the panda is on its back.", + "mask": 0x10, + }, + ], + }, + ], + }, + { + "name": "Pig", + "description": "Entity that represents a pig.", + "base": "Animal", + "fields": [ + { + "type": "Boolean", + "name": "has_saddle", + "default": False, + "input": bool, + "description": "Whether the pig has a saddle.", + }, + { + "type": "VarInt", + "name": "boost_time", + "default": 0, + "input": int, + "description": "Total time to 'boost' with a carrot on a stick for.", + }, + ], + }, + { + "name": "Rabbit", + "description": "Entity that represents a rabbit.", + "base": "Animal", + "fields": [ + { + "type": "VarInt", + "name": "rabbit_type", + "default": 0, + "input": int, + "description": "The type of the rabbit.", + } + ], + }, + { + "name": "Turtle", + "description": "Entity that represents a turtle.", + "base": "Animal", + "fields": [ + { + "type": "Position", + "name": "home_pos", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The home position of the turtle.", + }, + { + "type": "Boolean", + "name": "has_egg", + "default": False, + "input": bool, + "description": "Whether the turtle has an egg.", + }, + { + "type": "Boolean", + "name": "is_laying_egg", + "default": False, + "input": bool, + "description": "Whether the turtle is laying an egg.", + }, + { + "type": "Position", + "name": "travel_pos", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The travel position of the turtle.", + }, + { + "type": "Boolean", + "name": "is_going_home", + "default": False, + "input": bool, + "description": "Whether the turtle is going home.", + }, + { + "type": "Boolean", + "name": "is_traveling", + "default": False, + "input": bool, + "description": "Whether the turtle is traveling.", + }, + ], + }, + { + "name": "PolarBear", + "description": "Entity that represents a polar bear.", + "base": "Animal", + "fields": [ + { + "type": "Boolean", + "name": "is_standing_up", + "default": False, + "input": bool, + "description": "Whether the polar bear is standing up.", + } + ], + }, + { # Chicken + "name": "Chicken", + "description": "Entity representing a chicken.", + "base": "Animal", + "fields": [], + }, + { # Cow + "name": "Cow", + "description": "Entity representing a cow.", + "base": "Animal", + "fields": [], + }, + { # Mooshroom + "name": "Mooshroom", + "description": "Entity representing a mooshroom.", + "base": "Cow", + "fields": [ + { + "type": "String", + "name": "variant", + "default": "red", + "input": str, + "description": "The variant of the mooshroom: 'red' or 'brown'.", + } + ], + }, + { # Hoglin + "name": "Hoglin", + "description": "Entity representing a hoglin.", + "base": "Animal", + "fields": [ + { + "type": "Boolean", + "name": "immune_to_zombification", + "default": False, + "input": bool, + "description": "Whether the hoglin is immune to zombification.", + } + ], + }, + { # Sheep + "name": "Sheep", + "description": "Entity representing a sheep.", + "base": "Animal", + "fields": [ + { + "type": "Byte", + "name": "sheep_data", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "color_id", + "input": int, + "description": "The color of the sheep.", + "mask": 0x0F, + }, + { + "type": "Masked", + "name": "is_sheared", + "input": bool, + "description": "Whether the sheep is sheared.", + "mask": 0x10, + }, + ], + "description": "Data of the sheep.", + } + ], + }, + { # Strider + "name": "Strider", + "description": "Entity representing a strider.", + "base": "Animal", + "fields": [ + { + "type": "VarInt", + "name": "boost_duration", + "default": 0, + "input": int, + "description": "Total time to 'boost' with warped fungus on a stick.", + }, + { + "type": "Boolean", + "name": "is_shaking", + "default": False, + "input": bool, + "description": "Whether the strider is shaking. (True unless riding a vehicle or on or in a block\n" + " tagged with strider_warm_blocks (default: lava))", + }, + { + "type": "Boolean", + "name": "has_saddle", + "default": False, + "input": bool, + "description": "Whether the strider has a saddle.", + }, + ], + }, + { # Goat + "name": "Goat", + "description": "Entity representing a goat.", + "base": "Animal", + "fields": [ + { + "type": "Boolean", + "name": "is_screaming_goat", + "default": False, + "input": bool, + "description": "Whether the goat is a screaming goat.", + }, + { + "type": "Boolean", + "name": "has_left_horn", + "default": True, + "input": bool, + "description": "Whether the goat has a left horn.", + }, + { + "type": "Boolean", + "name": "has_right_horn", + "default": True, + "input": bool, + "description": "Whether the goat has a right horn.", + }, + ], + }, + { # Tameable Animal + "name": "TameableAnimal", + "description": "Entity representing a tameable animal.", + "base": "Animal", + "fields": [ + { + "type": "Byte", + "name": "tameable_data", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_sitting", + "input": bool, + "description": "Whether the animal is sitting.", + "mask": 0x01, + }, + { + "type": "Masked", + "name": "is_tamed", + "input": bool, + "description": "Whether the animal is tamed.", + "mask": 0x04, + }, + ], + "description": "Data of the tameable animal.", + }, + { + "type": "OptUUID", + "name": "owner_uuid", + "default": "None", + "input": "UUID|None", + "description": "The UUID of the owner, if the animal is tamed.", + }, + ], + }, + { # Cat + "name": "Cat", + "description": "Entity representing a cat.", + "base": "TameableAnimal", + "fields": [ + { + "type": "CatVariant", + "name": "cat_variant", + "default": 0, # No registry yet + "input": int, + "description": "The variant of the cat.", + }, + { + "type": "Boolean", + "name": "is_lying", + "default": False, + "input": bool, + "description": "Whether the cat is lying down.", + }, + { + "type": "Boolean", + "name": "is_relaxed", + "default": False, + "input": bool, + "description": "Unknown use. When true, the cat's head goes slightly upwards.", + }, + { + "type": "VarInt", + "name": "collar_color", + "default": 14, + "input": int, + "description": "The color of the cat's collar, using dye values.", + }, + ], + }, + { # Wolf + "name": "Wolf", + "description": "Entity representing a wolf.", + "base": "TameableAnimal", + "fields": [ + { + "type": "Boolean", + "name": "is_begging", + "default": False, + "input": bool, + "description": "Whether the wolf is begging.", + }, + { + "type": "VarInt", + "name": "collar_color", + "default": 14, + "input": int, + "description": "The color of the wolf's collar, using dye values.", + }, + { + "type": "VarInt", + "name": "anger_time", + "default": 0, + "input": int, + "description": "The time for which the wolf remains angry.", + }, + ], + }, + { # Parrot + "name": "Parrot", + "description": "Entity representing a parrot.", + "base": "TameableAnimal", + "fields": [ + { + "type": "VarInt", + "name": "variant", + "default": 0, + "input": int, + "description": "The variant of the parrot.", + } + ], + }, + { # Abstract Villager + "name": "AbstractVillager", + "description": "Entity representing an abstract villager.", + "base": "AgeableMob", + "fields": [ + { + "type": "VarInt", + "name": "head_shake_timer", + "default": 0, + "input": int, + "description": "The head shake timer of the villager, starting at 40 and decrementing each tick.", + } + ], + }, + { # Villager + "name": "Villager", + "description": "Entity representing a villager.", + "base": "AbstractVillager", + "fields": [ + { + "type": "VillagerData", + "name": "villager_data", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The data associated with the villager.", + } + ], + }, + { # Wandering Trader + "name": "WanderingTrader", + "description": "Entity representing a wandering trader.", + "base": "AbstractVillager", + "fields": [], + }, + { # Abstract Golem + "name": "AbstractGolem", + "description": "Entity representing an abstract golem.", + "base": "PathfinderMob", + "fields": [], + }, + { # Iron Golem + "name": "IronGolem", + "description": "Entity representing an iron golem.", + "base": "AbstractGolem", + "fields": [ + { + "type": "Byte", + "name": "iron_golem_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_player_created", + "input": bool, + "description": "Whether the iron golem was created by a player.", + "mask": 0x01, + } + ], + "description": "Flags of the iron golem.", + } + ], + }, + { # Snow Golem + "name": "SnowGolem", + "description": "Entity representing a snow golem.", + "base": "AbstractGolem", + "fields": [ + { + "type": "Byte", + "name": "snow_golem_flags", + "default": 0x10, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "has_pumpkin", + "input": bool, + "description": "Whether the snow golem has a pumpkin on its head.", + "mask": 0x10, + }, + ], + "description": "Flags of the snow golem.", + } + ], + }, + { # Shulker + "name": "Shulker", + "description": "Entity representing a shulker.", + "base": "AbstractGolem", + "fields": [ + { + "type": "Direction", + "name": "attach_face", + "default": "DOWN", + "enum": True, + "input": "Direction", + "description": "The face to which the shulker is attached.", + }, + { + "type": "Byte", + "name": "shield_height", + "default": 0, + "input": int, + "description": "The shield height of the shulker.", + }, + { + "type": "Byte", + "name": "color", + "default": 16, + "input": int, + "description": "The color of the shulker, using dye color values.", + }, + ], + }, + { # Monster + "name": "Monster", + "description": "Entity representing a monster.", + "base": "PathfinderMob", + "fields": [], + }, + { # Base Piglin + "name": "BasePiglin", + "description": "Entity representing a base piglin.", + "base": "Monster", + "fields": [ + { + "type": "Boolean", + "name": "is_immune_to_zombification", + "default": False, + "input": bool, + "description": "Indicates if the piglin is immune to zombification.", + } + ], + }, + { # Piglin + "name": "Piglin", + "description": "Entity representing a piglin.", + "base": "BasePiglin", + "fields": [ + { + "type": "Boolean", + "name": "is_baby", + "default": False, + "input": bool, + "description": "Indicates if the piglin is a baby.", + }, + { + "type": "Boolean", + "name": "is_charging_crossbow", + "default": False, + "input": bool, + "description": "Indicates if the piglin is charging a crossbow.", + }, + { + "type": "Boolean", + "name": "is_dancing", + "default": False, + "input": bool, + "description": "Indicates if the piglin is dancing.", + }, + ], + }, + { # Piglin Brute + "name": "PiglinBrute", + "description": "Entity representing a piglin brute.", + "base": "BasePiglin", + "fields": [], + }, + { # Blaze + "name": "Blaze", + "description": "Entity representing a blaze.", + "base": "Monster", + "fields": [ + { + "type": "Byte", + "name": "blaze_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_blaze_on_fire", + "input": bool, + "description": "Whether the blaze is on fire.", + "mask": 0x01, + }, + ], + "description": "Flags of the blaze.", + } + ], + }, + { # Creeper + "name": "Creeper", + "description": "Entity representing a creeper.", + "base": "Monster", + "fields": [ + { + "type": "VarInt", + "name": "state", + "default": -1, + "input": int, + "description": "The state of the creeper (-1 = idle, 1 = fuse).", + }, + { + "type": "Boolean", + "name": "is_charged", + "default": False, + "input": bool, + "description": "Indicates if the creeper is charged.", + }, + { + "type": "Boolean", + "name": "is_ignited", + "default": False, + "input": bool, + "description": "Indicates if the creeper is ignited.", + }, + ], + }, + { # Endermite + "name": "Endermite", + "description": "Entity representing an endermite.", + "base": "Monster", + "fields": [], + }, + { # Giant + "name": "Giant", + "description": "Entity representing a giant.", + "base": "Monster", + "fields": [], + }, + { # Guardian + "name": "Guardian", + "description": "Entity representing a guardian.", + "base": "Monster", + "fields": [ + { + "type": "Boolean", + "name": "is_retracting_spikes", + "default": False, + "input": bool, + "description": "Indicates if the guardian is retracting spikes.", + }, + { + "type": "VarInt", + "name": "target_eid", + "default": 0, + "input": int, + "description": "The Entity ID of the target.", + }, + ], + }, + { # Elder Guardian + "name": "ElderGuardian", + "description": "Entity representing an elder guardian.", + "base": "Guardian", + "fields": [], + }, + { # Silverfish + "name": "Silverfish", + "description": "Entity representing a silverfish.", + "base": "Monster", + "fields": [], + }, + { # Raider + "name": "Raider", + "description": "Entity representing a raider.", + "base": "Monster", + "fields": [ + { + "type": "Boolean", + "name": "is_celebrating", + "default": False, + "input": bool, + "description": "Indicates if the raider is celebrating.", + } + ], + }, + { # Abstract Illager + "name": "AbstractIllager", + "description": "Entity representing an abstract illager.", + "base": "Raider", + "fields": [], + }, + { # Vindicator + "name": "Vindicator", + "description": "Entity representing a vindicator.", + "base": "AbstractIllager", + "fields": [], + }, + { # Pillager + "name": "Pillager", + "description": "Entity representing a pillager.", + "base": "AbstractIllager", + "fields": [ + { + "type": "Boolean", + "name": "is_charging", + "default": False, + "input": bool, + "description": "Indicates if the pillager is charging.", + } + ], + }, + { # Spellcaster Illager + "name": "SpellcasterIllager", + "description": "Entity representing a spellcaster illager.", + "base": "AbstractIllager", + "fields": [ + { + "type": "Byte", + "name": "spell", + "default": 0, + "input": int, + "description": "The type of spell the illager is casting. (0: none, 1: summon vex, 2: attack,\n" + " 3: wololo, 4: disappear, 5: blindness)", + } + ], + }, + { # Evoker + "name": "Evoker", + "description": "Entity representing an evoker.", + "base": "SpellcasterIllager", + "fields": [], + }, + { # Illusioner + "name": "Illusioner", + "description": "Entity representing an illusioner.", + "base": "SpellcasterIllager", + "fields": [], + }, + { # Ravager + "name": "Ravager", + "description": "Entity representing a ravager.", + "base": "Raider", + "fields": [], + }, + { # Witch + "name": "Witch", + "description": "Entity representing a witch.", + "base": "Raider", + "fields": [ + { + "type": "Boolean", + "name": "is_drinking_potion", + "default": False, + "input": bool, + "description": "Indicates if the witch is drinking a potion.", + } + ], + }, + { # Evoker Fangs + "name": "EvokerFangs", + "description": "Entity representing evoker fangs.", + "base": "Entity", + "fields": [], + }, + { # Vex + "name": "Vex", + "description": "Entity representing a vex.", + "base": "Monster", + "fields": [ + { + "type": "Byte", + "name": "vex_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_attacking", + "input": bool, + "description": "Indicates if the vex is charging.", + "mask": 0x01, + }, + ], + "description": "Flags of the vex.", + } + ], + }, + { # Abstract Skeleton + "name": "AbstractSkeleton", + "description": "Entity representing an abstract skeleton.", + "base": "Monster", + "fields": [], + }, + { # Skeleton + "name": "Skeleton", + "description": "Entity representing a skeleton.", + "base": "AbstractSkeleton", + "fields": [], + }, + { # Wither Skeleton + "name": "WitherSkeleton", + "description": "Entity representing a wither skeleton.", + "base": "AbstractSkeleton", + "fields": [], + }, + { # Stray + "name": "Stray", + "description": "Entity representing a stray skeleton.", + "base": "AbstractSkeleton", + "fields": [], + }, + { # Spider + "name": "Spider", + "description": "Entity representing a spider.", + "base": "Monster", + "fields": [ + { + "type": "Byte", + "name": "spider_flags", + "default": 0, + "input": int, + "available": False, + "proxy": [ + { + "type": "Masked", + "name": "is_climbing", + "input": bool, + "description": "Whether the spider is climbing.", + "mask": 0x01, + }, + ], + "description": "Flags of the spider.", + } + ], + }, + { # Warden + "name": "Warden", + "description": "Entity representing a warden.", + "base": "Monster", + "fields": [ + { + "type": "VarInt", + "name": "anger_level", + "default": 0, + "input": int, + "description": "The level of anger of the warden.", + } + ], + }, + { # Wither + "name": "Wither", + "description": "Entity representing a wither.", + "base": "Monster", + "fields": [ + { + "type": "VarInt", + "name": "center_head_target", + "default": 0, + "input": int, + "description": "The entity ID of the target for the center head. (0 if no target)", + }, + { + "type": "VarInt", + "name": "left_head_target", + "default": 0, + "input": int, + "description": "The entity ID of the target for the left head. (0 if no target)", + }, + { + "type": "VarInt", + "name": "right_head_target", + "default": 0, + "input": int, + "description": "The entity ID of the target for the right head. (0 if no target)", + }, + { + "type": "VarInt", + "name": "invulnerable_time", + "default": 0, + "input": int, + "description": "The amount of time the wither is invulnerable.", + }, + ], + }, + { # Zoglin + "name": "Zoglin", + "description": "Entity representing a zoglin.", + "base": "Monster", + "fields": [ + { + "type": "Boolean", + "name": "is_baby", + "default": False, + "input": bool, + "description": "Indicates whether the zoglin is a baby.", + } + ], + }, + { # Zombie + "name": "Zombie", + "description": "Entity representing a zombie.", + "base": "Monster", + "fields": [ + { + "type": "Boolean", + "name": "is_baby", + "default": False, + "input": bool, + "description": "Indicates whether the zombie is a baby.", + }, + { + "type": "VarInt", + "name": "_zombie_type", + "default": 0, + "input": int, + "description": "Unused metadata. (Previously used for zombie type)", + }, + { + "type": "Boolean", + "name": "is_becoming_drowned", + "default": False, + "input": bool, + "description": "Indicates whether the zombie is in the process of becoming a drowned.", + }, + ], + }, + { # Zombie Villager + "name": "ZombieVillager", + "description": "Entity representing a zombie villager.", + "base": "Zombie", + "fields": [ + { + "type": "Boolean", + "name": "is_converting", + "default": False, + "input": bool, + "description": "Indicates whether the zombie villager is currently converting.", + }, + { + "type": "VillagerData", + "name": "villager_data", + "default": "(0, 0, 0)", + "input": "tuple[int, int, int]", + "description": "The data of the villager associated with the zombie villager.", + }, + ], + }, + { # Husk + "name": "Husk", + "description": "Entity representing a husk.", + "base": "Zombie", + "fields": [], + }, + { # Drowned + "name": "Drowned", + "description": "Entity representing a drowned.", + "base": "Zombie", + "fields": [], + }, + { # Zombified Piglin + "name": "ZombifiedPiglin", + "description": "Entity representing a zombified piglin.", + "base": "Zombie", + "fields": [], + }, + { # Enderman + "name": "Enderman", + "description": "Entity representing an enderman.", + "base": "Monster", + "fields": [ + { + "type": "OptBlockState", + "name": "carried_block", + "default": "Absent", + "input": str, + "description": "The block the enderman is carrying.", + }, + { + "type": "Boolean", + "name": "is_screaming", + "default": False, + "input": bool, + "description": "Indicates if the enderman is screaming.", + }, + { + "type": "Boolean", + "name": "is_staring", + "default": False, + "input": bool, + "description": "Indicates if the enderman is staring.", + }, + ], + }, + { # Ender Dragon + "name": "EnderDragon", + "description": "Entity representing an ender dragon.", + "base": "Mob", + "fields": [ + { + "type": "DragonPhase", + "name": "dragon_phase", + "default": "HOVERING_NO_AI", + "enum": True, + "input": "DragonPhase", + "description": "The current phase of the ender dragon.", + } + ], + }, + { # Flying + "name": "Flying", + "description": "Base entity for flying mobs.", + "base": "Mob", + "fields": [], + }, + { # Ghast + "name": "Ghast", + "description": "Entity representing a ghast.", + "base": "Flying", + "fields": [ + { + "type": "Boolean", + "name": "is_attacking", + "default": False, + "input": bool, + "description": "Indicates if the ghast is attacking.", + } + ], + }, + { # Phantom + "name": "Phantom", + "description": "Entity representing a phantom.", + "base": "Flying", + "fields": [ + {"type": "VarInt", "name": "size", "default": 0, "input": int, "description": "The size of the phantom."} + ], + }, + { # Slime + "name": "Slime", + "description": "Entity representing a slime.", + "base": "Mob", + "fields": [ + {"type": "VarInt", "name": "size", "default": 1, "input": int, "description": "The size of the slime."} + ], + }, + { # Llama Spit + "name": "LlamaSpit", + "description": "Entity representing spit from a llama.", + "base": "Entity", + "fields": [], + }, + { # Primed TNT + "name": "PrimedTnt", + "description": "Entity representing primed TNT.", + "base": "Entity", + "fields": [ + { + "type": "VarInt", + "name": "fuse_time", + "default": 80, + "input": int, + "description": "The fuse time for the primed TNT.", + } + ], + }, +] diff --git a/tests/helpers.py b/tests/helpers.py index 19b2b3b1..2d825b8b 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -302,6 +302,7 @@ def test_serialization(self, kwargs: dict[str, Any], expected_bytes: bytes): def test_deserialization(self, kwargs: dict[str, Any], expected_bytes: bytes): """Test deserialization of the object.""" buf = Buffer(expected_bytes) + obj = cls.deserialize(buf) equality = cls(**kwargs) == obj error_message: list[str] = [] diff --git a/tests/mcproto/types/entity/__init__.py b/tests/mcproto/types/entity/__init__.py new file mode 100644 index 00000000..9d48db4f --- /dev/null +++ b/tests/mcproto/types/entity/__init__.py @@ -0,0 +1 @@ +from __future__ import annotations diff --git a/tests/mcproto/types/entity/test_metadata.py b/tests/mcproto/types/entity/test_metadata.py new file mode 100644 index 00000000..dc2e0d4c --- /dev/null +++ b/tests/mcproto/types/entity/test_metadata.py @@ -0,0 +1,90 @@ +from mcproto.types.entity import PandaEM +from mcproto.buffer import Buffer + + +import pytest +from mcproto.types.entity.metadata import proxy, entry, EntityMetadataCreator, EntityMetadata +from mcproto.types.entity.metadata_types import ByteEME, Masked + + +def test_panda(): + """Test the Panda entity (it has a lot of inherited fields, so it's a good test case).""" + panda = PandaEM() + + assert panda.serialize() == b"\xff" # No metadata + + panda.active_hand = 0 + panda.is_hand_active = True + panda.is_riptide_spin_attack = True + # Index 8, Type 0 (byte), Value 0b00000101 + assert panda.serialize() == b"\x08\x00\x05\xff" + # 0bxx1 hand active + # 0bx0x main hand active (1 for offhand) + # 0b1xx riptide spin attack + + panda.is_sneezing = True + # Index 8, Type 0 (byte), Value 0b00000101, Index 22, Type 0 (byte), Value 2 + assert panda.serialize() == b"\x08\x00\x05\x16\x00\x02\xff" + + panda.active_hand = 0 + panda.is_hand_active = False + panda.is_riptide_spin_attack = False + panda.eat_timer = -1 # VarInt 0xff 0xff 0xff 0xff 0x0f + # Index 22, Type 0 (byte), Value 2, Index 19, Type 1 (VarInt), Value -1 + assert panda.serialize() == b"\x13\x01\xff\xff\xff\xff\x0f\x16\x00\x02\xff" + + buf = Buffer(b"\x13\x01\x02\x16\x00\x02\x08\x00\x07\xff") + panda2 = PandaEM.deserialize(buf) + assert panda2.active_hand == 1 + assert panda2.is_hand_active + assert panda2.is_riptide_spin_attack + assert panda2.eat_timer == 2 + assert panda2.is_sneezing + assert not panda2.is_sitting + + +def test_kwargs(): + """Test kwargs for EnitityMetadata.""" + panda = PandaEM(custom_name="test", is_custom_name_visible=True) + assert panda.custom_name == "test" + assert panda.is_custom_name_visible + + +def test_class_error(): + """Test errors for EntityMetadataCreator.""" + with pytest.raises(TypeError): + proxy("test", Masked, mask=0x1) # wrong type + + with pytest.raises(TypeError): + proxy(object, Masked, mask=0x1) # wrong type + + with pytest.raises(ValueError): + + class Test(metaclass=EntityMetadataCreator): # type: ignore + test: int + + with pytest.raises(ValueError): + + class Test(metaclass=EntityMetadataCreator): # type: ignore # noqa: F811 + test: int = 0 + + with pytest.raises(ValueError): + EntityMetadata(1, 1) # type: ignore + + with pytest.raises(ValueError): + + class Test(metaclass=EntityMetadataCreator): # noqa: F811 + test: int = proxy(entry(ByteEME, 1), Masked, mask=0x1) + + buf = Buffer(b"\x00\x02\x00") # Wrong metadata type + with pytest.raises(TypeError): + ByteEME.deserialize(buf) + + EntityMetadata() + + buf = Buffer(b"\x00\xff\x00") # Invalid metadata type + with pytest.raises(TypeError): + EntityMetadata.deserialize(buf) + + with pytest.raises(ValueError): + EntityMetadata(keyword="test") diff --git a/tests/mcproto/types/entity/test_metadata_types.py b/tests/mcproto/types/entity/test_metadata_types.py new file mode 100644 index 00000000..ebc17482 --- /dev/null +++ b/tests/mcproto/types/entity/test_metadata_types.py @@ -0,0 +1,573 @@ +from typing import Union +from mcproto.types.entity.metadata_types import ( + PositionEME, + OptBlockStateEME, + Vector3EME, + RotationEME, + Masked, + OptUUIDEME, + VarIntEME, + TextComponentEME, + OptTextComponentEME, + NBTagEME, + StringEME, + FrogVariantEME, + PoseEME, + BooleanEME, + BlockStateEME, + PaintingVariantEME, + OptGlobalPositionEME, + DirectionEME, + VarLongEME, + VillagerDataEME, + SnifferStateEME, + QuaternionEME, + CatVariantEME, + DragonPhaseEME, + FloatEME, + SlotEME, + ByteEME, + OptVarIntEME, + OptPositionEME, + ParticleEME, +) + +from mcproto.types.slot import Slot +from mcproto.types.vec3 import Vec3, Position +from mcproto.types.quaternion import Quaternion +from mcproto.types.chat import TextComponent +from mcproto.types.nbt import NBTag, EndNBT, StringNBT, CompoundNBT, ByteNBT +from mcproto.types.uuid import UUID +from mcproto.types.identifier import Identifier +from mcproto.types.entity.enums import SnifferState, DragonPhase, Direction, Pose + +from tests.helpers import gen_serializable_test + +# ByteEME +gen_serializable_test( + context=globals(), + cls=ByteEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x00\x00"), + ((1, 1), b"\x01\x00\x01"), + ((2, 127), b"\x02\x00\x7f"), + ((3, -1), b"\x03\x00\xff"), + ((4, -128), b"\x04\x00\x80"), + ((-1, 0), ValueError), + ((54, 128), ValueError), + ((54, -129), ValueError), + (ValueError, b"\xff\x00\x01"), # End of metadata + (TypeError, b"\x01\x02"), # Wrong type + ], +) + +# VarIntEME +gen_serializable_test( + context=globals(), + cls=VarIntEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x01\x00"), + ((1, 1), b"\x01\x01\x01"), + ((2, 127), b"\x02\x01\x7f"), + ((3, -1), b"\x03\x01\xff\xff\xff\xff\x0f"), + ((4, 128), b"\x04\x01\x80\x01"), + ((-1, 0), ValueError), + ((54, 2**31), ValueError), + ((54, -(2**31 + 1)), ValueError), + ], +) + +# VarLongEME +gen_serializable_test( + context=globals(), + cls=VarLongEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x02\x00"), + ((1, 1), b"\x01\x02\x01"), + ((2, 127), b"\x02\x02\x7f"), + ((3, -1), b"\x03\x02\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01"), + ((4, 128), b"\x04\x02\x80\x01"), + ((-1, 0), ValueError), + ((54, 2**63), ValueError), + ((54, -(2**63 + 1)), ValueError), + ], +) + +# FloatEME +gen_serializable_test( + context=globals(), + cls=FloatEME, + fields=[ + ("index", int), + ("value", float), + ], + test_data=[ + ((54, 0.0), b"\x36\x03\x00\x00\x00\x00"), + ((1, 2.0), b"\x01\x03\x40\x00\x00\x00"), + ((2, -1.0), b"\x02\x03\xbf\x80\x00\x00"), + ((3, 127.0), b"\x03\x03\x42\xfe\x00\x00"), + ((4, 0.5), b"\x04\x03\x3f\x00\x00\x00"), + ((-1, 0.0), ValueError), + ], +) + +# StringEME +gen_serializable_test( + context=globals(), + cls=StringEME, + fields=[ + ("index", int), + ("value", str), + ], + test_data=[ + ((54, ""), b"\x36\x04\x00"), + ((1, "a"), b"\x01\x04\x01a"), + ((2, "abc"), b"\x02\x04\x03abc"), + ((-1, ""), ValueError), + ((54, "a" * 32768), ValueError), + ], +) + +# TextComponentEME +gen_serializable_test( + context=globals(), + cls=TextComponentEME, + fields=[ + ("index", int), + ("value", TextComponent), + ], + test_data=[ + ((54, TextComponent("")), b"\x36\x05" + CompoundNBT([StringNBT("", name="text")]).serialize()), + ((1, TextComponent({"text": "a"})), b"\x01\x05" + CompoundNBT([StringNBT("a", name="text")]).serialize()), + ( + ( + 2, + TextComponent( + { + "text": "abc", + "italic": False, + "bold": True, # Order is not important in the result but it is in the test + } + ), + ), + b"\x02\x05" + + CompoundNBT([StringNBT("abc", name="text"), ByteNBT(0, "italic"), ByteNBT(1, "bold")]).serialize(), + ), + ((-1, TextComponent("")), ValueError), + ], +) + +# OptTextComponentEME +gen_serializable_test( + context=globals(), + cls=OptTextComponentEME, + fields=[ + ("index", int), + ("value", Union[TextComponent, None]), + ], + test_data=[ + ((54, None), b"\x36\x06\x00"), + ((1, TextComponent("")), b"\x01\x06\x01" + CompoundNBT([StringNBT("", name="text")]).serialize()), + ((2, TextComponent("a")), b"\x02\x06\x01" + CompoundNBT([StringNBT("a", name="text")]).serialize()), + ((-1, None), ValueError), + ], +) + +# SlotEME +gen_serializable_test( + context=globals(), + cls=SlotEME, + fields=[ + ("index", int), + ("value", Slot), + ], + test_data=[ + ( + (54, Slot(present=True, item_id=1, item_count=1, nbt=EndNBT())), + b"\x36\x07" + Slot(present=True, item_id=1, item_count=1).serialize(), + ), + ], +) + +# BooleanEME +gen_serializable_test( + context=globals(), + cls=BooleanEME, + fields=[ + ("index", int), + ("value", bool), + ], + test_data=[ + ((54, True), b"\x36\x08\x01"), + ((1, False), b"\x01\x08\x00"), + ((-1, True), ValueError), + ], +) + +# RotationEME +gen_serializable_test( + context=globals(), + cls=RotationEME, + fields=[ + ("index", int), + ("value", Vec3), + ], + test_data=[ + ((54, Vec3(0.0, 0.0, 0.0)), b"\x36\x09" + Vec3(0.0, 0.0, 0.0).serialize()), + ((1, Vec3(1.0, 2.0, 3.0)), b"\x01\x09" + Vec3(1.0, 2.0, 3.0).serialize()), + ((-1, Vec3(0.0, 0.0, 0.0)), ValueError), + ], +) + +# PositionEME +gen_serializable_test( + context=globals(), + cls=PositionEME, + fields=[ + ("index", int), + ("value", Position), + ], + test_data=[ + ((54, Position(0, 0, 0)), b"\x36\x0a" + Position(0, 0, 0).serialize()), + ((1, Position(1, 2, 3)), b"\x01\x0a" + Position(1, 2, 3).serialize()), + ((-1, Position(0, 0, 0)), ValueError), + ], +) + +# OptPositionEME +gen_serializable_test( + context=globals(), + cls=OptPositionEME, + fields=[ + ("index", int), + ("value", Union[Position, None]), + ], + test_data=[ + ((54, None), b"\x36\x0b\x00"), + ((1, Position(0, 0, 0)), b"\x01\x0b\01" + Position(0, 0, 0).serialize()), + ((-1, Position(0, 0, 0)), ValueError), + ], +) + +# DirectionEME +gen_serializable_test( + context=globals(), + cls=DirectionEME, + fields=[ + ("index", int), + ("value", Direction), + ], + test_data=[ + ((54, Direction.DOWN), b"\x36\x0c\x00"), + ((1, Direction.NORTH), b"\x01\x0c\x02"), + ((2, Direction.EAST), b"\x02\x0c\x05"), + ((-1, Direction.DOWN), ValueError), + (ValueError, b"\x01\x0c\x0f"), + ], +) + +# OptUUIDEME +gen_serializable_test( + context=globals(), + cls=OptUUIDEME, + fields=[ + ("index", int), + ("value", Union[UUID, None]), + ], + test_data=[ + ((54, None), b"\x36\r\x00"), + ((1, UUID("0" * 32)), b"\x01\r\x01" + UUID("0" * 32).serialize()), + ((2, UUID("f" * 32)), b"\x02\r\x01" + UUID("f" * 32).serialize()), + ((-1, UUID("0" * 32)), ValueError), + ], +) + +# BlockStateEME +gen_serializable_test( + context=globals(), + cls=BlockStateEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x0e\x00"), + ((1, 1), b"\x01\x0e\x01"), + ((2, 127), b"\x02\x0e\x7f"), + ((-1, 0), ValueError), + ], +) + + +# OptBlockStateEME +gen_serializable_test( + context=globals(), + cls=OptBlockStateEME, + fields=[ + ("index", int), + ("value", Union[int, None]), + ], + test_data=[ + ((54, None), b"\x36\x0f\x00"), + ((1, 1), b"\x01\x0f\x01"), + ((2, 3), b"\x02\x0f\x03"), # Air is not representable + ((-1, 0), ValueError), + ], +) + +# NBTagEME +gen_serializable_test( + context=globals(), + cls=NBTagEME, + fields=[ + ("index", int), + ("value", NBTag), + ], + test_data=[ + ((54, EndNBT()), b"\x36\x10" + EndNBT().serialize()), + ( + (1, CompoundNBT([StringNBT("a", name="b")])), + b"\x01\x10" + CompoundNBT([StringNBT("a", name="b")]).serialize(), + ), + ((-1, EndNBT()), ValueError), + ], +) + +# ParticleEME +gen_serializable_test( + context=globals(), + cls=ParticleEME, + fields=[ + ("index", int), + ("value", tuple), + ], + test_data=[ + (NotImplementedError, b"\x01\x11\x01"), + ((-1, (2, None)), ValueError), + ], +) + +# VillagerDataEME +gen_serializable_test( + context=globals(), + cls=VillagerDataEME, + fields=[ + ("index", int), + ("value", tuple), + ], + test_data=[ + ((54, (0, 0, 0)), b"\x36\x12\x00\x00\x00"), + ((1, (1, 2, 3)), b"\x01\x12\x01\x02\x03"), + ((-1, (0, 0, 0)), ValueError), + ], +) + +# OptVarIntEME +gen_serializable_test( + context=globals(), + cls=OptVarIntEME, + fields=[ + ("index", int), + ("value", Union[int, None]), + ], + test_data=[ + ((54, None), b"\x36\x13\x00"), + ((1, 0), b"\x01\x13\x01"), + ((2, 127), b"\x02\x13\x80\x01"), + ((-1, 0), ValueError), + ], +) + +# PoseEME +gen_serializable_test( + context=globals(), + cls=PoseEME, + fields=[ + ("index", int), + ("value", Pose), + ], + test_data=[ + ((54, Pose.STANDING), b"\x36\x14\x00"), + ((1, Pose.SPIN_ATTACK), b"\x01\x14\x04"), + ((2, Pose.DYING), b"\x02\x14\x07"), + ((-1, Pose.STANDING), ValueError), + ], +) + +# CatVariantEME +gen_serializable_test( # Need to update when registries are implemented + context=globals(), + cls=CatVariantEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x15\x00"), + ((1, 1), b"\x01\x15\x01"), + ((2, 127), b"\x02\x15\x7f"), + ((-1, 0), ValueError), + ], +) + +# FrogVariantEME +gen_serializable_test( # Need to update when registries are implemented + context=globals(), + cls=FrogVariantEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x16\x00"), + ((1, 1), b"\x01\x16\x01"), + ((2, 127), b"\x02\x16\x7f"), + ((-1, 0), ValueError), + ], +) + +# DragonPhaseEME +gen_serializable_test( + context=globals(), + cls=DragonPhaseEME, + fields=[ + ("index", int), + ("value", DragonPhase), + ], + test_data=[ # 0x01 because it is really a varint and not an Enum, I just wanted to have better readability + ((54, DragonPhase.CIRCLING), b"\x36\x01\x00"), + ((1, DragonPhase.STRAFING), b"\x01\x01\x01"), + ((2, DragonPhase.LANDED_BREATH_ATTACK), b"\x02\x01\x05"), + ((-1, DragonPhase.CIRCLING), ValueError), + ], +) + +# OptGlobalPositionEME +gen_serializable_test( + context=globals(), + cls=OptGlobalPositionEME, + fields=[ + ("index", int), + ("value", tuple), # Identifier, Position | None + ], + test_data=[ + ((54, None), b"\x36\x17\x00"), + ( + (1, (Identifier("minecraft", "overworld"), Position(4, 5, 6))), + b"\x01\x17\x01" + Identifier("minecraft", "overworld").serialize() + Position(4, 5, 6).serialize(), + ), + ], +) + +# PaintingVariantEME +gen_serializable_test( # Need to update when registries are implemented + context=globals(), + cls=PaintingVariantEME, + fields=[ + ("index", int), + ("value", int), + ], + test_data=[ + ((54, 0), b"\x36\x18\x00"), + ((1, 1), b"\x01\x18\x01"), + ((2, 127), b"\x02\x18\x7f"), + ((-1, 0), ValueError), + ], +) + + +# SnifferStateEME +gen_serializable_test( + context=globals(), + cls=SnifferStateEME, + fields=[ + ("index", int), + ("value", SnifferState), + ], + test_data=[ + ((54, SnifferState.IDLING), b"\x36\x19\x00"), + ((1, SnifferState.SNIFFING), b"\x01\x19\x03"), + ((2, SnifferState.RISING), b"\x02\x19\x06"), + ((-1, SnifferState.IDLING), ValueError), + (ValueError, b"\x01\x19\x0f"), + ((1, 0xF), ValueError), + ], +) + +# Vector3EME +gen_serializable_test( + context=globals(), + cls=Vector3EME, + fields=[ + ("index", int), + ("value", Vec3), + ], + test_data=[ + ((54, Vec3(0.0, 0.0, 0.0)), b"\x36\x1a" + Vec3(0.0, 0.0, 0.0).serialize()), + ((1, Vec3(1.0, 2.0, 3.0)), b"\x01\x1a" + Vec3(1.0, 2.0, 3.0).serialize()), + ((-1, Vec3(0.0, 0.0, 0.0)), ValueError), + ], +) + +# QuaternionEME +gen_serializable_test( + context=globals(), + cls=QuaternionEME, + fields=[ + ("index", int), + ("value", Quaternion), + ], + test_data=[ + ((54, Quaternion(0.0, 0.0, 0.0, 1.0)), b"\x36\x1b" + Quaternion(0.0, 0.0, 0.0, 1.0).serialize()), + ((1, Quaternion(1.0, 2.0, 3.0, 4.0)), b"\x01\x1b" + Quaternion(1.0, 2.0, 3.0, 4.0).serialize()), + ((-1, Quaternion(0.0, 0.0, 0.0, 1.0)), ValueError), + ], +) + + +def test_masked(): + """Test the Masked class.""" + container = ByteEME(index=1, value=0) + mask1 = Masked(container, mask=0b00000001) + mask2 = Masked(container, mask=0b00000010) + mask3 = Masked(container, mask=0b00000100) + mask12 = Masked(container, mask=0b00000011) + mask13 = Masked(container, mask=0b00000101) + + assert mask1.getter() == 0 + assert mask2.getter() == 0 + assert mask3.getter() == 0 + assert mask12.getter() == 0 + assert mask13.getter() == 0 + + mask1.setter(1) + mask2.setter(1) + assert mask1.getter() == 1 + assert mask2.getter() == 1 + assert mask3.getter() == 0 + assert mask12.getter() == 3 + assert mask13.getter() == 1 + + mask1.setter(0) + mask3.setter(1) + assert mask1.getter() == 0 + assert mask13.getter() == 2 + + mask12.setter(0) + assert mask12.getter() == 0 + assert mask13.getter() == 2 + assert mask1.getter() == 0 + assert mask2.getter() == 0 + assert mask3.getter() == 1