AnimalTameEvent
Importing the class
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;
Extends
AnimalTameEvent extends LivingEvent
.
Implements
AnimalTameEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.living.AnimalTameEvent>(event => { println("AnimalTameEvent ran!");});
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// AnimalTameEvent.cancel();event.cancel();
Getter
// AnimalTameEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// AnimalTameEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// AnimalTameEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// AnimalTameEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool