From 6aefee006ee34a4ec48f0f678e3d651682f145ff Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Mon, 1 Jul 2024 00:16:06 +0800 Subject: [PATCH] This is commit message --- gradle.properties | 2 +- ...006-Leaves-Server-Config-And-Command.patch | 22 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 843fdebe..fd2803eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,6 @@ version=1.21-R0.1-SNAPSHOT mcVersion=1.21 org.gradle.jvmargs=-Xmx2G -paperRef=1f5db504244fe6563ab32cee646dad0c53360e01 +paperRef=aa8d38d3dbab3cb0021d0f24f726818caf77bf15 preVersion=true updatingMinecraft=true \ No newline at end of file diff --git a/patches/server/0006-Leaves-Server-Config-And-Command.patch b/patches/server/0006-Leaves-Server-Config-And-Command.patch index ac4a41c8..d46bac11 100644 --- a/patches/server/0006-Leaves-Server-Config-And-Command.patch +++ b/patches/server/0006-Leaves-Server-Config-And-Command.patch @@ -85,10 +85,10 @@ index 459f47244bdfeab63b5f16d780b0291d36310de8..a872421bc3e67fdcc929f104f4b085fb .withRequiredArg() diff --git a/src/main/java/org/leavesmc/leaves/LeavesConfig.java b/src/main/java/org/leavesmc/leaves/LeavesConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..afe13ae207eaa294e3299f15874d28df3a55e32d +index 0000000000000000000000000000000000000000..529144dcbcd9b2d4f251ffed93ba81ce702d56fe --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,888 @@ +@@ -0,0 +1,904 @@ +package org.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -418,9 +418,19 @@ index 0000000000000000000000000000000000000000..afe13ae207eaa294e3299f15874d28df + @GlobalConfig(name = "bedrock-break-list", category = "modify", lock = true) + public static boolean bedrockBreakList = false; + -+ @GlobalConfig(name = "disable-distance-check-for-use-item", category = "modify") ++ @GlobalConfig(name = "disable-distance-check-for-use-item", category = "modify", verify = DisableDistanceCheckForUseItemVerify.class) + public static boolean disableDistanceCheckForUseItem = false; + ++ private static class DisableDistanceCheckForUseItemVerify extends ConfigVerify.BooleanConfigVerify { ++ @Override ++ public String check(Boolean old, Boolean value) { ++ if (alternativeBlockPlacement != AlternativePlaceType.NONE && !value) { ++ return "alternative-block-placement is enable, disable-distance-check-for-use-item always need true"; ++ } ++ return null; ++ } ++ } ++ + @GlobalConfig(name = "no-feather-falling-trample", category = "modify") + public static boolean noFeatherFallingTrample = false; + @@ -805,6 +815,12 @@ index 0000000000000000000000000000000000000000..afe13ae207eaa294e3299f15874d28df + } + + private static class AlternativePlaceVerify extends ConfigVerify.EnumConfigVerify { ++ @Override ++ public void runAfterLoader(Enum value) { ++ if (value != AlternativePlaceType.NONE) { ++ disableDistanceCheckForUseItem = true; ++ } ++ } + } + + @GlobalConfig(name = "appleskin-protocol", category = "protocol")