Home Commands Examples Getting Started With Scripts Global Keywords

Global ZenCode Keywords

This file contains a list of Global keywords you can use in CraftTweaker. These are used in order to do some menial tasks.

Global Functions

  • print(argument as string) Prints a string to the crafttweaker.log file
  • println(argument as string) Prints a string, on a new line, to the crafttweaker.log file.

Global Getters

Global Getters get a value for you. They are mostly used for adding recipes.

The CraftTweakerTagRegistry

The CraftTweakerTagRegistry is a class with a single method, used to do dynamic string manipulations with tags.

Since the following isn’t doable with tags:

script.zs
var colour = "white" + "_";
<tag:items:minecraft:${colour}wool>...

This exists to amend that, so you can do:

script.zs
var colour = "white" + "_";
tags.tagManager(<resource:minecraft:items>).tag(<resource:minecraft:${colour}wool>)

Forge Only

  • brewing gets you the Brewing manager from which you can use the methods inside of the class