Vacuum Freezer (Tech Reborn)
Description
Converts an itemstack input into an itemstack output after a given process time, consuming energy per tick.
Identifier
Refer to this via any of the following:
mods.techreborn.vacuum_freezer/* Used as page default */
mods.techreborn.vacuumfreezer
mods.techreborn.vacuumFreezer
mods.techreborn.VacuumFreezer
Adding Recipes
Add the given recipe to the recipe list:
groovymods.techreborn.vacuum_freezer.add(R)
Recipe Builder
Just like other recipe types, the Vacuum Freezer also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.techreborn.vacuum_freezer.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 time in ticks the recipe takes to complete. Requires greater than or equal to 0. (Default0
).groovytime(int)
int
. Sets the power consumed per tick. Requires greater than or equal to 0. (Default0
).groovyperTick(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
ortechreborn.api.recipe.machines.VacuumFreezerRecipe
).groovyregister()
Example
mods.techreborn.vacuum_freezer.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:gold_ingot'))
.time(10)
.perTick(100)
.register()
mods.techreborn.vacuum_freezer.recipeBuilder()
.input(item('minecraft:diamond') * 3)
.output(item('minecraft:clay') * 2)
.time(5)
.perTick(32)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.techreborn.vacuum_freezer.remove(R)
Removes all recipes that match the given input:
groovymods.techreborn.vacuum_freezer.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.techreborn.vacuum_freezer.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.techreborn.vacuum_freezer.removeAll()
Example
mods.techreborn.vacuum_freezer.removeByInput(item('techreborn:dynamiccell').withNbt(['Fluid': ['FluidName': 'water', 'Amount': 1000]]))
mods.techreborn.vacuum_freezer.removeByOutput(item('minecraft:packed_ice'))
mods.techreborn.vacuum_freezer.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.techreborn.vacuum_freezer.streamRecipes()