mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Okay, back to arbitrary offsets!
This commit is contained in:
parent
2564043882
commit
0993e6cbd1
2 changed files with 12 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue