DeHydrator (Cyclic)
Description
Converts an input itemstack into an output itemstack.
Identifier
Refer to this via any of the following:
mods.cyclicmagic.dehydrator/* Used as page default */
mods.cyclicmagic.Dehydrator
mods.cyclic.dehydrator
mods.cyclic.Dehydrator
Adding Recipes
Recipe Builder
Just like other recipe types, the DeHydrator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.cyclicmagic.dehydrator.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 time in ticks the recipe takes to process. Requires greater than or equal to 0. (Default10
).groovytime(int)
int
. Sets the amount of water produced by the DeHydrator on completing a recipe. Requires greater than or equal to 0. (Default100
).groovywater(int)
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.dehydrator.RecipeDeHydrate
).groovyregister()
Example
mods.cyclicmagic.dehydrator.recipeBuilder()
.input(item('minecraft:gold_ingot'))
.output(item('minecraft:clay'))
.register()
mods.cyclicmagic.dehydrator.recipeBuilder()
.input(ore('logWood'))
.output(item('minecraft:clay') * 8)
.time(100)
.water(30)
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.cyclicmagic.dehydrator.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.cyclicmagic.dehydrator.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.cyclicmagic.dehydrator.removeAll()
Example
mods.cyclicmagic.dehydrator.removeByInput(item('minecraft:clay'))
mods.cyclicmagic.dehydrator.removeByOutput(item('minecraft:deadbush'))
mods.cyclicmagic.dehydrator.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.dehydrator.streamRecipes()