Combiner (Mekanism)
Description
Combines an input itemstack with an extra itemstack to create an output itemstack.
Identifier
Refer to this via any of the following:
mods.mekanism.combiner/* Used as page default */
mods.mekanism.CombinerAdding Recipes
Adds recipes in the format
ingredient,extra,output:groovymods.mekanism.combiner.add(IIngredient, ItemStack, ItemStack)
Example
mods.mekanism.combiner.add(ore('gemQuartz') * 8, item('minecraft:netherrack'), item('minecraft:quartz_ore'))Recipe Builder
Just like other recipe types, the Combiner also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.mekanism.combiner.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>)ItemStack. Sets the extra input item, defaults to Cobblestone. (Defaultnew ItemStack(Blocks.COBBLESTONE)).groovyextra(ItemStack)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullormekanism.common.recipe.machines.CombinerRecipe).groovyregister()
Example
mods.mekanism.combiner.recipeBuilder()
.input(ore('gemQuartz') * 8)
.extra(item('minecraft:netherrack'))
.output(item('minecraft:quartz_ore'))
.register()Removing Recipes
Removes all recipes that match the given input:
groovymods.mekanism.combiner.removeByInput(IIngredient, ItemStack)Removes all registered recipes:
groovymods.mekanism.combiner.removeAll()
Example
mods.mekanism.combiner.removeByInput(item('minecraft:flint'), item('minecraft:cobblestone'))
mods.mekanism.combiner.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.combiner.streamRecipes()
