mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-10 05:39:15 +01:00
SPIGOT-7507: Fall back to world UUIDs if Dimension tag missing or invalid
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e84271b31b
commit
0a971d438b
@ -73,7 +73,7 @@
|
||||
this.server = minecraftserver;
|
||||
this.registries = layeredregistryaccess;
|
||||
this.maxPlayers = i;
|
||||
@@ -161,9 +193,15 @@
|
||||
@@ -161,15 +193,21 @@
|
||||
|
||||
NBTTagCompound nbttagcompound = this.load(entityplayer);
|
||||
ResourceKey resourcekey;
|
||||
@ -90,6 +90,14 @@
|
||||
Logger logger = PlayerList.LOGGER;
|
||||
|
||||
Objects.requireNonNull(logger);
|
||||
- resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElse(World.OVERWORLD);
|
||||
+ resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElse(entityplayer.serverLevel().dimension()); // CraftBukkit - SPIGOT-7507: If no dimension, fall back to existing dimension loaded from "WorldUUID", which in turn defaults to World.OVERWORLD
|
||||
} else {
|
||||
- resourcekey = World.OVERWORLD;
|
||||
+ resourcekey = entityplayer.serverLevel().dimension(); // CraftBukkit - SPIGOT-7507: If no dimension, fall back to existing dimension loaded from "WorldUUID", which in turn defaults to World.OVERWORLD
|
||||
}
|
||||
|
||||
ResourceKey<World> resourcekey1 = resourcekey;
|
||||
@@ -186,7 +224,8 @@
|
||||
entityplayer.setServerLevel(worldserver1);
|
||||
String s1 = networkmanager.getLoggableAddress(this.server.logIPs());
|
||||
|
Loading…
Reference in New Issue
Block a user