diff --git a/patches/server/0004-Leaves-Server-Config-And-Command.patch b/patches/server/0004-Leaves-Server-Config-And-Command.patch index b643af20..5f975df2 100644 --- a/patches/server/0004-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0004-Leaves-Server-Config-And-Command.patch @@ -128,10 +128,10 @@ index a53514f2c510b29f596c361de7bc0b405c27e964..269c7ba0707db4fdc45a70000e0be892 .withRequiredArg() diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..8a62ffa48472a3d3ef019154379bf2a5a30ce78c +index 0000000000000000000000000000000000000000..f901ec32a948fa9705dc53389a279bd466a02fa3 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,757 @@ +@@ -0,0 +1,762 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -714,6 +714,11 @@ index 0000000000000000000000000000000000000000..8a62ffa48472a3d3ef019154379bf2a5 + optimizedDragonRespawn = getBoolean("settings.performance.optimized-dragon-respawn", optimizedDragonRespawn); + } + ++ public static boolean mendingCompatibilityInfinity = false; ++ private static void mendingCompatibilityInfinity() { ++ mendingCompatibilityInfinity = getBoolean("settings.modify.mending-compatibility-infinity", mendingCompatibilityInfinity); ++ } ++ + public static final class WorldConfig { + + public final String worldName; diff --git a/patches/server/0073-Enchantment-mending-compatibility-infinity.patch b/patches/server/0073-Enchantment-mending-compatibility-infinity.patch new file mode 100644 index 00000000..10b529f0 --- /dev/null +++ b/patches/server/0073-Enchantment-mending-compatibility-infinity.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Tue, 27 Jun 2023 13:48:36 +0800 +Subject: [PATCH] Enchantment mending compatibility infinity + + +diff --git a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java +index 518d85a13c37a2f7d32ca0718323181048559986..881d661326cbca3c5340a33a990f122737a37ef3 100644 +--- a/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java ++++ b/src/main/java/net/minecraft/world/item/enchantment/ArrowInfiniteEnchantment.java +@@ -19,6 +19,6 @@ public class ArrowInfiniteEnchantment extends Enchantment { + + @Override + public boolean checkCompatibility(Enchantment other) { +- return other instanceof MendingEnchantment ? false : super.checkCompatibility(other); ++ return (!top.leavesmc.leaves.LeavesConfig.mendingCompatibilityInfinity && other instanceof MendingEnchantment) ? false : super.checkCompatibility(other); // Leaves - mendingCompatibilityInfinity + } + }