diff --git a/build.gradle.kts b/build.gradle.kts index 1243e40..fc10ded 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,8 @@ plugins { java `maven-publish` - id("com.github.johnrengelman.shadow") version "7.1.2" apply false - id("io.papermc.paperweight.patcher") version "1.4.0" + id("com.github.johnrengelman.shadow") version "8.1.0" apply false + id("io.papermc.paperweight.patcher") version "1.5.2" id("com.github.ManifestClasspath") version "0.1.0-RELEASE" } diff --git a/gradle.properties b/gradle.properties index 289b96f..94ee12d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=org.galemc.gale version=1.19.4-R0.1-SNAPSHOT mcVersion=1.19.4 -paperRef=e8b82590d0c3dd57ac1728b236117d2fcd531c4f +paperRef=bcec5b11e6728f3eb3078aa4fcc8e87f3d545ec2 org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0001-Hide-irrelevant-compilation-warnings.patch b/patches/api/0001-Hide-irrelevant-compilation-warnings.patch index dcc5c20..e8d6036 100644 --- a/patches/api/0001-Hide-irrelevant-compilation-warnings.patch +++ b/patches/api/0001-Hide-irrelevant-compilation-warnings.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/build.gradle.kts b/build.gradle.kts -index cad12a2632b9ebb569280441c42869685db1f31a..dce9befdddf18048384b828dfe52593d5b0eaa99 100644 +index 279a666e8ea2c07f41ee3f28b768e95dca5f0a10..cd3207095c92ab6a195f8a24dbe4afaa65bf0996 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -85,6 +85,15 @@ val generateApiVersioningFile by tasks.registering { @@ -26,7 +26,7 @@ index cad12a2632b9ebb569280441c42869685db1f31a..dce9befdddf18048384b828dfe52593d tasks.jar { from(generateApiVersioningFile.map { it.outputs.files.singleFile }) { into("META-INF/maven/${project.group}/${project.name}") -@@ -133,6 +142,8 @@ tasks.withType { +@@ -134,6 +143,8 @@ tasks.withType { into("build/docs/javadoc") } } diff --git a/patches/api/0002-Gale-configuration.patch b/patches/api/0002-Gale-configuration.patch index 4767c20..32008a7 100644 --- a/patches/api/0002-Gale-configuration.patch +++ b/patches/api/0002-Gale-configuration.patch @@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 2204336d8800311b65e894739ab1b27273e7c6f2..aec6ef7197ed8caec451954727c1f7149491d3f9 100644 +index 8621dba7f10ab822b5b99ce0d05da58823605cb6..aa4e8a9664cea33677b8be67260d4ecc056da575 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1969,6 +1969,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1966,6 +1966,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/patches/api/0003-Make-timings-calls-final.patch b/patches/api/0003-Make-timings-calls-final.patch index e57ab98..35d8bc9 100644 --- a/patches/api/0003-Make-timings-calls-final.patch +++ b/patches/api/0003-Make-timings-calls-final.patch @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java -index 43b85ce3a6c27a2f92c67d62bee7484c2652b72a..bbc73f3591afe29de429e7e7d693a536616e8dbc 100644 +index 36b8fe86335df851f9c85d6bb2a91368b4d945d1..16040016d7de911eddec278ec2adc2b856df9bcd 100644 --- a/src/main/java/co/aikar/timings/FullServerTickHandler.java +++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java -@@ -18,8 +18,7 @@ public class FullServerTickHandler extends TimingHandler { +@@ -19,8 +19,7 @@ public class FullServerTickHandler extends TimingHandler { } @NotNull @@ -20,7 +20,7 @@ index 43b85ce3a6c27a2f92c67d62bee7484c2652b72a..bbc73f3591afe29de429e7e7d693a536 if (TimingsManager.needsFullReset) { TimingsManager.resetTimings(); } else if (TimingsManager.needsRecheckEnabled) { -@@ -28,8 +27,7 @@ public class FullServerTickHandler extends TimingHandler { +@@ -29,8 +28,7 @@ public class FullServerTickHandler extends TimingHandler { return super.startTiming(); } diff --git a/patches/api/0004-SIMD-support.patch b/patches/api/0004-SIMD-support.patch index b3479f2..3666f9b 100644 --- a/patches/api/0004-SIMD-support.patch +++ b/patches/api/0004-SIMD-support.patch @@ -13,7 +13,7 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/build.gradle.kts b/build.gradle.kts -index dce9befdddf18048384b828dfe52593d5b0eaa99..8af9efe2dbc9563a2c327002cf05c5d2fd8fc68b 100644 +index cd3207095c92ab6a195f8a24dbe4afaa65bf0996..0719e49dde343c80d18daf82d7fed926150d7d6d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -91,6 +91,7 @@ tasks.withType { @@ -24,7 +24,7 @@ index dce9befdddf18048384b828dfe52593d5b0eaa99..8af9efe2dbc9563a2c327002cf05c5d2 } // Gale end - hide irrelevant compilation warnings -@@ -144,6 +145,7 @@ tasks.withType { +@@ -145,6 +146,7 @@ tasks.withType { } options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings diff --git a/patches/api/0007-Player-canSee-by-entity-UUID.patch b/patches/api/0007-Player-canSee-by-entity-UUID.patch index bf60707..e4faddf 100644 --- a/patches/api/0007-Player-canSee-by-entity-UUID.patch +++ b/patches/api/0007-Player-canSee-by-entity-UUID.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 660f28e371176c62e38a84b187958aceb235c8e3..15c57f3e4e1c023e0f3168ce03dd770f006cf27b 100644 +index ee446bfb3e6c4b1d4428c00d6406bf9455c68ad5..2258276b31dda927003367a92e31f05f2c362b1e 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3,6 +3,8 @@ package org.bukkit.entity; @@ -49,8 +49,8 @@ index 660f28e371176c62e38a84b187958aceb235c8e3..15c57f3e4e1c023e0f3168ce03dd770f import org.bukkit.DyeColor; import org.bukkit.Effect; import org.bukkit.GameMode; -@@ -1587,6 +1589,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - @org.jetbrains.annotations.ApiStatus.Experimental // Paper +@@ -1622,6 +1624,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + @ApiStatus.Experimental public boolean canSee(@NotNull Entity entity); + // Gale start - Purpur - Player#canSee by entity UUID diff --git a/patches/api/0008-Specific-interval-TPS-API.patch b/patches/api/0008-Specific-interval-TPS-API.patch index e87e84b..5a71c17 100644 --- a/patches/api/0008-Specific-interval-TPS-API.patch +++ b/patches/api/0008-Specific-interval-TPS-API.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index ac9b690fcccb60b587e5345f12f1383afd0a73a1..e9ff914c9e602887c433c3aa7aab5a170dd31f17 100644 +index f1af93319d6b29d7bc709e7e273e8abe26c7b4af..87891ac18a1e4ba8ca8af955f7cb39686150a2d5 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2072,6 +2072,37 @@ public final class Bukkit { +@@ -2069,6 +2069,37 @@ public final class Bukkit { return server.getTPS(); } @@ -49,10 +49,10 @@ index ac9b690fcccb60b587e5345f12f1383afd0a73a1..e9ff914c9e602887c433c3aa7aab5a17 * Get a sample of the servers last tick times (in nanos) * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index aec6ef7197ed8caec451954727c1f7149491d3f9..7d0baa4306fecb79d069a7f5aed81e12a80a1f0e 100644 +index aa4e8a9664cea33677b8be67260d4ecc056da575..17fe974e08c63e529f11d2d00366b55683467d5d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1751,6 +1751,31 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1748,6 +1748,31 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public double[] getTPS(); diff --git a/patches/api/0009-5-second-TPS-average.patch b/patches/api/0009-5-second-TPS-average.patch index 4ea1966..026563f 100644 --- a/patches/api/0009-5-second-TPS-average.patch +++ b/patches/api/0009-5-second-TPS-average.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index e9ff914c9e602887c433c3aa7aab5a170dd31f17..daf11e58b0a5f8cc8890af24fa51e3c46a4043b6 100644 +index 87891ac18a1e4ba8ca8af955f7cb39686150a2d5..bf33dfa921e0099490e5485ac85a0c84645929e7 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2072,8 +2072,30 @@ public final class Bukkit { +@@ -2069,8 +2069,30 @@ public final class Bukkit { return server.getTPS(); } @@ -72,10 +72,10 @@ index e9ff914c9e602887c433c3aa7aab5a170dd31f17..daf11e58b0a5f8cc8890af24fa51e3c4 * Gets the average server TPS over the last 1 minute * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7d0baa4306fecb79d069a7f5aed81e12a80a1f0e..359ec91be83f52776cb1da092fd1756085816668 100644 +index 17fe974e08c63e529f11d2d00366b55683467d5d..b191c731c2d7e316481043ee5f12f934848af76e 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1751,8 +1751,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1748,8 +1748,27 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public double[] getTPS(); diff --git a/patches/api/0010-Last-tick-time-API.patch b/patches/api/0010-Last-tick-time-API.patch index 9afd24c..92a83bf 100644 --- a/patches/api/0010-Last-tick-time-API.patch +++ b/patches/api/0010-Last-tick-time-API.patch @@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 359ec91be83f52776cb1da092fd1756085816668..db76574dd624e7edabc0fde717e7788dd66b7845 100644 +index b191c731c2d7e316481043ee5f12f934848af76e..6253e761c595c8b89d08f9d42fe3e19cadbf4918 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -2192,4 +2192,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -2189,4 +2189,30 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull org.bukkit.potion.PotionBrewer getPotionBrewer(); // Paper end diff --git a/patches/server/0006-Gale-branding-changes.patch b/patches/server/0006-Gale-branding-changes.patch index 80fabbc..0b98075 100644 --- a/patches/server/0006-Gale-branding-changes.patch +++ b/patches/server/0006-Gale-branding-changes.patch @@ -24,7 +24,7 @@ index 6394d18f32d190e4eee34c40c1aa9ffe65662e6b..7d3b8f3c7616b5db72a6fccb51e5543a "Specification-Title" to "Bukkit", "Specification-Version" to project.version, diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -index bf42969859545a8a520923ef1836ffa4a5cc24a0..f6183c39b3e6895953047ee1e2d967b3ab43eb4a 100644 +index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..03f5ec3c4f8eac9cecfef0f257b90090aece5017 100644 --- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java @@ -1,85 +1,40 @@ @@ -57,7 +57,7 @@ index bf42969859545a8a520923ef1836ffa4a5cc24a0..f6183c39b3e6895953047ee1e2d967b3 -public class PaperVersionFetcher implements VersionFetcher { - private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end - private static final String GITHUB_BRANCH_NAME = "master"; -- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads"; +- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads/paper"; - private static @Nullable String mcVer; +// Gale start - branding changes - version fetcher +/** @@ -70,7 +70,7 @@ index bf42969859545a8a520923ef1836ffa4a5cc24a0..f6183c39b3e6895953047ee1e2d967b3 - public long getCacheTime() { - return 720000; + public PaperVersionFetcher() { -+ super("master", "https://papermc.io/downloads", "Paper", "PaperMC", "PaperMC", "Paper"); ++ super("master", "https://papermc.io/downloads/paper", "Paper", "PaperMC", "PaperMC", "Paper"); } - @Nonnull @@ -194,10 +194,10 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..e45e6b44b2a8f2cdae6e0048a812b921 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4450d825a5474da211f0e83f845d8c7129fa08aa..d7cc91c5b259e047c21e2c53fc563e1e90f3d3eb 100644 +index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..ec7bf5c30a19215af6fe19b16de24e523de0a2ac 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -924,7 +924,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); @@ -91,7 +91,7 @@ index 9000dc3498ea22ef379908eb3c997467ffba82b4..3e938810faa1ac85da58364327d5bed0 private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; @Nullable -@@ -334,13 +326,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1423,7 +1393,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -201,7 +201,7 @@ index 9000dc3498ea22ef379908eb3c997467ffba82b4..3e938810faa1ac85da58364327d5bed0 /* Drop global time updates if (this.tickCount % 20 == 0) { this.profiler.push("timeSync"); -@@ -1542,8 +1504,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(), new LevelChunkTicks<>(), 0L, (LevelChunkSection[]) null, (LevelChunk.PostLoadProcessor) null, (BlendingData) null); } -@@ -117,6 +129,7 @@ public class LevelChunk extends ChunkAccess { +@@ -115,6 +127,7 @@ public class LevelChunk extends ChunkAccess { + this.postLoad = entityLoader; + this.blockTicks = blockTickScheduler; this.fluidTicks = fluidTickScheduler; - // CraftBukkit start - this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this); + this.lightningTick = this.level.randomTickRandom.nextInt(100000) << 1; // Gale - Airplane - optimize random calls in chunk ticking - initialize lightning tick } - public org.bukkit.Chunk bukkitChunk; + // CraftBukkit start diff --git a/patches/server/0028-Print-stack-trace-for-plugins-not-shutting-down-task.patch b/patches/server/0028-Print-stack-trace-for-plugins-not-shutting-down-task.patch index f05b044..1d56725 100644 --- a/patches/server/0028-Print-stack-trace-for-plugins-not-shutting-down-task.patch +++ b/patches/server/0028-Print-stack-trace-for-plugins-not-shutting-down-task.patch @@ -31,11 +31,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 670d66fb0bc64aab7473f92c25f69e91c1c0f226..02b51a9eca5796825c5d500220ff18895dea3299 100644 +index 891320a9237ca30826329660339b82612a50a45e..349b73d0e50499557237650a3c766bffa4943713 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1044,6 +1044,13 @@ public final class CraftServer implements Server { - plugin.getDescription().getName(), +@@ -1040,6 +1040,13 @@ public final class CraftServer implements Server { + plugin.getPluginMeta().getDisplayName(), "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies." )); + // Gale start - Airplane - print stack trace for plugins not shutting down tasks diff --git a/patches/server/0030-Cache-on-climbable-check.patch b/patches/server/0030-Cache-on-climbable-check.patch index fcd9440..981e35a 100644 --- a/patches/server/0030-Cache-on-climbable-check.patch +++ b/patches/server/0030-Cache-on-climbable-check.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 517a4cde947b51195ca7e99afc330d8b40fae235..db64a50dd929d64418cfd81176377b3a1d5d1acc 100644 +index 8d90c02c8f0b82e9c31889b35dcfbe2932406b1d..6411a059a67e1a09580ec8b11afbffe1ef4b8958 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -141,7 +141,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -64,10 +64,10 @@ index 517a4cde947b51195ca7e99afc330d8b40fae235..db64a50dd929d64418cfd81176377b3a if (this.isSpectator()) { return false; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index e881584d38dc354204479863f004e974a0ac6c07..2bff2b6cff78f1ad4cbc6abbc1a37464f543ccb7 100644 +index 52780192d6417f8085566e4cdf3a895a83638520..a04c202e83abc08a98549440e987d4d5f47379b7 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java -@@ -291,7 +291,7 @@ public class ActivationRange +@@ -292,7 +292,7 @@ public class ActivationRange if ( entity instanceof LivingEntity ) { LivingEntity living = (LivingEntity) entity; diff --git a/patches/server/0032-Make-EntityCollisionContext-a-live-representation.patch b/patches/server/0031-Make-EntityCollisionContext-a-live-representation.patch similarity index 100% rename from patches/server/0032-Make-EntityCollisionContext-a-live-representation.patch rename to patches/server/0031-Make-EntityCollisionContext-a-live-representation.patch diff --git a/patches/server/0031-Use-array-for-gamerule-storage.patch b/patches/server/0031-Use-array-for-gamerule-storage.patch deleted file mode 100644 index be4b7d5..0000000 --- a/patches/server/0031-Use-array-for-gamerule-storage.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Wed, 23 Nov 2022 21:52:25 +0100 -Subject: [PATCH] Use array for gamerule storage - -License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) -Gale - https://galemc.org - -This patch is based on the following patch: -"Use array for gamerule storage" -By: Paul Sauve -As part of: Airplane (https://github.com/TECHNOVE/Airplane) -Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) - -* Airplane copyright * - -Airplane -Copyright (C) 2020 Technove LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index edd2c9d0cf5a81c779011cb4215d496a8987b784..6a21a12694d7c9277e1661dfcd1fd143fd5ebcfb 100644 ---- a/src/main/java/net/minecraft/world/level/GameRules.java -+++ b/src/main/java/net/minecraft/world/level/GameRules.java -@@ -100,6 +100,7 @@ public class GameRules { - public static final GameRules.Key RULE_GLOBAL_SOUND_EVENTS = GameRules.register("globalSoundEvents", GameRules.Category.MISC, GameRules.BooleanValue.create(true)); - public static final GameRules.Key RULE_DO_VINES_SPREAD = GameRules.register("doVinesSpread", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); - private final Map, GameRules.Value> rules; -+ private final GameRules.Value[] gameruleArray; // Gale - Airplane - use array for gamerule storage - - private static > GameRules.Key register(String name, GameRules.Category category, GameRules.Type type) { - GameRules.Key gamerules_gamerulekey = new GameRules.Key<>(name, category); -@@ -118,17 +119,33 @@ public class GameRules { - } - - public GameRules() { -- this.rules = (Map) GameRules.GAME_RULE_TYPES.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { -+ // Gale start - Airplane - use array for gamerule storage - use this to ensure gameruleArray is initialized -+ this((Map) GameRules.GAME_RULE_TYPES.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { - return ((GameRules.Type) entry.getValue()).createRule(); -- })); -+ }))); -+ // Gale end - Airplane - use array for gamerule storage - use this to ensure gameruleArray is initialized - } - - private GameRules(Map, GameRules.Value> rules) { - this.rules = rules; -+ -+ // Gale start - Airplane - use array for gamerule storage -+ int arraySize = rules.keySet().stream().mapToInt(key -> key.gameRuleIndex).max().orElse(-1) + 1; -+ GameRules.Value[] values = new GameRules.Value[arraySize]; -+ -+ for (Entry, GameRules.Value> entry : rules.entrySet()) { -+ values[entry.getKey().gameRuleIndex] = entry.getValue(); -+ } -+ -+ this.gameruleArray = values; -+ // Gale end - Airplane - use array for gamerule storage - } - - public > T getRule(GameRules.Key key) { -- return (T) this.rules.get(key); // CraftBukkit - decompile error -+ // Gale start - Airplane - use array for gamerule storage -+ return key == null ? null : (T) this.gameruleArray[key.gameRuleIndex]; -+ //return (T) this.rules.get(key); // CraftBukkit - decompile error -+ // Gale end - Airplane - use array for gamerule storage - } - - public CompoundTag createTag() { -@@ -187,6 +204,10 @@ public class GameRules { - } - - public static final class Key> { -+ // Gale start - Airplane - use array for gamerule storage -+ private static int lastGameRuleIndex = 0; -+ public final int gameRuleIndex = lastGameRuleIndex++; -+ // Gale end - Airplane - use array for gamerule storage - - final String id; - private final GameRules.Category category; diff --git a/patches/server/0033-Improve-container-checking-with-a-bitset.patch b/patches/server/0032-Improve-container-checking-with-a-bitset.patch similarity index 99% rename from patches/server/0033-Improve-container-checking-with-a-bitset.patch rename to patches/server/0032-Improve-container-checking-with-a-bitset.patch index 34919d2..af732c3 100644 --- a/patches/server/0033-Improve-container-checking-with-a-bitset.patch +++ b/patches/server/0032-Improve-container-checking-with-a-bitset.patch @@ -390,7 +390,7 @@ index a71414397bd45ee7bcacfeef0041d80dfa25f114..7743f185672e977520218c3ce6b8ddc9 @Override diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index cba114f554644a37339c93026630c66c43f524b9..b925173cba818e740f490e5b9f21ffafb043a217 100644 +index aac5572c1d40a10cd1d17f89c9eb836718837577..1ad1716d27e58db05c1e22f7f2781319debde925 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/patches/server/0034-Better-checking-for-useless-move-packets.patch b/patches/server/0033-Better-checking-for-useless-move-packets.patch similarity index 100% rename from patches/server/0034-Better-checking-for-useless-move-packets.patch rename to patches/server/0033-Better-checking-for-useless-move-packets.patch diff --git a/patches/server/0035-Use-fast-item-merge-raytracing.patch b/patches/server/0034-Use-fast-item-merge-raytracing.patch similarity index 100% rename from patches/server/0035-Use-fast-item-merge-raytracing.patch rename to patches/server/0034-Use-fast-item-merge-raytracing.patch diff --git a/patches/server/0036-Use-aging-cache-for-biome-temperatures.patch b/patches/server/0035-Use-aging-cache-for-biome-temperatures.patch similarity index 100% rename from patches/server/0036-Use-aging-cache-for-biome-temperatures.patch rename to patches/server/0035-Use-aging-cache-for-biome-temperatures.patch diff --git a/patches/server/0037-Inline-level-height.patch b/patches/server/0036-Inline-level-height.patch similarity index 100% rename from patches/server/0037-Inline-level-height.patch rename to patches/server/0036-Inline-level-height.patch diff --git a/patches/server/0038-Use-ThreadUnsafeRandom-for-mob-spawning.patch b/patches/server/0037-Use-ThreadUnsafeRandom-for-mob-spawning.patch similarity index 100% rename from patches/server/0038-Use-ThreadUnsafeRandom-for-mob-spawning.patch rename to patches/server/0037-Use-ThreadUnsafeRandom-for-mob-spawning.patch diff --git a/patches/server/0039-Remove-streams-and-iterators-from-range-check.patch b/patches/server/0038-Remove-streams-and-iterators-from-range-check.patch similarity index 100% rename from patches/server/0039-Remove-streams-and-iterators-from-range-check.patch rename to patches/server/0038-Remove-streams-and-iterators-from-range-check.patch diff --git a/patches/server/0040-Remove-streams-from-getting-nearby-players.patch b/patches/server/0039-Remove-streams-from-getting-nearby-players.patch similarity index 97% rename from patches/server/0040-Remove-streams-from-getting-nearby-players.patch rename to patches/server/0039-Remove-streams-from-getting-nearby-players.patch index 792a813..dc087a5 100644 --- a/patches/server/0040-Remove-streams-from-getting-nearby-players.patch +++ b/patches/server/0039-Remove-streams-from-getting-nearby-players.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 389e382ba6197c224b0829b5b98f3c22f443e56f..0d2d5b4119b592acca62f9a637bd1dccf850b946 100644 +index 7b865a1cddb0097e4f890ecf8dc8ad784f484ca9..0a1122c8fca322c3fdb62deb5adff6833f7ab968 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -489,17 +489,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0041-Skip-cloning-loot-parameters.patch b/patches/server/0040-Skip-cloning-loot-parameters.patch similarity index 100% rename from patches/server/0041-Skip-cloning-loot-parameters.patch rename to patches/server/0040-Skip-cloning-loot-parameters.patch diff --git a/patches/server/0042-Block-goal-does-not-load-chunks.patch b/patches/server/0041-Block-goal-does-not-load-chunks.patch similarity index 100% rename from patches/server/0042-Block-goal-does-not-load-chunks.patch rename to patches/server/0041-Block-goal-does-not-load-chunks.patch diff --git a/patches/server/0043-Reduce-entity-allocations.patch b/patches/server/0042-Reduce-entity-allocations.patch similarity index 97% rename from patches/server/0043-Reduce-entity-allocations.patch rename to patches/server/0042-Reduce-entity-allocations.patch index f1c332a..20096df 100644 --- a/patches/server/0043-Reduce-entity-allocations.patch +++ b/patches/server/0042-Reduce-entity-allocations.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0d2d5b4119b592acca62f9a637bd1dccf850b946..33e994d2a675e7677c1245dabd88a2b516020756 100644 +index 0a1122c8fca322c3fdb62deb5adff6833f7ab968..00445f768e978c393cba8cdde46c0cdd4cee5d9a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -415,6 +415,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0044-Remove-lambda-from-ticking-guard.patch b/patches/server/0043-Remove-lambda-from-ticking-guard.patch similarity index 97% rename from patches/server/0044-Remove-lambda-from-ticking-guard.patch rename to patches/server/0043-Remove-lambda-from-ticking-guard.patch index f83f582..cbfbb8f 100644 --- a/patches/server/0044-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0043-Remove-lambda-from-ticking-guard.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index da66db948ccdc92046c1f8c9fbccc7569a3e418f..51c64e6d0ae38db113ecd372ad2d45e5bb4c98da 100644 +index cb0df7b5db3fa885f43b35e6ef8c6cdc221b4003..ef0b765c04bfdb684d8a3aef7aa4184fafb38864 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -709,7 +709,20 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0045-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0044-Reduce-entity-fluid-lookups-if-no-fluids.patch similarity index 97% rename from patches/server/0045-Reduce-entity-fluid-lookups-if-no-fluids.patch rename to patches/server/0044-Reduce-entity-fluid-lookups-if-no-fluids.patch index 62876f0..d388c44 100644 --- a/patches/server/0045-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ b/patches/server/0044-Reduce-entity-fluid-lookups-if-no-fluids.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 33e994d2a675e7677c1245dabd88a2b516020756..f4355116028f13d7b50821d60eeeb34a734e388b 100644 +index 00445f768e978c393cba8cdde46c0cdd4cee5d9a..fb6ffe2cfcff94ca41df6de3314213704c025246 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4163,16 +4163,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4169,16 +4169,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { @@ -60,7 +60,7 @@ index 33e994d2a675e7677c1245dabd88a2b516020756..f4355116028f13d7b50821d60eeeb34a double d1 = 0.0D; boolean flag = this.isPushedByFluid(); boolean flag1 = false; -@@ -4180,14 +4182,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4186,14 +4188,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { int k1 = 0; BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); @@ -128,7 +128,7 @@ index 33e994d2a675e7677c1245dabd88a2b516020756..f4355116028f13d7b50821d60eeeb34a if (d2 >= axisalignedbb.minY) { flag1 = true; -@@ -4209,9 +4258,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4215,9 +4264,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit end } } diff --git a/patches/server/0046-SIMD-support.patch b/patches/server/0045-SIMD-support.patch similarity index 100% rename from patches/server/0046-SIMD-support.patch rename to patches/server/0045-SIMD-support.patch diff --git a/patches/server/0047-Make-book-writing-configurable.patch b/patches/server/0046-Make-book-writing-configurable.patch similarity index 97% rename from patches/server/0047-Make-book-writing-configurable.patch rename to patches/server/0046-Make-book-writing-configurable.patch index 0a69095..f0ebc0f 100644 --- a/patches/server/0047-Make-book-writing-configurable.patch +++ b/patches/server/0046-Make-book-writing-configurable.patch @@ -22,7 +22,7 @@ you to easily disable books, should you want to preemptively remove this functionality before additional exploits are found. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d56ed157045184d51a0af7cb722dbf5f01320b8f..f8e333288e7629a59c05e07bf754b2ed565d0aec 100644 +index 7e5ab66f82a4013b36e3880897efddba0af307a9..b24af137664c30ab2443d334b2863f8ccc4684bb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -184,6 +184,8 @@ import net.minecraft.world.phys.Vec3; @@ -34,7 +34,7 @@ index d56ed157045184d51a0af7cb722dbf5f01320b8f..f8e333288e7629a59c05e07bf754b2ed import org.slf4j.Logger; // CraftBukkit start -@@ -1204,6 +1206,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1213,6 +1215,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/server/0048-Optimize-entity-coordinate-key.patch b/patches/server/0047-Optimize-entity-coordinate-key.patch similarity index 96% rename from patches/server/0048-Optimize-entity-coordinate-key.patch rename to patches/server/0047-Optimize-entity-coordinate-key.patch index e907c27..d1a96de 100644 --- a/patches/server/0048-Optimize-entity-coordinate-key.patch +++ b/patches/server/0047-Optimize-entity-coordinate-key.patch @@ -35,7 +35,7 @@ index 6efb8b10f17c70b05128039376d254e6beda3841..fe8d2fa5fdb116762b644b08020fee23 public static long getCoordinateKey(final ChunkPos pair) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f4355116028f13d7b50821d60eeeb34a734e388b..bd16880ba0efc2f3232431ac0a8df3c49915bafb 100644 +index fb6ffe2cfcff94ca41df6de3314213704c025246..9d85885552b3d5735359ff1e48ce4d28a60ff623 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -291,7 +291,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0049-Reduce-in-wall-checks.patch b/patches/server/0048-Reduce-in-wall-checks.patch similarity index 97% rename from patches/server/0049-Reduce-in-wall-checks.patch rename to patches/server/0048-Reduce-in-wall-checks.patch index 18e7ccf..f1076cf 100644 --- a/patches/server/0049-Reduce-in-wall-checks.patch +++ b/patches/server/0048-Reduce-in-wall-checks.patch @@ -28,7 +28,7 @@ but is so much cheaper than the suffocation check that it's worth keeping it. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index db64a50dd929d64418cfd81176377b3a1d5d1acc..5629a2f7f0806475b5cc661894f5a915a08d9f15 100644 +index 6411a059a67e1a09580ec8b11afbffe1ef4b8958..848022c049e27d80ceb11f0cee6cbda15edf2ff3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -395,7 +395,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0050-Make-chat-order-verification-configurable.patch b/patches/server/0049-Make-chat-order-verification-configurable.patch similarity index 94% rename from patches/server/0050-Make-chat-order-verification-configurable.patch rename to patches/server/0049-Make-chat-order-verification-configurable.patch index 7ef24c8..e782093 100644 --- a/patches/server/0050-Make-chat-order-verification-configurable.patch +++ b/patches/server/0049-Make-chat-order-verification-configurable.patch @@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f8e333288e7629a59c05e07bf754b2ed565d0aec..1c5263a8b93e2a62f6cb43abc96f84583da8cf54 100644 +index b24af137664c30ab2443d334b2863f8ccc4684bb..f56dbc32851f8b47d468cf2d024d8a77992d8408 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2351,6 +2351,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2361,6 +2361,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private boolean updateChatOrder(Instant timestamp) { diff --git a/patches/server/0051-Make-saving-fireworks-configurable.patch b/patches/server/0050-Make-saving-fireworks-configurable.patch similarity index 100% rename from patches/server/0051-Make-saving-fireworks-configurable.patch rename to patches/server/0050-Make-saving-fireworks-configurable.patch diff --git a/patches/server/0052-Don-t-trigger-lootable-refresh-for-non-player-intera.patch b/patches/server/0051-Don-t-trigger-lootable-refresh-for-non-player-intera.patch similarity index 100% rename from patches/server/0052-Don-t-trigger-lootable-refresh-for-non-player-intera.patch rename to patches/server/0051-Don-t-trigger-lootable-refresh-for-non-player-intera.patch diff --git a/patches/server/0053-Reduce-hopper-item-checks.patch b/patches/server/0052-Reduce-hopper-item-checks.patch similarity index 97% rename from patches/server/0053-Reduce-hopper-item-checks.patch rename to patches/server/0052-Reduce-hopper-item-checks.patch index 83d95cf..232c627 100644 --- a/patches/server/0053-Reduce-hopper-item-checks.patch +++ b/patches/server/0052-Reduce-hopper-item-checks.patch @@ -119,7 +119,7 @@ index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5 double getLevelY(); diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index b925173cba818e740f490e5b9f21ffafb043a217..c4208b01d4bfb02eed09949e31821cd8e40b6eca 100644 +index 1ad1716d27e58db05c1e22f7f2781319debde925..44732d98902797e3ed924bf77198657ce3a1ec30 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -11,6 +11,7 @@ import net.minecraft.core.Direction; @@ -156,7 +156,7 @@ index b925173cba818e740f490e5b9f21ffafb043a217..c4208b01d4bfb02eed09949e31821cd8 @io.papermc.paper.annotation.DoNotUse // Paper - method unused as logic is inlined above @@ -805,6 +808,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen - return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second))); + return first.is(second.getItem()) && first.getDamageValue() == second.getDamageValue() && first.getCount() < first.getMaxStackSize() && ItemStack.tagMatches(first, second); // Paper - used to return true for full itemstacks?! } + // Gale start - EMC - reduce hopper item checks diff --git a/patches/server/0054-Reduce-villager-item-re-pickup.patch b/patches/server/0053-Reduce-villager-item-re-pickup.patch similarity index 100% rename from patches/server/0054-Reduce-villager-item-re-pickup.patch rename to patches/server/0053-Reduce-villager-item-re-pickup.patch diff --git a/patches/server/0055-Variable-entity-wake-up-duration.patch b/patches/server/0054-Variable-entity-wake-up-duration.patch similarity index 98% rename from patches/server/0055-Variable-entity-wake-up-duration.patch rename to patches/server/0054-Variable-entity-wake-up-duration.patch index be1714f..87e31a5 100644 --- a/patches/server/0055-Variable-entity-wake-up-duration.patch +++ b/patches/server/0054-Variable-entity-wake-up-duration.patch @@ -38,7 +38,7 @@ index be563b466b9b9312254596ea3b8e116b28cf250c..7355c828ab66c23d878e4981be9e44c7 + } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 2bff2b6cff78f1ad4cbc6abbc1a37464f543ccb7..8a6bc6d4dc5825e0d125ce3853bd3d7714ac113f 100644 +index a04c202e83abc08a98549440e987d4d5f47379b7..754c8ab99b908b017b9ef4ceaa3ae67c7266ac44 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -38,6 +38,7 @@ import co.aikar.timings.MinecraftTimings; diff --git a/patches/server/0056-Do-not-process-chat-commands-before-player-has-joine.patch b/patches/server/0055-Do-not-process-chat-commands-before-player-has-joine.patch similarity index 86% rename from patches/server/0056-Do-not-process-chat-commands-before-player-has-joine.patch rename to patches/server/0055-Do-not-process-chat-commands-before-player-has-joine.patch index fd32fec..edec331 100644 --- a/patches/server/0056-Do-not-process-chat-commands-before-player-has-joine.patch +++ b/patches/server/0055-Do-not-process-chat-commands-before-player-has-joine.patch @@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3c92e6fb78cce27572709cd767fb191f9107e0eb..2dcab455bdc6b0742cd2322062678aa7cd173c79 100644 +index fe7d1850b4b26b9a739d6805bfe85c0961f0cd0b..1f74a55093367ffb3ed8ed39d2e6d0a1275bf97a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -267,6 +267,7 @@ public class ServerPlayer extends Player { +@@ -268,6 +268,7 @@ public class ServerPlayer extends Player { public boolean joining = true; public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper @@ -25,10 +25,10 @@ index 3c92e6fb78cce27572709cd767fb191f9107e0eb..2dcab455bdc6b0742cd2322062678aa7 // CraftBukkit end public boolean isRealPlayer; // Paper diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1c5263a8b93e2a62f6cb43abc96f84583da8cf54..81fbaea23646bab3c8d6425d284a1a1bd1579095 100644 +index f56dbc32851f8b47d468cf2d024d8a77992d8408..6f0abe57bbc6f813b646863e46f1798c1c4dfa2d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2328,6 +2328,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2338,6 +2338,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure return Optional.empty(); @@ -40,10 +40,10 @@ index 1c5263a8b93e2a62f6cb43abc96f84583da8cf54..81fbaea23646bab3c8d6425d284a1a1b this.player.resetLastActionTime(); return optional; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c0c14766adaac855112f85a203a6163b8adfdded..804ca4ab8539a9319704628ed53d6ccca654d8e3 100644 +index 4d837c1530a3031a4c2a5a39d87bd013d60e14a6..55a5fe227c1b14430486e2663a4f63bba357b63a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -328,6 +328,8 @@ public abstract class PlayerList { +@@ -333,6 +333,8 @@ public abstract class PlayerList { return; } diff --git a/patches/server/0057-Do-not-log-invalid-statistics.patch b/patches/server/0056-Do-not-log-invalid-statistics.patch similarity index 100% rename from patches/server/0057-Do-not-log-invalid-statistics.patch rename to patches/server/0056-Do-not-log-invalid-statistics.patch diff --git a/patches/server/0058-Do-not-log-empty-message-warnings.patch b/patches/server/0057-Do-not-log-empty-message-warnings.patch similarity index 93% rename from patches/server/0058-Do-not-log-empty-message-warnings.patch rename to patches/server/0057-Do-not-log-empty-message-warnings.patch index 65fc081..877cae5 100644 --- a/patches/server/0058-Do-not-log-empty-message-warnings.patch +++ b/patches/server/0057-Do-not-log-empty-message-warnings.patch @@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 81fbaea23646bab3c8d6425d284a1a1bd1579095..a6af613e91015dc3b9ec31f9c0ff57072e3ab40f 100644 +index 6f0abe57bbc6f813b646863e46f1798c1c4dfa2d..a5115c9d6723cd3f8f4bc829a2111c9a050b0a58 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -185,6 +185,7 @@ import net.minecraft.world.phys.shapes.BooleanOp; @@ -18,7 +18,7 @@ index 81fbaea23646bab3c8d6425d284a1a1bd1579095..a6af613e91015dc3b9ec31f9c0ff5707 import org.galemc.gale.configuration.GaleGlobalConfiguration; import org.slf4j.Logger; -@@ -2540,7 +2541,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2550,7 +2551,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start String s = message.signedContent(); if (s.isEmpty()) { diff --git a/patches/server/0059-Do-not-log-ignored-advancements.patch b/patches/server/0058-Do-not-log-ignored-advancements.patch similarity index 100% rename from patches/server/0059-Do-not-log-ignored-advancements.patch rename to patches/server/0058-Do-not-log-ignored-advancements.patch diff --git a/patches/server/0060-Do-not-log-setBlock-in-far-chunks.patch b/patches/server/0059-Do-not-log-setBlock-in-far-chunks.patch similarity index 100% rename from patches/server/0060-Do-not-log-setBlock-in-far-chunks.patch rename to patches/server/0059-Do-not-log-setBlock-in-far-chunks.patch diff --git a/patches/server/0061-Do-not-log-unrecognized-recipes.patch b/patches/server/0060-Do-not-log-unrecognized-recipes.patch similarity index 100% rename from patches/server/0061-Do-not-log-unrecognized-recipes.patch rename to patches/server/0060-Do-not-log-unrecognized-recipes.patch diff --git a/patches/server/0062-Do-not-log-legacy-Material-initialization.patch b/patches/server/0061-Do-not-log-legacy-Material-initialization.patch similarity index 100% rename from patches/server/0062-Do-not-log-legacy-Material-initialization.patch rename to patches/server/0061-Do-not-log-legacy-Material-initialization.patch diff --git a/patches/server/0063-Do-not-log-expired-message-warnings.patch b/patches/server/0062-Do-not-log-expired-message-warnings.patch similarity index 100% rename from patches/server/0063-Do-not-log-expired-message-warnings.patch rename to patches/server/0062-Do-not-log-expired-message-warnings.patch diff --git a/patches/server/0064-Do-not-log-out-of-order-message-warnings.patch b/patches/server/0063-Do-not-log-out-of-order-message-warnings.patch similarity index 94% rename from patches/server/0064-Do-not-log-out-of-order-message-warnings.patch rename to patches/server/0063-Do-not-log-out-of-order-message-warnings.patch index e6d7d94..949766f 100644 --- a/patches/server/0064-Do-not-log-out-of-order-message-warnings.patch +++ b/patches/server/0063-Do-not-log-out-of-order-message-warnings.patch @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a6af613e91015dc3b9ec31f9c0ff57072e3ab40f..671bdb4614e4dbc0604785ba22f5a2b5de14fe16 100644 +index a5115c9d6723cd3f8f4bc829a2111c9a050b0a58..750850cce3d129f4b453c21fcd43a5d570805a54 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2318,7 +2318,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2328,7 +2328,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { diff --git a/patches/server/0065-Do-not-log-Not-Secure-marker.patch b/patches/server/0064-Do-not-log-Not-Secure-marker.patch similarity index 94% rename from patches/server/0065-Do-not-log-Not-Secure-marker.patch rename to patches/server/0064-Do-not-log-Not-Secure-marker.patch index 36cc00a..bee48fe 100644 --- a/patches/server/0065-Do-not-log-Not-Secure-marker.patch +++ b/patches/server/0064-Do-not-log-Not-Secure-marker.patch @@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -index 4d9bc4a62ebae0f3707900503576c64733de639f..37cec44082a4bf7be2ee238729aedb10cc19ea3f 100644 +index 951a7df30bd70bb3051c04f592529d560be6948e..42ac52d595308e36a4c7e98c0379408057f889a8 100644 --- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java +++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java @@ -43,6 +43,7 @@ import org.bukkit.event.player.PlayerChatEvent; @@ -28,7 +28,7 @@ index 4d9bc4a62ebae0f3707900503576c64733de639f..37cec44082a4bf7be2ee238729aedb10 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 804ca4ab8539a9319704628ed53d6ccca654d8e3..e8299ed2eaae287379136f5331434bc354d58ebd 100644 +index 55a5fe227c1b14430486e2663a4f63bba357b63a..530e049a10cccd13bcfccc652db1610113433242 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -101,6 +101,7 @@ import net.minecraft.world.scores.Objective; @@ -39,7 +39,7 @@ index 804ca4ab8539a9319704628ed53d6ccca654d8e3..e8299ed2eaae287379136f5331434bc3 import org.slf4j.Logger; // CraftBukkit start -@@ -1389,7 +1390,7 @@ public abstract class PlayerList { +@@ -1394,7 +1395,7 @@ public abstract class PlayerList { // Paper end boolean flag = this.verifyChatTrusted(message); diff --git a/patches/server/0066-Do-not-log-run-as-root-warning.patch b/patches/server/0065-Do-not-log-run-as-root-warning.patch similarity index 100% rename from patches/server/0066-Do-not-log-run-as-root-warning.patch rename to patches/server/0065-Do-not-log-run-as-root-warning.patch diff --git a/patches/server/0067-Do-not-log-offline-mode-warning.patch b/patches/server/0066-Do-not-log-offline-mode-warning.patch similarity index 100% rename from patches/server/0067-Do-not-log-offline-mode-warning.patch rename to patches/server/0066-Do-not-log-offline-mode-warning.patch diff --git a/patches/server/0068-Softly-log-invalid-pool-element-errors.patch b/patches/server/0067-Softly-log-invalid-pool-element-errors.patch similarity index 100% rename from patches/server/0068-Softly-log-invalid-pool-element-errors.patch rename to patches/server/0067-Softly-log-invalid-pool-element-errors.patch diff --git a/patches/server/0069-Fix-legacy-colors-in-console.patch b/patches/server/0068-Fix-legacy-colors-in-console.patch similarity index 100% rename from patches/server/0069-Fix-legacy-colors-in-console.patch rename to patches/server/0068-Fix-legacy-colors-in-console.patch diff --git a/patches/server/0070-Fix-outdated-server-showing-in-ping-before-server-fu.patch b/patches/server/0069-Fix-outdated-server-showing-in-ping-before-server-fu.patch similarity index 100% rename from patches/server/0070-Fix-outdated-server-showing-in-ping-before-server-fu.patch rename to patches/server/0069-Fix-outdated-server-showing-in-ping-before-server-fu.patch diff --git a/patches/server/0071-Make-sand-duping-fix-configurable.patch b/patches/server/0070-Make-sand-duping-fix-configurable.patch similarity index 97% rename from patches/server/0071-Make-sand-duping-fix-configurable.patch rename to patches/server/0070-Make-sand-duping-fix-configurable.patch index 98a21e2..632641f 100644 --- a/patches/server/0071-Make-sand-duping-fix-configurable.patch +++ b/patches/server/0070-Make-sand-duping-fix-configurable.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index ce2c3c146ef64400e00084bd2245d2b87a67fbc2..2496b14c3a284d5a2f80a42e6cc23830521f87ec 100644 +index 536856300da929c101f50da5827677bada5feb50..3d05bdbaf3488b5a01d949b9e90b1ebed935adc3 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -131,7 +131,7 @@ public class FallingBlockEntity extends Entity { diff --git a/patches/server/0072-Fix-MC-238526.patch b/patches/server/0071-Fix-MC-238526.patch similarity index 100% rename from patches/server/0072-Fix-MC-238526.patch rename to patches/server/0071-Fix-MC-238526.patch diff --git a/patches/server/0073-Fix-MC-123848.patch b/patches/server/0072-Fix-MC-123848.patch similarity index 100% rename from patches/server/0073-Fix-MC-123848.patch rename to patches/server/0072-Fix-MC-123848.patch diff --git a/patches/server/0074-Fix-cow-rotation-when-shearing-mooshroom.patch b/patches/server/0073-Fix-cow-rotation-when-shearing-mooshroom.patch similarity index 100% rename from patches/server/0074-Fix-cow-rotation-when-shearing-mooshroom.patch rename to patches/server/0073-Fix-cow-rotation-when-shearing-mooshroom.patch diff --git a/patches/server/0075-Fix-MC-121706.patch b/patches/server/0074-Fix-MC-121706.patch similarity index 100% rename from patches/server/0075-Fix-MC-121706.patch rename to patches/server/0074-Fix-MC-121706.patch diff --git a/patches/server/0076-Fix-MC-110386.patch b/patches/server/0075-Fix-MC-110386.patch similarity index 100% rename from patches/server/0076-Fix-MC-110386.patch rename to patches/server/0075-Fix-MC-110386.patch diff --git a/patches/server/0077-Fix-MC-31819.patch b/patches/server/0076-Fix-MC-31819.patch similarity index 93% rename from patches/server/0077-Fix-MC-31819.patch rename to patches/server/0076-Fix-MC-31819.patch index af05601..3a2c895 100644 --- a/patches/server/0077-Fix-MC-31819.patch +++ b/patches/server/0076-Fix-MC-31819.patch @@ -19,10 +19,10 @@ the displayed hunger bar never goes down. Hunger (or any related value, includin should not go down on peaceful. See https://bugs.mojang.com/browse/MC-31819. 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 2b02800666b358159c8ecb63208a14855f90657b..9e7b5b876ec7aa90bf46afa6992fc59e67aedc9b 100644 +index 0629c471d38a77c44fc1c86ccdfcb0690f61ca17..65e356449e9c96c937b45eaab94aa6cc4296fcb9 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1896,6 +1896,11 @@ public abstract class Player extends LivingEntity { +@@ -1902,6 +1902,11 @@ public abstract class Player extends LivingEntity { } public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) { diff --git a/patches/server/0078-Fix-MC-26304.patch b/patches/server/0077-Fix-MC-26304.patch similarity index 100% rename from patches/server/0078-Fix-MC-26304.patch rename to patches/server/0077-Fix-MC-26304.patch diff --git a/patches/server/0079-End-gateway-should-check-if-entity-can-use-portal.patch b/patches/server/0078-End-gateway-should-check-if-entity-can-use-portal.patch similarity index 100% rename from patches/server/0079-End-gateway-should-check-if-entity-can-use-portal.patch rename to patches/server/0078-End-gateway-should-check-if-entity-can-use-portal.patch diff --git a/patches/server/0080-Prevent-entities-eating-blocks-in-non-ticking-chunks.patch b/patches/server/0079-Prevent-entities-eating-blocks-in-non-ticking-chunks.patch similarity index 100% rename from patches/server/0080-Prevent-entities-eating-blocks-in-non-ticking-chunks.patch rename to patches/server/0079-Prevent-entities-eating-blocks-in-non-ticking-chunks.patch diff --git a/patches/server/0081-Make-arrow-movement-resetting-despawn-counter-config.patch b/patches/server/0080-Make-arrow-movement-resetting-despawn-counter-config.patch similarity index 100% rename from patches/server/0081-Make-arrow-movement-resetting-despawn-counter-config.patch rename to patches/server/0080-Make-arrow-movement-resetting-despawn-counter-config.patch diff --git a/patches/server/0082-Make-logging-login-locations-configurable.patch b/patches/server/0081-Make-logging-login-locations-configurable.patch similarity index 94% rename from patches/server/0082-Make-logging-login-locations-configurable.patch rename to patches/server/0081-Make-logging-login-locations-configurable.patch index 6acc844..3a014f2 100644 --- a/patches/server/0082-Make-logging-login-locations-configurable.patch +++ b/patches/server/0081-Make-logging-login-locations-configurable.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e8299ed2eaae287379136f5331434bc354d58ebd..9fed88164c5e3173e206e145ffbafa16e349d674 100644 +index 530e049a10cccd13bcfccc652db1610113433242..cb345dc563d30edc23b380b8c330e24bfe3fa2a2 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -466,7 +466,13 @@ public abstract class PlayerList { +@@ -471,7 +471,13 @@ public abstract class PlayerList { } // Paper end // CraftBukkit - Moved from above, added world diff --git a/patches/server/0083-Reduce-array-allocations.patch b/patches/server/0082-Reduce-array-allocations.patch similarity index 97% rename from patches/server/0083-Reduce-array-allocations.patch rename to patches/server/0082-Reduce-array-allocations.patch index 0290931..aa0dae5 100644 --- a/patches/server/0083-Reduce-array-allocations.patch +++ b/patches/server/0082-Reduce-array-allocations.patch @@ -346,7 +346,7 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..43f402d9032e4570a81a80e412215598 protected CipherBase(Cipher cipher) { this.cipher = cipher; diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index fa1d325034dafdb9f1da546a6f9c5e88d2b67749..63ca4753898bef485a0ea832e4c1f67f249b4d1d 100644 +index f9e10bf048929886db3c414038d2c7e9f84226a6..0aef4fe2af72e8006f37c02f4f8eaa651b870671 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -21,7 +21,6 @@ import io.netty.channel.epoll.EpollSocketChannel; @@ -367,7 +367,7 @@ index fa1d325034dafdb9f1da546a6f9c5e88d2b67749..63ca4753898bef485a0ea832e4c1f67f import net.minecraft.Util; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -@@ -315,7 +315,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -318,7 +318,7 @@ public class Connection extends SimpleChannelInboundHandler> { } public void setListener(PacketListener listener) { @@ -399,7 +399,7 @@ index 8a68baf6bd46b59cf57c94ffe5651d47a7cae99c..bd7fa1b2a6fed82ce66fe2b8e3498e4d private static final FormattedText TEXT_NULL = FormattedText.of("null"); private final String key; diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index c6fa6bcd66d61359124a8426b919493c6ec43f06..b46e64bbfe4530917ff941292464acf71c7fab60 100644 +index cdbf10339a8e8846a8c364de483a0ccd95cd225a..95462967b057e00b0616857e3c4eb05e5840ba3d 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -93,7 +93,7 @@ public class Main { @@ -412,7 +412,7 @@ index c6fa6bcd66d61359124a8426b919493c6ec43f06..b46e64bbfe4530917ff941292464acf7 OptionSpec optionspec11 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1, new Integer[0]); OptionSpec optionspec12 = optionparser.accepts("serverId").withRequiredArg(); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3e938810faa1ac85da58364327d5bed0d7dbb70e..9f9e2e03ad62649e69a1dc628966b73802665c49 100644 +index f53370e581b8d07d993323be5df4d737d1e13794..71b4de55621ef7bb2df4fbfc611ce32023cdd628 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -50,6 +50,8 @@ import java.util.stream.Collectors; @@ -438,7 +438,7 @@ index 48adbfbb8a55f6719c92a1fe83c64d87f1b236d5..834b497053f4fa20cf94c00e1ee2db48 for (int j = 0; j < i; ++j) { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 51c64e6d0ae38db113ecd372ad2d45e5bb4c98da..c0eeab42651ed013633a507ee7d1ab4b83a6072c 100644 +index ef0b765c04bfdb684d8a3aef7aa4184fafb38864..5eb689cb445c0cf8b645e543c8c3a324b1eca536 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -38,6 +38,8 @@ import java.util.stream.Collectors; @@ -469,7 +469,7 @@ index 51c64e6d0ae38db113ecd372ad2d45e5bb4c98da..c0eeab42651ed013633a507ee7d1ab4b return ret; } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 671bdb4614e4dbc0604785ba22f5a2b5de14fe16..4982d6dbc62bd21fa49b62f3f22ba7e101b163a1 100644 +index 750850cce3d129f4b453c21fcd43a5d570805a54..a3854010434a1550d26c22c16e9978e9e5fdb3af 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -29,6 +29,8 @@ import java.util.function.UnaryOperator; @@ -506,7 +506,7 @@ index 671bdb4614e4dbc0604785ba22f5a2b5de14fe16..4982d6dbc62bd21fa49b62f3f22ba7e1 import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; -@@ -403,7 +401,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -405,7 +403,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info @@ -515,7 +515,7 @@ index 671bdb4614e4dbc0604785ba22f5a2b5de14fe16..4982d6dbc62bd21fa49b62f3f22ba7e1 } } else { if (elapsedTime >= 15000L) { // 15 seconds -@@ -867,13 +865,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -876,13 +874,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -531,7 +531,7 @@ index 671bdb4614e4dbc0604785ba22f5a2b5de14fe16..4982d6dbc62bd21fa49b62f3f22ba7e1 return; } // Paper end -@@ -3284,7 +3282,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3294,7 +3292,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -578,7 +578,7 @@ index 2ff578e4a953ffcf5176815ba8e3f06f73499989..a436ef49325c9cae1008d5763373cce8 final String s; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 9fed88164c5e3173e206e145ffbafa16e349d674..15d3de14463a6b541bb408412476e6cb1ce662f3 100644 +index cb345dc563d30edc23b380b8c330e24bfe3fa2a2..e8d89c582ecd6517eb41da28b1249072ab099b32 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -27,6 +27,8 @@ import java.util.UUID; @@ -598,7 +598,7 @@ index 9fed88164c5e3173e206e145ffbafa16e349d674..15d3de14463a6b541bb408412476e6cb import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerJoinEvent; -@@ -694,7 +695,7 @@ public abstract class PlayerList { +@@ -699,7 +700,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -687,7 +687,7 @@ index 97ff19efa0b3943ccb7a6e02cba6ed2fea61adac..b2ae2bd8bd4ff3cb6457e8c08172e348 private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) { this.type = type; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5629a2f7f0806475b5cc661894f5a915a08d9f15..2cd662c58b0a44045b680b73f478e9d9c36f1703 100644 +index 848022c049e27d80ceb11f0cee6cbda15edf2ff3..8e739f81455ef41502b195c360d2e4243c29cda4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3068,7 +3068,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -753,10 +753,10 @@ index 71a36cf9b976443cca9ab63cd0eb23253f638562..201b0e1b25d0773bbcf9c1ed69fd888a 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 a6253272205337b3b855679b3057c2519a807a4c..8155a806ccb200b8883ce6734c5b7e34338060ee 100644 +index a7533d18fe6148d7bfd3106b9cdcb6fa3347cf7c..29a11bbcab84e66cb8adf9df2ea9feef4da601e8 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -1000,7 +1000,7 @@ public final class ItemStack { +@@ -1008,7 +1008,7 @@ public final class ItemStack { int k; if (ItemStack.shouldShowInTooltip(i, ItemStack.TooltipPart.MODIFIERS)) { @@ -867,7 +867,7 @@ index ae90e86327957bb784e2d81694ee7eea288bb455..d36f554e545686487e2c5198ddb5ad1a @Override diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 2a786c9fd29dc2139cf487fa645cd43345d60167..ea427d38452dddcd1ab67b469955428915ac43cb 100644 +index a3f073066f6e2eea8964461ad2b0409ade202f35..13f9226d4f8f591cd0095fda2f68bfad8e89b2d4 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -9,6 +9,8 @@ import java.util.Iterator; diff --git a/patches/server/0084-Optimize-sun-burn-tick.patch b/patches/server/0083-Optimize-sun-burn-tick.patch similarity index 97% rename from patches/server/0084-Optimize-sun-burn-tick.patch rename to patches/server/0083-Optimize-sun-burn-tick.patch index 54deef9..6b5f339 100644 --- a/patches/server/0084-Optimize-sun-burn-tick.patch +++ b/patches/server/0083-Optimize-sun-burn-tick.patch @@ -13,7 +13,7 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bd16880ba0efc2f3232431ac0a8df3c49915bafb..25f3cf277c0a23fd885d9920e0fd9d4b5f522b84 100644 +index 9d85885552b3d5735359ff1e48ce4d28a60ff623..9777479e2154146f40bd4b2c1eae3698444b6368 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -290,7 +290,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0085-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch b/patches/server/0084-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch similarity index 100% rename from patches/server/0085-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch rename to patches/server/0084-Reduce-lambda-and-Optional-allocation-in-EntityBased.patch diff --git a/patches/server/0086-Replace-AI-goal-set-with-optimized-collection.patch b/patches/server/0085-Replace-AI-goal-set-with-optimized-collection.patch similarity index 100% rename from patches/server/0086-Replace-AI-goal-set-with-optimized-collection.patch rename to patches/server/0085-Replace-AI-goal-set-with-optimized-collection.patch diff --git a/patches/server/0087-Replace-game-rules-map-with-optimized-collection.patch b/patches/server/0086-Replace-game-rules-map-with-optimized-collection.patch similarity index 90% rename from patches/server/0087-Replace-game-rules-map-with-optimized-collection.patch rename to patches/server/0086-Replace-game-rules-map-with-optimized-collection.patch index cc09d3a..dac2edf 100644 --- a/patches/server/0087-Replace-game-rules-map-with-optimized-collection.patch +++ b/patches/server/0086-Replace-game-rules-map-with-optimized-collection.patch @@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 6a21a12694d7c9277e1661dfcd1fd143fd5ebcfb..7a69bf2e642077fef2cbf95ba7ddedfaff442c5a 100644 +index 6fa00d9239546aa82b9e92e25a33103868084c38..71e75f3d83dafeb5684923fa27e7b7e81e9e22b9 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java @@ -19,6 +19,8 @@ import java.util.function.BiConsumer; @@ -32,5 +32,5 @@ index 6a21a12694d7c9277e1661dfcd1fd143fd5ebcfb..7a69bf2e642077fef2cbf95ba7ddedfa - this.rules = rules; + this.rules = new Object2ObjectOpenHashMap<>(rules); // Gale - Lithium - replace game rules map with optimized collection - // Gale start - Airplane - use array for gamerule storage + // Paper start int arraySize = rules.keySet().stream().mapToInt(key -> key.gameRuleIndex).max().orElse(-1) + 1; diff --git a/patches/server/0088-Replace-AI-attributes-with-optimized-collections.patch b/patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch similarity index 100% rename from patches/server/0088-Replace-AI-attributes-with-optimized-collections.patch rename to patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch diff --git a/patches/server/0089-Replace-class-map-with-optimized-collection.patch b/patches/server/0088-Replace-class-map-with-optimized-collection.patch similarity index 100% rename from patches/server/0089-Replace-class-map-with-optimized-collection.patch rename to patches/server/0088-Replace-class-map-with-optimized-collection.patch diff --git a/patches/server/0090-Replace-throttle-tracker-map-with-optimized-collecti.patch b/patches/server/0089-Replace-throttle-tracker-map-with-optimized-collecti.patch similarity index 100% rename from patches/server/0090-Replace-throttle-tracker-map-with-optimized-collecti.patch rename to patches/server/0089-Replace-throttle-tracker-map-with-optimized-collecti.patch diff --git a/patches/server/0091-Replace-shape-full-block-cache-with-hashtable.patch b/patches/server/0090-Replace-shape-full-block-cache-with-hashtable.patch similarity index 100% rename from patches/server/0091-Replace-shape-full-block-cache-with-hashtable.patch rename to patches/server/0090-Replace-shape-full-block-cache-with-hashtable.patch diff --git a/patches/server/0092-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch b/patches/server/0091-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch similarity index 100% rename from patches/server/0092-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch rename to patches/server/0091-Avoid-Class-isAssignableFrom-call-in-ClassInstanceMu.patch diff --git a/patches/server/0093-Cache-BlockStatePairKey-hash.patch b/patches/server/0092-Cache-BlockStatePairKey-hash.patch similarity index 100% rename from patches/server/0093-Cache-BlockStatePairKey-hash.patch rename to patches/server/0092-Cache-BlockStatePairKey-hash.patch diff --git a/patches/server/0094-Cache-CubeVoxelShape-shape-array.patch b/patches/server/0093-Cache-CubeVoxelShape-shape-array.patch similarity index 100% rename from patches/server/0094-Cache-CubeVoxelShape-shape-array.patch rename to patches/server/0093-Cache-CubeVoxelShape-shape-array.patch diff --git a/patches/server/0095-Replace-division-by-multiplication-in-CubePointRange.patch b/patches/server/0094-Replace-division-by-multiplication-in-CubePointRange.patch similarity index 100% rename from patches/server/0095-Replace-division-by-multiplication-in-CubePointRange.patch rename to patches/server/0094-Replace-division-by-multiplication-in-CubePointRange.patch diff --git a/patches/server/0096-Replace-parts-by-size-in-CubePointRange.patch b/patches/server/0095-Replace-parts-by-size-in-CubePointRange.patch similarity index 100% rename from patches/server/0096-Replace-parts-by-size-in-CubePointRange.patch rename to patches/server/0095-Replace-parts-by-size-in-CubePointRange.patch diff --git a/patches/server/0097-Check-frozen-ticks-before-landing-block.patch b/patches/server/0096-Check-frozen-ticks-before-landing-block.patch similarity index 95% rename from patches/server/0097-Check-frozen-ticks-before-landing-block.patch rename to patches/server/0096-Check-frozen-ticks-before-landing-block.patch index b5f028e..2d9219a 100644 --- a/patches/server/0097-Check-frozen-ticks-before-landing-block.patch +++ b/patches/server/0096-Check-frozen-ticks-before-landing-block.patch @@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 2cd662c58b0a44045b680b73f478e9d9c36f1703..423f3f073e63be06e37af46f5497ba20f3f10664 100644 +index 8e739f81455ef41502b195c360d2e4243c29cda4..765835fd7e05e20c6642171a2e431702eebf2835 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -566,11 +566,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0098-Faster-chunk-serialization.patch b/patches/server/0097-Faster-chunk-serialization.patch similarity index 100% rename from patches/server/0098-Faster-chunk-serialization.patch rename to patches/server/0097-Faster-chunk-serialization.patch diff --git a/patches/server/0099-Update-boss-bar-within-tick.patch b/patches/server/0098-Update-boss-bar-within-tick.patch similarity index 100% rename from patches/server/0099-Update-boss-bar-within-tick.patch rename to patches/server/0098-Update-boss-bar-within-tick.patch diff --git a/patches/server/0100-Cache-ominous-banner-item.patch b/patches/server/0099-Cache-ominous-banner-item.patch similarity index 100% rename from patches/server/0100-Cache-ominous-banner-item.patch rename to patches/server/0099-Cache-ominous-banner-item.patch diff --git a/patches/server/0101-Optimize-world-generation-chunk-and-block-access.patch b/patches/server/0100-Optimize-world-generation-chunk-and-block-access.patch similarity index 100% rename from patches/server/0101-Optimize-world-generation-chunk-and-block-access.patch rename to patches/server/0100-Optimize-world-generation-chunk-and-block-access.patch diff --git a/patches/server/0102-Cache-world-generator-sea-level.patch b/patches/server/0101-Cache-world-generator-sea-level.patch similarity index 100% rename from patches/server/0102-Cache-world-generator-sea-level.patch rename to patches/server/0101-Cache-world-generator-sea-level.patch diff --git a/patches/server/0103-Skip-secondary-POI-sensor-if-absent.patch b/patches/server/0102-Skip-secondary-POI-sensor-if-absent.patch similarity index 100% rename from patches/server/0103-Skip-secondary-POI-sensor-if-absent.patch rename to patches/server/0102-Skip-secondary-POI-sensor-if-absent.patch diff --git a/patches/server/0104-Optimize-villager-data-storage.patch b/patches/server/0103-Optimize-villager-data-storage.patch similarity index 100% rename from patches/server/0104-Optimize-villager-data-storage.patch rename to patches/server/0103-Optimize-villager-data-storage.patch diff --git a/patches/server/0105-Skip-entity-move-if-movement-is-zero.patch b/patches/server/0104-Skip-entity-move-if-movement-is-zero.patch similarity index 93% rename from patches/server/0105-Skip-entity-move-if-movement-is-zero.patch rename to patches/server/0104-Skip-entity-move-if-movement-is-zero.patch index e07ffae..8d5c4be 100644 --- a/patches/server/0105-Skip-entity-move-if-movement-is-zero.patch +++ b/patches/server/0104-Skip-entity-move-if-movement-is-zero.patch @@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 25f3cf277c0a23fd885d9920e0fd9d4b5f522b84..46fc1afdba3dc550bacbec4f5da5081d8eb0051f 100644 +index 9777479e2154146f40bd4b2c1eae3698444b6368..497ab6281fc55ff9ed358db60a2288c0021bbd59 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -299,6 +299,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -36,7 +36,7 @@ index 25f3cf277c0a23fd885d9920e0fd9d4b5f522b84..46fc1afdba3dc550bacbec4f5da5081d // Paper start - detailed watchdog information io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main"); synchronized (this.posLock) { -@@ -3843,6 +3849,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3849,6 +3855,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public final void setBoundingBox(AABB boundingBox) { diff --git a/patches/server/0106-Store-mob-counts-in-an-array.patch b/patches/server/0105-Store-mob-counts-in-an-array.patch similarity index 100% rename from patches/server/0106-Store-mob-counts-in-an-array.patch rename to patches/server/0105-Store-mob-counts-in-an-array.patch diff --git a/patches/server/0107-Use-linked-map-for-entity-trackers.patch b/patches/server/0106-Use-linked-map-for-entity-trackers.patch similarity index 100% rename from patches/server/0107-Use-linked-map-for-entity-trackers.patch rename to patches/server/0106-Use-linked-map-for-entity-trackers.patch diff --git a/patches/server/0108-Optimize-noise-generation.patch b/patches/server/0107-Optimize-noise-generation.patch similarity index 100% rename from patches/server/0108-Optimize-noise-generation.patch rename to patches/server/0107-Optimize-noise-generation.patch diff --git a/patches/server/0109-Optimize-sheep-offspring-color.patch b/patches/server/0108-Optimize-sheep-offspring-color.patch similarity index 100% rename from patches/server/0109-Optimize-sheep-offspring-color.patch rename to patches/server/0108-Optimize-sheep-offspring-color.patch diff --git a/patches/server/0110-Ignore-durability-change-equipment-updates.patch b/patches/server/0109-Ignore-durability-change-equipment-updates.patch similarity index 93% rename from patches/server/0110-Ignore-durability-change-equipment-updates.patch rename to patches/server/0109-Ignore-durability-change-equipment-updates.patch index e128478..d8b5abe 100644 --- a/patches/server/0110-Ignore-durability-change-equipment-updates.patch +++ b/patches/server/0109-Ignore-durability-change-equipment-updates.patch @@ -13,7 +13,7 @@ As part of: Slice (https://github.com/Cryptite/Slice) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 423f3f073e63be06e37af46f5497ba20f3f10664..17dbade3fa91ccc3db8792b5c2c9374ad3d61337 100644 +index 765835fd7e05e20c6642171a2e431702eebf2835..55489052b3472c43c71de3b5ec907f2526d81caf 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3113,7 +3113,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -26,10 +26,10 @@ index 423f3f073e63be06e37af46f5497ba20f3f10664..17dbade3fa91ccc3db8792b5c2c9374a private void handleHandSwap(Map equipmentChanges) { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8155a806ccb200b8883ce6734c5b7e34338060ee..08638e5982083835cd90243e6edf45088ab695be 100644 +index 29a11bbcab84e66cb8adf9df2ea9feef4da601e8..f2c3d0913ee37e4f2d5f409f47581be9d8b2fa3d 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -740,10 +740,22 @@ public final class ItemStack { +@@ -748,10 +748,22 @@ public final class ItemStack { return left == right ? true : (!left.isEmpty() && !right.isEmpty() ? left.sameItem(right) : false); } diff --git a/patches/server/0111-Hide-flames-on-entities-with-fire-resistance.patch b/patches/server/0110-Hide-flames-on-entities-with-fire-resistance.patch similarity index 96% rename from patches/server/0111-Hide-flames-on-entities-with-fire-resistance.patch rename to patches/server/0110-Hide-flames-on-entities-with-fire-resistance.patch index e96ca84..d536042 100644 --- a/patches/server/0111-Hide-flames-on-entities-with-fire-resistance.patch +++ b/patches/server/0110-Hide-flames-on-entities-with-fire-resistance.patch @@ -13,7 +13,7 @@ As part of: Slice (https://github.com/Cryptite/Slice) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 46fc1afdba3dc550bacbec4f5da5081d8eb0051f..70b9efbbee8ad78538379459d4e3b10c688acad6 100644 +index 497ab6281fc55ff9ed358db60a2288c0021bbd59..fcf9120663a19a31f6de9e791508dccc23d14893 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -870,7 +870,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0112-Skip-cloning-advancement-criteria.patch b/patches/server/0111-Skip-cloning-advancement-criteria.patch similarity index 100% rename from patches/server/0112-Skip-cloning-advancement-criteria.patch rename to patches/server/0111-Skip-cloning-advancement-criteria.patch diff --git a/patches/server/0113-Reduce-block-destruction-packet-allocations.patch b/patches/server/0112-Reduce-block-destruction-packet-allocations.patch similarity index 95% rename from patches/server/0113-Reduce-block-destruction-packet-allocations.patch rename to patches/server/0112-Reduce-block-destruction-packet-allocations.patch index f3f1959..1ee0d52 100644 --- a/patches/server/0113-Reduce-block-destruction-packet-allocations.patch +++ b/patches/server/0112-Reduce-block-destruction-packet-allocations.patch @@ -13,7 +13,7 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c0eeab42651ed013633a507ee7d1ab4b83a6072c..91a6366306c6e5df1c2adf411f4fe2d02fb89b2d 100644 +index 5eb689cb445c0cf8b645e543c8c3a324b1eca536..781f0fefe3e1ed7db92d81890e6b39ca7aa91f7a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1553,7 +1553,17 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0114-Send-set-head-rotation-packets-only-for-living-entit.patch b/patches/server/0113-Send-set-head-rotation-packets-only-for-living-entit.patch similarity index 100% rename from patches/server/0114-Send-set-head-rotation-packets-only-for-living-entit.patch rename to patches/server/0113-Send-set-head-rotation-packets-only-for-living-entit.patch diff --git a/patches/server/0115-Spread-out-sending-all-player-info.patch b/patches/server/0114-Spread-out-sending-all-player-info.patch similarity index 95% rename from patches/server/0115-Spread-out-sending-all-player-info.patch rename to patches/server/0114-Spread-out-sending-all-player-info.patch index c56b6a2..2900ae0 100644 --- a/patches/server/0115-Spread-out-sending-all-player-info.patch +++ b/patches/server/0114-Spread-out-sending-all-player-info.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c711b0423 100644 +index e8d89c582ecd6517eb41da28b1249072ab099b32..94f0a36f669775f2a6a143cbb6010b524bf94fd1 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -15,6 +15,8 @@ import java.net.SocketAddress; @@ -49,7 +49,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c import java.util.Collection; import java.util.EnumSet; import java.util.Iterator; -@@ -137,10 +139,11 @@ public abstract class PlayerList { +@@ -138,10 +140,11 @@ public abstract class PlayerList { public static final File WHITELIST_FILE = new File("whitelist.json"); public static final Component CHAT_FILTERED_FULL = Component.translatable("chat.filtered_full"); private static final Logger LOGGER = LogUtils.getLogger(); @@ -62,7 +62,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c private final Map playersByUUID = Maps.newHashMap(); private final UserBanList bans; private final IpBanList ipBans; -@@ -307,6 +310,7 @@ public abstract class PlayerList { +@@ -312,6 +315,7 @@ public abstract class PlayerList { // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // Paper this.players.add(player); @@ -70,7 +70,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot this.playersByUUID.put(player.getUUID(), player); // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below -@@ -641,6 +645,7 @@ public abstract class PlayerList { +@@ -646,6 +650,7 @@ public abstract class PlayerList { worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER); entityplayer.getAdvancements().stopListening(); this.players.remove(entityplayer); @@ -78,7 +78,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer); UUID uuid = entityplayer.getUUID(); -@@ -794,6 +799,7 @@ public abstract class PlayerList { +@@ -799,6 +804,7 @@ public abstract class PlayerList { // Paper end entityplayer.stopRiding(); // CraftBukkit this.players.remove(entityplayer); @@ -86,7 +86,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot entityplayer.getLevel().removePlayerImmediately(entityplayer, Entity.RemovalReason.DISCARDED); BlockPos blockposition = entityplayer.getRespawnPosition(); -@@ -931,6 +937,7 @@ public abstract class PlayerList { +@@ -936,6 +942,7 @@ public abstract class PlayerList { if (!entityplayer.connection.isDisconnected()) { worldserver1.addRespawnedPlayer(entityplayer1); this.players.add(entityplayer1); @@ -94,7 +94,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c this.playersByName.put(entityplayer1.getScoreboardName().toLowerCase(java.util.Locale.ROOT), entityplayer1); // Spigot this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1); } -@@ -983,20 +990,55 @@ public abstract class PlayerList { +@@ -988,20 +995,55 @@ public abstract class PlayerList { this.sendPlayerPermissionLevel(player, i); } @@ -157,7 +157,7 @@ index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c } 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 9e7b5b876ec7aa90bf46afa6992fc59e67aedc9b..512df472a5eca2017b8eb92b8cc6283936a1098a 100644 +index 65e356449e9c96c937b45eaab94aa6cc4296fcb9..b28e0b2d2dfc46fa568ab23dc003d1c9abb1f18a 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -40,6 +40,7 @@ import net.minecraft.network.syncher.SynchedEntityData; diff --git a/patches/server/0116-Optimize-player-list-for-sending-player-info.patch b/patches/server/0115-Optimize-player-list-for-sending-player-info.patch similarity index 95% rename from patches/server/0116-Optimize-player-list-for-sending-player-info.patch rename to patches/server/0115-Optimize-player-list-for-sending-player-info.patch index b6852fc..eaa3c79 100644 --- a/patches/server/0116-Optimize-player-list-for-sending-player-info.patch +++ b/patches/server/0115-Optimize-player-list-for-sending-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b48f8320f92ebe191d4ce3c944f2f29c711b0423..96c17b9a79bb2d5fc41d646b7e3714fb28fb5960 100644 +index 94f0a36f669775f2a6a143cbb6010b524bf94fd1..8863ac03186251b9bc234401493a18f1d4a98d3b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1026,14 +1026,18 @@ public abstract class PlayerList { +@@ -1031,14 +1031,18 @@ public abstract class PlayerList { // Gale start - Purpur - spread out sending all player info ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn]; if (sendAllPlayerInfoBucket != null) { diff --git a/patches/server/0117-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/patches/server/0116-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch similarity index 100% rename from patches/server/0117-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch rename to patches/server/0116-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch diff --git a/patches/server/0118-Send-multiple-keep-alive-packets.patch b/patches/server/0117-Send-multiple-keep-alive-packets.patch similarity index 95% rename from patches/server/0118-Send-multiple-keep-alive-packets.patch rename to patches/server/0117-Send-multiple-keep-alive-packets.patch index ea6e7d7..c0ade18 100644 --- a/patches/server/0118-Send-multiple-keep-alive-packets.patch +++ b/patches/server/0117-Send-multiple-keep-alive-packets.patch @@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9934b65f7 100644 +index a3854010434a1550d26c22c16e9978e9e5fdb3af..0a0c829b4884ae5bf48e652a607d04f5c094929d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader; @@ -49,7 +49,7 @@ index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9 import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectIterator; import java.net.SocketAddress; -@@ -262,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -263,6 +265,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private long keepAliveTime = Util.getMillis(); private boolean keepAlivePending; private long keepAliveChallenge; @@ -57,7 +57,7 @@ index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9 // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits -@@ -299,7 +302,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -301,7 +304,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private final LastSeenMessagesValidator lastSeenMessages; private final MessageSignatureCache messageSignatureCache; private final FutureChain chatMessageChain; @@ -69,7 +69,7 @@ index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9 private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper private String clientBrandName = null; // Paper - Brand name -@@ -398,6 +404,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -400,6 +406,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic long currentTime = Util.getMillis(); long elapsedTime = currentTime - this.keepAliveTime; @@ -91,7 +91,7 @@ index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9 if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info -@@ -3486,6 +3507,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3496,6 +3517,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { diff --git a/patches/server/0119-Make-slow-login-timeout-configurable.patch b/patches/server/0118-Make-slow-login-timeout-configurable.patch similarity index 100% rename from patches/server/0119-Make-slow-login-timeout-configurable.patch rename to patches/server/0118-Make-slow-login-timeout-configurable.patch diff --git a/patches/server/0120-Make-max-interaction-distance-configurable.patch b/patches/server/0119-Make-max-interaction-distance-configurable.patch similarity index 93% rename from patches/server/0120-Make-max-interaction-distance-configurable.patch rename to patches/server/0119-Make-max-interaction-distance-configurable.patch index e06a610..c490aaf 100644 --- a/patches/server/0120-Make-max-interaction-distance-configurable.patch +++ b/patches/server/0119-Make-max-interaction-distance-configurable.patch @@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 0a3eb5e929c605d9eb7369de8ade8b49951f5d37..adb72105dc98c9052ced2288362f58aa9f298237 100644 +index 1d33c02088c150189d7f4b0aa27f6a1de96b11cf..4c8275728175ebc1fdc8d0e8d0ba8398cefa0e17 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -173,7 +173,7 @@ public class ServerPlayerGameMode { @@ -20,10 +20,10 @@ index 0a3eb5e929c605d9eb7369de8ade8b49951f5d37..adb72105dc98c9052ced2288362f58aa this.debugLogging(pos, false, sequence, "too far"); } else if (pos.getY() >= worldHeight) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 15611b8970b6cfb733a9f733d64d75c9934b65f7..25a8d3a1302c36f46eb3e0f9a5a532a329165fd7 100644 +index 0a0c829b4884ae5bf48e652a607d04f5c094929d..a7772ffe063485865812608999e5b6daa2ecc342 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -252,7 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -253,7 +253,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic static final Logger LOGGER = LogUtils.getLogger(); private static final int LATENCY_CHECK_INTERVAL = 15000; @@ -32,7 +32,7 @@ index 15611b8970b6cfb733a9f733d64d75c9934b65f7..25a8d3a1302c36f46eb3e0f9a5a532a3 private static final int NO_BLOCK_UPDATES_TO_ACK = -1; private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096; private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed"); -@@ -349,6 +349,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -351,6 +351,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end @@ -46,7 +46,7 @@ index 15611b8970b6cfb733a9f733d64d75c9934b65f7..25a8d3a1302c36f46eb3e0f9a5a532a3 @Override public void tick() { if (this.ackBlockChangesUpTo > -1) { -@@ -1958,7 +1965,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1967,7 +1974,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = movingobjectpositionblock.getBlockPos(); Vec3 vec3d1 = Vec3.atCenterOf(blockposition); @@ -55,7 +55,7 @@ index 15611b8970b6cfb733a9f733d64d75c9934b65f7..25a8d3a1302c36f46eb3e0f9a5a532a3 Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; -@@ -2810,7 +2817,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2820,7 +2827,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = entity.getBoundingBox(); diff --git a/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch b/patches/server/0120-Load-portal-destination-chunk-before-entity-teleport.patch similarity index 97% rename from patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch rename to patches/server/0120-Load-portal-destination-chunk-before-entity-teleport.patch index 372284c..081d602 100644 --- a/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch +++ b/patches/server/0120-Load-portal-destination-chunk-before-entity-teleport.patch @@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 70b9efbbee8ad78538379459d4e3b10c688acad6..7945c979d229d0cae099ffee8568f4a9906ea819 100644 +index fcf9120663a19a31f6de9e791508dccc23d14893..bb552160cb9e1aebdac9e4a7756dcb5caa2d7a38 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3475,6 +3475,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0122-Don-t-load-chunks-to-spawn-phantoms.patch b/patches/server/0121-Don-t-load-chunks-to-spawn-phantoms.patch similarity index 100% rename from patches/server/0122-Don-t-load-chunks-to-spawn-phantoms.patch rename to patches/server/0121-Don-t-load-chunks-to-spawn-phantoms.patch diff --git a/patches/server/0123-Don-t-load-chunks-to-activate-climbing-entities.patch b/patches/server/0122-Don-t-load-chunks-to-activate-climbing-entities.patch similarity index 94% rename from patches/server/0123-Don-t-load-chunks-to-activate-climbing-entities.patch rename to patches/server/0122-Don-t-load-chunks-to-activate-climbing-entities.patch index acffd3f..2f157f7 100644 --- a/patches/server/0123-Don-t-load-chunks-to-activate-climbing-entities.patch +++ b/patches/server/0122-Don-t-load-chunks-to-activate-climbing-entities.patch @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7945c979d229d0cae099ffee8568f4a9906ea819..24a6a1fb433ed8a5220cd68488d0244e8215bc5a 100644 +index bb552160cb9e1aebdac9e4a7756dcb5caa2d7a38..a22af530f632be0168026a5cbfc75162e23bc22e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4378,6 +4378,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4384,6 +4384,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.feetBlockState; } @@ -28,7 +28,7 @@ index 7945c979d229d0cae099ffee8568f4a9906ea819..24a6a1fb433ed8a5220cd68488d0244e return this.chunkPosition; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 17dbade3fa91ccc3db8792b5c2c9374ad3d61337..a076e8b852a87b67602a21f07048da1570226a81 100644 +index 55489052b3472c43c71de3b5ec907f2526d81caf..9d5150aec55411abb5192f2e5cd59b3e1038a35c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1943,19 +1943,43 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0124-Broadcast-crit-animations-as-the-entity-being-critte.patch b/patches/server/0123-Broadcast-crit-animations-as-the-entity-being-critte.patch similarity index 96% rename from patches/server/0124-Broadcast-crit-animations-as-the-entity-being-critte.patch rename to patches/server/0123-Broadcast-crit-animations-as-the-entity-being-critte.patch index 221e259..c47b51b 100644 --- a/patches/server/0124-Broadcast-crit-animations-as-the-entity-being-critte.patch +++ b/patches/server/0123-Broadcast-crit-animations-as-the-entity-being-critte.patch @@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2dcab455bdc6b0742cd2322062678aa7cd173c79..37b6064586452c46c1417510c4130fbaeb2694db 100644 +index 1f74a55093367ffb3ed8ed39d2e6d0a1275bf97a..e61155ad48b9055a5744b7d1724f6e9dc901440d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1850,12 +1850,18 @@ public class ServerPlayer extends Player { +@@ -1861,12 +1861,18 @@ public class ServerPlayer extends Player { @Override public void crit(Entity target) { diff --git a/patches/server/0125-Ignore-null-legacy-structure-data.patch b/patches/server/0124-Ignore-null-legacy-structure-data.patch similarity index 100% rename from patches/server/0125-Ignore-null-legacy-structure-data.patch rename to patches/server/0124-Ignore-null-legacy-structure-data.patch diff --git a/patches/server/0126-Don-t-double-save-stored-user-lists.patch b/patches/server/0125-Don-t-double-save-stored-user-lists.patch similarity index 97% rename from patches/server/0126-Don-t-double-save-stored-user-lists.patch rename to patches/server/0125-Don-t-double-save-stored-user-lists.patch index dc12283..b0b04af 100644 --- a/patches/server/0126-Don-t-double-save-stored-user-lists.patch +++ b/patches/server/0125-Don-t-double-save-stored-user-lists.patch @@ -31,7 +31,7 @@ index 935dac757280731bfeb0a8f033cbe315ecac46da..a9786790620d4100b52fafc15933d312 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java -index 61cb647b2aa590303402e6652bd37b5bca0e0b1d..620784dbbf5e57dc855b4d38a3b05c3411e64040 100644 +index 30f2ddff4108e92eaac50317bdd9ef4eb25ec085..027855cc99b0fad7a8d3967b6c0b2037b3a52574 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java @@ -41,12 +41,6 @@ public class CraftIpBanList implements org.bukkit.BanList { diff --git a/patches/server/0127-Skip-unnecessary-mob-spawning-computations.patch b/patches/server/0126-Skip-unnecessary-mob-spawning-computations.patch similarity index 100% rename from patches/server/0127-Skip-unnecessary-mob-spawning-computations.patch rename to patches/server/0126-Skip-unnecessary-mob-spawning-computations.patch diff --git a/patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0127-Prevent-entities-random-strolling-into-non-ticking-c.patch similarity index 100% rename from patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch rename to patches/server/0127-Prevent-entities-random-strolling-into-non-ticking-c.patch diff --git a/patches/server/0129-Do-not-place-player-in-world-if-kicked-before-being-.patch b/patches/server/0128-Do-not-place-player-in-world-if-kicked-before-being-.patch similarity index 92% rename from patches/server/0129-Do-not-place-player-in-world-if-kicked-before-being-.patch rename to patches/server/0128-Do-not-place-player-in-world-if-kicked-before-being-.patch index 4b4a4d0..9f5dee7 100644 --- a/patches/server/0129-Do-not-place-player-in-world-if-kicked-before-being-.patch +++ b/patches/server/0128-Do-not-place-player-in-world-if-kicked-before-being-.patch @@ -14,10 +14,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 96c17b9a79bb2d5fc41d646b7e3714fb28fb5960..4c53d20b593a734c6bb82c94f0ec51af21f3a32e 100644 +index 8863ac03186251b9bc234401493a18f1d4a98d3b..add4649d2003f5ac38abeb372e4a6de9ee377489 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -254,6 +254,13 @@ public abstract class PlayerList { +@@ -259,6 +259,13 @@ public abstract class PlayerList { org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(spawnPlayer, spawnPlayer.getLocation()); // Paper use our duplicate event this.cserver.getPluginManager().callEvent(ev); diff --git a/patches/server/0130-CraftBukkit-UUID-to-world-map.patch b/patches/server/0129-CraftBukkit-UUID-to-world-map.patch similarity index 91% rename from patches/server/0130-CraftBukkit-UUID-to-world-map.patch rename to patches/server/0129-CraftBukkit-UUID-to-world-map.patch index a543ba1..5bc273a 100644 --- a/patches/server/0130-CraftBukkit-UUID-to-world-map.patch +++ b/patches/server/0129-CraftBukkit-UUID-to-world-map.patch @@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 02b51a9eca5796825c5d500220ff18895dea3299..f069a04d8f4a3b2f05767955f8f00becdc574dc2 100644 +index 349b73d0e50499557237650a3c766bffa4943713..5f77acf3e0d68985bf2b27d13f0f51e6e3a6cf1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -41,6 +41,9 @@ import java.util.logging.Level; @@ -34,7 +34,7 @@ index 02b51a9eca5796825c5d500220ff18895dea3299..f069a04d8f4a3b2f05767955f8f00bec private final Map, Registry> registries = new HashMap<>(); private YamlConfiguration configuration; private YamlConfiguration commandsConfiguration; -@@ -1320,6 +1324,7 @@ public final class CraftServer implements Server { +@@ -1316,6 +1320,7 @@ public final class CraftServer implements Server { this.getLogger().log(Level.SEVERE, null, ex); } @@ -42,7 +42,7 @@ index 02b51a9eca5796825c5d500220ff18895dea3299..f069a04d8f4a3b2f05767955f8f00bec this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH)); this.console.removeLevel(handle); return true; -@@ -1338,12 +1343,7 @@ public final class CraftServer implements Server { +@@ -1334,12 +1339,7 @@ public final class CraftServer implements Server { @Override public World getWorld(UUID uid) { @@ -56,7 +56,7 @@ index 02b51a9eca5796825c5d500220ff18895dea3299..f069a04d8f4a3b2f05767955f8f00bec } // Paper start -@@ -1361,6 +1361,7 @@ public final class CraftServer implements Server { +@@ -1357,6 +1357,7 @@ public final class CraftServer implements Server { System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world."); return; } diff --git a/patches/server/0131-Global-EULA-file.patch b/patches/server/0130-Global-EULA-file.patch similarity index 100% rename from patches/server/0131-Global-EULA-file.patch rename to patches/server/0130-Global-EULA-file.patch diff --git a/patches/server/0132-Specific-interval-TPS-API.patch b/patches/server/0131-Specific-interval-TPS-API.patch similarity index 88% rename from patches/server/0132-Specific-interval-TPS-API.patch rename to patches/server/0131-Specific-interval-TPS-API.patch index 3c89795..d3a83c7 100644 --- a/patches/server/0132-Specific-interval-TPS-API.patch +++ b/patches/server/0131-Specific-interval-TPS-API.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f069a04d8f4a3b2f05767955f8f00becdc574dc2..ffd6decc34a5fc30893a958f7ab6bd0273fba1a8 100644 +index 5f77acf3e0d68985bf2b27d13f0f51e6e3a6cf1c..7d6d49e8bb87b6bc54cfb51793fcb60d979b1e4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2713,6 +2713,25 @@ public final class CraftServer implements Server { +@@ -2709,6 +2709,25 @@ public final class CraftServer implements Server { }; } diff --git a/patches/server/0133-5-second-TPS-average.patch b/patches/server/0132-5-second-TPS-average.patch similarity index 82% rename from patches/server/0133-5-second-TPS-average.patch rename to patches/server/0132-5-second-TPS-average.patch index 446cb68..b748a84 100644 --- a/patches/server/0133-5-second-TPS-average.patch +++ b/patches/server/0132-5-second-TPS-average.patch @@ -59,10 +59,10 @@ index fa56cd09102a89692b42f1d14257990508c5c720..fac07dda413002c12276131efbe4ee38 setListData(vector); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7e4cb5c0c8cf9e75a709f18d170fc2ff658d9357..bfaab8a9bdde515db9694b7b504fe272835b5f14 100644 +index 71b4de55621ef7bb2df4fbfc611ce32023cdd628..b298c9715fed604dab25e9d336806acf110f822a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1036,6 +1036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && args[0].equals("mem") && sender.hasPermission("bukkit.command.tpsmemory")) { - sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); - if (!hasShownMemoryWarning) { diff --git a/patches/server/0134-Measure-last-tick-time.patch b/patches/server/0133-Measure-last-tick-time.patch similarity index 92% rename from patches/server/0134-Measure-last-tick-time.patch rename to patches/server/0133-Measure-last-tick-time.patch index cfd89e9..e692773 100644 --- a/patches/server/0134-Measure-last-tick-time.patch +++ b/patches/server/0133-Measure-last-tick-time.patch @@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c727b4fa39a7598c23ccc05add204e1b3a001436..ecb20dfad282fd282f937fdf340847086c8dea5b 100644 +index b298c9715fed604dab25e9d336806acf110f822a..df7e5ac7f56f31f3feac0096013f49c7948d5104 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1086,6 +1086,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && args[0].equals("mem") && sender.hasPermission("bukkit.command.tpsmemory")) { - sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)"); - if (!hasShownMemoryWarning) { -@@ -50,4 +71,16 @@ public class TicksPerSecondCommand extends Command - return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() - + ( ( tps > 21.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); // Paper - only print * at 21, we commonly peak to 20.02 as the tick sleep is not accurate enough, stop the noise + sender.sendMessage(net.kyori.adventure.text.Component.text() + .append(net.kyori.adventure.text.Component.text("Current Memory Usage: ", net.kyori.adventure.text.format.NamedTextColor.GOLD)) +@@ -66,4 +87,16 @@ public class TicksPerSecondCommand extends Command + return net.kyori.adventure.text.Component.text(amount, color); + // Paper end } + + // Gale start - YAPFA - last tick time - in TPS command diff --git a/patches/server/0137-Increase-time-statistics-in-intervals.patch b/patches/server/0136-Increase-time-statistics-in-intervals.patch similarity index 98% rename from patches/server/0137-Increase-time-statistics-in-intervals.patch rename to patches/server/0136-Increase-time-statistics-in-intervals.patch index 1a5cc71..a00c79f 100644 --- a/patches/server/0137-Increase-time-statistics-in-intervals.patch +++ b/patches/server/0136-Increase-time-statistics-in-intervals.patch @@ -45,7 +45,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 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 512df472a5eca2017b8eb92b8cc6283936a1098a..7b0dbfaab5951aaf09c36bc5112d953585f0098a 100644 +index b28e0b2d2dfc46fa568ab23dc003d1c9abb1f18a..271833821eb1c5f6975a9742ffc2deba01fa25da 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -116,6 +116,7 @@ import net.minecraft.world.phys.AABB; diff --git a/patches/server/0138-For-collision-check-has-physics-before-same-vehicle.patch b/patches/server/0137-For-collision-check-has-physics-before-same-vehicle.patch similarity index 94% rename from patches/server/0138-For-collision-check-has-physics-before-same-vehicle.patch rename to patches/server/0137-For-collision-check-has-physics-before-same-vehicle.patch index be63196..0bc8e06 100644 --- a/patches/server/0138-For-collision-check-has-physics-before-same-vehicle.patch +++ b/patches/server/0137-For-collision-check-has-physics-before-same-vehicle.patch @@ -16,7 +16,7 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 24a6a1fb433ed8a5220cd68488d0244e8215bc5a..7ae7d4121344b9edae6105be8709e471dd857286 100644 +index a22af530f632be0168026a5cbfc75162e23bc22e..738b906facc7dab90f31823b3dfd401f88e811d3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1989,8 +1989,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0139-Skip-negligible-planar-movement-multiplication.patch b/patches/server/0138-Skip-negligible-planar-movement-multiplication.patch similarity index 94% rename from patches/server/0139-Skip-negligible-planar-movement-multiplication.patch rename to patches/server/0138-Skip-negligible-planar-movement-multiplication.patch index 3c52d13..243ba02 100644 --- a/patches/server/0139-Skip-negligible-planar-movement-multiplication.patch +++ b/patches/server/0138-Skip-negligible-planar-movement-multiplication.patch @@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7ae7d4121344b9edae6105be8709e471dd857286..697fad59a6ab4fb41aac65979b42d8ed4b4c8c21 100644 +index 738b906facc7dab90f31823b3dfd401f88e811d3..5f5d5aad855c64719420b0c67f543a118ee761e4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1189,9 +1189,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0140-Optimize-identical-item-checks.patch b/patches/server/0139-Optimize-identical-item-checks.patch similarity index 92% rename from patches/server/0140-Optimize-identical-item-checks.patch rename to patches/server/0139-Optimize-identical-item-checks.patch index 16f65ff..507a20c 100644 --- a/patches/server/0140-Optimize-identical-item-checks.patch +++ b/patches/server/0139-Optimize-identical-item-checks.patch @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 08638e5982083835cd90243e6edf45088ab695be..32d5676339365dc1a4d1ea481f40bcdb7cbf6c07 100644 +index f2c3d0913ee37e4f2d5f409f47581be9d8b2fa3d..e501450728e72c7e69a9009a26efbb813ff9ff42 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -725,14 +725,29 @@ public final class ItemStack { +@@ -733,14 +733,29 @@ public final class ItemStack { } public static boolean tagMatches(ItemStack left, ItemStack right) { diff --git a/patches/server/0141-Reduce-RandomSource-instances.patch b/patches/server/0140-Reduce-RandomSource-instances.patch similarity index 96% rename from patches/server/0141-Reduce-RandomSource-instances.patch rename to patches/server/0140-Reduce-RandomSource-instances.patch index 82884e1..0b5c110 100644 --- a/patches/server/0141-Reduce-RandomSource-instances.patch +++ b/patches/server/0140-Reduce-RandomSource-instances.patch @@ -13,7 +13,7 @@ As part of: Patina (https://github.com/PatinaMC/Patina) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java -index 0f094a337a7cc94b203a27e657d138749728c911..14d7223ee4552f6714945d40c29bda3f516d81d6 100644 +index 591163d8f8300b084ac734800efee902c4def958..387c390966ddbc48aa7333f7199b792755ffcd04 100644 --- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java +++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java @@ -65,7 +65,7 @@ public class SpreadPlayersCommand { @@ -26,10 +26,10 @@ index 0f094a337a7cc94b203a27e657d138749728c911..14d7223ee4552f6714945d40c29bda3f double d1 = (double) (center.y - maxRange); double d2 = (double) (center.x + maxRange); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 37b6064586452c46c1417510c4130fbaeb2694db..aee10fe735b4ccbafbd92908890989b6b8b3685d 100644 +index e61155ad48b9055a5744b7d1724f6e9dc901440d..3611844b0e925af88975d56ecf94b21b3bbbcb9f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -397,7 +397,7 @@ public class ServerPlayer extends Player { +@@ -398,7 +398,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -38,7 +38,7 @@ index 37b6064586452c46c1417510c4130fbaeb2694db..aee10fe735b4ccbafbd92908890989b6 for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; -@@ -434,7 +434,7 @@ public class ServerPlayer extends Player { +@@ -435,7 +435,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); diff --git a/patches/server/0142-Server-thread-priority-environment-variable.patch b/patches/server/0141-Server-thread-priority-environment-variable.patch similarity index 80% rename from patches/server/0142-Server-thread-priority-environment-variable.patch rename to patches/server/0141-Server-thread-priority-environment-variable.patch index 5367ba4..ae167cc 100644 --- a/patches/server/0142-Server-thread-priority-environment-variable.patch +++ b/patches/server/0141-Server-thread-priority-environment-variable.patch @@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ecb20dfad282fd282f937fdf340847086c8dea5b..1df5c36ba713134fdb8dc643ea1df66c4f818125 100644 +index df7e5ac7f56f31f3feac0096013f49c7948d5104..9a7ef74ad82b1de6e386994dea0d99a9240ad7af 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -194,6 +194,8 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -18,8 +18,8 @@ index ecb20dfad282fd282f937fdf340847086c8dea5b..1df5c36ba713134fdb8dc643ea1df66c + private static MinecraftServer SERVER; // Paper public static final Logger LOGGER = LogUtils.getLogger(); - public static final String VANILLA_BRAND = "vanilla"; -@@ -320,7 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper - Fix preemptive player kick on a server shutdown. packetProcessing.push(listener); // Paper - detailed watchdog information diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index b46e64bbfe4530917ff941292464acf71c7fab60..5a502c70df11a996c7ef702d9caa160666ce5783 100644 +index 95462967b057e00b0616857e3c4eb05e5840ba3d..6e05408e299bd72777142bf3fafb17ecdbd50e17 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -1,12 +1,10 @@ @@ -590,7 +590,7 @@ index b46e64bbfe4530917ff941292464acf71c7fab60..5a502c70df11a996c7ef702d9caa1606 WorldLoader.InitConfig worldloader_c = Main.loadOrCreateConfig(dedicatedserversettings.getProperties(), convertable_conversionsession, flag, resourcepackrepository); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605e3a98a2c 100644 +index 9a7ef74ad82b1de6e386994dea0d99a9240ad7af..fe35347639364caf5edfca799f68fd4b41b9e913 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -41,10 +41,8 @@ import java.util.Optional; @@ -624,25 +624,22 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 import net.minecraft.world.Difficulty; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.ai.village.VillageSiege; -@@ -161,7 +148,17 @@ import net.minecraft.world.level.storage.loot.LootTables; +@@ -161,7 +148,14 @@ import net.minecraft.world.level.storage.loot.LootTables; import net.minecraft.world.level.storage.loot.PredicateManager; import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; -+import org.apache.commons.lang3.Validate; +import org.galemc.gale.executor.MinecraftServerBlockableEventLoop; import org.galemc.gale.configuration.GaleConfigurations; +import org.galemc.gale.executor.annotation.thread.OriginalServerThreadOnly; -+import org.galemc.gale.executor.queue.BaseTaskQueues; +import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues; +import org.galemc.gale.executor.thread.BaseThread; +import org.galemc.gale.executor.thread.OriginalServerThread; -+import org.galemc.gale.executor.thread.SignalReason; +import org.galemc.gale.executor.thread.pool.BaseThreadActivation; +import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; // CraftBukkit start -@@ -181,23 +178,26 @@ import net.minecraft.world.level.levelgen.PatrolSpawner; +@@ -181,24 +175,27 @@ import net.minecraft.world.level.levelgen.PatrolSpawner; import net.minecraft.world.level.levelgen.PhantomSpawner; import net.minecraft.world.level.levelgen.WorldDimensions; import net.minecraft.world.level.levelgen.presets.WorldPresets; @@ -673,11 +670,12 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 + + // Gale end - base thread pool public static final Logger LOGGER = LogUtils.getLogger(); + public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper + public static final Optional THREAD_DEBUG_LOGGER = Boolean.FALSE ? Optional.of(LogUtils.prefixLoggerWithThread(LogUtils.prefixLogger(LogUtils.getLogger(), () -> "TEMP DEBUG - "))) : Optional.empty(); // Gale - base thread pool - temporary debug logger public static final String VANILLA_BRAND = "vanilla"; private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; private static final int TICK_STATS_SPAN = 100; -@@ -229,6 +229,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registries; private Map, ServerLevel> levels; @@ -688,7 +686,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 private PlayerList playerList; private volatile boolean running; private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart -@@ -258,10 +262,114 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; @@ -816,7 +814,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -306,9 +414,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop holdergetter = this.registries.compositeAccess().registryOrThrow(Registries.BLOCK).asLookup().filterFeatures(this.worldData.enabledFeatures()); this.structureTemplateManager = new StructureTemplateManager(worldstem.resourceManager(), convertable_conversionsession, datafixer, holdergetter); @@ -862,7 +860,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 this.executor = Util.backgroundExecutor(); } // CraftBukkit start -@@ -601,7 +715,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop loadStatusIcon() { Optional optional = Optional.of(this.getFile("server-icon.png").toPath()).filter((path) -> { return Files.isRegularFile(path, new LinkOption[0]); -@@ -1375,14 +1485,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 5000000000L) { this.lastServerStatus = i; -@@ -1400,7 +1515,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0) { this.playerList.saveAll(playerSaveInterval); } @@ -1181,7 +1179,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 if (level.paperConfig().chunks.autoSaveInterval.value() > 0) { level.saveIncrementally(fullSave); } -@@ -1412,7 +1527,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper -@@ -1591,7 +1704,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels); newLevels.put(level.dimension(), level); this.levels = Collections.unmodifiableMap(newLevels); @@ -1247,7 +1245,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 } public void removeLevel(ServerLevel level) { -@@ -1620,6 +1745,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels); newLevels.remove(level.dimension()); this.levels = Collections.unmodifiableMap(newLevels); @@ -1262,7 +1260,7 @@ index 672f4acdb43dca3714e26b47a7b8269d0de829ad..b9dfe7aa02d8ac8b254f857756385605 } // CraftBukkit end -@@ -1627,8 +1760,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop CompletableFuture filterTextPacket(T text, BiFunction> filterer) { -@@ -893,13 +894,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -902,13 +903,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -1515,7 +1513,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a return; } // Paper end -@@ -924,7 +925,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -933,7 +934,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!event.isHandled()) { if (!event.isCancelled()) { @@ -1524,7 +1522,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { -@@ -935,7 +936,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -944,7 +945,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.connection.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestEvent.getSuggestions())); // Paper end - Brigadier API }); @@ -1533,7 +1531,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a } } else if (!completions.isEmpty()) { final com.mojang.brigadier.suggestion.SuggestionsBuilder builder0 = new com.mojang.brigadier.suggestion.SuggestionsBuilder(command, stringreader.getTotalLength()); -@@ -1249,7 +1250,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1258,7 +1259,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; if (byteLength > 256 * 4) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!"); @@ -1542,7 +1540,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a return; } byteTotal += byteLength; -@@ -1272,14 +1273,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1281,14 +1282,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -1559,7 +1557,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -2071,10 +2072,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2080,10 +2081,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleTeleportToEntityPacket(ServerboundTeleportToEntityPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (this.player.isSpectator()) { @@ -1571,7 +1569,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a Entity entity = packet.getEntity(worldserver); if (entity != null) { -@@ -2225,9 +2223,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2235,9 +2233,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -1583,7 +1581,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a } else { Optional optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -2261,9 +2259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2271,9 +2269,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -1595,7 +1593,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a } else { Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -2345,9 +2343,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2355,9 +2353,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { if (GaleGlobalConfiguration.get().logToConsole.chat.outOfOrderMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper // Gale - do not log out-of-order message warnings @@ -1608,7 +1606,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a return Optional.empty(); } else { Optional optional = this.unpackAndApplyLastSeen(acknowledgment); -@@ -3310,7 +3308,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3320,7 +3318,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -1618,7 +1616,7 @@ index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4c53d20b593a734c6bb82c94f0ec51af21f3a32e..996f4debc4e5fd2aa6097a0d9769481b9bad70b9 100644 +index add4649d2003f5ac38abeb372e4a6de9ee377489..b798495da37b9502f1ae93a9a1711411a5dfebf5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -15,7 +15,6 @@ import java.net.SocketAddress; @@ -1641,7 +1639,7 @@ index 4c53d20b593a734c6bb82c94f0ec51af21f3a32e..996f4debc4e5fd2aa6097a0d9769481b import net.minecraft.server.dedicated.DedicatedServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -@@ -297,6 +296,58 @@ public abstract class PlayerList { +@@ -302,6 +301,58 @@ public abstract class PlayerList { player.getRecipeBook().sendInitialRecipeBook(player); this.updateEntireScoreboard(worldserver1.getScoreboard(), player); this.server.invalidateStatus(); @@ -1700,7 +1698,7 @@ index 4c53d20b593a734c6bb82c94f0ec51af21f3a32e..996f4debc4e5fd2aa6097a0d9769481b MutableComponent ichatmutablecomponent; if (player.getGameProfile().getName().equalsIgnoreCase(s)) { -@@ -1531,10 +1582,8 @@ public abstract class PlayerList { +@@ -1536,10 +1587,8 @@ public abstract class PlayerList { public void setViewDistance(int viewDistance) { this.viewDistance = viewDistance; //this.broadcastAll(new ClientboundSetChunkCacheRadiusPacket(viewDistance)); // Paper - move into setViewDistance @@ -1712,7 +1710,7 @@ index 4c53d20b593a734c6bb82c94f0ec51af21f3a32e..996f4debc4e5fd2aa6097a0d9769481b if (worldserver != null) { worldserver.getChunkSource().setViewDistance(viewDistance); -@@ -1546,10 +1595,8 @@ public abstract class PlayerList { +@@ -1551,10 +1600,8 @@ public abstract class PlayerList { public void setSimulationDistance(int simulationDistance) { this.simulationDistance = simulationDistance; //this.broadcastAll(new ClientboundSetSimulationDistancePacket(simulationDistance)); // Paper - handled by playerchunkloader @@ -1792,7 +1790,7 @@ index 64f6555372ba5c97891fd6742f51fa6680c690a2..9582050566c5afc4e0fc40f5d74b653e final Entity entity = level.getEntity(this.ownerUUID); if (entity != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7fe27e79b71117a3cea8fa041689ec5467dcd70f..49ec0bd654e063b21d9673a17ed3df9b9e7f2242 100644 +index 25d6ca8370af3d314d799ed960276a7554c091ba..f903aa3d94505af701bb7f16269f7a25e5ab3044 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -963,7 +963,7 @@ public final class CraftServer implements Server { @@ -1804,7 +1802,7 @@ index 7fe27e79b71117a3cea8fa041689ec5467dcd70f..49ec0bd654e063b21d9673a17ed3df9b // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -1148,7 +1148,7 @@ public final class CraftServer implements Server { +@@ -1144,7 +1144,7 @@ public final class CraftServer implements Server { @Override public World createWorld(WorldCreator creator) { @@ -1813,7 +1811,7 @@ index 7fe27e79b71117a3cea8fa041689ec5467dcd70f..49ec0bd654e063b21d9673a17ed3df9b //Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes. Validate.notNull(creator, "Creator may not be null"); -@@ -2507,7 +2507,7 @@ public final class CraftServer implements Server { +@@ -2503,7 +2503,7 @@ public final class CraftServer implements Server { public Entity getEntity(UUID uuid) { Validate.notNull(uuid, "UUID cannot be null"); @@ -1823,7 +1821,7 @@ index 7fe27e79b71117a3cea8fa041689ec5467dcd70f..49ec0bd654e063b21d9673a17ed3df9b if (entity != null) { return entity.getBukkitEntity(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5e9055fdf411029ea2fed91acd6b981f79156418..5d4a68d05739414c7fd798fcfeb7567898bb42c9 100644 +index 86ffc869b57410fd4993c0fd0ae000da2e2c070c..47faf23e902e542d0739d0ba9b1de2d555a020d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -5,7 +5,6 @@ import com.google.common.base.Predicates; @@ -1855,18 +1853,18 @@ index 5e9055fdf411029ea2fed91acd6b981f79156418..5d4a68d05739414c7fd798fcfeb75678 import org.bukkit.util.StructureSearchResult; import org.bukkit.util.Vector; +import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues; + import org.jetbrains.annotations.NotNull; public class CraftWorld extends CraftRegionAccessor implements World { - public static final int CUSTOM_DIMENSION_OFFSET = 10; -@@ -2372,11 +2370,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2382,11 +2380,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { java.util.concurrent.CompletableFuture ret = new java.util.concurrent.CompletableFuture<>(); io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> { - net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { + ScheduledServerThreadTaskQueues.add(() -> { // Gale - base thread pool net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; - if (chunk != null) addTicket(x, z); // Paper - ret.complete(chunk == null ? null : chunk.getBukkitChunk()); + if (chunk != null) this.addTicket(x, z); // Paper + ret.complete(chunk == null ? null : new CraftChunk(chunk)); - }); + }, ScheduledServerThreadTaskQueues.COMPLETE_CHUNK_FUTURE_TASK_MAX_DELAY); // Gale - base thread pool }); diff --git a/patches/server/0153-Watch-for-blocking-base-threads.patch b/patches/server/0152-Watch-for-blocking-base-threads.patch similarity index 98% rename from patches/server/0153-Watch-for-blocking-base-threads.patch rename to patches/server/0152-Watch-for-blocking-base-threads.patch index 8ddeeb8..e42ebba 100644 --- a/patches/server/0153-Watch-for-blocking-base-threads.patch +++ b/patches/server/0152-Watch-for-blocking-base-threads.patch @@ -35,7 +35,7 @@ index 394b5044090c1c7b00b30036e4b8be4a6ac58ed1..0f0895ca1faa1e4bbd96614b497efd6a doFirst { workingDir.mkdirs() diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 185ad2527449bddfcf031ef6e3ae0ea6d39edf0e..3e97a50514f4b4ce1711c5813762782eb9da3ddf 100644 +index 39f8b19064f30059f94baf28f3493f19b5ba29de..74eee94f75391ef2d16a5becbfa498fde96526e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -4,16 +4,21 @@ import java.io.File; diff --git a/patches/server/0154-Non-blocking-PooledObjects.patch b/patches/server/0153-Non-blocking-PooledObjects.patch similarity index 100% rename from patches/server/0154-Non-blocking-PooledObjects.patch rename to patches/server/0153-Non-blocking-PooledObjects.patch diff --git a/patches/server/0155-Yielding-memoized-Supplier.patch b/patches/server/0154-Yielding-memoized-Supplier.patch similarity index 100% rename from patches/server/0155-Yielding-memoized-Supplier.patch rename to patches/server/0154-Yielding-memoized-Supplier.patch diff --git a/patches/server/0156-Yielding-ChunkHolderManager.patch b/patches/server/0155-Yielding-ChunkHolderManager.patch similarity index 100% rename from patches/server/0156-Yielding-ChunkHolderManager.patch rename to patches/server/0155-Yielding-ChunkHolderManager.patch diff --git a/patches/server/0157-Run-async-executor-tasks-on-base-thread-pool.patch b/patches/server/0156-Run-async-executor-tasks-on-base-thread-pool.patch similarity index 96% rename from patches/server/0157-Run-async-executor-tasks-on-base-thread-pool.patch rename to patches/server/0156-Run-async-executor-tasks-on-base-thread-pool.patch index d05d796..bd41707 100644 --- a/patches/server/0157-Run-async-executor-tasks-on-base-thread-pool.patch +++ b/patches/server/0156-Run-async-executor-tasks-on-base-thread-pool.patch @@ -27,10 +27,10 @@ index 157f74bbbac8cbbed37c4fcc339b3b3c06d06bbe..cd614c55aa3f9a014c2a073abf803888 1, 1, 0L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b9dfe7aa02d8ac8b254f857756385605e3a98a2c..1c2020b366d2da3a054fbdaab2dd5734e6dbb315 100644 +index fe35347639364caf5edfca799f68fd4b41b9e913..d01c81bed1f77e7f8fec56b01fd7885a0603fd22 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1084,9 +1084,6 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1082,9 +1082,6 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1); } // Spigot start @@ -40,7 +40,7 @@ index b9dfe7aa02d8ac8b254f857756385605e3a98a2c..1c2020b366d2da3a054fbdaab2dd5734 if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { MinecraftServer.LOGGER.info("Saving usercache.json"); this.getProfileCache().save(false); // Paper -@@ -1096,6 +1093,12 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1094,6 +1091,12 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop LOGGER.info("Flushing Chunk IO"); io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system LOGGER.info("Closing Thread Pool"); diff --git a/patches/server/0158-Run-background-executor-tasks-on-base-thread-pool.patch b/patches/server/0157-Run-background-executor-tasks-on-base-thread-pool.patch similarity index 100% rename from patches/server/0158-Run-background-executor-tasks-on-base-thread-pool.patch rename to patches/server/0157-Run-background-executor-tasks-on-base-thread-pool.patch diff --git a/patches/server/0159-Run-world-upgrade-tasks-on-base-thread-pool.patch b/patches/server/0158-Run-world-upgrade-tasks-on-base-thread-pool.patch similarity index 100% rename from patches/server/0159-Run-world-upgrade-tasks-on-base-thread-pool.patch rename to patches/server/0158-Run-world-upgrade-tasks-on-base-thread-pool.patch diff --git a/patches/server/0160-Run-tab-completion-tasks-on-base-thread-pool.patch b/patches/server/0159-Run-tab-completion-tasks-on-base-thread-pool.patch similarity index 90% rename from patches/server/0160-Run-tab-completion-tasks-on-base-thread-pool.patch rename to patches/server/0159-Run-tab-completion-tasks-on-base-thread-pool.patch index 4ae644b..ff12126 100644 --- a/patches/server/0160-Run-tab-completion-tasks-on-base-thread-pool.patch +++ b/patches/server/0159-Run-tab-completion-tasks-on-base-thread-pool.patch @@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1268cc3bb5106241df9af63230b6f13a479b43c9..cfa431c16d3e366b9bba3539a95286c7485993e1 100644 +index 661a7c442309abbfa227cb96b6369544c82ad5b2..520db3face9bd9d05e583c319dda7d6630afbeaa 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -886,8 +886,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -895,8 +895,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper start diff --git a/patches/server/0161-Run-text-filter-tasks-on-base-thread-pool.patch b/patches/server/0160-Run-text-filter-tasks-on-base-thread-pool.patch similarity index 100% rename from patches/server/0161-Run-text-filter-tasks-on-base-thread-pool.patch rename to patches/server/0160-Run-text-filter-tasks-on-base-thread-pool.patch diff --git a/patches/server/0162-Run-cleaner-tasks-on-base-thread-pool.patch b/patches/server/0161-Run-cleaner-tasks-on-base-thread-pool.patch similarity index 100% rename from patches/server/0162-Run-cleaner-tasks-on-base-thread-pool.patch rename to patches/server/0161-Run-cleaner-tasks-on-base-thread-pool.patch diff --git a/patches/server/0163-Run-chunk-cache-tasks-on-base-thread-pool.patch b/patches/server/0162-Run-chunk-cache-tasks-on-base-thread-pool.patch similarity index 99% rename from patches/server/0163-Run-chunk-cache-tasks-on-base-thread-pool.patch rename to patches/server/0162-Run-chunk-cache-tasks-on-base-thread-pool.patch index 9fd7c2b..6fdb1df 100644 --- a/patches/server/0163-Run-chunk-cache-tasks-on-base-thread-pool.patch +++ b/patches/server/0162-Run-chunk-cache-tasks-on-base-thread-pool.patch @@ -267,7 +267,7 @@ index 83a57b9bc59063ed8299f98bc33e14b57f2ea0de..9ee931a6442d3f18a7521704f39297af // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task public boolean pollTask() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e2c48c0d41e99134485d967354034daff7aae202..bf1616f7cc81cf44bde24673598190d8ef2fb1bf 100644 +index 5af506704a22f969fac91051ec09deb3c6ccc397..a60fdfa682cbce4ed69117beea2d6bd74790d426 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -275,7 +275,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -333,10 +333,10 @@ index 392e7b4a89669f16b32043b65b69e6593d17f10e..c2378d66bbd65f786a942eba74dd374b runnable.run(); return null; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 8e76062dc8f9411bc2b8b76b14d21ae6aa738a3a..3a31efd270ddd563b8f2aa27e915bc86a5896623 100644 +index 18c3f13c523ea62a098f489636b4320c73da4b8b..43c3ff92bad2b812fbad9af65bde17681690a72e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -203,7 +203,7 @@ public class LevelChunk extends ChunkAccess { +@@ -196,7 +196,7 @@ public class LevelChunk extends ChunkAccess { if (!areNeighboursLoaded(bitsetBefore, 2) && areNeighboursLoaded(bitsetAfter, 2)) { if (chunkMap.playerChunkManager.tickMap.getObjectsInRange(this.coordinateKey) != null) { // Paper - replace old player chunk loading system // now we're ready for entity ticking @@ -345,7 +345,7 @@ index 8e76062dc8f9411bc2b8b76b14d21ae6aa738a3a..3a31efd270ddd563b8f2aa27e915bc86 // double check that this condition still holds. if (LevelChunk.this.areNeighboursLoaded(2) && chunkMap.playerChunkManager.tickMap.getObjectsInRange(LevelChunk.this.coordinateKey) != null) { // Paper - replace old player chunk loading system chunkMap.playerChunkManager.onChunkPlayerTickReady(this.chunkPos.x, this.chunkPos.z); // Paper - replace old player chunk -@@ -219,7 +219,7 @@ public class LevelChunk extends ChunkAccess { +@@ -212,7 +212,7 @@ public class LevelChunk extends ChunkAccess { if (chunkMap.playerChunkManager.isChunkNearPlayers(this.chunkPos.x, this.chunkPos.z)) { // the post processing is expensive, so we don't want to run it unless we're actually near // a player. @@ -355,10 +355,10 @@ index 8e76062dc8f9411bc2b8b76b14d21ae6aa738a3a..3a31efd270ddd563b8f2aa27e915bc86 return; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5d4a68d05739414c7fd798fcfeb7567898bb42c9..0e55e416f3ba35b69ab6a5082aedbff977bd3d62 100644 +index 47faf23e902e542d0739d0ba9b1de2d555a020d3..19c6d8ef623127c878a99dec0f8538e8d446ac6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -362,7 +362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -373,7 +373,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!Bukkit.isPrimaryThread()) { return java.util.concurrent.CompletableFuture.supplyAsync(() -> { return CraftWorld.this.isChunkGenerated(x, z); @@ -367,7 +367,7 @@ index 5d4a68d05739414c7fd798fcfeb7567898bb42c9..0e55e416f3ba35b69ab6a5082aedbff9 } ChunkAccess chunk = world.getChunkSource().getChunkAtImmediately(x, z); if (chunk == null) { -@@ -470,7 +470,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -481,7 +481,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { list, true ); diff --git a/patches/server/0164-Run-TickThread-chunk-tasks-on-base-thread-pool.patch b/patches/server/0163-Run-TickThread-chunk-tasks-on-base-thread-pool.patch similarity index 100% rename from patches/server/0164-Run-TickThread-chunk-tasks-on-base-thread-pool.patch rename to patches/server/0163-Run-TickThread-chunk-tasks-on-base-thread-pool.patch diff --git a/patches/server/0165-BaseThread-PrioritisedQueueExecutorThread-agent-util.patch b/patches/server/0164-BaseThread-PrioritisedQueueExecutorThread-agent-util.patch similarity index 100% rename from patches/server/0165-BaseThread-PrioritisedQueueExecutorThread-agent-util.patch rename to patches/server/0164-BaseThread-PrioritisedQueueExecutorThread-agent-util.patch diff --git a/patches/server/0166-Run-chunk-worker-tasks-on-base-thread-pool.patch b/patches/server/0165-Run-chunk-worker-tasks-on-base-thread-pool.patch similarity index 98% rename from patches/server/0166-Run-chunk-worker-tasks-on-base-thread-pool.patch rename to patches/server/0165-Run-chunk-worker-tasks-on-base-thread-pool.patch index 61eb574..7f265e5 100644 --- a/patches/server/0166-Run-chunk-worker-tasks-on-base-thread-pool.patch +++ b/patches/server/0165-Run-chunk-worker-tasks-on-base-thread-pool.patch @@ -480,10 +480,18 @@ index f5c15d40094c2ddc6220b0595597d12103fcf425..79ef41d2bb30beee2355d1de3dc99c9e } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1c2020b366d2da3a054fbdaab2dd5734e6dbb315..d9e07fd59e4f0bb006cadd022b2086fc65f5eacf 100644 +index d01c81bed1f77e7f8fec56b01fd7885a0603fd22..6053a158d923d0e3cf7215b95fc3b89a3135bfb2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1073,6 +1073,10 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -151,6 +151,7 @@ import net.minecraft.world.phys.Vec3; + import org.galemc.gale.executor.MinecraftServerBlockableEventLoop; + import org.galemc.gale.configuration.GaleConfigurations; + import org.galemc.gale.executor.annotation.thread.OriginalServerThreadOnly; ++import org.galemc.gale.executor.queue.BaseTaskQueues; + import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues; + import org.galemc.gale.executor.thread.BaseThread; + import org.galemc.gale.executor.thread.OriginalServerThread; +@@ -1071,6 +1072,10 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop } } diff --git a/patches/server/0167-Split-tick-steps.patch b/patches/server/0166-Split-tick-steps.patch similarity index 96% rename from patches/server/0167-Split-tick-steps.patch rename to patches/server/0166-Split-tick-steps.patch index eb2d340..3e019fa 100644 --- a/patches/server/0167-Split-tick-steps.patch +++ b/patches/server/0166-Split-tick-steps.patch @@ -7,18 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html) Gale - https://galemc.org diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d9e07fd59e4f0bb006cadd022b2086fc65f5eacf..0782da72420e6988728a699af420fd17e5828e06 100644 +index 6053a158d923d0e3cf7215b95fc3b89a3135bfb2..5db4312ed1973a2395af66975a43abe5beffa1cd 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -156,7 +156,6 @@ import org.galemc.gale.executor.queue.BaseTaskQueues; - import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues; - import org.galemc.gale.executor.thread.BaseThread; - import org.galemc.gale.executor.thread.OriginalServerThread; --import org.galemc.gale.executor.thread.SignalReason; - import org.galemc.gale.executor.thread.pool.BaseThreadActivation; - import org.jetbrains.annotations.NotNull; - import org.slf4j.Logger; -@@ -1585,16 +1584,54 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1584,16 +1584,54 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop } } @@ -74,7 +66,7 @@ index d9e07fd59e4f0bb006cadd022b2086fc65f5eacf..0782da72420e6988728a699af420fd17 // CraftBukkit start // Run tasks that are waiting on processing MinecraftTimings.processQueueTimer.startTiming(); // Spigot -@@ -1602,11 +1639,14 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1601,11 +1639,14 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop this.processQueue.remove().run(); } MinecraftTimings.processQueueTimer.stopTiming(); // Spigot @@ -90,7 +82,7 @@ index d9e07fd59e4f0bb006cadd022b2086fc65f5eacf..0782da72420e6988728a699af420fd17 final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT); final long dayTime = world.getDayTime(); long worldTime = world.getGameTime(); -@@ -1621,15 +1661,23 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1620,15 +1661,23 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop new ClientboundSetTimePacket(worldTime, playerTime, doDaylight); entityplayer.connection.send(packet); // Add support for per player time } @@ -116,7 +108,7 @@ index d9e07fd59e4f0bb006cadd022b2086fc65f5eacf..0782da72420e6988728a699af420fd17 /* Drop global time updates if (this.tickCount % 20 == 0) { -@@ -1639,16 +1687,28 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1638,16 +1687,28 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop } // CraftBukkit end */ @@ -150,7 +142,7 @@ index d9e07fd59e4f0bb006cadd022b2086fc65f5eacf..0782da72420e6988728a699af420fd17 // Spigot Start CrashReport crashreport; try { -@@ -1661,22 +1721,47 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop +@@ -1660,22 +1721,47 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop worldserver.fillReportDetails(crashreport); throw new ReportedException(crashreport); @@ -308,7 +300,7 @@ index 9ee931a6442d3f18a7521704f39297af0d7af6d7..d4f99270c62cef94cc5ad5fc00f155c4 private void tickChunks() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index bf1616f7cc81cf44bde24673598190d8ef2fb1bf..3f2ee95747ea79ace0329d03038f67a80b0c89ff 100644 +index a60fdfa682cbce4ed69117beea2d6bd74790d426..35332bc7e1781086829161131692570c812761fa 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -23,7 +23,6 @@ import java.nio.file.Files; diff --git a/patches/server/0168-Multithreaded-ticking.patch b/patches/server/0167-Multithreaded-ticking.patch similarity index 100% rename from patches/server/0168-Multithreaded-ticking.patch rename to patches/server/0167-Multithreaded-ticking.patch diff --git a/patches/server/0169-Yielding-ChunkTaskScheduler.patch b/patches/server/0168-Yielding-ChunkTaskScheduler.patch similarity index 100% rename from patches/server/0169-Yielding-ChunkTaskScheduler.patch rename to patches/server/0168-Yielding-ChunkTaskScheduler.patch