GasStackIngredient

Link to gasstackingredient

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.ChemicalStackIngredient.GasStackIngredient;

Implemented Interfaces

Link to implemented-interfaces

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

Name: createMulti

Combines multiple GasStackIngredient s into a single GasStackIngredient .

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

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

Name: from

Creates a GasStackIngredient that matches a given gas tag with amount.

Returns: A GasStackIngredient that matches a given gas tag with amount.
Return Type: GasStackIngredient

ZenScript
Copy
GasStackIngredient.from(gasTag as MCTagWithAmount<Gas>) as GasStackIngredient
ParameterTypeDescription
Parameter
gasTag
Type
MCTagWithAmount<Gas>
Description
Tag and amount to match

Name: from

Creates a GasStackIngredient that matches a given gas stack.

Returns: A GasStackIngredient that matches a given gas stack.
Return Type: GasStackIngredient

ZenScript
Copy
GasStackIngredient.from(instance as GasStack) as GasStackIngredient
ParameterTypeDescription
Parameter
instance
Type
GasStack
Description
Gas stack to match

Name: from

Creates a GasStackIngredient that matches a given gas tag with a given amount.

Returns: A GasStackIngredient that matches a given gas tag with a given amount.
Return Type: GasStackIngredient

ZenScript
Copy
GasStackIngredient.from(gasTag as MCTag<Gas>, amount as long) as GasStackIngredient
ParameterTypeDescription
Parameter
gasTag
Type
MCTag<Gas>
Description
Tag to match
Parameter
amount
Type
long
Description
Amount needed

Name: from

Creates a GasStackIngredient that matches a given gas and amount.

Returns: A GasStackIngredient that matches a given gas and amount.
Return Type: GasStackIngredient

ZenScript
Copy
GasStackIngredient.from(instance as Gas, amount as long) as GasStackIngredient
ParameterTypeDescription
Parameter
instance
Type
Gas
Description
Gas to match
Parameter
amount
Type
long
Description
Amount needed
Result typeIs Implicit
Result type
IData
Is Implicit
true

Name: asIData

Converts this GasStackIngredient into JSON (IData).

Returns: GasStackIngredient as JSON.
Return Type: IData

ZenScript
Copy
// GasStackIngredient.asIData() as IData

myGasStackIngredient.asIData();

Name: or

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

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

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

Name: OR

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

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