Skip to Content
⚠ Under Construction
ReferencePython APIendstone.actor

endstone.actor

Classes:

NameDescription
ActorRepresents a base actor in the level.
ItemRepresents a base actor in the level.
MobRepresents a mobile entity (i.e. living entity), such as a monster or player.

Actor

Bases: CommandSender

Represents a base actor in the level.

Methods:

NameDescription
add_scoreboard_tagAdds a tag to this actor.
removeRemove this actor from the level.
remove_scoreboard_tagRemoves a given tag from this actor.
set_rotationSets the actor’s rotation.
teleportTeleports this actor to the given location.
Teleports this actor to the target Actor.

Attributes:

NameTypeDescription
dimensionDimensionGets the current Dimension this actor resides in.
healthintGets or sets the entity’s health from 0 to its max possible value, where 0 is dead.
idintReturns a unique id for this actor.
is_deadboolReturns true if this actor has been marked for removal.
is_in_lavaboolReturns true if the actor is in lava.
is_in_waterboolReturns true if the actor is in water.
is_name_tag_always_visibleboolGets or sets if the actor’s name tag is always visible or not.
is_name_tag_visibleboolGets or sets if the actor’s name tag is visible or not.
is_on_groundboolReturns true if the actor is supported by a block, i.e. on ground.
is_validboolReturns false if the entity has died, been despawned for some other reason, or has not been added to the level.
levelLevelGets the current Level this actor resides in.
locationLocationGets the actor’s current position.
max_healthintGets the maximum health this entity has.
name_tagstrGets or sets the current name tag of the actor.
runtime_idintReturns the runtime id for this actor.
score_tagstrGets or sets the current score tag of the actor.
scoreboard_tagslist[str]Returns a list of scoreboard tags for this actor.
typestrGets the type of the actor.
velocityVectorGets this actor’s current velocity.

dimension

dimension: Dimension

Gets the current Dimension this actor resides in.

health

health: int

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

id

id: int

Returns a unique id for this actor.

is_dead

is_dead: bool

Returns true if this actor has been marked for removal.

is_in_lava

is_in_lava: bool

Returns true if the actor is in lava.

is_in_water

is_in_water: bool

Returns true if the actor is in water.

is_name_tag_always_visible

is_name_tag_always_visible: bool

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

is_name_tag_visible

is_name_tag_visible: bool

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

is_on_ground

is_on_ground: bool

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

is_valid

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: Level

Gets the current Level this actor resides in.

location

location: Location

Gets the actor’s current position.

max_health

max_health: int

Gets the maximum health this entity has.

name_tag

name_tag: str

Gets or sets the current name tag of the actor.

runtime_id

runtime_id: int

Returns the runtime id for this actor.

score_tag

score_tag: str

Gets or sets the current score tag of the actor.

scoreboard_tags

scoreboard_tags: list[str]

Returns a list of scoreboard tags for this actor.

type

type: str

Gets the type of the actor.

velocity

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) -> None

Teleports this actor to the given location.

teleport(target:Actor) -> None

Teleports this actor to the target Actor.

Item

Bases: Actor

Represents a base actor in the level.

Attributes:

NameTypeDescription
is_unlimited_lifetimeboolGets or sets if this Item lives forever
item_stackItemStackGets or sets the item stack associated with this item drop.
pickup_delayintGets or sets the delay before this Item is available to be picked up by players.
throwerint | NoneGets or sets the thrower of this item.

is_unlimited_lifetime

is_unlimited_lifetime: bool

Gets or sets if this Item lives forever

item_stack

item_stack: ItemStack

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

pickup_delay

pickup_delay: int

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

thrower

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:

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

is_gliding

is_gliding: bool

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

Last updated on