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

Entity.dimension


entityID

readonly entityID: number

Inherited from

Entity.entityID


height

height: number

The height of the entity.

Inherited from

Entity.height


hurtTime

hurtTime: number

The hurt time in ticks.


isDead

isDead: boolean

Inherited from

Entity.isDead


motionX

motionX: number

The X motion (velocity) of the entity.

Inherited from

Entity.motionX


motionY

motionY: number

The Y motion (velocity) of the entity.

Inherited from

Entity.motionY


motionZ

motionZ: number

The Z motion (velocity) of the entity.

Inherited from

Entity.motionZ


onGround

readonly onGround: boolean

Inherited from

Entity.onGround


posX

posX: number

The X position of the entity.

Inherited from

Entity.posX


posY

posY: number

The Y position of the entity.

Inherited from

Entity.posY


posZ

posZ: number

The Z position of the entity.

Inherited from

Entity.posZ


prevPosX

prevPosX: number

The previous X position of the entity.

Inherited from

Entity.prevPosX


prevPosY

prevPosY: number

The previous Y position of the entity.

Inherited from

Entity.prevPosY


prevPosZ

prevPosZ: number

The previous Z position of the entity.

Inherited from

Entity.prevPosZ


prevRotationPitch

prevRotationPitch: number

The previous pitch rotation of the entity.

Inherited from

Entity.prevRotationPitch


prevRotationYaw

prevRotationYaw: number

The previous yaw rotation of the entity.

Inherited from

Entity.prevRotationYaw


rotationPitch

rotationPitch: number

The pitch rotation of the entity.

Inherited from

Entity.rotationPitch


rotationYaw

rotationYaw: number

The yaw rotation of the entity.

Inherited from

Entity.rotationYaw


ticksAlive

readonly ticksAlive: number

The amount of ticks the entity has existed.

Inherited from

Entity.ticksAlive


width

width: number

The width of the entity.

Inherited from

Entity.width

Methods

getCollisionBox()

getCollisionBox(): AxisAlignedBB

Gets the collision box of the entity.

Returns

AxisAlignedBB

Inherited from

Entity.getCollisionBox


getEntityBoundingBox()

getEntityBoundingBox(): AxisAlignedBB

Returns

AxisAlignedBB

The bounding box of the entity.

Inherited from

Entity.getEntityBoundingBox


getHealth()

getHealth(): number

Returns

number

The current health of the entity.


getHeldItem()

getHeldItem(): ItemStack

Returns

ItemStack

The item the entity is currently holding.


getLookVec()

getLookVec(): Vec3

Returns

Vec3

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

Inherited from

Entity.getLookVec


getMaxHealth()

getMaxHealth(): number

Returns

number

The maximum health of the entity.


getPosition()

getPosition(): Vec3

Gets the position of the entity as vec3

Returns

Vec3

Inherited from

Entity.getPosition


getPositionEyes()

getPositionEyes(): Vec3

Gets the position of the eyes as vec3.

Returns

Vec3

Inherited from

Entity.getPositionEyes


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

Entity.isBurning


isEating()

isEating(): boolean

Returns

boolean

If the entity is eating.

Inherited from

Entity.isEating


isInWater()

isInWater(): boolean

Returns

boolean

If the entity is in water.

Inherited from

Entity.isInWater


isRiding()

isRiding(): boolean

Returns

boolean

If the entity is riding something.

Inherited from

Entity.isRiding


isSneaking()

isSneaking(): boolean

Returns

boolean

If the entity is sneaking.

Inherited from

Entity.isSneaking


isSprinting()

isSprinting(): boolean

Returns

boolean

If the entity is sprinting.

Inherited from

Entity.isSprinting


isWet()

isWet(): boolean

Returns

boolean

If the entity is wet. LOL

Inherited from

Entity.isWet


setEntityBoundingBox()

setEntityBoundingBox(aabb): void

Sets the bounding box of the entity.

Parameters

aabb

AxisAlignedBB

Returns

void

Inherited from

Entity.setEntityBoundingBox


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

Entity.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

Entity.setPosition


setSneaking()

setSneaking(sneaking): void

Sets the entities sneaking state.

Parameters

sneaking

boolean

Returns

void

Inherited from

Entity.setSneaking


setSprinting()

setSprinting(sprinting): void

Sets the entities sprinting state.

Parameters

sprinting

boolean

Returns

void

Inherited from

Entity.setSprinting

Last updated