LivingEntity
Living entity.
Extends
Extended by
Properties
dimension
dimension:
number
The dimension the entity is in: 0 for the Overworld, -1 for the Nether, and 1 for The End
Inherited from
entityID
readonlyentityID:number
Inherited from
height
height:
number
The height of the entity.
Inherited from
hurtTime
hurtTime:
number
The hurt time in ticks.
isDead
isDead:
boolean
Inherited from
motionX
motionX:
number
The X motion (velocity) of the entity.
Inherited from
motionY
motionY:
number
The Y motion (velocity) of the entity.
Inherited from
motionZ
motionZ:
number
The Z motion (velocity) of the entity.
Inherited from
onGround
readonlyonGround:boolean
Inherited from
posX
posX:
number
The X position of the entity.
Inherited from
posY
posY:
number
The Y position of the entity.
Inherited from
posZ
posZ:
number
The Z position of the entity.
Inherited from
prevPosX
prevPosX:
number
The previous X position of the entity.
Inherited from
prevPosY
prevPosY:
number
The previous Y position of the entity.
Inherited from
prevPosZ
prevPosZ:
number
The previous Z position of the entity.
Inherited from
prevRotationPitch
prevRotationPitch:
number
The previous pitch rotation of the entity.
Inherited from
prevRotationYaw
prevRotationYaw:
number
The previous yaw rotation of the entity.
Inherited from
rotationPitch
rotationPitch:
number
The pitch rotation of the entity.
Inherited from
rotationYaw
rotationYaw:
number
The yaw rotation of the entity.
Inherited from
ticksAlive
readonlyticksAlive:number
The amount of ticks the entity has existed.
Inherited from
width
width:
number
The width of the entity.
Inherited from
Methods
getCollisionBox()
getCollisionBox():
AxisAlignedBB
Gets the collision box of the entity.
Returns
Inherited from
getEntityBoundingBox()
getEntityBoundingBox():
AxisAlignedBB
Returns
The bounding box of the entity.
Inherited from
getHealth()
getHealth():
number
Returns
number
The current health of the entity.
getHeldItem()
getHeldItem():
ItemStack
Returns
The item the entity is currently holding.
getLookVec()
getLookVec():
Vec3
Returns
A vector in the direction the entity is looking at. Very useful for raytracing.
Inherited from
getMaxHealth()
getMaxHealth():
number
Returns
number
The maximum health of the entity.
getPosition()
getPosition():
Vec3
Gets the position of the entity as vec3
Returns
Inherited from
getPositionEyes()
getPositionEyes():
Vec3
Gets the position of the eyes as vec3.
Returns
Inherited from
heal()
heal(
amount):void
Heals the entity by the specified amount of health.
Parameters
amount
number
amount - The amount of health to heal.
Returns
void
isBurning()
isBurning():
boolean
Returns
boolean
If the entity is burning.
Inherited from
isEating()
isEating():
boolean
Returns
boolean
If the entity is eating.
Inherited from
isInWater()
isInWater():
boolean
Returns
boolean
If the entity is in water.
Inherited from
isRiding()
isRiding():
boolean
Returns
boolean
If the entity is riding something.
Inherited from
isSneaking()
isSneaking():
boolean
Returns
boolean
If the entity is sneaking.
Inherited from
isSprinting()
isSprinting():
boolean
Returns
boolean
If the entity is sprinting.
Inherited from
isWet()
isWet():
boolean
Returns
boolean
If the entity is wet. LOL
Inherited from
setEntityBoundingBox()
setEntityBoundingBox(
aabb):void
Sets the bounding box of the entity.
Parameters
aabb
Returns
void
Inherited from
setHealth()
setHealth(
amount):void
Sets the health of the entity to the specified amount of health.
Parameters
amount
number
amount - The amount of health to set the entity to.
Returns
void
setOnGround()
setOnGround(
onGround):void
Sets the entities onGround state.
Parameters
onGround
boolean
Returns
void
Inherited from
setPosition()
setPosition(
x,y,z):void
Sets the position and updates its bounding box.
Parameters
x
number
y
number
z
number
Returns
void
Inherited from
setSneaking()
setSneaking(
sneaking):void
Sets the entities sneaking state.
Parameters
sneaking
boolean
Returns
void
Inherited from
setSprinting()
setSprinting(
sprinting):void
Sets the entities sprinting state.
Parameters
sprinting
boolean
Returns
void
Inherited from
Last updated