Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import mods.tfc.api.ingredient.BlockIngredient;

Name: of

Create a block ingredient from a block

Returns:
Return Type: BlockIngredient

ZenScript
Copy
// BlockIngredient.of(block as Block) as BlockIngredient

BlockIngredient.of(<block:minecraft:dirt>);
ParameterTypeDescription
Parameter
block
Type
Block
Description
block

Name: of

Create a block from an array of blocks

Returns:
Return Type: BlockIngredient

ZenScript
Copy
// BlockIngredient.of(blocks as Block[]) as BlockIngredient

BlockIngredient.of([<block:minecraft:dirt>, <block:minecraft:stone>]);
ParameterTypeDescription
Parameter
blocks
Type
Block[]
Description
array of blocks

Name: of

Create a block ingredient from a block tag

Returns:
Return Type: BlockIngredient

ZenScript
Copy
// BlockIngredient.of(tag as KnownTag<Block>) as BlockIngredient

BlockIngredient.of(<tag:blocks:minecraft:sand>);
ParameterTypeDescription
Parameter
tag
Type
KnownTag<Block>
Description
block tag