LivingEntity

This page will document the LivingEntity object

A living entity is any entity which has health etc. Examples include pigs, sheep and zombies.

LivingEntity objects inherit methods from Entity

isAnimal(): boolean

Returns whether this entity is an animal

isPassive(): boolean

Returns whether this entity is passive. Checks for whether this entity has a target, e.g. an angry wolf.

isHostile(): boolean

Returns whether this entity is hostile

isNeutral(): boolean

Returns whether this entity is neutral

isPlayer(): boolean

Returns whether this entity is a player

isLocalPlayer(): boolean

Returns whether this entity is the local player

getLastZ(): double

Returns the Z position of the entity in the last tick

getHealth(): float

Returns this entity's health

getMaxHealth(): float

Returns the maximum health of this entity

getHurtTime(): int

Returns the hurt time of the entity

getMaxHurtTime(): int

Returns the maximum amont of hurt time this entity can have

isDead(): boolean

Returns whether this entity is dead

Last updated