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

LivingEntity.dimension


entityID

readonly entityID: number

Inherited from

LivingEntity.entityID


height

height: number

The height of the entity.

Inherited from

LivingEntity.height


hurtTime

hurtTime: number

The hurt time in ticks.

Inherited from

LivingEntity.hurtTime


inventory

readonly inventory: InventoryPlayer

The player inventory.


isDead

isDead: boolean

Inherited from

LivingEntity.isDead


motionX

motionX: number

The X motion (velocity) of the entity.

Inherited from

LivingEntity.motionX


motionY

motionY: number

The Y motion (velocity) of the entity.

Inherited from

LivingEntity.motionY


motionZ

motionZ: number

The Z motion (velocity) of the entity.

Inherited from

LivingEntity.motionZ


onGround

readonly onGround: boolean

Inherited from

LivingEntity.onGround


posX

posX: number

The X position of the entity.

Inherited from

LivingEntity.posX


posY

posY: number

The Y position of the entity.

Inherited from

LivingEntity.posY


posZ

posZ: number

The Z position of the entity.

Inherited from

LivingEntity.posZ


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

LivingEntity.prevPosX


prevPosY

prevPosY: number

The previous Y position of the entity.

Inherited from

LivingEntity.prevPosY


prevPosZ

prevPosZ: number

The previous Z position of the entity.

Inherited from

LivingEntity.prevPosZ


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

LivingEntity.prevRotationYaw


rotationPitch

rotationPitch: number

The pitch rotation of the entity.

Inherited from

LivingEntity.rotationPitch


rotationYaw

rotationYaw: number

The yaw rotation of the entity.

Inherited from

LivingEntity.rotationYaw


ticksAlive

readonly ticksAlive: number

The amount of ticks the entity has existed.

Inherited from

LivingEntity.ticksAlive


width

width: number

The width of the entity.

Inherited from

LivingEntity.width

Methods

getCollisionBox()

getCollisionBox(): AxisAlignedBB

Gets the collision box of the entity.

Returns

AxisAlignedBB

Inherited from

LivingEntity.getCollisionBox


getEntityBoundingBox()

getEntityBoundingBox(): AxisAlignedBB

Returns

AxisAlignedBB

The bounding box of the entity.

Inherited from

LivingEntity.getEntityBoundingBox


getHealth()

getHealth(): number

Returns

number

The current health of the entity.

Inherited from

LivingEntity.getHealth


getHeldItem()

getHeldItem(): ItemStack

Returns

ItemStack

The item the entity is currently holding.

Inherited from

LivingEntity.getHeldItem


getLookVec()

getLookVec(): Vec3

Returns

Vec3

A vector in the direction the entity is looking at. Very useful for raytracing.

Inherited from

LivingEntity.getLookVec


getMaxHealth()

getMaxHealth(): number

Returns

number

The maximum health of the entity.

Inherited from

LivingEntity.getMaxHealth


getName()

getName(): string

Returns

string

The name of the player.


getPosition()

getPosition(): Vec3

Gets the position of the entity as vec3

Returns

Vec3

Inherited from

LivingEntity.getPosition


getPositionEyes()

getPositionEyes(): Vec3

Gets the position of the eyes as vec3.

Returns

Vec3

Inherited from

LivingEntity.getPositionEyes


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

LivingEntity.heal


isBurning()

isBurning(): boolean

Returns

boolean

If the entity is burning.

Inherited from

LivingEntity.isBurning


isEating()

isEating(): boolean

Returns

boolean

If the entity is eating.

Inherited from

LivingEntity.isEating


isInWater()

isInWater(): boolean

Returns

boolean

If the entity is in water.

Inherited from

LivingEntity.isInWater


isRiding()

isRiding(): boolean

Returns

boolean

If the entity is riding something.

Inherited from

LivingEntity.isRiding


isSneaking()

isSneaking(): boolean

Returns

boolean

If the entity is sneaking.

Inherited from

LivingEntity.isSneaking


isSprinting()

isSprinting(): boolean

Returns

boolean

If the entity is sprinting.

Inherited from

LivingEntity.isSprinting


isWet()

isWet(): boolean

Returns

boolean

If the entity is wet. LOL

Inherited from

LivingEntity.isWet


setEntityBoundingBox()

setEntityBoundingBox(aabb): void

Sets the bounding box of the entity.

Parameters

aabb

AxisAlignedBB

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

LivingEntity.setHealth


setOnGround()

setOnGround(onGround): void

Sets the entities onGround state.

Parameters

onGround

boolean

Returns

void

Inherited from

LivingEntity.setOnGround


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

LivingEntity.setPosition


setSneaking()

setSneaking(sneaking): void

Sets the entities sneaking state.

Parameters

sneaking

boolean

Returns

void

Inherited from

LivingEntity.setSneaking


setSprinting()

setSprinting(sprinting): void

Sets the entities sprinting state.

Parameters

sprinting

boolean

Returns

void

Inherited from

LivingEntity.setSprinting

Last updated