Crushing Table (Magneticraft)
Description
Converts an input itemstack into an output itemstack when placed on top of the Crushing Table and interacted with by a Hammer which has.
Identifier
Refer to this via any of the following:
mods.magneticraft.crushing_table/* Used as page default */
mods.magneticraft.crushingtable
mods.magneticraft.crushingTable
mods.magneticraft.CrushingTable
Adding Recipes
Add the given recipe to the recipe list:
groovymods.magneticraft.crushing_table.add(ICrushingTableRecipe)
Recipe Builder
Just like other recipe types, the Crushing Table also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.magneticraft.crushing_table.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>)
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.cout970.magneticraft.api.registries.machines.crushingtable.ICrushingTableRecipe
).groovyregister()
Example
mods.magneticraft.crushing_table.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.register()
mods.magneticraft.crushing_table.recipeBuilder()
.input(item('minecraft:diamond'))
.output(item('minecraft:clay'))
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.magneticraft.crushing_table.remove(ICrushingTableRecipe)
Removes all recipes that match the given input:
groovymods.magneticraft.crushing_table.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.magneticraft.crushing_table.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.magneticraft.crushing_table.removeAll()
Example
mods.magneticraft.crushing_table.removeByInput(item('minecraft:iron_ore'))
mods.magneticraft.crushing_table.removeByOutput(item('minecraft:gunpowder'))
mods.magneticraft.crushing_table.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.magneticraft.crushing_table.streamRecipes()