Manual Chopping Block (Horse Power)
Description
Converts an itemstack input into an itemstack output after a configurable amount of processing has been done. Depending on if the config option Separate Chopping Recipes
is true, this may affect both Horse and Hand Chopping Blocks.
Identifier
Refer to this via any of the following:
mods.horsepower.manual_chopping_block/* Used as page default */
mods.horsepower.manualchoppingblock
mods.horsepower.manualChoppingBlock
mods.horsepower.ManualChoppingBlock
Adding Recipes
Add the given recipe to the recipe list:
groovymods.horsepower.manual_chopping_block.add(ChoppingBlockRecipe)
Adds recipes in the format
input
,output
,time
:groovymods.horsepower.manual_chopping_block.add(IIngredient, ItemStack, int)
Recipe Builder
Just like other recipe types, the Manual Chopping Block also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.horsepower.manual_chopping_block.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 chops the player has to make to complete the recipe. Requires greater than 0. (Default0
).groovytime(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
orse.gory_moon.horsepower.recipes.ChoppingBlockRecipe
).groovyregister()
Example
mods.horsepower.manual_chopping_block.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond') * 5)
.time(5)
.register()
mods.horsepower.manual_chopping_block.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:gold_ingot'))
.time(1)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.horsepower.manual_chopping_block.remove(ChoppingBlockRecipe)
Removes all recipes that match the given input:
groovymods.horsepower.manual_chopping_block.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.horsepower.manual_chopping_block.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.horsepower.manual_chopping_block.removeAll()
Example
mods.horsepower.manual_chopping_block.removeByInput(item('minecraft:log:3'))
mods.horsepower.manual_chopping_block.removeByOutput(item('minecraft:planks:4'))
mods.horsepower.manual_chopping_block.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.horsepower.manual_chopping_block.streamRecipes()