Skip to content

Centrifugal Separator (Thermal Expansion)

Description

Converts an input itemstack into an optional output fluidstack and up to four output itemstacks with chance, costing power and taking time based on the power cost.

Identifier

Refer to this via any of the following:

groovy
mods.thermal.centrifuge
mods.thermal.Centrifuge
mods.thermalexpansion.centrifuge/* Used as page default */
mods.thermalexpansion.Centrifuge

Adding Recipes

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

    groovy
    mods.thermalexpansion.centrifuge.add(int, IIngredient, List<ItemStack>, List<Integer>, FluidStack)
Example
groovy
mods.thermalexpansion.centrifuge.add(1000, item('minecraft:obsidian') * 3, [item('minecraft:clay')], [100], null)

Recipe Builder

Just like other recipe types, the Centrifugal Separator also uses a recipe builder.

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

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

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • ItemStackList. Sets the item outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 4.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • FluidStackList. Sets the fluid outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.

    groovy
    fluidOutput(FluidStack)
    fluidOutput(FluidStack...)
    fluidOutput(Collection<FluidStack>)
  • List<Integer>. Sets the chance of each output. Requires greater than or equal to 0 and less than or equal to 100.

    groovy
    chance(int)
    chance(Integer...)
    chance(List<Integer>)
  • int. Sets the energy cost of the recipe. Requires greater than 0. (Default CentrifugeManager.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.CentrifugeManager$CentrifugeRecipe).

    groovy
    register()
Example
groovy
mods.thermalexpansion.centrifuge.recipeBuilder()
    .input(item('minecraft:clay'))
    .fluidOutput(fluid('water') * 100)
    .output(item('minecraft:diamond') * 2, item('minecraft:gold_ingot'), item('minecraft:gold_ingot'))
    .chance(50, 100, 1)
    .register()

mods.thermalexpansion.centrifuge.recipeBuilder()
    .input(item('minecraft:diamond') * 3)
    .output(item('minecraft:clay'))
    .chance(100)
    .energy(1000)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

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

    groovy
    mods.thermalexpansion.centrifuge.removeAll()
Example
groovy
mods.thermalexpansion.centrifuge.removeByInput(item('minecraft:reeds'))
mods.thermalexpansion.centrifuge.removeByOutput(fluid('redstone'))
mods.thermalexpansion.centrifuge.removeByOutput(item('minecraft:redstone'))
mods.thermalexpansion.centrifuge.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.centrifuge.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.