From d7849d03252cd6cb81c136a7718a5829bb5292af Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Sun, 15 Jun 2025 08:13:47 +0800 Subject: [PATCH] Init 1.21.6 --- .../{build-1215.yml => build-1216.yml} | 26 +- .github/workflows/build-pr.yml | 8 +- .github/workflows/publish-api.yml | 2 +- README.md | 6 +- gradle.properties | 6 +- ...0006-Vectorized-map-color-conversion.patch | 4 +- ...imings.patch => 0013-Remove-Timings.patch} | 10 +- ...patch => 0014-KeYi-Player-Skull-API.patch} | 10 +- ...atch => 0015-Slice-Smooth-Teleports.patch} | 2 +- ...figurable-LibraryLoader-maven-repos.patch} | 0 ... => 0017-Async-structure-locate-api.patch} | 4 +- ...> 0018-PlayerInventoryOverflowEvent.patch} | 0 ...9-Raytrace-AntiXray-SDK-integration.patch} | 0 leaf-server/build.gradle.kts.patch | 37 ++- .../features/0002-Gale-configuration.patch | 14 +- .../features/0003-Leaf-config.patch | 8 +- .../0005-Remove-vanilla-profiler.patch | 314 +++++++++--------- ...0009-Reduce-projectile-chunk-loading.patch | 10 +- .../features/0010-Predict-Halloween.patch | 4 +- .../0011-Move-random-tick-random.patch | 6 +- ...timize-random-calls-in-chunk-ticking.patch | 16 +- ...duce-enderman-teleport-chunk-lookups.patch | 4 +- .../0016-Cache-on-climbable-check.patch | 8 +- ...er-checking-for-useless-move-packets.patch | 4 +- ...0019-Block-goal-does-not-load-chunks.patch | 4 +- ...020-Remove-lambda-from-ticking-guard.patch | 6 +- .../0022-Make-book-writing-configurable.patch | 4 +- .../features/0023-Reduce-in-wall-checks.patch | 6 +- ...6-Make-saving-fireworks-configurable.patch | 4 +- .../0027-Reduce-hopper-item-checks.patch | 14 +- ...029-Variable-entity-wake-up-duration.patch | 4 +- ...hat-commands-before-player-has-joine.patch | 20 +- .../0031-Do-not-log-invalid-statistics.patch | 39 ++- ...32-Do-not-log-empty-message-warnings.patch | 4 +- ...0033-Do-not-log-ignored-advancements.patch | 4 +- ...0035-Do-not-log-unrecognized-recipes.patch | 4 +- .../0037-Do-not-log-Not-Secure-marker.patch | 4 +- ...ent-resetting-despawn-counter-config.patch | 4 +- ...logging-login-locations-configurable.patch | 18 +- .../0046-Reduce-array-allocations.patch | 121 ++++++- .../0047-Optimize-sun-burn-tick.patch | 8 +- ...-rules-map-with-optimized-collection.patch | 4 +- ...ttributes-with-optimized-collections.patch | 4 +- ...ck-frozen-ticks-before-landing-block.patch | 6 +- .../0060-Faster-chunk-serialization.patch | 8 +- ...Skip-entity-move-if-movement-is-zero.patch | 8 +- ...mes-on-entities-with-fire-resistance.patch | 4 +- ...block-destruction-packet-allocations.patch | 8 +- ...1-Spread-out-sending-all-player-info.patch | 36 +- ...-player-list-for-sending-player-info.patch | 4 +- ...ndSendEvent-if-there-are-no-listener.patch | 12 +- ...074-Send-multiple-keep-alive-packets.patch | 14 +- ...chunks-to-activate-climbing-entities.patch | 10 +- ...nimations-as-the-entity-being-critte.patch | 14 +- ...yer-in-world-if-kicked-before-being-.patch | 12 +- .../features/0083-5-second-TPS-average.patch | 6 +- .../0084-Measure-last-tick-time.patch | 8 +- ...ncrease-time-statistics-in-intervals.patch | 6 +- ...heck-has-physics-before-same-vehicle.patch | 4 +- ...gible-planar-movement-multiplication.patch | 4 +- .../0088-Optimize-matching-item-checks.patch | 4 +- .../0091-Reduce-RandomSource-instances.patch | 18 +- ...mStack-lookups-for-reduced-visibilit.patch | 4 +- .../paper-patches/features/0001-Rebrand.patch | 10 +- scripts/prepareRelease.sh | 8 +- 65 files changed, 542 insertions(+), 445 deletions(-) rename .github/workflows/{build-1215.yml => build-1216.yml} (90%) rename leaf-api/paper-patches/features/{0014-Remove-Timings.patch => 0013-Remove-Timings.patch} (99%) rename leaf-api/paper-patches/features/{0015-KeYi-Player-Skull-API.patch => 0014-KeYi-Player-Skull-API.patch} (80%) rename leaf-api/paper-patches/features/{0016-Slice-Smooth-Teleports.patch => 0015-Slice-Smooth-Teleports.patch} (95%) rename leaf-api/paper-patches/features/{0017-Configurable-LibraryLoader-maven-repos.patch => 0016-Configurable-LibraryLoader-maven-repos.patch} (100%) rename leaf-api/paper-patches/features/{0019-Async-structure-locate-api.patch => 0017-Async-structure-locate-api.patch} (96%) rename leaf-api/paper-patches/features/{0020-PlayerInventoryOverflowEvent.patch => 0018-PlayerInventoryOverflowEvent.patch} (100%) rename leaf-api/paper-patches/features/{0021-Raytrace-AntiXray-SDK-integration.patch => 0019-Raytrace-AntiXray-SDK-integration.patch} (100%) diff --git a/.github/workflows/build-1215.yml b/.github/workflows/build-1216.yml similarity index 90% rename from .github/workflows/build-1215.yml rename to .github/workflows/build-1216.yml index 1a21f932..b5c0be6f 100644 --- a/.github/workflows/build-1215.yml +++ b/.github/workflows/build-1216.yml @@ -1,8 +1,8 @@ -name: Build Leaf 1.21.5 +name: Build Leaf 1.21.6 on: push: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] workflow_dispatch: jobs: @@ -93,15 +93,15 @@ jobs: - name: Upload Leaf uses: actions/upload-artifact@main with: - name: Leaf 1.21.5 - path: ./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar + name: Leaf 1.21.6 + path: ./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar - name: Release Leaf uses: softprops/action-gh-release@v2.2.2 # Temp fix with: - name: "Leaf 1.21.5" - tag_name: "ver-1.21.5" - files: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + name: "Leaf 1.21.6" + tag_name: "ver-1.21.6" + files: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" body_path: "./release_notes.md" token: "${{ secrets.GITHUB_TOKEN }}" target_commitish: "${{ github.sha }}" @@ -111,7 +111,7 @@ jobs: - name: Calculate SHA-256 id: hash run: | - FILE_NAME="leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + FILE_NAME="leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" HASH=$(sha256sum "$FILE_NAME" | awk '{ print $1 }') echo "sha256=$HASH" >> $GITHUB_OUTPUT @@ -121,7 +121,7 @@ jobs: host: ${{ secrets.API_HOST }} username: ${{ secrets.API_USER }} password: ${{ secrets.API_PASS }} - source: "./leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar" + source: "./leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar" target: "~/api/uploads/" - name: Insert build to download API @@ -141,11 +141,11 @@ jobs: node insertBuild.js \ --projectName leaf \ --projectFriendlyName "Leaf" \ - --version 1.21.5 \ - --versionGroupName 1.21.5 \ - --versionName 1.21.5 \ + --version 1.21.6 \ + --versionGroupName 1.21.6 \ + --versionName 1.21.6 \ --build-number ${{ env.BUILD_NUMBER }} \ --repositoryPath "$REPO_DIR" \ --storagePath /root/api/storage \ - --download "primary:/root/api/uploads/leaf-1.21.5-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \ + --download "primary:/root/api/uploads/leaf-1.21.6-${{ env.BUILD_NUMBER }}.jar:${{ steps.hash.outputs.sha256 }}" \ --buildChannel default diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 5b536e73..33b9e6ca 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -2,7 +2,7 @@ name: Build Pull Request on: pull_request: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] jobs: build: @@ -34,9 +34,9 @@ jobs: - name: Rename Paperclip JARs run: | - mv leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.5.jar + mv leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./leaf-1.21.6.jar - name: Upload Leaf as build artifact uses: actions/upload-artifact@main with: - name: Leaf 1.21.5 - path: ./leaf-1.21.5.jar + name: Leaf 1.21.6 + path: ./leaf-1.21.6.jar diff --git a/.github/workflows/publish-api.yml b/.github/workflows/publish-api.yml index de37f45f..3efd3633 100644 --- a/.github/workflows/publish-api.yml +++ b/.github/workflows/publish-api.yml @@ -1,7 +1,7 @@ name: Publish API on: push: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] jobs: build: diff --git a/README.md b/README.md index 448e318a..f5124b3b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
[![Download](https://img.shields.io/badge/releases-blue?label=download&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/download)⠀ -[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1215.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ +[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/Winds-Studio/Leaf/build-1216.yml?&style=for-the-badge&colorA=19201a&colorB=298046)](https://github.com/Winds-Studio/Leaf/actions)⠀ [![Discord](https://img.shields.io/discord/1145991395388162119?label=discord&style=for-the-badge&colorA=19201a&colorB=298046)](https://discord.gg/gfgAwdSEuM) [![Docs](https://img.shields.io/badge/leafmc.one/docs/-blue?label=docs&style=for-the-badge&colorA=19201a&colorB=298046)](https://www.leafmc.one/docs) @@ -65,7 +65,7 @@ Building a Paperclip JAR for distribution: cn.dreeam.leaf leaf-api - 1.21.5-R0.1-SNAPSHOT + 1.21.6-R0.1-SNAPSHOT provided ``` @@ -78,7 +78,7 @@ repositories { } dependencies { - compileOnly("cn.dreeam.leaf:leaf-api:1.21.5-R0.1-SNAPSHOT") + compileOnly("cn.dreeam.leaf:leaf-api:1.21.6-R0.1-SNAPSHOT") } java { diff --git a/gradle.properties b/gradle.properties index 1572853e..fbe2006e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=cn.dreeam.leaf -mcVersion=1.21.5 -version=1.21.5-R0.1-SNAPSHOT +mcVersion=1.21.6-rc1 +version=1.21.6-R0.1-SNAPSHOT -paperCommit=ba7fb23ddd2376079951d1e22f9204d1ed691585 +paperCommit=6fddc93a93c7cd9081f550b32f53803759857bf9 org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/leaf-api/paper-patches/features/0006-Vectorized-map-color-conversion.patch b/leaf-api/paper-patches/features/0006-Vectorized-map-color-conversion.patch index d303715d..c518b2bf 100644 --- a/leaf-api/paper-patches/features/0006-Vectorized-map-color-conversion.patch +++ b/leaf-api/paper-patches/features/0006-Vectorized-map-color-conversion.patch @@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00b16e4aacba50996b81fac81c3f78b6 + +} diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java -index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2cbfad9a5 100644 +index 5bb3267f81a23d73baa3e4117563a13d61303013..047a33ef63cfc13b4d1ae31088538f2c1d8c404c 100644 --- a/src/main/java/org/bukkit/map/MapPalette.java +++ b/src/main/java/org/bukkit/map/MapPalette.java @@ -35,7 +35,7 @@ public final class MapPalette { @@ -120,7 +120,7 @@ index fc9728342de7605da69813fb44b008c1343124c0..4d55f8ece0bbe0be64b700f54a52d6a2 - static final Color[] colors = { + public static final Color[] colors = { // Gale - Pufferfish - vectorized map color conversion - package -> public // Start generate - MapPalette#colors - // @GeneratedFrom 1.21.5 + // @GeneratedFrom 1.21.6-rc1 new Color(0x00000000, true), @@ -395,9 +395,15 @@ public final class MapPalette { temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth()); diff --git a/leaf-api/paper-patches/features/0014-Remove-Timings.patch b/leaf-api/paper-patches/features/0013-Remove-Timings.patch similarity index 99% rename from leaf-api/paper-patches/features/0014-Remove-Timings.patch rename to leaf-api/paper-patches/features/0013-Remove-Timings.patch index f03ab68e..7753529c 100644 --- a/leaf-api/paper-patches/features/0014-Remove-Timings.patch +++ b/leaf-api/paper-patches/features/0013-Remove-Timings.patch @@ -2861,7 +2861,7 @@ index 59fada9b1eb78238d280c6bbb711f52facba52c6..eb4d78c6111a530d015a0b91d14c40ad return i >= j && i <= k; } diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e65012d62e637 100644 +index 4acda947b7d69ab4133b4cc94e76d945e4d148d5..737e96a7ce91d65a4899873b681e421207ecd76c 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -32,7 +32,6 @@ public class SimpleCommandMap implements CommandMap { @@ -2880,9 +2880,9 @@ index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e6501 label = label.toLowerCase(Locale.ROOT).trim(); fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim(); boolean registered = register(label, command, false, fallbackPrefix); -@@ -159,23 +157,13 @@ public class SimpleCommandMap implements CommandMap { - parsedArgs = event.getArgs(); - // Purpur end - ExecuteCommandEvent +@@ -146,23 +144,13 @@ public class SimpleCommandMap implements CommandMap { + return false; + } - // Paper start - Plugins do weird things to workaround normal registration - if (target.timings == null) { @@ -2893,7 +2893,7 @@ index 613a0bad5c07cf14098218652eba1f4deaf77c6d..25a0414cc9482925ad0426dde57e6501 try { - try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false) - target.execute(sender, sentCommandLabel, parsedArgs); // Purpur - ExecuteCommandEvent + target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length)); - } // target.timings.stopTiming(); // Spigot // Paper } catch (CommandException ex) { server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper diff --git a/leaf-api/paper-patches/features/0015-KeYi-Player-Skull-API.patch b/leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch similarity index 80% rename from leaf-api/paper-patches/features/0015-KeYi-Player-Skull-API.patch rename to leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch index 24bb7dec..e42dcc49 100644 --- a/leaf-api/paper-patches/features/0015-KeYi-Player-Skull-API.patch +++ b/leaf-api/paper-patches/features/0014-KeYi-Player-Skull-API.patch @@ -7,13 +7,13 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index d4082cd6dae07958ace3b9e9769ccb7da4c2a828..d17f7881e55d61c2137f29d0b903016958b05b5d 100644 +index c44453789834c544b0e78b52bb9b09ffbd5958fb..36209081ad96bfd2f44e9aa150e8eb4d3527b988 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java -@@ -4054,4 +4054,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM - sendDeathScreen(message); - } - // Purpur end +@@ -3935,4 +3935,23 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM + * @param score New death screen score of player + */ + void setDeathScreenScore(int score); + + // Leaf start - KeYi - Player Skull API + /** diff --git a/leaf-api/paper-patches/features/0016-Slice-Smooth-Teleports.patch b/leaf-api/paper-patches/features/0015-Slice-Smooth-Teleports.patch similarity index 95% rename from leaf-api/paper-patches/features/0016-Slice-Smooth-Teleports.patch rename to leaf-api/paper-patches/features/0015-Slice-Smooth-Teleports.patch index 97fe3d3d..1858fa33 100644 --- a/leaf-api/paper-patches/features/0016-Slice-Smooth-Teleports.patch +++ b/leaf-api/paper-patches/features/0015-Slice-Smooth-Teleports.patch @@ -9,7 +9,7 @@ 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/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index d17f7881e55d61c2137f29d0b903016958b05b5d..09f70aa4d206a1b7fc5f3274f34c6885a9e2d60d 100644 +index 36209081ad96bfd2f44e9aa150e8eb4d3527b988..431435c9666b000197722a36d3a7b8999025e2b5 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -3716,6 +3716,33 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM diff --git a/leaf-api/paper-patches/features/0017-Configurable-LibraryLoader-maven-repos.patch b/leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch similarity index 100% rename from leaf-api/paper-patches/features/0017-Configurable-LibraryLoader-maven-repos.patch rename to leaf-api/paper-patches/features/0016-Configurable-LibraryLoader-maven-repos.patch diff --git a/leaf-api/paper-patches/features/0019-Async-structure-locate-api.patch b/leaf-api/paper-patches/features/0017-Async-structure-locate-api.patch similarity index 96% rename from leaf-api/paper-patches/features/0019-Async-structure-locate-api.patch rename to leaf-api/paper-patches/features/0017-Async-structure-locate-api.patch index b44f74ae..52b985bf 100644 --- a/leaf-api/paper-patches/features/0019-Async-structure-locate-api.patch +++ b/leaf-api/paper-patches/features/0017-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/World.java b/src/main/java/org/bukkit/World.java -index d0c2ff65893c1fd3903633ebc24aae879dc91f10..000ed0527609690b01a32053557b74049beed73c 100644 +index 04a1379f5fe281ab72610d2f8f18e1355fe3a134..37c0ea84ffac85bab6344a46abe6a79d20566bda 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -4084,6 +4084,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4102,6 +4102,60 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); diff --git a/leaf-api/paper-patches/features/0020-PlayerInventoryOverflowEvent.patch b/leaf-api/paper-patches/features/0018-PlayerInventoryOverflowEvent.patch similarity index 100% rename from leaf-api/paper-patches/features/0020-PlayerInventoryOverflowEvent.patch rename to leaf-api/paper-patches/features/0018-PlayerInventoryOverflowEvent.patch diff --git a/leaf-api/paper-patches/features/0021-Raytrace-AntiXray-SDK-integration.patch b/leaf-api/paper-patches/features/0019-Raytrace-AntiXray-SDK-integration.patch similarity index 100% rename from leaf-api/paper-patches/features/0021-Raytrace-AntiXray-SDK-integration.patch rename to leaf-api/paper-patches/features/0019-Raytrace-AntiXray-SDK-integration.patch diff --git a/leaf-server/build.gradle.kts.patch b/leaf-server/build.gradle.kts.patch index 65fbcb81..d68d15d6 100644 --- a/leaf-server/build.gradle.kts.patch +++ b/leaf-server/build.gradle.kts.patch @@ -7,16 +7,24 @@ +val leafMavenPublicUrl = "https://maven.nostal.ink/repository/maven-snapshots/" // Leaf - project setup - Add publish repo dependencies { - mache("io.papermc:mache:1.21.5+build.2") + mache("io.papermc:mache:1.21.6-rc1+build.1") - paperclip("io.papermc:paperclip:3.0.3") + paperclip("cn.dreeam:quantumleaper:1.0.0-SNAPSHOT") // Leaf - project setup - Use own paperclip fork testRuntimeOnly("org.junit.platform:junit-platform-launcher") } -@@ -28,6 +_,19 @@ - // oldPaperCommit = "f4f275519f7c1fbe9db173b7144a4fe81440e365" - //} +@@ -24,9 +_,26 @@ + minecraftVersion = providers.gradleProperty("mcVersion") + gitFilePatches = false ++ // Purpur start - project setup ++ /* + updatingMinecraft { + oldPaperCommit = "a033e3b9ef78cfe85be807ac3fd1dd956274d4db" + } ++ */ ++ // Purpur end - project setup ++ + // Leaf start - project setup + val leaf = forks.register("leaf") { + upstream.patchDir("paperServer") { @@ -29,11 +37,10 @@ + + activeFork = leaf + // Leaf end - project setup -+ + spigot { - buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc" - packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment -@@ -50,6 +_,7 @@ + enabled = false +@@ -51,6 +_,7 @@ libraryRepositories.addAll( "https://repo.maven.apache.org/maven2/", paperMavenPublicUrl, @@ -41,7 +48,7 @@ ) } -@@ -108,7 +_,22 @@ +@@ -109,7 +_,22 @@ } } @@ -65,7 +72,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { extendsFrom(configurations.compileClasspath.get()) } -@@ -130,10 +_,20 @@ +@@ -131,10 +_,20 @@ } dependencies { @@ -89,7 +96,7 @@ 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 runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath }) -@@ -144,41 +_,58 @@ +@@ -145,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 +168,7 @@ implementation("net.neoforged:srgutils:1.0.9") // Mappings handling implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins -@@ -192,28 +_,40 @@ +@@ -193,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 +216,7 @@ "Build-Number" to (build ?: ""), "Build-Time" to buildTime.toString(), "Git-Branch" to gitBranch, -@@ -267,7 +_,7 @@ +@@ -273,7 +_,7 @@ jvmArgumentProviders.add(provider) } @@ -218,7 +225,7 @@ idea { module { generatedSourceDirs.add(generatedDir.toFile()) -@@ -325,6 +_,8 @@ +@@ -331,6 +_,8 @@ val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2") minHeapSize = "${memoryGb}G" maxHeapSize = "${memoryGb}G" @@ -227,7 +234,7 @@ doFirst { workingDir.mkdirs() -@@ -370,3 +_,62 @@ +@@ -376,3 +_,62 @@ classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip }) mainClass.set(null as String?) } diff --git a/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch b/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch index c3806897..6337923d 100644 --- a/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch +++ b/leaf-server/minecraft-patches/features/0002-Gale-configuration.patch @@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index f1373fd5fdebb9f4600ba7f32a5df6188de3a0e9..96d34149b1009b1522335784bc1858f61bb59cd1 100644 +index d6dcb6d146d89a8fb96e7c669e5deb802223abd6..84f4f0c87f904a31f3f972e9fb1da8a01474dfca 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -299,6 +299,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation -@@ -469,6 +470,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, AutoCl diff --git a/leaf-server/minecraft-patches/features/0003-Leaf-config.patch b/leaf-server/minecraft-patches/features/0003-Leaf-config.patch index be211990..2f22a73a 100644 --- a/leaf-server/minecraft-patches/features/0003-Leaf-config.patch +++ b/leaf-server/minecraft-patches/features/0003-Leaf-config.patch @@ -11,10 +11,10 @@ Add per world config Add config reload diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf496f0c00c4 100644 +index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf094cb30599 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -108,10 +108,12 @@ public class Main { +@@ -109,10 +109,12 @@ public class Main { JvmProfiler.INSTANCE.start(Environment.SERVER); } @@ -28,10 +28,10 @@ index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf49 DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support dedicatedServerSettings.forceSave(); diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 96d34149b1009b1522335784bc1858f61bb59cd1..d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6 100644 +index 84f4f0c87f904a31f3f972e9fb1da8a01474dfca..1d79892613707c7a81b5f0686874070f7f98debd 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1182,6 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop parseResults, String command, String label, boolean throwCommandError) { // Paper end CommandSourceStack commandSourceStack = parseResults.getContext().getSource(); @@ -72,7 +72,7 @@ index 1927163db5d44383b69f41e4b9855535e853d127..f1a637272a8e4ec9c46209ca6b58a490 ContextChain contextChain = this.finishParsing(parseResults, command, commandSourceStack, label); // CraftBukkit // Paper - Add UnknownCommandEvent try { -@@ -385,8 +381,6 @@ public class Commands { +@@ -420,8 +416,6 @@ public class Commands { commandSourceStack.sendFailure(Component.literal(Util.describeError(var12))); LOGGER.error("'/{}' threw an exception", command, var12); } @@ -81,7 +81,7 @@ index 1927163db5d44383b69f41e4b9855535e853d127..f1a637272a8e4ec9c46209ca6b58a490 } } -@@ -443,7 +437,7 @@ public class Commands { +@@ -478,7 +472,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,10 +169,10 @@ index 18071dcc69cc28471dddb7de94e803ec1e5fc2e4..e30bb9c4046200c1a6e4e917d15b205f } } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9 100644 +index 1d79892613707c7a81b5f0686874070f7f98debd..eae529b69296f4c1329907ae6bb1b0c300393b6d 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -113,19 +113,8 @@ import net.minecraft.util.TimeUtil; +@@ -114,19 +114,8 @@ import net.minecraft.util.TimeUtil; import net.minecraft.util.debugchart.RemoteDebugSampleType; import net.minecraft.util.debugchart.SampleLogger; import net.minecraft.util.debugchart.TpsDebugDimensions; @@ -192,7 +192,7 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.Difficulty; import net.minecraft.world.RandomSequences; -@@ -198,13 +187,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); @@ -206,7 +206,7 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; @Nullable -@@ -989,9 +971,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop false : this::haveTime); // Paper start - rewrite chunk system -@@ -1258,7 +1230,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1555,10 +1519,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit // Paper start - Folia scheduler API -@@ -1673,9 +1629,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 d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf096 try { serverLevel.tick(hasTimeLeft); } catch (Throwable var7) { -@@ -1729,34 +1678,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop true); @@ -790,7 +790,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 - ProfilerFiller profilerFiller = Profiler.get(); - profilerFiller.push("purge"); if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot - this.ticketStorage.purgeStaleTickets(); + this.ticketStorage.purgeStaleTickets(this.chunkMap); } this.runDistanceManagerUpdates(); @@ -807,7 +807,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 this.clearCache(); } -@@ -511,22 +499,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -511,22 +500,15 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon long l = gameTime - this.lastInhabitedUpdate; this.lastInhabitedUpdate = gameTime; if (!this.level.isDebug()) { @@ -833,7 +833,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 for (ChunkHolder chunkHolder : this.chunkHoldersToBroadcast) { LevelChunk tickingChunk = chunkHolder.getChunkToSend(); // Paper - rewrite chunk system if (tickingChunk != null) { -@@ -535,11 +516,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -535,11 +517,9 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } this.chunkHoldersToBroadcast.clear(); @@ -846,7 +846,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 int naturalSpawnChunkCount = this.distanceManager.getNaturalSpawnChunkCount(); // Paper start - Optional per player mob spawns NaturalSpawner.SpawnState spawnState; -@@ -564,7 +543,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -564,7 +544,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } // Paper end - Optional per player mob spawns this.lastSpawnState = spawnState; @@ -854,7 +854,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 boolean _boolean = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit int _int = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); List filteredSpawningCategories; -@@ -586,14 +564,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -586,14 +565,11 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon List list = this.spawningChunks; try { @@ -869,7 +869,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 for (LevelChunk levelChunk : list) { this.tickSpawningChunk(levelChunk, timeInhabited, filteredSpawningCategories, spawnState); -@@ -602,10 +577,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -602,10 +578,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon list.clear(); } @@ -880,7 +880,7 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 if (_boolean) { this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies); } -@@ -814,7 +786,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -817,7 +790,6 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @Override protected void doRunTask(Runnable task) { @@ -889,10 +889,10 @@ index 59e8a5e1b35c81883c9b1ca00c6e55d77584d8cc..4167b46148fc370f20b35c2a261e38c0 } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec1293a2ec70b 100644 +index b4c983216cd839d793a09e327bb2f15ab90cbff8..1413511500ce8ae25cc4af1d54fc33c8912c24bc 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -74,8 +74,6 @@ import net.minecraft.util.Mth; +@@ -75,8 +75,6 @@ import net.minecraft.util.Mth; import net.minecraft.util.ProgressListener; import net.minecraft.util.RandomSource; import net.minecraft.util.datafix.DataFixTypes; @@ -901,7 +901,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 import net.minecraft.util.valueproviders.IntProvider; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; -@@ -704,16 +702,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -708,16 +706,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } public void tick(BooleanSupplier hasTimeLeft) { @@ -918,7 +918,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } int _int = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE); -@@ -747,41 +741,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -751,41 +745,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe this.tickTime(); } @@ -960,7 +960,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR -@@ -790,9 +773,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -794,9 +777,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity -> { if (!entity.isRemoved()) { if (!tickRateManager.isEntityFrozen(entity)) { @@ -970,7 +970,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (true) { // Paper - rewrite chunk system Entity vehicle = entity.getVehicle(); if (vehicle != null) { -@@ -803,21 +784,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -807,21 +788,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity.stopRiding(); } @@ -992,7 +992,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } @Override -@@ -832,9 +807,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -836,9 +811,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe if (this.tickTime) { long l = this.levelData.getGameTime() + 1L; this.serverLevelData.setGameTime(l); @@ -1002,7 +1002,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (this.serverLevelData.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) { this.setDayTime(this.levelData.getDayTime() + 1L); } -@@ -913,8 +886,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -917,8 +890,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ChunkPos pos = chunk.getPos(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -1011,7 +1011,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow for (int i = 0; i < randomTickSpeed; i++) { -@@ -924,12 +895,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -928,12 +899,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } } // Paper - Option to disable ice and snow @@ -1024,7 +1024,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } public void tickThunder(LevelChunk chunk) { -@@ -937,8 +905,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -941,8 +909,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe boolean isRaining = this.isRaining(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -1033,7 +1033,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 if (!this.paperConfig().environment.disableThunder && isRaining && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder BlockPos blockPos = this.findLightningTargetAround(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15)); if (this.isRainingAt(blockPos)) { -@@ -964,8 +930,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -968,8 +934,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } } } @@ -1042,7 +1042,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 } @VisibleForTesting -@@ -1259,17 +1223,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1267,17 +1231,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper end - log detailed entity tick information entity.setOldPosAndRot(); @@ -1060,7 +1060,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 for (Entity entity1 : entity.getPassengers()) { this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2 -@@ -1290,9 +1250,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1298,9 +1258,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe passengerEntity.setOldPosAndRot(); passengerEntity.tickCount++; passengerEntity.totalEntityAge++; // Paper - age-like counter for all entities @@ -1070,7 +1070,7 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 // Paper start - EAR 2 if (isActive) { passengerEntity.rideTick(); -@@ -1304,7 +1261,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1312,7 +1269,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ridingEntity.positionRider(passengerEntity); } // Paper end - EAR 2 @@ -1079,10 +1079,10 @@ index f66aca0b506390ca5c2f95aacb9495417de325e7..c130a4c61fed477f32be2d1b233ec129 for (Entity entity : passengerEntity.getPassengers()) { this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2 diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d8a4661be 100644 +index 6f38501078e0d8d5d41de1d9b70ca95f59bfdc5c..ffae3e45ba88e8b733e77b87a45cc27b9ecf8c19 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -103,8 +103,6 @@ import net.minecraft.util.HashOps; +@@ -106,8 +106,6 @@ import net.minecraft.util.HashOps; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -1091,7 +1091,7 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d import net.minecraft.world.Container; import net.minecraft.world.Difficulty; import net.minecraft.world.InteractionHand; -@@ -1375,14 +1373,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1407,14 +1405,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.unsetRemoved(); */ // CraftBukkit end @@ -1106,7 +1106,7 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d // CraftBukkit start this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds LevelData worlddata = level.getLevelData(); -@@ -1399,7 +1393,6 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1431,7 +1425,6 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.connection.internalTeleport(PositionMoveRotation.of(teleportTransition), teleportTransition.relatives()); // CraftBukkit - use internal teleport without event this.connection.resetPosition(); level.addDuringTeleport(this); @@ -1115,10 +1115,10 @@ index 580e1ce2eaab3a8f1c4ac59be73be2703f769741..6f60f5e92628e744a22b3d3f83c2010d this.stopUsingItem(); this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities())); diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 186393485396cfe9b1baef29586198356e2d2600..776ff13b399fa01bf3900280cf1b5782370732a0 100644 +index aa6313df41c1d4011c6b3750b14fc9db115ef090..dd3841c06a386c0d6dc641fe2573d3fb0733504d 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -24,7 +24,6 @@ import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket; +@@ -26,7 +26,6 @@ import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ClientInformation; import net.minecraft.util.VisibleForDebug; @@ -1126,7 +1126,7 @@ index 186393485396cfe9b1baef29586198356e2d2600..776ff13b399fa01bf3900280cf1b5782 import org.slf4j.Logger; public abstract class ServerCommonPacketListenerImpl implements ServerCommonPacketListener, org.bukkit.craftbukkit.entity.CraftPlayer.TransferCookieConnection { // CraftBukkit -@@ -237,7 +236,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -245,7 +244,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } protected void keepConnectionAlive() { @@ -1134,7 +1134,7 @@ index 186393485396cfe9b1baef29586198356e2d2600..776ff13b399fa01bf3900280cf1b5782 long millis = Util.getMillis(); // 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 -@@ -255,8 +253,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -263,8 +261,6 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge)); } } @@ -1234,19 +1234,19 @@ index 64b0508ef21952c65b0b967b756b2a4c64d96899..b6b03fbbd669e6331b30255df5419611 protected abstract T prepare(ResourceManager resourceManager, ProfilerFiller profiler); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9cfae142a 100644 +index 20765c1563a31952bdc62eeb6c04e9fdba3f0cf1..96ff8384beabdfd471579d4626ce89d5587b0a35 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -82,8 +82,6 @@ import net.minecraft.tags.FluidTags; - import net.minecraft.tags.TagKey; +@@ -80,8 +80,6 @@ import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; + import net.minecraft.util.ProblemReporter; import net.minecraft.util.RandomSource; -import net.minecraft.util.profiling.Profiler; -import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.Nameable; -@@ -816,8 +814,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -841,8 +839,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public void baseTick() { @@ -1255,7 +1255,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups this.inBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -874,8 +870,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -896,8 +892,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) { Leashable.tickLeash(serverLevelx, (Entity & Leashable)this); } @@ -1264,7 +1264,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } public void setSharedFlagOnFire(boolean isOnFire) { -@@ -1095,8 +1089,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1117,8 +1111,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -1273,7 +1273,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1105,7 +1097,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1127,7 +1119,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -1281,8 +1281,8 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 return; } // Paper end -@@ -1140,8 +1131,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - this.setPos(vec31); +@@ -1152,8 +1143,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + this.setPos(vec32); } - profilerFiller.pop(); @@ -1290,7 +1290,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 boolean flag = !Mth.equal(movement.x, vec3.x); boolean flag1 = !Mth.equal(movement.z, vec3.z); this.horizontalCollision = flag || flag1; -@@ -1164,7 +1153,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1176,7 +1165,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } if (this.isRemoved()) { @@ -1298,7 +1298,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } else { if (this.horizontalCollision) { Vec3 deltaMovement = this.getDeltaMovement(); -@@ -1208,7 +1196,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1220,7 +1208,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess float blockSpeedFactor = this.getBlockSpeedFactor(); this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor)); @@ -1306,7 +1306,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } } // Paper start - detailed watchdog information -@@ -3212,8 +3199,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3407,8 +3394,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.processPortalCooldown(); if (this.portalProcess != null) { if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) { @@ -1315,7 +1315,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 this.setPortalCooldown(); TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this); if (portalDestination != null) { -@@ -3224,7 +3209,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3419,7 +3404,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -1323,7 +1323,7 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 } else if (this.portalProcess.hasExpired()) { this.portalProcess = null; } -@@ -3779,15 +3763,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3986,15 +3970,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.teleport(this.calculatePassengerTransition(teleportTransition, entity)); } @@ -1339,31 +1339,31 @@ index 55f8ca326d52385c92a0b6ee49ee9652e86fa870..e84081f571190fc00db07bdc9da349b9 return this; } -@@ -3803,11 +3784,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4010,11 +3991,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } - ProfilerFiller profilerFiller = Profiler.get(); - profilerFiller.push("teleportCrossDimension"); - Entity entityx = this.getType().create(level, EntitySpawnReason.DIMENSION_TRAVEL); + Entity entityx = this.getType().create(newLevel, EntitySpawnReason.DIMENSION_TRAVEL); if (entityx == null) { - profilerFiller.pop(); return null; } else { // Paper start - Fix item duplication and teleport issues -@@ -3826,7 +3804,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - - level.resetEmptyTime(); +@@ -4034,7 +4012,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + newLevel.resetEmptyTime(); teleportTransition.postTeleportTransition().onTransition(entityx); + this.teleportSpectators(teleportTransition, oldLevel); - profilerFiller.pop(); return entityx; } } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c713290bc008d0 100644 +index 35d71978a3d360eed97feb66d1048bee337ef2b9..97431aa47b5425578bf14b992596962c64c87f35 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -70,8 +70,6 @@ import net.minecraft.tags.FluidTags; +@@ -69,8 +69,6 @@ import net.minecraft.tags.FluidTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; @@ -1372,7 +1372,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 import net.minecraft.world.Difficulty; import net.minecraft.world.InteractionHand; import net.minecraft.world.damagesource.CombatRules; -@@ -415,8 +413,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -429,8 +427,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } super.baseTick(); @@ -1381,7 +1381,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.fireImmune() || this.level().isClientSide) { this.clearFire(); } -@@ -501,7 +497,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -515,7 +511,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.yBodyRotO = this.yBodyRot; this.yRotO = this.getYRot(); this.xRotO = this.getXRot(); @@ -1389,7 +1389,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 } @Override -@@ -3233,11 +3228,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3285,11 +3280,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin f1 = this.getYRot(); } @@ -1401,7 +1401,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 // Paper start - stop large pitch and yaw changes from crashing the server this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F; -@@ -3249,7 +3240,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3301,7 +3292,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; // Paper end - stop large pitch and yaw changes from crashing the server @@ -1409,7 +1409,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.isFallFlying()) { this.fallFlyTicks++; } else { -@@ -3425,21 +3415,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3477,21 +3467,15 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } this.setDeltaMovement(d, d1, d2); @@ -1431,7 +1431,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.jumping && this.isAffectedByFluids()) { double fluidHeight; if (this.isInLava()) { -@@ -3468,8 +3452,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3520,8 +3504,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.noJumpDelay = 0; } @@ -1440,7 +1440,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (this.isFallFlying()) { this.updateFallFlying(); } -@@ -3494,9 +3476,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3546,9 +3528,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.calculateEntityAnimation(this instanceof FlyingAnimal); } @@ -1450,7 +1450,7 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if ((!this.isInPowderSnow || !this.canFreeze()) && !this.freezeLocked) { // Paper - Freeze Tick Lock API this.setTicksFrozen(Math.max(0, this.getTicksFrozen() - 2)); } -@@ -3506,18 +3486,14 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3558,18 +3538,14 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (this.tickCount % 40 == 0 && this.isFullyFrozen() && this.canFreeze()) { this.hurtServer(serverLevel, this.damageSources().freeze(), 1.0F); } @@ -1470,10 +1470,10 @@ index ef92dc4384f698cc6b5c4e67fe052a3d4af98f4c..79f499fea47a9c675da1aed718c71329 if (((ServerLevel) this.level()).hasEntityMoveEvent && !(this instanceof Player)) { if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) { diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e74d5113d 100644 +index 0470c4bbf8be7e48ce8dfa4910c3b9f5ebb23360..4d4b58b684ca115f4d8f672362d4c8252ef9481a 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -30,8 +30,6 @@ import net.minecraft.sounds.SoundEvent; +@@ -26,8 +26,6 @@ import net.minecraft.sounds.SoundEvent; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1482,7 +1482,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e import net.minecraft.world.Container; import net.minecraft.world.Difficulty; import net.minecraft.world.DifficultyInstance; -@@ -316,14 +314,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -319,14 +317,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void baseTick() { super.baseTick(); @@ -1497,7 +1497,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } @Override -@@ -489,8 +483,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -502,8 +496,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void aiStep() { super.aiStep(); @@ -1506,7 +1506,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e if (this.level() instanceof ServerLevel serverLevel && this.canPickUpLoot() && this.isAlive() -@@ -513,8 +505,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -526,8 +518,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab } } } @@ -1515,7 +1515,7 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } protected Vec3i getPickupReach() { -@@ -724,42 +714,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -741,42 +731,21 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab return; } // Paper end - Allow nerfed mobs to jump and float @@ -1559,10 +1559,10 @@ index 73ba442b9d39bc021cd5eb6c1c0f98aed94a5a02..7f5981f71e6380c09e40a0c80db6a77e } diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java -index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc17373fa77ff6 100644 +index 859b859d29b637200cf7c9a0bd52d9f712413e3d..653c58c7637c46c8b46a5082f671324a2221d431 100644 --- a/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -7,8 +7,6 @@ import java.util.EnumSet; +@@ -6,8 +6,6 @@ import java.util.EnumSet; import java.util.Map; import java.util.Set; import java.util.function.Predicate; @@ -1571,7 +1571,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 public class GoalSelector { private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() { -@@ -84,9 +82,6 @@ public class GoalSelector { +@@ -82,9 +80,6 @@ public class GoalSelector { } public void tick() { @@ -1581,7 +1581,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 for (WrappedGoal wrappedGoal : this.availableGoals) { if (wrappedGoal.isRunning() && (goalContainsAnyFlags(wrappedGoal, this.goalTypes) || !wrappedGoal.canContinueToUse())) { // Paper - Perf: optimize goal types by removing streams wrappedGoal.stop(); -@@ -94,8 +89,6 @@ public class GoalSelector { +@@ -92,8 +87,6 @@ public class GoalSelector { } this.lockedFlags.entrySet().removeIf(entry -> !entry.getValue().isRunning()); @@ -1590,7 +1590,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 for (WrappedGoal wrappedGoalx : this.availableGoals) { // Paper start -@@ -115,21 +108,15 @@ public class GoalSelector { +@@ -113,21 +106,15 @@ public class GoalSelector { } } @@ -1613,7 +1613,7 @@ index a927c2790c8ab9ccaa7161b970e10b0b44817dd8..b816b2de8eb327060ca6ea7c4afc1737 public Set getAvailableGoals() { diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 06389019deba08c7c0966affcdc90512c88db3d5..6bbdfc748f1ce66689c63424fadcf261b1e967b3 100644 +index 3b29cc4e11efe6f27023f52cfde16fd118c310ad..c8e4ccb96a0f162c780066cf4f61b970b49b7703 100644 --- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -10,8 +10,6 @@ import net.minecraft.core.Vec3i; @@ -1664,10 +1664,10 @@ index c569074403b1d8b443aaa98ba9cf9bbd0e98bd2d..b1aa7294f9479f45fcde77c5ea46db9f this.seen.add(id); } else { diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e17d94f039 100644 +index b7b964bd4e2d611a3e48ece072d5787193077a92..de3bf0b62371f06ecb5d2035638e352ca0c06182 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -29,8 +29,6 @@ import net.minecraft.tags.GameEventTags; +@@ -25,8 +25,6 @@ import net.minecraft.tags.GameEventTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; @@ -1676,7 +1676,7 @@ index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e1 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.SimpleContainer; -@@ -241,13 +239,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -226,13 +224,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS @Override protected void customServerAiStep(ServerLevel level) { @@ -1691,10 +1691,10 @@ index eaa1745d34323cd684782a7fb2e153851a736471..fc2290a62c0a01cfa3143e77384f30e1 } diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e952794c2a 100644 +index c1798db2972c8f2a343cf6e16fd9354ff212d906..ee2c6c86631ba50a4e8503131c678596bc2c0363 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -24,8 +24,6 @@ import net.minecraft.util.ByIdMap; +@@ -23,8 +23,6 @@ import net.minecraft.util.ByIdMap; import net.minecraft.util.RandomSource; import net.minecraft.util.StringRepresentable; import net.minecraft.util.TimeUtil; @@ -1703,7 +1703,7 @@ index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e9 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -134,13 +132,8 @@ public class Armadillo extends Animal { +@@ -135,13 +133,8 @@ public class Armadillo extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1718,7 +1718,7 @@ index b72e07ad954efa7f26f876a59f428086b40d9bb2..657f4b56699c33590a0494ef860275e9 this.forceDrops = true; // CraftBukkit if (this.dropFromGiftLootTable(level, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) { diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3af43f9de 100644 +index b0467750dab4c6f411fd2f318009d25f83d94bc0..6a5e9e9582e322aaa1555933de97e545ba74f8f4 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java @@ -31,8 +31,6 @@ import net.minecraft.util.ByIdMap; @@ -1730,7 +1730,7 @@ index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -327,13 +325,8 @@ public class Axolotl extends Animal implements Bucketable { +@@ -329,13 +327,8 @@ public class Axolotl extends Animal implements Bucketable { @Override protected void customServerAiStep(ServerLevel level) { @@ -1745,10 +1745,10 @@ index 233025bc1d4ba2590223def9b206140c68ea5f26..d3d4d8b025480f9e2202157591319df3 Optional memory = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS); this.setPlayingDead(memory.isPresent() && memory.get() > 0); diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0a4290cee 100644 +index 757b63ee059c95e673a098706b4ee7ab4fc21f70..adc336c6cec601b8855c1013adf1eebf018597f0 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -19,8 +19,6 @@ import net.minecraft.tags.BlockTags; +@@ -18,8 +18,6 @@ import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1757,7 +1757,7 @@ index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -157,14 +155,9 @@ public class Camel extends AbstractHorse { +@@ -159,14 +157,9 @@ public class Camel extends AbstractHorse { @Override protected void customServerAiStep(ServerLevel level) { @@ -1773,10 +1773,10 @@ index 6336fb58f4314be2fe987d7e3de258d977369417..b63b32bac1872db7be64fcb645acd0a0 } diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf48f76a9c1 100644 +index 66f503e045ccb0985ec718b39be07eea538fad8d..b8703409dd3dc8e3020ed81b44ce4812984c88c3 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -29,8 +29,6 @@ import net.minecraft.tags.ItemTags; +@@ -28,8 +28,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -1785,7 +1785,7 @@ index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf4 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.AgeableMob; -@@ -203,13 +201,8 @@ public class Frog extends Animal { +@@ -204,13 +202,8 @@ public class Frog extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1800,7 +1800,7 @@ index 8ffbe420528cd63f30f9b41d4fb0a6519042eadc..fdf40dc10aad108db6ca68fcfec9ecf4 } diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0820dbbe7 100644 +index 17f58246849ed407821a987b200cc765eb7943f9..c1510a6f1146f446ed65a1f08984af6c29de439a 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java @@ -12,8 +12,6 @@ import net.minecraft.server.level.ServerLevel; @@ -1812,7 +1812,7 @@ index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -98,13 +96,8 @@ public class Tadpole extends AbstractFish { +@@ -100,13 +98,8 @@ public class Tadpole extends AbstractFish { @Override protected void customServerAiStep(ServerLevel level) { @@ -1827,10 +1827,10 @@ index ebdfd3fb6c0de48982d392bb2aa415f3676c6056..faaa8197e8421c2bbdc2a8bbaae4f4d0 } diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d8003793eaa 100644 +index 75af1b92a0a60cffa3317d83bd599a3d4d26f93c..bdac4929db71a39fc02985109cedc9cd316ec3cc 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -21,8 +21,6 @@ import net.minecraft.tags.ItemTags; +@@ -20,8 +20,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; @@ -1839,7 +1839,7 @@ index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d80 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -189,13 +187,8 @@ public class Goat extends Animal { +@@ -190,13 +188,8 @@ public class Goat extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1854,7 +1854,7 @@ index b22321ead9d66cb089b67276743624b3cca52fc1..9047e75a5edf9fec2b73aec272284d80 } diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd68508bebf76 100644 +index 6a9f31c1f39cc14ad7b5ae3af85908bc7a4caae4..05d269b51715a71fa653900e7187b07d001afdb7 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java @@ -29,8 +29,6 @@ import net.minecraft.tags.BlockTags; @@ -1866,7 +1866,7 @@ index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd685 import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.damagesource.DamageSource; -@@ -454,12 +452,8 @@ public class Sniffer extends Animal { +@@ -465,12 +463,8 @@ public class Sniffer extends Animal { @Override protected void customServerAiStep(ServerLevel level) { @@ -1880,10 +1880,10 @@ index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..622c2eac70c81ed7ccf605069b8dd685 } diff --git a/net/minecraft/world/entity/monster/Zoglin.java b/net/minecraft/world/entity/monster/Zoglin.java -index 4405f465ad5b136390c4204b177967c6e47738dd..33c7081c2aee7a31c4dd143f9d1a36cadcfcb29f 100644 +index 0dbc528bcad2b2f79585e2462a265d43fcbebe76..662b95d27f6630ec27fd88ca279e395438faa96b 100644 --- a/net/minecraft/world/entity/monster/Zoglin.java +++ b/net/minecraft/world/entity/monster/Zoglin.java -@@ -15,8 +15,6 @@ import net.minecraft.network.syncher.SynchedEntityData; +@@ -14,8 +14,6 @@ import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; @@ -1892,7 +1892,7 @@ index 4405f465ad5b136390c4204b177967c6e47738dd..33c7081c2aee7a31c4dd143f9d1a36ca import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; -@@ -249,10 +247,7 @@ public class Zoglin extends Monster implements HoglinBase { +@@ -250,10 +248,7 @@ public class Zoglin extends Monster implements HoglinBase { @Override protected void customServerAiStep(ServerLevel level) { @@ -1930,10 +1930,10 @@ index c12653070d62c44b97a07676f24caf7ab570cd2a..d91ce14cc39b1b6ccd558f53ed605d4c } diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af40289761987 100644 +index 567e7952efec69b4222563fae724d18a9902bb05..f66bd6cc4aab828e847b990b193be54cd0d0dc01 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -17,8 +17,6 @@ import net.minecraft.server.level.ServerLevel; +@@ -16,8 +16,6 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.tags.DamageTypeTags; @@ -1942,7 +1942,7 @@ index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af402 import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.AnimationState; import net.minecraft.world.entity.Entity; -@@ -204,10 +202,7 @@ public class Creaking extends Monster { +@@ -205,10 +203,7 @@ public class Creaking extends Monster { @Override protected void customServerAiStep(ServerLevel level) { @@ -1954,10 +1954,10 @@ index bdefd070cfebe7f3f792c998f2f53be720cbfbcd..2183f5aaf6cf7a4df8c659f0766af402 } diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5df4a64726 100644 +index 0ecf8533f6cad081df8713856feb74db93028f71..bde6f9d9d1cc7a5ee8334ee9207afae304ddcfa9 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -16,8 +16,6 @@ import net.minecraft.sounds.SoundEvents; +@@ -15,8 +15,6 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.ItemTags; import net.minecraft.util.RandomSource; @@ -1966,7 +1966,7 @@ index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5d import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -161,10 +159,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -162,10 +160,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { @Override protected void customServerAiStep(ServerLevel level) { @@ -1978,10 +1978,10 @@ index 0d05d21158a59dc3aa648c1d6541121c5bb547e6..2989add9a4746646f06ec3f6c386ac5d if (this.isConverting()) { this.timeInOverworld++; diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index e200e974e46de6166d56e051806c00a69aefc9bb..27052ded60db7c3916de3f4c8b48227f53fd7249 100644 +index 8392ff1316f0c5be685a6ded7ccd08933c10ff4e..689f200554d8c03313b3d194f209c527f315c29a 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -17,8 +17,6 @@ import net.minecraft.tags.ItemTags; +@@ -16,8 +16,6 @@ import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.util.RandomSource; import net.minecraft.util.VisibleForDebug; @@ -1990,7 +1990,7 @@ index e200e974e46de6166d56e051806c00a69aefc9bb..27052ded60db7c3916de3f4c8b48227f import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; -@@ -319,10 +317,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -320,10 +318,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override protected void customServerAiStep(ServerLevel level) { @@ -2026,10 +2026,10 @@ index 219978cb0341b2d691f44c1146707d875788881e..589a130f8855f464c1930a0aa8b54c03 PiglinBruteAi.maybePlayActivitySound(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f753565591825f54f67 100644 +index 4a4cc7f9c95d4f4b6ad4948e3ed3504efbbcef15..dd6666bd8b8df4148a1557627ce2a6ddab245ed6 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -31,8 +31,6 @@ import net.minecraft.tags.TagKey; +@@ -27,8 +27,6 @@ import net.minecraft.tags.TagKey; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; @@ -2038,7 +2038,7 @@ index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f7535655918 import net.minecraft.world.DifficultyInstance; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.effect.MobEffectInstance; -@@ -281,10 +279,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -279,10 +277,7 @@ public class Warden extends Monster implements VibrationSystem { @Override protected void customServerAiStep(ServerLevel level) { @@ -2050,10 +2050,10 @@ index cd28ca290c081d9f5e4498f59d7b87a566f81544..67fdcbe05e8d5f4000255f7535655918 if ((this.tickCount + this.getId()) % 120 == 0) { applyDarknessAround(level, this.position(), this, 20); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c2c37b136 100644 +index 98c8653647dc52059d8becfe38a74d4e62edf08f..73214ccad93ccd186c149e8ce8913eb0e3fa324a 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -36,8 +36,6 @@ import net.minecraft.stats.Stats; +@@ -35,8 +35,6 @@ import net.minecraft.stats.Stats; import net.minecraft.tags.ItemTags; import net.minecraft.util.Mth; import net.minecraft.util.SpawnUtil; @@ -2062,7 +2062,7 @@ index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c import net.minecraft.world.Difficulty; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.InteractionHand; -@@ -294,10 +292,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -295,10 +293,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } protected void customServerAiStep(ServerLevel level, final boolean inactive) { // Paper end - EAR 2 @@ -2074,7 +2074,7 @@ index e0e0d2ea7fc60e3142c675404d152eca60263240..09d559adb603e3d34bb82b944a2a3e8c this.assignProfessionWhenSpawned = false; } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7ab530631f 100644 +index 4b96e512905aca3b69408145054c0658ee932eed..9f630dda781dd540ab5655bd7ce916949eeee61c 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -35,8 +35,6 @@ import net.minecraft.util.AbortableIterationConsumer; @@ -2119,7 +2119,7 @@ index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7a this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1742,7 +1735,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1735,7 +1728,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl @Override public List getEntities(@Nullable Entity entity, AABB boundingBox, Predicate predicate) { @@ -2127,7 +2127,7 @@ index 4c31b039eb697ba84598dd1fdded707a2f155ce5..2ebb7f0f3686fa631de874fee9474f7a List list = Lists.newArrayList(); // Paper start - rewrite chunk system -@@ -1771,8 +1763,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1764,8 +1756,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl public void getEntities(final EntityTypeTest entityTypeTest, final AABB boundingBox, final Predicate predicate, final List into, final int maxCount) { @@ -2169,7 +2169,7 @@ index 14a2514a408a66a83f7b5fb43b4c4dc8f23fd5f4..ec32d77447dd250857a2af1d8cc3e6e2 // Paper start - Add mobcaps commands diff --git a/net/minecraft/world/level/ServerExplosion.java b/net/minecraft/world/level/ServerExplosion.java -index ec4b63a574e7ff2c807c283c9f4b402229864e51..63d0b83d648ab1a6e7c84a49f7e2e825076904ad 100644 +index e5ccfb8cbfafed7bb0a1d888b5bc98a923e46e59..93ac791a028f7da821db448c503532acb4a5490e 100644 --- a/net/minecraft/world/level/ServerExplosion.java +++ b/net/minecraft/world/level/ServerExplosion.java @@ -13,8 +13,6 @@ import net.minecraft.Util; @@ -2193,19 +2193,19 @@ index ec4b63a574e7ff2c807c283c9f4b402229864e51..63d0b83d648ab1a6e7c84a49f7e2e825 if (this.fire) { diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f36914c5a1573 100644 +index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -23,8 +23,6 @@ import net.minecraft.network.FriendlyByteBuf; - import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; +@@ -24,8 +24,6 @@ import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; + import net.minecraft.util.ProblemReporter; -import net.minecraft.util.profiling.Profiler; -import net.minecraft.util.profiling.ProfilerFiller; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; -@@ -383,12 +381,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -385,12 +383,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } if (LightEngine.hasDifferentLightProperties(blockState, state)) { @@ -2218,7 +2218,7 @@ index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f3691 } boolean flag = !blockState.is(block); -@@ -915,8 +909,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -922,8 +916,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p BlockPos blockPos = this.blockEntity.getBlockPos(); if (LevelChunk.this.isTicking(blockPos)) { try { @@ -2227,7 +2227,7 @@ index 5d3fc807221392d378fec283bfdefb8747fb8376..61fa8f2bf018b8892a11acec058f3691 BlockState blockState = LevelChunk.this.getBlockState(blockPos); if (this.blockEntity.getType().isValid(blockState)) { this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), blockState, this.blockEntity); -@@ -930,8 +922,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -937,8 +929,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } // Paper end - Remove the Block Entity if it's invalid } diff --git a/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch b/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch index ded97942..8203eb83 100644 --- a/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch +++ b/leaf-server/minecraft-patches/features/0009-Reduce-projectile-chunk-loading.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java -index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16d881401b 100644 +index ee16a05b8b2747ce95fcae1616c96143a5dec74e..36124bfd4189e35208875e971733889410242641 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java -@@ -53,6 +53,55 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -50,6 +50,55 @@ public abstract class Projectile extends Entity implements TraceableEntity { super(entityType, level); } @@ -87,6 +87,6 @@ index 4487c03183d20a187d391dd124abb7b926508b5b..84c846d2ef4990befb2891631ac5ae16 + } + // Gale end - Airplane - reduce projectile chunk loading + - public void setOwner(@Nullable Entity owner) { - if (owner != null) { - this.ownerUUID = owner.getUUID(); + protected void setOwner(@Nullable EntityReference owner) { + this.owner = owner; + } diff --git a/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch b/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch index 78a9d307..108de3bc 100644 --- a/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch +++ b/leaf-server/minecraft-patches/features/0010-Predict-Halloween.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/ambient/Bat.java b/net/minecraft/world/entity/ambient/Bat.java -index eb9fb57440f498079182030a46034008d3f6b5e8..65a9ea8d4a208f447b5e78b58b10a0917e35e4f2 100644 +index 912b099a51269f92f250c7d6094ad41817749f93..5dadb42fd2d2d03ef366ca83c9c4aae6c288aaa4 100644 --- a/net/minecraft/world/entity/ambient/Bat.java +++ b/net/minecraft/world/entity/ambient/Bat.java -@@ -244,11 +244,66 @@ public class Bat extends AmbientCreature { +@@ -245,11 +245,66 @@ public class Bat extends AmbientCreature { } } diff --git a/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch b/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch index de2a02a9..00d6fda6 100644 --- a/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch +++ b/leaf-server/minecraft-patches/features/0011-Move-random-tick-random.patch @@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we initialize it earlier, ensuring that it is available sooner. diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810f4f251e3 100644 +index 1413511500ce8ae25cc4af1d54fc33c8912c24bc..0665c2ec275086b8c555c550af93dfef197fba07 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -830,8 +830,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -834,8 +834,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper start - optimise random ticking @@ -32,7 +32,7 @@ index 1d53c0b96ff781765155aac29256f4493f7d7c58..3941d15753aef952ad1fd5b5f96cb810 final LevelChunkSection[] sections = chunk.getSections(); final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this); diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9a5447dfa8cba271fdb205d21e4236c94074a7da..013e22dc4eceda9b947f1ff8fe43540b8855aa34 100644 +index 9f630dda781dd540ab5655bd7ce916949eeee61c..19a9b37bad1d465440047cbde9a00b12ba5d9a4b 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch b/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch index c9bfc054..fc037015 100644 --- a/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch +++ b/leaf-server/minecraft-patches/features/0012-Optimize-random-calls-in-chunk-ticking.patch @@ -52,10 +52,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac4f64e1f2 100644 +index 6020b71802babb35ef60aca65afe9c2612c05bb7..e53440bd5f0e659db0745a009540520f6dc41238 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -499,6 +499,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -500,6 +500,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon long l = gameTime - this.lastInhabitedUpdate; this.lastInhabitedUpdate = gameTime; if (!this.level.isDebug()) { @@ -64,10 +64,10 @@ index 5005ad97fe4830c6563bca50a77a6abd36c984df..3d7d336c2043b533012ee390e6da02ac this.tickChunks(l); // Gale - Purpur - remove vanilla profiler } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c5786545b5519eb 100644 +index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb1557ca74ee 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -879,13 +879,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -883,13 +883,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // Paper end - optimise random ticking @@ -84,7 +84,7 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654 for (int i = 0; i < randomTickSpeed; i++) { if (simpleRandom.nextInt(48) == 0) { // Paper - optimise random ticking this.tickPrecipitation(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15)); -@@ -903,7 +905,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -907,7 +909,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe boolean isRaining = this.isRaining(); int minBlockX = pos.getMinBlockX(); int minBlockZ = pos.getMinBlockZ(); @@ -94,10 +94,10 @@ index 28377b1d568e70f4ff1e5a6eea39e7fb9e1233e7..606dee544c669dcaa0eb02808c578654 if (this.isRainingAt(blockPos)) { DifficultyInstance currentDifficultyAt = this.getCurrentDifficultyAt(blockPos); diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269d9842c06 100644 +index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..9e2debee38bc4b25281c8a8c6e7082cca1f7b569 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -126,6 +126,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -128,6 +128,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } // Paper end - get block chunk optimisation @@ -116,7 +116,7 @@ index 61fa8f2bf018b8892a11acec058f36914c5a1573..a8db2a822deb07ddc707cf73fdc5c269 public LevelChunk(Level level, ChunkPos pos) { this(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, null, null, null); } -@@ -162,6 +174,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -164,6 +176,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p this.debug = !empty && this.level.isDebug(); this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE; // Paper end - get block chunk optimisation diff --git a/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch b/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch index 0c241dc7..9f584756 100644 --- a/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch +++ b/leaf-server/minecraft-patches/features/0013-Reduce-enderman-teleport-chunk-lookups.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java -index 5ae08be75ca01924fc78bdd8d6bb6747ddc21aea..84a9dbf5898fb519fad5fdc3ea1d9a2054d1e0eb 100644 +index 4edd94ac765d2ab107612504b67e6e07da609313..9b0235c50426accde002cbb0a09a992f13b05cd7 100644 --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -300,11 +300,19 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -296,11 +296,19 @@ public class EnderMan extends Monster implements NeutralMob { private boolean teleport(double x, double y, double z) { BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z); diff --git a/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch b/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch index 57ea3a6c..e2ac01eb 100644 --- a/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch +++ b/leaf-server/minecraft-patches/features/0016-Cache-on-climbable-check.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af31109d5a0a6 100644 +index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..eee9c41e40402e52b73f34a734b4cbdeb6cfbc22 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -215,7 +215,7 @@ public final class ActivationRange { +@@ -221,7 +221,7 @@ public final class ActivationRange { } // special cases. if (entity instanceof final LivingEntity living) { @@ -44,10 +44,10 @@ index 2ebee223085fe7926c7f3e555df19ae69f36157e..602ed4c5556723e54a80ccc3481af311 } if (entity instanceof final Mob mob && mob.getTarget() != null) { diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 79f499fea47a9c675da1aed718c713290bc008d0..f019571b4b6b5e2d1953030911449a02e459591c 100644 +index 97431aa47b5425578bf14b992596962c64c87f35..e174c7b8c637e6983cf0778e6956d8d11e9cd7d1 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2083,6 +2083,21 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2115,6 +2115,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return this.lastClimbablePos; } diff --git a/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch b/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch index 5f4def86..269068a5 100644 --- a/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch +++ b/leaf-server/minecraft-patches/features/0018-Better-checking-for-useless-move-packets.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 7360914a6f4dc43758c38f2c6c7f8d458cc14c4d..7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec 100644 +index e958972ca09eb0ab07d81990e661076ab0371850..5df8ee3955593e70f0e67e91431e464d177bdeeb 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -189,19 +189,25 @@ public class ServerEntity { +@@ -193,19 +193,25 @@ public class ServerEntity { packet = ClientboundEntityPositionSyncPacket.of(this.entity); flag3 = true; flag4 = true; diff --git a/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch b/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch index d8628407..7a6e0e8b 100644 --- a/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch +++ b/leaf-server/minecraft-patches/features/0019-Block-goal-does-not-load-chunks.patch @@ -31,7 +31,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e13b82511a 100644 +index 7e70c7bee633c54497d1cd2854dd60f4fb5ff160..f15da598cb1d7872fafb8b173e5134b9667c9a9f 100644 --- a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -119,6 +119,7 @@ public abstract class MoveToBlockGoal extends Goal { @@ -39,6 +39,6 @@ index d0ab3db7bbd2942db19f473474371b20ce822608..3f080b15543bf8c5fa0774b62d7f12e1 for (int i5 = i4 < i3 && i4 > -i3 ? i3 : 0; i5 <= i3; i5 = i5 > 0 ? -i5 : 1 - i5) { mutableBlockPos.setWithOffset(blockPos, i4, i2 - 1, i5); + if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Gale - Airplane - block goal does not load chunks - if this block isn't loaded, continue - if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) { + if (this.mob.isWithinHome(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) { this.blockPos = mutableBlockPos; this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper diff --git a/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch b/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch index cc1e7a2a..f9525f5b 100644 --- a/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch +++ b/leaf-server/minecraft-patches/features/0020-Remove-lambda-from-ticking-guard.patch @@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec757a9e9c 100644 +index 6bc70c1d53049a1f75268ab9944bfb1557ca74ee..a9c2f419200483673f6743ed94af110a8e875e71 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -784,7 +784,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -788,7 +788,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe entity.stopRiding(); } @@ -56,7 +56,7 @@ index 606dee544c669dcaa0eb02808c5786545b5519eb..f14aab66d200828952b647fa8424caec } } diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index a2513f58d6a19aef1f43fb120f6d78e53a3b129b..9e72ed6ed0c5acb69f23652dce473e914455c412 100644 +index 19a9b37bad1d465440047cbde9a00b12ba5d9a4b..b62ee276e2176da439ac2f4da4501861da746004 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -1489,10 +1489,10 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch b/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch index 7c711e3d..6167db18 100644 --- a/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch +++ b/leaf-server/minecraft-patches/features/0022-Make-book-writing-configurable.patch @@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this functionality before additional exploits are found. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9041830c19e2899479e1519488faba5c416ccd88..3c5b1cf6d47738d232282abe7f7f24c40b7bb387 100644 +index aeb43902a09ef9c1b137964065780be3e87648f4..383652f0bd32fca3551db85fb6ac42a0e326836e 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1225,6 +1225,11 @@ public class ServerGamePacketListenerImpl +@@ -1255,6 +1255,11 @@ public class ServerGamePacketListenerImpl @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch b/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch index 895a2ca0..fcd3b6e1 100644 --- a/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch +++ b/leaf-server/minecraft-patches/features/0023-Reduce-in-wall-checks.patch @@ -28,10 +28,10 @@ but is so much cheaper than the suffocation check that it's worth keeping it. diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee4b2705f6 100644 +index e174c7b8c637e6983cf0778e6956d8d11e9cd7d1..dc7d53e93a49297e3a5e1204025b3a50e73fba4e 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -419,7 +419,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -433,7 +433,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) { boolean flag = this instanceof Player; @@ -43,7 +43,7 @@ index f019571b4b6b5e2d1953030911449a02e459591c..85759f8fe3892e0af3cbbd836defc9ee this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F); } else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) { double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone(); -@@ -1367,6 +1370,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1399,6 +1402,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return this.getHealth() <= 0.0F; } diff --git a/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch b/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch index 4fb57e07..cdefde85 100644 --- a/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch +++ b/leaf-server/minecraft-patches/features/0026-Make-saving-fireworks-configurable.patch @@ -20,10 +20,10 @@ launcher can very easily fill a chunk. Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case. diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index e0e193078e550225e163149638bf9e053c0531f8..70197071db4e46cd93579d92ff2f8aa7a49083cb 100644 +index d8dc196ef92e97f831cf97cd1536a46f81f9d5d1..8d29c5c7f651176639363f5227a386679f5b67f3 100644 --- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -@@ -354,4 +354,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -350,4 +350,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { double d1 = entity.position().z - this.position().z; return DoubleDoubleImmutablePair.of(d, d1); } diff --git a/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch b/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch index f269e436..d92a9d39 100644 --- a/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch +++ b/leaf-server/minecraft-patches/features/0027-Reduce-hopper-item-checks.patch @@ -17,10 +17,10 @@ Licensed under: MIT (https://opensource.org/licenses/MIT) Only do an item "suck in" action once per second diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb2272e06b 100644 +index a29860af4c37b2b45df49f9ba18f7e38921dfb02..7afdccf04e2239b0654e8f1ce7b7e22c39d84f44 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -150,7 +150,13 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -140,7 +140,13 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause @@ -34,7 +34,7 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb } // Paper end - EAR 2 -@@ -234,9 +240,31 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -224,9 +230,31 @@ public class ItemEntity extends Entity implements TraceableEntity { } // CraftBukkit end this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause @@ -67,10 +67,10 @@ index 6c0ebfb2be4e8b884456a2aa3d5fdc87e45a0e3c..bf2f81232ac40218c6d0241b7a0a26cb @Override public BlockPos getBlockPosBelowThatAffectsMyMovement() { diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java -index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb62409e5a8943 100644 +index 41a6ec508a10a49a37539d2f10171d15c233b280..fb099517927f3c2699a348ea7692772c5420b8d1 100644 --- a/net/minecraft/world/entity/vehicle/MinecartHopper.java +++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java -@@ -22,6 +22,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -23,6 +23,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper private static final boolean DEFAULT_ENABLED = true; private boolean enabled = true; private boolean consumedItemThisFrame = false; @@ -78,7 +78,7 @@ index a56d9cdeb6589a053ffaaf2cd599a98ae0a0989a..df5eda70d1d2eafcd32606fb93bb6240 public MinecartHopper(EntityType entityType, Level level) { super(entityType, level); -@@ -150,4 +151,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -151,4 +152,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper } // Paper end @@ -105,7 +105,7 @@ index 484c2ba2752fbf3ad929e46c2f078e906f6f0637..6ced5a7e27703a7cf5a7495dc3a1a290 double getLevelY(); diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 15d4f60942c0cc612c1468b4c0fda886867a67cb..c2c7832fbb207ecfd23c7a086ef72db9648f48f9 100644 +index 800b7e78ae989868ed0b9e060c80dcd002759412..2a49f65a2ea13414099b636f463239ced4fbb5f6 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -544,7 +544,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch b/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch index 19302a20..e52c1709 100644 --- a/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch +++ b/leaf-server/minecraft-patches/features/0029-Variable-entity-wake-up-duration.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java -index 602ed4c5556723e54a80ccc3481af31109d5a0a6..bdbbbc5e0c06c71584e7514623d0c8be168befd7 100644 +index eee9c41e40402e52b73f34a734b4cbdeb6cfbc22..63ff39f3db2e695c8a14b021045c17f6d3d2f23d 100644 --- a/io/papermc/paper/entity/activation/ActivationRange.java +++ b/io/papermc/paper/entity/activation/ActivationRange.java -@@ -53,27 +53,41 @@ public final class ActivationRange { +@@ -59,27 +59,41 @@ public final class ActivationRange { if (entity.activationType == ActivationType.VILLAGER) { if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) { world.wakeupInactiveRemainingVillagers--; diff --git a/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch b/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch index 6c4203db..4b6bdeec 100644 --- a/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch +++ b/leaf-server/minecraft-patches/features/0030-Do-not-process-chat-commands-before-player-has-joine.patch @@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69 100644 +index ffae3e45ba88e8b733e77b87a45cc27b9ecf8c19..684a15babe984c84703e2c6af7a461f75959312d 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -414,6 +414,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -425,6 +425,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc public boolean sentListPacket = false; public boolean supressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready // CraftBukkit end @@ -25,10 +25,10 @@ index 6f60f5e92628e744a22b3d3f83c2010d8a4661be..6d1542dc07fdf1f3384e8e6d1dacca5f public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent public @Nullable String clientBrandName = null; // Paper - Brand support diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d4ddc1bec 100644 +index 383652f0bd32fca3551db85fb6ac42a0e326836e..29466047936ed44f57cb4bcb8f1bff0bdad81827 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2399,7 +2399,7 @@ public class ServerGamePacketListenerImpl +@@ -2433,7 +2433,7 @@ public class ServerGamePacketListenerImpl this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); @@ -38,15 +38,15 @@ index 3c5b1cf6d47738d232282abe7f7f24c40b7bb387..99670d9b8450f8c5a04927a18720468d // CraftBukkit start if (sync) { diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index a0949d8256823731f6f7da30e74dfd0205dde380..2c025382d041c43486ae975a3f687bc4cddf8d62 100644 +index 898d9ab963a6cf1db8edf4657a65335d15f271c4..8017266123a91e5bd46ae0d39a35cf2e6cbb390f 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -334,6 +334,8 @@ public abstract class PlayerList { - return; - } +@@ -335,6 +335,8 @@ public abstract class PlayerList { + return; + } + player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined + - final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); + final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); - if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure + if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure diff --git a/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch b/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch index 0b132f1b..cc94aa67 100644 --- a/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch +++ b/leaf-server/minecraft-patches/features/0031-Do-not-log-invalid-statistics.patch @@ -13,28 +13,31 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/stats/ServerStatsCounter.java b/net/minecraft/stats/ServerStatsCounter.java -index b147df7479da03fae19294587cded62c210ea590..dfaead7716ac718bcdbf4c3021aed1b57676af50 100644 +index 16e06085ed3c0f6a0b35c730b63b75824f44a905..195ff539c9cb4b2a0640555fc4b59df39e06c90d 100644 --- a/net/minecraft/stats/ServerStatsCounter.java +++ b/net/minecraft/stats/ServerStatsCounter.java -@@ -117,16 +117,18 @@ public class ServerStatsCounter extends StatsCounter { - this.stats - .putAll( - STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap()) -- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string)) -+ .resultOrPartial(string -> { -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics -+ }) - .orElse(Map.of()) - ); - return; - } - +@@ -108,7 +108,7 @@ public class ServerStatsCounter extends StatsCounter { + try { + JsonElement jsonElement = StrictJsonParser.parse(json); + if (jsonElement.isJsonNull()) { - LOGGER.error("Unable to parse Stat data from {}", this.file); -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file); // Gale - EMC - do not log invalid statistics ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file); + return; } - } catch (IOException | JsonParseException var8) { -- LOGGER.error("Unable to parse Stat data from {}", this.file, var8); -+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var8); // Gale - EMC - do not log invalid statistics + +@@ -117,11 +117,13 @@ public class ServerStatsCounter extends StatsCounter { + this.stats + .putAll( + STATS_CODEC.parse(dynamic.get("stats").orElseEmptyMap()) +- .resultOrPartial(string -> LOGGER.error("Failed to parse statistics for {}: {}", this.file, string)) ++ .resultOrPartial(string -> { ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Failed to parse statistics for {}: {}", this.file, string); // Gale - EMC - do not log invalid statistics ++ }) + .orElse(Map.of()) + ); + } catch (JsonParseException var5) { +- LOGGER.error("Unable to parse Stat data from {}", this.file, var5); ++ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.invalidStatistics) LOGGER.error("Unable to parse Stat data from {}", this.file, var5); } } diff --git a/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch b/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch index ae1a99da..b337d1d7 100644 --- a/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch +++ b/leaf-server/minecraft-patches/features/0032-Do-not-log-empty-message-warnings.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 99670d9b8450f8c5a04927a18720468d4ddc1bec..c06d9ae722455cd2315097b2b0333d2adb51f9ad 100644 +index 29466047936ed44f57cb4bcb8f1bff0bdad81827..767dfc71ad9aafffa01ed27fdeac2c19bbba6f37 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2481,7 +2481,7 @@ public class ServerGamePacketListenerImpl +@@ -2515,7 +2515,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit start String rawMessage = message.signedContent(); if (rawMessage.isEmpty()) { diff --git a/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch b/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch index 7d9c06a7..59a14d2e 100644 --- a/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch +++ b/leaf-server/minecraft-patches/features/0033-Do-not-log-ignored-advancements.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/PlayerAdvancements.java b/net/minecraft/server/PlayerAdvancements.java -index 52e0ae233a7b1c88bfbbc27707ef5f18453ec865..741894ed6df81fce41d9f906d6198d038aab44a8 100644 +index fdeca41d40705f28864ce4443d01cd872c9d51b0..63c32ae544d87177c9b3e1f1b73eeb9be904eebf 100644 --- a/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java -@@ -148,7 +148,7 @@ public class PlayerAdvancements { +@@ -147,7 +147,7 @@ public class PlayerAdvancements { AdvancementHolder advancementHolder = advancementManager.get(path); if (advancementHolder == null) { if (!path.getNamespace().equals(ResourceLocation.DEFAULT_NAMESPACE)) return; // CraftBukkit diff --git a/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch b/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch index 30e52b66..8a366998 100644 --- a/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch +++ b/leaf-server/minecraft-patches/features/0035-Do-not-log-unrecognized-recipes.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/stats/ServerRecipeBook.java b/net/minecraft/stats/ServerRecipeBook.java -index 2158b20458de63897131db3d425d1efcc358cace..40944806284921bd084901c94595fefa78b2c20b 100644 +index 7e1a06b97ab0c744e910df1c82454ce5686c1870..5e12e021d6e3b01f0d209c23255fab0a232f69cb 100644 --- a/net/minecraft/stats/ServerRecipeBook.java +++ b/net/minecraft/stats/ServerRecipeBook.java -@@ -133,7 +133,7 @@ public class ServerRecipeBook extends RecipeBook { +@@ -102,7 +102,7 @@ public class ServerRecipeBook extends RecipeBook { private void loadRecipes(List>> recipes, Consumer>> output, Predicate>> isRecognized) { for (ResourceKey> resourceKey : recipes) { if (!isRecognized.test(resourceKey)) { diff --git a/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch b/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch index be2fe680..fdc2b986 100644 --- a/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch +++ b/leaf-server/minecraft-patches/features/0037-Do-not-log-Not-Secure-marker.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 2c025382d041c43486ae975a3f687bc4cddf8d62..2a4e52ba074dfd6dce98669282de729eae7d272a 100644 +index 8017266123a91e5bd46ae0d39a35cf2e6cbb390f..c5ab58c890c7c55f2ad75560269663d3fd5a6aa3 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1278,7 +1278,7 @@ public abstract class PlayerList { +@@ -1274,7 +1274,7 @@ public abstract class PlayerList { public void broadcastChatMessage(PlayerChatMessage message, Predicate shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function unsignedFunction) { // Paper end boolean flag = this.verifyChatTrusted(message); diff --git a/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch b/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch index 91ac3100..3873ff46 100644 --- a/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch +++ b/leaf-server/minecraft-patches/features/0044-Make-arrow-movement-resetting-despawn-counter-config.patch @@ -42,10 +42,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java -index 595cdb7d013eb0b9282b133a22f51ee865d18623..b8f04b98d2117cfb274a5888d34b9836d3390ae9 100644 +index 11adb3eacce9d46f15e6c5216e9b2494df158baf..fe738894f82480c6a7c2ff8fde895daaa0ba8bc6 100644 --- a/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -352,7 +352,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -349,7 +349,7 @@ public abstract class AbstractArrow extends Projectile { this.setInGround(false); Vec3 deltaMovement = this.getDeltaMovement(); this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F)); diff --git a/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch b/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch index 7bd5bede..ac0198c5 100644 --- a/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch +++ b/leaf-server/minecraft-patches/features/0045-Make-logging-login-locations-configurable.patch @@ -13,20 +13,20 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 2a4e52ba074dfd6dce98669282de729eae7d272a..be324f5085c1cceb3d4c37bc73d0ee5ac761a99c 100644 +index c5ab58c890c7c55f2ad75560269663d3fd5a6aa3..186e0a6e565d29572f5d4771a68e4a9cb2bd45de 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -402,7 +402,13 @@ public abstract class PlayerList { - scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); - } - // Paper end - Configurable player collision +@@ -403,7 +403,13 @@ public abstract class PlayerList { + scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); + } + // Paper end - Configurable player collision + if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable - PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); + PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); + // Gale start - JettPack - make logging login location configurable + } else { + PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), loggableAddress, player.getId()); + } + // Gale end - JettPack - make logging login location configurable - // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead - if (player.isDeadOrDying()) { - net.minecraft.core.Holder plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME) + // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead + if (player.isDeadOrDying()) { + net.minecraft.core.Holder plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME) diff --git a/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch b/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch index 180ecf90..826f0912 100644 --- a/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch +++ b/leaf-server/minecraft-patches/features/0046-Reduce-array-allocations.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70d1e2294b 100644 +index b2bcfb3557a0326fd7ec1059f95d6da4568dfd80..fee4a7452178c274eb835d758b718d8e874d79d0 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java -@@ -378,7 +378,6 @@ public final class ChunkEntitySlices { +@@ -400,7 +400,6 @@ public final class ChunkEntitySlices { private static final class BasicEntityList { @@ -24,7 +24,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70 private static final int DEFAULT_CAPACITY = 4; private E[] storage; -@@ -389,7 +388,7 @@ public final class ChunkEntitySlices { +@@ -411,7 +410,7 @@ public final class ChunkEntitySlices { } public BasicEntityList(final int cap) { @@ -33,7 +33,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..7b686d834e4eb36be5758b0e0a846a70 } public boolean isEmpty() { -@@ -401,7 +400,7 @@ public final class ChunkEntitySlices { +@@ -423,7 +422,7 @@ public final class ChunkEntitySlices { } private void resize() { @@ -125,11 +125,24 @@ index 8ef16f98996b1ec0c9c3f158248ac95f1b07328f..6780b2493d625603b74e635c4996bb83 private static final Codec PRIMITIVE_ARG_CODEC = ExtraCodecs.JAVA.validate(TranslatableContents::filterAllowedArguments); private static final Codec ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC) .xmap( +diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java +index 5df8ee3955593e70f0e67e91431e464d177bdeeb..b7581796dda77bca66c03e421f2a83a920f44ef1 100644 +--- a/net/minecraft/server/level/ServerEntity.java ++++ b/net/minecraft/server/level/ServerEntity.java +@@ -366,7 +366,7 @@ public class ServerEntity { + if (this.entity instanceof LivingEntity livingEntityx) { + List> list = Lists.newArrayList(); + +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = livingEntityx.getItemBySlot(equipmentSlot); + if (!itemBySlot.isEmpty()) { + list.add(Pair.of(equipmentSlot, itemBySlot.copy())); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f11f39eee 100644 +index a9c2f419200483673f6743ed94af110a8e875e71..617eb1b9d30d499124576c5d7cb5152571cc6b84 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1220,7 +1220,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1228,7 +1228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public static List getCurrentlyTickingEntities() { Entity ticking = currentlyTickingEntity.get(); @@ -138,11 +151,24 @@ index f14aab66d200828952b647fa8424caec757a9e9c..4da7c02024a5ad8ba34bad2adfd8228f return ret; } +diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java +index 684a15babe984c84703e2c6af7a461f75959312d..3b08bf99de48b7af7c91de4b7448231ebe6819ae 100644 +--- a/net/minecraft/server/level/ServerPlayer.java ++++ b/net/minecraft/server/level/ServerPlayer.java +@@ -1102,7 +1102,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc + this.getInventory().getNonEquipmentItems().set(i, net.minecraft.world.item.ItemStack.EMPTY); + } + } +- for (final EquipmentSlot value : EquipmentSlot.VALUES) { ++ for (final EquipmentSlot value : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + if (this.getInventory().equipment.has(value) && !shouldKeepDeathEventItem(event, this.getInventory().equipment.get(value))) { + this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY); + } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c06d9ae722455cd2315097b2b0333d2adb51f9ad..68368928035ffa8fb7b12a7e3c6a7f9686379933 100644 +index 767dfc71ad9aafffa01ed27fdeac2c19bbba6f37..a94df4a0f5730f154abd9ed788d7613d3b08de03 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2771,7 +2771,7 @@ public class ServerGamePacketListenerImpl +@@ -2784,7 +2784,7 @@ public class ServerGamePacketListenerImpl // SPIGOT-7136 - Allays if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.horse.AbstractHorse) { // Paper - Fix horse armor desync ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket( @@ -177,6 +203,32 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..5c1103ef028e5ffe6ce0eadc861dd3b2 private final int size; public ZeroBitStorage(int size) { +diff --git a/net/minecraft/world/entity/ConversionType.java b/net/minecraft/world/entity/ConversionType.java +index 3eea236bd1fd401fefdf7c5cc553a3db335029c7..3739272cbc73b7c4f15a2fbe874905cf06175f64 100644 +--- a/net/minecraft/world/entity/ConversionType.java ++++ b/net/minecraft/world/entity/ConversionType.java +@@ -37,7 +37,7 @@ public enum ConversionType { + } + + if (conversionParams.keepEquipment()) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = oldMob.getItemBySlot(equipmentSlot); + if (!itemBySlot.isEmpty()) { + newMob.setItemSlot(equipmentSlot, itemBySlot.copyAndClear()); +diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java +index 96ff8384beabdfd471579d4626ce89d5587b0a35..6714668563e3a7543765064d9824b93ec3924473 100644 +--- a/net/minecraft/world/entity/Entity.java ++++ b/net/minecraft/world/entity/Entity.java +@@ -3077,7 +3077,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + private boolean attemptToShearEquipment(Player player, InteractionHand hand, ItemStack stack, Mob mob) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + ItemStack itemBySlot = mob.getItemBySlot(equipmentSlot); + Equippable equippable = itemBySlot.get(DataComponents.EQUIPPABLE); + if (equippable != null diff --git a/net/minecraft/world/entity/EquipmentSlot.java b/net/minecraft/world/entity/EquipmentSlot.java index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cbaf184e6e 100644 --- a/net/minecraft/world/entity/EquipmentSlot.java @@ -198,7 +250,7 @@ index 0e44397c9d53ff30a96c9e8e392a363fa9ae0c55..dbf31389f0e9796c80afbffddf6a20cb private final EquipmentSlot.Type type; private final int index; diff --git a/net/minecraft/world/entity/EquipmentSlotGroup.java b/net/minecraft/world/entity/EquipmentSlotGroup.java -index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..4e847c3f9d761da5dda11dec60582d9d9e630b37 100644 +index 381e0a1c0af7e339713ed1df1c2f21121c1bbd0f..1ebcab2ee9898a618ad76b18491be19859629192 100644 --- a/net/minecraft/world/entity/EquipmentSlotGroup.java +++ b/net/minecraft/world/entity/EquipmentSlotGroup.java @@ -24,6 +24,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable BY_ID = ByIdMap.continuous( equipmentSlotGroup -> equipmentSlotGroup.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO ); +@@ -38,7 +39,7 @@ public enum EquipmentSlotGroup implements StringRepresentable, Iterable lootTable, Map createForAllSlots(float dropChance) { +- return createForAllSlots(List.of(EquipmentSlot.values()), dropChance); ++ return createForAllSlots(List.of(EquipmentSlot.VALUES_ARRAY), dropChance); // Gale - JettPack - reduce array allocations + } + + private static Map createForAllSlots(List equipmentSlots, float dropChance) { diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 24ecca78dc1140b6fc47d59f2acefca6bc2b0220..18bddc3db6f0e06f1811f2c409f207db2f462f63 100644 +index cf283389d9263ba29720bf296a778be9eaf308a7..8803c03846828b532bd2b6e164c589995907c96b 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -1173,7 +1173,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -1153,7 +1153,7 @@ public final class ItemStack implements DataComponentHolder { private void addAttributeTooltips(Consumer tooltipAdder, TooltipDisplay tooltipDisplay, @Nullable Player player) { if (tooltipDisplay.shows(DataComponents.ATTRIBUTE_MODIFIERS)) { - for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.values()) { + for (EquipmentSlotGroup equipmentSlotGroup : EquipmentSlotGroup.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations MutableBoolean mutableBoolean = new MutableBoolean(true); - this.forEachModifier(equipmentSlotGroup, (attribute, modifier) -> { - if (mutableBoolean.isTrue()) { + this.forEachModifier( + equipmentSlotGroup, diff --git a/net/minecraft/world/item/crafting/ShapedRecipePattern.java b/net/minecraft/world/item/crafting/ShapedRecipePattern.java index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1824d5801 100644 --- a/net/minecraft/world/item/crafting/ShapedRecipePattern.java @@ -236,10 +310,10 @@ index bfda76974ea8d4397e2c2ebf5bdcb5d7e5f0bab5..cabbc93409ca99180d115e2f23419ee1 String[] strings = new String[pattern.size() - i3 - i2]; diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b63447ea96 100644 +index b62ee276e2176da439ac2f4da4501861da746004..97d227249405c8648b8b5e9bcca5a3f202f7b903 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -1832,7 +1832,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1825,7 +1825,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) { ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ); if (slices == null) { @@ -248,7 +322,7 @@ index 9e72ed6ed0c5acb69f23652dce473e914455c412..439b8619e9f0ed3dc1974ba2ee6214b6 } List ret = new java.util.ArrayList<>(); -@@ -1843,7 +1843,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -1836,7 +1836,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl } } @@ -289,7 +363,7 @@ index a647d76d365a60b95a3eb7927ac426bf70d417f3..7977ecd013c55359f179b4b7f895099b @Override diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd04c11319 100644 +index 36a72a11d28f99bfe85868461925b778cc01478e..ca2cab797fc16f0961ce994fcb45029589b3c370 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -44,7 +44,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -301,3 +375,16 @@ index c5b3b5e5f621f8db152aa190374ae0fe567d6828..f6c3dac2a2a17760ab7015fe75c5a4dd private static final int[] SLOTS_FOR_DOWN = new int[]{2, 1}; private static final int[] SLOTS_FOR_SIDES = new int[]{1}; public static final int DATA_LIT_DURATION = 1; +diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +index c8f23011a8942a5be970c606f67142cbd202b97e..98971a07757d29d6926a0aa05f229b8020af42b6 100644 +--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java ++++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +@@ -258,7 +258,7 @@ public class MapItemSavedData extends SavedData { + } + + private static boolean hasMapInvisibilityItemEquipped(Player player) { +- for (EquipmentSlot equipmentSlot : EquipmentSlot.values()) { ++ for (EquipmentSlot equipmentSlot : EquipmentSlot.VALUES_ARRAY) { // Gale - JettPack - reduce array allocations + if (equipmentSlot != EquipmentSlot.MAINHAND + && equipmentSlot != EquipmentSlot.OFFHAND + && player.getItemBySlot(equipmentSlot).is(ItemTags.MAP_INVISIBILITY_EQUIPMENT)) { diff --git a/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch b/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch index 271b77b8..eec9b97c 100644 --- a/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch +++ b/leaf-server/minecraft-patches/features/0047-Optimize-sun-burn-tick.patch @@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4b390f292 100644 +index 6714668563e3a7543765064d9824b93ec3924473..147b57bec7646eda5b9f3b1119ce7b9dfd7c328c 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2017,10 +2017,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2087,10 +2087,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @Deprecated public float getLightLevelDependentMagicValue() { @@ -39,10 +39,10 @@ index e84081f571190fc00db07bdc9da349b9cfae142a..90f80877f25fd10a62d6ed273aa2ebb4 public void absSnapTo(double x, double y, double z, float yRot, float xRot) { this.absSnapTo(x, y, z); diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 7f5981f71e6380c09e40a0c80db6a77e74d5113d..6cc000611dc58a5487034ad87af4156059dd37d7 100644 +index 4d4b58b684ca115f4d8f672362d4c8252ef9481a..dcea538d00d3751b887c71450026ce2ced0093b1 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -1474,20 +1474,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1500,20 +1500,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() { } diff --git a/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch b/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch index fd79f95c..5018a2ff 100644 --- a/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch +++ b/leaf-server/minecraft-patches/features/0049-Replace-game-rules-map-with-optimized-collection.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java -index 02bc5d83b92a594ec519f0a02b0517fdb4b9e954..a3a2d51cf53ce4dba8caaaf73967ae714ed16a36 100644 +index d5536dd40a1e9a2e05967652f690abbbca287852..966ca1e0e828e4176e12cbcf8c4a6b16489708de 100644 --- a/net/minecraft/world/level/GameRules.java +++ b/net/minecraft/world/level/GameRules.java -@@ -277,7 +277,7 @@ public class GameRules { +@@ -288,7 +288,7 @@ public class GameRules { } private GameRules(Map, GameRules.Value> rules, FeatureFlagSet enabledFeatures) { diff --git a/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch b/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch index c2c4cae2..27225a8b 100644 --- a/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch +++ b/leaf-server/minecraft-patches/features/0050-Replace-AI-attributes-with-optimized-collections.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index bed9b564c493cd84bf53fc49368fda736f3fbc2b..c61071e0019a18eb73223ed9b64619c9cb691896 100644 +index fdb02fc40579866167e8cc9bcefbd961588b53a6..58d8424262db14b2dca0b2c5a40748b6c0c18e83 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -@@ -14,9 +14,11 @@ import net.minecraft.nbt.ListTag; +@@ -14,9 +14,11 @@ import net.minecraft.core.Holder; import net.minecraft.resources.ResourceLocation; public class AttributeMap { diff --git a/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch b/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch index b695ab4c..b4fad295 100644 --- a/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch +++ b/leaf-server/minecraft-patches/features/0059-Check-frozen-ticks-before-landing-block.patch @@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric) Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html) diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc 100644 +index dc7d53e93a49297e3a5e1204025b3a50e73fba4e..586b79bc844b098336c6d3bf342b570396e6af88 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -521,10 +521,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -535,10 +535,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } protected void tryAddFrost() { @@ -28,7 +28,7 @@ index 85759f8fe3892e0af3cbbd836defc9ee4b2705f6..a542e1dfa41ec2ea1a979dc27d0155d5 if (attribute == null) { return; } -@@ -532,7 +531,6 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -546,7 +545,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin float f = -0.05F * this.getPercentFrozen(); attribute.addTransientModifier(new AttributeModifier(SPEED_MODIFIER_POWDER_SNOW_ID, f, AttributeModifier.Operation.ADD_VALUE)); } diff --git a/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch b/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch index 99bab90a..d23bd021 100644 --- a/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch +++ b/leaf-server/minecraft-patches/features/0060-Faster-chunk-serialization.patch @@ -88,10 +88,10 @@ index 5c1103ef028e5ffe6ce0eadc861dd3b2c8f3ed9f..828ced8aa5665c6f5d0b121947719c4e + @Override public void compact(net.minecraft.world.level.chunk.Palette srcPalette, net.minecraft.world.level.chunk.Palette dstPalette, short[] out) {} // Gale - Lithium - faster chunk serialization } diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java -index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f7a020da5 100644 +index a251ba67644cd02a0b00d7c8b0e2c64aa5e26291..59d48e7dc0911557c57a7e07f5f9013c010165bd 100644 --- a/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -25,6 +25,22 @@ import net.minecraft.util.ThreadingDetector; +@@ -24,6 +24,22 @@ import net.minecraft.util.ThreadingDetector; import net.minecraft.util.ZeroBitStorage; public class PalettedContainer implements PaletteResize, PalettedContainerRO { @@ -114,7 +114,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f private static final int MIN_PALETTE_BITS = 0; private final PaletteResize dummyPaletteResize = (bits, objectAdded) -> 0; public final IdMap registry; -@@ -344,28 +360,54 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -343,28 +359,54 @@ public class PalettedContainer implements PaletteResize, PalettedContainer public synchronized PalettedContainerRO.PackedData pack(IdMap registry, PalettedContainer.Strategy strategy) { // Paper - synchronize this.acquire(); @@ -184,7 +184,7 @@ index 7da7ce0fd19896593e63edc88b492c02f926bba0..f6bb9bd4d000958610ec3e6733b54c5f } private static void swapPalette(int[] bits, IntUnaryOperator operator) { -@@ -405,13 +447,33 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -404,13 +446,33 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @Override public void count(PalettedContainer.CountConsumer countConsumer) { diff --git a/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch b/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch index ca65b368..bd8bcd23 100644 --- a/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch +++ b/leaf-server/minecraft-patches/features/0063-Skip-entity-move-if-movement-is-zero.patch @@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c39f51ab2b 100644 +index 147b57bec7646eda5b9f3b1119ce7b9dfd7c328c..cb444ab1a3bef2ee5544b99dd513229a1aae4b84 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -240,6 +240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -260,6 +260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public float yRotO; public float xRotO; private AABB bb = INITIAL_AABB; @@ -24,7 +24,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3 public boolean onGround; public boolean horizontalCollision; public boolean verticalCollision; -@@ -1064,6 +1065,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1086,6 +1087,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper end - detailed watchdog information public void move(MoverType type, Vec3 movement) { @@ -36,7 +36,7 @@ index 90f80877f25fd10a62d6ed273aa2ebb4b390f292..c0a75b84360cdaf89bb23380210de7c3 final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity // Paper start - detailed watchdog information ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); -@@ -4155,6 +4161,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4376,6 +4382,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public final void setBoundingBox(AABB bb) { diff --git a/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch b/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch index 18fa2c99..4a989f55 100644 --- a/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch +++ b/leaf-server/minecraft-patches/features/0068-Hide-flames-on-entities-with-fire-resistance.patch @@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice) Licensed under: MIT (https://opensource.org/licenses/MIT) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index c0a75b84360cdaf89bb23380210de7c39f51ab2b..e7c9b51a115d975ea4a6aaa8e051ac7daf58395e 100644 +index cb444ab1a3bef2ee5544b99dd513229a1aae4b84..ffdeaab1fa7540eddea5997d9ab1eb6faddb7128 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -864,7 +864,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -886,7 +886,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.checkBelowWorld(); if (!this.level().isClientSide) { diff --git a/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch b/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch index bdbbd494..15a83d16 100644 --- a/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch +++ b/leaf-server/minecraft-patches/features/0070-Reduce-block-destruction-packet-allocations.patch @@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fbfbf57c22 100644 +index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe916586868a519ed 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -1557,6 +1557,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1579,6 +1579,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public void destroyBlockProgress(int breakerId, BlockPos pos, int progress) { @@ -32,7 +32,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb // CraftBukkit start Player breakerPlayer = null; Entity entity = this.getEntity(breakerId); -@@ -1573,7 +1582,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1595,7 +1604,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe .callEvent(); } // Paper end - Add BlockBreakProgressUpdateEvent @@ -41,7 +41,7 @@ index 4da7c02024a5ad8ba34bad2adfd8228f11f39eee..d99ac6eb59e10ff6af841c4496ee46fb if (serverPlayer != null && serverPlayer.level() == this && serverPlayer.getId() != breakerId) { double d = pos.getX() - serverPlayer.getX(); double d1 = pos.getY() - serverPlayer.getY(); -@@ -1584,7 +1593,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -1606,7 +1615,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } // CraftBukkit end if (d * d + d1 * d1 + d2 * d2 < 1024.0) { diff --git a/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch b/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch index 586228b5..da79e576 100644 --- a/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch +++ b/leaf-server/minecraft-patches/features/0071-Spread-out-sending-all-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b26a480fee 100644 +index 186e0a6e565d29572f5d4771a68e4a9cb2bd45de..91d4a5f7685296e397c1c341813542fd13eaf168 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -114,6 +114,7 @@ public abstract class PlayerList { +@@ -113,6 +113,7 @@ public abstract class PlayerList { private final MinecraftServer server; public final List players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety private final Map playersByUUID = Maps.newHashMap(); @@ -48,15 +48,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 private final UserBanList bans = new UserBanList(USERBANLIST_FILE); private final IpBanList ipBans = new IpBanList(IPBANLIST_FILE); private final ServerOpList ops = new ServerOpList(OPLIST_FILE); -@@ -311,6 +312,7 @@ public abstract class PlayerList { - this.players.add(player); - this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot - this.playersByUUID.put(player.getUUID(), player); -+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info - // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below - // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks - player.supressTrackerForLogin = true; -@@ -582,6 +584,7 @@ public abstract class PlayerList { +@@ -312,6 +313,7 @@ public abstract class PlayerList { + this.players.add(player); + this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot + this.playersByUUID.put(player.getUUID(), player); ++ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info + // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below + // Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks + player.supressTrackerForLogin = true; +@@ -585,6 +587,7 @@ public abstract class PlayerList { player.getAdvancements().stopListening(); this.players.remove(player); this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot @@ -64,15 +64,15 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 this.server.getCustomBossEvents().onPlayerDisconnect(player); UUID uuid = player.getUUID(); ServerPlayer serverPlayer = this.playersByUUID.get(uuid); -@@ -724,6 +727,7 @@ public abstract class PlayerList { +@@ -720,6 +723,7 @@ public abstract class PlayerList { player.stopRiding(); // CraftBukkit this.players.remove(player); this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot + this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info - player.serverLevel().removePlayerImmediately(player, reason); + player.level().removePlayerImmediately(player, reason); // TeleportTransition teleportTransition = player.findRespawnPositionAndUseSpawnBlock(!keepInventory, TeleportTransition.DO_NOTHING); // ServerLevel level = teleportTransition.newLevel(); -@@ -802,6 +806,7 @@ public abstract class PlayerList { +@@ -798,6 +802,7 @@ public abstract class PlayerList { this.players.add(serverPlayer); this.playersByName.put(serverPlayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT), serverPlayer); // Spigot this.playersByUUID.put(serverPlayer.getUUID(), serverPlayer); @@ -80,7 +80,7 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 } // serverPlayer.initInventoryMenu(); serverPlayer.setHealth(serverPlayer.getHealth()); -@@ -904,18 +909,58 @@ public abstract class PlayerList { +@@ -900,18 +905,58 @@ public abstract class PlayerList { } public void tick() { @@ -145,16 +145,16 @@ index be324f5085c1cceb3d4c37bc73d0ee5ac761a99c..1ea70e63db1d5f05cdbace8be48160b2 public void broadcastAll(Packet packet, net.minecraft.world.entity.player.Player entityhuman) { for (ServerPlayer entityplayer : this.players) { // Paper - replace for i with for each for thread safety diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 248ee263a853d1d3148746a63ba422115853f6a1..8032eae3256625e90313edb4fa132b19d52ba0a0 100644 +index abb19f08c736151fa5c6986e31eb4cf545073586..5e01ae7c5d11777868d72589019ad11305c9acdd 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -221,9 +221,12 @@ public abstract class Player extends LivingEntity { +@@ -230,9 +230,12 @@ public abstract class Player extends LivingEntity { } // CraftBukkit end + public final int sendAllPlayerInfoBucketIndex; // Gale - Purpur - spread out sending all player info + - public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) { + public Player(Level level, GameProfile gameProfile) { super(EntityType.PLAYER, level); this.setUUID(gameProfile.getId()); + this.sendAllPlayerInfoBucketIndex = Math.floorMod(this.uuid.hashCode(), net.minecraft.server.players.PlayerList.SEND_PLAYER_INFO_INTERVAL); // Gale - Purpur - spread out sending all player info diff --git a/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch b/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch index 278fe12e..9f290372 100644 --- a/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch +++ b/leaf-server/minecraft-patches/features/0072-Optimize-player-list-for-sending-player-info.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 1ea70e63db1d5f05cdbace8be48160b26a480fee..4a3f06a4677348c1277669514f9acef7a4334f1d 100644 +index 91d4a5f7685296e397c1c341813542fd13eaf168..8e7c77174750807bc0e925b100ff73a7bedd76e9 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -913,10 +913,19 @@ public abstract class PlayerList { +@@ -909,10 +909,19 @@ public abstract class PlayerList { ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn]; if (sendAllPlayerInfoBucket != null) { diff --git a/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch b/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch index c9f8a4a5..8bd095f3 100644 --- a/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch +++ b/leaf-server/minecraft-patches/features/0073-Skip-PlayerCommandSendEvent-if-there-are-no-listener.patch @@ -37,22 +37,22 @@ 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 f1a637272a8e4ec9c46209ca6b58a4905c925a86..006b5502eda66909a971278aa5751ec187bb8a3c 100644 +index b9b049e025de5393fa4ef6555f5900a7b5b2f032..189cba4369a029713bb3b0cdc77d5c103c6cd852 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -496,6 +496,7 @@ public class Commands { - private void runSync(ServerPlayer player, java.util.Collection bukkit, RootCommandNode rootCommandNode) { +@@ -531,6 +531,7 @@ public class Commands { + private void runSync(ServerPlayer player, java.util.Collection 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 + if (org.bukkit.event.player.PlayerCommandSendEvent.getHandlerList().getRegisteredListeners().length > 0) { // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners 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 { +@@ -541,6 +542,7 @@ public class Commands { } } // CraftBukkit end + } // Gale - Purpur - skip PlayerCommandSendEvent if there are no listeners - - player.connection.send(new ClientboundCommandsPacket(rootCommandNode)); + player.connection.send(new ClientboundCommandsPacket(rootCommandNode, COMMAND_NODE_INSPECTOR)); } + 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 fe676a4b..36ef37d1 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,10 +37,10 @@ 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 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c803bb1223a 100644 +index dd3841c06a386c0d6dc641fe2573d3fb0733504d..0ff225163b3d95b51b851c7e16bd994453cc2d0e 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -40,6 +40,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -42,6 +42,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack private long keepAliveChallenge; private long closedListenerTime; private boolean closed = false; @@ -48,7 +48,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 private int latency; private volatile boolean suspendFlushingOnServerThread = false; // CraftBukkit start -@@ -48,7 +49,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -50,7 +51,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack public boolean processedDisconnect; // CraftBukkit end public final java.util.Map packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks @@ -60,7 +60,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 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 -@@ -117,6 +121,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -119,6 +123,16 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { @@ -77,7 +77,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) { int i = (int)(Util.getMillis() - this.keepAliveTime); this.latency = (this.latency * 3 + i) / 4; -@@ -124,6 +138,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -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 } @@ -85,7 +85,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 } @Override -@@ -240,6 +255,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -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; @@ -107,7 +107,7 @@ index 776ff13b399fa01bf3900280cf1b5782370732a0..c4f4c21f32e2aba79e15315d73124c80 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 -@@ -253,6 +283,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -261,6 +291,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge)); } } diff --git a/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch b/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch index 35a945b0..72b85ebc 100644 --- a/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch +++ b/leaf-server/minecraft-patches/features/0077-Don-t-load-chunks-to-activate-climbing-entities.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103715b16f4 100644 +index ffdeaab1fa7540eddea5997d9ab1eb6faddb7128..cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -4665,6 +4665,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4874,6 +4874,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.inBlockState; } @@ -28,10 +28,10 @@ index e7c9b51a115d975ea4a6aaa8e051ac7daf58395e..430dec39410c4445326488b537dcd103 return this.chunkPosition; } diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc730437fe035ff 100644 +index 586b79bc844b098336c6d3bf342b570396e6af88..af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2097,8 +2097,17 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2129,8 +2129,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin public boolean onClimbableCached() { if (!this.blockPosition().equals(this.lastClimbingPosition)) { @@ -51,7 +51,7 @@ index a542e1dfa41ec2ea1a979dc27d0155d5c08fd7cc..ed96755b15e9a9d3dc05ccc8afc73043 } return this.cachedOnClimbable; -@@ -2106,11 +2115,28 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2138,11 +2147,28 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Gale end - Airplane - cache on climbable check public boolean onClimbable() { 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 e40061fd..754a95f9 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,25 +13,25 @@ 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 6d1542dc07fdf1f3384e8e6d1dacca5f8c3f0b69..13ab4a70f8208c998edeeddffea0b694d2b1347f 100644 +index 3b08bf99de48b7af7c91de4b7448231ebe6819ae..46be66df0c6c31bff75bb31c005c1c1416c034fb 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2079,12 +2079,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2117,12 +2117,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @Override public void crit(Entity entityHit) { -- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4)); +- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted -+ var level = this.serverLevel(); ++ var level = this.level(); + level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4)); -+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted ++ // Gale end - MultiPaper - broadcast crit animations as the entity being critte } @Override public void magicCrit(Entity entityHit) { -- this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5)); +- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5)); + // Gale start - MultiPaper - broadcast crit animations as the entity being critted -+ var level = this.serverLevel(); ++ var level = this.level(); + level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5)); + // Gale end - MultiPaper - broadcast crit animations as the entity being critted } diff --git a/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch b/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch index 51431019..d8a0ce04 100644 --- a/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch +++ b/leaf-server/minecraft-patches/features/0081-Do-not-place-player-in-world-if-kicked-before-being-.patch @@ -14,12 +14,12 @@ 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/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 4a3f06a4677348c1277669514f9acef7a4334f1d..d2dc48d5a42506716bcbe0854a860b1eaa3b5705 100644 +index 8e7c77174750807bc0e925b100ff73a7bedd76e9..00932be984dae86210329b92c47422c83d670bfb 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -235,6 +235,13 @@ public abstract class PlayerList { - org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation()); - this.cserver.getPluginManager().callEvent(ev); +@@ -236,6 +236,13 @@ public abstract class PlayerList { + org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new org.spigotmc.event.player.PlayerSpawnLocationEvent(spawnPlayer, spawnPlayer.getLocation()); + this.cserver.getPluginManager().callEvent(ev); + // Gale start - MultiPaper - do not place player in world if kicked before being spawned in + if (!connection.isConnected() || player.quitReason != null) { @@ -28,6 +28,6 @@ index 4a3f06a4677348c1277669514f9acef7a4334f1d..d2dc48d5a42506716bcbe0854a860b1e + } + // Gale end - MultiPaper - do not place player in world if kicked before being spawned in + - org.bukkit.Location loc = ev.getSpawnLocation(); - serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); + org.bukkit.Location loc = ev.getSpawnLocation(); + serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); diff --git a/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch b/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch index e730af9b..28fb6fcd 100644 --- a/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch +++ b/leaf-server/minecraft-patches/features/0083-5-second-TPS-average.patch @@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9..32b8613c62971bc7481d5242ee15b84cb1b361a7 100644 +index eae529b69296f4c1329907ae6bb1b0c300393b6d..8b7b0232fa176e7034be34bf12cfdb63151ae059 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1091,6 +1091,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop DATA_PLAYER_MAIN_HAND = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE); protected static final EntityDataAccessor DATA_SHOULDER_LEFT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); protected static final EntityDataAccessor DATA_SHOULDER_RIGHT = SynchedEntityData.defineId(Player.class, EntityDataSerializers.COMPOUND_TAG); @@ -56,7 +56,7 @@ index 8032eae3256625e90313edb4fa132b19d52ba0a0..2aca22f978daa826bf7ac2b25f13bf30 public static final int CLIENT_LOADED_TIMEOUT_TIME = 60; private static final short DEFAULT_SLEEP_TIMER = 0; private static final float DEFAULT_EXPERIENCE_PROGRESS = 0.0F; -@@ -322,19 +323,23 @@ public abstract class Player extends LivingEntity { +@@ -332,19 +333,23 @@ public abstract class Player extends LivingEntity { this.moveCloak(); if (this instanceof ServerPlayer serverPlayer) { this.foodData.tick(serverPlayer); diff --git a/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch b/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch index f1ccc1a9..d5dab9ac 100644 --- a/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch +++ b/leaf-server/minecraft-patches/features/0086-For-collision-check-has-physics-before-same-vehicle.patch @@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 430dec39410c4445326488b537dcd103715b16f4..4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13 100644 +index cf13f3956ddcf350e6b2ea3b34d9a2bae214cb22..09115720a4e5573960eaeeb16c96888c44e19a95 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -2161,8 +2161,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2231,8 +2231,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void push(Entity entity) { diff --git a/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch b/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch index fd41088e..0af097fd 100644 --- a/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch +++ b/leaf-server/minecraft-patches/features/0087-Skip-negligible-planar-movement-multiplication.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 4a0650cfe07bfafff46c20aeb9e78c92b7f9ca13..8508f4b94f3e4532ce36baff4e68189540b0b59a 100644 +index 09115720a4e5573960eaeeb16c96888c44e19a95..e457dc20f76d813c32225733af0b29646d501202 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1206,8 +1206,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1218,8 +1218,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } diff --git a/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch b/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch index 05a718bb..6096cc1e 100644 --- a/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch +++ b/leaf-server/minecraft-patches/features/0088-Optimize-matching-item-checks.patch @@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 18bddc3db6f0e06f1811f2c409f207db2f462f63..3ec4e0aa0777009b4ee75f6ae94732bd7e125619 100644 +index 8803c03846828b532bd2b6e164c589995907c96b..3acc2ae8533f19a6f9b2b6a1d96271f1047384a4 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -888,11 +888,11 @@ public final class ItemStack implements DataComponentHolder { +@@ -868,11 +868,11 @@ public final class ItemStack implements DataComponentHolder { } public static boolean isSameItem(ItemStack stack, ItemStack other) { 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 f4a62b56..8ce927a3 100644 --- a/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch +++ b/leaf-server/minecraft-patches/features/0091-Reduce-RandomSource-instances.patch @@ -13,7 +13,7 @@ As part of: Patina (https://github.com/PatinaMC/Patina) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/server/commands/SpreadPlayersCommand.java b/net/minecraft/server/commands/SpreadPlayersCommand.java -index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096aa298b98 100644 +index 92a820d48057ffe2ef35919341b6cdf605ca939e..b9b1bf351070cd2a744cdb683974fb2aa048d0d2 100644 --- a/net/minecraft/server/commands/SpreadPlayersCommand.java +++ b/net/minecraft/server/commands/SpreadPlayersCommand.java @@ -107,7 +107,7 @@ public class SpreadPlayersCommand { @@ -26,10 +26,10 @@ index d381800ad054be6b054dcca43fbe80d3f0c0c771..5904b9d985487ff8bd1f330667c43096 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 13ab4a70f8208c998edeeddffea0b694d2b1347f..b3ffb2afda9ea5cafbab9f775d526af1940cfdca 100644 +index 46be66df0c6c31bff75bb31c005c1c1416c034fb..274b3aba999f485ea261ef356bfc62627257974c 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -488,7 +488,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -498,7 +498,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); @@ -52,10 +52,10 @@ index 0b8d279a53196f3998b1f6901738ca8e02ef7311..9add567d2ec2f5e9cd5bee84423c5a44 } diff --git a/net/minecraft/world/entity/projectile/FishingHook.java b/net/minecraft/world/entity/projectile/FishingHook.java -index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52640c95d7 100644 +index 5f3abbe943be394e9cb987945a238208940b5015..5b831ecd8f094bcae2ff50b96ccfc0d75b43a495 100644 --- a/net/minecraft/world/entity/projectile/FishingHook.java +++ b/net/minecraft/world/entity/projectile/FishingHook.java -@@ -48,7 +48,7 @@ import org.slf4j.Logger; +@@ -51,7 +51,7 @@ import org.slf4j.Logger; public class FishingHook extends Projectile { private static final Logger LOGGER = LogUtils.getLogger(); @@ -64,7 +64,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52 private boolean biting; public int outOfWaterTime; private static final int MAX_OUT_OF_WATER_TIME = 10; -@@ -86,6 +86,7 @@ public class FishingHook extends Projectile { +@@ -90,6 +90,7 @@ public class FishingHook extends Projectile { this.minWaitTime = level.paperConfig().fishingTimeRange.minimum; this.maxWaitTime = level.paperConfig().fishingTimeRange.maximum; // Paper end - Configurable fishing time ranges @@ -73,7 +73,7 @@ index ca5cd9354d53c6c05bd7ba50c6e1dbd1ed548f67..6cfd384aea8c8e90b4e4ae08ece86d52 public FishingHook(EntityType entityType, Level level) { diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java -index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810af23febdb 100644 +index afcf185c4e2c0648c96a872fbe1fbebb6012d513..aaa990b01e886812cc1dbad819e922b23d08889c 100644 --- a/net/minecraft/world/entity/raid/Raid.java +++ b/net/minecraft/world/entity/raid/Raid.java @@ -121,7 +121,7 @@ public class Raid { @@ -104,10 +104,10 @@ index 71166fbf93d62e8e1bff3db8161932ee2fc5ea86..c7ca8a71070f15c573a5748f1df9810a for (int i3 = 0; i3 < i1; i3++) { diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 8bb0926130a14351507b2b74feca42278c080381..f7884610d5a94bb1680c1ec8bd4f3ec917b8bc8a 100644 +index c8b577a5d5f059aed368fa082bc4518cc2dbd0b0..ac5ab4ae88c8188635f5784a10002a6cdcad49b6 100644 --- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -246,7 +246,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -248,7 +248,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { } private static void spawnGatewayPortal(ServerLevel level, BlockPos pos, EndGatewayConfiguration config) { diff --git a/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch b/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch index 81fd4d23..c328a97e 100644 --- a/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch +++ b/leaf-server/minecraft-patches/features/0092-Reduce-skull-ItemStack-lookups-for-reduced-visibilit.patch @@ -18,10 +18,10 @@ this patch is focused around the sensors used for ai delete the line of sight cache less often and use a faster nearby comparison diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ed96755b15e9a9d3dc05ccc8afc730437fe035ff..befed81ecf698d27971d18fe2743562742e4e1d3 100644 +index af6633b8b3efceeb3bf101e069ddc1c65c7f6bfb..5025e1eb7be566c21b6228038fd6596f4ac53e9a 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1008,15 +1008,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1033,15 +1033,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } if (lookingEntity != null) { diff --git a/leaf-server/paper-patches/features/0001-Rebrand.patch b/leaf-server/paper-patches/features/0001-Rebrand.patch index e9666902..b2285feb 100644 --- a/leaf-server/paper-patches/features/0001-Rebrand.patch +++ b/leaf-server/paper-patches/features/0001-Rebrand.patch @@ -375,7 +375,7 @@ index 6ee39b534b8d992655bc0cef3c299d12cbae0034..f59879ae7d3c73cd4c4233d30667988b .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java -index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca627f1c65 100644 +index 74ffdc823e66fc5ec027c4b7c462382bcbfe2be2..f5302d038e4bb731075dccde4015627dc9e7b420 100644 --- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java +++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java @@ -31,6 +31,10 @@ public record ServerBuildInfoImpl( @@ -398,8 +398,8 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..5b844d2fea387f2cb655169f458ec0ca getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME) - .orElse(BRAND_PAPER_NAME), + .orElse(BRAND_LEAF_NAME), // Gale - branding changes // Leaf - Rebrand - SharedConstants.getCurrentVersion().getId(), - SharedConstants.getCurrentVersion().getName(), + SharedConstants.getCurrentVersion().id(), + SharedConstants.getCurrentVersion().name(), getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER) @@ -61,7 +65,11 @@ public record ServerBuildInfoImpl( @@ -441,10 +441,10 @@ index 1354ccfbf525e5e64483ac5f443cc2325ba63850..f6f787db016f4d1ac14648ebf2b8e162 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a287ad5cce532229f2a514956d34a9358175bc45..05823a2865565446a100e161ca3a44c972868ea7 100644 +index ff65904cf067900cd1635b6dab0b01b0fe6ef655..15a88601aaa07ce59b7096bdfc96aa517af5107f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -485,7 +485,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -491,7 +491,7 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { diff --git a/scripts/prepareRelease.sh b/scripts/prepareRelease.sh index 28233ee0..4bfbafa0 100755 --- a/scripts/prepareRelease.sh +++ b/scripts/prepareRelease.sh @@ -3,14 +3,14 @@ set -e IS_EOL=false IS_UNSUPPORTED=false -IS_DEV=false +IS_DEV=true -JAR_NAME="leaf-1.21.5" -CURRENT_TAG="ver-1.21.5" +JAR_NAME="leaf-1.21.6" +CURRENT_TAG="ver-1.21.6" RELEASE_NOTES="release_notes.md" # Rename Leaf jar -mv ./leaf-server/build/libs/leaf-paperclip-1.21.5-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar +mv ./leaf-server/build/libs/leaf-paperclip-1.21.6-R0.1-SNAPSHOT-mojmap.jar ./$JAR_NAME-${BUILD_NUMBER}.jar # Branch name CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)