Skip to content

Implosion Compressor (Tech Reborn)

Description

Converts two itemstack inputs into up to two itemstack outputs after a given process time, consuming energy per tick.

Identifier

Refer to this via any of the following:

groovy
mods.techreborn.implosion_compressor/* Used as page default */
mods.techreborn.implosioncompressor
mods.techreborn.implosionCompressor
mods.techreborn.ImplosionCompressor

Adding Recipes

  • Add the given recipe to the recipe list:

    groovy
    mods.techreborn.implosion_compressor.add(R)

Recipe Builder

Just like other recipe types, the Implosion Compressor also uses a recipe builder.

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

mods.techreborn.implosion_compressor.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 2.

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

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • int. Sets the time in ticks the recipe takes to complete. Requires greater than or equal to 0. (Default 0).

    groovy
    time(int)
  • int. Sets the power consumed per tick. Requires greater than or equal to 0. (Default 0).

    groovy
    perTick(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 techreborn.api.recipe.machines.ImplosionCompressorRecipe).

    groovy
    register()
Example
groovy
mods.techreborn.implosion_compressor.recipeBuilder()
    .input(item('minecraft:clay'), item('minecraft:diamond') * 2)
    .output(item('minecraft:gold_ingot'))
    .time(10)
    .perTick(100)
    .register()

mods.techreborn.implosion_compressor.recipeBuilder()
    .input(item('minecraft:diamond') * 3, item('minecraft:diamond') * 2)
    .output(item('minecraft:clay') * 2)
    .time(5)
    .perTick(32)
    .register()

Removing Recipes

  • Removes the given recipe from the recipe list:

    groovy
    mods.techreborn.implosion_compressor.remove(R)
  • Removes all recipes that match the given input:

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

    groovy
    mods.techreborn.implosion_compressor.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.techreborn.implosion_compressor.removeAll()
Example
groovy
mods.techreborn.implosion_compressor.removeByInput(item('techreborn:ingot:22'))
mods.techreborn.implosion_compressor.removeByOutput(item('minecraft:diamond'))
mods.techreborn.implosion_compressor.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.techreborn.implosion_compressor.streamRecipes()

Contributors

Changelog

© 2024 CleanroomMC. All Rights Reserved.