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.
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
InfusionStackIngredient.createMulti(ingredients as InfusionStackIngredient[]) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
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
InfusionStackIngredient.from(infuseTypeTag as MCTagWithAmount<InfuseType>) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
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
InfusionStackIngredient.from(instance as InfusionStack) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
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
InfusionStackIngredient.from(infuseTypeTag as MCTag<InfuseType>, amount as long) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
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
InfusionStackIngredient.from(instance as InfuseType, amount as long) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
Parameter instance | Type InfuseType | Description Infuse type to match |
Parameter amount | Type long | Description Amount needed |
Casters
| Result type | Is Implicit |
|---|---|
Result type IData | Is Implicit true |
Methods
Converts this InfusionStackIngredient into JSON (IData).
Returns: InfusionStackIngredient
as JSON.
Return Type: IData
// 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
InfusionStackIngredient.or(other as InfusionStackIngredient) as InfusionStackIngredient| Parameter | Type | Description |
|---|---|---|
Parameter other | Type InfusionStackIngredient | Description InfusionStackIngredient to combine with. |
Operators
Returns a new InfusionStackIngredient using the two InfusionStackIngredient as a base.
(ing1 as InfusionStackIngredient) | (ing2 as InfusionStackIngredient);