Saw (Better With Mods)
Description
Converts a block into output itemstacks after being powered via rotation power.
Identifier
Refer to this via any of the following:
mods.betterwithmods.saw/* Used as page default */
mods.betterwithmods.Saw
Adding Recipes
Add the given recipe to the recipe list:
groovymods.betterwithmods.saw.add(SawRecipe)
Recipe Builder
Just like other recipe types, the Saw also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.betterwithmods.saw.recipeBuilder()
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 1 and less than or equal to 9.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
BlockIngredient
. Sets the input block of the recipe.groovyinput(String) input(IIngredient) input(ItemStack...) input(IIngredient...) input(BlockIngredient) input(List<ItemStack>) input(Collection<IIngredient>)
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
orbetterwithmods.common.registry.block.recipe.SawRecipe
).groovyregister()
Example
mods.betterwithmods.saw.recipeBuilder()
.input(item('minecraft:diamond_block'))
.output(item('minecraft:gold_ingot') * 16)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.betterwithmods.saw.remove(SawRecipe)
Removes all recipes that match the given input:
groovymods.betterwithmods.saw.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.betterwithmods.saw.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.betterwithmods.saw.removeAll()
Example
mods.betterwithmods.saw.removeByInput(item('minecraft:vine'))
mods.betterwithmods.saw.removeByOutput(item('minecraft:pumpkin'))
mods.betterwithmods.saw.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.betterwithmods.saw.streamRecipes()