Packager (Cyclic)
Description
Converts up to 6 input itemstacks into an output itemstack.
Identifier
Refer to this via any of the following:
mods.cyclicmagic.packager/* Used as page default */
mods.cyclicmagic.Packager
mods.cyclic.packager
mods.cyclic.Packager
Adding Recipes
Add the given recipe to the recipe list:
groovymods.cyclicmagic.packager.add(RecipePackager)
Recipe Builder
Just like other recipe types, the Packager also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.cyclicmagic.packager.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 6.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>)
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
orcom.lothrazar.cyclicmagic.block.packager.RecipePackager
).groovyregister()
Example
mods.cyclicmagic.packager.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()
mods.cyclicmagic.packager.recipeBuilder()
.input(ore('logWood'), ore('sand'), ore('gravel'), item('minecraft:diamond'), item('minecraft:diamond_block'), item('minecraft:gold_block'))
.output(item('minecraft:clay') * 4)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.cyclicmagic.packager.remove(RecipePackager)
Removes all recipes that match the given input:
groovymods.cyclicmagic.packager.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.cyclicmagic.packager.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.cyclicmagic.packager.removeAll()
Example
mods.cyclicmagic.packager.removeByInput(item('minecraft:grass'))
mods.cyclicmagic.packager.removeByOutput(item('minecraft:melon_block'))
mods.cyclicmagic.packager.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.cyclicmagic.packager.streamRecipes()