geforkt von Mirrors/Paper
b31089a929
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
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/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
|
index 6d6fb9012b67e1c93c0141eb59bdcfdf65de71db..a6ad5daf4118ed45301ed6098d53a94c5690c304 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
|
@@ -116,7 +116,18 @@ public abstract class PlayerList {
|
|
}String lastKnownName = s; // Paper
|
|
// CraftBukkit end
|
|
|
|
- if (nbttagcompound != null) {
|
|
+ // Paper start - move logic in Entity to here, to use bukkit supplied world UUID.
|
|
+ if (nbttagcompound != null && nbttagcompound.hasKey("WorldUUIDMost") && nbttagcompound.hasKey("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().getDimensionKey();
|
|
+ } else {
|
|
+ resourcekey = World.OVERWORLD;
|
|
+ }
|
|
+ } else if (nbttagcompound != null) {
|
|
+ // Vanilla migration support
|
|
+ // Paper end
|
|
DataResult dataresult = DimensionManager.a(new Dynamic(DynamicOpsNBT.a, nbttagcompound.get("Dimension")));
|
|
Logger logger = PlayerList.LOGGER;
|
|
|