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",