LivingKnockBackEvent
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.LivingKnockBackEvent;
Extends
LivingKnockBackEvent extends LivingEvent
.
Implements
LivingKnockBackEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.entity.living.LivingKnockBackEvent>(event => { println("LivingKnockBackEvent ran!");});
Members
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// LivingKnockBackEvent.cancel();event.cancel();
Getter
// LivingKnockBackEvent.canceled as boolevent.canceled
Return Type:
bool
Setter
// LivingKnockBackEvent.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// LivingKnockBackEvent.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// LivingKnockBackEvent.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
// LivingKnockBackEvent.entity as LivingEntityevent.entity
Return Type:
LivingEntity
Getter
Getter
// LivingKnockBackEvent.hasResult as boolevent.hasResult
Return Type:
bool
hasResult() as bool
// LivingKnockBackEvent.hasResult() as bool;event.hasResult();
Return Type:
bool
Getter
// LivingKnockBackEvent.originalRatioX as doubleevent.originalRatioX
Return Type:
double
Getter
// LivingKnockBackEvent.originalRatioZ as doubleevent.originalRatioZ
Return Type:
double
Getter
// LivingKnockBackEvent.originalStrength as floatevent.originalStrength
Return Type:
float
Getter
// LivingKnockBackEvent.ratioX as doubleevent.ratioX
Return Type:
double
Setter
// LivingKnockBackEvent.ratioX = (ratioX as double);event.ratioX = myDouble;
Parameters:
ratioX: double
Type: double
Getter
// LivingKnockBackEvent.ratioZ as doubleevent.ratioZ
Return Type:
double
Setter
// LivingKnockBackEvent.ratioZ = (ratioZ as double);event.ratioZ = myDouble;
Parameters:
ratioZ: double
Type: double
Getter
// LivingKnockBackEvent.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
// LivingKnockBackEvent.setAllow();event.setAllow();
setDefault()
sets the event's result to script.zs
default
// LivingKnockBackEvent.setDefault();event.setDefault();
setDeny()
sets the event's result to script.zs
deny
// LivingKnockBackEvent.setDeny();event.setDeny();
Getter
// LivingKnockBackEvent.strength as floatevent.strength
Return Type:
float
Setter
// LivingKnockBackEvent.strength = (strength as float);event.strength = myFloat;
Parameters:
strength: float
Type: float