From b50f77f2c75d6fd27ca155ebaf5ae2925b5a3e48 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Tue, 8 Aug 2023 16:44:37 +0800 Subject: [PATCH] Update MC Technical Survival Mode --- .../0012-Budding-Amethyst-can-push-by-piston.patch | 13 ------------- patches/server/0019-Multithreaded-Tracker.patch | 4 ++-- patches/server/0037-Async-Pathfinding.patch | 4 ++-- .../server/0053-MC-Technical-Survival-Mode.patch | 9 +++++---- .../0057-Leaves-Extra-Yggdrasil-Service.patch | 6 +++--- patches/server/0061-Syncmatica-Protocol.patch | 6 +++--- patches/server/0070-Leaves-carpet-support.patch | 4 ++-- patches/server/0071-Creative-fly-no-clip.patch | 4 ++-- patches/server/0083-No-block-update-command.patch | 6 +++--- patches/server/0112-Avoid-anvil-too-expensive.patch | 4 ++-- patches/server/0117-Add-Leaves-Auto-Update.patch | 8 ++++---- 11 files changed, 28 insertions(+), 40 deletions(-) diff --git a/patches/server/0012-Budding-Amethyst-can-push-by-piston.patch b/patches/server/0012-Budding-Amethyst-can-push-by-piston.patch index a6e7e6be..d2a3c1a5 100644 --- a/patches/server/0012-Budding-Amethyst-can-push-by-piston.patch +++ b/patches/server/0012-Budding-Amethyst-can-push-by-piston.patch @@ -50,16 +50,3 @@ index de4c1e4701236e7d5ec77339c51ad6a9d8288bb6..5757457fc46aa4a785e559a140ebf0da } public boolean isSolidRender(BlockGetter world, BlockPos pos) { -diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 8dbc01120e7590bd2c7d3a29e96987ce4909e5e2..c5447203b662dc89776b253851958f816ec07694 100644 ---- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java -+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -3,6 +3,8 @@ package top.leavesmc.leaves; - import com.destroystokyo.paper.util.SneakyThrow; - import com.google.common.base.Throwables; - import net.minecraft.server.MinecraftServer; -+import net.minecraft.world.level.block.Blocks; -+import net.minecraft.world.level.material.PushReaction; - import org.bukkit.Bukkit; - import org.bukkit.command.Command; - import org.bukkit.configuration.ConfigurationSection; diff --git a/patches/server/0019-Multithreaded-Tracker.patch b/patches/server/0019-Multithreaded-Tracker.patch index 20abad90..f5faf9ea 100644 --- a/patches/server/0019-Multithreaded-Tracker.patch +++ b/patches/server/0019-Multithreaded-Tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Multithreaded Tracker This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index dd1c1c7abc5eb5ed9f32b321e4b971c730c8c556..615f45ab7521c821800b154464dac122e3f26ca4 100644 +index 5b8ef14e023059466f95b7ee7c2420bababdd0e2..181b74206ec8baeff6820ca8c27d1245d3f3d335 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -252,7 +252,7 @@ public final class LeavesConfig { +@@ -250,7 +250,7 @@ public final class LeavesConfig { dontSendUselessEntityPackets = getBoolean("settings.performance.dont-send-useless-entity-packets", dontSendUselessEntityPackets); } diff --git a/patches/server/0037-Async-Pathfinding.patch b/patches/server/0037-Async-Pathfinding.patch index 6f145a9b..f3e87285 100644 --- a/patches/server/0037-Async-Pathfinding.patch +++ b/patches/server/0037-Async-Pathfinding.patch @@ -7,10 +7,10 @@ This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) But Pufferfish patch was ported downstream from the Petal fork diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 615f45ab7521c821800b154464dac122e3f26ca4..c9ec0505c584d6e0a7ccd2b7286980b4fa157e2c 100644 +index 181b74206ec8baeff6820ca8c27d1245d3f3d335..475b3b5bcc8828c6ba2a4a6d7b2476548e13efcc 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -353,7 +353,7 @@ public final class LeavesConfig { +@@ -351,7 +351,7 @@ public final class LeavesConfig { // only config now public static boolean asyncPathfinding = false; private static boolean asyncPathfindingLock = false; diff --git a/patches/server/0053-MC-Technical-Survival-Mode.patch b/patches/server/0053-MC-Technical-Survival-Mode.patch index 3266c4a8..129447b7 100644 --- a/patches/server/0053-MC-Technical-Survival-Mode.patch +++ b/patches/server/0053-MC-Technical-Survival-Mode.patch @@ -83,7 +83,7 @@ index b0f23ebceb2f492b21eb95ee9496621f46c975c7..79f8e34032cde65a7d2a1f21bc32e0c2 entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { continue; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c9ec0505c584d6e0a7ccd2b7286980b4fa157e2c..eb6ad5d455d9038af539be2cd785e3fa274fc786 100644 +index 475b3b5bcc8828c6ba2a4a6d7b2476548e13efcc..627cd56c9ce8fc5db22b284ccff1e1c67ef291ff 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -2,6 +2,7 @@ package top.leavesmc.leaves; @@ -92,9 +92,9 @@ index c9ec0505c584d6e0a7ccd2b7286980b4fa157e2c..eb6ad5d455d9038af539be2cd785e3fa import com.google.common.base.Throwables; +import io.papermc.paper.configuration.GlobalConfiguration; import net.minecraft.server.MinecraftServer; - import net.minecraft.world.level.block.Blocks; - import net.minecraft.world.level.material.PushReaction; -@@ -473,6 +474,13 @@ public final class LeavesConfig { + import org.bukkit.Bukkit; + import org.bukkit.command.Command; +@@ -471,6 +472,14 @@ public final class LeavesConfig { public static void doMcTechnicalMode() { if (mcTechnicalMode) { @@ -105,6 +105,7 @@ index c9ec0505c584d6e0a7ccd2b7286980b4fa157e2c..eb6ad5d455d9038af539be2cd785e3fa + 5000.0, GlobalConfiguration.get().packetLimiter.allPackets.action()); + GlobalConfiguration.get().packetLimiter.overrides = Map.of(); + GlobalConfiguration.get().unsupportedSettings.allowGrindstoneOverstacking = true; ++ GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks = true; } } diff --git a/patches/server/0057-Leaves-Extra-Yggdrasil-Service.patch b/patches/server/0057-Leaves-Extra-Yggdrasil-Service.patch index 9a420836..ee12c4b7 100644 --- a/patches/server/0057-Leaves-Extra-Yggdrasil-Service.patch +++ b/patches/server/0057-Leaves-Extra-Yggdrasil-Service.patch @@ -44,10 +44,10 @@ index 46eacd000b622b9dba746fe38e4bf2a0abfe061c..3b42b63d0fefb4a978b372facd0a03b6 public final Thread serverThread; private long nextTickTime; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index eb6ad5d455d9038af539be2cd785e3fa274fc786..7e5785cccb9089c5b51a8cfbf03573df5f765d7e 100644 +index 627cd56c9ce8fc5db22b284ccff1e1c67ef291ff..35b0a18e6e01e3d836b816ee020738a78805b1b8 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -13,6 +13,7 @@ import org.bukkit.configuration.file.YamlConfiguration; +@@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import top.leavesmc.leaves.command.LeavesCommand; import top.leavesmc.leaves.bot.BotCommand; import top.leavesmc.leaves.bot.agent.Actions; @@ -55,7 +55,7 @@ index eb6ad5d455d9038af539be2cd785e3fa274fc786..7e5785cccb9089c5b51a8cfbf03573df import top.leavesmc.leaves.util.MathUtils; import java.io.File; -@@ -509,6 +510,9 @@ public final class LeavesConfig { +@@ -508,6 +509,9 @@ public final class LeavesConfig { extraYggdrasilLoginProtect = getBoolean("settings.misc.extra-yggdrasil-service.login-protect", extraYggdrasilLoginProtect); extraYggdrasilServiceList = getList("settings.misc.extra-yggdrasil-service.urls", extraYggdrasilServiceList); if (extraYggdrasilService) { diff --git a/patches/server/0061-Syncmatica-Protocol.patch b/patches/server/0061-Syncmatica-Protocol.patch index 70c323a4..b01017b6 100644 --- a/patches/server/0061-Syncmatica-Protocol.patch +++ b/patches/server/0061-Syncmatica-Protocol.patch @@ -54,10 +54,10 @@ index 92fcb5d707bb17672e2941ec59d5548fb23044c0..9a572268cc17fc1179dc447e20c4bab3 ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); this.disconnect("Invalid custom payload!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 31e8d18a1d7745a9d77baff5bfe8f9adf8f6c584..f306ce81dd0116efc9783655c69de4ba66645ef7 100644 +index 35b0a18e6e01e3d836b816ee020738a78805b1b8..22b9c5d88ec56c35e148f0a73a544089828930f3 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -14,6 +14,7 @@ import top.leavesmc.leaves.command.LeavesCommand; +@@ -12,6 +12,7 @@ import top.leavesmc.leaves.command.LeavesCommand; import top.leavesmc.leaves.bot.BotCommand; import top.leavesmc.leaves.bot.agent.Actions; import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; @@ -65,7 +65,7 @@ index 31e8d18a1d7745a9d77baff5bfe8f9adf8f6c584..f306ce81dd0116efc9783655c69de4ba import top.leavesmc.leaves.util.MathUtils; import java.io.File; -@@ -547,6 +548,7 @@ public final class LeavesConfig { +@@ -546,6 +547,7 @@ public final class LeavesConfig { syncmaticaQuota = getBoolean("settings.protocol.syncmatica.quota", syncmaticaQuota); syncmaticaQuotaLimit = getInt("settings.protocol.syncmatica.quota-limit", syncmaticaQuotaLimit); if (syncmaticaProtocol) { diff --git a/patches/server/0070-Leaves-carpet-support.patch b/patches/server/0070-Leaves-carpet-support.patch index 288d05cb..28548767 100644 --- a/patches/server/0070-Leaves-carpet-support.patch +++ b/patches/server/0070-Leaves-carpet-support.patch @@ -31,10 +31,10 @@ index a5ca7132bfbdc6bdf57262707fdf93de993b7c61..e50305b51a3759f53a9425ba6487db30 final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f306ce81dd0116efc9783655c69de4ba66645ef7..efb79ce035e739c5b108e11864ace21e15974454 100644 +index 22b9c5d88ec56c35e148f0a73a544089828930f3..9586d8ee8d23c36407ee92bea63fcedc55d9bfe6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -16,6 +16,8 @@ import top.leavesmc.leaves.bot.agent.Actions; +@@ -14,6 +14,8 @@ import top.leavesmc.leaves.bot.agent.Actions; import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; import top.leavesmc.leaves.protocol.syncmatica.SyncmaticaProtocol; import top.leavesmc.leaves.util.MathUtils; diff --git a/patches/server/0071-Creative-fly-no-clip.patch b/patches/server/0071-Creative-fly-no-clip.patch index c260355e..d8190b64 100644 --- a/patches/server/0071-Creative-fly-no-clip.patch +++ b/patches/server/0071-Creative-fly-no-clip.patch @@ -85,10 +85,10 @@ index d9baa85962236c42219cf09d4f3129be93ff069c..c1bd06fbc2c5683888f7264c35c25feb public boolean isSpawning() { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7a9af432124382efcf27f921cb6737ce2b072d18..e914c52d27cdcb2cc2c4b290fe0046417ff91c04 100644 +index 9586d8ee8d23c36407ee92bea63fcedc55d9bfe6..1df77ca5b0b768ddf716024e6fb9669f128e9b3d 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -593,6 +593,7 @@ public final class LeavesConfig { +@@ -592,6 +592,7 @@ public final class LeavesConfig { } public static void registerCarpetRules() { diff --git a/patches/server/0083-No-block-update-command.patch b/patches/server/0083-No-block-update-command.patch index 76e11d16..6f43783d 100644 --- a/patches/server/0083-No-block-update-command.patch +++ b/patches/server/0083-No-block-update-command.patch @@ -67,10 +67,10 @@ index 2708251ebc1995e71fb0e5dca9e158a3005f8a8a..e28351b379677fec356b6efec2d882ee } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index e28d4eb4de7c6714b7f446eea78e7fd41273e3ba..c87a096d950768d5ceb28e4f198b69e8c082cd50 100644 +index 1df77ca5b0b768ddf716024e6fb9669f128e9b3d..7b4ddea1242fd4a07e909462f1ad2c8353732aee 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -13,6 +13,7 @@ import org.bukkit.configuration.file.YamlConfiguration; +@@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration; import top.leavesmc.leaves.command.LeavesCommand; import top.leavesmc.leaves.bot.BotCommand; import top.leavesmc.leaves.bot.agent.Actions; @@ -78,7 +78,7 @@ index e28d4eb4de7c6714b7f446eea78e7fd41273e3ba..c87a096d950768d5ceb28e4f198b69e8 import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; import top.leavesmc.leaves.protocol.syncmatica.SyncmaticaProtocol; import top.leavesmc.leaves.util.MathUtils; -@@ -84,6 +85,10 @@ public final class LeavesConfig { +@@ -82,6 +83,10 @@ public final class LeavesConfig { commands.put("bot", new BotCommand("bot")); Actions.registerAll(); } diff --git a/patches/server/0112-Avoid-anvil-too-expensive.patch b/patches/server/0112-Avoid-anvil-too-expensive.patch index 8904902e..90eaeeba 100644 --- a/patches/server/0112-Avoid-anvil-too-expensive.patch +++ b/patches/server/0112-Avoid-anvil-too-expensive.patch @@ -18,10 +18,10 @@ index e0c3a4ba27e21c3692e601acd0af60873bcbb84c..b9fcf49ed88c62265d9aa8926c1228b9 } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2fb4dd030863790122d6681ef9a7cacea4873915..337c9851d22aa45d2f68d770ea8850e81b86f9fd 100644 +index 7b4ddea1242fd4a07e909462f1ad2c8353732aee..1ff7df01bd36a01a7bdf616b8a3298f826172138 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -599,6 +599,7 @@ public final class LeavesConfig { +@@ -598,6 +598,7 @@ public final class LeavesConfig { public static void registerCarpetRules() { CarpetRules.register(CarpetRule.of("carpet", "creativeNoClip", creativeNoClip)); diff --git a/patches/server/0117-Add-Leaves-Auto-Update.patch b/patches/server/0117-Add-Leaves-Auto-Update.patch index abd19a17..65b4dbc5 100644 --- a/patches/server/0117-Add-Leaves-Auto-Update.patch +++ b/patches/server/0117-Add-Leaves-Auto-Update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Leaves Auto Update diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 952f9798aa2818eaac9b9f60acb2808f58e92e86..445e2bad15a3509f7f48f2c43657a4bdf0fea1b2 100644 +index 1ff7df01bd36a01a7bdf616b8a3298f826172138..22965fc431996187639395385a298c4ea889d456 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -16,6 +16,7 @@ import top.leavesmc.leaves.bot.agent.Actions; +@@ -14,6 +14,7 @@ import top.leavesmc.leaves.bot.agent.Actions; import top.leavesmc.leaves.command.NoBlockUpdateCommand; import top.leavesmc.leaves.profile.LeavesMinecraftSessionService; import top.leavesmc.leaves.protocol.syncmatica.SyncmaticaProtocol; @@ -16,7 +16,7 @@ index 952f9798aa2818eaac9b9f60acb2808f58e92e86..445e2bad15a3509f7f48f2c43657a4bd import top.leavesmc.leaves.util.MathUtils; import top.leavesmc.leaves.protocol.CarpetServerProtocol.CarpetRule; import top.leavesmc.leaves.protocol.CarpetServerProtocol.CarpetRules; -@@ -819,6 +820,7 @@ public final class LeavesConfig { +@@ -818,6 +819,7 @@ public final class LeavesConfig { private static void autoUpdate() { autoUpdate = getBoolean("settings.misc.auto-update.enable", autoUpdate); autoUpdateTime = getList("settings.misc.auto-update.time", autoUpdateTime); @@ -25,7 +25,7 @@ index 952f9798aa2818eaac9b9f60acb2808f58e92e86..445e2bad15a3509f7f48f2c43657a4bd LeavesLogger.LOGGER.warning("Auto-Update is not completely safe. Enabling it may cause data security problems!"); } diff --git a/src/main/java/top/leavesmc/leaves/util/LeavesUpdateHelper.java b/src/main/java/top/leavesmc/leaves/util/LeavesUpdateHelper.java -index fb0f4ac5a864a9f05b99ae9887ac110701021b2e..e348ae6c04e2d882d6c9998458dd0b81fb539caa 100644 +index 7476f6c5bf8c4572878159a74507193e3c4a6207..7b38b707869932bd81522c100cb430389d44ad00 100644 --- a/src/main/java/top/leavesmc/leaves/util/LeavesUpdateHelper.java +++ b/src/main/java/top/leavesmc/leaves/util/LeavesUpdateHelper.java @@ -7,8 +7,11 @@ import com.google.gson.JsonElement;