Fix loading of world ID maps for worlds without dummy data. Closes #2477

This commit is contained in:
LexManos 2016-02-17 12:06:57 -08:00
parent 13a25ee0ba
commit f77d50b48c

View file

@ -305,13 +305,15 @@ public class FMLContainer extends DummyModContainer implements WorldAccessContai
{ {
entry.blocked.add(i); entry.blocked.add(i);
} }
// save doesn't have dummied list
if (!regs.getCompoundTag(key).hasKey("dummied")) return; if (regs.getCompoundTag(key).hasKey("dummied")) // Added in 1.8.9 dev, some worlds may not have it.
list = regs.getCompoundTag(key).getTagList("dummied",10);
for (int x = 0; x < list.tagCount(); x++)
{ {
NBTTagCompound e = list.getCompoundTagAt(x); list = regs.getCompoundTag(key).getTagList("dummied",10);
entry.dummied.add(new ResourceLocation(e.getString("K"))); for (int x = 0; x < list.tagCount(); x++)
{
NBTTagCompound e = list.getCompoundTagAt(x);
entry.dummied.add(new ResourceLocation(e.getString("K")));
}
} }
} }
failedElements = PersistentRegistryManager.injectSnapshot(snapshot, true, true); failedElements = PersistentRegistryManager.injectSnapshot(snapshot, true, true);