Internal
Readonly
attributesEntity attributes.
Readonly
chunkProtected
inventoryReadonly
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.
Compare an instance of Vector3
with another.
The Vector3
to compare to.
true
if they're equal otherwise false
.
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 XUID of the player.
XUID of the player or null if not available
Get the y coordinate.
The y coordinate's value.
Get the z coordinate.
The z coordinate's value.
Check if the Player
is an operator.
true
if this player is an operator otherwise false
.
Despawn the entity.
A promise that resolves when the entity is despawned.
Used to match vanilla behavior, will send chunks with an initial view radius of VANILLA_DEFAULT_SPAWN_RADIUS.
Send the position to all the players in the same world.
A promise that resolves when the position is sent.
Player spawning logic.
Optional
mode: GametypeSet the position.
The options to set the position.
Optional
headYaw?: numberThe new head yaw.
Optional
pitch?: numberThe new pitch.
The new position.
Optional
type?: MovementTypeThe movement type.
Optional
yaw?: numberThe new yaw.
Optional
broadcast: boolean = trueWhether to broadcast the position change.
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
Represents a Player entity.