Fully clear DimensionManager's DimensionID bitset when world is loaded. Closes #1074

This commit is contained in:
Lex Manos 2014-05-12 11:46:03 -07:00
parent 26c55d89ef
commit 711e92a59f
2 changed files with 2 additions and 5 deletions

View File

@ -380,9 +380,9 @@ public class DimensionManager
public static void loadDimensionDataMap(NBTTagCompound compoundTag) public static void loadDimensionDataMap(NBTTagCompound compoundTag)
{ {
dimensionMap.clear();
if (compoundTag == null) if (compoundTag == null)
{ {
dimensionMap.clear();
for (Integer id : dimensions.keySet()) for (Integer id : dimensions.keySet())
{ {
if (id >= 0) if (id >= 0)

View File

@ -222,12 +222,9 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
@Override @Override
public void readData(SaveHandler handler, WorldInfo info, Map<String, NBTBase> propertyMap, NBTTagCompound tag) public void readData(SaveHandler handler, WorldInfo info, Map<String, NBTBase> propertyMap, NBTTagCompound tag)
{
if (tag.hasKey("DimensionData"))
{ {
DimensionManager.loadDimensionDataMap(tag.hasKey("DimensionData") ? tag.getCompoundTag("DimensionData") : null); DimensionManager.loadDimensionDataMap(tag.hasKey("DimensionData") ? tag.getCompoundTag("DimensionData") : null);
} }
}
@Subscribe @Subscribe
public void mappingChanged(FMLModIdMappingEvent evt) public void mappingChanged(FMLModIdMappingEvent evt)