Fixed concurent modification exception in the ore registry.
This commit is contained in:
parent
76bf4c602b
commit
9bf3436be4
1 changed files with 6 additions and 8 deletions
|
@ -97,15 +97,13 @@ public class OreDictionary
|
||||||
{
|
{
|
||||||
oreHandlers.add(handler);
|
oreHandlers.add(handler);
|
||||||
|
|
||||||
Iterator<Map.Entry<String, Integer>> itr = oreIDs.entrySet().iterator();
|
HashMap<String, Integer> tmp = (HashMap<String, Integer>)oreIDs.clone();
|
||||||
while(itr.hasNext())
|
|
||||||
{
|
|
||||||
Map.Entry<String, Integer> entry = itr.next();
|
|
||||||
|
|
||||||
Iterator<ItemStack> ores = getOres(entry.getValue()).iterator();
|
for(Map.Entry<String, Integer> entry : tmp.entrySet())
|
||||||
while (ores.hasNext())
|
{
|
||||||
|
for(ItemStack stack : getOres(entry.getValue()))
|
||||||
{
|
{
|
||||||
handler.registerOre(entry.getKey(), ores.next());
|
handler.registerOre(entry.getKey(), stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue