Interface Animals

All Superinterfaces:
Ageable, Attributable, Audience, Breedable, CommandSender, Creature, Damageable, Entity, HoverEventSource<HoverEvent.ShowEntity>, LivingEntity, Lootable, Metadatable, Mob, Nameable, Permissible, PersistentDataHolder, Pointered, ProjectileSource, ServerOperator, Sound.Emitter
All Known Subinterfaces:
AbstractHorse, 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, Wolf, ZombieHorse

public interface Animals extends Breedable
Represents an Animal.
  • Method Details

    • getBreedCause

      @Nullable @Nullable UUID getBreedCause()
      Get the UUID of the entity that caused this entity to enter the Breedable.canBreed() state.
      Returns:
      uuid if set, or null
    • setBreedCause

      void setBreedCause(@Nullable @Nullable UUID uuid)
      Set the UUID of the entity that caused this entity to enter the Breedable.canBreed() state.
      Parameters:
      uuid - new uuid, or null
    • isLoveMode

      boolean isLoveMode()
      Get whether or not this entity is in love mode and will produce offspring with another entity in love mode. Will return true if and only if getLoveModeTicks() is greater than 0.
      Returns:
      true if in love mode, false otherwise
    • getLoveModeTicks

      int getLoveModeTicks()
      Get the amount of ticks remaining for this entity in love mode. If the entity is not in love mode, 0 will be returned.
      Returns:
      the remaining love mode ticks
    • setLoveModeTicks

      void setLoveModeTicks(int ticks)
      Set the amount of ticks for which this entity should be in love mode. Setting the love mode ticks to 600 is the equivalent of a player feeding the entity their breeding item of choice.
      Parameters:
      ticks - the love mode ticks. Must be positive
    • isBreedItem

      boolean isBreedItem(@NotNull @NotNull ItemStack stack)
      Check if the provided ItemStack is the correct item used for breeding this entity.
      Parameters:
      stack - ItemStack to check.
      Returns:
      if the provided ItemStack is the correct food item for this entity.
    • isBreedItem

      boolean isBreedItem(@NotNull @NotNull Material material)
      Check if the provided ItemStack is the correct item used for breeding this entity..
      Parameters:
      material - Material to check.
      Returns:
      if the provided ItemStack is the correct food item for this entity.