Entity

The base of all networked things, including players, horses, NPCs, dogs, props, stashes and markers. new Entity(id) returns the existing object with that network id. It never spawns anything, and it throws for an unknown id.

entity.id

id

The network id, the same on the server and in all players' games.

entity.state

state

The entity's shared state, for players, horses and NPCs.

entity.dimension

dimension

The dimension the entity is in. Entities see each other only in the same dimension, and 0 is the shared one.

entity.position

position

The entity's location in world coordinates.

entity.rotation

rotation

The direction the entity faces.