Package codechicken.nei

Examples of codechicken.nei.PositionedStack


        int offsety = getOffsetY(gui);
        Slot[][] recipeSlotList = new Slot[ingredients.size()][];
        for(int i = 0; i < ingredients.size(); i++)//identify slots
        {
            LinkedList<Slot> recipeSlots = new LinkedList<Slot>();
            PositionedStack pstack = ingredients.get(i);
            for(Slot slot : (List<Slot>)gui.inventorySlots.inventorySlots)
            {
                if(slot.xDisplayPosition == pstack.relx+offsetx && slot.yDisplayPosition == pstack.rely+offsety)
                {
                    recipeSlots.add(slot);
View Full Code Here


        AssemblyProgram program = ItemAssemblyProgram.getProgramFromItem(programMetadata);
        AssemblyRecipe recipe = program.getRecipeList().get(recipeIndex);
        MultipleInputOutputRecipe shape = new MultipleInputOutputRecipe();
        ItemStack[] inputStacks = new ItemStack[]{recipe.getInput()};//for now not useful to put it in an array, but supports when adding multiple input/output.
        for(int i = 0; i < inputStacks.length; i++) {
            PositionedStack stack = new PositionedStack(inputStacks[i], 29 + i % 2 * 18, 66 + i / 2 * 18);
            shape.addIngredient(stack);
        }

        ItemStack[] outputStacks = new ItemStack[]{recipe.getOutput()};
        for(int i = 0; i < outputStacks.length; i++) {
            PositionedStack stack = new PositionedStack(outputStacks[i], 96 + i % 2 * 18, 66 + i / 2 * 18);
            shape.addOutput(stack);
        }
        shape.addIngredient(new PositionedStack(new ItemStack(Itemss.assemblyProgram, 1, programMetadata), 133, 22));
        ItemStack[] requiredMachines = getMachinesFromEnum(program.getRequiredMachines());
        for(int i = 0; i < requiredMachines.length; i++) {
            shape.addIngredient(new PositionedStack(requiredMachines[i], 5 + i * 18, 25));
        }

        return shape;
    }
View Full Code Here

    }

    protected ChamberRecipe getShape(PressureChamberRecipe recipe){
        ChamberRecipe shape = new ChamberRecipe();
        for(int i = 0; i < recipe.input.length; i++) {
            PositionedStack stack = new PositionedStack(recipe.input[i], 19 + i % 3 * 17, 93 - i / 3 * 17);
            shape.addIngredient(stack);
        }

        for(int i = 0; i < recipe.output.length; i++) {
            PositionedStack stack = new PositionedStack(recipe.output[i], 101 + i % 3 * 18, 59 + i / 3 * 18);
            shape.addOutput(stack);
        }
        shape.recipePressure = recipe.pressure;
        return shape;
    }
View Full Code Here

TOP

Related Classes of codechicken.nei.PositionedStack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.