public interface LivingEntity extends Entity, ProjectileLauncher
Modifier and Type | Method and Description |
---|---|
AiModule |
aiModule()
Gets the AI Module for this class, which will be the default if there is no special AI that has been defined for
this entity
|
boolean |
canCollectItems()
Returns if the Entity can pickup items
|
EntityStatusEffect |
createStatusEffect(EntityStatusEffectType status)
Creates a new entity status effect
|
String |
displayName()
Returns the display name for the Entity
|
Position |
headLocation()
Returns the position of the Entity's eye
|
double |
health()
Returns the health of the Entity
|
void |
hide(Entity entity)
Makes the specified entity invisible to the current entity
|
boolean |
isDead()
Checks if the entity has died, or has 0 health.
|
EntityDamageEvent |
lastDamageEvent()
Returns the last EntityDamageEvent which inflicted this Entity
|
Player |
lastPlayerDamager()
Returns the player who dealt damage to this Entity since its last full heal
|
double |
maxHealth()
Returns the maximum health of the Entity
|
Path |
path()
Gets the path that this entity is currently following
|
long |
remainingAir()
Returns the amount of remaining air for the Entity
|
void |
setAiModule(AiModule module)
Overides defaults and previous AI Modules for this entity, assigning a new module to it
|
void |
setHealth(double health)
Sets the health of the Entity
|
void |
setMaxHealth(double maxHealth)
Sets the maximum health of the Entity
|
void |
setPath(Path path)
Sets a path for this entity to follow, should only be used in an AiHandler
|
void |
setRemainingAir(long ticks)
Sets the amount of remaining air for the LivingAir
|
void |
show(Entity entity)
Un-hides the entity that was hidden from view, or does nothing of already visible
|
applyProperties, boundingBox, eject, entityId, isNameVisible, isSilent, onGround, passenger, position, remove, setDisplayName, setPassenger, setSize, setVelocity, teleport, teleport, teleport, type, uniqueId, velocity, withinRange, world
launchProjectile
void hide(Entity entity)
Has no effect if the current entity is not a player
entity
- the entity to make invisible to this entityvoid show(Entity entity)
Has no effect if the current entity is not a player
entity
- the entity to make visible to this entitydouble health()
void setHealth(double health)
health
- health of the Entitydouble maxHealth()
void setMaxHealth(double maxHealth)
maxHealth cannot be above the current health of the Entity
maxHealth
- maximum health of the Entitylong remainingAir()
void setRemainingAir(long ticks)
ticks
- long amount of remaining air in ticksString displayName()
displayName
in interface Entity
Position headLocation()
boolean canCollectItems()
EntityDamageEvent lastDamageEvent()
The event may be cancelled.
Player lastPlayerDamager()
Used for death messages
boolean isDead()
instanceof
LivingEntity
true
if the entity is dead, false
if it is aliveAiModule aiModule()
void setAiModule(AiModule module)
void setPath(Path path)
EntityStatusEffect createStatusEffect(EntityStatusEffectType status)
status
- The status to applyCopyright © 2016. All rights reserved.