Skip to content

Magma Crucible (Thermal Expansion)

Description

Converts an input itemstack into an output itemstack, costing power and taking time based on the power cost.

Identifier

Refer to this via any of the following:

groovy
mods.thermal.crucible
mods.thermal.Crucible
mods.thermalexpansion.crucible/* Used as page default */
mods.thermalexpansion.Crucible

Adding Recipes

  • Adds recipes in the format energy, input, fluidOutput:

    groovy
    mods.thermalexpansion.crucible.add(int, IIngredient, FluidStack)
Example
groovy
mods.thermalexpansion.crucible.add(1000, item('minecraft:obsidian'), fluid('water') * 1000)

Recipe Builder

Just like other recipe types, the Magma Crucible also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.thermalexpansion.crucible.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires exactly 1.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • FluidStackList. Sets the fluid outputs of the recipe. Requires exactly 1.

    groovy
    fluidOutput(FluidStack)
    fluidOutput(FluidStack...)
    fluidOutput(Collection<FluidStack>)
  • int. Sets the energy cost of the recipe. Requires greater than 0. (Default CrucibleManager.DEFAULT_ENERGY).

    groovy
    energy(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. (returns null or cofh.thermalexpansion.util.managers.machine.CrucibleManager$CrucibleRecipe).

    groovy
    register()
Example
groovy
mods.thermalexpansion.crucible.recipeBuilder()
    .input(item('minecraft:clay'))
    .fluidOutput(fluid('lava') * 25)
    .register()

mods.thermalexpansion.crucible.recipeBuilder()
    .input(item('minecraft:diamond'))
    .fluidOutput(fluid('water') * 1000)
    .energy(1000)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.thermalexpansion.crucible.removeByInput(IIngredient)
  • Removes all recipes that match the given output:

    groovy
    mods.thermalexpansion.crucible.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.thermalexpansion.crucible.removeAll()
Example
groovy
mods.thermalexpansion.crucible.removeByInput(item('minecraft:glowstone_dust'))
mods.thermalexpansion.crucible.removeByOutput(fluid('lava'))
mods.thermalexpansion.crucible.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:

    groovy
    mods.thermalexpansion.crucible.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.