MCTickEvent

The event is not cancelable.

The event does not have a result.

导入相关包

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
Copy
import crafttweaker.api.event.tick.MCTickEvent;

Extending MCEvent

MCTickEvent extends MCEvent. That means all methods available in MCEvent are also available in MCTickEvent

方法

getPhase

Return Type: string

ZenScript
Copy
MCTickEvent.getPhase() as string
myMCTickEvent.getPhase();

getSide

Return Type: string

ZenScript
Copy
MCTickEvent.getSide() as string
myMCTickEvent.getSide();

getType

Return Type: string

ZenScript
Copy
MCTickEvent.getType() as string
myMCTickEvent.getType();

isClient

Return Type: boolean

ZenScript
Copy
MCTickEvent.isClient() as boolean
myMCTickEvent.isClient();

isEnd

Return Type: boolean

ZenScript
Copy
MCTickEvent.isEnd() as boolean
myMCTickEvent.isEnd();

isServer

Return Type: boolean

ZenScript
Copy
MCTickEvent.isServer() as boolean
myMCTickEvent.isServer();

isStart

Return Type: boolean

ZenScript
Copy
MCTickEvent.isStart() as boolean
myMCTickEvent.isStart();

参数

名称类型可获得可设置
clientbooleantruefalse
结束booleantruefalse
phasestringtruefalse
serverbooleantruefalse
sidestringtruefalse
开始booleantruefalse
类型stringtruefalse