EntityPlayer
A player entity.
Extends
Extended by
Properties
chasingPosX
chasingPosX:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
chasingPosY
chasingPosY:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
chasingPosZ
chasingPosZ:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
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.
Inherited from
inventory
readonlyinventory:InventoryPlayer
The player inventory.
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
prevChasingPosX
prevChasingPosX:
number
The previous position that the server last reported for this player.
prevChasingPosY
prevChasingPosY:
number
The previous position that the server last reported for this player.
prevChasingPosZ
prevChasingPosZ:
number
The previous position that the server last reported for this player.
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
LivingEntity.prevRotationPitch
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
LivingEntity.getEntityBoundingBox
getHealth()
getHealth():
number
Returns
number
The current health of the entity.
Inherited from
getHeldItem()
getHeldItem():
ItemStack
Returns
The item the entity is currently holding.
Inherited from
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.
Inherited from
getName()
getName():
string
Returns
string
The name of the player.
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
getUUID()
getUUID():
string
Returns
string
The players UUID as string
heal()
heal(
amount):void
Heals the entity by the specified amount of health.
Parameters
amount
number
The amount of health to heal.
Returns
void
Inherited from
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
LivingEntity.setEntityBoundingBox
setHealth()
setHealth(
amount):void
Sets the health of the entity to the specified amount of health.
Parameters
amount
number
The amount of health to set the entity to.
Returns
void
Inherited from
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