Chaos Altar (Silent's Gems)
Description
Converts an input itemstack into an output itemstack with an optional catalyst, consuming a specified amount of Chaos from a Chaos Altar. Chaos is consumed at a maximum of 400 per tick, meaning the time taken corresponds to the Chaos cost.
Warning
If no catalyst is required by the recipe, the Chaos Altar must have no item in the catalyst slot to be valid.
Identifier
Refer to this via any of the following:
mods.silentgems.chaos_altar/* Used as page default */
mods.silentgems.chaosaltar
mods.silentgems.chaosAltar
mods.silentgems.ChaosAltar
Adding Recipes
Add the given recipe to the recipe list:
groovymods.silentgems.chaos_altar.add(RecipeChaosAltar)
Recipe Builder
Just like other recipe types, the Chaos Altar also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.silentgems.chaos_altar.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.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>)
int
. Sets the total amount of Chaos required. Requires greater than 0. (Default0
).groovycost(int)
ItemStack
. Sets the catalyst itemstack. Requires not null. (DefaultItemStack.EMPTY
).groovycatalyst(ItemStack)
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
ornet.silentchaos512.gems.api.recipe.altar.RecipeChaosAltar
).groovyregister()
Example
mods.silentgems.chaos_altar.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:diamond'))
.cost(5)
.register()
mods.silentgems.chaos_altar.recipeBuilder()
.input(item('minecraft:gold_ingot') * 2)
.output(item('minecraft:clay'))
.catalyst(item('minecraft:diamond'))
.cost(5000)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.silentgems.chaos_altar.remove(RecipeChaosAltar)
Removes all recipes that match the given catalyst:
groovymods.silentgems.chaos_altar.removeByCatalyst(IIngredient)
Removes all recipes that match the given input:
groovymods.silentgems.chaos_altar.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.silentgems.chaos_altar.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.silentgems.chaos_altar.removeAll()
Example
mods.silentgems.chaos_altar.removeByCatalyst(item('minecraft:slime_ball'))
mods.silentgems.chaos_altar.removeByInput(item('silentgems:gem'))
mods.silentgems.chaos_altar.removeByOutput(item('silentgems:craftingmaterial'))
mods.silentgems.chaos_altar.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.silentgems.chaos_altar.streamRecipes()