Skip to content

Saw (Better With Mods)

Description

Converts a block into output itemstacks after being powered via rotation power.

Identifier

Refer to this via any of the following:

groovy
mods.betterwithmods.saw/* Used as page default */
mods.betterwithmods.Saw

Adding Recipes

Recipe Builder

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

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

mods.betterwithmods.saw.recipeBuilder()
  • ItemStackList. Sets the item outputs of the recipe. Requires greater than or equal to 1 and less than or equal to 9.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • BlockIngredient. Sets the input block of the recipe.

    groovy
    input(String)
    input(IIngredient)
    input(ItemStack...)
    input(IIngredient...)
    input(BlockIngredient)
    input(List<ItemStack>)
    input(Collection<IIngredient>)
  • 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 betterwithmods.common.registry.block.recipe.SawRecipe).

    groovy
    register()
Example
groovy
mods.betterwithmods.saw.recipeBuilder()
    .input(item('minecraft:diamond_block'))
    .output(item('minecraft:gold_ingot') * 16)
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

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

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

    groovy
    mods.betterwithmods.saw.removeAll()
Example
groovy
mods.betterwithmods.saw.removeByInput(item('minecraft:vine'))
mods.betterwithmods.saw.removeByOutput(item('minecraft:pumpkin'))
mods.betterwithmods.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.betterwithmods.saw.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.