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

SlurryStackIngredient

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.SlurryStackIngredient;

Implemented Interfaces

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

Static Methods

Combines multiple SlurryStackIngredient s into a single SlurryStackIngredient .

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

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

Creates a SlurryStackIngredient that matches a given slurry stack.

Returns: A SlurryStackIngredient that matches a given slurry stack.
Return Type: SlurryStackIngredient

script.zs
SlurryStackIngredient.from(instance as SlurryStack) as SlurryStackIngredient
ParameterTypeDescription
Parameter
instance
Type
SlurryStack
Description
Slurry stack to match

Creates a SlurryStackIngredient that matches a given slurry tag with amount.

Returns: A SlurryStackIngredient that matches a given slurry tag with amount.
Return Type: SlurryStackIngredient

script.zs
SlurryStackIngredient.from(slurryTag as MCTagWithAmount<Slurry>) as SlurryStackIngredient
ParameterTypeDescription
Parameter
slurryTag
Type
MCTagWithAmount<Slurry>
Description
Tag and amount to match

Creates a SlurryStackIngredient that matches a given slurry and amount.

Returns: A SlurryStackIngredient that matches a given slurry and amount.
Return Type: SlurryStackIngredient

script.zs
SlurryStackIngredient.from(instance as Slurry, amount as long) as SlurryStackIngredient
ParameterTypeDescription
Parameter
instance
Type
Slurry
Description
Slurry to match
Parameter
amount
Type
long
Description
Amount needed

Creates a SlurryStackIngredient that matches a given slurry tag with a given amount.

Returns: A SlurryStackIngredient that matches a given slurry tag with a given amount.
Return Type: SlurryStackIngredient

script.zs
SlurryStackIngredient.from(slurryTag as MCTag<Slurry>, amount as long) as SlurryStackIngredient
ParameterTypeDescription
Parameter
slurryTag
Type
MCTag<Slurry>
Description
Tag to match
Parameter
amount
Type
long
Description
Amount needed

Casters

Result typeIs Implicit
Result type
IData
Is Implicit
true

Methods

Converts this SlurryStackIngredient into JSON (IData).

Returns: SlurryStackIngredient as JSON.
Return Type: IData

script.zs
// SlurryStackIngredient.asIData() as IData
mySlurryStackIngredient.asIData();

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

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

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

Operators

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

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