Interface Ageable

All Superinterfaces:
Attributable, net.kyori.adventure.audience.Audience, CommandSender, Creature, Damageable, Entity, net.kyori.adventure.text.event.HoverEventSource<net.kyori.adventure.text.event.HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, net.kyori.adventure.pointer.Pointered, ProjectileSource, ServerOperator
All Known Subinterfaces:
AbstractHorse, AbstractVillager, Animals, Axolotl, Bee, Breedable, Cat, ChestedHorse, Chicken, Cow, Donkey, Drowned, Fox, Goat, Hoglin, Horse, Husk, Llama, Mule, MushroomCow, Ocelot, Panda, Parrot, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, PolarBear, Rabbit, Sheep, SkeletonHorse, Steerable, Strider, Tameable, TraderLlama, Turtle, Villager, WanderingTrader, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager

public interface Ageable extends Creature
Represents an entity that can age.
  • Method Details

    • getAge

      int getAge()
      Gets the age of this mob.
    • setAge

      void setAge(int age)
      Sets the age of this mob.
      age - New age
    • setAgeLock

      @Deprecated void setAgeLock(boolean lock)
      Lock the age of the animal, setting this will prevent the animal from maturing or getting ready for mating.
      lock - new lock
    • getAgeLock

      @Deprecated boolean getAgeLock()
      Gets the current agelock.
      the current agelock
    • setBaby

      void setBaby()
      Sets the age of the mob to a baby
    • setAdult

      void setAdult()
      Sets the age of the mob to an adult
    • isAdult

      boolean isAdult()
      Returns true if the mob is an adult.
      return true if the mob is an adult
    • canBreed

      @Deprecated boolean canBreed()
      Return the ability to breed of the animal.
      the ability to breed of the animal
    • setBreed

      @Deprecated void setBreed(boolean breed)
      Set breedability of the animal, if the animal is a baby and set to breed it will instantly grow up.
      breed - breedability of the animal