From 2882def6bca6ac3e7bb1426ee1fcb4cc6a572828 Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Wed, 16 Sep 2026 15:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20cleanup:=20=E5=9C=A8=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=A0=88=E6=90=9C=E7=B4=A2=E7=AE=97=E6=B3=95=E7=A8=B3?= =?UTF-8?q?=E5=AE=9A=E5=90=8E=EF=BC=8C=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E5=90=91=E5=A4=96=E9=83=A8=E6=8F=90=E4=BE=9B=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/xyz/thewhitedog9487/client/Miscellaneous.kt | 3 +-- .../xyz/thewhitedog9487/client/ModMenuEntryPoint.kt | 7 ------- src/client/kotlin/xyz/thewhitedog9487/client/Settings.kt | 9 --------- .../assets/whoprovidethiskeybind/lang/en_us.json | 2 -- .../assets/whoprovidethiskeybind/lang/zh_cn.json | 2 -- 5 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/client/kotlin/xyz/thewhitedog9487/client/Miscellaneous.kt b/src/client/kotlin/xyz/thewhitedog9487/client/Miscellaneous.kt index 98b00d8..fc33178 100644 --- a/src/client/kotlin/xyz/thewhitedog9487/client/Miscellaneous.kt +++ b/src/client/kotlin/xyz/thewhitedog9487/client/Miscellaneous.kt @@ -23,8 +23,7 @@ val KeyMapping.Provider: ModInfo get() { val ModContainer = FabricLoader.getInstance().getModContainer(CandidateModId) if (ModContainer.isPresent) { return ModContainer.map(::ModInfo).get() } } - if (SettingsInstance.SearchInStackTrace) { - KeyMappingToMod[this]?.let { return it } } + KeyMappingToMod[this]?.let { return it } if (CandidateModIds.size == 1){ return ModInfo(null) } return ModInfo(VanillaMinecraftContainer) } diff --git a/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt b/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt index a0251b3..69690f0 100644 --- a/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt +++ b/src/client/kotlin/xyz/thewhitedog9487/client/ModMenuEntryPoint.kt @@ -44,13 +44,6 @@ class ModMenuEntryPoint: ModMenuApi { .binding( false, { SettingsInstance.ShowDebugInfo }, { SettingsInstance.ShowDebugInfo = it } ) .controller(BooleanControllerBuilder::create ) .build() } - .option { - Option.createBuilder() - .name(Component.translatable("option.SearchInStackTrace")) - .description { OptionDescription.of(Component.translatable("option.SearchInStackTrace.description") ) } - .binding( true, { SettingsInstance.SearchInStackTrace }, { SettingsInstance.SearchInStackTrace = it } ) - .controller(BooleanControllerBuilder::create ) - .build() } .option { Option.createBuilder() .name(Component.translatable("option.ShowFilePath")) diff --git a/src/client/kotlin/xyz/thewhitedog9487/client/Settings.kt b/src/client/kotlin/xyz/thewhitedog9487/client/Settings.kt index 2ecec04..742de5e 100644 --- a/src/client/kotlin/xyz/thewhitedog9487/client/Settings.kt +++ b/src/client/kotlin/xyz/thewhitedog9487/client/Settings.kt @@ -62,15 +62,6 @@ class Settings { """) var ShowDebugInfo = false - @SerialEntry(comment = - """ - 是否注入KeyMapping构造函数,在每次注册按键绑定时查询线程的调用栈信息来进行强力匹配 - 类型:布尔值 - 取值范围:true false - 默认值:true - """) - var SearchInStackTrace = true - @SerialEntry(comment = """ 是否在悬停信息中显示Mod的文件路径 diff --git a/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json b/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json index 0459a07..93bb003 100644 --- a/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json +++ b/src/main/resources/assets/whoprovidethiskeybind/lang/en_us.json @@ -15,8 +15,6 @@ "option.ShowDebugInfo.description": "This information is used to troubleshoot issues related to this mod; it generally does not need to be enabled", "option.ShowFilePath": "Show File Path", "option.ShowFilePath.description": "Display the mod file path in the information", - "option.SearchInStackTrace": "Enable aggressive search via stack trace lookup", - "option.SearchInStackTrace.description": "Injects into the KeyMapping class constructor and queries the current thread's call stack each time a keybind is registered for aggressive matching", "tooltip.provided_by": "Provided by: %s", "tooltip.provider_mod_id": "Provider Mod ID: %s", "tooltip.key_id": "Keybind ID: %s", diff --git a/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json b/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json index 43ee9a2..01e1f09 100644 --- a/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json +++ b/src/main/resources/assets/whoprovidethiskeybind/lang/zh_cn.json @@ -15,8 +15,6 @@ "option.ShowDebugInfo.description": "这些信息用于出现和本Mod相关的问题时进行排查,一般情况下不需要开启", "option.ShowFilePath": "是否显示文件路径", "option.ShowFilePath.description": "在信息中显示Mod的文件路径", - "option.SearchInStackTrace": "是否要通过查询堆栈信息来进行强力搜索", - "option.SearchInStackTrace.description": "注入KeyMapping类的构造函数,在每次注册按键绑定时查询线程的调用栈信息来进行强力匹配", "tooltip.provided_by": "提供者:%s", "tooltip.provider_mod_id": "提供者ID:%s", "tooltip.key_id": "键位ID:%s",