endstone.actor

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

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

Classes

NameDescription
Actor

Represents a base actor in the level.

Item

Represents a base actor in the level.

Mob

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

classActor

Bases: CommandSender

Actor()

Represents a base actor in the level.

Methods

NameDescription
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.

Attributes

NameTypeDescription
dimensionDimension

Gets the current Dimension this actor resides in.

idint

Returns a unique id for this actor.

is_deadbool

Returns true if this actor has been marked for removal.

is_in_lavabool

Returns true if the actor is in lava.

is_in_waterbool

Returns true if the actor is in water.

is_name_tag_always_visiblebool

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

is_name_tag_visiblebool

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

is_on_groundbool

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

is_validbool

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

levelLevel

Gets the current Level this actor resides in.

locationLocation

Gets the actor's current position.

name_tagstr

Gets or sets the current name tag of the actor.

runtime_idint

Returns the runtime id for this actor.

score_tagstr

Gets or sets the current score tag of the actor.

scoreboard_tagslist[str]

Returns a list of scoreboard tags for this actor.

typestr

Gets the type of the actor.

velocityVector

Gets this actor's current velocity.

attrdimensionproperty

dimension: Dimension

Gets the current Dimension this actor resides in.

attridproperty

id: int

Returns a unique id for this actor.

attris_deadproperty

is_dead: bool

Returns true if this actor has been marked for removal.

attris_in_lavaproperty

is_in_lava: bool

Returns true if the actor is in lava.

attris_in_waterproperty

is_in_water: bool

Returns true if the actor is in water.

attris_name_tag_always_visibleproperty

is_name_tag_always_visible: bool

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

attris_name_tag_visibleproperty

is_name_tag_visible: bool

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

attris_on_groundproperty

is_on_ground: bool

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

attris_validproperty

is_valid: bool

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

attrlevelproperty

level: Level

Gets the current Level this actor resides in.

attrlocationproperty

location: Location

Gets the actor's current position.

attrname_tagproperty

name_tag: str

Gets or sets the current name tag of the actor.

attrruntime_idproperty

runtime_id: int

Returns the runtime id for this actor.

attrscore_tagproperty

score_tag: str

Gets or sets the current score tag of the actor.

attrscoreboard_tagsproperty

scoreboard_tags: list[str]

Returns a list of scoreboard tags for this actor.

attrtypeproperty

type: str

Gets the type of the actor.

attrvelocityproperty

velocity: Vector

Gets this actor's current velocity.

methadd_scoreboard_tag

add_scoreboard_tag(tag: str) -> bool

Adds a tag to this actor.

methremove

remove() -> None

Remove this actor from the level.

methremove_scoreboard_tag

remove_scoreboard_tag(tag: str) -> bool

Removes a given tag from this actor.

methset_rotation

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

Sets the actor's rotation.

classItem

Bases: Actor

Item()

Represents a base actor in the level.

Attributes

NameTypeDescription
is_unlimited_lifetimebool

Gets or sets if this Item lives forever

item_stackItemStack

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

pickup_delayint

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

throwerint | None

Gets or sets the thrower of this item.

attris_unlimited_lifetimeproperty

is_unlimited_lifetime: bool

Gets or sets if this Item lives forever

attritem_stackproperty

item_stack: ItemStack

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

attrpickup_delayproperty

pickup_delay: int

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

attrthrowerproperty

thrower: int | None

Gets or sets the thrower of this item.

classMob

Bases: Actor

Mob()

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

Attributes

NameTypeDescription
healthint

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

is_glidingbool

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

max_healthint

Gets or sets the maximum health this entity has.

attrhealthproperty

health: int

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

attris_glidingproperty

is_gliding: bool

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

attrmax_healthproperty

max_health: int

Gets or sets the maximum health this entity has.

On this page