diff --git a/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch b/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch index 95c432744..d3065b728 100644 --- a/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch @@ -4,6 +4,26 @@ Date: Sun, 19 Apr 2020 04:28:29 -0400 Subject: [PATCH] Load Chunks for Login Asynchronously +diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java +index 67f1a8490d48f55d58268d7e34a27170792b5559..a7db54a94a5017e737ce9682a52eed7405af8cc1 100644 +--- a/src/main/java/net/minecraft/server/level/ServerLevel.java ++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +@@ -170,6 +170,7 @@ import org.bukkit.event.world.GenericGameEvent; + import org.bukkit.event.world.TimeSkipEvent; + // CraftBukkit end + import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper ++import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; // Paper + + public class ServerLevel extends Level implements WorldGenLevel { + +@@ -404,6 +405,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + return this.getServer().getPlayerList().getPlayer(uuid); + } + // Paper end ++ public final ReferenceOpenHashSet pendingLogin = new ReferenceOpenHashSet<>(); // Paper + + // Add env and gen to constructor, IWorldDataServer -> WorldDataServer + public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index 084521ed853fc2b15be355a17da8421c54716815..acc64abd9420b81ed4c8c17cf6a9f5bc5d35f116 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -96,7 +116,7 @@ index c83395364edb4f2ba8515326b19c4f1a436a0502..c99266d4782c5d58339e63f7564c28b4 try { ServerPlayer entityplayer1 = this.server.getPlayerList().getPlayerForLogin(this.gameProfile, s); // CraftBukkit - add player reference diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e5a167060 100644 +index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b07ad17ac1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -139,6 +139,7 @@ public abstract class PlayerList { @@ -145,12 +165,13 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e // Spigot start - spawn location event Player spawnPlayer = player.getBukkitEntity(); -@@ -264,6 +274,52 @@ public abstract class PlayerList { +@@ -264,6 +274,54 @@ public abstract class PlayerList { player.getRecipeBook().sendInitialRecipeBook(player); this.updateEntireScoreboard(worldserver1.getScoreboard(), player); this.server.invalidateStatus(); + // Paper start - async load spawn in chunk + ServerLevel finalWorldserver = worldserver1; ++ finalWorldserver.pendingLogin.add(player); + int chunkX = loc.getBlockX() >> 4; + int chunkZ = loc.getBlockZ() >> 4; + final net.minecraft.world.level.ChunkPos pos = new net.minecraft.world.level.ChunkPos(chunkX, chunkZ); @@ -171,6 +192,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e + player, finalWorldserver, connection, playerconnection, + nbttagcompound, s1, lastKnownName + ); ++ finalWorldserver.pendingLogin.remove(player); + }; + }); + } @@ -198,7 +220,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e MutableComponent ichatmutablecomponent; if (player.getGameProfile().getName().equalsIgnoreCase(s)) { -@@ -505,6 +561,7 @@ public abstract class PlayerList { +@@ -505,6 +563,7 @@ public abstract class PlayerList { protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -206,7 +228,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e this.playerIo.save(player); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit -@@ -532,7 +589,7 @@ public abstract class PlayerList { +@@ -532,7 +591,7 @@ public abstract class PlayerList { } PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); @@ -215,7 +237,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isSameThread()) entityplayer.doTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -577,6 +634,13 @@ public abstract class PlayerList { +@@ -577,6 +636,13 @@ public abstract class PlayerList { // this.advancements.remove(uuid); // CraftBukkit end } @@ -229,7 +251,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e // CraftBukkit start // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -594,7 +658,7 @@ public abstract class PlayerList { +@@ -594,7 +660,7 @@ public abstract class PlayerList { this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -238,7 +260,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -613,6 +677,13 @@ public abstract class PlayerList { +@@ -613,6 +679,13 @@ public abstract class PlayerList { list.add(entityplayer); } } @@ -252,3 +274,16 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..0d86536696657ba6eee5f12d3d3afa8e Iterator iterator = list.iterator(); +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index 4016b31bd020e00c0e79328646f9b5411b312e88..c8c11ec3c5c4c4d1ed09163aa6d3a4275e497e11 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -1219,7 +1219,7 @@ public final class CraftServer implements Server { + return false; + } + +- if (handle.players().size() > 0) { ++ if (handle.players().size() > 0 || handle.pendingLogin.size() > 0) { // Paper + return false; + } + diff --git a/patches/server/0425-Optimize-ServerLevels-chunk-level-checking-methods.patch b/patches/server/0425-Optimize-ServerLevels-chunk-level-checking-methods.patch index 97a753c00..5e016b22d 100644 --- a/patches/server/0425-Optimize-ServerLevels-chunk-level-checking-methods.patch +++ b/patches/server/0425-Optimize-ServerLevels-chunk-level-checking-methods.patch @@ -8,10 +8,10 @@ so inline where possible, and avoid the abstraction of the Either class. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e531c2ed2432b0184878cc3fcfe0bc91a551977c..c3db29bc1b24a976617068a4ddae062857d61097 100644 +index a7db54a94a5017e737ce9682a52eed7405af8cc1..22a0ca38ae03b8064db7f77dd17335ed4abc72bc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2251,19 +2251,22 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2253,19 +2253,22 @@ public class ServerLevel extends Level implements WorldGenLevel { } private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { diff --git a/patches/server/0447-incremental-chunk-and-player-saving.patch b/patches/server/0447-incremental-chunk-and-player-saving.patch index a8b9e9904..739602ae7 100644 --- a/patches/server/0447-incremental-chunk-and-player-saving.patch +++ b/patches/server/0447-incremental-chunk-and-player-saving.patch @@ -5,7 +5,7 @@ Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f2e6c5ed099a94be3aefca55cffd8e2447e39ac2..36e0a9771705f02e67dd507f2c0c9a030f77c02a 100644 +index 7d2fee97f4d08eae245475c4b60c1a7ba46c840d..48650bc1c09b18f1b57d9828dfe27f51c74c4a75 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -854,7 +854,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop comparator; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 559db90e1ba3d636ea080f47cdf274d11a1bcb89..de84400b0565843a7314a7c8032d14cdadccdb73 100644 +index 9819bb3c36e314103236832a133906957255ee7a..3ca3275f7f66410217b86ba8ca09d85ef64f3f83 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -179,6 +179,7 @@ public abstract class PlayerList { @@ -1123,7 +1123,7 @@ index 559db90e1ba3d636ea080f47cdf274d11a1bcb89..de84400b0565843a7314a7c8032d14cd ServerPlayer prev = pendingPlayers.put(player.getUUID(), player);// Paper if (prev != null) { disconnectPendingPlayer(prev); -@@ -293,8 +294,8 @@ public abstract class PlayerList { +@@ -294,8 +295,8 @@ public abstract class PlayerList { net.minecraft.server.level.ChunkMap playerChunkMap = worldserver1.getChunkSource().chunkMap; net.minecraft.server.level.DistanceManager distanceManager = playerChunkMap.distanceManager; distanceManager.addTicket(net.minecraft.server.level.TicketType.LOGIN, pos, 31, pos.toLong()); @@ -1194,7 +1194,7 @@ index b234ba968e82ddf1e8f7c84d3a17659e3beda2b3..af22fa8aa8ddef4d592564b14d0114cc net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null); if (chunk != null) addTicket(x, z); // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 71b96630dd6543d8a4d8df5165d7182fb0f35067..ac232efad56fd69577de8fa4ed47cb852c9a429e 100644 +index 0fda8c27c717bd030b826c5c7267b880f9d1f6b9..8db930d54ad97435e367aa670466d8a072ca0b23 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1047,6 +1047,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0466-Fix-SPIGOT-5989.patch b/patches/server/0466-Fix-SPIGOT-5989.patch index a968772ad..6e460e7e6 100644 --- a/patches/server/0466-Fix-SPIGOT-5989.patch +++ b/patches/server/0466-Fix-SPIGOT-5989.patch @@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index de84400b0565843a7314a7c8032d14cdadccdb73..8c1b6aa3957a988656eeb2ad6323fdbd2f67cd19 100644 +index 3ca3275f7f66410217b86ba8ca09d85ef64f3f83..8f5dcd77b3a6ccce9b4ff8139e6b3a9700502ebf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -836,6 +836,7 @@ public abstract class PlayerList { +@@ -838,6 +838,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; boolean isRespawn = false; @@ -21,7 +21,7 @@ index de84400b0565843a7314a7c8032d14cdadccdb73..8c1b6aa3957a988656eeb2ad6323fdbd // Paper end // CraftBukkit start - fire PlayerRespawnEvent -@@ -846,7 +847,7 @@ public abstract class PlayerList { +@@ -848,7 +849,7 @@ public abstract class PlayerList { Optional optional; if (blockposition != null) { @@ -30,7 +30,7 @@ index de84400b0565843a7314a7c8032d14cdadccdb73..8c1b6aa3957a988656eeb2ad6323fdbd } else { optional = Optional.empty(); } -@@ -890,7 +891,12 @@ public abstract class PlayerList { +@@ -892,7 +893,12 @@ public abstract class PlayerList { } // Spigot End @@ -44,7 +44,7 @@ index de84400b0565843a7314a7c8032d14cdadccdb73..8c1b6aa3957a988656eeb2ad6323fdbd if (!flag) entityplayer.reset(); // SPIGOT-4785 isRespawn = true; // Paper } else { -@@ -928,8 +934,12 @@ public abstract class PlayerList { +@@ -930,8 +936,12 @@ public abstract class PlayerList { } // entityplayer1.initInventoryMenu(); entityplayer1.setHealth(entityplayer1.getHealth()); diff --git a/patches/server/0478-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0478-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 5767a3c53..2ee7bebf8 100644 --- a/patches/server/0478-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0478-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c7221d169badfae6653d64cb39e1435372ea179a..f4ec0487051b0d61a79bef3067cb4fc19d64a544 100644 +index 92603bc69e7782f252b2ad7b8c8a4546c9b23e12..0d51a518fa8b5d3ef5f6332c2b8f8796d62da658 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1851,6 +1851,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1853,6 +1853,7 @@ public class ServerLevel extends Level implements WorldGenLevel { //ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c())); this.levelData.setSpawn(pos, angle); diff --git a/patches/server/0496-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0496-Extend-block-drop-capture-to-capture-all-items-added.patch index fc9c540f9..0c2984a11 100644 --- a/patches/server/0496-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0496-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f4ec0487051b0d61a79bef3067cb4fc19d64a544..f1506529687e47150a3134b3d5acac8021abe956 100644 +index 0d51a518fa8b5d3ef5f6332c2b8f8796d62da658..d78b75d00ff95eb0c9619420c2921881724d8561 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1288,6 +1288,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1290,6 +1290,12 @@ public class ServerLevel extends Level implements WorldGenLevel { // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { diff --git a/patches/server/0521-Add-API-for-quit-reason.patch b/patches/server/0521-Add-API-for-quit-reason.patch index 069a5da48..1189e201d 100644 --- a/patches/server/0521-Add-API-for-quit-reason.patch +++ b/patches/server/0521-Add-API-for-quit-reason.patch @@ -49,10 +49,10 @@ index a33334b45493c714b48439986b484256c03bdf8e..cf490d9f622e7300c36aa4776987e328 this.connection.disconnect(ichatbasecomponent); })); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 67c50a329e7bdf4056a1217963e29e8ceb99b20f..1979e8634829f949b7ed80b231b36d5a5e29c717 100644 +index f41a8510e1bdfbc5b9c0a599fc17fadd74280be9..0259c8fe65e723a8d2dcde2971a10ca50fb685c1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -601,7 +601,7 @@ public abstract class PlayerList { +@@ -603,7 +603,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/server/0523-Expose-world-spawn-angle.patch b/patches/server/0523-Expose-world-spawn-angle.patch index 32865caa2..72e1b69da 100644 --- a/patches/server/0523-Expose-world-spawn-angle.patch +++ b/patches/server/0523-Expose-world-spawn-angle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1979e8634829f949b7ed80b231b36d5a5e29c717..1b188bdf5597b81661ca1cc7acef1a9e93a54967 100644 +index 0259c8fe65e723a8d2dcde2971a10ca50fb685c1..30b98d4ee39990b98e6c15b23a598eb472ebea45 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -879,7 +879,7 @@ public abstract class PlayerList { +@@ -881,7 +881,7 @@ public abstract class PlayerList { if (location == null) { worldserver1 = this.server.getLevel(Level.OVERWORLD); blockposition = entityplayer1.getSpawnPoint(worldserver1); diff --git a/patches/server/0565-Remove-stale-POIs.patch b/patches/server/0565-Remove-stale-POIs.patch index 2adf7847b..018ead406 100644 --- a/patches/server/0565-Remove-stale-POIs.patch +++ b/patches/server/0565-Remove-stale-POIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f1506529687e47150a3134b3d5acac8021abe956..bfabed84ef3bb61274ed60f54ae93b41eae8d228 100644 +index d78b75d00ff95eb0c9619420c2921881724d8561..3016947fb05211ffa72eef027db92d02e2486150 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1916,6 +1916,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1918,6 +1918,11 @@ public class ServerLevel extends Level implements WorldGenLevel { }); optional1.ifPresent((holder) -> { this.getServer().execute(() -> { diff --git a/patches/server/0566-Fix-villager-boat-exploit.patch b/patches/server/0566-Fix-villager-boat-exploit.patch index 4aeae7af1..5b7b3f8e3 100644 --- a/patches/server/0566-Fix-villager-boat-exploit.patch +++ b/patches/server/0566-Fix-villager-boat-exploit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1b188bdf5597b81661ca1cc7acef1a9e93a54967..fa90f805e87985fae1875ded3b295c4736cc7aee 100644 +index 30b98d4ee39990b98e6c15b23a598eb472ebea45..6c561f3259074fa1320dd812fe9f514aea34d2b6 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -626,6 +626,14 @@ public abstract class PlayerList { +@@ -628,6 +628,14 @@ public abstract class PlayerList { PlayerList.LOGGER.debug("Removing player mount"); entityplayer.stopRiding(); entity.getPassengersAndSelf().forEach((entity1) -> { diff --git a/patches/server/0567-Add-sendOpLevel-API.patch b/patches/server/0567-Add-sendOpLevel-API.patch index d0db422d5..d2b05ecbe 100644 --- a/patches/server/0567-Add-sendOpLevel-API.patch +++ b/patches/server/0567-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index fa90f805e87985fae1875ded3b295c4736cc7aee..39ddb080e9a296fa499ea2959e22172500db6235 100644 +index 6c561f3259074fa1320dd812fe9f514aea34d2b6..6cc4711123976cfbc2131732e78abf86c8e5b104 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1124,6 +1124,11 @@ public abstract class PlayerList { +@@ -1126,6 +1126,11 @@ public abstract class PlayerList { } private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) { @@ -20,7 +20,7 @@ index fa90f805e87985fae1875ded3b295c4736cc7aee..39ddb080e9a296fa499ea2959e221725 if (player.connection != null) { byte b0; -@@ -1138,8 +1143,10 @@ public abstract class PlayerList { +@@ -1140,8 +1145,10 @@ public abstract class PlayerList { player.connection.send(new ClientboundEntityEventPacket(player, b0)); } @@ -32,7 +32,7 @@ index fa90f805e87985fae1875ded3b295c4736cc7aee..39ddb080e9a296fa499ea2959e221725 public boolean isWhiteListed(GameProfile profile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4c7d84a8f0f186dba18dba528ed324a0808605e3..8024b7bcc18a9b2298864d53230d54c23b9d1166 100644 +index 99d6e2fcfb6605a712c48831a5b7bd22d123dee2..8608fbd5484498f0e478d857ea1dd548ad6a93e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -606,6 +606,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0582-EntityMoveEvent.patch b/patches/server/0582-EntityMoveEvent.patch index 163492fc3..c8d45b799 100644 --- a/patches/server/0582-EntityMoveEvent.patch +++ b/patches/server/0582-EntityMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] EntityMoveEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9484e447959a9c25ac6ef318be1569d236b5915d..75cd5667eb0f047cdec56b4131dcd1c4f22d4067 100644 +index d60439d49de781b12af6fbe4ff89b7270f57cbeb..abd1935ebc12f963b563023eb5279ad16ed1d8df 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1495,6 +1495,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index bfabed84ef3bb61274ed60f54ae93b41eae8d228..b4d3bff060874871e3aebba1ba3570c8418a52bd 100644 +index 3016947fb05211ffa72eef027db92d02e2486150..675c8f6d856c6fa333887fd4079504713f3e861e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -217,6 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper diff --git a/patches/server/0583-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0583-added-option-to-disable-pathfinding-updates-on-block.patch index 42c335b50..988e34627 100644 --- a/patches/server/0583-added-option-to-disable-pathfinding-updates-on-block.patch +++ b/patches/server/0583-added-option-to-disable-pathfinding-updates-on-block.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b4d3bff060874871e3aebba1ba3570c8418a52bd..3bb1fe9e6f5e8f7dc6dc07f83c5b0793760882e8 100644 +index 675c8f6d856c6fa333887fd4079504713f3e861e..221612cddc9dd839c96d03325ee243721f7f5a9c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1490,6 +1490,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1492,6 +1492,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } this.getChunkSource().blockChanged(pos); @@ -16,7 +16,7 @@ index b4d3bff060874871e3aebba1ba3570c8418a52bd..3bb1fe9e6f5e8f7dc6dc07f83c5b0793 VoxelShape voxelshape = oldState.getCollisionShape(this, pos); VoxelShape voxelshape1 = newState.getCollisionShape(this, pos); -@@ -1531,6 +1532,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1533,6 +1534,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } diff --git a/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch index 9ad98eb6f..47ed8bb33 100644 --- a/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch +++ b/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch @@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro Closes #5036 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index f7f0d7556d130197b8cb75841f1e326274eb59cd..304fb7b7255379d1be31ccf86ce04c377ef1d247 100644 +index e11595885bd48036b141d1d449281dceadae5598..c4d83bd96b060342c5a03a684e5eb3403ab708a8 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -619,6 +619,14 @@ public abstract class PlayerList { +@@ -621,6 +621,14 @@ public abstract class PlayerList { } // Paper end diff --git a/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch index 61338a139..317c2d8c7 100644 --- a/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch +++ b/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 304fb7b7255379d1be31ccf86ce04c377ef1d247..10b615ad0a038c7237f4664431996774b4e55e2f 100644 +index c4d83bd96b060342c5a03a684e5eb3403ab708a8..b927d5b60e2571f4a7a56237d0da46e5162d6588 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -852,6 +852,7 @@ public abstract class PlayerList { +@@ -854,6 +854,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; @@ -17,7 +17,7 @@ index 304fb7b7255379d1be31ccf86ce04c377ef1d247..10b615ad0a038c7237f4664431996774 boolean isRespawn = false; boolean isLocAltered = false; // Paper - Fix SPIGOT-5989 // Paper end -@@ -872,6 +873,7 @@ public abstract class PlayerList { +@@ -874,6 +875,7 @@ public abstract class PlayerList { if (optional.isPresent()) { BlockState iblockdata = worldserver1.getBlockState(blockposition); boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR); @@ -25,7 +25,7 @@ index 304fb7b7255379d1be31ccf86ce04c377ef1d247..10b615ad0a038c7237f4664431996774 Vec3 vec3d = (Vec3) optional.get(); float f1; -@@ -900,7 +902,7 @@ public abstract class PlayerList { +@@ -902,7 +904,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch index 9e6260fe4..bb31a61ea 100644 --- a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -18,10 +18,10 @@ index 2723bb42f3618fa57f3996b7880484d88afb552d..8dc4eac46bb7f127cb23d3994308d6ce } else { if (this.player.getHealth() > 0.0F) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 10b615ad0a038c7237f4664431996774b4e55e2f..63f92d68b91f1049802a1541c7ec4efaa324ac11 100644 +index b927d5b60e2571f4a7a56237d0da46e5162d6588..cffc11789ac3db3b5b674feac47785d693ae064a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -811,6 +811,12 @@ public abstract class PlayerList { +@@ -813,6 +813,12 @@ public abstract class PlayerList { } public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) { @@ -34,7 +34,7 @@ index 10b615ad0a038c7237f4664431996774b4e55e2f..63f92d68b91f1049802a1541c7ec4efa entityplayer.stopRiding(); // CraftBukkit this.players.remove(entityplayer); this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot -@@ -902,7 +908,7 @@ public abstract class PlayerList { +@@ -904,7 +910,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch index 797dffa66..4b29a7dc8 100644 --- a/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0651-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3bb1fe9e6f5e8f7dc6dc07f83c5b0793760882e8..428272c1cace3a87fbcade90b5f9ee9236532418 100644 +index 221612cddc9dd839c96d03325ee243721f7f5a9c..cfdf7d844390310f792cee93d6a149aa65bb7055 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -494,8 +494,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -496,8 +496,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setClearWeatherTime(clearDuration); this.serverLevelData.setRainTime(rainDuration); this.serverLevelData.setThunderTime(rainDuration); @@ -19,7 +19,7 @@ index 3bb1fe9e6f5e8f7dc6dc07f83c5b0793760882e8..428272c1cace3a87fbcade90b5f9ee92 } @Override -@@ -887,8 +887,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -889,8 +889,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setThunderTime(j); this.serverLevelData.setRainTime(k); this.serverLevelData.setClearWeatherTime(i); @@ -30,7 +30,7 @@ index 3bb1fe9e6f5e8f7dc6dc07f83c5b0793760882e8..428272c1cace3a87fbcade90b5f9ee92 } this.oThunderLevel = this.thunderLevel; -@@ -954,14 +954,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -956,14 +956,14 @@ public class ServerLevel extends Level implements WorldGenLevel { private void resetWeatherCycle() { // CraftBukkit start diff --git a/patches/server/0654-Add-PlayerKickEvent-causes.patch b/patches/server/0654-Add-PlayerKickEvent-causes.patch index 23347e20c..462caa2c4 100644 --- a/patches/server/0654-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0654-Add-PlayerKickEvent-causes.patch @@ -367,10 +367,10 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 63f92d68b91f1049802a1541c7ec4efaa324ac11..c332750833cccee1264a3399ed0539f6fee6af44 100644 +index cffc11789ac3db3b5b674feac47785d693ae064a..dfc7eb831bc97535385f2471187e0c0a088aa023 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -720,7 +720,7 @@ public abstract class PlayerList { +@@ -722,7 +722,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -379,7 +379,7 @@ index 63f92d68b91f1049802a1541c7ec4efaa324ac11..c332750833cccee1264a3399ed0539f6 } // Instead of kicking then returning, we need to store the kick reason -@@ -1351,8 +1351,8 @@ public abstract class PlayerList { +@@ -1353,8 +1353,8 @@ public abstract class PlayerList { // Paper end // CraftBukkit start - disconnect safely for (ServerPlayer player : this.players) { diff --git a/patches/server/0673-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0673-Use-getChunkIfLoadedImmediately-in-places.patch index c7ae795f5..fca57838c 100644 --- a/patches/server/0673-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0673-Use-getChunkIfLoadedImmediately-in-places.patch @@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk load in that case). diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 428272c1cace3a87fbcade90b5f9ee9236532418..4bebe9bc9dea53d57543e65d7300f50b0f907017 100644 +index cfdf7d844390310f792cee93d6a149aa65bb7055..388958c9cdd366f8a5cdf7653abdcc6cdf5433ce 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -222,7 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -223,7 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI @@ -20,7 +20,7 @@ index 428272c1cace3a87fbcade90b5f9ee9236532418..4bebe9bc9dea53d57543e65d7300f50b } @Override -@@ -1437,7 +1437,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1439,7 +1439,7 @@ public class ServerLevel extends Level implements WorldGenLevel { for (int l1 = j; l1 <= i1; ++l1) { for (int i2 = l; i2 <= k1; ++i2) { diff --git a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch index a22f7963e..58fd38e05 100644 --- a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch @@ -59,10 +59,10 @@ index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef4 this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false); // Paper end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c332750833cccee1264a3399ed0539f6fee6af44..0e20ebf895e7ebe4201a8596519929ea65f653af 100644 +index dfc7eb831bc97535385f2471187e0c0a088aa023..0e70a431219c8c0a13cb3c9059d8a77ee2f1ca55 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -592,6 +592,11 @@ public abstract class PlayerList { +@@ -594,6 +594,11 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component @@ -74,7 +74,7 @@ index c332750833cccee1264a3399ed0539f6fee6af44..0e20ebf895e7ebe4201a8596519929ea ServerLevel worldserver = entityplayer.getLevel(); entityplayer.awardStat(Stats.LEAVE_GAME); -@@ -602,7 +607,7 @@ public abstract class PlayerList { +@@ -604,7 +609,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/server/0690-Add-PlayerSetSpawnEvent.patch b/patches/server/0690-Add-PlayerSetSpawnEvent.patch index fb613de14..8e714a1f6 100644 --- a/patches/server/0690-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0690-Add-PlayerSetSpawnEvent.patch @@ -89,10 +89,10 @@ index 56ac440465813a7dab8d166e882e18143a50729f..80e1970f568a74a43e624188a77cfbd2 public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0e20ebf895e7ebe4201a8596519929ea65f653af..03c413dfd16f415377749baa4fdd41949c6a12b9 100644 +index 0e70a431219c8c0a13cb3c9059d8a77ee2f1ca55..18772fd8a4b90ef39f208ed45355e5c3ccf06657 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -896,13 +896,13 @@ public abstract class PlayerList { +@@ -898,13 +898,13 @@ public abstract class PlayerList { f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D); } @@ -129,7 +129,7 @@ index c3e49a781f838e6a46cb89744f3f1846de182275..c2f3d3a09327e7cb7d3167609eb3ce68 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bf5931cbcfbfdc6e68706b7e86b24b2478e4bbef..55f4a09bc27c30936e29fa2a2fe2ef0a67b8876d 100644 +index 4750ac09f2abfb712b042028a95d23121ffc049f..d309c994ffd72952cf9a8f2f4cc21231417bb9ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1216,9 +1216,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0706-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0706-Add-methods-to-find-targets-for-lightning-strikes.patch index 5c117e0e1..f76a939dc 100644 --- a/patches/server/0706-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0706-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4bebe9bc9dea53d57543e65d7300f50b0f907017..8c95d537c7bf5cc9b63f0e412c9ad67f5e6fe51e 100644 +index 388958c9cdd366f8a5cdf7653abdcc6cdf5433ce..290f7253e78bfd3acdffd2ca6368d80c8620eba5 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -776,6 +776,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -778,6 +778,11 @@ public class ServerLevel extends Level implements WorldGenLevel { } protected BlockPos findLightningTargetAround(BlockPos pos) { @@ -20,7 +20,7 @@ index 4bebe9bc9dea53d57543e65d7300f50b0f907017..8c95d537c7bf5cc9b63f0e412c9ad67f BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos); Optional optional = this.findLightningRod(blockposition1); -@@ -790,6 +795,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -792,6 +797,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!list.isEmpty()) { return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition(); } else { diff --git a/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 05c02fd44..aae72845b 100644 --- a/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0720-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8c95d537c7bf5cc9b63f0e412c9ad67f5e6fe51e..2634eba0537648c0e013455e813e25897ea71ff0 100644 +index 290f7253e78bfd3acdffd2ca6368d80c8620eba5..8234f7edb7668c9e9e742d703a3db315aa523fb4 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1334,9 +1334,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1336,9 +1336,13 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { diff --git a/patches/server/0733-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0733-Rewrite-entity-bounding-box-lookup-calls.patch index efe868fdf..b9ac3b140 100644 --- a/patches/server/0733-Rewrite-entity-bounding-box-lookup-calls.patch +++ b/patches/server/0733-Rewrite-entity-bounding-box-lookup-calls.patch @@ -914,10 +914,10 @@ index 0000000000000000000000000000000000000000..3ba094e640d7fe7803e2bbdab8ff3beb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2634eba0537648c0e013455e813e25897ea71ff0..306e40f7fa6435cfb3c2da7382daf71a51b58e18 100644 +index 8234f7edb7668c9e9e742d703a3db315aa523fb4..f3aa1276f0689996ce7827c9300c141dd95582cc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -450,7 +450,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -452,7 +452,7 @@ public class ServerLevel extends Level implements WorldGenLevel { DataFixer datafixer = minecraftserver.getFixerUpper(); EntityPersistentStorage entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); diff --git a/patches/server/0735-Execute-chunk-tasks-mid-tick.patch b/patches/server/0735-Execute-chunk-tasks-mid-tick.patch index a000a740b..7081da1b7 100644 --- a/patches/server/0735-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0735-Execute-chunk-tasks-mid-tick.patch @@ -126,10 +126,10 @@ index 438406936633b9c67d21b26527c3d1654118c744..2de322ffc2eedae9efe39f9b771c447d } // Paper start - optimise chunk tick iteration diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0753b792f3cfc1d0b53b767be4c5f728f467dca0..8a1efe19d7b0c31a306bea28b9cbab112702895a 100644 +index f3aa1276f0689996ce7827c9300c141dd95582cc..6eca2940cedc5c4fd73906cc4f5657c78d646a10 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -211,6 +211,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -212,6 +212,7 @@ public class ServerLevel extends Level implements WorldGenLevel { private final StructureManager structureManager; private final StructureCheck structureCheck; private final boolean tickTime; @@ -137,7 +137,7 @@ index 0753b792f3cfc1d0b53b767be4c5f728f467dca0..8a1efe19d7b0c31a306bea28b9cbab11 // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; -@@ -987,6 +988,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -989,6 +990,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (fluid1.is(fluid)) { fluid1.tick(this, pos); } @@ -145,7 +145,7 @@ index 0753b792f3cfc1d0b53b767be4c5f728f467dca0..8a1efe19d7b0c31a306bea28b9cbab11 } -@@ -996,6 +998,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -998,6 +1000,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (iblockdata.is(block)) { iblockdata.tick(this, pos, this.random); } diff --git a/patches/server/0739-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0739-Detail-more-information-in-watchdog-dumps.patch index cf57b0b11..73d66a556 100644 --- a/patches/server/0739-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0739-Detail-more-information-in-watchdog-dumps.patch @@ -78,10 +78,10 @@ index acfa1907bfc9c29d261cfccc00d65bad9ad1a002..d6f3869f5725c7f081efb7f486f74dbb }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 53105ca96f5056adbba6a97ac428587e7c3b683a..a9b23308c89aef277394821cb883540a0c9e7056 100644 +index 6eca2940cedc5c4fd73906cc4f5657c78d646a10..673da1feb2960a6d247265237eae480d34f58056 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1002,7 +1002,26 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1004,7 +1004,26 @@ public class ServerLevel extends Level implements WorldGenLevel { } @@ -108,7 +108,7 @@ index 53105ca96f5056adbba6a97ac428587e7c3b683a..a9b23308c89aef277394821cb883540a ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper -@@ -1042,7 +1061,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1044,7 +1063,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } // } finally { timer.stopTiming(); } // Paper - timings - move up diff --git a/patches/server/0755-Optimise-random-block-ticking.patch b/patches/server/0755-Optimise-random-block-ticking.patch index 7558c5896..8773a1585 100644 --- a/patches/server/0755-Optimise-random-block-ticking.patch +++ b/patches/server/0755-Optimise-random-block-ticking.patch @@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..7d93652c1abbb6aee6eb7c26cf35d4d0 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a9b23308c89aef277394821cb883540a0c9e7056..b779656482325416ef37d6909b01a136e7f97656 100644 +index 673da1feb2960a6d247265237eae480d34f58056..82e6a535ff86df7c5fa076d64f09aba4a9231fe6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -666,6 +666,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -668,6 +668,10 @@ public class ServerLevel extends Level implements WorldGenLevel { entityplayer.stopSleepInBed(false, false); }); } @@ -104,7 +104,7 @@ index a9b23308c89aef277394821cb883540a0c9e7056..b779656482325416ef37d6909b01a136 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { ChunkPos chunkcoordintpair = chunk.getPos(); -@@ -675,10 +679,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -677,10 +681,10 @@ public class ServerLevel extends Level implements WorldGenLevel { ProfilerFiller gameprofilerfiller = this.getProfiler(); gameprofilerfiller.push("thunder"); @@ -117,7 +117,7 @@ index a9b23308c89aef277394821cb883540a0c9e7056..b779656482325416ef37d6909b01a136 if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper -@@ -702,64 +706,75 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -704,64 +708,75 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.popPush("iceandsnow"); if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow diff --git a/patches/server/0757-Optimise-nearby-player-lookups.patch b/patches/server/0757-Optimise-nearby-player-lookups.patch index 3d88aaad3..42d9b5e8a 100644 --- a/patches/server/0757-Optimise-nearby-player-lookups.patch +++ b/patches/server/0757-Optimise-nearby-player-lookups.patch @@ -105,13 +105,13 @@ index 5507f6982bfc02f648a7aa4e4860378fc442cf34..97ec72dc383a2637c60cfc988bca2a8a protected ChunkGenerator generator() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b779656482325416ef37d6909b01a136e7f97656..091e678a736f291b546ce1e684d4e03055734e02 100644 +index 82e6a535ff86df7c5fa076d64f09aba4a9231fe6..b0c95b0af6d24b9566b82b2df54eae5108b9b48b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -406,6 +406,83 @@ public class ServerLevel extends Level implements WorldGenLevel { - return this.getServer().getPlayerList().getPlayer(uuid); - } +@@ -409,6 +409,84 @@ public class ServerLevel extends Level implements WorldGenLevel { // Paper end + public final ReferenceOpenHashSet pendingLogin = new ReferenceOpenHashSet<>(); // Paper + + // Paper start - optimise checkDespawn + public final List playersAffectingSpawning = new java.util.ArrayList<>(); + // Paper end - optimise checkDespawn @@ -189,10 +189,11 @@ index b779656482325416ef37d6909b01a136e7f97656..091e678a736f291b546ce1e684d4e030 + return ret; + } + // Paper end - optimise get nearest players for entity AI - ++ // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { -@@ -509,6 +586,14 @@ public class ServerLevel extends Level implements WorldGenLevel { + // Holder holder = worlddimension.typeHolder(); // CraftBukkit - decompile error +@@ -511,6 +589,14 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tick(BooleanSupplier shouldKeepTicking) { diff --git a/patches/server/0758-Optimise-WorldServer-notify.patch b/patches/server/0758-Optimise-WorldServer-notify.patch index 3ef336f5c..745e6af13 100644 --- a/patches/server/0758-Optimise-WorldServer-notify.patch +++ b/patches/server/0758-Optimise-WorldServer-notify.patch @@ -110,10 +110,10 @@ index 97ec72dc383a2637c60cfc988bca2a8a86954ffb..236ba4c1950a3cced590f520b5349eed } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 091e678a736f291b546ce1e684d4e03055734e02..1d0273a9ec5afc9287b9153a3746299a2ec9adfa 100644 +index b0c95b0af6d24b9566b82b2df54eae5108b9b48b..bd64c6d0930565785deb999f43cfaa4eaea53195 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1117,6 +1117,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1120,6 +1120,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void tickNonPassenger(Entity entity) { // Paper start - log detailed entity tick information io.papermc.paper.util.TickThread.ensureTickThread("Cannot tick an entity off-main"); @@ -121,7 +121,7 @@ index 091e678a736f291b546ce1e684d4e03055734e02..1d0273a9ec5afc9287b9153a3746299a try { if (currentlyTickingEntity.get() == null) { currentlyTickingEntity.lazySet(entity); -@@ -1634,9 +1635,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1637,9 +1638,18 @@ public class ServerLevel extends Level implements WorldGenLevel { if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) { List list = new ObjectArrayList(); @@ -142,7 +142,7 @@ index 091e678a736f291b546ce1e684d4e03055734e02..1d0273a9ec5afc9287b9153a3746299a // CraftBukkit start - fix SPIGOT-6362 Mob entityinsentient; try { -@@ -1658,16 +1668,23 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1661,16 +1671,23 @@ public class ServerLevel extends Level implements WorldGenLevel { try { this.isUpdatingNavigations = true; @@ -169,7 +169,7 @@ index 091e678a736f291b546ce1e684d4e03055734e02..1d0273a9ec5afc9287b9153a3746299a } } // Paper -@@ -2465,10 +2482,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2468,10 +2485,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingStart(Entity entity) { ServerLevel.this.entityTickList.add(entity); diff --git a/patches/server/0766-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0766-Fix-merchant-inventory-not-closing-on-entity-removal.patch index 4db712e7b..2ebc3b0fb 100644 --- a/patches/server/0766-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0766-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1d0273a9ec5afc9287b9153a3746299a2ec9adfa..856ef0c487af8e8c5689d58decc9acf8d52971c9 100644 +index bd64c6d0930565785deb999f43cfaa4eaea53195..502a11fbef542891358589f00cf4a267dca9bc9a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2573,6 +2573,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2576,6 +2576,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 652336831..b0da4e34b 100644 --- a/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1202,10 +1202,10 @@ index 97de35c614e1e9b0e825f9914173a3e1e0e53221..b35b36527294dd697d146d2ad817d791 } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d3c6c1b9ac00df265507db61301cae397214dca7..8f89c694e08db71a8e1509a102ad96defe788828 100644 +index eea9ff2418324de3d5158cce8fbe1257e2fa4e4f..bbaabf47ff303353660042609c045f2e5f4391fb 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -937,7 +937,7 @@ public abstract class PlayerList { +@@ -939,7 +939,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper diff --git a/patches/server/0821-Validate-usernames.patch b/patches/server/0821-Validate-usernames.patch index bf5280d1d..7ee4004d1 100644 --- a/patches/server/0821-Validate-usernames.patch +++ b/patches/server/0821-Validate-usernames.patch @@ -56,10 +56,10 @@ index acd581d14e0ef1fe5a6545ee67be00deff589879..553eb8e437b07376dbfc54b0018bcc3f GameProfile gameprofile = this.server.getSingleplayerProfile(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8f89c694e08db71a8e1509a102ad96defe788828..dd06ed2a72df27a6f2bd4014ec9055729e7f2773 100644 +index bbaabf47ff303353660042609c045f2e5f4391fb..774b6058553683e0e13989212b4ff8cd46239d2b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -708,7 +708,7 @@ public abstract class PlayerList { +@@ -710,7 +710,7 @@ public abstract class PlayerList { for (int i = 0; i < this.players.size(); ++i) { entityplayer = (ServerPlayer) this.players.get(i); diff --git a/patches/server/0854-Replace-player-chunk-loader-system.patch b/patches/server/0854-Replace-player-chunk-loader-system.patch index 8870e7a14..71fa99032 100644 --- a/patches/server/0854-Replace-player-chunk-loader-system.patch +++ b/patches/server/0854-Replace-player-chunk-loader-system.patch @@ -1855,10 +1855,10 @@ index 96a232f22b1c270b91635ce9c7c6cacc63b026cc..59acbf6249f8f5285504c0ddea448a34 return true; } else { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 856ef0c487af8e8c5689d58decc9acf8d52971c9..836841987ff5dd4901f75f47028a60d8d1b6e04a 100644 +index 502a11fbef542891358589f00cf4a267dca9bc9a..9dc4a1d9082a0cb3ab6848698c3fc41a5f57e380 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -677,7 +677,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -680,7 +680,7 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.push("checkDespawn"); entity.checkDespawn(); gameprofilerfiller.pop(); @@ -1867,7 +1867,7 @@ index 856ef0c487af8e8c5689d58decc9acf8d52971c9..836841987ff5dd4901f75f47028a60d8 Entity entity1 = entity.getVehicle(); if (entity1 != null) { -@@ -710,7 +710,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -713,7 +713,10 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public boolean shouldTickBlocksAt(long chunkPos) { @@ -1879,7 +1879,7 @@ index 856ef0c487af8e8c5689d58decc9acf8d52971c9..836841987ff5dd4901f75f47028a60d8 } protected void tickTime() { -@@ -2454,7 +2457,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2457,7 +2460,7 @@ public class ServerLevel extends Level implements WorldGenLevel { private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) { // Paper start - optimize is ticking ready type functions ChunkHolder chunkHolder = this.chunkSource.chunkMap.getVisibleChunkIfPresent(chunkPos); @@ -1900,7 +1900,7 @@ index b35b36527294dd697d146d2ad817d7911145ae8c..18c3d4aecf498f78040c27336d2ea56f + public final int getViewDistance() { throw new UnsupportedOperationException("Use PlayerChunkLoader"); } // Paper - placeholder } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index dd06ed2a72df27a6f2bd4014ec9055729e7f2773..a01858ee7a4419fb5b85df8863ab0052180079e3 100644 +index 774b6058553683e0e13989212b4ff8cd46239d2b..5783f5000b02a2af708ceb3dc11cd1e697c5e9d4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -274,7 +274,7 @@ public abstract class PlayerList { @@ -1912,7 +1912,7 @@ index dd06ed2a72df27a6f2bd4014ec9055729e7f2773..a01858ee7a4419fb5b85df8863ab0052 player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName()))); playerconnection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -943,8 +943,8 @@ public abstract class PlayerList { +@@ -945,8 +945,8 @@ public abstract class PlayerList { // CraftBukkit start LevelData worlddata = worldserver1.getLevelData(); entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), flag, entityplayer1.getLastDeathLocation())); @@ -1923,7 +1923,7 @@ index dd06ed2a72df27a6f2bd4014ec9055729e7f2773..a01858ee7a4419fb5b85df8863ab0052 entityplayer1.spawnIn(worldserver1); entityplayer1.unsetRemoved(); entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot())); -@@ -1513,7 +1513,7 @@ public abstract class PlayerList { +@@ -1515,7 +1515,7 @@ public abstract class PlayerList { public void setViewDistance(int viewDistance) { this.viewDistance = viewDistance; @@ -1932,7 +1932,7 @@ index dd06ed2a72df27a6f2bd4014ec9055729e7f2773..a01858ee7a4419fb5b85df8863ab0052 Iterator iterator = this.server.getAllLevels().iterator(); while (iterator.hasNext()) { -@@ -1528,7 +1528,7 @@ public abstract class PlayerList { +@@ -1530,7 +1530,7 @@ public abstract class PlayerList { public void setSimulationDistance(int simulationDistance) { this.simulationDistance = simulationDistance; @@ -2148,7 +2148,7 @@ index 1bbc73dcdf890a9383795ffeb0d368293f7146a5..c4f7aa9ffb72d2bc555ace64bb8cedc5 // Paper end - view distance api diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c569bf167addfedcb0d8c55b2d2cfcb52e05d0a6..2cf84abadc7fd7806566948d4c6e2212bdf2aeb7 100644 +index dc5ef870e23ba9497fcb9c2961334d928213f4c2..77339926519057b1c878761780ff2d6621f5ccb7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -541,45 +541,80 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0856-Force-close-world-loading-screen.patch b/patches/server/0856-Force-close-world-loading-screen.patch index d11111423..ff378640a 100644 --- a/patches/server/0856-Force-close-world-loading-screen.patch +++ b/patches/server/0856-Force-close-world-loading-screen.patch @@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to be loaded to close the loading screen, so we just send an empty one. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a01858ee7a4419fb5b85df8863ab0052180079e3..e1a5bd0ce00926078a0d2235b05e5972093044ab 100644 +index 5783f5000b02a2af708ceb3dc11cd1e697c5e9d4..569c67206ad97d198311f780e7469016366e34b5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -423,6 +423,16 @@ public abstract class PlayerList { +@@ -425,6 +425,16 @@ public abstract class PlayerList { // Paper start - move vehicle into method so it can be called above - short circuit around that code onPlayerJoinFinish(player, worldserver1, s1); diff --git a/patches/server/0860-Fix-save-problems-on-shutdown.patch b/patches/server/0860-Fix-save-problems-on-shutdown.patch index b022788b8..4ae525c1f 100644 --- a/patches/server/0860-Fix-save-problems-on-shutdown.patch +++ b/patches/server/0860-Fix-save-problems-on-shutdown.patch @@ -12,7 +12,7 @@ Subject: [PATCH] Fix save problems on shutdown processed so that the main process queue can be drained diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dca520534feac302b8e0f389ee9286bd719e31a6..33cf037bf8ed5ea88f52ee3731cde63c70e813ef 100644 +index df08b7afcf19ce694a87c25e8589c0c72521c5db..4d920031300a9801debc2eb39a4d3cb9d8fbb330 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -957,6 +957,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop