Archiviert
13
0

Okay, back to arbitrary offsets!

Dieser Commit ist enthalten in:
Dinnerbone 2011-07-07 20:29:57 +01:00
Ursprung 2564043882
Commit 0993e6cbd1
2 geänderte Dateien mit 12 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -37,15 +37,17 @@ public class WorldMap extends WorldMapBase {
// CraftBukkit start // CraftBukkit start
byte dimension = nbttagcompound.c("dimension"); byte dimension = nbttagcompound.c("dimension");
this.worldUID = nbttagcompound.getLong("WorldUID"); if (dimension >= 10) {
CraftWorld world = (CraftWorld) server.getWorld(this.worldUID); this.worldUID = nbttagcompound.getLong("WorldUID");
// Check if the stored world details are correct. CraftWorld world = (CraftWorld) server.getWorld(this.worldUID);
if (world == null) { // Check if the stored world details are correct.
/* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached. if (world == null) {
This is to prevent them being corrupted with the wrong map data. */ /* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached.
dimension = 127; This is to prevent them being corrupted with the wrong map data. */
} else { dimension = 127;
dimension = (byte) world.getHandle().dimension; } else {
dimension = (byte) world.getHandle().dimension;
}
} }
this.map = dimension; this.map = dimension;

Datei anzeigen

@ -393,7 +393,7 @@ public final class CraftServer implements Server {
converter.convert(name, new ConvertProgressUpdater(console)); 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); WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator);
internal.worldMaps = console.worlds.get(0).worldMaps; internal.worldMaps = console.worlds.get(0).worldMaps;