LivingKnockBackEvent

The event is cancelable.

If the event is canceled, the entity is not knocked back.

The event does not have a result.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import crafttweaker.api.event.living.LivingKnockBackEvent;

Extending LivingEvent

LivingKnockBackEvent extends LivingEvent. That means all methods available in LivingEvent are also available in LivingKnockBackEvent

Methods

Return Type: double

script.zs
// LivingKnockBackEvent.getOriginRatioX() as double
event.getOriginRatioX();

Return Type: double

script.zs
// LivingKnockBackEvent.getOriginRatioZ() as double
event.getOriginRatioZ();

Return Type: float

script.zs
// LivingKnockBackEvent.getOriginStrength() as float
event.getOriginStrength();

Return Type: double

script.zs
// LivingKnockBackEvent.getRatioX() as double
event.getRatioX();

Return Type: double

script.zs
// LivingKnockBackEvent.getRatioZ() as double
event.getRatioZ();

Return Type: float

script.zs
// LivingKnockBackEvent.getStrength() as float
event.getStrength();
script.zs
LivingKnockBackEvent.setRatioX(value as double)
ParameterType
Parameter
value
Type
double
script.zs
LivingKnockBackEvent.setRatioZ(value as double)
ParameterType
Parameter
value
Type
double
script.zs
LivingKnockBackEvent.setStrength(value as float)
ParameterType
Parameter
value
Type
float

Properties

NameTypeHas GetterHas Setter
Name
originRatioX
Type
double
Has Getter
true
Has Setter
false
Name
originRatioZ
Type
double
Has Getter
true
Has Setter
false
Name
originStrength
Type
float
Has Getter
true
Has Setter
false
Name
ratioX
Type
double
Has Getter
true
Has Setter
true
Name
ratioZ
Type
double
Has Getter
true
Has Setter
true
Name
strength
Type
float
Has Getter
true
Has Setter
true