From e208af9741b0a78d25dc6290b42e1b52aee9803f Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Wed, 24 Nov 2021 02:04:30 -0800 Subject: [PATCH] patches --- .../0191-Add-tick-times-API.patch} | 8 ++--- ...92-Expose-MinecraftServer-isRunning.patch} | 8 ++--- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 0 ...ts-firing-Async-errors-during-shutd.patch} | 4 +-- ...5-Make-JavaPluginLoader-thread-safe.patch} | 2 +- ...rbose-world-setting-to-false-by-def.patch} | 2 +- ...Add-tick-times-API-and-mspt-command.patch} | 14 ++++---- ...82-Expose-MinecraftServer-isRunning.patch} | 4 +-- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 2 +- ...pawn-settings-and-per-player-option.patch} | 32 ++++++------------- ...nections-shouldn-t-hold-up-shutdown.patch} | 4 +-- ...ow-bees-to-load-chunks-for-beehives.patch} | 10 +++--- ...PlayerChunkMap-adds-crashing-server.patch} | 10 +++--- .../0388-Don-t-tick-dead-players.patch} | 4 +-- ...-Player-s-shouldn-t-be-able-to-move.patch} | 4 +-- ...ove-existing-players-to-world-spawn.patch} | 12 +++---- 16 files changed, 53 insertions(+), 67 deletions(-) rename patches/{unapplied/api/0192-Add-tick-times-API.patch => api/0191-Add-tick-times-API.patch} (84%) rename patches/{unapplied/api/0193-Expose-MinecraftServer-isRunning.patch => api/0192-Expose-MinecraftServer-isRunning.patch} (81%) rename patches/{unapplied/api/0194-Add-Raw-Byte-ItemStack-Serialization.patch => api/0193-Add-Raw-Byte-ItemStack-Serialization.patch} (100%) rename patches/{unapplied/api/0195-Disable-Sync-Events-firing-Async-errors-during-shutd.patch => api/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch} (88%) rename patches/{unapplied/api/0196-Make-JavaPluginLoader-thread-safe.patch => api/0195-Make-JavaPluginLoader-thread-safe.patch} (96%) rename patches/{unapplied/server/0563-Set-spigots-verbose-world-setting-to-false-by-def.patch => server/0380-Set-spigots-verbose-world-setting-to-false-by-def.patch} (89%) rename patches/{unapplied/server/0397-Add-tick-times-API-and-mspt-command.patch => server/0381-Add-tick-times-API-and-mspt-command.patch} (91%) rename patches/{unapplied/server/0398-Expose-MinecraftServer-isRunning.patch => server/0382-Expose-MinecraftServer-isRunning.patch} (83%) rename patches/{unapplied/server/0399-Add-Raw-Byte-ItemStack-Serialization.patch => server/0383-Add-Raw-Byte-ItemStack-Serialization.patch} (96%) rename patches/{unapplied/server/0389-Pillager-patrol-spawn-settings-and-per-player-option.patch => server/0384-Pillager-patrol-spawn-settings-and-per-player-option.patch} (79%) rename patches/{unapplied/server/0390-Remote-Connections-shouldn-t-hold-up-shutdown.patch => server/0385-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (86%) rename patches/{unapplied/server/0391-Do-not-allow-bees-to-load-chunks-for-beehives.patch => server/0386-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (85%) rename patches/{unapplied/server/0392-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => server/0387-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (87%) rename patches/{unapplied/server/0394-Don-t-tick-dead-players.patch => server/0388-Don-t-tick-dead-players.patch} (85%) rename patches/{unapplied/server/0395-Dead-Player-s-shouldn-t-be-able-to-move.patch => server/0389-Dead-Player-s-shouldn-t-be-able-to-move.patch} (84%) rename patches/{unapplied/server/0396-Don-t-move-existing-players-to-world-spawn.patch => server/0390-Don-t-move-existing-players-to-world-spawn.patch} (80%) diff --git a/patches/unapplied/api/0192-Add-tick-times-API.patch b/patches/api/0191-Add-tick-times-API.patch similarity index 84% rename from patches/unapplied/api/0192-Add-tick-times-API.patch rename to patches/api/0191-Add-tick-times-API.patch index 191e9f1ca8..4b4b3793bb 100644 --- a/patches/unapplied/api/0192-Add-tick-times-API.patch +++ b/patches/api/0191-Add-tick-times-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add tick times API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index caa3d77b5906a2227f6409a877bd0ba14d05caba..411d06b14a0892531ac578e51d0b166f670adbd6 100644 +index 8580bc20e24c3bde5b57f0727f79051c9d7d0f2e..a5f1191abb99a63dc2e20ef59688e4df30e12f67 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1720,6 +1720,25 @@ public final class Bukkit { +@@ -1734,6 +1734,25 @@ public final class Bukkit { public static double[] getTPS() { return server.getTPS(); } @@ -35,10 +35,10 @@ index caa3d77b5906a2227f6409a877bd0ba14d05caba..411d06b14a0892531ac578e51d0b166f /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index bf1920857008c272d557f602544009986c3ed284..1cabf4de832b60abae8c25c0d80d409e8fa727cc 100644 +index b765aa35680e67bb919c020b54830ee5aca9d27f..0c5776e05e53802c45caea39002828507155fed5 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1460,6 +1460,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1472,6 +1472,21 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull public double[] getTPS(); diff --git a/patches/unapplied/api/0193-Expose-MinecraftServer-isRunning.patch b/patches/api/0192-Expose-MinecraftServer-isRunning.patch similarity index 81% rename from patches/unapplied/api/0193-Expose-MinecraftServer-isRunning.patch rename to patches/api/0192-Expose-MinecraftServer-isRunning.patch index 77c11d43f8..88f637c9f4 100644 --- a/patches/unapplied/api/0193-Expose-MinecraftServer-isRunning.patch +++ b/patches/api/0192-Expose-MinecraftServer-isRunning.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 411d06b14a0892531ac578e51d0b166f670adbd6..796f72b1026371fff09e8ce60536d30609987449 100644 +index a5f1191abb99a63dc2e20ef59688e4df30e12f67..ddaee386c6039eabb349481c2a66ec1292d0bfde 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1998,6 +1998,15 @@ public final class Bukkit { +@@ -2012,6 +2012,15 @@ public final class Bukkit { public static int getCurrentTick() { return server.getCurrentTick(); } @@ -26,10 +26,10 @@ index 411d06b14a0892531ac578e51d0b166f670adbd6..796f72b1026371fff09e8ce60536d306 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 1cabf4de832b60abae8c25c0d80d409e8fa727cc..552b56995ffb0898ffd459e0175af57341f39f46 100644 +index 0c5776e05e53802c45caea39002828507155fed5..dd263faad52612a076847c717582e8fc09dc3345 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1754,5 +1754,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1766,5 +1766,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi * @return Current tick */ int getCurrentTick(); diff --git a/patches/unapplied/api/0194-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/api/0193-Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from patches/unapplied/api/0194-Add-Raw-Byte-ItemStack-Serialization.patch rename to patches/api/0193-Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/patches/unapplied/api/0195-Disable-Sync-Events-firing-Async-errors-during-shutd.patch b/patches/api/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch similarity index 88% rename from patches/unapplied/api/0195-Disable-Sync-Events-firing-Async-errors-during-shutd.patch rename to patches/api/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch index 6018c18f9b..a4cbc753e9 100644 --- a/patches/unapplied/api/0195-Disable-Sync-Events-firing-Async-errors-during-shutd.patch +++ b/patches/api/0194-Disable-Sync-Events-firing-Async-errors-during-shutd.patch @@ -11,10 +11,10 @@ errors. This isn't an issue on Spigot diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index a3027c1c6109bcb20d0468f6d0cd37182bb279ea..20b4ef7a94e00d9264b8ecc126ce5853b584ea8c 100644 +index 3457dd6a86f927dd38edd200121aad5364d8abd5..0d9d729a18b5388b06ab0a3749e55f91f838be88 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -595,7 +595,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -605,7 +605,7 @@ public final class SimplePluginManager implements PluginManager { // Paper - replace callEvent by merging to below method if (event.isAsynchronous() && server.isPrimaryThread()) { throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously."); diff --git a/patches/unapplied/api/0196-Make-JavaPluginLoader-thread-safe.patch b/patches/api/0195-Make-JavaPluginLoader-thread-safe.patch similarity index 96% rename from patches/unapplied/api/0196-Make-JavaPluginLoader-thread-safe.patch rename to patches/api/0195-Make-JavaPluginLoader-thread-safe.patch index be66a6a695..4b07e4519d 100644 --- a/patches/unapplied/api/0196-Make-JavaPluginLoader-thread-safe.patch +++ b/patches/api/0195-Make-JavaPluginLoader-thread-safe.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make JavaPluginLoader thread-safe diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index f26303315c9c93356f0b04440136855dd54d32b7..ce751577623eaad0f31e2eb7bf0842d1ab73e845 100644 +index 922bb2cbfaf1e4cd111b7ad286c867c4d9f47e05..4397fed2b41e5ab444aa7e3c9b5d7dccc50f4e04 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -52,6 +52,8 @@ import org.yaml.snakeyaml.error.YAMLException; diff --git a/patches/unapplied/server/0563-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0380-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 89% rename from patches/unapplied/server/0563-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0380-Set-spigots-verbose-world-setting-to-false-by-def.patch index 814f2805e2..8fb045eb94 100644 --- a/patches/unapplied/server/0563-Set-spigots-verbose-world-setting-to-false-by-def.patch +++ b/patches/server/0380-Set-spigots-verbose-world-setting-to-false-by-def.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Set spigots verbose world setting to false by def diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java -index 769a492305a3ce83e0da0b3de4ebd73859d1e1d9..c931a46650ba4857805bbfa126c75a9b86b1d707 100644 +index 6d36aa5006d3adc3ff30d196bdfd287ad38a564a..3de37f8eb99a41a8d99f22ed0afc81f44254f1d2 100644 --- a/src/main/java/org/spigotmc/SpigotWorldConfig.java +++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java @@ -20,7 +20,7 @@ public class SpigotWorldConfig diff --git a/patches/unapplied/server/0397-Add-tick-times-API-and-mspt-command.patch b/patches/server/0381-Add-tick-times-API-and-mspt-command.patch similarity index 91% rename from patches/unapplied/server/0397-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0381-Add-tick-times-API-and-mspt-command.patch index a9131c8cef..d414178ee3 100644 --- a/patches/unapplied/server/0397-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0381-Add-tick-times-API-and-mspt-command.patch @@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..d0211d4f39f9d6af1d751ac66342b42c + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 217779a280b70ba5b3bbe1f5412dd149c12b40fa..4bdc154ce5b91c3d5c4b5dc63ff32a7fe094bd37 100644 +index 4875e323e8ba52cf91259262b8418310061718ad..a074df5708624bd4b0bc2ad3dcbd4bc4ff737595 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -69,6 +69,7 @@ public class PaperConfig { @@ -87,10 +87,10 @@ index 217779a280b70ba5b3bbe1f5412dd149c12b40fa..4bdc154ce5b91c3d5c4b5dc63ff32a7f version = getInt("config-version", 24); set("config-version", 24); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 9683c29c583e8b7e4f41d088160455714033a135..5edbb9132d2895da2b693fe35d4a25000982b636 100644 +index 758a972589b607447dc507c6c4f4b2a62f6a2832..56682365381d34784b63d36ab50a1deedfb73e74 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -248,6 +248,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 140014d0eb3b70f8415484afc36f700fd737d9d9..89e88a1de65a5724d05e926cd41733c9cd6cd740 100644 +index 1ac40d31c5abefb062886757a78adc65daede768..cdacb26699a54659d1e43ec0f73640556a743700 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2149,7 +2149,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2167,7 +2167,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -38,7 +38,7 @@ index 140014d0eb3b70f8415484afc36f700fd737d9d9..89e88a1de65a5724d05e926cd41733c9 if (entity instanceof ServerPlayer) { ServerLevel.this.players.add((ServerPlayer) entity); ServerLevel.this.updateSleepingPlayerList(); -@@ -2171,6 +2171,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2189,6 +2189,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } entity.valid = true; // CraftBukkit diff --git a/patches/unapplied/server/0394-Don-t-tick-dead-players.patch b/patches/server/0388-Don-t-tick-dead-players.patch similarity index 85% rename from patches/unapplied/server/0394-Don-t-tick-dead-players.patch rename to patches/server/0388-Don-t-tick-dead-players.patch index 85b1f297aa..2bfc8b4078 100644 --- a/patches/unapplied/server/0394-Don-t-tick-dead-players.patch +++ b/patches/server/0388-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index bbc8f7909b6ae8452a8f3c697bfba92d0170dbe1..ce5efb4bf439005d8a25aff1607238389e856cd8 100644 +index 06d13cca9179156a14571785e8ed3c4d8f956ccd..fd609c7b757b570206c17444867f786c1767aa69 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -638,7 +638,7 @@ public class ServerPlayer extends Player { +@@ -643,7 +643,7 @@ public class ServerPlayer extends Player { public void doTick() { try { diff --git a/patches/unapplied/server/0395-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0389-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from patches/unapplied/server/0395-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0389-Dead-Player-s-shouldn-t-be-able-to-move.patch index 7a4bf27b80..5a142a9321 100644 --- a/patches/unapplied/server/0395-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0389-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 19b5538e54f1c6073c3478393c1388ffca33291e..e9db4d972abfd7807137e32abc8b1096be4776b5 100644 +index 6927eeb04a9aa1a33666f3655f2bb889bf046dc9..869c765fba6b8b7f37f0699a05b74b312dfde30d 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1104,7 +1104,7 @@ public abstract class Player extends LivingEntity { +@@ -1106,7 +1106,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/unapplied/server/0396-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0390-Don-t-move-existing-players-to-world-spawn.patch similarity index 80% rename from patches/unapplied/server/0396-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0390-Don-t-move-existing-players-to-world-spawn.patch index b66c23f309..9a479dbfce 100644 --- a/patches/unapplied/server/0396-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0390-Don-t-move-existing-players-to-world-spawn.patch @@ -10,19 +10,19 @@ larger than the keep loaded range. By skipping this, we avoid potential for a large spike on server start. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ce5efb4bf439005d8a25aff1607238389e856cd8..642ef5b0b6660f4fbee91c46c016125960bb9e9d 100644 +index fd609c7b757b570206c17444867f786c1767aa69..d507adcb538933fcf36e9a4bfb561106d509c26f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -310,7 +310,7 @@ public class ServerPlayer extends Player { - this.stats = server.getPlayerList().getStatisticManager(this); +@@ -313,7 +313,7 @@ public class ServerPlayer extends Player { + this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); this.maxUpStep = 1.0F; - this.fudgeSpawnLocation(world); -+ //this.c(worldserver); // Paper - don't move to spawn on login, only first join ++ //this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -528,7 +528,7 @@ public class ServerPlayer extends Player { +@@ -531,7 +531,7 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos()); } this.level = world; @@ -32,7 +32,7 @@ index ce5efb4bf439005d8a25aff1607238389e856cd8..642ef5b0b6660f4fbee91c46c0161259 this.gameMode.setLevel((ServerLevel) world); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b828d6b2ce20a058acbabba5594e743d91df3060..6f3187aae34c24c6a9b22074d487006926afe524 100644 +index 494b18a3dfa05b5e6ecbb9b99abf06bfe6e1d166..af93692bb5cc232397cec69ce2bd836a956550ef 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -210,6 +210,8 @@ public abstract class PlayerList {