Search in sources :

Example 1 with BrewingRecipe

use of minetweaker.api.recipes.BrewingRecipe in project CraftTweaker by CraftTweaker.

the class MCBrewingManager method getAll.

@Override
public List<IBrewingRecipe> getAll() {
    List<IBrewingRecipe> ret = new ArrayList<>();
    for (net.minecraftforge.common.brewing.IBrewingRecipe rec : BrewingRecipeRegistry.getRecipes()) {
        if (rec instanceof net.minecraftforge.common.brewing.AbstractBrewingRecipe) {
            AbstractBrewingRecipe abs = (AbstractBrewingRecipe) rec;
            if (abs instanceof BrewingOreRecipe) {
                BrewingOreRecipe brew = (BrewingOreRecipe) abs;
                ret.add(new BrewingRecipe(new MCItemStack(brew.getOutput()), new MCItemStack(brew.getInput()), convert(brew.getIngredient())));
            }
        }
    }
    return ret;
}
Also used : net.minecraftforge.common.brewing(net.minecraftforge.common.brewing) MCItemStack(minetweaker.mc1102.item.MCItemStack) IBrewingRecipe(minetweaker.api.recipes.IBrewingRecipe) BrewingRecipe(minetweaker.api.recipes.BrewingRecipe) IBrewingRecipe(minetweaker.api.recipes.IBrewingRecipe)

Example 2 with BrewingRecipe

use of minetweaker.api.recipes.BrewingRecipe in project CraftTweaker by CraftTweaker.

the class MCBrewingManager method getAll.

@Override
public List<IBrewingRecipe> getAll() {
    List<IBrewingRecipe> ret = new ArrayList<>();
    for (net.minecraftforge.common.brewing.IBrewingRecipe rec : BrewingRecipeRegistry.getRecipes()) {
        if (rec instanceof net.minecraftforge.common.brewing.AbstractBrewingRecipe) {
            AbstractBrewingRecipe abs = (AbstractBrewingRecipe) rec;
            if (abs instanceof BrewingOreRecipe) {
                BrewingOreRecipe brew = (BrewingOreRecipe) abs;
                ret.add(new BrewingRecipe(new MCItemStack(brew.getOutput()), new MCItemStack(brew.getInput()), convert(brew.getIngredient())));
            }
        }
    }
    return ret;
}
Also used : net.minecraftforge.common.brewing(net.minecraftforge.common.brewing) MCItemStack(minetweaker.mc1112.item.MCItemStack) IBrewingRecipe(minetweaker.api.recipes.IBrewingRecipe) BrewingRecipe(minetweaker.api.recipes.BrewingRecipe) IBrewingRecipe(minetweaker.api.recipes.IBrewingRecipe)

Aggregations

BrewingRecipe (minetweaker.api.recipes.BrewingRecipe)2 IBrewingRecipe (minetweaker.api.recipes.IBrewingRecipe)2 net.minecraftforge.common.brewing (net.minecraftforge.common.brewing)2 MCItemStack (minetweaker.mc1102.item.MCItemStack)1 MCItemStack (minetweaker.mc1112.item.MCItemStack)1