Home Getting Started With Scripts Using this wiki Commands CTGUI Global functions Bracket Handlers
This page relates to Immersive Intelligence, which has built-in support!

Ammunition Workshop

The AmmunitionWorkshop package can be used to modify the Immersive Intelligence Ammunition Workshop recipes.

Take note it is not limited to producing ammunition and can be used for any generic recipe involving 2 items.

Importing the Package

script.zs
import mods.immersiveintelligence.AmmunitionWorkshop;

Adding Recipes

Parameters

TypeNameRequired
Type
IIngredient
Name
Core Input
Required
Yes
Type
IIngredient
Name
Casing Input
Required
Yes
Type
IAmmunitionWorkshopFunction
Name
Output Function
Required
Yes
Type
int
Name
Energy
Required
Yes
Type
int
Name
Time
Required
Yes

Syntax

script.zs
mods.immersiveintelligence.AmmunitionWorkshop.addRecipe(IIngredient coreInput, IIngredient casingInput, IAmmunitionWorkshopFunction fun, int energy, int time);

IAmmunitionWorkshopFunction

IAmmunitionWorkshopFunction is a function used to determine the output item of a recipe based on its ingredients.
For example, It can be used to get the core NBT tag or merge the core and casing’s NBT tags.

TypeName
Type
IItemStack
Name
Core Input
Type
IItemStack
Name
Casing Input

Returns: IItemStack

Example

script.zs
mods.immersiveintelligence.AmmunitionWorkshop.addRecipe(
<minecraft:diamond>, <ore:ingotIron>,
function(inputCore,inputCasing) {
return <minecraft:iron_ingot>.withTag(inputCore.tag);
},
2000, 200);

Removing Recipes

Parameters

TypeNameRequired
Type
IItemStack
Name
Core Input
Required
Yes

Syntax

script.zs
mods.immersiveintelligence.AmmunitionWorkshop.removeRecipe(IItemStack input);

Example

script.zs
mods.immersiveintelligence.AmmunitionWorkshop.removeRecipe(<minecraft:diamond>);