Entity
This page goes over the Entity object.
isLiving(): Boolean
isLiving(): Boolean
Returns if the entity is instance of LivingEntity.
getPosition(): Vector3d
getPosition(): Vector3d
Returns the entity position.
getLastPosition(): Vector3d
getLastPosition(): Vector3d
Returns the previous tick entity position.
getMotion(): Vector3d
getMotion(): Vector3d
Returns the entity motion.
getRotation(): Vector2f
getRotation(): Vector2f
Returns the entity rotation.
setYaw(yaw): Undefined
setYaw(yaw): Undefined
Sets the entities yaw.
setPitch(pitch): Undefined
setPitch(pitch): Undefined
Sets the entities pitch.
getLastRotation(): Vector2f
getLastRotation(): Vector2f
Returns the previous tick entity rotation.
getTicksExisted(): Number
getTicksExisted(): Number
Returns the amount of ticks the entity has existed for.
getEntityId(): Number
getEntityId(): Number
Returns the entity ID.
getDisplayName(): String
getDisplayName(): String
Returns the entity display name.
getInventory(): Inventory
getInventory(): Inventory
Returns the inventory of the entity.
getDistanceToEntity(entity): Number
getDistanceToEntity(entity): Number
Argument
Type
Description
entity
Entity
Another entity.
Returns distance between this and another entity.
getDistance(x, y, z): Number
getDistance(x, y, z): Number
Argument
Type
Description
x
Number
X position.
y
Number
Y position.
z
Number
Z position.
Returns the distance between this entity and the specified position.
Last updated