Skip to content

Metal Cutter (Factory Tech)

Description

Converts an input itemstack into an output itemstack, with the ability to control if stone parts are allowed.

Identifier

The identifier mods.factorytech.metal_cutter will be used as the default on this page.

All Identifiers

Any of these can be used to refer to this compat:

groovy
mods.factorytech.metalcutter
mods.factorytech.metalCutter
mods.factorytech.MetalCutter
mods.factorytech.metal_cutter/* Used as page default */

Adding Recipes

  • Add the given recipe to the recipe list:

    groovy
    mods.factorytech.metal_cutter.add(MachineRecipes.MachineRecipe<ItemStack, ItemStack>)

Recipe Builder

Just like other recipe types, the Metal Cutter also uses a recipe builder.

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

Recipe Builder
  • Create the Recipe Builder.

    groovy
    mods.factorytech.metal_cutter.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 exactly 1.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • boolean. Sets if the recipe can use stone parts. (Default false).

    groovy
    allowStoneParts()
    allowStoneParts(boolean)

  • 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 dalapo.factech.auxiliary.MachineRecipes$MachineRecipe<net.minecraft.item.ItemStack, net.minecraft.item.ItemStack>).

    groovy
    register()

Example
groovy
mods.factorytech.metal_cutter.recipeBuilder()
    .input(item('minecraft:clay'))
    .output(item('minecraft:diamond'))
    .register()

mods.factorytech.metal_cutter.recipeBuilder()
    .input(item('minecraft:gold_ingot'))
    .output(item('minecraft:clay'))
    .allowStoneParts()
    .register()

Removing Recipes

  • Removes the given recipe from the recipe list:

    groovy
    mods.factorytech.metal_cutter.remove(MachineRecipes.MachineRecipe<ItemStack, ItemStack>)
  • Removes all recipes that match the given input:

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

    groovy
    mods.factorytech.metal_cutter.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.factorytech.metal_cutter.removeAll()
Example
groovy
mods.factorytech.metal_cutter.removeByInput(item('minecraft:gold_ingot'))
mods.factorytech.metal_cutter.removeByOutput(item('factorytech:machinepart:20'))
mods.factorytech.metal_cutter.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.factorytech.metal_cutter.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.