Advertisement
Guest User

Ore Dictionary Help?

a guest
Jun 26th, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 KB | None | 0 0
  1. void RemoveRecipes(ItemStack resultItem)
  2. {
  3.     ArrayList recipes = (ArrayList) CraftingManager.getInstance().getRecipeList();
  4.        
  5.     for (int scan = 0; scan < recipes.size(); scan++)
  6.     {
  7.         IRecipe tmpRecipe = (IRecipe) recipes.get(scan);
  8.         ItemStack recipeResult = tmpRecipe.getRecipeOutput();
  9.         System.out.println(recipeResult + " : " + resultItem);
  10.         if (ItemStack.areItemStacksEqual(resultItem, recipeResult))
  11.         {
  12.             System.out.println("[" + MODNAME + "] Removing Recipe: " + recipes.get(scan) + " -> " + recipeResult);
  13.             recipes.remove(scan);
  14.         }
  15.     }
  16.  }
  17.    
  18.  void AddRecipes()
  19.  {
  20.     for (ItemStack stack : OreDictionary.getOres("oreCopper"))
  21.     {
  22.         RemoveRecipes(stack);
  23.         GameRegistry.addSmelting(stack, new ItemStack(ingotCopper, 1), 0.7f);
  24.     }
  25.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement