Created
February 25, 2015 13:24
-
-
Save Choonster/15b35709c49a9489435e to your computer and use it in GitHub Desktop.
Minecraft Forge 1.7.10-10.13.2.1236 - Method to remove all furnace recipes that result in the specified ItemStack.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void removeFurnaceRecipe (ItemStack resultItem) | |
{ | |
Map<ItemStack, ItemStack> recipes = FurnaceRecipes.smelting().getSmeltingList(); | |
for (Iterator<Map.Entry<ItemStack,ItemStack>> entries = recipes.entrySet().iterator(); entries.hasNext(); ){ | |
Map.Entry<ItemStack,ItemStack> entry = entries.next(); | |
ItemStack result = entry.getValue(); | |
if (ItemStack.areItemStacksEqual(result, resultItem)){ // If the output matches the specified ItemStack, | |
entries.remove(); // Remove the recipe | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment