Fixed concurent modification exception in the ore registry.

This commit is contained in:
LexManos 2012-06-12 15:32:26 -07:00
parent 76bf4c602b
commit 9bf3436be4

View file

@ -97,15 +97,13 @@ public class OreDictionary
{
oreHandlers.add(handler);
Iterator<Map.Entry<String, Integer>> itr = oreIDs.entrySet().iterator();
while(itr.hasNext())
{
Map.Entry<String, Integer> entry = itr.next();
HashMap<String, Integer> tmp = (HashMap<String, Integer>)oreIDs.clone();
Iterator<ItemStack> ores = getOres(entry.getValue()).iterator();
while (ores.hasNext())
for(Map.Entry<String, Integer> entry : tmp.entrySet())
{
handler.registerOre(entry.getKey(), ores.next());
for(ItemStack stack : getOres(entry.getValue()))
{
handler.registerOre(entry.getKey(), stack);
}
}
}