LivingEvent
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.LivingEvent;
Extends
LivingEvent extends EntityEvent
.
Members
Getter
// LivingEvent.entity as LivingEntitymyLivingEvent.entity
Return Type:
LivingEntity
Getter
// LivingEvent.hasResult as boolmyLivingEvent.hasResult
Return Type:
bool
hasResult() as bool
// LivingEvent.hasResult() as bool;myLivingEvent.hasResult();
Return Type:
bool
Getter
// LivingEvent.result as EventResultmyLivingEvent.result
Return Type:
EventResult
Setter
myLivingEvent.result = myResult;
Parameters:
result: EventResult
Type: EventResult
result() as Result
result(result as Result)
myLivingEvent.result(myResult);
Parameters:
result: EventResult
Type: EventResult
setAllow()
sets the event's result to script.zs
allow
// LivingEvent.setAllow();myLivingEvent.setAllow();
setDefault()
sets the event's result to script.zs
default
// LivingEvent.setDefault();myLivingEvent.setDefault();
setDeny()
sets the event's result to script.zs
deny
// LivingEvent.setDeny();myLivingEvent.setDeny();