BabyEntitySpawnEvent
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.BabyEntitySpawnEvent;
Extends
BabyEntitySpawnEvent extends Event
.
Implements
BabyEntitySpawnEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.living.BabyEntitySpawnEvent>(event => { println("BabyEntitySpawnEvent ran!");});
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// BabyEntitySpawnEvent.cancel();event.cancel();
Getter
// BabyEntitySpawnEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// BabyEntitySpawnEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// BabyEntitySpawnEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// BabyEntitySpawnEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
// BabyEntitySpawnEvent.child as AgeableMobevent.child
Return Type:
AgeableMob
Setter
event.child = myAgeableMob;
Parameters:
proposedChild: AgeableMob
Type: AgeableMob
Getter
// BabyEntitySpawnEvent.hasResult as boolevent.hasResult
Return Type:
bool
hasResult() as bool
// BabyEntitySpawnEvent.hasResult() as bool;event.hasResult();
Return Type:
bool
Getter
// BabyEntitySpawnEvent.result as EventResultevent.result
Return Type:
EventResult
Setter
event.result = myResult;
Parameters:
result: EventResult
Type: EventResult
result() as Result
result(result as Result)
event.result(myResult);
Parameters:
result: EventResult
Type: EventResult
setAllow()
sets the event's result to script.zs
allow
// BabyEntitySpawnEvent.setAllow();event.setAllow();
setDefault()
sets the event's result to script.zs
default
// BabyEntitySpawnEvent.setDefault();event.setDefault();
setDeny()
sets the event's result to script.zs
deny
// BabyEntitySpawnEvent.setDeny();event.setDeny();