summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 20:29:57 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-07-07 20:29:57 +0100
commit0993e6cbd19b2c4d183a1c93c5ff87320ef46faf (patch)
treeb90aae4450ba5edd8077ed138331c507bc623e87 /src
parent2564043882a43fc97b276b54b3ec602336d7d7ee (diff)
downloadcraftbukkit-0993e6cbd19b2c4d183a1c93c5ff87320ef46faf.tar
craftbukkit-0993e6cbd19b2c4d183a1c93c5ff87320ef46faf.tar.gz
craftbukkit-0993e6cbd19b2c4d183a1c93c5ff87320ef46faf.tar.lz
craftbukkit-0993e6cbd19b2c4d183a1c93c5ff87320ef46faf.tar.xz
craftbukkit-0993e6cbd19b2c4d183a1c93c5ff87320ef46faf.zip
Okay, back to arbitrary offsets!
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/WorldMap.java20
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java2
2 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/net/minecraft/server/WorldMap.java b/src/main/java/net/minecraft/server/WorldMap.java
index 138b4e30..92eac2e7 100644
--- a/src/main/java/net/minecraft/server/WorldMap.java
+++ b/src/main/java/net/minecraft/server/WorldMap.java
@@ -37,15 +37,17 @@ public class WorldMap extends WorldMapBase {
// CraftBukkit start
byte dimension = nbttagcompound.c("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;
+ 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.map = dimension;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 536a34a5..30a382c0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -393,7 +393,7 @@ public final class CraftServer implements Server {
converter.convert(name, new ConvertProgressUpdater(console));
}
- int dimension = Environment.values().length + 1 + console.worlds.size();
+ int dimension = 10 + console.worlds.size();
WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator);
internal.worldMaps = console.worlds.get(0).worldMaps;