Mortar And Pestle (Roots 3)
Description
When right clicking a mortar containing the input items with a pestle, it will display a few colored sparkles, consume the inputs, and drop the item output.
Identifier
Refer to this via any of the following:
mods.roots.mortar/* Used as page default */
mods.roots.Mortar
mods.roots.mortar_and_pestle
mods.roots.mortarandpestle
mods.roots.mortarAndPestle
mods.roots.MortarAndPestle
Adding Recipes
Recipe Builder
Just like other recipe types, the Mortar And Pestle also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.roots.mortar.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.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>)
float
. Sets the red color value of the first version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovyred(float) red(float, float) red1(float) color(float, float, float) color(float, float, float, float, float, float)
float
. Sets the red color value of the second version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovyred(float) red(float, float) red2(float) color(float, float, float) color(float, float, float, float, float, float)
float
. Sets the blue color value of the first version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovyblue(float) blue(float, float) blue1(float) color(float, float, float) color(float, float, float, float, float, float)
float
. Sets the blue color value of the second version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovyblue(float) blue(float, float) blue2(float) color(float, float, float) color(float, float, float, float, float, float)
float
. Sets the green color value of the first version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovycolor(float, float, float) color(float, float, float, float, float, float) green(float) green(float, float) green1(float)
float
. Sets the green color value of the second version of the particle spawned. Requires greater than or equal to 0 and less than or equal to 1. (Default1.0f
).groovycolor(float, float, float) color(float, float, float, float, float, float) green(float) green(float, float) green2(float)
boolean
. Sets if, when input has a single IIngredient, a recipe will be generated for each input amount. (Defaulttrue
).groovygenerate() generate(boolean)
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
orepicsquid.roots.recipe.MortarRecipe
).groovyregister()
Example
mods.roots.mortar.recipeBuilder()
.name('clay_mortar')
.input(item('minecraft:stone'),item('minecraft:gold_ingot'),item('minecraft:stone'),item('minecraft:gold_ingot'),item('minecraft:stone'))
.generate(false)
.output(item('minecraft:clay'))
.color(1, 0, 0.1, 1, 0, 0.1)
.register()
mods.roots.mortar.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.color(0, 0, 0.1)
.register()
mods.roots.mortar.recipeBuilder()
.input(item('minecraft:diamond'), item('minecraft:diamond'))
.output(item('minecraft:gold_ingot') * 16)
.red(0)
.green1(0.5)
.green2(1)
.register()
Removing Recipes
Removes the Mortar recipe with the given name:
groovymods.roots.mortar.removeByName(ResourceLocation)
Removes the Mortar recipe with the given output itemstack:
groovymods.roots.mortar.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.roots.mortar.removeAll()
Example
mods.roots.mortar.removeByName(resource('roots:wheat_flour'))
mods.roots.mortar.removeByOutput(item('minecraft:string'))
mods.roots.mortar.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.mortar.streamRecipes()