Skip to content

Chop Saw (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.saw 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.saw/* Used as page default */
mods.factorytech.Saw

Adding Recipes ​

  • Add the given recipe to the recipe list:

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

Recipe Builder ​

Just like other recipe types, the Chop Saw 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.saw.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.saw.recipeBuilder()
    .input(item('minecraft:clay'))
    .output(item('minecraft:diamond'))
    .register()

mods.factorytech.saw.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.saw.remove(MachineRecipes.MachineRecipe<ItemStack, ItemStack>)
  • Removes all recipes that match the given input:

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

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

    groovy
    mods.factorytech.saw.removeAll()
Example
groovy
mods.factorytech.saw.removeByInput(item('minecraft:log'))
mods.factorytech.saw.removeByOutput(item('minecraft:stick'))
mods.factorytech.saw.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.saw.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.