Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
d5f1ffc2e6
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
31 Zeilen
1.6 KiB
Diff
31 Zeilen
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Wyatt Childers <wchilders@nearce.com>
|
|
Date: Fri, 3 Jul 2020 14:57:05 -0400
|
|
Subject: [PATCH] Spawn player in correct world on login
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index c6b76049c70bf42c216d833b6dc33254c24b2253..b6bdbe4033b0252d61e8a0affd011475e700cb59 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -201,7 +201,18 @@ public abstract class PlayerList {
|
|
}
|
|
// CraftBukkit end
|
|
|
|
- if (nbttagcompound != null) {
|
|
+ // Paper start - move logic in Entity to here, to use bukkit supplied world UUID.
|
|
+ if (nbttagcompound != null && nbttagcompound.contains("WorldUUIDMost") && nbttagcompound.contains("WorldUUIDLeast")) {
|
|
+ UUID uid = new UUID(nbttagcompound.getLong("WorldUUIDMost"), nbttagcompound.getLong("WorldUUIDLeast"));
|
|
+ org.bukkit.World bWorld = org.bukkit.Bukkit.getServer().getWorld(uid);
|
|
+ if (bWorld != null) {
|
|
+ resourcekey = ((CraftWorld) bWorld).getHandle().dimension();
|
|
+ } else {
|
|
+ resourcekey = Level.OVERWORLD;
|
|
+ }
|
|
+ } else if (nbttagcompound != null) {
|
|
+ // Vanilla migration support
|
|
+ // Paper end
|
|
DataResult<ResourceKey<Level>> dataresult = DimensionType.parseLegacy(new Dynamic(NbtOps.INSTANCE, nbttagcompound.get("Dimension"))); // CraftBukkit - decompile error
|
|
Logger logger = PlayerList.LOGGER;
|
|
|