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();

Return Type: void

script.zs
LivingKnockBackEvent.setRatioX(value as double) as void
ParameterTypeDescription
Parameter
value
Type
double
Description
No Description Provided

Return Type: void

script.zs
LivingKnockBackEvent.setRatioZ(value as double) as void
ParameterTypeDescription
Parameter
value
Type
double
Description
No Description Provided

Return Type: void

script.zs
LivingKnockBackEvent.setStrength(value as float) as void
ParameterTypeDescription
Parameter
value
Type
float
Description
No Description Provided

Properties

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