Metallurgic Infuser (Mekanism)
Description
Converts and input itemstack and a variable amount of an infusion type into an output itemstack.
Identifier
Refer to this via any of the following:
mods.mekanism.metallurgic_infuser/* Used as page default */
mods.mekanism.metallurgicinfuser
mods.mekanism.metallurgicInfuser
mods.mekanism.MetallurgicInfuser
Adding Recipes
Adds recipes in the format
ingredient
,infuseType
,infuseAmount
,output
:groovymods.mekanism.metallurgic_infuser.add(IIngredient, InfuseType, int, ItemStack)
Example
mods.mekanism.metallurgic_infuser.add(item('minecraft:nether_star'), infusionType('groovy_example'), 50, item('minecraft:clay'))
Recipe Builder
Just like other recipe types, the Metallurgic Infuser also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.mekanism.metallurgic_infuser.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
int
. Sets the amount of the provided Infusion type consumed. Requires greater than 0. (Default0
).groovyamount(int)
InfuseType
. Sets the Infusion type the recipe uses. Requires not null.groovyinfuse(String) infuse(InfuseType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
ormekanism.common.recipe.machines.MetallurgicInfuserRecipe
).groovyregister()
Example
mods.mekanism.metallurgic_infuser.recipeBuilder()
.input(item('minecraft:nether_star'))
.infuse(infusionType('groovy_example'))
.amount(50)
.output(item('minecraft:clay'))
.register()
Removing Recipes
Adds recipes in the format
ingredient
,infuseType
,infuseAmount
,output
:groovymods.mekanism.metallurgic_infuser.add(IIngredient, String, int, ItemStack)
Removes all recipes that match the given input:
groovymods.mekanism.metallurgic_infuser.removeByInput(IIngredient, InfuseType)
Removes all registered recipes:
groovymods.mekanism.metallurgic_infuser.removeAll()
Example
mods.mekanism.metallurgic_infuser.removeByInput(ore('dustObsidian'), 'DIAMOND')
mods.mekanism.metallurgic_infuser.removeAll()
Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.mekanism.metallurgic_infuser.streamRecipes()