ItemStackIngredient
Link to itemstackingredient
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 Copyimport mods.mekanism.api.ingredient.ItemStackIngredient;
Static Methods
Link to static-methods
Name: createMulti
Combines multiple ItemStackIngredients into a single ItemStackIngredient.
Returns: A single ItemStackIngredient
representing all the passed in ingredients.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.createMulti(ingredients as ItemStackIngredient[]) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter ingredients | Type ItemStackIngredient[] | Description Ingredients to combine |
Name: from
Creates a ItemStackIngredient that matches a given ingredient with an amount of one.
Returns: A ItemStackIngredient that matches a
given ingredient with an amount of one.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(ingredient as IIngredient) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter ingredient | Type IIngredient | Description Ingredient to match |
Name: from
Creates a ItemStackIngredient that matches a given ingredient with amount.
Returns: A ItemStackIngredient that matches a
given ingredient with amount.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(ingredient as IIngredientWithAmount) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter ingredient | Type IIngredientWithAmount | Description Ingredient and amount to match |
Name: from
Creates a ItemStackIngredient out of all the ingredients in the given IngredientList.
Returns: A ItemStackIngredient made up of all
the ingredients in the given IngredientList.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(ingredientList as IngredientList) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter ingredientList | Type IngredientList | Description Ingredients to match |
Name: from
Creates a ItemStackIngredient that matches a given item with an amount of one.
Returns: A ItemStackIngredient that matches a
given item with an amount of one.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(item as MCItemDefinition) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter item | Type MCItemDefinition | Description Item to match |
Name: from
Creates a ItemStackIngredient that matches a given item tag with an amount of one.
Returns: A ItemStackIngredient that matches a
given item tag with an amount of one.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(itemTag as MCTag<MCItemDefinition>) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter itemTag | Type MCTag<MCItemDefinition> | Description Tag to match |
Name: from
Creates a ItemStackIngredient that matches a given item tag with amount.
Returns: A ItemStackIngredient that matches a
given item tag with amount.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(itemTag as MCTagWithAmount<MCItemDefinition>) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter itemTag | Type MCTagWithAmount<MCItemDefinition> | Description Tag and amount to match |
Name: from
Creates a ItemStackIngredient that matches a given item stack.
Returns: A ItemStackIngredient that matches a
given item stack.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(stack as IItemStack) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter stack | Type IItemStack | Description Item stack to match |
Name: from
Creates a ItemStackIngredient that matches a given ingredient and amount.
Returns: A ItemStackIngredient that matches a
given ingredient and amount.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(ingredient as IIngredient, amount as int) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter ingredient | Type IIngredient | Description Ingredient to match |
Parameter amount | Type int | Description Amount needed |
Name: from
Creates a ItemStackIngredient that matches a given item and amount.
Returns: A ItemStackIngredient that matches a
given item and amount.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(item as MCItemDefinition, amount as int) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter item | Type MCItemDefinition | Description Item to match |
Parameter amount | Type int | Description Amount needed |
Name: from
Creates a ItemStackIngredient that matches a given item tag with a given amount.
Returns: A ItemStackIngredient that matches a
given item tag with a given amount.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.from(itemTag as MCTag<MCItemDefinition>, amount as int) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter itemTag | Type MCTag<MCItemDefinition> | Description Tag to match |
Parameter amount | Type int | Description Amount needed |
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type IData | Is Implicit true |
Methods
Link to methods
Name: asIData
Converts this ItemStackIngredient into JSON (IData).
Returns: ItemStackIngredient as JSON.
Return Type: IData
ZenScript Copy// ItemStackIngredient.asIData() as IData
myItemStackIngredient.asIData();
Name: or
OR's this ItemStackIngredient with another ItemStackIngredient to create a multi ItemStackIngredient
Returns: Multi ItemStackIngredient that matches
both the source ItemStackIngredient and the
OR'd ItemStackIngredient.
Return Type: ItemStackIngredient
ZenScript CopyItemStackIngredient.or(other as ItemStackIngredient) as ItemStackIngredient
Parameter | Type | Description |
---|---|---|
Parameter other | Type ItemStackIngredient | Description ItemStackIngredient to combine with. |
Operators
Link to operators
Name: OR
Returns a new ItemStackIngredient using the two ItemStackIngredient as a base.
ZenScript Copy(ing1 as ItemStackIngredient) | (ing2 as ItemStackIngredient);