From 300d3f267d55f0c5ea69650154187ff232c6d859 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:01 -0400 Subject: [PATCH] Readd Leaves: Fix vehicle teleport by end gateway --- ...-Fix-vehicle-teleport-by-end-gateway.patch | 54 +++++++++++++++++++ ...og4j-compatible-with-future-release.patch} | 0 ...Optimize-villager-data-storage.patc.patch} | 0 ...Gale-s-Optimize-sun-burn-tick.patch.patch} | 2 +- ...tch => 0039-Petal-Async-Pathfinding.patch} | 0 ...=> 0040-Petal-Multithreaded-Tracker.patch} | 0 ...duce-work-done-by-game-event-system.patch} | 0 ...r-NPE.patch => 0042-Fix-tracker-NPE.patch} | 0 ...-minecart-vehicle-collision-results.patch} | 0 ...rk.patch => 0044-Reduce-canSee-work.patch} | 0 ...tch => 0045-Faster-Natural-Spawning.patch} | 0 ...dom-for-xaeroMapServerID-generation.patch} | 0 ...-Fix-casting-in-Purpur-world-config.patch} | 0 ...tch.patch => 0048-Fix-sprint-glitch.patch} | 0 ...h => 0049-Fix-keepalive-kicked-name.patch} | 0 ...ble-movement-speed-of-more-entities.patch} | 0 ...leAppender-NPE-error-on-server-clos.patch} | 0 ...-of-futures-for-chunk-structure-gen.patch} | 0 ...e-items-finding-hopper-nearby-check.patch} | 0 ...nearPurpur-Add-Linear-region-format.patch} | 4 +- ...st-remove-all-locks-on-region-files.patch} | 0 ...issing-purpur-configuration-options.patch} | 0 ...e-missing-Pufferfish-configurations.patch} | 0 ... => 0058-Skip-event-if-no-listeners.patch} | 0 ...-Rewrite-framed-map-tracker-ticking.patch} | 0 ...-MapItem-update-if-the-map-does-not.patch} | 0 ...e-coordinate-key-used-for-nearby-pl.patch} | 0 ...SparklyPaper-Optimize-canSee-checks.patch} | 0 ...g-and-snowball-can-knockback-player.patch} | 0 ...s-method-to-fix-plugin-incompatibil.patch} | 2 +- ...getProfiler-in-PathNavigationRegion.patch} | 0 ...-when-attempting-to-locate-a-buried.patch} | 0 ...x-MC-2025.patch => 0067-Fix-MC-2025.patch} | 0 ...MC-65198.patch => 0068-Fix-MC-65198.patch} | 0 ...-172047.patch => 0069-Fix-MC-172047.patch} | 0 ...atch => 0070-Including-5s-in-getTPS.patch} | 0 ...eating-stats-json-bases-on-player-n.patch} | 0 ...2-Fix-NPE-during-creating-GUI-graph.patch} | 0 ...eption-on-missing-ResourceKey-value.patch} | 0 ...h => 0074-Improve-Purpur-AFK-system.patch} | 0 ...-Virtual-Thread-for-async-scheduler.patch} | 0 ...a-shadow-fork-that-supports-Java-21.patch} | 0 ...l.patch => 0077-Chat-Image-protocol.patch} | 0 ...l.patch => 0078-Asteor-Bar-protocol.patch} | 0 44 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 patches/server/0035-Leaves-Fix-vehicle-teleport-by-end-gateway.patch rename patches/server/{0035-Fix-Make-log4j-compatible-with-future-release.patch => 0036-Fix-Make-log4j-compatible-with-future-release.patch} (100%) rename patches/server/{0036-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch => 0037-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch} (100%) rename patches/server/{0037-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch => 0038-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch} (97%) rename patches/server/{0038-Petal-Async-Pathfinding.patch => 0039-Petal-Async-Pathfinding.patch} (100%) rename patches/server/{0039-Petal-Multithreaded-Tracker.patch => 0040-Petal-Multithreaded-Tracker.patch} (100%) rename patches/server/{0040-Petal-reduce-work-done-by-game-event-system.patch => 0041-Petal-reduce-work-done-by-game-event-system.patch} (100%) rename patches/server/{0041-Fix-tracker-NPE.patch => 0042-Fix-tracker-NPE.patch} (100%) rename patches/server/{0042-Cache-minecart-vehicle-collision-results.patch => 0043-Cache-minecart-vehicle-collision-results.patch} (100%) rename patches/server/{0043-Reduce-canSee-work.patch => 0044-Reduce-canSee-work.patch} (100%) rename patches/server/{0044-Faster-Natural-Spawning.patch => 0045-Faster-Natural-Spawning.patch} (100%) rename patches/server/{0045-Faster-Random-for-xaeroMapServerID-generation.patch => 0046-Faster-Random-for-xaeroMapServerID-generation.patch} (100%) rename patches/server/{0046-Fix-casting-in-Purpur-world-config.patch => 0047-Fix-casting-in-Purpur-world-config.patch} (100%) rename patches/server/{0047-Fix-sprint-glitch.patch => 0048-Fix-sprint-glitch.patch} (100%) rename patches/server/{0048-Fix-keepalive-kicked-name.patch => 0049-Fix-keepalive-kicked-name.patch} (100%) rename patches/server/{0049-Configurable-movement-speed-of-more-entities.patch => 0050-Configurable-movement-speed-of-more-entities.patch} (100%) rename patches/server/{0050-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch => 0051-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch} (100%) rename patches/server/{0051-Faster-sequencing-of-futures-for-chunk-structure-gen.patch => 0052-Faster-sequencing-of-futures-for-chunk-structure-gen.patch} (100%) rename patches/server/{0052-Reduce-items-finding-hopper-nearby-check.patch => 0053-Reduce-items-finding-hopper-nearby-check.patch} (100%) rename patches/server/{0053-LinearPurpur-Add-Linear-region-format.patch => 0054-LinearPurpur-Add-Linear-region-format.patch} (99%) rename patches/server/{0054-LinearPurpur-Just-remove-all-locks-on-region-files.patch => 0055-LinearPurpur-Just-remove-all-locks-on-region-files.patch} (100%) rename patches/server/{0055-Plazma-Add-missing-purpur-configuration-options.patch => 0056-Plazma-Add-missing-purpur-configuration-options.patch} (100%) rename patches/server/{0056-Plazma-Add-some-missing-Pufferfish-configurations.patch => 0057-Plazma-Add-some-missing-Pufferfish-configurations.patch} (100%) rename patches/server/{0057-Skip-event-if-no-listeners.patch => 0058-Skip-event-if-no-listeners.patch} (100%) rename patches/server/{0058-PaperPR-Rewrite-framed-map-tracker-ticking.patch => 0059-PaperPR-Rewrite-framed-map-tracker-ticking.patch} (100%) rename patches/server/{0059-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch => 0060-SparklyPaper-Skip-MapItem-update-if-the-map-does-not.patch} (100%) rename patches/server/{0060-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch => 0061-SparklyPaper-Cache-coordinate-key-used-for-nearby-pl.patch} (100%) rename patches/server/{0061-SparklyPaper-Optimize-canSee-checks.patch => 0062-SparklyPaper-Optimize-canSee-checks.patch} (100%) rename patches/server/{0062-Polpot-Make-egg-and-snowball-can-knockback-player.patch => 0063-Polpot-Make-egg-and-snowball-can-knockback-player.patch} (100%) rename patches/server/{0063-Redirect-to-Gale-s-method-to-fix-plugin-incompatibil.patch => 0064-Redirect-to-Gale-s-method-to-fix-plugin-incompatibil.patch} (95%) rename patches/server/{0064-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch => 0065-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch} (100%) rename patches/server/{0065-Fix-MC-249136-lag-when-attempting-to-locate-a-buried.patch => 0066-Fix-MC-249136-lag-when-attempting-to-locate-a-buried.patch} (100%) rename patches/server/{0066-Fix-MC-2025.patch => 0067-Fix-MC-2025.patch} (100%) rename patches/server/{0067-Fix-MC-65198.patch => 0068-Fix-MC-65198.patch} (100%) rename patches/server/{0068-Fix-MC-172047.patch => 0069-Fix-MC-172047.patch} (100%) rename patches/server/{0069-Including-5s-in-getTPS.patch => 0070-Including-5s-in-getTPS.patch} (100%) rename patches/server/{0070-Remove-useless-creating-stats-json-bases-on-player-n.patch => 0071-Remove-useless-creating-stats-json-bases-on-player-n.patch} (100%) rename patches/server/{0071-Fix-NPE-during-creating-GUI-graph.patch => 0072-Fix-NPE-during-creating-GUI-graph.patch} (100%) rename patches/server/{0072-Don-t-throw-exception-on-missing-ResourceKey-value.patch => 0073-Don-t-throw-exception-on-missing-ResourceKey-value.patch} (100%) rename patches/server/{0073-Improve-Purpur-AFK-system.patch => 0074-Improve-Purpur-AFK-system.patch} (100%) rename patches/server/{0074-Ability-to-use-Virtual-Thread-for-async-scheduler.patch => 0075-Ability-to-use-Virtual-Thread-for-async-scheduler.patch} (100%) rename patches/server/{0075-Use-a-shadow-fork-that-supports-Java-21.patch => 0076-Use-a-shadow-fork-that-supports-Java-21.patch} (100%) rename patches/server/{0076-Chat-Image-protocol.patch => 0077-Chat-Image-protocol.patch} (100%) rename patches/server/{0077-Asteor-Bar-protocol.patch => 0078-Asteor-Bar-protocol.patch} (100%) diff --git a/patches/server/0035-Leaves-Fix-vehicle-teleport-by-end-gateway.patch b/patches/server/0035-Leaves-Fix-vehicle-teleport-by-end-gateway.patch new file mode 100644 index 00000000..05b02dd8 --- /dev/null +++ b/patches/server/0035-Leaves-Fix-vehicle-teleport-by-end-gateway.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Tue, 15 Aug 2023 22:40:42 +0800 +Subject: [PATCH] Leaves: Fix vehicle teleport by end gateway + +Original license: GPLv3 +Original project: https://github.com/LeavesMC/Leaves + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +index 5717b1c2fd5b16d439499296edd35d72b6613212..2cc37cf1c3e8f7c8fdd6c1b9cfad02283f8f1dec 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +@@ -229,7 +229,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { + + entity1.setPortalCooldown(); + ((ServerPlayer) entity1).connection.teleport(teleEvent.getTo()); +- entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport. ++ if (!org.dreeam.leaf.config.modules.gameplay.UseVanillaEndTeleport.enabled) entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport. // Leaf - Leaves - vanilla + TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); // CraftBukkit - call at end of method + return; + +diff --git a/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java b/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java +new file mode 100644 +index 0000000000000000000000000000000000000000..778f428eaaf22236e52aa4b670f5ec34996ea862 +--- /dev/null ++++ b/src/main/java/org/dreeam/leaf/config/modules/gameplay/UseVanillaEndTeleport.java +@@ -0,0 +1,27 @@ ++package org.dreeam.leaf.config.modules.gameplay; ++ ++import com.electronwill.nightconfig.core.file.CommentedFileConfig; ++import org.dreeam.leaf.config.ConfigInfo; ++import org.dreeam.leaf.config.EnumConfigCategory; ++import org.dreeam.leaf.config.IConfigModule; ++ ++public class UseVanillaEndTeleport implements IConfigModule { ++ ++ @Override ++ public EnumConfigCategory getCategory() { ++ return EnumConfigCategory.GAMEPLAY; ++ } ++ ++ @Override ++ public String getBaseName() { ++ return "use_vanilla_end_teleport"; ++ } ++ ++ @ConfigInfo(baseName = "enabled") ++ public static boolean enabled = false; ++ ++ @Override ++ public void onLoaded(CommentedFileConfig config) { ++ config.setComment("gameplay.use_vanilla_end_teleport", "Enable to Use Vanilla End Gateway Teleport"); ++ } ++} diff --git a/patches/server/0035-Fix-Make-log4j-compatible-with-future-release.patch b/patches/server/0036-Fix-Make-log4j-compatible-with-future-release.patch similarity index 100% rename from patches/server/0035-Fix-Make-log4j-compatible-with-future-release.patch rename to patches/server/0036-Fix-Make-log4j-compatible-with-future-release.patch diff --git a/patches/server/0036-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch b/patches/server/0037-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch similarity index 100% rename from patches/server/0036-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch rename to patches/server/0037-Sync-with-Gale-s-Optimize-villager-data-storage.patc.patch diff --git a/patches/server/0037-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch b/patches/server/0038-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch similarity index 97% rename from patches/server/0037-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch rename to patches/server/0038-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch index 7cb8e8e6..cedb8f01 100644 --- a/patches/server/0037-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch +++ b/patches/server/0038-Sync-with-Gale-s-Optimize-sun-burn-tick.patch.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Sync with Gale's Optimize-sun-burn-tick.patch diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1952c66202f51bdbca52fab03710ca0d76e0312d..98e673534927255b20f73238f6c213f256ec1694 100644 +index 1f8ca7bc71992d287dac964d0528e15bd39bfe3c..4bf569b6b81701ea2d45d090438686c5dbbd1744 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -568,13 +568,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0038-Petal-Async-Pathfinding.patch b/patches/server/0039-Petal-Async-Pathfinding.patch similarity index 100% rename from patches/server/0038-Petal-Async-Pathfinding.patch rename to patches/server/0039-Petal-Async-Pathfinding.patch diff --git a/patches/server/0039-Petal-Multithreaded-Tracker.patch b/patches/server/0040-Petal-Multithreaded-Tracker.patch similarity index 100% rename from patches/server/0039-Petal-Multithreaded-Tracker.patch rename to patches/server/0040-Petal-Multithreaded-Tracker.patch diff --git a/patches/server/0040-Petal-reduce-work-done-by-game-event-system.patch b/patches/server/0041-Petal-reduce-work-done-by-game-event-system.patch similarity index 100% rename from patches/server/0040-Petal-reduce-work-done-by-game-event-system.patch rename to patches/server/0041-Petal-reduce-work-done-by-game-event-system.patch diff --git a/patches/server/0041-Fix-tracker-NPE.patch b/patches/server/0042-Fix-tracker-NPE.patch similarity index 100% rename from patches/server/0041-Fix-tracker-NPE.patch rename to patches/server/0042-Fix-tracker-NPE.patch diff --git a/patches/server/0042-Cache-minecart-vehicle-collision-results.patch b/patches/server/0043-Cache-minecart-vehicle-collision-results.patch similarity index 100% rename from patches/server/0042-Cache-minecart-vehicle-collision-results.patch rename to patches/server/0043-Cache-minecart-vehicle-collision-results.patch diff --git a/patches/server/0043-Reduce-canSee-work.patch b/patches/server/0044-Reduce-canSee-work.patch similarity index 100% rename from patches/server/0043-Reduce-canSee-work.patch rename to patches/server/0044-Reduce-canSee-work.patch diff --git a/patches/server/0044-Faster-Natural-Spawning.patch b/patches/server/0045-Faster-Natural-Spawning.patch similarity index 100% rename from patches/server/0044-Faster-Natural-Spawning.patch rename to patches/server/0045-Faster-Natural-Spawning.patch diff --git a/patches/server/0045-Faster-Random-for-xaeroMapServerID-generation.patch b/patches/server/0046-Faster-Random-for-xaeroMapServerID-generation.patch similarity index 100% rename from patches/server/0045-Faster-Random-for-xaeroMapServerID-generation.patch rename to patches/server/0046-Faster-Random-for-xaeroMapServerID-generation.patch diff --git a/patches/server/0046-Fix-casting-in-Purpur-world-config.patch b/patches/server/0047-Fix-casting-in-Purpur-world-config.patch similarity index 100% rename from patches/server/0046-Fix-casting-in-Purpur-world-config.patch rename to patches/server/0047-Fix-casting-in-Purpur-world-config.patch diff --git a/patches/server/0047-Fix-sprint-glitch.patch b/patches/server/0048-Fix-sprint-glitch.patch similarity index 100% rename from patches/server/0047-Fix-sprint-glitch.patch rename to patches/server/0048-Fix-sprint-glitch.patch diff --git a/patches/server/0048-Fix-keepalive-kicked-name.patch b/patches/server/0049-Fix-keepalive-kicked-name.patch similarity index 100% rename from patches/server/0048-Fix-keepalive-kicked-name.patch rename to patches/server/0049-Fix-keepalive-kicked-name.patch diff --git a/patches/server/0049-Configurable-movement-speed-of-more-entities.patch b/patches/server/0050-Configurable-movement-speed-of-more-entities.patch similarity index 100% rename from patches/server/0049-Configurable-movement-speed-of-more-entities.patch rename to patches/server/0050-Configurable-movement-speed-of-more-entities.patch diff --git a/patches/server/0050-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch b/patches/server/0051-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch similarity index 100% rename from patches/server/0050-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch rename to patches/server/0051-Fix-TerminalConsoleAppender-NPE-error-on-server-clos.patch diff --git a/patches/server/0051-Faster-sequencing-of-futures-for-chunk-structure-gen.patch b/patches/server/0052-Faster-sequencing-of-futures-for-chunk-structure-gen.patch similarity index 100% rename from patches/server/0051-Faster-sequencing-of-futures-for-chunk-structure-gen.patch rename to patches/server/0052-Faster-sequencing-of-futures-for-chunk-structure-gen.patch diff --git a/patches/server/0052-Reduce-items-finding-hopper-nearby-check.patch b/patches/server/0053-Reduce-items-finding-hopper-nearby-check.patch similarity index 100% rename from patches/server/0052-Reduce-items-finding-hopper-nearby-check.patch rename to patches/server/0053-Reduce-items-finding-hopper-nearby-check.patch diff --git a/patches/server/0053-LinearPurpur-Add-Linear-region-format.patch b/patches/server/0054-LinearPurpur-Add-Linear-region-format.patch similarity index 99% rename from patches/server/0053-LinearPurpur-Add-Linear-region-format.patch rename to patches/server/0054-LinearPurpur-Add-Linear-region-format.patch index a5f448b1..9b750acb 100644 --- a/patches/server/0053-LinearPurpur-Add-Linear-region-format.patch +++ b/patches/server/0054-LinearPurpur-Add-Linear-region-format.patch @@ -17,7 +17,7 @@ This format saves about 50% of disk space. Documentation: https://github.com/xymb-endcrystalme/LinearRegionFileFormatTools diff --git a/build.gradle.kts b/build.gradle.kts -index b1fd42d66874f29428a22570059f07696b487d5e..9d7cc530187263c6a4ed99df2c79d66d76749cc6 100644 +index f90321a70982e2a011f330968483ff1d12164e1b..5c14f2a186509e9f4a7a525320cc7492be939b7c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,6 +32,8 @@ dependencies { @@ -118,7 +118,7 @@ index 8dffb330b474b830d2f816ecf8be2e8d2e4556cd..bed46642b59d38e58e6aa663a47cbfc9 long expectedChunks = (long)regionFiles.length * (32L * 32L); // Gale start - instantly continue on world upgrade finish diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6da8bd049f3a9838383864df03a042b996f8e8a9..754fff2c0305f2bf5ce1d080f0f0d9128a0fbb2e 100644 +index 2544c8022ed0fdebc407fc85350041d77247d168..78b787edacb65496eb7d84b452dc637deaa094e4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -866,7 +866,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop