Arcane Ensorcellator (Thermal Expansion)
Description
Converts two input itemstacks and liquid experience into an output itemstack, costing power and taking time based on the power cost.
Identifier
Refer to this via any of the following:
mods.thermal.enchanter
mods.thermal.Enchanter
mods.thermalexpansion.enchanter/* Used as page default */
mods.thermalexpansion.Enchanter
Adding Recipes
Adds recipes in the format
energy
,primaryInput
,secondaryInput
,output
,experience
:groovymods.thermalexpansion.enchanter.add(int, IIngredient, IIngredient, ItemStack, int)
Adds an item to the Arcana list, which filters the inputs for one of the Arcane Ensorcellator slots when enabled:
groovymods.thermalexpansion.enchanter.addArcana(ItemStack)
Example
mods.thermalexpansion.enchanter.add(1000, item('minecraft:obsidian'), item('minecraft:gold_ingot'), item('minecraft:diamond'), 1000)
mods.thermalexpansion.enchanter.addArcana(item('minecraft:clay'))
Recipe Builder
Just like other recipe types, the Arcane Ensorcellator also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.thermalexpansion.enchanter.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 2.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>)
EnchanterManager.Type
. Sets the type of recipe, which by default does nothing. (DefaultEnchanterManager.Type.STANDARD
).groovytype(EnchanterManager.Type)
int
. Sets the energy cost of the recipe. Requires greater than 0. (DefaultEnchanterManager.DEFAULT_ENERGY[0]
).groovyenergy(int)
int
. Sets the amount of experience the recipe consumes from the tank. Requires greater than or equal to 0. (DefaultEnchanterManager.DEFAULT_EXPERIENCE[0]
).groovyexperience(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
orcofh.thermalexpansion.util.managers.machine.EnchanterManager$EnchanterRecipe
).groovyregister()
Example
mods.thermalexpansion.enchanter.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:gold_ingot') * 4)
.output(item('minecraft:diamond'))
.register()
mods.thermalexpansion.enchanter.recipeBuilder()
.input(item('minecraft:clay'), item('minecraft:gold_ingot'))
.output(item('minecraft:diamond'))
.experience(1000)
.energy(1000)
.register()
Removing Recipes
Removes an item from the Arcana list, which filters the inputs for one of the Arcane Ensorcellator slots when enabled:
groovymods.thermalexpansion.enchanter.removeArcana(ItemStack)
Removes all recipes that match the given input:
groovymods.thermalexpansion.enchanter.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.thermalexpansion.enchanter.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.thermalexpansion.enchanter.removeAll()
Example
mods.thermalexpansion.enchanter.removeByInput(item('minecraft:blaze_rod'))
mods.thermalexpansion.enchanter.removeByInput(item('minecraft:book'))
mods.thermalexpansion.enchanter.removeByOutput(item('minecraft:enchanted_book').withNbt(['StoredEnchantments': [['lvl': 1, 'id': 34]]]))
mods.thermalexpansion.enchanter.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.thermalexpansion.enchanter.streamRecipes()