LivingKnockBackEvent
Link to livingknockbackevent
The event is cancelable.
If the event is canceled, the entity is not knocked back.
The event does not have a result.
导入类
Link to 导入类
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.
ZenScript Copyimport crafttweaker.api.event.living.LivingKnockBackEvent;
Extending LivingEvent
Link to extending-livingevent
LivingKnockBackEvent extends LivingEvent. That means all methods available in LivingEvent are also available in LivingKnockBackEvent
使用方式
Link to 使用方式
Name: getOriginRatioX
Return Type: double
ZenScript Copy// LivingKnockBackEvent.getOriginRatioX() as double
event.getOriginRatioX();
Name: getOriginRatioZ
Return Type: double
ZenScript Copy// LivingKnockBackEvent.getOriginRatioZ() as double
event.getOriginRatioZ();
Name: getOriginStrength
Return Type: float
ZenScript Copy// LivingKnockBackEvent.getOriginStrength() as float
event.getOriginStrength();
Name: getRatioX
Return Type: double
ZenScript Copy// LivingKnockBackEvent.getRatioX() as double
event.getRatioX();
Name: getRatioZ
Return Type: double
ZenScript Copy// LivingKnockBackEvent.getRatioZ() as double
event.getRatioZ();
Name: getStrength
Return Type: float
ZenScript Copy// LivingKnockBackEvent.getStrength() as float
event.getStrength();
Name: setRatioX
ZenScript CopyLivingKnockBackEvent.setRatioX(value as double)
参数 | 类型 |
---|---|
参数 value | 类型 double |
Name: setRatioZ
ZenScript CopyLivingKnockBackEvent.setRatioZ(value as double)
参数 | 类型 |
---|---|
参数 value | 类型 double |
Name: setStrength
ZenScript CopyLivingKnockBackEvent.setStrength(value as float)
参数 | 类型 |
---|---|
参数 value | 类型 float |
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 originRatioX | 类型 double | 可获得 true | 可设置 false |
名称 originRatioZ | 类型 double | 可获得 true | 可设置 false |
名称 originStrength | 类型 float | 可获得 true | 可设置 false |
名称 ratioX | 类型 double | 可获得 true | 可设置 true |
名称 ratioZ | 类型 double | 可获得 true | 可设置 true |
名称 strength | 类型 float | 可获得 true | 可设置 true |