Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers

Util

The utils package allows you to retrieve a given IIngredient from parameters provided.

Importing the package

If you ever find yourself needing an import for this, here’s your chance:

script.zs
import mods.astralsorcery.Utils;

Get a Crystal Ingredient

This will return you an ingredient matching all befitting AS crystals.

script.zs
//Utils.getCrystalORIngredient(boolean hasToBeCelestial, boolean hasToBeAttuned);
val myCrystal = Utils.getCrystalORIngredient(true, true); //as crafttweaker.item.IIngredient