Class AnimalTameEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.LivingEvent
-
- net.minecraftforge.event.entity.living.AnimalTameEvent
-
public class AnimalTameEvent extends LivingEvent
This event is fired when anEntityAnimal
is tamed.
It is fired viaForgeEventFactory#onAnimalTame(EntityAnimal, EntityPlayer)
. Forge fires this event for applicable vanilla animals, mods need to fire it themselves. This event isCancelable
. If canceled, taming the animal will fail. This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Field Summary
Fields Modifier and Type Field Description private AnimalEntity
animal
private PlayerEntity
tamer
-
Constructor Summary
Constructors Constructor Description AnimalTameEvent(AnimalEntity animal, PlayerEntity tamer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnimalEntity
getAnimal()
PlayerEntity
getTamer()
-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
animal
private final AnimalEntity animal
-
tamer
private final PlayerEntity tamer
-
-
Constructor Detail
-
AnimalTameEvent
public AnimalTameEvent(AnimalEntity animal, PlayerEntity tamer)
-
-
Method Detail
-
getAnimal
public AnimalEntity getAnimal()
-
getTamer
public PlayerEntity getTamer()
-
-