Runic Shear Block (Roots 3)
Description
Right clicking a Runic Shear on a block to convert it into a replacement block and drop items.
Identifier
The identifier mods.roots.runic_shear_block will be used as the default on this page.
All Identifiers
Any of these can be used to refer to this compat:
mods.roots.runicshearblock
mods.roots.runicShearBlock
mods.roots.RunicShearBlock
mods.roots.runic_shear_block/* Used as page default */Adding Recipes
Recipe Builder
Just like other recipe types, the Runic Shear Block 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.roots.runic_shear_block.recipeBuilder()
ResourceLocation. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)BlockStatePredicate. Sets the target input blockstate. Requires not null.groovystate(IBlockState) state(BlockStatePredicate)ItemStack. Sets the item representing the target input blockstate.groovydisplayItem(ItemStack)IBlockState. Sets the blockstate replacing the input block. Requires not null.groovyreplacementState(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. (returnsnullorepicsquid.roots.recipe.RunicShearRecipe).groovyregister()
Example
mods.roots.runic_shear_block.recipeBuilder()
.name('clay_from_runic_diamond')
.state(blockstate('minecraft:diamond_block'))
.replacementState(blockstate('minecraft:air'))
.output(item('minecraft:clay') * 64)
.displayItem(item('minecraft:diamond') * 9)
.register()
mods.roots.runic_shear_block.recipeBuilder()
.state(mods.roots.predicates.stateBuilder().blockstate(blockstate('minecraft:yellow_flower:type=dandelion')).properties('type').register())
.replacementState(blockstate('minecraft:red_flower:type=poppy'))
.output(item('minecraft:gold_ingot'))
.register()Removing Recipes
Removes the Runic Shear Block recipe with the given name:
groovymods.roots.runic_shear_block.removeByName(ResourceLocation)Removes the Runic Shear Block recipe with the given output IBlockState:
groovymods.roots.runic_shear_block.removeByState(IBlockState)Removes the Runic Shear Block recipe with the given output itemstack:
groovymods.roots.runic_shear_block.removeByOutput(ItemStack)Removes all registered recipes:
groovymods.roots.runic_shear_block.removeAll()
Example
mods.roots.runic_shear_block.removeByName(resource('roots:wildewheet'))
mods.roots.runic_shear_block.removeByState(blockstate('minecraft:beetroots:age=3'))
mods.roots.runic_shear_block.removeByOutput(item('roots:spirit_herb'))
mods.roots.runic_shear_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.roots.runic_shear_block.streamRecipes()
