ItemStackProvider
Link to itemstackprovider
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.tfc.api.ingredient.ItemStackProvider;
Static Methods
Link to static-methods
Name: addInputHeat
Add Heat to the recipe input item
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.addInputHeat(heat as float) as ItemStackProvider
ItemStackProvider.addInputHeat(100);
Parameter | Type | Description |
---|---|---|
Parameter heat | Type float | Description heat to add to the input |
Name: addOutputHeat
Add heat to the output
Returns: TFCItemStackProvider
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.addOutputHeat(output as IItemStack, heat as float) as ItemStackProvider
ItemStackProvider.addOutputHeat(<item:tfc:metal/ingot/copper>, 100);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description heat item |
Parameter heat | Type float | Description heat to add to the output |
Name: addRemoveTrait
Add or remove a trait from the recipe input item
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.addRemoveTrait(trait as string, add as boolean) as ItemStackProvider
ItemStackProvider.addRemoveTrait("salted", false);
Parameter | Type | Description |
---|---|---|
Parameter trait | Type string | Description name of the trait |
Parameter add | Type boolean | Description true to add the trait, false to remove it |
Name: addRemoveTrait
Add or remove a trait to the output item
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.addRemoveTrait(output as IItemStack, trait as string, add as boolean) as ItemStackProvider
ItemStackProvider.addRemoveTrait(<item:tfc:food/banana>, "salted", true);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description item |
Parameter trait | Type string | Description name of the trait |
Parameter add | Type boolean | Description true to add the trait, false to remove it |
Name: copyFood
Copy the input item food data to the output
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyFood(output as IItemStack) as ItemStackProvider
ItemStackProvider.copyFood(<item:tfc:food/banana>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description output item |
Name: copyForgingBonus
Copy the input forging bonus.
Returns: TFCItemStackProvider
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyForgingBonus(output as IItemStack) as ItemStackProvider
ItemStackProvider.copyForgingBonus(<item:tfc:metal/ingot/bronze>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description output item |
Name: copyHeat
Copy the input heat to the output
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyHeat() as ItemStackProvider
ItemStackProvider.copyHeat();
Name: copyHeat
Copy the input item heat data to the output
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyHeat(output as IItemStack) as ItemStackProvider
ItemStackProvider.copyHeat(<item:tfc:metal/ingot/copper>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description output item |
Name: copyInput
Return a copy of the input
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyInput() as ItemStackProvider
ItemStackProvider.copyInput();
Name: copyOldestFood
Copy the oldest food from the input and add it to the output item
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.copyOldestFood(output as IItemStack) as ItemStackProvider
ItemStackProvider.copyOldestFood(<item:tfc:food/banana>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description output item |
Name: empty
Create an empty ItemStack provider
Returns: TFCItemStackProvider
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.empty() as ItemStackProvider
ItemStackProvider.empty();
Name: none
Create an ItemStackProvider with no Modifier.
Returns: TFCItemStackProvider
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.none(output as IItemStack) as ItemStackProvider
ItemStackProvider.none(<item:tfc:metal/double_ingot/copper>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description item output |
Name: resetFood
Reset the input food data.
Returns: TFCItemStackProvider
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.resetFood() as ItemStackProvider
ItemStackProvider.resetFood();
Name: resetFood
Reset the output Food data
Returns:
Return Type: ItemStackProvider
ZenScript Copy// ItemStackProvider.resetFood(output as IItemStack) as ItemStackProvider
ItemStackProvider.resetFood(<item:tfc:food/banana>);
Parameter | Type | Description |
---|---|---|
Parameter output | Type IItemStack | Description output item |
Constructors
Link to constructors
ZenScript Copynew ItemStackProvider() as ItemStackProvider
new ItemStackProvider();