Home Migration Guide Getting Started With Scripts Commands Examples
Generic JSON Recipes

InfusionStackIngredient

This class was added by a mod with mod-id mekanism. So you need to have this mod installed if you want to use this feature.

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.

script.zs
import mods.mekanism.api.ingredient.ChemicalStackIngredient.InfusionStackIngredient;

Implemented Interfaces

InfusionStackIngredient implements the following interfaces. That means all methods defined in these interfaces are also available in InfusionStackIngredient

Static Methods

Combines multiple InfusionStackIngredient s into a single InfusionStackIngredient .

Returns: A single InfusionStackIngredient representing all the passed in ingredients.
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.createMulti(ingredients as InfusionStackIngredient[]) as InfusionStackIngredient
ParameterTypeDescription
Parameter
ingredients
Type
InfusionStackIngredient[]
Description
Ingredients to combine

Creates a InfusionStackIngredient that matches a given infuse type tag with amount.

Returns: A InfusionStackIngredient that matches a given infuse type tag with amount.
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.from(infuseTypeTag as MCTagWithAmount<InfuseType>) as InfusionStackIngredient
ParameterTypeDescription
Parameter
infuseTypeTag
Type
MCTagWithAmount<InfuseType>
Description
Tag and amount to match

Creates a InfusionStackIngredient that matches a given infusion stack.

Returns: A InfusionStackIngredient that matches a given infusion stack.
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.from(instance as InfusionStack) as InfusionStackIngredient
ParameterTypeDescription
Parameter
instance
Type
InfusionStack
Description
Infusion stack to match

Creates a InfusionStackIngredient that matches a given infuse type tag with a given amount.

Returns: A InfusionStackIngredient that matches a given infuse type tag with a given amount.
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.from(infuseTypeTag as MCTag<InfuseType>, amount as long) as InfusionStackIngredient
ParameterTypeDescription
Parameter
infuseTypeTag
Type
MCTag<InfuseType>
Description
Tag to match
Parameter
amount
Type
long
Description
Amount needed

Creates a InfusionStackIngredient that matches a given infuse type and amount.

Returns: A InfusionStackIngredient that matches a given infuse type and amount.
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.from(instance as InfuseType, amount as long) as InfusionStackIngredient
ParameterTypeDescription
Parameter
instance
Type
InfuseType
Description
Infuse type to match
Parameter
amount
Type
long
Description
Amount needed

Casters

Result typeIs Implicit
Result type
IData
Is Implicit
true

Methods

Converts this InfusionStackIngredient into JSON (IData).

Returns: InfusionStackIngredient as JSON.
Return Type: IData

script.zs
// InfusionStackIngredient.asIData() as IData
myInfusionStackIngredient.asIData();

OR’s this InfusionStackIngredient with another InfusionStackIngredient to create a multi InfusionStackIngredient

Returns: Multi InfusionStackIngredient that matches both the source InfusionStackIngredient and the OR’d InfusionStackIngredient .
Return Type: InfusionStackIngredient

script.zs
InfusionStackIngredient.or(other as InfusionStackIngredient) as InfusionStackIngredient
ParameterTypeDescription
Parameter
other
Type
InfusionStackIngredient
Description
InfusionStackIngredient to combine with.

Operators

Returns a new InfusionStackIngredient using the two InfusionStackIngredient as a base.

script.zs
(ing1 as InfusionStackIngredient) | (ing2 as InfusionStackIngredient);