Entity

This page goes over the Entity object.

isLiving(): Boolean

Returns if the entity is instance of LivingEntity.

getPosition(): Vector3d

Returns the entity position.

getLastPosition(): Vector3d

Returns the previous tick entity position.

getMotion(): Vector3d

Returns the entity motion.

getRotation(): Vector2f

Returns the entity rotation.

setYaw(yaw): Undefined

Sets the entities yaw.

setPitch(pitch): Undefined

Sets the entities pitch.

getLastRotation(): Vector2f

Returns the previous tick entity rotation.

getTicksExisted(): Number

Returns the amount of ticks the entity has existed for.

getEntityId(): Number

Returns the entity ID.

getDisplayName(): String

Returns the entity display name.

getInventory(): Inventory

Returns the inventory of the entity.

getDistanceToEntity(entity): Number

ArgumentTypeDescription

entity

Entity

Another entity.

Returns distance between this and another entity.

getDistance(x, y, z): Number

ArgumentTypeDescription

x

Number

X position.

y

Number

Y position.

z

Number

Z position.

Returns the distance between this entity and the specified position.

Last updated