Class LivingEntity

java.lang.Object
  extended by BaseEntity
      extended by LivingEntity
Direct Known Subclasses:
HumanEntity, Mob

public class LivingEntity
extends BaseEntity

Interface for living entities


Constructor Summary
Constructor and Description
LivingEntity()
          Interface for living entities
LivingEntity(mj livingEntity)
          Interface for living entities
 
Method Summary
Modifier and Type Method and Description
 int getBaseNoDamageTicks()
          Get the amount of ticks this entity will not take damage.
 int getDeathTicks()
          Get the amount of ticks this entity is dead.
 mj getEntity()
          Returns the entity we're wrapping.
 int getHealth()
          Returns the entity's health.
 int getLastDamage()
          Get the current maximum damage taken during this NoDamageTime
 void increaseHealth(int health)
          Increase entity health.
 void setBaseNoDamageTicks(int ticks)
          Set the amount of ticks this entity will not take damage.
 void setDeathTicks(int ticks)
          Set the amount of ticks this entity is dead.
 void setHealth(int health)
          Sets the entity's health.
 void setLastDamage(int amount)
          Set the current maximum damage taken during this NoDamageTime (if any damage is higher than this number the difference will be added)
 
Methods inherited from class BaseEntity
getAirTicks, getBaseAirTicks, getFireTicks, getId, getNoDamageTicks, getPitch, getPlayer, getRotation, getX, getY, getZ, isAnimal, isLiving, isMob, isPlayer, setAirTicks, setBaseAirTicks, setFireTicks, setNoDamageTicks, setPitch, setRotation, setX, setY, setZ, teleportTo, teleportTo, teleportTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LivingEntity

public LivingEntity()
Interface for living entities


LivingEntity

public LivingEntity(mj livingEntity)
Interface for living entities

Parameters:
livingEntity -
Method Detail

getEntity

public mj getEntity()
Returns the entity we're wrapping.

Overrides:
getEntity in class BaseEntity
Returns:

getHealth

public int getHealth()
Returns the entity's health.

Returns:
health

increaseHealth

public void increaseHealth(int health)
Increase entity health.

Parameters:
health - amount of health to increase the players health with.

setHealth

public void setHealth(int health)
Sets the entity's health. 20 = max health 1 = 1/2 heart 2 = 1 heart

Parameters:
health -

getDeathTicks

public int getDeathTicks()
Get the amount of ticks this entity is dead. 20 ticks per second.

Returns:

setDeathTicks

public void setDeathTicks(int ticks)
Set the amount of ticks this entity is dead. 20 ticks per second.

Parameters:
ticks -

getBaseNoDamageTicks

public int getBaseNoDamageTicks()
Get the amount of ticks this entity will not take damage. (unless it heals) 20 ticks per second.

Returns:

setBaseNoDamageTicks

public void setBaseNoDamageTicks(int ticks)
Set the amount of ticks this entity will not take damage. (until it heals) 20 ticks per second.

Parameters:
ticks -

getLastDamage

public int getLastDamage()
Get the current maximum damage taken during this NoDamageTime

Returns:

setLastDamage

public void setLastDamage(int amount)
Set the current maximum damage taken during this NoDamageTime (if any damage is higher than this number the difference will be added)

Parameters:
amount -