From e234432bd99e1c4b07c24d1dd247977226a7516a Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:13:38 +0800 Subject: [PATCH] Update Paper --- gradle.properties | 2 +- patches/api/0007-Delete-Timings.patch | 46 +++++++++---------- .../api/0008-Force-peaceful-mode-switch.patch | 4 +- patches/api/0010-Bytebuf-API.patch | 4 +- patches/server/0001-Build-changes.patch | 6 +-- patches/server/0003-Delete-Timings.patch | 29 ++++++------ .../0005-Update-version-fetcher-repo.patch | 4 +- ...006-Leaves-Server-Config-And-Command.patch | 10 ++-- .../server/0007-Leaves-Protocol-Core.patch | 8 ++-- patches/server/0011-Fakeplayer-support.patch | 8 ++-- ...Add-isShrink-to-EntityResurrectEvent.patch | 6 +-- .../server/0022-Optimize-suffocation.patch | 2 +- ...timize-random-calls-in-chunk-ticking.patch | 4 +- ...28-Config-to-disable-method-profiler.patch | 2 +- ...-Cache-climbing-check-for-activation.patch | 4 +- .../server/0046-Stackable-ShulkerBoxes.patch | 2 +- .../0049-Return-nether-portal-fix.patch | 2 +- .../0052-Leaves-Extra-Yggdrasil-Service.patch | 2 +- .../0054-Fix-update-suppression-crash.patch | 2 +- patches/server/0055-Bedrock-break-list.patch | 2 +- .../server/0073-No-block-update-command.patch | 2 +- .../0089-Reduce-array-allocations.patch | 8 ++-- ...ck-frozen-ticks-before-landing-block.patch | 2 +- .../0103-Force-peaceful-mode-switch.patch | 12 ++--- patches/server/0105-Replay-Mod-API.patch | 12 ++--- .../0123-Linear-region-file-format.patch | 4 +- patches/server/0130-Fast-resume.patch | 2 +- patches/server/0135-Bytebuf-API.patch | 10 ++-- 28 files changed, 98 insertions(+), 103 deletions(-) diff --git a/gradle.properties b/gradle.properties index 08bd5d69..eaf5a5b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,6 @@ version=1.20.6-R0.1-SNAPSHOT mcVersion=1.20.6 org.gradle.jvmargs=-Xmx2G -paperRef=bd5867a96f792f0eb32c1d249bb4bbc1d8338d14 +paperRef=79e2cb620ef03539390d97940824b38b707918f5 preVersion=false updatingMinecraft=true \ No newline at end of file diff --git a/patches/api/0007-Delete-Timings.patch b/patches/api/0007-Delete-Timings.patch index ffd82f83..72a2a222 100644 --- a/patches/api/0007-Delete-Timings.patch +++ b/patches/api/0007-Delete-Timings.patch @@ -720,11 +720,10 @@ index 199789d56d22fcb1b77ebd56805cc28aa5a5ab0a..00000000000000000000000000000000 - } -} diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java -deleted file mode 100644 -index 02e88db63be2d5e31da6b65157ba7b971b1f10f3..0000000000000000000000000000000000000000 +index 2d87237ea99d42c6ce896d52a1b2e5c3ec4d4568..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/src/main/java/co/aikar/timings/TimingHistory.java -+++ /dev/null -@@ -1,355 +0,0 @@ ++++ b/src/main/java/co/aikar/timings/TimingHistory.java +@@ -1,352 +0,0 @@ -/* - * This file is licensed under the MIT License (MIT). - * @@ -878,17 +877,14 @@ index 02e88db63be2d5e31da6b65157ba7b971b1f10f3..00000000000000000000000000000000 - } - } - ), -- toObjectMapper(input.tileEntityCounts.entrySet(), -- new Function, JSONPair>() { -- @NotNull -- @Override -- public JSONPair apply(Map.Entry entry) { -- tileEntityTypeSet.add(entry.getKey()); -- return pair( -- String.valueOf(entry.getKey().ordinal()), -- entry.getValue().count() -- ); -- } +- toObjectMapper( +- input.tileEntityCounts.entrySet(), +- entry -> { +- tileEntityTypeSet.add(entry.getKey()); +- return pair( +- String.valueOf(entry.getKey().ordinal()), +- entry.getValue().count() +- ); - } - ) - ); @@ -2114,10 +2110,10 @@ index abe256e1e45ce28036da4aa1586715bc8a1a3414..b359306500e640f4b0761ae9aa996cf6 } diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..014f9c30440981d251e54b289682015baae1fe90 100644 +index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..940565704d0e8914a76cf25daf7d1f5ecd99bad4 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java -@@ -38,7 +38,6 @@ public class SimpleCommandMap implements CommandMap { +@@ -39,7 +39,6 @@ public class SimpleCommandMap implements CommandMap { register("bukkit", new VersionCommand("version")); register("bukkit", new ReloadCommand("reload")); //register("bukkit", new PluginsCommand("plugins")); // Paper @@ -2125,15 +2121,15 @@ index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..014f9c30440981d251e54b289682015b } public void setFallbackCommands() { -@@ -70,7 +69,6 @@ public class SimpleCommandMap implements CommandMap { +@@ -71,7 +70,6 @@ public class SimpleCommandMap implements CommandMap { */ @Override public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) { - command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper - label = label.toLowerCase(java.util.Locale.ENGLISH).trim(); - fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim(); + label = label.toLowerCase(Locale.ROOT).trim(); + fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim(); boolean registered = register(label, command, false, fallbackPrefix); -@@ -152,17 +150,9 @@ public class SimpleCommandMap implements CommandMap { +@@ -153,17 +151,9 @@ public class SimpleCommandMap implements CommandMap { return false; } @@ -2152,10 +2148,10 @@ index c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1..014f9c30440981d251e54b289682015b server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper //target.timings.stopTiming(); // Spigot // Paper diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 07a9c9e254188c251165ca84c8e961fccda01175..9eb02f8fb4d581349c4752ccb396dc4fdbd940c3 100644 +index 003bece642b682985625db93cad93026352bfc66..308245714a0a830d92568f7bb1f4bb9c45828345 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -719,12 +719,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -720,12 +720,7 @@ public final class SimplePluginManager implements PluginManager { throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled"); } @@ -2169,7 +2165,7 @@ index 07a9c9e254188c251165ca84c8e961fccda01175..9eb02f8fb4d581349c4752ccb396dc4f } @NotNull -@@ -954,8 +949,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -955,8 +950,7 @@ public final class SimplePluginManager implements PluginManager { @Override public boolean useTimings() { @@ -2179,7 +2175,7 @@ index 07a9c9e254188c251165ca84c8e961fccda01175..9eb02f8fb4d581349c4752ccb396dc4f } /** -@@ -964,7 +958,6 @@ public final class SimplePluginManager implements PluginManager { +@@ -965,7 +959,6 @@ public final class SimplePluginManager implements PluginManager { * @param use True if per event timing code should be used */ public void useTimings(boolean use) { diff --git a/patches/api/0008-Force-peaceful-mode-switch.patch b/patches/api/0008-Force-peaceful-mode-switch.patch index 421ce42a..9bbff199 100644 --- a/patches/api/0008-Force-peaceful-mode-switch.patch +++ b/patches/api/0008-Force-peaceful-mode-switch.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 26622cafbb9811fafe18d5dd9b25f56960154772..260704ce884e7549279d8744524b18993661b6fa 100644 +index fdb87adfb8d6eff2bfabe7a41398c53d15d4cd98..531a6cae97fe2a415cf906108a0899bf04e613d8 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4317,6 +4317,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4344,6 +4344,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient void setSendViewDistance(int viewDistance); // Paper end - view distance api diff --git a/patches/api/0010-Bytebuf-API.patch b/patches/api/0010-Bytebuf-API.patch index 0650c9f9..6c3e5cfd 100644 --- a/patches/api/0010-Bytebuf-API.patch +++ b/patches/api/0010-Bytebuf-API.patch @@ -35,10 +35,10 @@ index 98ca0f656ea3a5be30ad49bc7fb22c886adbef03..79ad3c362e5437b28e44270a9c7b8947 + // Leaves end - Bytebuf API } diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index f2e1b98880503a9933a20ebcf0ba91413c859a08..ee8bcc5b50bff84b18abed6f5e82c55899367827 100644 +index eb34f22e973fe46529eb93f435f5bf7f85091404..ba79992f0c170ab1c0db402698feb5071fe8cf62 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -3802,6 +3802,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM +@@ -3850,6 +3850,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM boolean isChunkSent(long chunkKey); // Paper end diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index 65c8e4c6..74a8c3f3 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -164,7 +164,7 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..c060857cb0551fff8f5033553b887f3a private static final String BUILD_DEV = "DEV"; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0ed42fa899721f83b598db05be1b5f321af3614a..9cd75d163e81f812e8dcd3c010b4a715d2bcf804 100644 +index 3751c2a077bd13bac330b93c6efc2a640a17f4f2..2235e5cfd853216fd79cf26244f9f029af1fc3b4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1165,7 +1165,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop waitable = new Waitable<>() { - @Override @@ -1222,7 +1222,7 @@ index 7fb9ba3dadb1eca4a1000ea8cf4d13fed2b7db1e..dc20b051d4f14ce4e0b5a0114e02d157 } diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126b9b7b190 100644 +index fcecfda569d2a8d6b8a7e228831f822fb7327748..ffab3e27c0d9da2a380a14b6f6ebb243a6fb5e8d 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -274,10 +274,8 @@ public class ServerChunkCache extends ChunkSource { @@ -1255,13 +1255,12 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126 } // Paper end - Incremental chunk and player saving -@@ -472,26 +466,21 @@ public class ServerChunkCache extends ChunkSource { +@@ -472,26 +466,20 @@ public class ServerChunkCache extends ChunkSource { @Override public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) { this.level.getProfiler().push("purge"); - this.level.timings.doChunkMap.startTiming(); // Spigot -+ // this.level.timings.doChunkMap.startTiming(); // Spigot // Leaves - delete Timings - if (this.level.tickRateManager().runsNormally() || !tickChunks) { + if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot this.distanceManager.purgeStaleTickets(); } @@ -1283,7 +1282,7 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126 this.level.getProfiler().pop(); this.clearCache(); } -@@ -507,13 +496,11 @@ public class ServerChunkCache extends ChunkSource { +@@ -507,13 +495,11 @@ public class ServerChunkCache extends ChunkSource { gameprofilerfiller.push("pollingChunks"); gameprofilerfiller.push("filteringLoadedChunks"); // Paper - optimise chunk tick iteration @@ -1297,7 +1296,7 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126 int k = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns int naturalSpawnChunkCount = k; -@@ -538,7 +525,6 @@ public class ServerChunkCache extends ChunkSource { +@@ -538,7 +524,6 @@ public class ServerChunkCache extends ChunkSource { spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false); } // Paper end - Optional per player mob spawns @@ -1305,7 +1304,7 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126 this.lastSpawnState = spawnercreature_d; gameprofilerfiller.popPush("spawnAndTick"); -@@ -647,19 +633,14 @@ public class ServerChunkCache extends ChunkSource { +@@ -647,19 +632,14 @@ public class ServerChunkCache extends ChunkSource { } } // Paper end - optimise chunk tick iteration @@ -1325,7 +1324,7 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..256ad83f10e6df5d32959d38eeabc126 // Paper start - optimise chunk tick iteration if (!this.chunkMap.needsChangeBroadcasting.isEmpty()) { it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet copy = this.chunkMap.needsChangeBroadcasting.clone(); -@@ -673,8 +654,6 @@ public class ServerChunkCache extends ChunkSource { +@@ -673,8 +653,6 @@ public class ServerChunkCache extends ChunkSource { } } // Paper end - optimise chunk tick iteration @@ -1588,7 +1587,7 @@ index a46bf73c608641bf1f00fd55242de71a0f2ee06e..9b15a2a966de203ada8894a9354ff8e0 return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ce01fe82dc1eaaf06ca317ddbc62b7d1b87a48b2..4506a2fe4e55e8372b71650f019c810998a69a33 100644 +index 21e61bb75ac7ce468bc757633ce678b21bcb9deb..5b5d8d2430f2b92f56ea3fb0e9a35aa4b9aea48f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -150,7 +150,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -1816,7 +1815,7 @@ index 14ee7b5b9b804bebd4e2a846b238547a28a36035..33673bde99023af6a136270091959cca } } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 9164d33b564970d83d11c6544db5697ff9eff32f..361763f59b33fdacbfe2523eb7a0fa0840fa7439 100644 +index 1155fc80c0292c8d7efb21dbac3d984176fcaa2d..77dc69ecec095b4d4129913846a12e5c86f21df5 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -346,8 +346,8 @@ public class Main { @@ -1974,10 +1973,10 @@ index b3e1adeb932da9b3bed16acd94e2f16da48a7c72..e9798517b9211c50a20ea5c69603aab3 } } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 4788a591f40f506d81b10fd9f6ab68f308a68e23..b39f7aa828b08d8403278700bf44a086af53fa78 100644 +index f99353a60e3f236735ef6e2e6f13381b50ae9b7b..5e42a3392fa03813e3e58e80299625993c560396 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -219,7 +219,6 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -220,7 +220,6 @@ public final class CraftMagicNumbers implements UnsafeValues { // Paper start @Override public void reportTimings() { diff --git a/patches/server/0005-Update-version-fetcher-repo.patch b/patches/server/0005-Update-version-fetcher-repo.patch index 5d63340b..2d24d9cc 100644 --- a/patches/server/0005-Update-version-fetcher-repo.patch +++ b/patches/server/0005-Update-version-fetcher-repo.patch @@ -27,10 +27,10 @@ index 532306cacd52579cdf37e4aca25887b1ed3ba6a1..917ffaae401f3374d07d7fb7c024234a if (data == null) { return null; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index b39f7aa828b08d8403278700bf44a086af53fa78..db0e4b9bb8509727f924e0eb3ad007ebca423315 100644 +index 5e42a3392fa03813e3e58e80299625993c560396..1fed83a95ae6f3fc805fe5c2e303f4089de194e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -502,7 +502,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -503,7 +503,7 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { diff --git a/patches/server/0006-Leaves-Server-Config-And-Command.patch b/patches/server/0006-Leaves-Server-Config-And-Command.patch index 492803ab..c978141e 100644 --- a/patches/server/0006-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0006-Leaves-Server-Config-And-Command.patch @@ -24,7 +24,7 @@ index 16b742b5131376ceca04570dd4c088caff62e677..fe1f6f1a97ab35c44f596596d16765b8 description = "Spin up a test server from the Mojang mapped bundler jar" classpath(rootProject.tasks.named("createMojmapBundlerJar").flatMap { it.outputZip }) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 026dc226ace6b067df8987f10039d4c037c47124..421b67ab81330975f6404578ffcc57feb0c9c0be 100644 +index 1f973ed9bb9c753b81979085a6fea45b65165fa3..59cc1855d5bebbcaa8f6afc39e91ae0698adcf73 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1147,6 +1147,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper - Ability to control player's insomnia and phantoms BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21)); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 196ab702e5413612632afe945253ed8d00817893..6d85a6444332598bd7efc5832f4c3530e0a19e7d 100644 +index d58f59b7079cb2cfe3e58391ea3a3576aa030542..a75f5cf9dc6044a3778106adf0c325c1a563e302 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -305,6 +305,7 @@ public final class CraftServer implements Server { +@@ -307,6 +307,7 @@ public final class CraftServer implements Server { public static Exception excessiveVelEx; // Paper - Velocity warnings private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes @@ -364,7 +364,7 @@ index 196ab702e5413612632afe945253ed8d00817893..6d85a6444332598bd7efc5832f4c3530 // Paper start - Folia region threading API private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler(); -@@ -3268,4 +3269,11 @@ public final class CraftServer implements Server { +@@ -3291,4 +3292,11 @@ public final class CraftServer implements Server { return this.potionBrewer; } // Paper end diff --git a/patches/server/0014-Add-isShrink-to-EntityResurrectEvent.patch b/patches/server/0014-Add-isShrink-to-EntityResurrectEvent.patch index 976aa1cf..e8c3dbdb 100644 --- a/patches/server/0014-Add-isShrink-to-EntityResurrectEvent.patch +++ b/patches/server/0014-Add-isShrink-to-EntityResurrectEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4506a2fe4e55e8372b71650f019c810998a69a33..f0834ff3de84f91ae32efcc548f993ee92aefe83 100644 +index 5b5d8d2430f2b92f56ea3fb0e9a35aa4b9aea48f..f6bff4eb349f51a20516aecb010d19d5f625575e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1648,12 +1648,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1642,12 +1642,12 @@ public abstract class LivingEntity extends Entity implements Attackable { } org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null; @@ -23,7 +23,7 @@ index 4506a2fe4e55e8372b71650f019c810998a69a33..f0834ff3de84f91ae32efcc548f993ee itemstack1.shrink(1); } if (itemstack != null && this instanceof ServerPlayer) { -@@ -4552,3 +4552,4 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -4546,3 +4546,4 @@ public abstract class LivingEntity extends Entity implements Attackable { } } diff --git a/patches/server/0022-Optimize-suffocation.patch b/patches/server/0022-Optimize-suffocation.patch index 3eaaa2fd..0f30bbf1 100644 --- a/patches/server/0022-Optimize-suffocation.patch +++ b/patches/server/0022-Optimize-suffocation.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize suffocation This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f0834ff3de84f91ae32efcc548f993ee92aefe83..84356052f4a5b821e54f8e7b60e904ef68947968 100644 +index f6bff4eb349f51a20516aecb010d19d5f625575e..8d3ed01ba207900aeaa38f3b4f7a51a277b5686b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -426,7 +426,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0025-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0025-Optimize-random-calls-in-chunk-ticking.patch index 4e5926b1..e6fa76be 100644 --- a/patches/server/0025-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0025-Optimize-random-calls-in-chunk-ticking.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize random calls in chunk ticking This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 256ad83f10e6df5d32959d38eeabc126b9b7b190..db41ee04b5dd3e162830342e4b1f2b457ffb7fed 100644 +index ffab3e27c0d9da2a380a14b6f6ebb243a6fb5e8d..6636bdc58be30f89cc52086f6741490fc9cb1653 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -494,6 +494,11 @@ public class ServerChunkCache extends ChunkSource { +@@ -493,6 +493,11 @@ public class ServerChunkCache extends ChunkSource { ProfilerFiller gameprofilerfiller = this.level.getProfiler(); gameprofilerfiller.push("pollingChunks"); diff --git a/patches/server/0028-Config-to-disable-method-profiler.patch b/patches/server/0028-Config-to-disable-method-profiler.patch index 5cc3ade4..0f514349 100644 --- a/patches/server/0028-Config-to-disable-method-profiler.patch +++ b/patches/server/0028-Config-to-disable-method-profiler.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Config to disable method profiler This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 24362501292e61c5d1f17917f27095b6a56b661c..ee22bcbe2f64cac2d22328d9abb3c91c2263fb2e 100644 +index c671f0ffae3c54290f8cff233306a1cd91aa9ffe..b22d0b0a2cb7e877875739abd87a3beac977c82a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2530,6 +2530,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop collectEquipmentChanges() { Map map = null; @@ -441,10 +441,10 @@ index f38acc96f71298e40ce9433e7759fd223ca55e48..03652ec451109d2026fc313f143d78d4 for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index f33088fa895e36dcaf6e96c52aacd5545b657a5a..6e717e2fd606514c8e114babcb083393e00e5fb6 100644 +index 0522368deaa13f13fad4e2f00346f3910a064618..99acee6f58ac532694859cf0a71c56f3ef8b402b 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -1104,7 +1104,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -1111,7 +1111,7 @@ public final class ItemStack implements DataComponentHolder { ItemAttributeModifiers itemattributemodifiers = (ItemAttributeModifiers) this.getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY); if (itemattributemodifiers.showInTooltip()) { diff --git a/patches/server/0094-Check-frozen-ticks-before-landing-block.patch b/patches/server/0094-Check-frozen-ticks-before-landing-block.patch index 27d944e2..f74e708d 100644 --- a/patches/server/0094-Check-frozen-ticks-before-landing-block.patch +++ b/patches/server/0094-Check-frozen-ticks-before-landing-block.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Check frozen ticks before landing block This patch is Powered by Gale(https://github.com/GaleMC/Gale) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 38e05e3ea71300eaeaf4a2a5d5a13121b3f85aee..23e7fea1e52fe9a3d0dae4735d1bf66effad50b5 100644 +index 8bfbe0b23a1bba49b4c96425dd10eee1153a5697..a92dacce023b4f4c88e70a1f70812e5a4458a0e3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -593,11 +593,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0103-Force-peaceful-mode-switch.patch b/patches/server/0103-Force-peaceful-mode-switch.patch index 5fbbaa92..cbac7b9d 100644 --- a/patches/server/0103-Force-peaceful-mode-switch.patch +++ b/patches/server/0103-Force-peaceful-mode-switch.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Force peaceful mode switch diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index db41ee04b5dd3e162830342e4b1f2b457ffb7fed..c402a51a0951ad775cd7829f442edb8cf779d5ee 100644 +index 6636bdc58be30f89cc52086f6741490fc9cb1653..f4d599bf00a6eaebf2f5edf503c4917df8a6a9cd 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -75,6 +75,12 @@ public class ServerChunkCache extends ChunkSource { @@ -21,7 +21,7 @@ index db41ee04b5dd3e162830342e4b1f2b457ffb7fed..c402a51a0951ad775cd7829f442edb8c public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory) { this.level = world; this.mainThreadProcessor = new ServerChunkCache.MainThreadExecutor(world); -@@ -500,7 +506,21 @@ public class ServerChunkCache extends ChunkSource { +@@ -499,7 +505,21 @@ public class ServerChunkCache extends ChunkSource { } // Leaves end - reset ice & snow tick random gameprofilerfiller.push("filteringLoadedChunks"); @@ -44,7 +44,7 @@ index db41ee04b5dd3e162830342e4b1f2b457ffb7fed..c402a51a0951ad775cd7829f442edb8c // Paper - optimise chunk tick iteration -@@ -588,10 +608,20 @@ public class ServerChunkCache extends ChunkSource { +@@ -587,10 +607,20 @@ public class ServerChunkCache extends ChunkSource { } Util.shuffle(shuffled, this.level.random); chunkIterator = shuffled.iterator(); @@ -68,7 +68,7 @@ index db41ee04b5dd3e162830342e4b1f2b457ffb7fed..c402a51a0951ad775cd7829f442edb8c LevelChunk chunk1 = chunkIterator.next(); // Paper end - optimise chunk tick iteration ChunkPos chunkcoordintpair = chunk1.getPos(); -@@ -622,7 +652,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -621,7 +651,7 @@ public class ServerChunkCache extends ChunkSource { // Paper end - optimise chunk tick iteration chunk1.incrementInhabitedTime(j); if (spawn && flag && (this.spawnEnemies || this.spawnFriendlies) && this.level.getWorldBorder().isWithinBounds(chunkcoordintpair)) { // Spigot // Paper - optimise chunk tick iteration @@ -107,10 +107,10 @@ index 083a8a7dd99e447904dbac161dd3a1de663d6011..27f064812fd7b8f3feedc9966c9dfc78 boolean spawnThisTick = true; int limit = enumcreaturetype.getMaxInstancesPerChunk(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f2b20ed5063a293f0b464548f590d652170cd1d8..ab4510eb9e5eaca46e3278c73e208757292a9f90 100644 +index 6303760f10af17f1da1d92d6c4dc7dd6f5778f94..105a1fb70a7b869b65617a760b8de1ea86f3571f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2458,6 +2458,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2483,6 +2483,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { return CraftFeatureFlag.getFromNMS(this.getHandle().enabledFeatures()).stream().map(FeatureFlag.class::cast).collect(Collectors.toUnmodifiableSet()); } diff --git a/patches/server/0105-Replay-Mod-API.patch b/patches/server/0105-Replay-Mod-API.patch index 7fb80618..348014a2 100644 --- a/patches/server/0105-Replay-Mod-API.patch +++ b/patches/server/0105-Replay-Mod-API.patch @@ -94,7 +94,7 @@ index d78ad5eccd18d89050a486a0c40090a09683bd16..fc7b20df83cd8cb8cdd7d3c2da2bc48a if (((List) object).size() >= i) { return (List) object; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b82b45f57cdd7a98f3c29cc6c80b4d8aedece681..5d290f9335a510f4ddab7a78a96c0d8eedd4682e 100644 +index 658ac73c319683cf8d74d4af8e2a3fca418bd71c..8bb6f9d26c8a24638ed64e8726b3b11dcccde9c8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1659,7 +1659,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop