FluidStackIngredient

Link to fluidstackingredient

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

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.mekanism.api.ingredient.FluidStackIngredient;

Name: createMulti

Combines multiple FluidStackIngredients into a single FluidStackIngredient.

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

ZenScript
Copy
FluidStackIngredient.createMulti(ingredients as FluidStackIngredient[]) as FluidStackIngredient
ParameterTypeDescription
Parameter
ingredients
Type
FluidStackIngredient[]
Description
Ingredients to combine

Name: from

Creates a FluidStackIngredient that matches a given fluid tag with amount.

Returns: A FluidStackIngredient that matches a given fluid tag with amount.
Return Type: FluidStackIngredient

ZenScript
Copy
FluidStackIngredient.from(fluidTag as MCTagWithAmount<MCFluid>) as FluidStackIngredient
ParameterTypeDescription
Parameter
fluidTag
Type
MCTagWithAmount<MCFluid>
Description
Tag and amount to match

Name: from

Creates a FluidStackIngredient that matches a given fluid stack.

Returns: A FluidStackIngredient that matches a given fluid stack.
Return Type: FluidStackIngredient

ZenScript
Copy
FluidStackIngredient.from(instance as IFluidStack) as FluidStackIngredient
ParameterTypeDescription
Parameter
instance
Type
IFluidStack
Description
Fluid stack to match

Name: from

Creates a FluidStackIngredient that matches a given fluid and amount.

Returns: A FluidStackIngredient that matches a given fluid and amount.
Return Type: FluidStackIngredient

ZenScript
Copy
FluidStackIngredient.from(fluid as MCFluid, amount as int) as FluidStackIngredient
ParameterTypeDescription
Parameter
fluid
Type
MCFluid
Description
Fluid to match
Parameter
amount
Type
int
Description
Amount needed

Name: from

Creates a FluidStackIngredient that matches a given fluid tag with a given amount.

Returns: A FluidStackIngredient that matches a given fluid tag with a given amount.
Return Type: FluidStackIngredient

ZenScript
Copy
FluidStackIngredient.from(fluidTag as MCTag<MCFluid>, amount as int) as FluidStackIngredient
ParameterTypeDescription
Parameter
fluidTag
Type
MCTag<MCFluid>
Description
Tag to match
Parameter
amount
Type
int
Description
Amount needed
Result typeIs Implicit
Result type
IData
Is Implicit
true

Name: asIData

Converts this FluidStackIngredient into JSON (IData).

Returns: FluidStackIngredient as JSON.
Return Type: IData

ZenScript
Copy
// FluidStackIngredient.asIData() as IData

myFluidStackIngredient.asIData();

Name: or

OR's this FluidStackIngredient with another FluidStackIngredient to create a multi FluidStackIngredient

Returns: Multi FluidStackIngredient that matches both the source FluidStackIngredient and the OR'd FluidStackIngredient.
Return Type: FluidStackIngredient

ZenScript
Copy
FluidStackIngredient.or(other as FluidStackIngredient) as FluidStackIngredient
ParameterTypeDescription
Parameter
other
Type
FluidStackIngredient
Description
FluidStackIngredient to combine with.

Name: OR

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

ZenScript
Copy
(ing1 as FluidStackIngredient) | (ing2 as FluidStackIngredient);