Skip to content

Actor

endstone.actor

Classes relating to actors (entities) that can exist in a world, including all players, monsters, projectiles, etc.

Classes:

Name Description
Actor

Represents a base actor in the level.

ActorType

Represents an actor type.

Item

Represents a base actor in the level.

Mob

Represents a mobile entity (i.e. living entity), such as a monster or player.

Actor

Bases: CommandSender

Represents a base actor in the level.

Methods:

Name Description
add_scoreboard_tag

Adds a tag to this actor.

remove

Remove this actor from the level.

remove_scoreboard_tag

Removes a given tag from this actor.

set_rotation

Sets the actor's rotation.

teleport

Attributes:

Name Type Description
dimension Dimension

Gets the current Dimension this actor resides in.

id int

Returns a unique id for this actor.

is_dead bool

Returns true if this actor has been marked for removal.

is_in_lava bool

Returns true if the actor is in lava.

is_in_water bool

Returns true if the actor is in water.

is_name_tag_always_visible bool

Gets or sets if the actor's name tag is always visible or not.

is_name_tag_visible bool

Gets or sets if the actor's name tag is visible or not.

is_on_ground bool

Returns true if the actor is supported by a block, i.e. on ground.

is_valid bool

Returns false if the entity has died, been despawned for some other reason, or has not been added to the level.

level Level

Gets the current Level this actor resides in.

location Location

Gets the actor's current position.

name_tag str

Gets or sets the current name tag of the actor.

runtime_id int

Returns the runtime id for this actor.

score_tag str

Gets or sets the current score tag of the actor.

scoreboard_tags list[str]

Returns a list of scoreboard tags for this actor.

type ActorType

Gets the type of the actor.

velocity Vector

Gets this actor's current velocity.

dimension property

dimension: Dimension

Gets the current Dimension this actor resides in.

id property

id: int

Returns a unique id for this actor.

is_dead property

is_dead: bool

Returns true if this actor has been marked for removal.

is_in_lava property

is_in_lava: bool

Returns true if the actor is in lava.

is_in_water property

is_in_water: bool

Returns true if the actor is in water.

is_name_tag_always_visible property writable

is_name_tag_always_visible: bool

Gets or sets if the actor's name tag is always visible or not.

is_name_tag_visible property writable

is_name_tag_visible: bool

Gets or sets if the actor's name tag is visible or not.

is_on_ground property

is_on_ground: bool

Returns true if the actor is supported by a block, i.e. on ground.

is_valid property

is_valid: bool

Returns false if the entity has died, been despawned for some other reason, or has not been added to the level.

level property

level: Level

Gets the current Level this actor resides in.

location property

location: Location

Gets the actor's current position.

name_tag property writable

name_tag: str

Gets or sets the current name tag of the actor.

runtime_id property

runtime_id: int

Returns the runtime id for this actor.

score_tag property writable

score_tag: str

Gets or sets the current score tag of the actor.

scoreboard_tags property

scoreboard_tags: list[str]

Returns a list of scoreboard tags for this actor.

type property

type: ActorType

Gets the type of the actor.

velocity property

velocity: Vector

Gets this actor's current velocity.

add_scoreboard_tag

add_scoreboard_tag(tag: str) -> bool

Adds a tag to this actor.

remove

remove() -> None

Remove this actor from the level.

remove_scoreboard_tag

remove_scoreboard_tag(tag: str) -> bool

Removes a given tag from this actor.

set_rotation

set_rotation(yaw: float, pitch: float) -> None

Sets the actor's rotation.

teleport

teleport(location: Location) -> bool
teleport(target: Actor) -> bool

ActorType

Represents an actor type.

Methods:

Name Description
get

Attempts to get the ActorType with the given name.

Attributes:

Name Type Description
AGENT
ALLAY
AREA_EFFECT_CLOUD
ARMADILLO
ARMOR_STAND
ARROW
AXOLOTL
BALLOON
BAT
BEE
BLAZE
BOAT
BOGGED
BREEZE
BREEZE_WIND_CHARGE_PROJECTILE
CAMEL
CAMEL_HUSK
CAT
CAVE_SPIDER
CHEST_BOAT
CHEST_MINECART
CHICKEN
COD
COMMAND_BLOCK_MINECART
COPPER_GOLEM
COW
CREAKING
CREEPER
DOLPHIN
DONKEY
DRAGON_FIREBALL
DROWNED
EGG
ELDER_GUARDIAN
ELDER_GUARDIAN_GHOST
ENDERMAN
ENDERMITE
ENDER_CRYSTAL
ENDER_DRAGON
ENDER_PEARL
EVOCATION_FANG
EVOCATION_ILLAGER
EYE_OF_ENDER_SIGNAL
FALLING_BLOCK
FIREBALL
FIREWORKS_ROCKET
FISHING_HOOK
FOX
FROG
GHAST
GLOW_SQUID
GOAT
GUARDIAN
HAPPY_GHAST
HOGLIN
HOPPER_MINECART
HORSE
HUSK
ICE_BOMB
IRON_GOLEM
ITEM
LEASH_KNOT
LIGHTNING_BOLT
LINGERING_POTION
LLAMA
LLAMA_SPIT
MAGMA_CUBE
MINECART
MOOSHROOM
MULE
NAUTILUS
NPC
OCELOT
OMINOUS_ITEM_SPAWNER
PAINTING
PANDA
PARCHED
PARROT
PHANTOM
PIG
PIGLIN
PIGLIN_BRUTE
PILLAGER
PLAYER
POLAR_BEAR
PUFFERFISH
RABBIT
RAVAGER
SALMON
SHEEP
SHULKER
SHULKER_BULLET
SILVERFISH
SKELETON
SKELETON_HORSE
SLIME
SMALL_FIREBALL
SNIFFER
SNOWBALL
SNOW_GOLEM
SPIDER
SPLASH_POTION
SQUID
STRAY
STRIDER
TADPOLE
THROWN_TRIDENT
TNT
TNT_MINECART
TRADER_LLAMA
TRIPOD_CAMERA
TROPICALFISH
TURTLE
VEX
VILLAGER
VILLAGER_V2
VINDICATOR
WANDERING_TRADER
WARDEN
WIND_CHARGE_PROJECTILE
WITCH
WITHER
WITHER_SKELETON
WITHER_SKULL
WITHER_SKULL_DANGEROUS
WOLF
XP_BOTTLE
XP_ORB
ZOGLIN
ZOMBIE
ZOMBIE_HORSE
ZOMBIE_NAUTILUS
ZOMBIE_PIGMAN
ZOMBIE_VILLAGER
ZOMBIE_VILLAGER_V2
id str

Return the identifier of this actor type.

translation_key str

Get the translation key, suitable for use in a translation component.

AGENT class-attribute instance-attribute

AGENT = 'minecraft:agent'

ALLAY class-attribute instance-attribute

ALLAY = 'minecraft:allay'

AREA_EFFECT_CLOUD class-attribute instance-attribute

AREA_EFFECT_CLOUD = 'minecraft:area_effect_cloud'

ARMADILLO class-attribute instance-attribute

ARMADILLO = 'minecraft:armadillo'

ARMOR_STAND class-attribute instance-attribute

ARMOR_STAND = 'minecraft:armor_stand'

ARROW class-attribute instance-attribute

ARROW = 'minecraft:arrow'

AXOLOTL class-attribute instance-attribute

AXOLOTL = 'minecraft:axolotl'

BALLOON class-attribute instance-attribute

BALLOON = 'minecraft:balloon'

BAT class-attribute instance-attribute

BAT = 'minecraft:bat'

BEE class-attribute instance-attribute

BEE = 'minecraft:bee'

BLAZE class-attribute instance-attribute

BLAZE = 'minecraft:blaze'

BOAT class-attribute instance-attribute

BOAT = 'minecraft:boat'

BOGGED class-attribute instance-attribute

BOGGED = 'minecraft:bogged'

BREEZE class-attribute instance-attribute

BREEZE = 'minecraft:breeze'

BREEZE_WIND_CHARGE_PROJECTILE class-attribute instance-attribute

BREEZE_WIND_CHARGE_PROJECTILE = (
    "minecraft:breeze_wind_charge_projectile"
)

CAMEL class-attribute instance-attribute

CAMEL = 'minecraft:camel'

CAMEL_HUSK class-attribute instance-attribute

CAMEL_HUSK = 'minecraft:camel_husk'

CAT class-attribute instance-attribute

CAT = 'minecraft:cat'

CAVE_SPIDER class-attribute instance-attribute

CAVE_SPIDER = 'minecraft:cave_spider'

CHEST_BOAT class-attribute instance-attribute

CHEST_BOAT = 'minecraft:chest_boat'

CHEST_MINECART class-attribute instance-attribute

CHEST_MINECART = 'minecraft:chest_minecart'

CHICKEN class-attribute instance-attribute

CHICKEN = 'minecraft:chicken'

COD class-attribute instance-attribute

COD = 'minecraft:cod'

COMMAND_BLOCK_MINECART class-attribute instance-attribute

COMMAND_BLOCK_MINECART = 'minecraft:command_block_minecart'

COPPER_GOLEM class-attribute instance-attribute

COPPER_GOLEM = 'minecraft:copper_golem'

COW class-attribute instance-attribute

COW = 'minecraft:cow'

CREAKING class-attribute instance-attribute

CREAKING = 'minecraft:creaking'

CREEPER class-attribute instance-attribute

CREEPER = 'minecraft:creeper'

DOLPHIN class-attribute instance-attribute

DOLPHIN = 'minecraft:dolphin'

DONKEY class-attribute instance-attribute

DONKEY = 'minecraft:donkey'

DRAGON_FIREBALL class-attribute instance-attribute

DRAGON_FIREBALL = 'minecraft:dragon_fireball'

DROWNED class-attribute instance-attribute

DROWNED = 'minecraft:drowned'

EGG class-attribute instance-attribute

EGG = 'minecraft:egg'

ELDER_GUARDIAN class-attribute instance-attribute

ELDER_GUARDIAN = 'minecraft:elder_guardian'

ELDER_GUARDIAN_GHOST class-attribute instance-attribute

ELDER_GUARDIAN_GHOST = 'minecraft:elder_guardian_ghost'

ENDERMAN class-attribute instance-attribute

ENDERMAN = 'minecraft:enderman'

ENDERMITE class-attribute instance-attribute

ENDERMITE = 'minecraft:endermite'

ENDER_CRYSTAL class-attribute instance-attribute

ENDER_CRYSTAL = 'minecraft:ender_crystal'

ENDER_DRAGON class-attribute instance-attribute

ENDER_DRAGON = 'minecraft:ender_dragon'

ENDER_PEARL class-attribute instance-attribute

ENDER_PEARL = 'minecraft:ender_pearl'

EVOCATION_FANG class-attribute instance-attribute

EVOCATION_FANG = 'minecraft:evocation_fang'

EVOCATION_ILLAGER class-attribute instance-attribute

EVOCATION_ILLAGER = 'minecraft:evocation_illager'

EYE_OF_ENDER_SIGNAL class-attribute instance-attribute

EYE_OF_ENDER_SIGNAL = 'minecraft:eye_of_ender_signal'

FALLING_BLOCK class-attribute instance-attribute

FALLING_BLOCK = 'minecraft:falling_block'

FIREBALL class-attribute instance-attribute

FIREBALL = 'minecraft:fireball'

FIREWORKS_ROCKET class-attribute instance-attribute

FIREWORKS_ROCKET = 'minecraft:fireworks_rocket'

FISHING_HOOK class-attribute instance-attribute

FISHING_HOOK = 'minecraft:fishing_hook'

FOX class-attribute instance-attribute

FOX = 'minecraft:fox'

FROG class-attribute instance-attribute

FROG = 'minecraft:frog'

GHAST class-attribute instance-attribute

GHAST = 'minecraft:ghast'

GLOW_SQUID class-attribute instance-attribute

GLOW_SQUID = 'minecraft:glow_squid'

GOAT class-attribute instance-attribute

GOAT = 'minecraft:goat'

GUARDIAN class-attribute instance-attribute

GUARDIAN = 'minecraft:guardian'

HAPPY_GHAST class-attribute instance-attribute

HAPPY_GHAST = 'minecraft:happy_ghast'

HOGLIN class-attribute instance-attribute

HOGLIN = 'minecraft:hoglin'

HOPPER_MINECART class-attribute instance-attribute

HOPPER_MINECART = 'minecraft:hopper_minecart'

HORSE class-attribute instance-attribute

HORSE = 'minecraft:horse'

HUSK class-attribute instance-attribute

HUSK = 'minecraft:husk'

ICE_BOMB class-attribute instance-attribute

ICE_BOMB = 'minecraft:ice_bomb'

IRON_GOLEM class-attribute instance-attribute

IRON_GOLEM = 'minecraft:iron_golem'

ITEM class-attribute instance-attribute

ITEM = 'minecraft:item'

LEASH_KNOT class-attribute instance-attribute

LEASH_KNOT = 'minecraft:leash_knot'

LIGHTNING_BOLT class-attribute instance-attribute

LIGHTNING_BOLT = 'minecraft:lightning_bolt'

LINGERING_POTION class-attribute instance-attribute

LINGERING_POTION = 'minecraft:lingering_potion'

LLAMA class-attribute instance-attribute

LLAMA = 'minecraft:llama'

LLAMA_SPIT class-attribute instance-attribute

LLAMA_SPIT = 'minecraft:llama_spit'

MAGMA_CUBE class-attribute instance-attribute

MAGMA_CUBE = 'minecraft:magma_cube'

MINECART class-attribute instance-attribute

MINECART = 'minecraft:minecart'

MOOSHROOM class-attribute instance-attribute

MOOSHROOM = 'minecraft:mooshroom'

MULE class-attribute instance-attribute

MULE = 'minecraft:mule'

NAUTILUS class-attribute instance-attribute

NAUTILUS = 'minecraft:nautilus'

NPC class-attribute instance-attribute

NPC = 'minecraft:npc'

OCELOT class-attribute instance-attribute

OCELOT = 'minecraft:ocelot'

OMINOUS_ITEM_SPAWNER class-attribute instance-attribute

OMINOUS_ITEM_SPAWNER = 'minecraft:ominous_item_spawner'

PAINTING class-attribute instance-attribute

PAINTING = 'minecraft:painting'

PANDA class-attribute instance-attribute

PANDA = 'minecraft:panda'

PARCHED class-attribute instance-attribute

PARCHED = 'minecraft:parched'

PARROT class-attribute instance-attribute

PARROT = 'minecraft:parrot'

PHANTOM class-attribute instance-attribute

PHANTOM = 'minecraft:phantom'

PIG class-attribute instance-attribute

PIG = 'minecraft:pig'

PIGLIN class-attribute instance-attribute

PIGLIN = 'minecraft:piglin'

PIGLIN_BRUTE class-attribute instance-attribute

PIGLIN_BRUTE = 'minecraft:piglin_brute'

PILLAGER class-attribute instance-attribute

PILLAGER = 'minecraft:pillager'

PLAYER class-attribute instance-attribute

PLAYER = 'minecraft:player'

POLAR_BEAR class-attribute instance-attribute

POLAR_BEAR = 'minecraft:polar_bear'

PUFFERFISH class-attribute instance-attribute

PUFFERFISH = 'minecraft:pufferfish'

RABBIT class-attribute instance-attribute

RABBIT = 'minecraft:rabbit'

RAVAGER class-attribute instance-attribute

RAVAGER = 'minecraft:ravager'

SALMON class-attribute instance-attribute

SALMON = 'minecraft:salmon'

SHEEP class-attribute instance-attribute

SHEEP = 'minecraft:sheep'

SHULKER class-attribute instance-attribute

SHULKER = 'minecraft:shulker'

SHULKER_BULLET class-attribute instance-attribute

SHULKER_BULLET = 'minecraft:shulker_bullet'

SILVERFISH class-attribute instance-attribute

SILVERFISH = 'minecraft:silverfish'

SKELETON class-attribute instance-attribute

SKELETON = 'minecraft:skeleton'

SKELETON_HORSE class-attribute instance-attribute

SKELETON_HORSE = 'minecraft:skeleton_horse'

SLIME class-attribute instance-attribute

SLIME = 'minecraft:slime'

SMALL_FIREBALL class-attribute instance-attribute

SMALL_FIREBALL = 'minecraft:small_fireball'

SNIFFER class-attribute instance-attribute

SNIFFER = 'minecraft:sniffer'

SNOWBALL class-attribute instance-attribute

SNOWBALL = 'minecraft:snowball'

SNOW_GOLEM class-attribute instance-attribute

SNOW_GOLEM = 'minecraft:snow_golem'

SPIDER class-attribute instance-attribute

SPIDER = 'minecraft:spider'

SPLASH_POTION class-attribute instance-attribute

SPLASH_POTION = 'minecraft:splash_potion'

SQUID class-attribute instance-attribute

SQUID = 'minecraft:squid'

STRAY class-attribute instance-attribute

STRAY = 'minecraft:stray'

STRIDER class-attribute instance-attribute

STRIDER = 'minecraft:strider'

TADPOLE class-attribute instance-attribute

TADPOLE = 'minecraft:tadpole'

THROWN_TRIDENT class-attribute instance-attribute

THROWN_TRIDENT = 'minecraft:thrown_trident'

TNT class-attribute instance-attribute

TNT = 'minecraft:tnt'

TNT_MINECART class-attribute instance-attribute

TNT_MINECART = 'minecraft:tnt_minecart'

TRADER_LLAMA class-attribute instance-attribute

TRADER_LLAMA = 'minecraft:trader_llama'

TRIPOD_CAMERA class-attribute instance-attribute

TRIPOD_CAMERA = 'minecraft:tripod_camera'

TROPICALFISH class-attribute instance-attribute

TROPICALFISH = 'minecraft:tropicalfish'

TURTLE class-attribute instance-attribute

TURTLE = 'minecraft:turtle'

VEX class-attribute instance-attribute

VEX = 'minecraft:vex'

VILLAGER class-attribute instance-attribute

VILLAGER = 'minecraft:villager'

VILLAGER_V2 class-attribute instance-attribute

VILLAGER_V2 = 'minecraft:villager_v2'

VINDICATOR class-attribute instance-attribute

VINDICATOR = 'minecraft:vindicator'

WANDERING_TRADER class-attribute instance-attribute

WANDERING_TRADER = 'minecraft:wandering_trader'

WARDEN class-attribute instance-attribute

WARDEN = 'minecraft:warden'

WIND_CHARGE_PROJECTILE class-attribute instance-attribute

WIND_CHARGE_PROJECTILE = 'minecraft:wind_charge_projectile'

WITCH class-attribute instance-attribute

WITCH = 'minecraft:witch'

WITHER class-attribute instance-attribute

WITHER = 'minecraft:wither'

WITHER_SKELETON class-attribute instance-attribute

WITHER_SKELETON = 'minecraft:wither_skeleton'

WITHER_SKULL class-attribute instance-attribute

WITHER_SKULL = 'minecraft:wither_skull'

WITHER_SKULL_DANGEROUS class-attribute instance-attribute

WITHER_SKULL_DANGEROUS = 'minecraft:wither_skull_dangerous'

WOLF class-attribute instance-attribute

WOLF = 'minecraft:wolf'

XP_BOTTLE class-attribute instance-attribute

XP_BOTTLE = 'minecraft:xp_bottle'

XP_ORB class-attribute instance-attribute

XP_ORB = 'minecraft:xp_orb'

ZOGLIN class-attribute instance-attribute

ZOGLIN = 'minecraft:zoglin'

ZOMBIE class-attribute instance-attribute

ZOMBIE = 'minecraft:zombie'

ZOMBIE_HORSE class-attribute instance-attribute

ZOMBIE_HORSE = 'minecraft:zombie_horse'

ZOMBIE_NAUTILUS class-attribute instance-attribute

ZOMBIE_NAUTILUS = 'minecraft:zombie_nautilus'

ZOMBIE_PIGMAN class-attribute instance-attribute

ZOMBIE_PIGMAN = 'minecraft:zombie_pigman'

ZOMBIE_VILLAGER class-attribute instance-attribute

ZOMBIE_VILLAGER = 'minecraft:zombie_villager'

ZOMBIE_VILLAGER_V2 class-attribute instance-attribute

ZOMBIE_VILLAGER_V2 = 'minecraft:zombie_villager_v2'

id property

id: str

Return the identifier of this actor type.

translation_key property

translation_key: str

Get the translation key, suitable for use in a translation component.

get staticmethod

get(name: str) -> ActorType

Attempts to get the ActorType with the given name.

Item

Bases: Actor

Represents a base actor in the level.

Attributes:

Name Type Description
is_unlimited_lifetime bool

Gets or sets if this Item lives forever

item_stack ItemStack

Gets or sets the item stack associated with this item drop.

pickup_delay int

Gets or sets the delay before this Item is available to be picked up by players.

thrower int | None

Gets or sets the thrower of this item.

is_unlimited_lifetime property writable

is_unlimited_lifetime: bool

Gets or sets if this Item lives forever

item_stack property writable

item_stack: ItemStack

Gets or sets the item stack associated with this item drop.

pickup_delay property writable

pickup_delay: int

Gets or sets the delay before this Item is available to be picked up by players.

thrower property writable

thrower: int | None

Gets or sets the thrower of this item.

Mob

Bases: Actor

Represents a mobile entity (i.e. living entity), such as a monster or player.

Attributes:

Name Type Description
health int

Gets or sets the entity's health from 0 to its max possible value, where 0 is dead.

is_gliding bool

Checks to see if an actor is gliding, such as using an Elytra.

max_health int

Gets or sets the maximum health this entity has.

health property writable

health: int

Gets or sets the entity's health from 0 to its max possible value, where 0 is dead.

is_gliding property

is_gliding: bool

Checks to see if an actor is gliding, such as using an Elytra.

max_health property writable

max_health: int

Gets or sets the maximum health this entity has.