Package codechicken.nei

Examples of codechicken.nei.PositionedStack


        public PositionedStack getIngredient()
        {
            if (input.item.itemID == 35)
            { // hacks for rotating colored wool stacks
                int cycle = cycleticks / 48;
                PositionedStack stack = input.copy();
                stack.item.setItemDamage(cycle % 14);
                return stack;
            }
            return input;
        }
View Full Code Here


            return input;
        }
       
        public EEMachineRecipe(Map.Entry<ItemStack, int[]> recipe, float wattsPerTick)
        {
            this.input = new PositionedStack(recipe.getKey(), 50, 14);
            this.output = new PositionedStack(new ItemStack(recipe.getValue()[0], recipe.getValue()[1], recipe.getValue()[2]), 103, 14);
            this.energy = recipe.getValue()[3] * wattsPerTick;
        }
View Full Code Here

public class ChipHandler extends TemplateRecipeHandler {

  class EncoderRecipe extends CachedRecipe {

    public EncoderRecipe(int width, int height, Object[] items, ItemStack out, ItemStack chip) {
      result = new PositionedStack( chip, 128, 36 );
      ingredients = new ArrayList<PositionedStack>();
      setIngredients( width, height, items, out );
    }
View Full Code Here

      for( int x = 0; x < width; x++ ) {
        for( int y = 0; y < height; y++ ) {
          if( items[y * width + x] == null ) {
            continue;
          }
          PositionedStack stack = new PositionedStack( items[y * width + x], 21 + x * 18, 7 + y * 18 );
          stack.setMaxSize( 1 );
          ingredients.add( stack );
        }
      }
      PositionedStack stack = new PositionedStack( out, 93, 10 );
      stack.setMaxSize( 1 );
      ingredients.add( stack );
    }
View Full Code Here

    public SoulBinderRecipeNEI(ItemStack inputStack, ItemStack result, int energy, int experience, List<String> list) {

      int yOff = 11;
      int xOff = 11;

      input.add(new PositionedStack(getSoulVialInputs(list), 38 - xOff, 34 - yOff));
      input.add(new PositionedStack(inputStack, 59 - xOff, 34 - yOff));
      output = new PositionedStack(result, 134 - xOff, 34 - yOff);

      this.energy = energy;
      this.experience = experience;
    }
View Full Code Here

    public AlloySmelterRecipe(int energy, RecipeInput[] ingredients, ItemStack result) {
      int recipeSize = ingredients.length;
      this.input = new ArrayList<PositionedStack>();
      if(recipeSize > 0) {
        this.input.add(new PositionedStack(getInputs(ingredients[0]), 50, 13));
      }
      if(recipeSize > 1) {
        this.input.add(new PositionedStack(getInputs(ingredients[1]), 75, 3));
      }
      if(recipeSize > 2) {
        this.input.add(new PositionedStack(getInputs(ingredients[2]), 99, 13));
      }
      if(result != null) {
        this.output = new PositionedStack(result, 75, 42);
      }
      this.energy = energy;
    }
View Full Code Here

      }
      if(output.item.equals(stack)) {
        return outputChance[0];
      }
      for (int i = 0; i < otherOutputs.size(); i++) {
        PositionedStack oo = otherOutputs.get(i);
        if(oo != null && oo.item.equals(stack) && i + 1 < outputChance.length) {
          return outputChance[i + 1];
        }
      }
      return -1;
View Full Code Here

    public MillRecipe(ItemStack targetedResult, int energy, RecipeInput ingredient, RecipeOutput[] outputs) {
      this.energy = energy;

      input = new ArrayList<PositionedStack>(2);
      input.add(new PositionedStack(getInputs(ingredient), 74, 2));

      input.add(new PositionedStack(getBalls(), 116, 12));

      output = new PositionedStack(outputs[0].getOutput(), 43, 46);
      otherOutputs = new ArrayList<PositionedStack>();
      if(outputs.length > 1) {
        otherOutputs.add(new PositionedStack(outputs[1].getOutput(), 64, 46));
      }
      if(outputs.length > 2) {
        otherOutputs.add(new PositionedStack(outputs[2].getOutput(), 85, 46));
      }
      if(outputs.length > 3) {
        otherOutputs.add(new PositionedStack(outputs[3].getOutput(), 106, 46));
      }

      outputChance = new float[outputs.length];
      indexOfTargetOutput = 0;
      numTargetOuput = 1;
View Full Code Here

      Point pos;
      for (RecipeInput recipeInput : recipe.getInputs()) {
        if(recipeInput != null) {
          pos = ContainerSliceAndSplice.INPUT_SLOTS[recipeInput.getSlotNumber()];
          input.add(new PositionedStack(getInputs(recipeInput), pos.x - xOff, pos.y - yOff));
        }
      }
      pos = ContainerSliceAndSplice.INPUT_SLOTS[6];
      input.add(new PositionedStack(new ItemStack(Items.iron_axe), pos.x - xOff, pos.y - yOff));
      pos = ContainerSliceAndSplice.INPUT_SLOTS[7];
      input.add(new PositionedStack(new ItemStack(Items.shears), pos.x - xOff, pos.y - yOff));

      if(recipe.getOutputs()[0] != null) {
        output = new PositionedStack(recipe.getOutputs()[0].getOutput(), ContainerSliceAndSplice.OUTPUT_SLOT.x - xOff, ContainerSliceAndSplice.OUTPUT_SLOT.y
            - yOff);
      }
      energy = recipe.getEnergyRequired();
    }
View Full Code Here

    }

    public EnchanterRecipeNEI(EnchanterRecipe recipe, ItemStack result, EnchantmentData enchData) {
      this.recipe = recipe;
      input = new ArrayList<PositionedStack>();
      input.add(new PositionedStack(new ItemStack(Items.writable_book), 22, 24));
      input.add(new PositionedStack(getInputs(recipe.getInput()), 71, 24));
      output = new PositionedStack(result, 129, 24);
      this.enchData = enchData;
    }
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.