Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

Expansion for IIngredient

Casters

Result typeIs Implicit
Result type
IIngredientWithAmount
Is Implicit
true

Methods

Used implicitly when a machine can accept more than one item but you only provide one.

Return Type: IIngredientWithAmount

script.zs
// IIngredient.asIIngredientWithAmount() as IIngredientWithAmount
<tag:items:forge:ingots>.asIIngredientWithAmount();

Use this in contexts where machines accept more than one item to state that fact.

Return Type: IIngredientWithAmount

script.zs
IIngredient.mul(amount as int) as IIngredientWithAmount
ParameterTypeDescription
Parameter
amount
Type
int
Description
No Description Provided

Return Type: MCIngredientTransformed<IIngredient>

script.zs
// IIngredient.reuse() as MCIngredientTransformed<IIngredient>
<tag:items:forge:ingots>.reuse();

Use this if you already have the transformer from another ingredient

Return Type: MCIngredientTransformed<IIngredient>

script.zs
IIngredient.transform(transformer as IIngredientTransformer<IIngredient>) as MCIngredientTransformed<IIngredient>
ParameterTypeDescription
Parameter
transformer
Type
IIngredientTransformer<IIngredient>
Description
No Description Provided

Return Type: MCIngredientTransformed<IIngredient>

script.zs
IIngredient.transformCustom(uid as string, function as Function<IItemStack,IItemStack>) as MCIngredientTransformed<IIngredient>
ParameterTypeDescriptionOptionalDefaultValue
Parameter
uid
Type
string
Description
No Description Provided
Optional
false
DefaultValue
Parameter
function
Type
Function<IItemStack,IItemStack>
Description
No Description Provided
Optional
true
DefaultValue

Return Type: MCIngredientTransformed<IIngredient>

script.zs
IIngredient.transformDamage(amount as int) as MCIngredientTransformed<IIngredient>
ParameterTypeDescriptionOptionalDefaultValue
Parameter
amount
Type
int
Description
No Description Provided
Optional
true
DefaultValue
1

Return Type: MCIngredientTransformed<IIngredient>

script.zs
IIngredient.transformReplace(replaceWith as IItemStack) as MCIngredientTransformed<IIngredient>
ParameterTypeDescription
Parameter
replaceWith
Type
IItemStack
Description
No Description Provided