Created
May 17, 2015 15:42
-
-
Save marchermans/b242060af3ddeea28307 to your computer and use it in GitHub Desktop.
RemoveRecipes
This file contains hidden or 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 removeRecipes() | |
{ | |
ListIterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().listIterator(); | |
while (iterator.hasNext()) | |
{ | |
IRecipe r = iterator.next(); | |
int[] tOreID = OreDictionary.getOreIDs(r.getRecipeOutput()); | |
if (tOreID.length == 0) | |
{ | |
continue; | |
} | |
String pOreDicID = OreDictionary.getOreName(tOreID[0]); | |
if (pOreDicID.contains("nugget")) | |
{ | |
for(ArmorMaterialMedieval tMaterial : MedievalRegistry.getInstance().getArmorMaterials().values()) | |
{ | |
if (pOreDicID.toLowerCase().contains(tMaterial.iVisibleName.toLowerCase())) | |
{ | |
iterator.remove(); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment