Class AnimalTameEvent

java.lang.Object
net.neoforged.bus.api.Event
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent

public class AnimalTameEvent extends LivingEvent implements net.neoforged.bus.api.ICancellableEvent
This event is fired when an Animal is tamed.
It is fired via EventHooks.onAnimalTame(Animal, Player). Forge fires this event for applicable vanilla animals, mods need to fire it themselves. This event is ICancellableEvent. If canceled, taming the animal will fail. This event is fired on the NeoForge.EVENT_BUS.
  • Field Details

    • animal

      private final Animal animal
    • tamer

      private final Player tamer
  • Constructor Details

    • AnimalTameEvent

      public AnimalTameEvent(Animal animal, Player tamer)
  • Method Details

    • getAnimal

      public Animal getAnimal()
    • getTamer

      public Player getTamer()