endstone.actor
Classes:
Name | Description |
---|---|
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. |
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 | Teleports this actor to the given location. Teleports this actor to the target Actor. |
Attributes:
Name | Type | Description |
---|---|---|
dimension | Dimension | Gets the current Dimension this actor resides in. |
health | int | Gets or sets the entity’s health from 0 to its max possible value, where 0 is dead. |
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. |
max_health | int | Gets the maximum health this entity has. |
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. |
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:
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. |
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:
Name | Type | Description |
---|---|---|
is_gliding | bool | Checks 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.