If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . neoforge.api.event.entity.living . AnimalTameEvent;
AnimalTameEvent extends LivingEvent
.
AnimalTameEvent
implements the following interfaces:
ICancellableEvent
This event can be listened to like so:
events . register < crafttweaker . neoforge.api.event.entity.living . AnimalTameEvent > ( event = > {
println ( "AnimalTameEvent ran!" ) ;
Cancels the event. Same as setCanceled(true)
// AnimalTameEvent.cancel();
// AnimalTameEvent.canceled as bool
Return Type:
bool
// AnimalTameEvent.canceled = (cancel as bool);
// AnimalTameEvent.canceled() as bool;
Return Type:
bool
// AnimalTameEvent.canceled(cancel as bool);
// AnimalTameEvent.entity as Animal
Return Type:
Animal
// AnimalTameEvent.tamer as Player
Return Type:
Player