Readonly
attributesEntity attributes.
Readonly
metadataEntity metadata.
Protected
Readonly
runtimeProtected
Readonly
serverProtected
Readonly
uuidProtected
xThe X coordinate.
Protected
yThe Y coordinate.
Protected
zThe Z coordinate.
Static
MOB_The entity's namespace ID.
Static
Internal
runtimeThe global runtime id counter.
Static
ZEROReturns a Vector3 with 0 on all axis.
Returns a new Vector3 with each component rounded down to the nearest integer.
A new Vector3 with rounded down components.
Get the entity's UUID.
The entity's UUID.
console.log(entity.getUUID());
Get the x coordinate.
The x coordinate's value.
Get the y coordinate.
The y coordinate's value.
Get the z coordinate.
The z coordinate's value.
Despawn the entity.
Optional
player: PlayerThe player to send the packet to, if not specified, all players in the world will receive the packet.
A promise that resolves when the entity is despawned.
Send a message to an entity.
The message.
Optional
type: TextType = TextType.RawThe text type.
Send the position to all the players in the same world.
A promise that resolves when the position is sent.
Spawn the entity.
Optional
player: PlayerThe player to send the packet to.
A promise that resolves when the entity is spawned.
Set the entity's position and notify the clients.
A promise that resolves when the position is set.
Set the x
position.
The x
coordinate.
Optional
suppress: boolean = falseIf true, the client won't be notified about the position change.
A promise that resolves when the x position is set.
Set the y
position.
The y
coordinate.
Optional
suppress: boolean = falseIf true, the client won't be notified about the position change.
A promise that resolves when the y position is set.
Set the z
position.
The z
coordinate.
Optional
suppress: boolean = falseIf true, the client won't be notified about the position change.
A promise that resolves when the z position is set.
Convert to a string representation.
The string.
console.log(entity.toString());
Returns a new Vector3 with each component truncated to the nearest integer.
A new Vector3 with truncated axis.
Static
fromCreates a new Vector3 instance from an object with x, y, and z properties.
The object containing x, y, and z properties.
A new Vector3 instance.
Static
from
The base class for all entities including
Player
.