Search in sources :

Example 16 with DecomposerRecipe

use of minechem.tileentity.decomposer.DecomposerRecipe in project Minechem by iopleke.

the class MicroscopeGui method drawDecomposerRecipe.

private void drawDecomposerRecipe(ItemStack inputstack, int x, int y) {
    DecomposerRecipe recipe = DecomposerRecipeHandler.instance.getRecipe(inputstack);
    if (recipe != null) {
        ArrayList<ItemStack> output = MinechemUtil.convertChemicalsIntoItemStacks(recipe.getOutputRaw());
        if (recipe instanceof DecomposerRecipeSelect) {
            drawDecomposerRecipeSelectMatrix(((DecomposerRecipeSelect) recipe).getAllPossibleRecipes(), x, y);
        } else {
            drawDecomposerRecipeMatrix(output, x, y);
        }
        drawDecomposerChance(recipe, x, y);
    }
}
Also used : DecomposerRecipeSelect(minechem.tileentity.decomposer.DecomposerRecipeSelect) DecomposerRecipe(minechem.tileentity.decomposer.DecomposerRecipe) ItemStack(net.minecraft.item.ItemStack)

Example 17 with DecomposerRecipe

use of minechem.tileentity.decomposer.DecomposerRecipe in project Minechem by iopleke.

the class MicroscopeGui method drawDecomposerRecipeSelectMatrix.

private void drawDecomposerRecipeSelectMatrix(ArrayList<DecomposerRecipe> recipes, int x, int y) {
    if (slideShowTimer == Constants.TICKS_PER_SECOND * 8) {
        slideShowTimer = 0;
        currentSlide++;
    }
    if (currentSlide == recipes.size()) {
        currentSlide = 0;
    }
    slideShowTimer++;
    DecomposerRecipe recipe = recipes.get(currentSlide);
    ArrayList<ItemStack> output = MinechemUtil.convertChemicalsIntoItemStacks(recipe.getOutputRaw());
    drawDecomposerRecipeMatrix(output, x, y);
}
Also used : DecomposerRecipe(minechem.tileentity.decomposer.DecomposerRecipe) ItemStack(net.minecraft.item.ItemStack)

Aggregations

DecomposerRecipe (minechem.tileentity.decomposer.DecomposerRecipe)17 ItemStack (net.minecraft.item.ItemStack)10 SynthesisRecipe (minechem.tileentity.synthesis.SynthesisRecipe)8 PotionChemical (minechem.potion.PotionChemical)7 ArrayList (java.util.ArrayList)5 MoleculeEnum (minechem.item.molecule.MoleculeEnum)5 Element (minechem.item.element.Element)4 Molecule (minechem.item.molecule.Molecule)3 DecomposerRecipeSelect (minechem.tileentity.decomposer.DecomposerRecipeSelect)3 Iterator (java.util.Iterator)2 ElementEnum (minechem.item.element.ElementEnum)2 DecomposerRecipeChance (minechem.tileentity.decomposer.DecomposerRecipeChance)2 MapKey (minechem.utils.MapKey)2 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 ILuaContext (dan200.computercraft.api.lua.ILuaContext)1 LuaException (dan200.computercraft.api.lua.LuaException)1 IComputerAccess (dan200.computercraft.api.peripheral.IComputerAccess)1 HashMap (java.util.HashMap)1 List (java.util.List)1 LuaMethod (minechem.computercraft.lua.LuaMethod)1