Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

CraftTweaker Recipe Removal

Huneau romain edited this page Dec 16, 2020 · 2 revisions

This mod also adds a method to remove all recipes from a specific recipe map by outputs. It can be accessed via mods.gtadditions.recipe.Utils.removeRecipeByOutput(RecipeMap recipeMap, IItemStack[] outputs, ILiquidStack[] fluidOutputs, boolean useAmounts)

The method collects all Recipes that matches the given Ingredients and removes them. If useAmounts is true it will only collect recipe that matches the output amount (can be 1).

Here is an example script removing the recipes resulting in 2 Iron Rods in the Extruder.

import mods.gtadditions.recipe.Utils;
import mods.gregtech.recipe.RecipeMap;

val extruder = RecipeMap.getByName("extruder");
Utils.removeRecipeByOutput(extruder, [<gregtech:meta_item_1:14033> * 2], [], true);

0.21 only

LargeRecipeMaps needs to be casted to RecipeMaps.

Casting LargeRecipeMaps (at the bottom)

Clone this wiki locally