Interface IIndividualLiving

All Superinterfaces:
IIndividual
All Known Subinterfaces:
IBee, IButterfly

public interface IIndividualLiving extends IIndividual
An individual with health and a lifespan.
  • Method Details

    • getHealth

      int getHealth()
      Returns:
      Current health of the individual.
    • setHealth

      void setHealth(int health)
      Set the current health of the individual.
    • getMaxHealth

      int getMaxHealth()
      Returns:
      Maximum health of the individual.
    • age

      void age(net.minecraft.world.level.Level level, float ageStep)
      Age the individual.
      Parameters:
      level - The world where the individual lives.
      ageStep - The amount to age this by. Base amount is 1f, and higher values should age faster. 0f should not age, and negative values should instantly kill this individual.
    • isAlive

      boolean isAlive()
      Returns:
      true if the individual is among the living.
    • copy

      Description copied from interface: IIndividual
      Copies this individual and all of its properties EXCEPT FOR ITS MATE. Override this method in subclasses to make sure all information is copied.
      Specified by:
      copy in interface IIndividual
      Returns:
      An exact copy of this individual with NO MATE and NOT ANALYZED.