A ZenCaster denotes a method that can be called using the as token.
ZenCasters can be used to convert one type into another (e.g. Strings to IData).


public class Expansion {
    public static void print(IItemStack stack) {
        CraftTweakerAPI.logInfo("STACKKKKK: " + stack.getDisplayName());

    public static IOreDictEntry asOreDict(IItemStack stack) {
        return stack.getOres().get(0);

If someone now would call this, they would get an oreDictEntry:

val oreDict = <minecraft:iron_ingot> as IOreDictEntry;

What methods can be annotated || Additional Info