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
classActor
Bases: CommandSender
Actor()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. |
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 | str | Gets the type of the actor. |
velocity | Vector | Gets this actor's current velocity. |
attrdimensionproperty
dimension: DimensionGets the current Dimension this actor resides in.
attridproperty
id: intReturns a unique id for this actor.
attris_deadproperty
is_dead: boolReturns true if this actor has been marked for removal.
attris_in_lavaproperty
is_in_lava: boolReturns true if the actor is in lava.
attris_in_waterproperty
is_in_water: boolReturns true if the actor is in water.
attris_name_tag_always_visibleproperty
is_name_tag_always_visible: boolGets or sets if the actor's name tag is always visible or not.
attris_name_tag_visibleproperty
is_name_tag_visible: boolGets or sets if the actor's name tag is visible or not.
attris_on_groundproperty
is_on_ground: boolReturns true if the actor is supported by a block, i.e. on ground.
attris_validproperty
is_valid: boolReturns false if the entity has died, been despawned for some other reason, or has not been added to the level.
attrlevelproperty
level: LevelGets the current Level this actor resides in.
attrlocationproperty
location: LocationGets the actor's current position.
attrname_tagproperty
name_tag: strGets or sets the current name tag of the actor.
attrruntime_idproperty
runtime_id: intReturns the runtime id for this actor.
attrscore_tagproperty
score_tag: strGets or sets the current score tag of the actor.
attrscoreboard_tagsproperty
Returns a list of scoreboard tags for this actor.
attrtypeproperty
type: strGets the type of the actor.
attrvelocityproperty
velocity: VectorGets this actor's current velocity.
methadd_scoreboard_tag
Adds a tag to this actor.
methremove
remove() -> NoneRemove this actor from the level.
methremove_scoreboard_tag
Removes a given tag from this actor.
methset_rotation
Sets the actor's rotation.
classItem
Bases: Actor
Item()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. |
attris_unlimited_lifetimeproperty
is_unlimited_lifetime: boolGets or sets if this Item lives forever
attritem_stackproperty
item_stack: ItemStackGets or sets the item stack associated with this item drop.
attrpickup_delayproperty
pickup_delay: intGets or sets the delay before this Item is available to be picked up by players.
attrthrowerproperty
thrower: int | NoneGets 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
| 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. |
attrhealthproperty
health: intGets or sets the entity's health from 0 to its max possible value, where 0 is dead.
attris_glidingproperty
is_gliding: boolChecks to see if an actor is gliding, such as using an Elytra.
attrmax_healthproperty
max_health: intGets or sets the maximum health this entity has.