diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-07-07 20:22:03 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-07-07 20:22:03 +0100 |
commit | 2564043882a43fc97b276b54b3ec602336d7d7ee (patch) | |
tree | 787b027cb6e87d4a25e61009b6b41f08c3c86d2f /src/main/java/net/minecraft | |
parent | 83abbfe4d659133320a2fbaf38501966ef6a7d3c (diff) | |
download | craftbukkit-2564043882a43fc97b276b54b3ec602336d7d7ee.tar craftbukkit-2564043882a43fc97b276b54b3ec602336d7d7ee.tar.gz craftbukkit-2564043882a43fc97b276b54b3ec602336d7d7ee.tar.lz craftbukkit-2564043882a43fc97b276b54b3ec602336d7d7ee.tar.xz craftbukkit-2564043882a43fc97b276b54b3ec602336d7d7ee.zip |
No longer use an arbitrary offset to locate the correct map
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldMap.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java index 92eac2e7..138b4e30 100644 --- a/src/main/java/net/minecraft/server/WorldMap.java +++ b/src/main/java/net/minecraft/server/WorldMap.java @@ -37,17 +37,15 @@ public class WorldMap extends WorldMapBase { // CraftBukkit start byte dimension = nbttagcompound.c("dimension"); - if (dimension >= 10) { - this.worldUID = nbttagcompound.getLong("WorldUID"); - CraftWorld world = (CraftWorld) server.getWorld(this.worldUID); - // Check if the stored world details are correct. - if (world == null) { - /* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached. - This is to prevent them being corrupted with the wrong map data. */ - dimension = 127; - } else { - dimension = (byte) world.getHandle().dimension; - } + this.worldUID = nbttagcompound.getLong("WorldUID"); + CraftWorld world = (CraftWorld) server.getWorld(this.worldUID); + // Check if the stored world details are correct. + if (world == null) { + /* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached. + This is to prevent them being corrupted with the wrong map data. */ + dimension = 127; + } else { + dimension = (byte) world.getHandle().dimension; } this.map = dimension; |