Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
No longer use an arbitrary offset to locate the correct map
Dieser Commit ist enthalten in:
Ursprung
83abbfe4d6
Commit
2564043882
@ -37,17 +37,15 @@ public class WorldMap extends WorldMapBase {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
byte dimension = nbttagcompound.c("dimension");
|
byte dimension = nbttagcompound.c("dimension");
|
||||||
|
|
||||||
if (dimension >= 10) {
|
this.worldUID = nbttagcompound.getLong("WorldUID");
|
||||||
this.worldUID = nbttagcompound.getLong("WorldUID");
|
CraftWorld world = (CraftWorld) server.getWorld(this.worldUID);
|
||||||
CraftWorld world = (CraftWorld) server.getWorld(this.worldUID);
|
// Check if the stored world details are correct.
|
||||||
// Check if the stored world details are correct.
|
if (world == null) {
|
||||||
if (world == null) {
|
/* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached.
|
||||||
/* 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. */
|
||||||
This is to prevent them being corrupted with the wrong map data. */
|
dimension = 127;
|
||||||
dimension = 127;
|
} else {
|
||||||
} else {
|
dimension = (byte) world.getHandle().dimension;
|
||||||
dimension = (byte) world.getHandle().dimension;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.map = dimension;
|
this.map = dimension;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren