Entity
This page goes over the Entity object.
isLiving(): Boolean
isLiving(): BooleanReturns if the entity is instance of LivingEntity.
getPosition(): Vector3d
getPosition(): Vector3dReturns the entity position.
getLastPosition(): Vector3d
getLastPosition(): Vector3dReturns the previous tick entity position.
getMotion(): Vector3d
getMotion(): Vector3dReturns the entity motion.
getRotation(): Vector2f
getRotation(): Vector2fReturns the entity rotation.
setYaw(yaw): Undefined
setYaw(yaw): UndefinedSets the entities yaw.
setPitch(pitch): Undefined
setPitch(pitch): UndefinedSets the entities pitch.
getLastRotation(): Vector2f
getLastRotation(): Vector2fReturns the previous tick entity rotation.
getTicksExisted(): Number
getTicksExisted(): NumberReturns the amount of ticks the entity has existed for.
getEntityId(): Number
getEntityId(): NumberReturns the entity ID.
getDisplayName(): String
getDisplayName(): StringReturns the entity display name.
getInventory(): Inventory
getInventory(): InventoryReturns the inventory of the entity.
getDistanceToEntity(entity): Number
getDistanceToEntity(entity): NumberArgument
Type
Description
entity
Entity
Another entity.
Returns distance between this and another entity.
getDistance(x, y, z): Number
getDistance(x, y, z): NumberArgument
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