diff --git a/gradle.properties b/gradle.properties index 110b2785..40ebb89b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=cn.dreeam.leaf mcVersion=1.21.6 version=1.21.6-R0.1-SNAPSHOT -paperCommit=5edcf6ddf6a3c279fce5a4feca58e9679a140aec +paperCommit=bd79e20c6627faadad184bd2e6dbea31b35d32d0 org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/leaf-api/build.gradle.kts.patch b/leaf-api/build.gradle.kts.patch index 9dd03e4e..2313c5e4 100644 --- a/leaf-api/build.gradle.kts.patch +++ b/leaf-api/build.gradle.kts.patch @@ -2,7 +2,7 @@ +++ b/paper-api/build.gradle.kts @@ -13,8 +_,10 @@ // Keep in sync with paper-server adventure-text-serializer-ansi dep - val adventureVersion = "4.21.0" + val adventureVersion = "4.23.0" val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21" -val slf4jVersion = "2.0.16" -val log4jVersion = "2.24.1" diff --git a/leaf-api/paper-patches/features/0013-Purpur-API-Changes.patch b/leaf-api/paper-patches/features/0013-Purpur-API-Changes.patch index 6f140d05..1821cce3 100644 --- a/leaf-api/paper-patches/features/0013-Purpur-API-Changes.patch +++ b/leaf-api/paper-patches/features/0013-Purpur-API-Changes.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: afcdf9bb72f88eb18266f5efd8c135904d82fd3d +Commit: 47e758fb34a5dc8e7c81a99af74df6c0bf78ae42 Patches listed below are removed in this patch, They exists in Gale or Leaf: * "co/aikar/timings/TimedEventExecutor.java.patch" diff --git a/leaf-server/paper-patches/features/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/leaf-archived-patches/removed/hardfork/paperserver/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch similarity index 97% rename from leaf-server/paper-patches/features/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch rename to leaf-archived-patches/removed/hardfork/paperserver/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index 33088b78..6258396a 100644 --- a/leaf-server/paper-patches/features/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/leaf-archived-patches/removed/hardfork/paperserver/0032-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -4,6 +4,9 @@ Date: Sun, 19 Nov 2023 12:35:16 -0300 Subject: [PATCH] SparklyPaper: Skip EntityScheduler's executeTick checks if there isn't any tasks to be run +Removed since Leaf 1.21.6, replaced by spottedleaf's impl added on Paper +https://github.com/PaperMC/Paper/commit/7c90c7c4970b44b8bcaebd1b3f4f124e9757dc3c + Original project: https://github.com/SparklyPower/SparklyPaper On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, due to the thread checks, and because it needs to iterate all entities in all worlds. diff --git a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/leaf-archived-patches/removed/hardfork/server/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch rename to leaf-archived-patches/removed/hardfork/server/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index 58b9c6d6..97911e43 100644 --- a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/leaf-archived-patches/removed/hardfork/server/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -4,6 +4,9 @@ Date: Sun, 19 Nov 2023 12:35:16 -0300 Subject: [PATCH] SparklyPaper: Skip EntityScheduler's executeTick checks if there isn't any tasks to be run +Removed since Leaf 1.21.6, replaced by spottedleaf's impl added on Paper +https://github.com/PaperMC/Paper/commit/7c90c7c4970b44b8bcaebd1b3f4f124e9757dc3c + Original project: https://github.com/SparklyPower/SparklyPaper On each tick, Paper runs EntityScheduler's executeTick of each entity. This is a bit expensive, due to ArrayDeque's size() call because it ain't a simple "get the current queue size" function, due to the thread checks, and because it needs to iterate all entities in all worlds. diff --git a/leaf-server/build.gradle.kts.patch b/leaf-server/build.gradle.kts.patch index 48a0f6af..41ead395 100644 --- a/leaf-server/build.gradle.kts.patch +++ b/leaf-server/build.gradle.kts.patch @@ -1,6 +1,6 @@ --- a/paper-server/build.gradle.kts +++ b/paper-server/build.gradle.kts -@@ -13,10 +_,11 @@ +@@ -15,10 +_,11 @@ } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" @@ -13,7 +13,7 @@ testRuntimeOnly("org.junit.platform:junit-platform-launcher") } -@@ -24,6 +_,19 @@ +@@ -26,6 +_,19 @@ minecraftVersion = providers.gradleProperty("mcVersion") gitFilePatches = false @@ -33,7 +33,7 @@ spigot { enabled = true buildDataRef = "281ac0de7a76d808753ede97d11b034bc801b63d" -@@ -47,6 +_,7 @@ +@@ -49,6 +_,7 @@ libraryRepositories.addAll( "https://repo.maven.apache.org/maven2/", paperMavenPublicUrl, @@ -41,7 +41,7 @@ ) } -@@ -105,7 +_,22 @@ +@@ -107,7 +_,22 @@ } } @@ -65,7 +65,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { extendsFrom(configurations.compileClasspath.get()) } -@@ -127,10 +_,20 @@ +@@ -129,10 +_,20 @@ } dependencies { @@ -87,9 +87,9 @@ + implementation("org.jline:jline-terminal-ffm:3.29.0") // use ffm on java 22+ // Leaf - Bump Dependencies + implementation("org.jline:jline-terminal-jni:3.29.0") // fall back to jni on java 21 // Leaf - Bump Dependencies implementation("net.minecrell:terminalconsoleappender:1.3.0") - implementation("net.kyori:adventure-text-serializer-ansi:4.21.0") // Keep in sync with adventureVersion from Paper-API build file + implementation("net.kyori:adventure-text-serializer-ansi:4.23.0") // Keep in sync with adventureVersion from Paper-API build file runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath }) -@@ -141,41 +_,58 @@ +@@ -143,41 +_,58 @@ all its classes to check if they are plugins. Scanning takes about 1-2 seconds so adding this speeds up the server start. */ @@ -161,7 +161,7 @@ implementation("net.neoforged:srgutils:1.0.9") // Mappings handling implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins -@@ -189,28 +_,40 @@ +@@ -191,28 +_,40 @@ // Spark implementation("me.lucko:spark-api:0.1-20240720.200737-2") implementation("me.lucko:spark-paper:1.10.133-20250413.112336-1") @@ -209,7 +209,7 @@ "Build-Number" to (build ?: ""), "Build-Time" to buildTime.toString(), "Git-Branch" to gitBranch, -@@ -269,7 +_,7 @@ +@@ -271,7 +_,7 @@ jvmArgumentProviders.add(provider) } @@ -218,7 +218,7 @@ idea { module { generatedSourceDirs.add(generatedDir.toFile()) -@@ -327,6 +_,8 @@ +@@ -329,6 +_,8 @@ val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") minHeapSize = "${memoryGb}G" maxHeapSize = "${memoryGb}G" @@ -227,9 +227,9 @@ doFirst { workingDir.mkdirs() -@@ -372,3 +_,62 @@ - classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip }) - mainClass.set(null as String?) +@@ -391,3 +_,62 @@ + } + } } + +// Gale start - package license into jar diff --git a/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch b/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch index 69688cdd..767f061a 100644 --- a/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch +++ b/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.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/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 656a7013b00dcd3c5555711af6068ac515465af8..edf507ce386b43c81c0e812dd3f3283379997170 100644 +index ec1cced129ef42be65d7b2b622638bfae8bd895e..f6017445c495c65fc71b10d2a8ed4f5d3d225668 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java @@ -58,7 +58,6 @@ import net.minecraft.server.commands.CloneCommands; @@ -72,7 +72,7 @@ index 656a7013b00dcd3c5555711af6068ac515465af8..edf507ce386b43c81c0e812dd3f32833 ContextChain contextChain = finishParsing(parseResults, command, commandSourceStack); try { -@@ -385,8 +381,6 @@ public class Commands { +@@ -387,8 +383,6 @@ public class Commands { commandSourceStack.sendFailure(Component.literal(Util.describeError(var12))); LOGGER.error("'/{}' threw an exception", command, var12); } @@ -81,7 +81,7 @@ index 656a7013b00dcd3c5555711af6068ac515465af8..edf507ce386b43c81c0e812dd3f32833 } } -@@ -443,7 +437,7 @@ public class Commands { +@@ -445,7 +439,7 @@ public class Commands { int max = Math.max(1, server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_CHAIN_LENGTH)); int _int = server.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT); @@ -169,7 +169,7 @@ index 18071dcc69cc28471dddb7de94e803ec1e5fc2e4..e30bb9c4046200c1a6e4e917d15b205f } } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 991833bfa8d6cb6ab3faccc94199b7105523583f..f4daf7ed86e5987ca9da8229402a154b69599f56 100644 +index 89b7af92f9d8e4e449d9eb1a3ddfe2ec89fd63a4..4deffef83bc7afe688127b9cf184c95bf82f86c8 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -114,19 +114,8 @@ import net.minecraft.util.TimeUtil; @@ -312,17 +312,17 @@ index 991833bfa8d6cb6ab3faccc94199b7105523583f..f4daf7ed86e5987ca9da8229402a154b LOGGER.debug("Autosave finished"); } -@@ -1658,7 +1615,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit - // Paper start - Folia scheduler API -@@ -1676,9 +1632,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent serverLevel.updateLagCompensationTick(); // Paper - lag compensation net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers @@ -348,7 +348,7 @@ index 991833bfa8d6cb6ab3faccc94199b7105523583f..f4daf7ed86e5987ca9da8229402a154b try { serverLevel.tick(hasTimeLeft); } catch (Throwable var7) { -@@ -1732,34 +1681,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop bukkit, RootCommandNode rootCommandNode) { // Paper end - Perf: Async command map building new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API @@ -48,7 +48,7 @@ index edf507ce386b43c81c0e812dd3f3283379997170..561b25ff9b424c2a658860b17462137c org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -506,6 +507,7 @@ public class Commands { +@@ -508,6 +509,7 @@ public class Commands { } } // CraftBukkit end diff --git a/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch b/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch index 36ef37d1..085254bb 100644 --- a/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch +++ b/leaf-server/minecraft-patches/features/0074-Send-multiple-keep-alive-packets.patch @@ -37,15 +37,20 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index dd3841c06a386c0d6dc641fe2573d3fb0733504d..0ff225163b3d95b51b851c7e16bd994453cc2d0e 100644 +index ccbf60f546974692c2c840f4bce87e2c95d1866c..ddc89e8960f7dc2f75f0e03ccbe6eda96a0499e2 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -42,6 +42,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - private long keepAliveChallenge; +@@ -38,10 +38,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + public final Connection connection; // Paper + private final boolean transferred; + //private long keepAliveTime; // Paper - improve keepalives +- //private boolean keepAlivePending; // Paper - improve keepalives ++ private boolean keepAlivePending; // Paper - improve keepalives // Purpur - Alternative Keepalive Handling + //private long keepAliveChallenge; // Paper - improve keepalives private long closedListenerTime; private boolean closed = false; + private it.unimi.dsi.fastutil.longs.LongList keepAlives = new it.unimi.dsi.fastutil.longs.LongArrayList(); // Gale - Purpur - send multiple keep-alive packets - private int latency; + private volatile int latency; // Paper - improve keepalives - make volatile private volatile boolean suspendFlushingOnServerThread = false; // CraftBukkit start @@ -50,7 +51,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -60,55 +65,59 @@ index dd3841c06a386c0d6dc641fe2573d3fb0733504d..0ff225163b3d95b51b851c7e16bd9944 protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit -@@ -119,6 +123,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - - @Override - public void handleKeepAlive(ServerboundKeepAlivePacket packet) { +@@ -122,6 +126,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + // Paper start - improve keepalives + long now = System.nanoTime(); + net.minecraft.server.level.ServerPlayer.PendingKeepAlive pending = this.player.pendingKeepAlives.peek(); + // Gale start - Purpur - send multiple keep-alive packets + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { + if (this.keepAlivePending && !keepAlives.isEmpty() && keepAlives.contains(packet.getId())) { + int ping = (int) (Util.getMillis() - packet.getId()); -+ this.latency = (this.latency * 3 + ping) / 4; ++ int updatedLatency = (this.latency * 3 + ping) / 4; ++ this.latency = updatedLatency; + this.keepAlivePending = false; + this.keepAlives.clear(); // We got a valid response, let's roll with it and forget the rest + } ++ return; + } else { + // Gale end - Purpur - send multiple keep-alive packets - if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) { - int i = (int)(Util.getMillis() - this.keepAliveTime); - this.latency = (this.latency * 3 + i) / 4; -@@ -126,6 +140,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - } else if (!this.isSingleplayerOwner()) { - this.disconnectAsync(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); // Paper - add proper async disconnect + if (pending != null && pending.challengeId() == packet.getId()) { + this.player.pendingKeepAlives.remove(pending); + +@@ -133,6 +149,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + this.latency = this.player.pingCalculator5s.getAvgLatencyMS(); + return; } + } // Gale - Purpur - send multiple keep-alive packets - } - @Override -@@ -248,6 +263,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - // Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings - // This should effectively place the keepalive handling back to "as it was" before 1.12.2 - final long elapsedTime = millis - this.keepAliveTime; + for (java.util.Iterator itr = this.player.pendingKeepAlives.iterator(); itr.hasNext();) { + net.minecraft.server.level.ServerPlayer.PendingKeepAlive ka = itr.next(); +@@ -274,6 +291,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + protected void keepConnectionAlive() { + long millis = Util.getMillis(); + // Paper start - improve keepalives + // Gale start - Purpur - send multiple keep-alive packets + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { -+ if (elapsedTime >= 1000L) { // 1 second -+ if (this.keepAlivePending && !this.processedDisconnect && this.keepAlives.size() >= KEEPALIVE_LIMIT_IN_SECONDS) { -+ LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); -+ this.disconnect(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); -+ } else if (this.checkIfClosed(millis)) { -+ this.keepAlivePending = true; -+ this.keepAliveTime = millis; // hijack this field for 1 second intervals -+ this.keepAlives.add(millis); // millis is ID -+ this.send(new ClientboundKeepAlivePacket(millis)); ++ if (this.checkIfClosed(millis) && !this.processedDisconnect) { ++ long currTime = System.nanoTime(); ++ if ((currTime - this.player.lastKeepAliveTx) >= java.util.concurrent.TimeUnit.SECONDS.toNanos(1L)) { // 1 second ++ this.player.lastKeepAliveTx = currTime; ++ if (this.keepAlivePending && !this.processedDisconnect && keepAlives.size() * 1000L >= KEEPALIVE_LIMIT) { ++ this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); ++ } else if (this.checkIfClosed(millis)) { ++ this.keepAlivePending = true; ++ this.keepAlives.add(millis); // currentTime is ID ++ this.send(new ClientboundKeepAlivePacket(millis)); ++ } + } + } + } else { + // Gale end - Purpur - send multiple keep-alive packets - if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets - if (this.keepAlivePending) { - if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected -@@ -261,6 +291,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge)); + if (this.checkIfClosed(millis) && !this.processedDisconnect) { + long currTime = System.nanoTime(); + +@@ -292,6 +326,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + // Paper end - improve keepalives } } + } // Gale - Purpur - send multiple keep-alive packets diff --git a/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch b/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch index 754a95f9..f1edc252 100644 --- a/leaf-server/minecraft-patches/features/0078-Broadcast-crit-animations-as-the-entity-being-critte.patch +++ b/leaf-server/minecraft-patches/features/0078-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/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 3b08bf99de48b7af7c91de4b7448231ebe6819ae..46be66df0c6c31bff75bb31c005c1c1416c034fb 100644 +index f752dceea48ed8264ae4cb60fdf2390f0e5019e1..9b715b5848b33dd023feccfa93c08924c92fbe13 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2117,12 +2117,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2181,12 +2181,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void crit(Entity entityHit) { diff --git a/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch b/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch index 8ce927a3..dac5e4e2 100644 --- a/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch +++ b/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch @@ -26,10 +26,10 @@ index 92a820d48057ffe2ef35919341b6cdf605ca939e..b9b1bf351070cd2a744cdb683974fb2a double d1 = center.y - maxRange; double d2 = center.x + maxRange; diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 46be66df0c6c31bff75bb31c005c1c1416c034fb..274b3aba999f485ea261ef356bfc62627257974c 100644 +index 9b715b5848b33dd023feccfa93c08924c92fbe13..99eaa04bfcd2d37d3e49513e20bb5037119ef84d 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -498,7 +498,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -562,7 +562,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc long l1 = l * l; int i = l1 > 2147483647L ? Integer.MAX_VALUE : (int)l1; int coprime = this.getCoprime(i); diff --git a/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch b/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch index 38102559..7257f94f 100644 --- a/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch +++ b/leaf-server/minecraft-patches/features/0098-Purpur-Server-Minecraft-Changes.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Minecraft Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: afcdf9bb72f88eb18266f5efd8c135904d82fd3d +Commit: 47e758fb34a5dc8e7c81a99af74df6c0bf78ae42 Patches listed below are removed in this patch, They exists in Gale or Leaf: * "net/minecraft/CrashReport.java.patch" @@ -120,7 +120,7 @@ index 3acfb2a78845dd8081dc3c01d653034232c76e60..51caf352e77df49fc04bf84f1fab29b6 boolean flag = this.source.acceptsSuccess() && !this.silent; boolean flag1 = allowLogging && this.source.shouldInformAdmins() && !this.silent; diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 561b25ff9b424c2a658860b17462137ce7ae3abd..40db0b3d92bcaf4362da33720a0c4ec5451ed886 100644 +index e00624a738e65ab14ec68a8d0e7861522fa32e82..1dc009e85403fe0b6a68daefecfe5cb25ad263cd 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java @@ -249,7 +249,7 @@ public class Commands { @@ -322,7 +322,7 @@ index b16f3f515a76ddbbd74d73464396cf094cb30599..dd6ae338fa48d52962ee0af5b1572077 io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper Bootstrap.bootStrap(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 45db35e085161b724a19c0d6f0a558c217fba9cd..db1f0031a6ae6ba1b9ea265043b87817e2c746f8 100644 +index 9ab4e38d6dd278b9ed7c43bf448c32983135a547..f05fa801f35f4afcc93fcace6a98cee0fa3ec531 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -266,6 +266,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent serverLevel.updateLagCompensationTick(); // Paper - lag compensation net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers @@ -927,7 +927,7 @@ index 3f70fca36f67fa421314ff92d372a97112a19025..95c128f028c3cce7d0b37821a6e75208 } // Paper end - Fix merchant inventory not closing on entity removal diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553ef0a4fad 100644 +index 99eaa04bfcd2d37d3e49513e20bb5037119ef84d..c6fafc3cb31d0a3dbbeaf8a9493d70de502110cc 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -430,6 +430,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -941,7 +941,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; -@@ -563,6 +567,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -627,6 +631,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.respawnConfig = input.read("respawn", ServerPlayer.RespawnConfig.CODEC).orElse(null); this.spawnExtraParticlesOnFall = input.getBooleanOr("spawn_extra_particles_on_fall", false); this.raidOmenPosition = input.read("raid_omen_position", BlockPos.CODEC).orElse(null); @@ -952,7 +952,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 } @Override -@@ -580,6 +588,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -644,6 +652,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc output.storeNullable("raid_omen_position", BlockPos.CODEC, this.raidOmenPosition); this.saveEnderPearls(output); this.getBukkitEntity().setExtraData(output); // CraftBukkit @@ -962,7 +962,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 } private void saveParentVehicle(ValueOutput output) { -@@ -785,6 +796,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -849,6 +860,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.trackEnteredOrExitedLavaOnVehicle(); this.updatePlayerAttributes(); this.advancements.flushDirty(this, true); @@ -978,7 +978,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 } private void updatePlayerAttributes() { -@@ -1076,6 +1096,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1140,6 +1160,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc // Paper - moved up to sendClientboundPlayerCombatKillPacket() sendClientboundPlayerCombatKillPacket(event.getShowDeathMessages(), deathScreenMessage); // Paper - Expand PlayerDeathEvent Team team = this.getTeam(); @@ -986,7 +986,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 if (team == null || team.getDeathMessageVisibility() == Team.Visibility.ALWAYS) { this.server.getPlayerList().broadcastSystemMessage(deathMessage, false); } else if (team.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { -@@ -1182,6 +1203,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1246,6 +1267,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc if (this.isInvulnerableTo(level, damageSource)) { return false; } else { @@ -1005,7 +1005,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 Entity entity = damageSource.getEntity(); if (!( // Paper - split the if statement. If below statement is false, hurtServer would not have been evaluated. Return false. !(entity instanceof Player player && !this.canHarmPlayer(player)) -@@ -1422,6 +1455,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1486,6 +1519,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc serverLevel.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); // CraftBukkit end @@ -1013,7 +1013,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 this.setServerLevel(level); this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); -@@ -1537,7 +1571,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1601,7 +1635,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc new AABB(vec3.x() - 8.0, vec3.y() - 5.0, vec3.z() - 8.0, vec3.x() + 8.0, vec3.y() + 5.0, vec3.z() + 8.0), monster -> monster.isPreventingPlayerRest(this.level(), this) ); @@ -1022,7 +1022,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1574,7 +1608,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1638,7 +1672,19 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc CriteriaTriggers.SLEPT_IN_BED.trigger(this); }); if (!this.level().canSleepThroughNights()) { @@ -1043,7 +1043,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 } this.level().updateSleepingPlayerList(); -@@ -1666,6 +1712,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1730,6 +1776,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void openTextEdit(SignBlockEntity signEntity, boolean isFrontText) { @@ -1051,7 +1051,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 this.connection.send(new ClientboundBlockUpdatePacket(this.level(), signEntity.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(signEntity.getBlockPos(), isFrontText)); } -@@ -1975,6 +2022,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2039,6 +2086,26 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -1078,7 +1078,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 @Override public void displayClientMessage(Component chatComponent, boolean actionBar) { this.sendSystemMessage(chatComponent, actionBar); -@@ -2199,6 +2266,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2263,6 +2330,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc ); } @@ -1099,7 +1099,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 public void sendSystemMessage(Component mesage) { this.sendSystemMessage(mesage, false); } -@@ -2337,8 +2418,68 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2401,8 +2482,68 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); @@ -1168,7 +1168,7 @@ index 274b3aba999f485ea261ef356bfc62627257974c..6d453bdf4f265c23e7e349d07d766553 public ServerStatsCounter getStats() { return this.stats; } -@@ -2965,4 +3106,56 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -3029,4 +3170,56 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -1274,7 +1274,7 @@ index 6734756d7a51e635a50a47577f9e6b6f8111db51..c4a4f08272b34f72dea4feaaeb66d153 + // Purpur end - Shift right click to use exp for mending } diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 0ff225163b3d95b51b851c7e16bd994453cc2d0e..1c75a921695c83ea993d581b5185cf46951361ac 100644 +index ddc89e8960f7dc2f75f0e03ccbe6eda96a0499e2..8a4c8e2fb86274b5bf95bda510029f4c5077d836 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -56,6 +56,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -1285,7 +1285,7 @@ index 0ff225163b3d95b51b851c7e16bd994453cc2d0e..1c75a921695c83ea993d581b5185cf46 public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie cookie, net.minecraft.server.level.ServerPlayer player) { // CraftBukkit this.server = server; -@@ -185,6 +186,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -215,6 +216,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack return; } @@ -1299,7 +1299,7 @@ index 0ff225163b3d95b51b851c7e16bd994453cc2d0e..1c75a921695c83ea993d581b5185cf46 this.player.clientBrandName = new net.minecraft.network.FriendlyByteBuf(io.netty.buffer.Unpooled.wrappedBuffer(data)).readUtf(256); } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a94df4a0f5730f154abd9ed788d7613d3b08de03..5031e4e9b59a1e013152f788b20c58646b30770f 100644 +index a07310aebd8406af27864358e15715fcc7694329..72292ee9620ee369ccee00dd0280bf6041d3afca 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -324,6 +324,20 @@ public class ServerGamePacketListenerImpl @@ -1903,7 +1903,7 @@ index 1fc9e1ad541c46124183a401b2a7d99aea69cecf..881271f0bc77a8a8a7d31daad9a8188b } diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 9a6e0c203ae7f0436a0b87f6060a1cdb6623d181..d8209037e988bc7a68f634a6650930bd1082c4d1 100644 +index 28e2ad1238651b8adb47b77763b0c8ae8172fe8a..fb387919e51504beafd2e7947faa41795df18100 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -146,6 +146,7 @@ import org.jetbrains.annotations.Contract; @@ -2111,7 +2111,7 @@ index 9a6e0c203ae7f0436a0b87f6060a1cdb6623d181..d8209037e988bc7a68f634a6650930bd // Paper start - optimise collisions public boolean updateFluidHeightAndDoFluidPushing(final TagKey fluid, final double flowScale) { if (this.touchingUnloadedChunk()) { -@@ -5143,7 +5209,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5133,7 +5199,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { @@ -2120,7 +2120,7 @@ index 9a6e0c203ae7f0436a0b87f6060a1cdb6623d181..d8209037e988bc7a68f634a6650930bd } public void onExplosionHit(@Nullable Entity entity) { -@@ -5396,4 +5462,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5391,4 +5457,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition()); } // Paper end - Expose entity id counter @@ -8233,7 +8233,7 @@ index cc34cadac8896a5f546d0879e795fea08d0c3f98..26a08b16de2318d5080be59a29c5f11e } } diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 7afdccf04e2239b0654e8f1ce7b7e22c39d84f44..20f4c879e46fdd0ed0515dbbb91f6411d5c76a51 100644 +index fcb1f6806908eb66592dc52f2b57286498cf7032..7dc97fccfd329253e0f6532d1cc2c06264674e15 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java @@ -56,6 +56,12 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -8249,7 +8249,7 @@ index 7afdccf04e2239b0654e8f1ce7b7e22c39d84f44..20f4c879e46fdd0ed0515dbbb91f6411 public ItemEntity(EntityType entityType, Level level) { super(entityType, level); -@@ -362,7 +368,16 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -370,7 +376,16 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) { @@ -8267,7 +8267,7 @@ index 7afdccf04e2239b0654e8f1ce7b7e22c39d84f44..20f4c879e46fdd0ed0515dbbb91f6411 return false; } else if (!level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damageSource.getEntity() instanceof Mob) { return false; -@@ -541,6 +556,12 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -549,6 +564,12 @@ public class ItemEntity extends Entity implements TraceableEntity { public void setItem(ItemStack stack) { this.getEntityData().set(DATA_ITEM, stack); this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper - Alternative item-despawn-rate @@ -8318,7 +8318,7 @@ index 17d54d38dcec39eefeb989cd576cc640a36e82f5..ef070f8a9ab3a4676e2141f7c0bc20a0 + // Purpur end - Shears can defuse TNT } diff --git a/net/minecraft/world/entity/monster/AbstractSkeleton.java b/net/minecraft/world/entity/monster/AbstractSkeleton.java -index 64848c1e834d3f5a3686cea7d9ec4f1c05cc7615..d69d5b575e93b4ae9a0e2b311352fd3790d464c6 100644 +index 894a3d988d0530d42d3a282b61cdb445a0f820ad..482de769f1b1fc0eac176cbc41a96f639dcc2d2d 100644 --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java @@ -64,21 +64,24 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo @@ -8388,16 +8388,16 @@ index 64848c1e834d3f5a3686cea7d9ec4f1c05cc7615..d69d5b575e93b4ae9a0e2b311352fd37 this.setItemSlot(EquipmentSlot.HEAD, new ItemStack(random.nextFloat() < 0.1F ? Blocks.JACK_O_LANTERN : Blocks.CARVED_PUMPKIN)); this.setDropChance(EquipmentSlot.HEAD, 0.0F); } -@@ -217,7 +197,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo - if (event.getProjectile() == arrow.getBukkitEntity()) { - // CraftBukkit end - Projectile.spawnProjectileUsingShoot( +@@ -209,7 +189,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + double squareRoot = Math.sqrt(d * d + d2 * d2); + if (this.level() instanceof ServerLevel serverLevel) { + Projectile.Delayed delayedEntity = Projectile.spawnProjectileUsingShootDelayed( // Paper - delayed - arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, 14 - serverLevel.getDifficulty().getId() * 4 -+ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option ++ arrow, serverLevel, projectile, d, d1 + squareRoot * 0.2F, d2, 1.6F, serverLevel.purpurConfig.skeletonBowAccuracyMap.getOrDefault(serverLevel.getDifficulty().getId(), (float) (14 - serverLevel.getDifficulty().getId() * 4)) // Purpur - skeleton bow accuracy option ); - } // CraftBukkit - } -@@ -243,14 +223,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo + + // Paper start - call EntityShootBowEvent +@@ -246,14 +226,14 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo protected void readAdditionalSaveData(ValueInput input) { super.readAdditionalSaveData(input); this.reassessWeaponGoal(); @@ -9685,7 +9685,7 @@ index 8d6def85583a111841b28f20f58ddb8b8cbd7bc1..a4ce65911a5d778f60bcedb3acd9fe59 @Override diff --git a/net/minecraft/world/entity/monster/Illusioner.java b/net/minecraft/world/entity/monster/Illusioner.java -index ec090d191969983c31950b8376bbb36ee8fce922..93eaafe260312f26840a2afee8375b8a95d97ba2 100644 +index 7441b019f669653e3e738f27c866270c30acffd4..2ea8c8480dcc15eb5b4bc9686554ec912ef1f3f4 100644 --- a/net/minecraft/world/entity/monster/Illusioner.java +++ b/net/minecraft/world/entity/monster/Illusioner.java @@ -57,10 +57,52 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { diff --git a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch index 56b6b371..c2f22db5 100644 --- a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch +++ b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 1aab4d41054f8e780e6c0ccdb96affee19068311..586ba2d9c4ad684a4a7875c49cab048f949322ab 100644 +index b567eed9e07e281c56ff707ad938661f37f4ee3f..54bb75a2a128e7747ab01cb0d40c81fb4340ffd1 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1841,7 +1841,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 0 && i <= maxSize) { diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 586ba2d9c4ad684a4a7875c49cab048f949322ab..3a1822e0f37c86dfad56ae06c14fffb960ff99ec 100644 +index 54bb75a2a128e7747ab01cb0d40c81fb4340ffd1..0fed0f181c4d1f31d01bdaa5dc9417ccd68b3f03 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1739,6 +1739,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 ? split[0] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix, ""); String suffix = (split.length > 1 ? split[1] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, ""); if (afk) { @@ -53,7 +53,7 @@ index 8d1571f3db4e7f6c4309b8a46ed0359ecdee85a5..ed62bb4dc142f122997e7db8ef07bdf8 } else { getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8e0e119b41ca1e49d7e3f7874c5fb3c2b434e737..8f9547083eb64a5ab93407725a8f4afcb23c5e23 100644 +index 2eecf924618192e1b8cf3971ac6cc3c95ec7f235..1306f920b5908731d04004e1b180c3ac4ad0745d 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2361,6 +2361,7 @@ public class ServerGamePacketListenerImpl diff --git a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch b/leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch similarity index 90% rename from leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch rename to leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch index 1e4e004b..a1c6431b 100644 --- a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch +++ b/leaf-server/minecraft-patches/features/0134-Virtual-thread-for-chat-executor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Virtual thread for chat executor diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index a5e90f57ffd86f75f80629a6be97d4eb7c2a9190..993f303a90a7698f0e62b7c39469aa5bff0725d1 100644 +index 534082a0441dcde9115652cb67dbc8310529ecee..5251e0b274ab5c182f89e52013a542c2b8f30304 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -2666,7 +2666,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop packet) { diff --git a/leaf-server/minecraft-patches/features/0138-Cache-player-profileResult.patch b/leaf-server/minecraft-patches/features/0137-Cache-player-profileResult.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0138-Cache-player-profileResult.patch rename to leaf-server/minecraft-patches/features/0137-Cache-player-profileResult.patch diff --git a/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch b/leaf-server/minecraft-patches/features/0138-Matter-Secure-Seed.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch rename to leaf-server/minecraft-patches/features/0138-Matter-Secure-Seed.patch diff --git a/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch b/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed-command.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch rename to leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed-command.patch diff --git a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch b/leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch rename to leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch index 22117b17..4818423e 100644 --- a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch +++ b/leaf-server/minecraft-patches/features/0140-Faster-random-generator.patch @@ -97,7 +97,7 @@ index 8516d47b0ba79d91638837199e7ae0fb6cb44a79..4f4b55dd099dd2c2fea118b18b535881 RandomSource fork(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 305181410e025d857608c866592bcc44e3654f31..f49bfe0bbb8d8373bd7a11fa3c1a828a46da6a4b 100644 +index 0cdd3eb97e74aa3955f014a1f8f6a7d1580d323f..574be7359a2ad62c95a42c46c7a0f3c7a42eb44e 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -155,7 +155,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0142-Don-t-save-primed-tnt-entity.patch b/leaf-server/minecraft-patches/features/0141-Don-t-save-primed-tnt-entity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0142-Don-t-save-primed-tnt-entity.patch rename to leaf-server/minecraft-patches/features/0141-Don-t-save-primed-tnt-entity.patch diff --git a/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch b/leaf-server/minecraft-patches/features/0142-Don-t-save-falling-block-entity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch rename to leaf-server/minecraft-patches/features/0142-Don-t-save-falling-block-entity.patch diff --git a/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch b/leaf-server/minecraft-patches/features/0143-Configurable-connection-message.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch rename to leaf-server/minecraft-patches/features/0143-Configurable-connection-message.patch diff --git a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch rename to leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch index 82e70647..26912e28 100644 --- a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch +++ b/leaf-server/minecraft-patches/features/0144-Configurable-unknown-command-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable unknown command message diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index a1f1e03a8ff5eb49ecfad5dda0dbd4bc35cd53df..cc1c2152c6949d1130b55de31ef22f15f717c7a5 100644 +index de450f9ef03944b101b483126af6a778ae8a4d1d..d201c3965d5a55de740175c140bc7ee411f1be78 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -403,31 +403,8 @@ public class Commands { +@@ -405,31 +405,8 @@ public class Commands { // Paper start - Add UnknownCommandEvent final net.kyori.adventure.text.TextComponent.Builder builder = net.kyori.adventure.text.Component.text(); // source.sendFailure(ComponentUtils.fromMessage(var7.getRawMessage())); @@ -41,7 +41,7 @@ index a1f1e03a8ff5eb49ecfad5dda0dbd4bc35cd53df..cc1c2152c6949d1130b55de31ef22f15 org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event); if (event.message() != null) { source.sendFailure(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); -@@ -661,6 +638,92 @@ public class Commands { +@@ -663,6 +640,92 @@ public class Commands { }; } diff --git a/leaf-server/minecraft-patches/features/0146-Remove-stream-in-BlockBehaviour-cache-blockstate.patch b/leaf-server/minecraft-patches/features/0145-Remove-stream-in-BlockBehaviour-cache-blockstate.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0146-Remove-stream-in-BlockBehaviour-cache-blockstate.patch rename to leaf-server/minecraft-patches/features/0145-Remove-stream-in-BlockBehaviour-cache-blockstate.patch diff --git a/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch b/leaf-server/minecraft-patches/features/0146-Remove-stream-in-entity-visible-effects-filter.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch rename to leaf-server/minecraft-patches/features/0146-Remove-stream-in-entity-visible-effects-filter.patch diff --git a/leaf-server/minecraft-patches/features/0148-Remove-stream-and-double-iteration-in-enough-deep-sl.patch b/leaf-server/minecraft-patches/features/0147-Remove-stream-and-double-iteration-in-enough-deep-sl.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0148-Remove-stream-and-double-iteration-in-enough-deep-sl.patch rename to leaf-server/minecraft-patches/features/0147-Remove-stream-and-double-iteration-in-enough-deep-sl.patch diff --git a/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch b/leaf-server/minecraft-patches/features/0148-Remove-stream-in-trial-spawner-ticking.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch rename to leaf-server/minecraft-patches/features/0148-Remove-stream-in-trial-spawner-ticking.patch diff --git a/leaf-server/minecraft-patches/features/0150-Remove-stream-in-Brain.patch b/leaf-server/minecraft-patches/features/0149-Remove-stream-in-Brain.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0150-Remove-stream-in-Brain.patch rename to leaf-server/minecraft-patches/features/0149-Remove-stream-in-Brain.patch diff --git a/leaf-server/minecraft-patches/features/0151-Remove-stream-in-BehaviorUtils.patch b/leaf-server/minecraft-patches/features/0150-Remove-stream-in-BehaviorUtils.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0151-Remove-stream-in-BehaviorUtils.patch rename to leaf-server/minecraft-patches/features/0150-Remove-stream-in-BehaviorUtils.patch diff --git a/leaf-server/minecraft-patches/features/0152-Remove-stream-in-YieldJobSite.patch b/leaf-server/minecraft-patches/features/0151-Remove-stream-in-YieldJobSite.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0152-Remove-stream-in-YieldJobSite.patch rename to leaf-server/minecraft-patches/features/0151-Remove-stream-in-YieldJobSite.patch diff --git a/leaf-server/minecraft-patches/features/0153-Remove-stream-in-PlayerSensor.patch b/leaf-server/minecraft-patches/features/0152-Remove-stream-in-PlayerSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0153-Remove-stream-in-PlayerSensor.patch rename to leaf-server/minecraft-patches/features/0152-Remove-stream-in-PlayerSensor.patch diff --git a/leaf-server/minecraft-patches/features/0154-Remove-stream-in-GolemSensor.patch b/leaf-server/minecraft-patches/features/0153-Remove-stream-in-GolemSensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0154-Remove-stream-in-GolemSensor.patch rename to leaf-server/minecraft-patches/features/0153-Remove-stream-in-GolemSensor.patch diff --git a/leaf-server/minecraft-patches/features/0155-Remove-stream-in-GateBehavior.patch b/leaf-server/minecraft-patches/features/0154-Remove-stream-in-GateBehavior.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0155-Remove-stream-in-GateBehavior.patch rename to leaf-server/minecraft-patches/features/0154-Remove-stream-in-GateBehavior.patch diff --git a/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch b/leaf-server/minecraft-patches/features/0155-Remove-stream-in-updateFluidOnEyes.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch rename to leaf-server/minecraft-patches/features/0155-Remove-stream-in-updateFluidOnEyes.patch index 6b0369b4..8e8d5da8 100644 --- a/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch +++ b/leaf-server/minecraft-patches/features/0155-Remove-stream-in-updateFluidOnEyes.patch @@ -46,7 +46,7 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89 public String toString() { return "Reference{" + this.key + "=" + this.value + "}"; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index f49bfe0bbb8d8373bd7a11fa3c1a828a46da6a4b..083d078f569aebbed1ab586ec99709e7c38e13b6 100644 +index 574be7359a2ad62c95a42c46c7a0f3c7a42eb44e..1b0662d8837bb338980bc5862bddf4cbd5c3038c 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -2050,7 +2050,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0157-Remove-stream-in-matchingSlot.patch b/leaf-server/minecraft-patches/features/0156-Remove-stream-in-matchingSlot.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0157-Remove-stream-in-matchingSlot.patch rename to leaf-server/minecraft-patches/features/0156-Remove-stream-in-matchingSlot.patch diff --git a/leaf-server/minecraft-patches/features/0158-Remove-stream-in-entity-mountedOrDismounted-changes-.patch b/leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch similarity index 94% rename from leaf-server/minecraft-patches/features/0158-Remove-stream-in-entity-mountedOrDismounted-changes-.patch rename to leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch index 4a7ad3f7..6bb0594b 100644 --- a/leaf-server/minecraft-patches/features/0158-Remove-stream-in-entity-mountedOrDismounted-changes-.patch +++ b/leaf-server/minecraft-patches/features/0157-Remove-stream-in-entity-mountedOrDismounted-changes-.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove stream in entity mountedOrDismounted changes update diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index b3fe9ea70148cdbefbdb617abaf81fe48ee26685..d6b261f8d3fbeee771208528b3e0bd5fcd94878b 100644 +index 4859433b0a4160e7ee0af4c2e750956f6ca07649..d605c4da4475fdc47a6d0c90fbca2713fc9d8fef 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -118,7 +118,19 @@ public class ServerEntity { diff --git a/leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0158-Replace-Entity-active-effects-map-with-optimized-col.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch rename to leaf-server/minecraft-patches/features/0158-Replace-Entity-active-effects-map-with-optimized-col.patch diff --git a/leaf-server/minecraft-patches/features/0160-Replace-criterion-map-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch similarity index 93% rename from leaf-server/minecraft-patches/features/0160-Replace-criterion-map-with-optimized-collection.patch rename to leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch index d04c8e32..9fc76dac 100644 --- a/leaf-server/minecraft-patches/features/0160-Replace-criterion-map-with-optimized-collection.patch +++ b/leaf-server/minecraft-patches/features/0159-Replace-criterion-map-with-optimized-collection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Replace criterion map with optimized collection diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index c7e92f0122823d9e1aa471c5c0e995d1e1d90184..10ac7393d20a0857be2bfdd856dda448699b3eff 100644 +index eee5aaca8219802a56b8ba08986da672c40dc8b4..4bf87ebb49880b8e09203a48fce6371398281561 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java @@ -60,7 +60,7 @@ public class PlayerAdvancements { diff --git a/leaf-server/minecraft-patches/features/0161-Replace-brain-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0160-Replace-brain-with-optimized-collection.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0161-Replace-brain-with-optimized-collection.patch rename to leaf-server/minecraft-patches/features/0160-Replace-brain-with-optimized-collection.patch diff --git a/leaf-server/minecraft-patches/features/0162-Reduce-worldgen-allocations.patch b/leaf-server/minecraft-patches/features/0161-Reduce-worldgen-allocations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0162-Reduce-worldgen-allocations.patch rename to leaf-server/minecraft-patches/features/0161-Reduce-worldgen-allocations.patch diff --git a/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch b/leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch rename to leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch index 5fc7c252..a2bb1019 100644 --- a/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch +++ b/leaf-server/minecraft-patches/features/0162-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch @@ -23,7 +23,7 @@ See the License for the specific language governing permissions and limitations under the License. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8f9547083eb64a5ab93407725a8f4afcb23c5e23..170ffd6ded953005951f38d02c3124cc86a9c821 100644 +index 1306f920b5908731d04004e1b180c3ac4ad0745d..faa135c3eb1bfc8f52c90e6f88411fdf48ed9ee1 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -328,17 +328,12 @@ public class ServerGamePacketListenerImpl diff --git a/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch rename to leaf-server/minecraft-patches/features/0163-Do-not-place-player-if-the-server-is-full.patch diff --git a/leaf-server/minecraft-patches/features/0165-Fix-MC-65198.patch b/leaf-server/minecraft-patches/features/0164-Fix-MC-65198.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0165-Fix-MC-65198.patch rename to leaf-server/minecraft-patches/features/0164-Fix-MC-65198.patch diff --git a/leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch b/leaf-server/minecraft-patches/features/0165-Fix-MC-200418.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch rename to leaf-server/minecraft-patches/features/0165-Fix-MC-200418.patch diff --git a/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch b/leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch similarity index 85% rename from leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch rename to leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch index f00b0beb..891198f4 100644 --- a/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch +++ b/leaf-server/minecraft-patches/features/0166-Fix-MC-119417.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-119417 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-119417 diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 93e6eb5f160a58351f97683f57c763e418786d1c..72cf6f83b3158c3ccf6f8b51652e6fe6401ae0e6 100644 +index b71b4db16ac8b42c0061f15db05d4315dd7fecb4..fdce25cdfdd91938a97dc381e4ada1744e64c931 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2230,6 +2230,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2294,6 +2294,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId())); if (gameMode == GameType.SPECTATOR) { this.removeEntitiesOnShoulder(); diff --git a/leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch b/leaf-server/minecraft-patches/features/0167-Fix-MC-223153.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch rename to leaf-server/minecraft-patches/features/0167-Fix-MC-223153.patch diff --git a/leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch b/leaf-server/minecraft-patches/features/0168-Configurable-player-knockback-zombie.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch rename to leaf-server/minecraft-patches/features/0168-Configurable-player-knockback-zombie.patch diff --git a/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch rename to leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch index badf2c0f..b4134699 100644 --- a/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch +++ b/leaf-server/minecraft-patches/features/0169-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch @@ -24,7 +24,7 @@ index a6be753d1284167e090c40e6dcfbaa56b4e3d774..867353500482247bbec79f407246902c if (this.goalSelector.inactiveTick(this.activatedPriority, true) && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking this.goalSelector.tick(); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index a4c474b6804020317750da06f00dcb2ec049d0b7..50d030205b2316e6ad5939ed62cc8b512338da00 100644 +index 165d0f50e7818b6daf834507033feaa2fabcaf19..5106013430c17d4a55f666163d0cb1e4c0497302 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java @@ -375,7 +375,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler diff --git a/leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/leaf-server/minecraft-patches/features/0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch rename to leaf-server/minecraft-patches/features/0170-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch diff --git a/leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch b/leaf-server/minecraft-patches/features/0171-PaperPR-Fix-some-beacon-event-issues.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch rename to leaf-server/minecraft-patches/features/0171-PaperPR-Fix-some-beacon-event-issues.patch diff --git a/leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch b/leaf-server/minecraft-patches/features/0172-Dont-send-useless-entity-packets.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch rename to leaf-server/minecraft-patches/features/0172-Dont-send-useless-entity-packets.patch diff --git a/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch b/leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch rename to leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch index 62e6fdf9..da1c1a18 100644 --- a/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch +++ b/leaf-server/minecraft-patches/features/0173-Multithreaded-Tracker.patch @@ -400,7 +400,7 @@ index 08d12a1acc3a672a77daa15f82392cd603c30283..c5949a0e852ca6de84e8dd12e3d4ed85 } } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 170ffd6ded953005951f38d02c3124cc86a9c821..d60840837c1b609f6dffd866a582ad7ce787b916 100644 +index faa135c3eb1bfc8f52c90e6f88411fdf48ed9ee1..0dec7852a4f225b9e9e94debf9259faea625028f 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1914,7 +1914,7 @@ public class ServerGamePacketListenerImpl diff --git a/leaf-server/minecraft-patches/features/0175-Nitori-Async-playerdata-saving.patch b/leaf-server/minecraft-patches/features/0174-Nitori-Async-playerdata-saving.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0175-Nitori-Async-playerdata-saving.patch rename to leaf-server/minecraft-patches/features/0174-Nitori-Async-playerdata-saving.patch diff --git a/leaf-server/minecraft-patches/features/0176-Optimize-nearby-alive-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0175-Optimize-nearby-alive-players-for-spawning.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0176-Optimize-nearby-alive-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0175-Optimize-nearby-alive-players-for-spawning.patch diff --git a/leaf-server/minecraft-patches/features/0177-Cache-blockstate-cache-array.patch b/leaf-server/minecraft-patches/features/0176-Cache-blockstate-cache-array.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0177-Cache-blockstate-cache-array.patch rename to leaf-server/minecraft-patches/features/0176-Cache-blockstate-cache-array.patch diff --git a/leaf-server/minecraft-patches/features/0178-Asynchronous-locator.patch b/leaf-server/minecraft-patches/features/0177-Asynchronous-locator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0178-Asynchronous-locator.patch rename to leaf-server/minecraft-patches/features/0177-Asynchronous-locator.patch diff --git a/leaf-server/minecraft-patches/features/0179-Smart-sort-entities-in-NearestLivingEntitySensor.patch b/leaf-server/minecraft-patches/features/0178-Smart-sort-entities-in-NearestLivingEntitySensor.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0179-Smart-sort-entities-in-NearestLivingEntitySensor.patch rename to leaf-server/minecraft-patches/features/0178-Smart-sort-entities-in-NearestLivingEntitySensor.patch diff --git a/leaf-server/minecraft-patches/features/0180-Further-reduce-memory-footprint-of-CompoundTag.patch b/leaf-server/minecraft-patches/features/0179-Further-reduce-memory-footprint-of-CompoundTag.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0180-Further-reduce-memory-footprint-of-CompoundTag.patch rename to leaf-server/minecraft-patches/features/0179-Further-reduce-memory-footprint-of-CompoundTag.patch diff --git a/leaf-server/minecraft-patches/features/0181-Optimize-Entity-distanceToSqr.patch b/leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0181-Optimize-Entity-distanceToSqr.patch rename to leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch index 8d772473..4bfd29f3 100644 --- a/leaf-server/minecraft-patches/features/0181-Optimize-Entity-distanceToSqr.patch +++ b/leaf-server/minecraft-patches/features/0180-Optimize-Entity-distanceToSqr.patch @@ -8,7 +8,7 @@ avoids multiple casting in Entity#distanceTo, using Math#sqrt directly instead o these methods more able to be inlined by the JIT compiler. diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 89f76c1f87719b84578ec322625eeadaa2397838..754fc507479f4b0bb4b270dfc18d45632d31cf46 100644 +index 1b0662d8837bb338980bc5862bddf4cbd5c3038c..52d0b4ab7e8567f5be11db2dfaf7e52c4979ea76 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -2260,31 +2260,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -43,7 +43,7 @@ index 89f76c1f87719b84578ec322625eeadaa2397838..754fc507479f4b0bb4b270dfc18d4563 public void playerTouch(Player player) { } -@@ -5515,4 +5490,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5510,4 +5485,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // Purpur end - Ridables diff --git a/leaf-server/minecraft-patches/features/0182-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch b/leaf-server/minecraft-patches/features/0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0182-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch rename to leaf-server/minecraft-patches/features/0181-EMC-Don-t-use-snapshots-for-TileEntity-getOwner.patch diff --git a/leaf-server/minecraft-patches/features/0183-Cache-tile-entity-position.patch b/leaf-server/minecraft-patches/features/0182-Cache-tile-entity-position.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0183-Cache-tile-entity-position.patch rename to leaf-server/minecraft-patches/features/0182-Cache-tile-entity-position.patch diff --git a/leaf-server/minecraft-patches/features/0184-TT20-Lag-compensation.patch b/leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch similarity index 95% rename from leaf-server/minecraft-patches/features/0184-TT20-Lag-compensation.patch rename to leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch index ecb6fc9b..d028da02 100644 --- a/leaf-server/minecraft-patches/features/0184-TT20-Lag-compensation.patch +++ b/leaf-server/minecraft-patches/features/0183-TT20-Lag-compensation.patch @@ -7,10 +7,10 @@ Original license: AGPL-3.0 Original project: https://github.com/snackbag/TT20 diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 993f303a90a7698f0e62b7c39469aa5bff0725d1..65f19d6b9b2a3edb8f24eca988c9f3dae7c1d6df 100644 +index 5251e0b274ab5c182f89e52013a542c2b8f30304..07c9a7105de7111de73b6a786a860f8676015897 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1542,6 +1542,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 781b5f841a142179ce577a3b1337da0eab6c0743..69d67ad9e8daea33b0ef64aaa04370033a00c265 100644 +index fdce25cdfdd91938a97dc381e4ada1744e64c931..4c1786201a4044db61e99c148fca4714e2b172ad 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -1549,6 +1549,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1613,6 +1613,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.containerMenu.broadcastChanges(); } diff --git a/leaf-server/minecraft-patches/features/0207-Slightly-optimise-getNearestPlayer.patch b/leaf-server/minecraft-patches/features/0206-Slightly-optimise-getNearestPlayer.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0207-Slightly-optimise-getNearestPlayer.patch rename to leaf-server/minecraft-patches/features/0206-Slightly-optimise-getNearestPlayer.patch diff --git a/leaf-server/minecraft-patches/features/0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch b/leaf-server/minecraft-patches/features/0207-Bulk-writes-to-writeLongArray-during-chunk-loading.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0208-Bulk-writes-to-writeLongArray-during-chunk-loading.patch rename to leaf-server/minecraft-patches/features/0207-Bulk-writes-to-writeLongArray-during-chunk-loading.patch diff --git a/leaf-server/minecraft-patches/features/0209-Improve-sorting-in-SortedArraySet.patch b/leaf-server/minecraft-patches/features/0208-Improve-sorting-in-SortedArraySet.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0209-Improve-sorting-in-SortedArraySet.patch rename to leaf-server/minecraft-patches/features/0208-Improve-sorting-in-SortedArraySet.patch diff --git a/leaf-server/minecraft-patches/features/0210-Make-removeIf-slightly-faster.patch b/leaf-server/minecraft-patches/features/0209-Make-removeIf-slightly-faster.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0210-Make-removeIf-slightly-faster.patch rename to leaf-server/minecraft-patches/features/0209-Make-removeIf-slightly-faster.patch diff --git a/leaf-server/minecraft-patches/features/0211-Optimize-LinearPalette.patch b/leaf-server/minecraft-patches/features/0210-Optimize-LinearPalette.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0211-Optimize-LinearPalette.patch rename to leaf-server/minecraft-patches/features/0210-Optimize-LinearPalette.patch diff --git a/leaf-server/minecraft-patches/features/0212-Slightly-optimized-VarInt-write.patch b/leaf-server/minecraft-patches/features/0211-Slightly-optimized-VarInt-write.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0212-Slightly-optimized-VarInt-write.patch rename to leaf-server/minecraft-patches/features/0211-Slightly-optimized-VarInt-write.patch diff --git a/leaf-server/minecraft-patches/features/0213-Rewrite-ClientboundLightUpdatePacketData.patch b/leaf-server/minecraft-patches/features/0212-Rewrite-ClientboundLightUpdatePacketData.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0213-Rewrite-ClientboundLightUpdatePacketData.patch rename to leaf-server/minecraft-patches/features/0212-Rewrite-ClientboundLightUpdatePacketData.patch diff --git a/leaf-server/minecraft-patches/features/0214-Async-chunk-send.patch b/leaf-server/minecraft-patches/features/0213-Async-chunk-send.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0214-Async-chunk-send.patch rename to leaf-server/minecraft-patches/features/0213-Async-chunk-send.patch diff --git a/leaf-server/minecraft-patches/features/0215-Spawner-Configurations.patch b/leaf-server/minecraft-patches/features/0214-Spawner-Configurations.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0215-Spawner-Configurations.patch rename to leaf-server/minecraft-patches/features/0214-Spawner-Configurations.patch diff --git a/leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/minecraft-patches/features/0215-SparklyPaper-Parallel-world-ticking.patch similarity index 98% rename from leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/minecraft-patches/features/0215-SparklyPaper-Parallel-world-ticking.patch index 5eb1a5fe..ce23401d 100644 --- a/leaf-server/minecraft-patches/features/0216-SparklyPaper-Parallel-world-ticking.patch +++ b/leaf-server/minecraft-patches/features/0215-SparklyPaper-Parallel-world-ticking.patch @@ -80,18 +80,18 @@ index 582e012222123e5001c34153f2ee1ab1d08935fd..c0bce2293d07ca58cc5bc9e036ab8dca List states = new java.util.ArrayList<>(level.capturedBlockStates.values()); level.capturedBlockStates.clear(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 65f19d6b9b2a3edb8f24eca988c9f3dae7c1d6df..940aad1282c48dfeaa906d1c9abfc269fbe05bd7 100644 +index 07c9a7105de7111de73b6a786a860f8676015897..15bf079e1d634505c78f345dbef06c2c19eee393 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -291,6 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async) + public java.util.concurrent.Semaphore serverLevelTickingSemaphore = null; // SparklyPaper - parallel world ticking public static S spin(Function threadFunction) { ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system -@@ -323,24 +324,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit -@@ -1729,28 +1760,50 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> oldLevels = this.levels; Map, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels); newLevels.remove(level.dimension()); @@ -640,18 +640,27 @@ index 3a31f9132a7271ea476cc85c5a10ea7f327256bf..61ccb98e02f30b143226b110d5b5f731 // Paper start - extra debug info if (entity.valid) { diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 69d67ad9e8daea33b0ef64aaa04370033a00c265..e5d302609638cbe29d7f379abab612650f9ff010 100644 +index 4c1786201a4044db61e99c148fca4714e2b172ad..b25b6105202bb76604fadeded15bdd877eaa66d3 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -467,6 +467,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return this.viewDistanceHolder; } // Paper end - rewrite chunk system -+ public boolean hasTickedAtLeastOnceInNewWorld = false; // SparklyPaper - parallel world ticking (fixes bug in DreamResourceReset where the inventory is opened AFTER the player has changed worlds, if you click with the quick tp torch in a chest, because the inventory is opened AFTER the player has teleported) ++ + // Paper start - improve keepalives + public long lastKeepAliveTx = System.nanoTime(); + public static final record KeepAliveResponse(long txTimeNS, long rxTimeNS) { +@@ -532,6 +533,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + } + // Paper end - improve keepalives ++ public boolean hasTickedAtLeastOnceInNewWorld = false; // SparklyPaper - parallel world ticking (fixes bug in DreamResourceReset where the inventory is opened AFTER the player has changed worlds, if you click with the quick tp torch in a chest, because the inventory is opened AFTER the player has teleported) ++ public ServerPlayer(MinecraftServer server, ServerLevel level, GameProfile gameProfile, ClientInformation clientInformation) { super(level, gameProfile); -@@ -754,6 +755,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.textFilter = server.createTextFilterForPlayer(this); +@@ -818,6 +821,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void tick() { @@ -659,7 +668,7 @@ index 69d67ad9e8daea33b0ef64aaa04370033a00c265..e5d302609638cbe29d7f379abab61265 // CraftBukkit start if (this.joining) { this.joining = false; -@@ -1430,6 +1432,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1494,6 +1498,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc teleportTransition.postTeleportTransition().onTransition(this); return this; } else { @@ -668,7 +677,7 @@ index 69d67ad9e8daea33b0ef64aaa04370033a00c265..e5d302609638cbe29d7f379abab61265 // CraftBukkit start /* this.isChangingDimension = true; -@@ -1783,6 +1787,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1847,6 +1853,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc return OptionalInt.empty(); } else { // CraftBukkit start @@ -681,7 +690,7 @@ index 69d67ad9e8daea33b0ef64aaa04370033a00c265..e5d302609638cbe29d7f379abab61265 this.containerMenu = abstractContainerMenu; // Moved up if (!this.isImmobile()) this.connection -@@ -1847,6 +1857,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1911,6 +1923,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc } @Override public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) { @@ -731,7 +740,7 @@ index 3cd9b0df617715d0b3e70a6096e52bb5d22ab426..f1002643589f67adce26667b1750a129 serverPlayer.connection = player.connection; serverPlayer.restoreFrom(player, keepInventory); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 8d7e7dc019ff40f60006f3b2677c29251d7cecc5..71b4d54814c815bc9e8fc6be820260180d0aa208 100644 +index 745176aecb6052c815b8dd5fce60a9ae3efd0857..fb95bbc7f7330611ddeb4d676af63042ea036335 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -3510,15 +3510,40 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch b/leaf-server/minecraft-patches/features/0216-SparklyPaper-Track-each-world-MSPT.patch similarity index 97% rename from leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch rename to leaf-server/minecraft-patches/features/0216-SparklyPaper-Track-each-world-MSPT.patch index 7294a800..2963f1c1 100644 --- a/leaf-server/minecraft-patches/features/0217-SparklyPaper-Track-each-world-MSPT.patch +++ b/leaf-server/minecraft-patches/features/0216-SparklyPaper-Track-each-world-MSPT.patch @@ -6,10 +6,10 @@ Subject: [PATCH] SparklyPaper: Track each world MSPT Original project: https://github.com/SparklyPower/SparklyPaper diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 940aad1282c48dfeaa906d1c9abfc269fbe05bd7..50da03adea9b496ef3622ee163daf169fd045c2d 100644 +index 15bf079e1d634505c78f345dbef06c2c19eee393..2b28518b6ec9d260a80abc7e0e5e867a5fed9e7c 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1685,7 +1685,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async) public java.util.concurrent.Semaphore serverLevelTickingSemaphore = null; // SparklyPaper - parallel world ticking + @Nullable public org.dreeam.leaf.async.ai.AsyncGoalThread asyncGoalThread; // Leaf - Async target finding diff --git a/leaf-server/minecraft-patches/features/0236-Optimize-ThreadedTicketLevelPropagator.patch b/leaf-server/minecraft-patches/features/0235-Optimize-ThreadedTicketLevelPropagator.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0236-Optimize-ThreadedTicketLevelPropagator.patch rename to leaf-server/minecraft-patches/features/0235-Optimize-ThreadedTicketLevelPropagator.patch diff --git a/leaf-server/minecraft-patches/features/0237-Optimise-MobEffectUtil-getDigSpeedAmplification.patch b/leaf-server/minecraft-patches/features/0236-Optimise-MobEffectUtil-getDigSpeedAmplification.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0237-Optimise-MobEffectUtil-getDigSpeedAmplification.patch rename to leaf-server/minecraft-patches/features/0236-Optimise-MobEffectUtil-getDigSpeedAmplification.patch diff --git a/leaf-server/minecraft-patches/features/0238-Optimise-chunkUnloads.patch b/leaf-server/minecraft-patches/features/0237-Optimise-chunkUnloads.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0238-Optimise-chunkUnloads.patch rename to leaf-server/minecraft-patches/features/0237-Optimise-chunkUnloads.patch diff --git a/leaf-server/minecraft-patches/features/0239-Optimize-BlockEntityType-isValid.patch b/leaf-server/minecraft-patches/features/0238-Optimize-BlockEntityType-isValid.patch similarity index 96% rename from leaf-server/minecraft-patches/features/0239-Optimize-BlockEntityType-isValid.patch rename to leaf-server/minecraft-patches/features/0238-Optimize-BlockEntityType-isValid.patch index 08b11cf8..5077d8d6 100644 --- a/leaf-server/minecraft-patches/features/0239-Optimize-BlockEntityType-isValid.patch +++ b/leaf-server/minecraft-patches/features/0238-Optimize-BlockEntityType-isValid.patch @@ -33,7 +33,7 @@ index 386e6a48701b4c9256e33174123381a93d61e292..2bc620ceb8368e9a74b831de698de94a @Deprecated diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index e8017f8ade048f02ec9adbabad9dcfd1ae9c6f93..3831010b2088da10eb48c81cac8ad05822409628 100644 +index 3219b9caa654c7a64e5e4a92178528e1104b34c7..6d522e9485fadd6fc0f350cb30ba5224aa046d4f 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -101,6 +101,7 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/leaf-server/minecraft-patches/features/0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch b/leaf-server/minecraft-patches/features/0239-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0240-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch rename to leaf-server/minecraft-patches/features/0239-PaperPR-Add-ticket-on-player-join-to-avoid-chunk-loa.patch diff --git a/leaf-server/minecraft-patches/features/0241-Sakura-copy-EntityList-implementation-to-BasicEntity.patch b/leaf-server/minecraft-patches/features/0240-Sakura-copy-EntityList-implementation-to-BasicEntity.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0241-Sakura-copy-EntityList-implementation-to-BasicEntity.patch rename to leaf-server/minecraft-patches/features/0240-Sakura-copy-EntityList-implementation-to-BasicEntity.patch diff --git a/leaf-server/minecraft-patches/features/0242-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0241-Protocol-Core.patch similarity index 88% rename from leaf-server/minecraft-patches/features/0242-Protocol-Core.patch rename to leaf-server/minecraft-patches/features/0241-Protocol-Core.patch index 06d9b7f9..3fa023aa 100644 --- a/leaf-server/minecraft-patches/features/0242-Protocol-Core.patch +++ b/leaf-server/minecraft-patches/features/0241-Protocol-Core.patch @@ -22,10 +22,10 @@ index 56fd1ed7ccaf96e7eedea60fbdbf7f934939d563..d2f522ea6d0a209496848af073c9af1c } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 440427d23747474a400487d372d079694caa1c18..7be848b2058bddc13a20b44a1853f4aec0eb4769 100644 +index 42dbd6d9e82130cfc5ae4669c460373631061451..b3356ad173027afafba931f31952c5b5ddc57891 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1823,6 +1823,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop")) { @@ -18,7 +18,7 @@ index cc1c2152c6949d1130b55de31ef22f15f717c7a5..eed14e622b6a34ec55d9a6ce2efc2a2d } final String input = commandSyntaxException.getInput(); -@@ -695,7 +695,7 @@ public class Commands { +@@ -697,7 +697,7 @@ public class Commands { private static net.kyori.adventure.text.Component getVanillaUnknownCommandMessage( net.kyori.adventure.text.TextComponent.Builder builder, CommandSyntaxException var7, String command ) { diff --git a/leaf-server/minecraft-patches/features/0270-optimize-random-tick.patch b/leaf-server/minecraft-patches/features/0269-optimize-random-tick.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0270-optimize-random-tick.patch rename to leaf-server/minecraft-patches/features/0269-optimize-random-tick.patch diff --git a/leaf-server/minecraft-patches/features/0271-do-not-log-invalid-flatten-text-component-parse.patch b/leaf-server/minecraft-patches/features/0270-do-not-log-invalid-flatten-text-component-parse.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0271-do-not-log-invalid-flatten-text-component-parse.patch rename to leaf-server/minecraft-patches/features/0270-do-not-log-invalid-flatten-text-component-parse.patch diff --git a/leaf-server/minecraft-patches/features/0272-Fast-BiomeManager-seed-obfuscation.patch b/leaf-server/minecraft-patches/features/0271-Fast-BiomeManager-seed-obfuscation.patch similarity index 100% rename from leaf-server/minecraft-patches/features/0272-Fast-BiomeManager-seed-obfuscation.patch rename to leaf-server/minecraft-patches/features/0271-Fast-BiomeManager-seed-obfuscation.patch diff --git a/leaf-server/minecraft-patches/features/0273-Paw-optimization.patch b/leaf-server/minecraft-patches/features/0272-Paw-optimization.patch similarity index 99% rename from leaf-server/minecraft-patches/features/0273-Paw-optimization.patch rename to leaf-server/minecraft-patches/features/0272-Paw-optimization.patch index c202152b..7d75195f 100644 --- a/leaf-server/minecraft-patches/features/0273-Paw-optimization.patch +++ b/leaf-server/minecraft-patches/features/0272-Paw-optimization.patch @@ -149,7 +149,7 @@ index 35fb0770eb385e3837cb29711905c41b899bac8f..fd6fe51ccac5163e70569484239bebeb private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2 diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4dce68aafbccfeda82d0bee127a59f43502c6f70..145c5f7a69710fe636bb5bca97f5a43fb778203d 100644 +index 7ecea053ecbf45949fa8e855a3a30d877446d5dc..f318e3d6a746ccb4688e0d8ab41b366eb8bc3968 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -1166,16 +1166,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -210,9 +210,9 @@ index 4dce68aafbccfeda82d0bee127a59f43502c6f70..145c5f7a69710fe636bb5bca97f5a43f } public void addDeltaMovement(Vec3 addend) { -@@ -5161,9 +5133,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5151,9 +5123,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } - // Paper end - Fix MC-4 + // Paper end - Block invalid positions and bounding box if (this.position.x != x || this.position.y != y || this.position.z != z) { - synchronized (this.posLock) { // Paper - detailed watchdog information this.position = new Vec3(x, y, z); diff --git a/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch b/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch index 6763d9b3..189d0f5c 100644 --- a/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch +++ b/leaf-server/paper-patches/features/0009-Purpur-Server-Paper-Changes.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Purpur Server Paper Changes Original license: MIT Original project: https://github.com/PurpurMC/Purpur -Commit: afcdf9bb72f88eb18266f5efd8c135904d82fd3d +Commit: 47e758fb34a5dc8e7c81a99af74df6c0bf78ae42 Patches listed below are removed in this patch, They exists in Gale or Leaf: * "Rebrand.patch" @@ -634,10 +634,10 @@ index bcdd1581ed564e8002f8120ab2efa38871c40ba7..b66a7e4da7fd3fe22fef65a201705dcf + // Purpur end - Lagging threshold } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7990382df41824b7a4072fd4a44d02a229a4d9b6..400fa612389c40f36d64ecd1b65f3330c8a9071a 100644 +index 68351e47609ae06f0a1641b4ad2013ce6261ae4e..cd43af3f442f7d8af1a4552a0eff33958873a366 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2370,6 +2370,50 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2374,6 +2374,50 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight()); } @@ -859,10 +859,10 @@ index 000c5ea5d39d5ab6e5592012ab1cc7ee547505dc..140da7078217f833f490d88faaf803ab @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index a41f481a1ee5bbca7dbb3fce29f55fbf7028ec77..55ae7d0a5b36ff10880d4e5fb1bb7f7724a743fd 100644 +index b38073628d3b1381ccc4e5c6c44b2b7ec8ba1273..476eefebace887064b728f08af40c746b6f70787 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -108,6 +108,25 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -113,6 +113,25 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { this.entityType = CraftEntityType.minecraftToBukkit(entity.getType()); } @@ -888,7 +888,7 @@ index a41f481a1ee5bbca7dbb3fce29f55fbf7028ec77..55ae7d0a5b36ff10880d4e5fb1bb7f77 public static CraftEntity getEntity(CraftServer server, T entity) { Preconditions.checkArgument(entity != null, "Unknown entity"); -@@ -297,6 +316,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -302,6 +321,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { boolean retainPassengers = flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS); // Don't allow teleporting between worlds while keeping passengers if (flagSet.contains(io.papermc.paper.entity.TeleportFlag.EntityState.RETAIN_PASSENGERS) && this.entity.isVehicle() && location.getWorld() != this.getWorld()) { @@ -896,7 +896,7 @@ index a41f481a1ee5bbca7dbb3fce29f55fbf7028ec77..55ae7d0a5b36ff10880d4e5fb1bb7f77 return false; } -@@ -1336,4 +1356,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1333,4 +1353,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return this.entity.get(io.papermc.paper.datacomponent.PaperDataComponentType.bukkitToMinecraft(type)) != null; } @@ -1068,10 +1068,10 @@ index 02deb9c37250144be9afa0fe55df2a49017a7070..dfb597fcb8d01ed6cf20eae57e260949 + // Purpur end - Llama API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 144623d4ef1f795f70846bcd9d60740ae9a93a81..213afcae6bb02e4e340d5fa477bdddbb9434fc70 100644 +index 3e18819ae23ab5ecd866d61cd0fd62ce1324109e..7f17c5025f25e44a917f5d6a65b8d958a982b301 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -617,10 +617,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -625,10 +625,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setPlayerListName(String name) { @@ -1088,7 +1088,7 @@ index 144623d4ef1f795f70846bcd9d60740ae9a93a81..213afcae6bb02e4e340d5fa477bdddbb if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined for (ServerPlayer player : (List) this.server.getHandle().players) { if (player.getBukkitEntity().canSee(this)) { -@@ -1434,6 +1439,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1442,6 +1447,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start - Teleport passenger API // Don't allow teleporting between worlds while keeping passengers if (ignorePassengers && entity.isVehicle() && location.getWorld() != this.getWorld()) { @@ -1096,7 +1096,7 @@ index 144623d4ef1f795f70846bcd9d60740ae9a93a81..213afcae6bb02e4e340d5fa477bdddbb return false; } -@@ -1455,6 +1461,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1463,6 +1469,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle() && !ignorePassengers) { // Paper - Teleport API @@ -1104,7 +1104,7 @@ index 144623d4ef1f795f70846bcd9d60740ae9a93a81..213afcae6bb02e4e340d5fa477bdddbb return false; } -@@ -2718,6 +2725,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2726,6 +2733,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().getAbilities().walkingSpeed * 2f; } @@ -1133,7 +1133,7 @@ index 144623d4ef1f795f70846bcd9d60740ae9a93a81..213afcae6bb02e4e340d5fa477bdddbb private void validateSpeed(float value) { Preconditions.checkArgument(value <= 1f && value >= -1f, "Speed value (%s) need to be between -1f and 1f", value); } -@@ -3571,4 +3600,76 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3569,4 +3598,76 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setDeathScreenScore(final int score) { getHandle().setScore(score); } diff --git a/leaf-server/paper-patches/features/0027-KeYi-Player-Skull-API.patch b/leaf-server/paper-patches/features/0027-KeYi-Player-Skull-API.patch index 9920e64d..421702ca 100644 --- a/leaf-server/paper-patches/features/0027-KeYi-Player-Skull-API.patch +++ b/leaf-server/paper-patches/features/0027-KeYi-Player-Skull-API.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 213afcae6bb02e4e340d5fa477bdddbb9434fc70..f72621777a3bb3b537b426caeb735dec0397d13f 100644 +index 7f17c5025f25e44a917f5d6a65b8d958a982b301..94efaf127c22b6bb722982bf1ccc63bfd6458153 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3672,4 +3672,31 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3670,4 +3670,31 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message))); } // Purpur end - Death screen API diff --git a/leaf-server/paper-patches/features/0028-Slice-Smooth-Teleports.patch b/leaf-server/paper-patches/features/0028-Slice-Smooth-Teleports.patch index 9105b551..cc81f824 100644 --- a/leaf-server/paper-patches/features/0028-Slice-Smooth-Teleports.patch +++ b/leaf-server/paper-patches/features/0028-Slice-Smooth-Teleports.patch @@ -9,10 +9,10 @@ Original project: https://github.com/Cryptite/Slice Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f72621777a3bb3b537b426caeb735dec0397d13f..5fd54137f43c5675e69b31b600ed88211f459646 100644 +index 94efaf127c22b6bb722982bf1ccc63bfd6458153..c5da43af18b507d348dae8fa46852c1d1af65742 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1384,6 +1384,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1392,6 +1392,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end - Teleportation API } diff --git a/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch b/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch index 1d4c980e..69ed4958 100644 --- a/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch +++ b/leaf-server/paper-patches/features/0030-Leaves-Replay-Mod-API.patch @@ -60,10 +60,10 @@ index 4ea1ceac80bd4676bb2c59bc4219903850cc7213..745f3915afdf22fbbc816bd2be30c274 + // Leaves end - replay mod api } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 55ae7d0a5b36ff10880d4e5fb1bb7f7724a743fd..e3a194e929ff1a1b74362617d4cd1c8ef76aa9b4 100644 +index 476eefebace887064b728f08af40c746b6f70787..beae8a57a0ce9b8e7d81619efe4c39d908869319 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -135,6 +135,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -140,6 +140,8 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return new CraftHumanEntity(server, (net.minecraft.world.entity.player.Player) entity); } @@ -73,10 +73,10 @@ index 55ae7d0a5b36ff10880d4e5fb1bb7f7724a743fd..e3a194e929ff1a1b74362617d4cd1c8e if (entity instanceof EnderDragonPart complexPart) { if (complexPart.parentMob instanceof EnderDragon) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5fd54137f43c5675e69b31b600ed88211f459646..24671b21d4596d1f7a326ec68c1bba6891da839a 100644 +index c5da43af18b507d348dae8fa46852c1d1af65742..4fcc231b0acbb536f3f6466454555845fe54a815 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2286,7 +2286,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2294,7 +2294,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(Player player) { diff --git a/leaf-server/paper-patches/features/0033-SparklyPaper-Optimize-canSee-checks.patch b/leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch similarity index 94% rename from leaf-server/paper-patches/features/0033-SparklyPaper-Optimize-canSee-checks.patch rename to leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch index c4fc2653..90880432 100644 --- a/leaf-server/paper-patches/features/0033-SparklyPaper-Optimize-canSee-checks.patch +++ b/leaf-server/paper-patches/features/0032-SparklyPaper-Optimize-canSee-checks.patch @@ -16,10 +16,10 @@ This seems stupid, but it does seem that it improves the performance a bit, and We also create a "canSee" method tailored for "ChunkMap#updatePlayer()", a method without the equals check (the "updatePlayer()" already checks if the entity is the same entity) because the CraftPlayer's `equals()` check is a *bit* expensive compared to only checking the object's identity, and because the identity has already been check, we don't need to check it twice. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 24671b21d4596d1f7a326ec68c1bba6891da839a..5186672c20ec1b0e66d1e639f02a15a08ed4a9c4 100644 +index 4fcc231b0acbb536f3f6466454555845fe54a815..a6d89e3e6dcdfac785111706dfceabffa0a52cbf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -219,7 +219,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -227,7 +227,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private boolean hasPlayedBefore = false; private final ConversationTracker conversationTracker = new ConversationTracker(); private final Set channels = new HashSet(); @@ -28,7 +28,7 @@ index 24671b21d4596d1f7a326ec68c1bba6891da839a..5186672c20ec1b0e66d1e639f02a15a0 private final Set unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player private static final WeakHashMap> pluginWeakReferences = new WeakHashMap<>(); private int hash = 0; -@@ -2291,9 +2291,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2299,9 +2299,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(org.bukkit.entity.Entity entity) { diff --git a/leaf-server/paper-patches/features/0034-Including-5s-in-getTPS.patch b/leaf-server/paper-patches/features/0033-Including-5s-in-getTPS.patch similarity index 100% rename from leaf-server/paper-patches/features/0034-Including-5s-in-getTPS.patch rename to leaf-server/paper-patches/features/0033-Including-5s-in-getTPS.patch diff --git a/leaf-server/paper-patches/features/0035-Don-t-throw-exception-on-missing-ResourceKey-value.patch b/leaf-server/paper-patches/features/0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch similarity index 100% rename from leaf-server/paper-patches/features/0035-Don-t-throw-exception-on-missing-ResourceKey-value.patch rename to leaf-server/paper-patches/features/0034-Don-t-throw-exception-on-missing-ResourceKey-value.patch diff --git a/leaf-server/paper-patches/features/0036-Virtual-Thread-for-async-scheduler.patch b/leaf-server/paper-patches/features/0035-Virtual-Thread-for-async-scheduler.patch similarity index 100% rename from leaf-server/paper-patches/features/0036-Virtual-Thread-for-async-scheduler.patch rename to leaf-server/paper-patches/features/0035-Virtual-Thread-for-async-scheduler.patch diff --git a/leaf-server/paper-patches/features/0037-Mirai-Configurable-chat-message-signatures.patch b/leaf-server/paper-patches/features/0036-Mirai-Configurable-chat-message-signatures.patch similarity index 100% rename from leaf-server/paper-patches/features/0037-Mirai-Configurable-chat-message-signatures.patch rename to leaf-server/paper-patches/features/0036-Mirai-Configurable-chat-message-signatures.patch diff --git a/leaf-server/paper-patches/features/0038-Matter-Secure-Seed.patch b/leaf-server/paper-patches/features/0037-Matter-Secure-Seed.patch similarity index 100% rename from leaf-server/paper-patches/features/0038-Matter-Secure-Seed.patch rename to leaf-server/paper-patches/features/0037-Matter-Secure-Seed.patch diff --git a/leaf-server/paper-patches/features/0039-Faster-random-generator.patch b/leaf-server/paper-patches/features/0038-Faster-random-generator.patch similarity index 100% rename from leaf-server/paper-patches/features/0039-Faster-random-generator.patch rename to leaf-server/paper-patches/features/0038-Faster-random-generator.patch diff --git a/leaf-server/paper-patches/features/0040-Configurable-unknown-command-message.patch b/leaf-server/paper-patches/features/0039-Configurable-unknown-command-message.patch similarity index 100% rename from leaf-server/paper-patches/features/0040-Configurable-unknown-command-message.patch rename to leaf-server/paper-patches/features/0039-Configurable-unknown-command-message.patch diff --git a/leaf-server/paper-patches/features/0041-Replace-world-map-with-optimized-collection.patch b/leaf-server/paper-patches/features/0040-Replace-world-map-with-optimized-collection.patch similarity index 100% rename from leaf-server/paper-patches/features/0041-Replace-world-map-with-optimized-collection.patch rename to leaf-server/paper-patches/features/0040-Replace-world-map-with-optimized-collection.patch diff --git a/leaf-server/paper-patches/features/0042-Cache-CraftEntityType-minecraftToBukkit-convert.patch b/leaf-server/paper-patches/features/0041-Cache-CraftEntityType-minecraftToBukkit-convert.patch similarity index 100% rename from leaf-server/paper-patches/features/0042-Cache-CraftEntityType-minecraftToBukkit-convert.patch rename to leaf-server/paper-patches/features/0041-Cache-CraftEntityType-minecraftToBukkit-convert.patch diff --git a/leaf-server/paper-patches/features/0043-Multithreaded-Tracker.patch b/leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch similarity index 93% rename from leaf-server/paper-patches/features/0043-Multithreaded-Tracker.patch rename to leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch index 445c0a38..41b4bc4f 100644 --- a/leaf-server/paper-patches/features/0043-Multithreaded-Tracker.patch +++ b/leaf-server/paper-patches/features/0042-Multithreaded-Tracker.patch @@ -41,10 +41,10 @@ index 379c2dc1853e45a96dda9b13bf28b7e08f65658a..361f4de9cdf0f7505628a2fed2a3f536 } // Leaves start - skip photographer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e60440562720c61f4a5e9abb771420eed3df852b..74722575f8d835dc1571972de37d0a4bd50d52e2 100644 +index beae8a57a0ce9b8e7d81619efe4c39d908869319..6b1926080eddf61ff9c0156a6846f7f0bcff1c2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -768,7 +768,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -764,7 +764,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { ChunkMap.TrackedEntity entityTracker = world.getChunkSource().chunkMap.entityMap.get(this.getEntityId()); if (entityTracker != null) { @@ -53,7 +53,7 @@ index e60440562720c61f4a5e9abb771420eed3df852b..74722575f8d835dc1571972de37d0a4b players.add(connection.getPlayer().getBukkitEntity()); } } -@@ -1099,7 +1099,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1095,7 +1095,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return; } @@ -62,7 +62,7 @@ index e60440562720c61f4a5e9abb771420eed3df852b..74722575f8d835dc1571972de37d0a4b this.getHandle().resendPossiblyDesyncedEntityData(connection.getPlayer()); } } -@@ -1246,7 +1246,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1242,7 +1242,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } Set set = new java.util.HashSet<>(tracker.seenBy.size()); @@ -72,10 +72,10 @@ index e60440562720c61f4a5e9abb771420eed3df852b..74722575f8d835dc1571972de37d0a4b } return set; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5186672c20ec1b0e66d1e639f02a15a08ed4a9c4..a983f7e07377c69dfac286085b71a8a2e2f15dbf 100644 +index a6d89e3e6dcdfac785111706dfceabffa0a52cbf..66d555e97177e340ee1c07ae389a6c52855dd3d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2887,7 +2887,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2895,7 +2895,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Iterator iterator = collection.iterator(); while (iterator.hasNext()) { AttributeInstance genericInstance = iterator.next(); diff --git a/leaf-server/paper-patches/features/0044-Asynchronous-locator.patch b/leaf-server/paper-patches/features/0043-Asynchronous-locator.patch similarity index 100% rename from leaf-server/paper-patches/features/0044-Asynchronous-locator.patch rename to leaf-server/paper-patches/features/0043-Asynchronous-locator.patch diff --git a/leaf-server/paper-patches/features/0045-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch b/leaf-server/paper-patches/features/0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch similarity index 100% rename from leaf-server/paper-patches/features/0045-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch rename to leaf-server/paper-patches/features/0044-EMC-Don-t-use-snapshots-for-acquiring-blockstate.patch diff --git a/leaf-server/paper-patches/features/0046-Faster-CraftServer-getworlds-list-creation.patch b/leaf-server/paper-patches/features/0045-Faster-CraftServer-getworlds-list-creation.patch similarity index 100% rename from leaf-server/paper-patches/features/0046-Faster-CraftServer-getworlds-list-creation.patch rename to leaf-server/paper-patches/features/0045-Faster-CraftServer-getworlds-list-creation.patch diff --git a/leaf-server/paper-patches/features/0047-Cache-chunk-key.patch b/leaf-server/paper-patches/features/0046-Cache-chunk-key.patch similarity index 100% rename from leaf-server/paper-patches/features/0047-Cache-chunk-key.patch rename to leaf-server/paper-patches/features/0046-Cache-chunk-key.patch diff --git a/leaf-server/paper-patches/features/0048-Async-structure-locate-api.patch b/leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch similarity index 95% rename from leaf-server/paper-patches/features/0048-Async-structure-locate-api.patch rename to leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch index e5bd9146..1a823ab4 100644 --- a/leaf-server/paper-patches/features/0048-Async-structure-locate-api.patch +++ b/leaf-server/paper-patches/features/0047-Async-structure-locate-api.patch @@ -9,10 +9,10 @@ Added some asynchronous structure locate methods in World, requires async-locator to be enabled in Leaf config, or else it will fall back to sync methods. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 400fa612389c40f36d64ecd1b65f3330c8a9071a..a99b71f98e851f75c83c41b5684b30f2de23fc21 100644 +index cd43af3f442f7d8af1a4552a0eff33958873a366..3183dab5ae079402f5c0f2d5c0048a4d105d8eeb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2295,6 +2295,45 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2299,6 +2299,45 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this)); } diff --git a/leaf-server/paper-patches/features/0049-PlayerInventoryOverflowEvent.patch b/leaf-server/paper-patches/features/0048-PlayerInventoryOverflowEvent.patch similarity index 100% rename from leaf-server/paper-patches/features/0049-PlayerInventoryOverflowEvent.patch rename to leaf-server/paper-patches/features/0048-PlayerInventoryOverflowEvent.patch diff --git a/leaf-server/paper-patches/features/0050-SparklyPaper-Parallel-world-ticking.patch b/leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch similarity index 99% rename from leaf-server/paper-patches/features/0050-SparklyPaper-Parallel-world-ticking.patch rename to leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch index fb3f3c31..710d0d3a 100644 --- a/leaf-server/paper-patches/features/0050-SparklyPaper-Parallel-world-ticking.patch +++ b/leaf-server/paper-patches/features/0049-SparklyPaper-Parallel-world-ticking.patch @@ -251,10 +251,10 @@ index a4aa2615823d77920ff55b8aa0bcc27a54b8c3e1..e1bf7dfdb3be8f92ef2cb86d7f15a613 + // SparklyPaper end - parallel world ticking } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570c781bbc9 100644 +index 3183dab5ae079402f5c0f2d5c0048a4d105d8eeb..ad53cef93c55e73579f2419e10196bebbd57aae5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -474,7 +474,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -478,7 +478,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { } private boolean unloadChunk0(int x, int z, boolean save) { @@ -268,7 +268,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 if (!this.isChunkLoaded(x, z)) { return true; } -@@ -491,6 +496,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -495,6 +500,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -277,7 +277,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; -@@ -541,7 +548,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -545,7 +552,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { @@ -291,7 +291,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 warnUnsafeChunk("loading a faraway chunk", x, z); // Paper ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper -@@ -769,6 +781,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -773,6 +785,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) { @@ -300,7 +300,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 this.world.captureTreeGeneration = true; this.world.captureBlockStates = true; boolean grownTree = this.generateTree(loc, type); -@@ -884,6 +898,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -888,6 +902,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { } public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source, Consumer configurator) { // Paper end - expand explosion API @@ -309,7 +309,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 net.minecraft.world.level.Level.ExplosionInteraction explosionType; if (!breakBlocks) { explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks -@@ -1005,6 +1021,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1009,6 +1025,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setBiome(int x, int y, int z, Holder bb) { BlockPos pos = new BlockPos(x, 0, z); @@ -318,7 +318,7 @@ index a99b71f98e851f75c83c41b5684b30f2de23fc21..59ddac79eeea2b80bf017d758c480570 if (this.world.hasChunkAt(pos)) { net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos); -@@ -2352,6 +2370,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2356,6 +2374,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) { @@ -1439,7 +1439,7 @@ index b00a82816784ea2f6422ca98c1f11597105cc177..5c43785b891b8b6faf3f513510509ec3 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java -index 7232b560aac9fbe48318f7af1c875583e06723ee..0bd291223ac6463e79d9bbeb165f217a0192188a 100644 +index 5d4faad9df4824cfd61abfd4df011c006f114424..40fb6081bc2a6045c76f6e86584327758627f444 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java @@ -33,6 +33,27 @@ public abstract class CraftBlockEntityState extends Craft diff --git a/leaf-server/paper-patches/features/0051-Paper-PR-Throttle-failed-spawn-attempts.patch b/leaf-server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch similarity index 100% rename from leaf-server/paper-patches/features/0051-Paper-PR-Throttle-failed-spawn-attempts.patch rename to leaf-server/paper-patches/features/0050-Paper-PR-Throttle-failed-spawn-attempts.patch diff --git a/leaf-server/paper-patches/features/0052-Async-playerdata-saving.patch b/leaf-server/paper-patches/features/0051-Async-playerdata-saving.patch similarity index 100% rename from leaf-server/paper-patches/features/0052-Async-playerdata-saving.patch rename to leaf-server/paper-patches/features/0051-Async-playerdata-saving.patch diff --git a/leaf-server/paper-patches/features/0053-Async-chunk-send.patch b/leaf-server/paper-patches/features/0052-Async-chunk-send.patch similarity index 100% rename from leaf-server/paper-patches/features/0053-Async-chunk-send.patch rename to leaf-server/paper-patches/features/0052-Async-chunk-send.patch diff --git a/leaf-server/paper-patches/features/0054-Optimise-player-movement-checks.patch b/leaf-server/paper-patches/features/0053-Optimise-player-movement-checks.patch similarity index 100% rename from leaf-server/paper-patches/features/0054-Optimise-player-movement-checks.patch rename to leaf-server/paper-patches/features/0053-Optimise-player-movement-checks.patch diff --git a/leaf-server/paper-patches/features/0055-optimise-ReferenceList.patch b/leaf-server/paper-patches/features/0054-optimise-ReferenceList.patch similarity index 100% rename from leaf-server/paper-patches/features/0055-optimise-ReferenceList.patch rename to leaf-server/paper-patches/features/0054-optimise-ReferenceList.patch diff --git a/leaf-server/paper-patches/features/0056-cache-getBiome.patch b/leaf-server/paper-patches/features/0055-cache-getBiome.patch similarity index 100% rename from leaf-server/paper-patches/features/0056-cache-getBiome.patch rename to leaf-server/paper-patches/features/0055-cache-getBiome.patch diff --git a/leaf-server/paper-patches/features/0057-dump-pwt-thread.patch b/leaf-server/paper-patches/features/0056-dump-pwt-thread.patch similarity index 100% rename from leaf-server/paper-patches/features/0057-dump-pwt-thread.patch rename to leaf-server/paper-patches/features/0056-dump-pwt-thread.patch diff --git a/leaf-server/paper-patches/features/0058-Paw-optimization.patch b/leaf-server/paper-patches/features/0057-Paw-optimization.patch similarity index 100% rename from leaf-server/paper-patches/features/0058-Paw-optimization.patch rename to leaf-server/paper-patches/features/0057-Paw-optimization.patch diff --git a/leaf-server/paper-patches/features/0059-optimize-despawn.patch b/leaf-server/paper-patches/features/0058-optimize-despawn.patch similarity index 100% rename from leaf-server/paper-patches/features/0059-optimize-despawn.patch rename to leaf-server/paper-patches/features/0058-optimize-despawn.patch diff --git a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java index 8106ce67..6588ab85 100644 --- a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java +++ b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleGlobalConfiguration.java @@ -67,7 +67,7 @@ public class GaleGlobalConfiguration extends ConfigurationPart { public Keepalive keepalive; public class Keepalive extends ConfigurationPart { - public boolean sendMultiple = true; // Gale - Purpur - send multiple keep-alive packets + public boolean sendMultiple = false; // Gale - Purpur - send multiple keep-alive packets } // Gale start - YAPFA - last tick time - in TPS command