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.

script.zs
import crafttweaker.neoforge.api.event.entity.living.LivingEvent;

Extends

LivingEvent extends EntityEvent.

Members

Getter
script.zs
// LivingEvent.entity as LivingEntity
myLivingEvent.entity

Return Type: LivingEntity

Getter
script.zs
// LivingEvent.hasResult as bool
myLivingEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// LivingEvent.hasResult() as bool;
myLivingEvent.hasResult();

Return Type: bool

Getter
script.zs
// LivingEvent.result as Result
myLivingEvent.result

Return Type: EventResult

Setter
script.zs
// LivingEvent.result = (result as Result);
myLivingEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// LivingEvent.result() as Result;
myLivingEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// LivingEvent.result(result as Result);
myLivingEvent.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// LivingEvent.setAllow();
myLivingEvent.setAllow();
setDefault()
sets the event's result to default
script.zs
// LivingEvent.setDefault();
myLivingEvent.setDefault();
setDeny()
sets the event's result to deny
script.zs
// LivingEvent.setDeny();
myLivingEvent.setDeny();