Example usage for net.minecraftforge.common.brewing BrewingRecipeRegistry addRecipe

List of usage examples for net.minecraftforge.common.brewing BrewingRecipeRegistry addRecipe

Introduction

In this page you can find the example usage for net.minecraftforge.common.brewing BrewingRecipeRegistry addRecipe.

Prototype

public static boolean addRecipe(IBrewingRecipe recipe) 

Source Link

Document

Adds a recipe to the registry.

Usage

From source file:com.lothrazar.cyclicmagic.registry.RecipeRegistry.java

License:Open Source License

/**
 * Currently not used but it does work.//from   ww  w. ja  v a 2  s .c  om
 * 
 * has built in unit test
 * 
 * @param input
 * @param ingredient
 * @param output
 * @return
 */
public static BrewingRecipe addBrewingRecipe(ItemStack input, ItemStack ingredient, ItemStack output) {
    if (input.isEmpty() || input.getItem() == null) {
        return null;
    }
    BrewingRecipe recipe = new BrewingRecipe(input, ingredient, output);
    BrewingRecipeRegistry.addRecipe(recipe);
    if (ModCyclic.logger.runUnitTests()) {//OMG UNIT TESTING WAAT
        ItemStack output0 = BrewingRecipeRegistry.getOutput(input, ingredient);
        if (output0.getItem() == output.getItem())
            ModCyclic.logger.logTestResult(
                    "Brewing Recipe succefully registered and working: " + output.getTranslationKey());
        else {
            ModCyclic.logger.logTestResult("Brewing Recipe FAILED to register" + output.getTranslationKey());
        }
    }
    return recipe;
}

From source file:net.jcodegamers.jcgml.JCGML.java

License:Open Source License

/**
 * Add a brewing recipe
 */
public static void addRecipe(IBrewingRecipe recipe) {
    BrewingRecipeRegistry.addRecipe(recipe);
}

From source file:robmart.rpgmode.common.init.InitRecipes.java

License:Open Source License

private static void addBrewingRecipe(IBrewingRecipe recipe) {
    BrewingRecipeRegistry.addRecipe(recipe);
    brewingCounter++;
}