SHARE
TWEET

Ore Dictionary Help?

a guest Jun 26th, 2015 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top