Package codechicken.nei

Examples of codechicken.nei.PositionedStack


        for (int y = 0; y < 3; y++) {
          int index = x + y * 3;
          IRecipeInput input = inputArray[index];
          if (input == null) continue;
          List<ItemStack> possibleMatches = input.getPossibleMatches();
          ingridients.add(new PositionedStack(possibleMatches, x * 18 + 12, y * 18 + 6));
          stackArray[index] = possibleMatches.get(0);
        }
     
      StationCrafting crafting = recipe.checkMatch(stackArray, new RecipeBounds(stackArray));
      if (crafting == null)
        throw new Error("Recipe " + recipe.getClass().getSimpleName() + " didn't match sample input.");
      requiredExperience = crafting.getRequiredExperience();
      craftingTime = crafting.getCraftingTime();
     
      output.clear();
      ItemStack[] outputArray = crafting.getOutput();
      for (int x = 0; x < 3; x++)
        for (int y = 0; y < 3; y++)
          if (((x + y * 3) < outputArray.length) &&
              (outputArray[x + y * 3] != null))
            output.add(new PositionedStack(outputArray[x + y * 3], x * 18 + 102, y * 18 + 6));
    }
View Full Code Here


      {
        if(recipe.source[y*3 + x] == null)
        {
          continue;
        }
        PositionedStack stack = new PositionedStack(recipe.source[y*3 + x], 39+x*18, 6+y*18);
        stack.setMaxSize(1);
        shape.ingredients.add(stack);
      }
    }
    PositionedStack stack = new PositionedStack(new ItemStack(Items.iron_ingot, 1), 102, 6);
    stack.setMaxSize(1);
    shape.ingredients.add(stack);
    shape.result.relx = 136;
    shape.result.rely = 36;
    return shape;
  }
View Full Code Here

    boolean hasOptional = false;
    public String Chance;

    public CachedGrindStoneRecipe(IGrinderEntry recipe) {
      result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 );
      ingredients = new ArrayList<PositionedStack>();

      if ( recipe.getOptionalOutput() != null )
      {
        hasOptional = true;
        Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
        ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
      }

      if ( recipe.getInput() != null )
        ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) );
    }
View Full Code Here

    public final ArrayList<PositionedStack> ingredients;
    public final PositionedStack result;

    public CachedShapedRecipe(ItemStack output) {
      output.stackSize = 4;
      result = new PositionedStack( output, 119, 24 );
      ingredients = new ArrayList<PositionedStack>();
      ItemStack in = ifa.getTextureItem( output );
      setIngredients( 3, 3, new Object[] { null, cable_anchor, null, cable_anchor, in, cable_anchor, null, cable_anchor, null } );
    }
View Full Code Here

        for (int y = 0; y < height; y++)
        {
          if ( items[(y * width + x)] != null )
          {
            ItemStack is = (ItemStack) items[(y * width + x)];
            PositionedStack stack = new PositionedStack( is, 25 + x * 18, 6 + y * 18, false );
            stack.setMaxSize( 1 );
            this.ingredients.add( stack );
          }
        }
      }
    }
View Full Code Here

    public final ArrayList<PositionedStack> ingredients;
    public final PositionedStack result;

    public CachedShapelessRecipe(ShapelessRecipe recipe) {
      result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
      ingredients = new ArrayList<PositionedStack>();
      setIngredients( recipe.getInput().toArray() );
    }
View Full Code Here

            IIngredient ing = (IIngredient) items[(y * 3 + x)];

            try
            {
              ItemStack[] is = ing.getItemStackSet();
              PositionedStack stack = new PositionedStack( useSingleItems ? Platform.findPreferred( is ) : ing.getItemStackSet(), 25 + x * 18,
                  6 + y * 18, false );
              stack.setMaxSize( 1 );
              this.ingredients.add( stack );
            }
            catch (RegistrationError ignored)
            {

View Full Code Here

  private void addRecipe(AEItemDefinition def, String msg)
  {
    if ( NEIServerUtils.areStacksSameTypeCrafting( def.stack( 1 ), target ) )
    {
      offsets.add( def );
      outputs.add( new PositionedStack( def.stack( 1 ), 75, 4 ) );
      details.put( def, msg );
    }
  }
View Full Code Here

    public final ArrayList<PositionedStack> ingredients;
    public final PositionedStack result;

    public CachedInscriberRecipe(InscriberRecipe recipe) {
      result = new PositionedStack( recipe.output, 108, 29 );
      ingredients = new ArrayList<PositionedStack>();

      if ( recipe.plateA != null )
        ingredients.add( new PositionedStack( recipe.plateA, 40, 5 ) );

      if ( recipe.imprintable != null )
        ingredients.add( new PositionedStack( recipe.imprintable, 40 + 18, 28 ) );

      if ( recipe.plateB != null )
        ingredients.add( new PositionedStack( recipe.plateB, 40, 51 ) );
    }
View Full Code Here

    public final ArrayList<PositionedStack> ingredients;
    public final PositionedStack result;

    public CachedShapedRecipe(ShapedRecipe recipe) {
      result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
      ingredients = new ArrayList<PositionedStack>();
      setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() );
    }
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.