Flower Generation (Roots 3)
Description
When running the Flower Growth Ritual, allowed flowers will generate in the area. Additionally, using the spell Growth Infusion's Floral Reproduction modifier will duplicate the flower.
Identifier
Refer to this via any of the following:
mods.roots.flower_generation/* Used as page default */
mods.roots.flowergeneration
mods.roots.flowerGeneration
mods.roots.FlowerGeneration
Adding Entries
Recipe Builder
Just like other recipe types, the Flower Generation also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.roots.flower_generation.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
IBlockState
. Sets the flower blockstate. Requires not null.groovyflower(Block, int) flower(IBlockState)
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.FlowerRecipe
).groovyregister()
Example
mods.roots.flower_generation.recipeBuilder()
.name('clay_flower')
.flower(blockstate('minecraft:clay'))
.register()
Removing Entries
Removes all Flower Generation entries with the given Block:
groovymods.roots.flower_generation.removeByFlower(Block)
Removes the Flower Generation entry with the given Block and int metadata:
groovymods.roots.flower_generation.removeByFlower(Block, int)
Removes the Flower Generation entry with the given IBlockState:
groovymods.roots.flower_generation.removeByFlower(IBlockState)
Removes the Flower Generation entry with the given ItemStack converted into an IBlockState:
groovymods.roots.flower_generation.removeByFlower(ItemStack)
Removes the Flower Generation entry with the given name:
groovymods.roots.flower_generation.removeByName(ResourceLocation)
Removes all registered recipes:
groovymods.roots.flower_generation.removeAll()
Example
mods.roots.flower_generation.removeByFlower(block('minecraft:red_flower'))
mods.roots.flower_generation.removeByFlower(block('minecraft:red_flower'), 1)
mods.roots.flower_generation.removeByFlower(blockstate('minecraft:red_flower:2'))
mods.roots.flower_generation.removeByFlower(item('minecraft:red_flower:3'))
mods.roots.flower_generation.removeByName(resource('roots:dandelion'))
mods.roots.flower_generation.removeAll()
Getting the value of entries
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.roots.flower_generation.streamRecipes()