Bark Carving (Roots 3)
Description
Bark Carving is a special set of alternate drops for blocks when broken with an item containing the tool type 'knife'. Amount dropped is up to 2 + fortune/looting level higher than the set amount.
Identifier
Refer to this via any of the following:
mods.roots.bark_carving/* Used as page default */
mods.roots.barkcarving
mods.roots.barkCarving
mods.roots.BarkCarving
mods.roots.bark
mods.roots.BarkAdding Recipes
Recipe Builder
Just like other recipe types, the Bark Carving 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.bark_carving.recipeBuilder()
ResourceLocation. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IBlockState) input(IIngredient) input(IIngredient...) input(Collection<IIngredient>) blockstate(IBlockState)ItemStackList. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
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.BarkRecipe).groovyregister()
Example
mods.roots.bark_carving.recipeBuilder()
.name('gold_bark')
.input(item('minecraft:clay'))
.output(item('minecraft:gold_ingot'))
.register()
mods.roots.bark_carving.recipeBuilder()
.blockstate(blockstate('minecraft:gold_block'))
.output(item('minecraft:diamond'))
.register()
mods.roots.bark_carving.recipeBuilder()
.input(blockstate('minecraft:diamond_block'))
.output(item('minecraft:clay') * 10)
.register()Removing Recipes
Removes the Bark Carving recipe with the given input itemstack:
groovymods.roots.bark_carving.removeByBlock(ItemStack)Removes the Bark Carving recipe with the given input itemstack:
groovymods.roots.bark_carving.removeByInput(ItemStack)Removes the Bark Carving recipe with the given name:
groovymods.roots.bark_carving.removeByName(ResourceLocation)Removes the Bark Carving recipe with the given output itemstack:
groovymods.roots.bark_carving.removeByOutput(ItemStack)Removes all registered recipes:
groovymods.roots.bark_carving.removeAll()
Example
mods.roots.bark_carving.removeByBlock(item('minecraft:log:1'))
mods.roots.bark_carving.removeByInput(item('minecraft:log'))
mods.roots.bark_carving.removeByName(resource('roots:wildwood'))
mods.roots.bark_carving.removeByOutput(item('roots:bark_dark_oak'))
mods.roots.bark_carving.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.bark_carving.streamRecipes()
