Tranquility (Blood Magic: Alchemical Wizardry)
Description
Blocks in the area around the Tranquility Altar provide tranquility up to the Altar's cap, with reduced effect the more of a particular type of Tranquility is provided.
Identifier
Refer to this via any of the following:
mods.bm.tranquility
mods.bm.Tranquility
mods.bloodmagic.tranquility/* Used as page default */
mods.bloodmagic.Tranquility
Adding Recipes
Adds recipes in the format
block
,tranquility
,value
:groovymods.bloodmagic.tranquility.add(Block, String, double)
Adds recipes in the format
block
,tranquility
:groovymods.bloodmagic.tranquility.add(Block, TranquilityStack)
Adds recipes in the format
blockstate
,tranquility
,value
:groovymods.bloodmagic.tranquility.add(IBlockState, String, double)
Adds recipes in the format
blockstate
,tranquility
:groovymods.bloodmagic.tranquility.add(IBlockState, TranquilityStack)
Recipe Builder
Just like other recipe types, the Tranquility also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.bloodmagic.tranquility.recipeBuilder()
Block
. Sets the target block.groovyblock(Block)
double
. Sets the amount of Tranquility provided. Requires greater than or equal to 0. (Default0.0d
).groovyvalue(double)
IBlockState
. Sets the target blockstate.groovyblockstate(IBlockState)
EnumTranquilityType
. Sets the type of Tranquility being modified. Requires not null.groovytranquility(String) tranquility(EnumTranquilityType)
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
ororg.apache.commons.lang3.tuple.Pair<?, WayofTime.bloodmagic.incense.TranquilityStack>
).groovyregister()
Example
mods.bloodmagic.tranquility.recipeBuilder()
.block(block('minecraft:obsidian'))
.tranquility('LAVA')
.value(10)
.register()
mods.bloodmagic.tranquility.recipeBuilder()
.block(block('minecraft:obsidian'))
.tranquility('WATER')
.value(10)
.register()
mods.bloodmagic.tranquility.recipeBuilder()
.blockstate(blockstate('minecraft:obsidian'))
.tranquility('LAVA')
.value(500)
.register()
Removing Recipes
Removes any Tranquility entry that matches the given Block and EnumTranquilityType:
groovymods.bloodmagic.tranquility.remove(Block, EnumTranquilityType)
Removes any Tranquility entry that matches the given Block and Tranquility type as String:
groovymods.bloodmagic.tranquility.remove(Block, String)
Removes any Tranquility entry that matches the given IBlockState and EnumTranquilityType:
groovymods.bloodmagic.tranquility.remove(IBlockState, EnumTranquilityType)
Removes any Tranquility entry that matches the given IBlockState and Tranquility as String:
groovymods.bloodmagic.tranquility.remove(IBlockState, String)
Removes all registered recipes:
groovymods.bloodmagic.tranquility.removeAll()
Example
mods.bloodmagic.tranquility.remove(block('minecraft:dirt'), 'EARTHEN')
mods.bloodmagic.tranquility.remove(blockstate('minecraft:netherrack'), 'FIRE')
mods.bloodmagic.tranquility.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.bloodmagic.tranquility.streamRecipes()