Interface Breedable

All Superinterfaces:
Ageable, 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, Cat, ChestedHorse, Chicken, Cow, Donkey, Fox, Goat, Hoglin, Horse, Llama, Mule, MushroomCow, Ocelot, Panda, Parrot, Pig, PolarBear, Rabbit, Sheep, SkeletonHorse, Steerable, Strider, Tameable, TraderLlama, Turtle, Villager, WanderingTrader, Wolf, ZombieHorse

public interface Breedable extends Ageable
Represents an entity that can age and breed.
  • Method Details

    • setAgeLock

      void setAgeLock(boolean lock)
      Lock the age of the animal, setting this will prevent the animal from maturing or getting ready for mating.
      Specified by:
      setAgeLock in interface Ageable
      Parameters:
      lock - new lock
    • getAgeLock

      boolean getAgeLock()
      Gets the current agelock.
      Specified by:
      getAgeLock in interface Ageable
      Returns:
      the current agelock
    • canBreed

      boolean canBreed()
      Return the ability to breed of the animal.
      Specified by:
      canBreed in interface Ageable
      Returns:
      the ability to breed of the animal
    • setBreed

      void setBreed(boolean breed)
      Set breedability of the animal, if the animal is a baby and set to breed it will instantly grow up.
      Specified by:
      setBreed in interface Ageable
      Parameters:
      breed - breedability of the animal