Global functions are functions that can be called without being imported.
Here's the list:

将字符串信息打印到CraftTweaker的日志中。

ZenScript
Copy
//print(String message);
print("Hello World!");

Returns nothing

ZenScript
Copy
//totalActions();
totalActions();

返回一个int,显示注册了多少个全局函数。

Enables Debug mode.
Use of the Debug Preprocessor is preferred though.

ZenScript
Copy
//enableDebug();
enableDebug();

Returns nothing

Checks if a given object is null.
Doesn't work on primitives!

ZenScript
Copy
//isNull(Object o);
isNull(<minecraft:dirt>);

Returns a boolean Note: If this does not work for you, try casting the object to bool <minecraft:dirt> as bool

ZenScript
Copy
entity instanceof IEntity;

Returns a boolean

ZenScript
Copy
//max(int number1, int number2);
max(10, 11);

Returns the larger number

ZenScript
Copy
//min(int number1, int number2);
min(10, 11);

Returns the lower number

ZenScript
Copy
//pow(double number1, double number2);
pow(2.0, 4.0);

Returns a double

字段描述
字段
brewing
描述
Accesses the Brewing Handler
字段
client
描述
Accesses client Methods
字段
events
描述
Accesses the Event Handler
字段
format
描述
Accesses the Formatting Handler
字段
furnace
描述
Accesses the Furnace Handler
字段
game
描述
Accesses Game functions
字段
itemUtils
描述
Accesses the ItemUtils Handler
字段
loadedMods
描述
Accesses the loaded Mods list
字段
logger
描述
Accesses the logger
字段
oreDict
描述
Accesses the oreDictionary Handler
字段
recipes
描述
Accesses the Recipe Handler
字段
server
描述
Accesses server Methods
字段
vanilla
描述
Accesses vanilla functions (currently only vanilla.seeds available)