BlockIngredient
Link to blockingredient
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 Copyimport mods.tfc.api.ingredient.BlockIngredient;
Static Methods
Link to static-methods
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>);
Parameter | Type | Description |
---|---|---|
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>]);
Parameter | Type | Description |
---|---|---|
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>);
Parameter | Type | Description |
---|---|---|
Parameter tag | Type KnownTag<Block> | Description block tag |