MCLivingConversionPreEvent
Link to mclivingconversionpreevent
The event is triggered when an entity is trying to replace itself with another entity. This event may trigger every tick even if it was cancelled last tick for entities like Zombies and Hoglins.
The event is cancelable.
If the event is canceled, the replacement will not occur
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.MCLivingConversionPreEvent;
使用方式
Link to 使用方式
Name: setConversionTimer
Sets the conversion timer, by changing this it prevents the event being triggered every tick Do note the timer of some of the entities are increments, but some of them are decrements Not every conversion is applicable for this
Return Type: void
ZenScript CopyMCLivingConversionPreEvent.setConversionTimer(ticks as int) as void
参数 | 类型 | 描述 |
---|---|---|
参数 ticks | 类型 int | 描述 No Description Provided |
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 outcome | 类型 MCEntityType #MC实体类型 | 可获得 true | 可设置 false | 描述 No Description Provided |