Global Functions
Link to global-functions
Global functions are functions that can be called without being imported.
Here's the list:
Link to print
Записывает строчку в лог CraftTweaker как информацию.
ZenScript Copy//print(String сообщение);
print("Привет, мир!");
Returns nothing
totalActions
Link to totalactions
ZenScript Copy//totalActions();
totalActions();
Returns an int that shows how many global functions are registered.
enableDebug
Link to enabledebug
Enables Debug mode.
Use of the Debug Preprocessor is preferred though.
ZenScript Copy//enableDebug();
enableDebug();
Returns nothing
isNull
Link to isnull
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
instanceof
Link to instanceof
ZenScript Copyentity instanceof IEntity;
Returns a boolean
max
Link to max
ZenScript Copy//max(int number1, int number2);
max(10, 11);
Returns the larger number
min
Link to min
ZenScript Copy//min(int number1, int number2);
min(10, 11);
Returns the lower number
pow
Link to pow
ZenScript Copy//pow(double number1, double number2);
pow(2.0, 4.0);
Returns a double
Global Fields
Link to global-fields
Поле | Описание |
---|---|
Поле 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) |