Stone Mining Lens (Actually Additions)
Description
A weighted oredict for the block obtained via firing a Mining Lens at a block of Stone. The oredict must have a block, or the world will hang.
Identifier
Refer to this via any of the following:
mods.aa.stone_mining_lens
mods.aa.stonemininglens
mods.aa.stoneMiningLens
mods.aa.StoneMiningLens
mods.actuallyadditions.stone_mining_lens/* Used as page default */
mods.actuallyadditions.stonemininglens
mods.actuallyadditions.stoneMiningLens
mods.actuallyadditions.StoneMiningLens
Adding Recipes
Recipe Builder
Just like other recipe types, the Stone Mining Lens also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.actuallyadditions.stone_mining_lens.recipeBuilder()
String
. Sets the ore given by the recipe. Requires not null.groovyore(String) ore(OreDictIngredient)
int
. Sets how likely this ore is to be rolled. Requires greater than or equal to 0. (Default0
).groovyweight(int)
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
orde.ellpeck.actuallyadditions.api.recipe.WeightedOre
).groovyregister()
Example
mods.actuallyadditions.stone_mining_lens.recipeBuilder()
.ore(ore('blockDiamond'))
.weight(100)
.register()
mods.actuallyadditions.stone_mining_lens.recipeBuilder()
.ore('blockGold')
.weight(100)
.register()
Removing Recipes
Removes all recipes that match the given ore:
groovymods.actuallyadditions.stone_mining_lens.removeByOre(OreDictIngredient)
Removes all recipes that match the given ore:
groovymods.actuallyadditions.stone_mining_lens.removeByOre(String)
Removes all registered recipes:
groovymods.actuallyadditions.stone_mining_lens.removeAll()
Example
mods.actuallyadditions.stone_mining_lens.removeByOre(ore('oreCoal'))
mods.actuallyadditions.stone_mining_lens.removeByOre('oreLapis')
mods.actuallyadditions.stone_mining_lens.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.actuallyadditions.stone_mining_lens.streamRecipes()