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);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue