客户端配置 (Client Config)

基本信息

属性 值
配置文件 Configuration(event.getSuggestedConfigurationFile(), true)(BetterQuesting.java:85)
加载器 betterquesting.handlers.ConfigHandler.initConfigs(),在 preInit 调用(BetterQuesting.java:86)
分类 全部为 Configuration.CATEGORY_GENERAL(单一 general 分类)
赋值目标 betterquesting.api.storage.BQ_Settings 的静态字段
配置项总数 45(Boolean 23 / String 4 / Float 10 / Int 8)
配置 GUI betterquesting.handlers.ConfigGuiFactory → client.gui.GuiBQConfig(@Mod(guiFactory = ...),BetterQuesting.java:49)
语言 配置说明文本全部为英文硬编码,en_US.lang / zh_CN.lang / ru_RU.lang 均不含配置项翻译

功能

配置 GUI(GuiBQConfig)是一个自动生成的列表页:它遍历 config.getCategoryNames(),为每个分类包一个 ConfigElement(GuiBQConfig.java:23-30)。由于所有配置项都写在 CATEGORY_GENERAL 下,实际只会出现一个分类页。mainConfigGuiClass() 返回 GuiBQConfig.class;runtimeGuiCategories() 与 getHandlerFor() 均返回 null,即不提供 Forge 的运行时配置 GUI(那套在 GTNH 上体验差,故改走 GuiConfig)。

GuiBQConfig extends cpw.mods.fml.client.config.GuiConfig,其 ConfigElement 来自 net.minecraftforge.common.config.ConfigElement —— 两者都是 Forge / FML 类,不在本仓库源码内(import 见 GuiBQConfig.java:7 与 :12)。本条目只引用其构造签名,不描述 Forge 配置框架自身的语义。

一处非线性行为:通知样式

配置项 Notification Style 的读取带副作用(ConfigHandler.java:28-37):

String style = config.getString("Notification Style", CATEGORY_GENERAL, "title", ...);
if (!BQ_Settings.questNotices) {
    BQ_Settings.notificationStyle = "off";
} else {
    BQ_Settings.notificationStyle = style;
}

即当 Quest Notices = false 时,Notification Style 的配置值被强制覆盖为 "off",无论用户填了什么。这与 BQ_Settings.notificationStyle 是个普通静态字段不同 —— 读一次配置就改一次值。

45 项配置表

任务通知(16 项)

配置键 类型 默认值 取值范围 目标字段
Quest Notices boolean true — questNotices
Notification Style String "title" title / classic / off notificationStyle(受上一行覆写)
Show Notification Icon boolean true — showNotificationIcon
Notification Duration float 4.5f 1.0 – 15.0 notificationDuration
Notification Fade In float 0.5f 0.0 – 5.0 notificationFadeIn
Notification Fade Out float 1.0f 0.0 – 5.0 notificationFadeOut
Notification Icon Scale float 4.0f 0.5 – 8.0 notificationIconScale(默认 4.0 = 64×64 像素)
Notification Icon Offset Y int -25 -100 – 100 notificationIconOffsetY(负 = 更高)
Notification Title Scale float 0f 0 – 8.0 notificationTitleScale(0 = 用 GTNHLib 全局设置)
Notification Subtitle Scale float 0f 0 – 8.0 notificationSubtitleScale(0 = 同上)
Notification Icon Animation String "none" none / fly_in / spin notificationIconAnimation
Notification Particle String "none" none / confetti / sparkle / firework / item_confetti notificationParticle
Notification Title Offset X int 0 -1000 – 1000 notificationTitleOffsetX(负 = 左)
Notification Title Offset Y int 0 -1000 – 1000 notificationTitleOffsetY(负 = 上)
Notification Effect Tier int 0 0 – 6 notificationEffectTier(0 无 / 3 超空间 / 4 奇点 / 5 曲速 / 6 光速)
Notification Hint Seen boolean false — notificationHintSeen(内部用,玩家打开通知设置后置 true 以隐藏一次性提示)

界面与缩放(12 项)

配置键 类型 默认值 取值范围 目标字段
Theme String "betterquesting:light" — curTheme(见 主题)
Use Quest Bookmark boolean true — useBookmark(跳回上次打开的任务)
Max GUI Width int -1 -1 – Integer.MAX_VALUE guiWidth(-1 = 不限制)
Max GUI Height int -1 -1 – Integer.MAX_VALUE guiHeight(-1 = 不限制)
Text Width Correction float 1F 0.01 – 10.0 textWidthCorrection
Scroll multiplier float 1F 0 – 10 scrollMultiplier
Zoom Speed float 1.25F 1.05 – 3 zoomSpeed
Zoom smoothness in ms float 100F 0 – 2000 zoomTimeInMs
Quest icon cache mode int 1 0 – 2 questIconCacheMode(0 关 / 1 低帧率 / 2 冻结)
Quest icon cache FPS int 16 1 – 144 questIconCacheFps(仅 mode 1 使用)
Zoom in on cursor boolean true — zoomInToCursor
Zoom out on cursor boolean true — zoomOutToCursor

任务线与依赖显示(12 项)

配置键 类型 默认值 目标字段 说明(配置注释原文要点)
Claim all requires confirmation boolean true claimAllConfirmation 点 Claim all 时弹确认框
Claim all random select choice rewards boolean false claimAllRandomChoice 一键领奖时随机选奖励
Skip home boolean false skipHome 启动直接进任务页;注释明说「该属性将被模组自身修改」
Lock tray boolean false lockTray 任务章节列表锁定并在启动时展开
Hide locked quest lines boolean false hideLockedQuestLines 隐藏当前无可见任务的线;GUI 可改
View mode boolean false viewMode 允许查看未解锁且非隐藏/非秘密的任务;GUI 可改
View mode all quest line boolean true viewModeAllQuestLine 查看模式下未解锁的线也显示
View mode button boolean false viewModeBtn 是否显示查看模式按钮
Always draw implicit dependency boolean false alwaysDrawImplicit 恒绘制隐式依赖;GUI 可改
Show dependency arrows boolean true showDependencyArrows 依赖线绘制方向箭头;GUI 可改
Animate dependency arrows boolean true animateDependencyArrows 悬停时箭头动画;GUI 可改
Force Monochrome Text boolean false forceMonochromeText 任务标题与正文不着色;GUI 可改

文本与调试(2 项)

配置键 类型 默认值 目标字段 说明
Highlight detected clickable url hotzone. boolean false urlDebug 用交替色渲染每个可点击 URL 热区
Log null quests boolean true logNullQuests 加载时把 null 任务写进日志(QuestDatabase.put 消费)

管理员与全局(3 项)

配置键 类型 默认值 目标字段 说明
Load the default quest DB on world startup. boolean true loadDefaultsOnStartup 每次载入世界等效执行一次 /bq_admin default load
Unrestrict Admin Commands boolean false unrestrictAdminCommands 所有玩家都能用 /bq_admin(单人无作弊时有用)
Disable rewards boolean false noRewards 关闭奖励;注释明说「某些奖励类型可能不支持」

数值

数值名 值
配置项总数 45
所属分类数 1(CATEGORY_GENERAL)
float 类型项 10
int 类型项 8
boolean 类型项 23
String 类型项 4
受副作用覆写的项 1(Notification Style)
上界为 Integer.MAX_VALUE 的项 2(Max GUI Width / Max GUI Height)

已核实:声明 → 赋值 → 外部读取

按项目要求逐项核对 BQ_Settings:

  • 声明:ConfigHandler.initConfigs() 中每项都调 config.getXxx(...) 并立即写入 BQ_Settings.<字段>(ConfigHandler.java:22-282),无「只读不写」的项。
  • 赋值:45 项全部有赋值语句。
  • 外部读取:抽样核实 logNullQuests 被 QuestDatabase.put 读取(QuestDatabase.java:34);viewMode 相关字段被客户端 GUI 读取(ConfigHandler 注释多处标注「This property can be changed by the GUI」)。notificationStyle 被 QuestNotification 消费。

未逐条穷举 45 项的外部读取点;本条仅记录已直接核实的项,不做推断。

统计口径(重要)

45 这个数是用换行无关的正则统计的:re.findall(r'config\s*\.\s*get(Boolean|String|Float|Int)\s*\(', src)。

若改用逐行 grep 'config\.get',只能数出 41 个 —— 因为有 4 个调用点被格式化工具换行拆开,config 与 .getXxx( 不在同一行:

行号 被拆开的字段
128-129 curTheme(config 后换行接 .getString)
157-158 scrollMultiplier
160-161 zoomSpeed
235-236 viewModeBtn

少算这 4 项会让「任务线与依赖显示」一组从 12 项缩到 11 项,并让 String 与 Float 的类型分布失真。

死代码 / 闲置资源

  • sounds/page_flip0.wav 与 sounds/page_flip1.wav 存在于 assets/betterquesting/sounds/,但 grep -rn 'page_flip' src/ 零命中,且仓库内没有 sounds.json。这两个音频文件既未被代码引用也未被 sounds.json 声明,不构成可播放的已注册音效。
  • 实际使用的音效全部是原版名:random.click、random.levelup(ItemExtraLife.java:73)以及任务属性 snd_unlock / snd_update / snd_complete 的默认值。

相关条目

  • 世界任务设置 - 存于世界存档的 13 个属性,与本页的客户端设置是两套独立系统
  • 任务通知 - 16 项通知配置的最终消费者
  • 主题 - Theme 配置项的 8 个可选值
  • 指令 - Load the default quest DB 与 Unrestrict Admin Commands 影响 /bq_admin 的行为