Java Examples for com.blamejared.mtlib.helpers.StackHelper.matches

The following java examples will help you to understand the usage of com.blamejared.mtlib.helpers.StackHelper.matches. These source code samples are taken from different open source projects.

Example 1
Project: ModTweaker-master  File: Smeltery.java View source code
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Removing a TConstruct Alloy recipe
@ZenMethod
public static void removeAlloy(IIngredient output) {
    List<AlloyRecipe> recipes = new LinkedList<AlloyRecipe>();
    for (AlloyRecipe r : TConstructHelper.alloys) {
        if (r != null && matches(output, toILiquidStack(r.getResult()))) {
            recipes.add(r);
        }
    }
    if (!recipes.isEmpty()) {
        MineTweakerAPI.apply(new RemoveAlloy(recipes));
    } else {
        LogHelper.logError(String.format("No %s recipes found for %s. Command ignored!", nameAlloy, output.toString()));
    }
}