Anvil Smashing (Inspirations)
Description
Converts a Block or IBlockState into an IBlockState when an anvil falls on top of it (from any height).
Identifier
Refer to this via any of the following:
mods.inspirations.anvil_smashing/* Used as page default */
mods.inspirations.anvilsmashing
mods.inspirations.anvilSmashing
mods.inspirations.AnvilSmashingAdding Recipes
Adds an Anvil Smashing recipe in the format
input,output:groovymods.inspirations.anvil_smashing.add(Block, IBlockState)Adds an Anvil Smashing recipe in the format
input,output:groovymods.inspirations.anvil_smashing.add(IBlockState, IBlockState)
Recipe Builder
Just like other recipe types, the Anvil Smashing also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.inspirations.anvil_smashing.recipeBuilder()
IBlockState. Sets the output IBlockState that replaces the input. Requires not null.groovyoutput(IBlockState)Block. Sets the input Block. Requires eitherinputBlockorinputBlockStateto be non-null.groovyinput(Block)IBlockState. Sets the input IBlockState. Requires eitherinputBlockorinputBlockStateto be non-null.groovyinput(IBlockState)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorjava.lang.Object).groovyregister()
Example
mods.inspirations.anvil_smashing.recipeBuilder()
.input(blockstate('minecraft:diamond_block'))
.output(blockstate('minecraft:clay'))
.register()
mods.inspirations.anvil_smashing.recipeBuilder()
.input(blockstate('minecraft:clay'))
.output(blockstate('minecraft:air'))
.register()Removing Recipes
Removes an Anvil Smashing recipe in the format
input,output:groovymods.inspirations.anvil_smashing.remove(Block, IBlockState)Removes an Anvil Smashing recipe in the format
input,output:groovymods.inspirations.anvil_smashing.remove(IBlockState, IBlockState)Removes an Anvil Smashing recipe matching the given input material:
groovymods.inspirations.anvil_smashing.remove(Material)Removes an Anvil Smashing recipe with the given Block or IBlockState input:
groovymods.inspirations.anvil_smashing.removeByInput(Block)Removes an Anvil Smashing recipe with the given Block or IBlockState input:
groovymods.inspirations.anvil_smashing.removeByInput(IBlockState)Removes all Anvil Smashing recipes with the given IBlockState output:
groovymods.inspirations.anvil_smashing.removeByOutput(IBlockState)Removes all registered recipes:
groovymods.inspirations.anvil_smashing.removeAll()
Example
mods.inspirations.anvil_smashing.removeByInput(blockstate('minecraft:packed_ice'))
mods.inspirations.anvil_smashing.removeByOutput(blockstate('minecraft:cobblestone'))
mods.inspirations.anvil_smashing.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.inspirations.anvil_smashing.streamRecipes()
