Package net.minecraft.item.crafting

Examples of net.minecraft.item.crafting.ShapelessRecipes


            renderItemAtGridPos(gui, 1 + x, 1 + y, input instanceof ItemStack ? (ItemStack) input : ((ArrayList<ItemStack>) input).get(0), true);
        }

      oreDictRecipe = true;
    } else if(recipe instanceof ShapelessRecipes) {
      ShapelessRecipes shapeless = (ShapelessRecipes) recipe;

      drawGrid : {
        for(int y = 0; y < 3; y++)
          for(int x = 0; x < 3; x++) {
            int index = y * 3 + x;

            if(index >= shapeless.recipeItems.size())
              break drawGrid;

            renderItemAtGridPos(gui, 1 + x, 1 + y, (ItemStack) shapeless.recipeItems.get(index), true);
          }
      }

      shapelessRecipe = true;
    } else if(recipe instanceof ShapelessOreRecipe) {
      ShapelessOreRecipe shapeless = (ShapelessOreRecipe) recipe;

      drawGrid : {
        for(int y = 0; y < 3; y++)
          for(int x = 0; x < 3; x++) {
            int index = y * 3 + x;

            if(index >= shapeless.getRecipeSize())
              break drawGrid;

            Object input = shapeless.getInput().get(index);
            if(input != null)
              renderItemAtGridPos(gui, 1 + x, 1 + y, input instanceof ItemStack ? (ItemStack) input : ((ArrayList<ItemStack>) input).get(0), true);
          }
      }

View Full Code Here


                arraylist.add(new ItemStack((Block) object1));
            }
        }

        recipeList.add(0, new ShapelessRecipes(par1ItemStack, arraylist));
    }
View Full Code Here

                    recipesToAdd.add(new ShapedOreRecipe(recipe, replacements));
                }
            }
            else if(obj instanceof ShapelessRecipes)
            {
                ShapelessRecipes recipe = (ShapelessRecipes)obj;
                ItemStack output = recipe.getRecipeOutput();
                if (output != null && containsMatch(false, exclusions, output))
                {
                    continue;
                }
View Full Code Here

            } else {
                throw new RuntimeException("Invalid shapeless recipe!");
            }
        }

        recipes.add(new ShapelessRecipes(output, ingredients));
    }
View Full Code Here

                }
            }
        }
        else if (recipe instanceof ShapelessRecipes)
        {
            ShapelessRecipes shapelessRecipe = (ShapelessRecipes) recipe;

            for (Object object : shapelessRecipe.recipeItems)
            {
                if (object instanceof ItemStack)
                {
View Full Code Here

            ArrayList ingredients = new ArrayList<ItemStack>(2);
            ingredients.add(item1);
            ingredients.add(item2);

      return new ShapelessRecipes(new ItemStack(item1.getItem(), 1, newDamage), ingredients);
    } else {
      // End repair recipe handler

          List recipes = CraftingManager.getInstance().getRecipeList();
      for (int index = 0; index < recipes.size(); ++index) {
View Full Code Here

TOP

Related Classes of net.minecraft.item.crafting.ShapelessRecipes

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.