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 will instantly kill this individual. If given as a decimal number, the bee is aged by the whole number of steps, and has a percentage chance to age based on the decimal portion. For example, when ageStep = 2.3, the bee is aged twice, with a 30% chance to age a third time.
    • 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.