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 dropped item that can be picked up by players.

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

The current Dimension this actor resides in.

id int

A unique id for this actor.

is_dead bool

True if this actor has been marked for removal.

is_in_lava bool

True if the actor is in lava.

is_in_water bool

True if the actor is in water.

is_name_tag_always_visible bool

Whether the actor's name tag is always visible.

is_name_tag_visible bool

Whether the actor's name tag is currently visible.

is_on_ground bool

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

is_valid bool

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

level Level

The current Level this actor resides in.

location Location

A new copy of Location containing the position of this actor.

name_tag str

The current name tag of the actor.

runtime_id int

The runtime id for this actor.

score_tag str

The current score tag of the actor.

scoreboard_tags list[str]

A list of scoreboard tags for this actor.

type ActorType

The type of the actor.

velocity Vector

The current traveling velocity of this actor.

dimension property

dimension: Dimension

The current Dimension this actor resides in.

id property

id: int

A unique id for this actor.

is_dead property

is_dead: bool

True if this actor has been marked for removal.

is_in_lava property

is_in_lava: bool

True if the actor is in lava.

is_in_water property

is_in_water: bool

True if the actor is in water.

is_name_tag_always_visible property writable

is_name_tag_always_visible: bool

Whether the actor's name tag is always visible.

is_name_tag_visible property writable

is_name_tag_visible: bool

Whether the actor's name tag is currently visible.

is_on_ground property

is_on_ground: bool

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

is_valid property

is_valid: bool

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

level property

level: Level

The current Level this actor resides in.

location property

location: Location

A new copy of Location containing the position of this actor.

name_tag property writable

name_tag: str

The current name tag of the actor.

runtime_id property

runtime_id: int

The runtime id for this actor.

score_tag property writable

score_tag: str

The current score tag of the actor.

scoreboard_tags property

scoreboard_tags: list[str]

A list of scoreboard tags for this actor.

type property

type: ActorType

The type of the actor.

velocity property

velocity: Vector

The current traveling velocity of this actor.

add_scoreboard_tag

add_scoreboard_tag(tag: str) -> bool

Adds a tag to this actor.

Parameters:

Name Type Description Default
tag str

The tag to add.

required

Returns:

Type Description
bool

True if the tag was successfully added, False if the tag already exists.

remove

remove() -> None

Remove this actor from the level.

If you are trying to remove a Player, use Player.kick instead.

remove_scoreboard_tag

remove_scoreboard_tag(tag: str) -> bool

Removes a given tag from this actor.

Parameters:

Name Type Description Default
tag str

The tag to remove.

required

Returns:

Type Description
bool

True if the tag was successfully removed, False if the tag does not exist.

set_rotation

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

Sets the actor's rotation.

Note that if the actor is affected by AI, it may override this rotation.

Parameters:

Name Type Description Default
yaw float

Rotation around the up axis (Y axis).

required
pitch float

Rotation around the right axis (X axis).

required

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

The identifier of this actor type.

translation_key str

The translation key, suitable for use in a translation component.

AGENT class-attribute instance-attribute

AGENT: Identifier[ActorType] = 'minecraft:agent'

ALLAY class-attribute instance-attribute

ALLAY: Identifier[ActorType] = 'minecraft:allay'

AREA_EFFECT_CLOUD class-attribute instance-attribute

AREA_EFFECT_CLOUD: Identifier[ActorType] = (
    "minecraft:area_effect_cloud"
)

ARMADILLO class-attribute instance-attribute

ARMADILLO: Identifier[ActorType] = 'minecraft:armadillo'

ARMOR_STAND class-attribute instance-attribute

ARMOR_STAND: Identifier[ActorType] = "minecraft:armor_stand"

ARROW class-attribute instance-attribute

ARROW: Identifier[ActorType] = 'minecraft:arrow'

AXOLOTL class-attribute instance-attribute

AXOLOTL: Identifier[ActorType] = 'minecraft:axolotl'

BALLOON class-attribute instance-attribute

BALLOON: Identifier[ActorType] = 'minecraft:balloon'

BAT class-attribute instance-attribute

BAT: Identifier[ActorType] = 'minecraft:bat'

BEE class-attribute instance-attribute

BEE: Identifier[ActorType] = 'minecraft:bee'

BLAZE class-attribute instance-attribute

BLAZE: Identifier[ActorType] = 'minecraft:blaze'

BOAT class-attribute instance-attribute

BOAT: Identifier[ActorType] = 'minecraft:boat'

BOGGED class-attribute instance-attribute

BOGGED: Identifier[ActorType] = 'minecraft:bogged'

BREEZE class-attribute instance-attribute

BREEZE: Identifier[ActorType] = 'minecraft:breeze'

BREEZE_WIND_CHARGE_PROJECTILE class-attribute instance-attribute

BREEZE_WIND_CHARGE_PROJECTILE: Identifier[ActorType] = (
    "minecraft:breeze_wind_charge_projectile"
)

CAMEL class-attribute instance-attribute

CAMEL: Identifier[ActorType] = 'minecraft:camel'

CAMEL_HUSK class-attribute instance-attribute

CAMEL_HUSK: Identifier[ActorType] = 'minecraft:camel_husk'

CAT class-attribute instance-attribute

CAT: Identifier[ActorType] = 'minecraft:cat'

CAVE_SPIDER class-attribute instance-attribute

CAVE_SPIDER: Identifier[ActorType] = "minecraft:cave_spider"

CHEST_BOAT class-attribute instance-attribute

CHEST_BOAT: Identifier[ActorType] = 'minecraft:chest_boat'

CHEST_MINECART class-attribute instance-attribute

CHEST_MINECART: Identifier[ActorType] = (
    "minecraft:chest_minecart"
)

CHICKEN class-attribute instance-attribute

CHICKEN: Identifier[ActorType] = 'minecraft:chicken'

COD class-attribute instance-attribute

COD: Identifier[ActorType] = 'minecraft:cod'

COMMAND_BLOCK_MINECART class-attribute instance-attribute

COMMAND_BLOCK_MINECART: Identifier[ActorType] = (
    "minecraft:command_block_minecart"
)

COPPER_GOLEM class-attribute instance-attribute

COPPER_GOLEM: Identifier[ActorType] = (
    "minecraft:copper_golem"
)

COW class-attribute instance-attribute

COW: Identifier[ActorType] = 'minecraft:cow'

CREAKING class-attribute instance-attribute

CREAKING: Identifier[ActorType] = 'minecraft:creaking'

CREEPER class-attribute instance-attribute

CREEPER: Identifier[ActorType] = 'minecraft:creeper'

DOLPHIN class-attribute instance-attribute

DOLPHIN: Identifier[ActorType] = 'minecraft:dolphin'

DONKEY class-attribute instance-attribute

DONKEY: Identifier[ActorType] = 'minecraft:donkey'

DRAGON_FIREBALL class-attribute instance-attribute

DRAGON_FIREBALL: Identifier[ActorType] = (
    "minecraft:dragon_fireball"
)

DROWNED class-attribute instance-attribute

DROWNED: Identifier[ActorType] = 'minecraft:drowned'

EGG class-attribute instance-attribute

EGG: Identifier[ActorType] = 'minecraft:egg'

ELDER_GUARDIAN class-attribute instance-attribute

ELDER_GUARDIAN: Identifier[ActorType] = (
    "minecraft:elder_guardian"
)

ELDER_GUARDIAN_GHOST class-attribute instance-attribute

ELDER_GUARDIAN_GHOST: Identifier[ActorType] = (
    "minecraft:elder_guardian_ghost"
)

ENDERMAN class-attribute instance-attribute

ENDERMAN: Identifier[ActorType] = 'minecraft:enderman'

ENDERMITE class-attribute instance-attribute

ENDERMITE: Identifier[ActorType] = 'minecraft:endermite'

ENDER_CRYSTAL class-attribute instance-attribute

ENDER_CRYSTAL: Identifier[ActorType] = (
    "minecraft:ender_crystal"
)

ENDER_DRAGON class-attribute instance-attribute

ENDER_DRAGON: Identifier[ActorType] = (
    "minecraft:ender_dragon"
)

ENDER_PEARL class-attribute instance-attribute

ENDER_PEARL: Identifier[ActorType] = "minecraft:ender_pearl"

EVOCATION_FANG class-attribute instance-attribute

EVOCATION_FANG: Identifier[ActorType] = (
    "minecraft:evocation_fang"
)

EVOCATION_ILLAGER class-attribute instance-attribute

EVOCATION_ILLAGER: Identifier[ActorType] = (
    "minecraft:evocation_illager"
)

EYE_OF_ENDER_SIGNAL class-attribute instance-attribute

EYE_OF_ENDER_SIGNAL: Identifier[ActorType] = (
    "minecraft:eye_of_ender_signal"
)

FALLING_BLOCK class-attribute instance-attribute

FALLING_BLOCK: Identifier[ActorType] = (
    "minecraft:falling_block"
)

FIREBALL class-attribute instance-attribute

FIREBALL: Identifier[ActorType] = 'minecraft:fireball'

FIREWORKS_ROCKET class-attribute instance-attribute

FIREWORKS_ROCKET: Identifier[ActorType] = (
    "minecraft:fireworks_rocket"
)

FISHING_HOOK class-attribute instance-attribute

FISHING_HOOK: Identifier[ActorType] = (
    "minecraft:fishing_hook"
)

FOX class-attribute instance-attribute

FOX: Identifier[ActorType] = 'minecraft:fox'

FROG class-attribute instance-attribute

FROG: Identifier[ActorType] = 'minecraft:frog'

GHAST class-attribute instance-attribute

GHAST: Identifier[ActorType] = 'minecraft:ghast'

GLOW_SQUID class-attribute instance-attribute

GLOW_SQUID: Identifier[ActorType] = 'minecraft:glow_squid'

GOAT class-attribute instance-attribute

GOAT: Identifier[ActorType] = 'minecraft:goat'

GUARDIAN class-attribute instance-attribute

GUARDIAN: Identifier[ActorType] = 'minecraft:guardian'

HAPPY_GHAST class-attribute instance-attribute

HAPPY_GHAST: Identifier[ActorType] = "minecraft:happy_ghast"

HOGLIN class-attribute instance-attribute

HOGLIN: Identifier[ActorType] = 'minecraft:hoglin'

HOPPER_MINECART class-attribute instance-attribute

HOPPER_MINECART: Identifier[ActorType] = (
    "minecraft:hopper_minecart"
)

HORSE class-attribute instance-attribute

HORSE: Identifier[ActorType] = 'minecraft:horse'

HUSK class-attribute instance-attribute

HUSK: Identifier[ActorType] = 'minecraft:husk'

ICE_BOMB class-attribute instance-attribute

ICE_BOMB: Identifier[ActorType] = 'minecraft:ice_bomb'

IRON_GOLEM class-attribute instance-attribute

IRON_GOLEM: Identifier[ActorType] = 'minecraft:iron_golem'

ITEM class-attribute instance-attribute

ITEM: Identifier[ActorType] = 'minecraft:item'

LEASH_KNOT class-attribute instance-attribute

LEASH_KNOT: Identifier[ActorType] = 'minecraft:leash_knot'

LIGHTNING_BOLT class-attribute instance-attribute

LIGHTNING_BOLT: Identifier[ActorType] = (
    "minecraft:lightning_bolt"
)

LINGERING_POTION class-attribute instance-attribute

LINGERING_POTION: Identifier[ActorType] = (
    "minecraft:lingering_potion"
)

LLAMA class-attribute instance-attribute

LLAMA: Identifier[ActorType] = 'minecraft:llama'

LLAMA_SPIT class-attribute instance-attribute

LLAMA_SPIT: Identifier[ActorType] = 'minecraft:llama_spit'

MAGMA_CUBE class-attribute instance-attribute

MAGMA_CUBE: Identifier[ActorType] = 'minecraft:magma_cube'

MINECART class-attribute instance-attribute

MINECART: Identifier[ActorType] = 'minecraft:minecart'

MOOSHROOM class-attribute instance-attribute

MOOSHROOM: Identifier[ActorType] = 'minecraft:mooshroom'

MULE class-attribute instance-attribute

MULE: Identifier[ActorType] = 'minecraft:mule'

NAUTILUS class-attribute instance-attribute

NAUTILUS: Identifier[ActorType] = 'minecraft:nautilus'

NPC class-attribute instance-attribute

NPC: Identifier[ActorType] = 'minecraft:npc'

OCELOT class-attribute instance-attribute

OCELOT: Identifier[ActorType] = 'minecraft:ocelot'

OMINOUS_ITEM_SPAWNER class-attribute instance-attribute

OMINOUS_ITEM_SPAWNER: Identifier[ActorType] = (
    "minecraft:ominous_item_spawner"
)

PAINTING class-attribute instance-attribute

PAINTING: Identifier[ActorType] = 'minecraft:painting'

PANDA class-attribute instance-attribute

PANDA: Identifier[ActorType] = 'minecraft:panda'

PARCHED class-attribute instance-attribute

PARCHED: Identifier[ActorType] = 'minecraft:parched'

PARROT class-attribute instance-attribute

PARROT: Identifier[ActorType] = 'minecraft:parrot'

PHANTOM class-attribute instance-attribute

PHANTOM: Identifier[ActorType] = 'minecraft:phantom'

PIG class-attribute instance-attribute

PIG: Identifier[ActorType] = 'minecraft:pig'

PIGLIN class-attribute instance-attribute

PIGLIN: Identifier[ActorType] = 'minecraft:piglin'

PIGLIN_BRUTE class-attribute instance-attribute

PIGLIN_BRUTE: Identifier[ActorType] = (
    "minecraft:piglin_brute"
)

PILLAGER class-attribute instance-attribute

PILLAGER: Identifier[ActorType] = 'minecraft:pillager'

PLAYER class-attribute instance-attribute

PLAYER: Identifier[ActorType] = 'minecraft:player'

POLAR_BEAR class-attribute instance-attribute

POLAR_BEAR: Identifier[ActorType] = 'minecraft:polar_bear'

PUFFERFISH class-attribute instance-attribute

PUFFERFISH: Identifier[ActorType] = 'minecraft:pufferfish'

RABBIT class-attribute instance-attribute

RABBIT: Identifier[ActorType] = 'minecraft:rabbit'

RAVAGER class-attribute instance-attribute

RAVAGER: Identifier[ActorType] = 'minecraft:ravager'

SALMON class-attribute instance-attribute

SALMON: Identifier[ActorType] = 'minecraft:salmon'

SHEEP class-attribute instance-attribute

SHEEP: Identifier[ActorType] = 'minecraft:sheep'

SHULKER class-attribute instance-attribute

SHULKER: Identifier[ActorType] = 'minecraft:shulker'

SHULKER_BULLET class-attribute instance-attribute

SHULKER_BULLET: Identifier[ActorType] = (
    "minecraft:shulker_bullet"
)

SILVERFISH class-attribute instance-attribute

SILVERFISH: Identifier[ActorType] = 'minecraft:silverfish'

SKELETON class-attribute instance-attribute

SKELETON: Identifier[ActorType] = 'minecraft:skeleton'

SKELETON_HORSE class-attribute instance-attribute

SKELETON_HORSE: Identifier[ActorType] = (
    "minecraft:skeleton_horse"
)

SLIME class-attribute instance-attribute

SLIME: Identifier[ActorType] = 'minecraft:slime'

SMALL_FIREBALL class-attribute instance-attribute

SMALL_FIREBALL: Identifier[ActorType] = (
    "minecraft:small_fireball"
)

SNIFFER class-attribute instance-attribute

SNIFFER: Identifier[ActorType] = 'minecraft:sniffer'

SNOWBALL class-attribute instance-attribute

SNOWBALL: Identifier[ActorType] = 'minecraft:snowball'

SNOW_GOLEM class-attribute instance-attribute

SNOW_GOLEM: Identifier[ActorType] = 'minecraft:snow_golem'

SPIDER class-attribute instance-attribute

SPIDER: Identifier[ActorType] = 'minecraft:spider'

SPLASH_POTION class-attribute instance-attribute

SPLASH_POTION: Identifier[ActorType] = (
    "minecraft:splash_potion"
)

SQUID class-attribute instance-attribute

SQUID: Identifier[ActorType] = 'minecraft:squid'

STRAY class-attribute instance-attribute

STRAY: Identifier[ActorType] = 'minecraft:stray'

STRIDER class-attribute instance-attribute

STRIDER: Identifier[ActorType] = 'minecraft:strider'

TADPOLE class-attribute instance-attribute

TADPOLE: Identifier[ActorType] = 'minecraft:tadpole'

THROWN_TRIDENT class-attribute instance-attribute

THROWN_TRIDENT: Identifier[ActorType] = (
    "minecraft:thrown_trident"
)

TNT class-attribute instance-attribute

TNT: Identifier[ActorType] = 'minecraft:tnt'

TNT_MINECART class-attribute instance-attribute

TNT_MINECART: Identifier[ActorType] = (
    "minecraft:tnt_minecart"
)

TRADER_LLAMA class-attribute instance-attribute

TRADER_LLAMA: Identifier[ActorType] = (
    "minecraft:trader_llama"
)

TRIPOD_CAMERA class-attribute instance-attribute

TRIPOD_CAMERA: Identifier[ActorType] = (
    "minecraft:tripod_camera"
)

TROPICALFISH class-attribute instance-attribute

TROPICALFISH: Identifier[ActorType] = (
    "minecraft:tropicalfish"
)

TURTLE class-attribute instance-attribute

TURTLE: Identifier[ActorType] = 'minecraft:turtle'

VEX class-attribute instance-attribute

VEX: Identifier[ActorType] = 'minecraft:vex'

VILLAGER class-attribute instance-attribute

VILLAGER: Identifier[ActorType] = 'minecraft:villager'

VILLAGER_V2 class-attribute instance-attribute

VILLAGER_V2: Identifier[ActorType] = "minecraft:villager_v2"

VINDICATOR class-attribute instance-attribute

VINDICATOR: Identifier[ActorType] = 'minecraft:vindicator'

WANDERING_TRADER class-attribute instance-attribute

WANDERING_TRADER: Identifier[ActorType] = (
    "minecraft:wandering_trader"
)

WARDEN class-attribute instance-attribute

WARDEN: Identifier[ActorType] = 'minecraft:warden'

WIND_CHARGE_PROJECTILE class-attribute instance-attribute

WIND_CHARGE_PROJECTILE: Identifier[ActorType] = (
    "minecraft:wind_charge_projectile"
)

WITCH class-attribute instance-attribute

WITCH: Identifier[ActorType] = 'minecraft:witch'

WITHER class-attribute instance-attribute

WITHER: Identifier[ActorType] = 'minecraft:wither'

WITHER_SKELETON class-attribute instance-attribute

WITHER_SKELETON: Identifier[ActorType] = (
    "minecraft:wither_skeleton"
)

WITHER_SKULL class-attribute instance-attribute

WITHER_SKULL: Identifier[ActorType] = (
    "minecraft:wither_skull"
)

WITHER_SKULL_DANGEROUS class-attribute instance-attribute

WITHER_SKULL_DANGEROUS: Identifier[ActorType] = (
    "minecraft:wither_skull_dangerous"
)

WOLF class-attribute instance-attribute

WOLF: Identifier[ActorType] = 'minecraft:wolf'

XP_BOTTLE class-attribute instance-attribute

XP_BOTTLE: Identifier[ActorType] = 'minecraft:xp_bottle'

XP_ORB class-attribute instance-attribute

XP_ORB: Identifier[ActorType] = 'minecraft:xp_orb'

ZOGLIN class-attribute instance-attribute

ZOGLIN: Identifier[ActorType] = 'minecraft:zoglin'

ZOMBIE class-attribute instance-attribute

ZOMBIE: Identifier[ActorType] = 'minecraft:zombie'

ZOMBIE_HORSE class-attribute instance-attribute

ZOMBIE_HORSE: Identifier[ActorType] = (
    "minecraft:zombie_horse"
)

ZOMBIE_NAUTILUS class-attribute instance-attribute

ZOMBIE_NAUTILUS: Identifier[ActorType] = (
    "minecraft:zombie_nautilus"
)

ZOMBIE_PIGMAN class-attribute instance-attribute

ZOMBIE_PIGMAN: Identifier[ActorType] = (
    "minecraft:zombie_pigman"
)

ZOMBIE_VILLAGER class-attribute instance-attribute

ZOMBIE_VILLAGER: Identifier[ActorType] = (
    "minecraft:zombie_villager"
)

ZOMBIE_VILLAGER_V2 class-attribute instance-attribute

ZOMBIE_VILLAGER_V2: Identifier[ActorType] = (
    "minecraft:zombie_villager_v2"
)

id property

id: Identifier[ActorType]

The identifier of this actor type.

translation_key property

translation_key: str

The translation key, suitable for use in a translation component.

get staticmethod

get(name: Identifier[ActorType] | str) -> ActorType

Attempts to get the ActorType with the given name.

Item

Bases: Actor

Represents a dropped item that can be picked up by players.

Attributes:

Name Type Description
is_unlimited_lifetime bool

Whether this Item lives forever.

item_stack ItemStack

The item stack associated with this item drop.

pickup_delay int

The delay before this Item is available to be picked up by players.

thrower int | None

The thrower of this item (the entity which dropped the item), as a unique id.

is_unlimited_lifetime property writable

is_unlimited_lifetime: bool

Whether this Item lives forever.

item_stack property writable

item_stack: ItemStack

The item stack associated with this item drop.

pickup_delay property writable

pickup_delay: int

The delay before this Item is available to be picked up by players.

thrower property writable

thrower: int | None

The thrower of this item (the entity which dropped the item), as a unique id.

Mob

Bases: Actor

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

Methods:

Name Description
get_attribute

Gets the specified attribute instance from the object. This instance will be backed directly to the object and any changes will be visible at once.

has_attribute

Checks whether the given attribute is present on the object.

Attributes:

Name Type Description
attributes list[AttributeInstance]

Gets all attribute instances from the object. This instance will be backed directly to the object and any changes will be visible at once.

health int

The entity's health from 0 to its max possible value, where 0 is dead.

is_gliding bool

True if this actor is gliding, such as using an Elytra.

max_health int

The maximum health this entity has.

attributes property

attributes: list[AttributeInstance]

Gets all attribute instances from the object. This instance will be backed directly to the object and any changes will be visible at once.

health property writable

health: int

The entity's health from 0 to its max possible value, where 0 is dead.

is_gliding property

is_gliding: bool

True if this actor is gliding, such as using an Elytra.

max_health property writable

max_health: int

The maximum health this entity has.

If the health of the entity is above the value provided, it will be set to that value. An entity with a health bar (e.g. Player, EnderDragon, Wither, etc.) will have their bar scaled accordingly.

get_attribute

get_attribute(
    attribute: Identifier[Attribute] | str,
) -> AttributeInstance

Gets the specified attribute instance from the object. This instance will be backed directly to the object and any changes will be visible at once.

has_attribute

has_attribute(
    attribute: Identifier[Attribute] | str,
) -> bool

Checks whether the given attribute is present on the object.