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 |
id |
int
|
A unique id for this actor. |
is_dead |
bool
|
|
is_in_lava |
bool
|
|
is_in_water |
bool
|
|
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
|
|
is_valid |
bool
|
|
level |
Level
|
The current |
location |
Location
|
A new copy of |
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. |
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.
location
property
¶
location: Location
A new copy of Location containing the position of this actor.
add_scoreboard_tag
¶
remove
¶
Remove this actor from the level.
If you are trying to remove a Player, use Player.kick instead.
remove_scoreboard_tag
¶
set_rotation
¶
ActorType
¶
Represents an actor type.
Methods:
| Name | Description |
|---|---|
get |
Attempts to get the |
Attributes:
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"
BREEZE_WIND_CHARGE_PROJECTILE
class-attribute
instance-attribute
¶
BREEZE_WIND_CHARGE_PROJECTILE: Identifier[ActorType] = (
"minecraft:breeze_wind_charge_projectile"
)
CAMEL_HUSK
class-attribute
instance-attribute
¶
CAMEL_HUSK: Identifier[ActorType] = 'minecraft:camel_husk'
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"
)
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"
)
CREAKING
class-attribute
instance-attribute
¶
CREAKING: Identifier[ActorType] = 'minecraft:creaking'
DRAGON_FIREBALL
class-attribute
instance-attribute
¶
DRAGON_FIREBALL: Identifier[ActorType] = (
"minecraft:dragon_fireball"
)
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"
)
GLOW_SQUID
class-attribute
instance-attribute
¶
GLOW_SQUID: Identifier[ActorType] = 'minecraft:glow_squid'
GUARDIAN
class-attribute
instance-attribute
¶
GUARDIAN: Identifier[ActorType] = 'minecraft:guardian'
HAPPY_GHAST
class-attribute
instance-attribute
¶
HAPPY_GHAST: Identifier[ActorType] = "minecraft:happy_ghast"
HOPPER_MINECART
class-attribute
instance-attribute
¶
HOPPER_MINECART: Identifier[ActorType] = (
"minecraft:hopper_minecart"
)
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'
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_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'
NAUTILUS
class-attribute
instance-attribute
¶
NAUTILUS: Identifier[ActorType] = 'minecraft:nautilus'
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'
PIGLIN_BRUTE
class-attribute
instance-attribute
¶
PIGLIN_BRUTE: Identifier[ActorType] = (
"minecraft:piglin_brute"
)
PILLAGER
class-attribute
instance-attribute
¶
PILLAGER: Identifier[ActorType] = 'minecraft:pillager'
POLAR_BEAR
class-attribute
instance-attribute
¶
POLAR_BEAR: Identifier[ActorType] = 'minecraft:polar_bear'
PUFFERFISH
class-attribute
instance-attribute
¶
PUFFERFISH: Identifier[ActorType] = 'minecraft:pufferfish'
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"
)
SMALL_FIREBALL
class-attribute
instance-attribute
¶
SMALL_FIREBALL: Identifier[ActorType] = (
"minecraft:small_fireball"
)
SNOWBALL
class-attribute
instance-attribute
¶
SNOWBALL: Identifier[ActorType] = 'minecraft:snowball'
SNOW_GOLEM
class-attribute
instance-attribute
¶
SNOW_GOLEM: Identifier[ActorType] = 'minecraft:snow_golem'
SPLASH_POTION
class-attribute
instance-attribute
¶
SPLASH_POTION: Identifier[ActorType] = (
"minecraft:splash_potion"
)
THROWN_TRIDENT
class-attribute
instance-attribute
¶
THROWN_TRIDENT: Identifier[ActorType] = (
"minecraft:thrown_trident"
)
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"
)
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"
)
WIND_CHARGE_PROJECTILE
class-attribute
instance-attribute
¶
WIND_CHARGE_PROJECTILE: Identifier[ActorType] = (
"minecraft:wind_charge_projectile"
)
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"
)
XP_BOTTLE
class-attribute
instance-attribute
¶
XP_BOTTLE: Identifier[ActorType] = 'minecraft:xp_bottle'
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"
)
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_stack |
ItemStack
|
The item stack associated with this item drop. |
pickup_delay |
int
|
The delay before this |
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
|
|
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.
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.