Config Options

基本信息

配置文件:<游戏目录>/config/NEICustomDiagram.cfg (路径由 FMLInjectionData.data()[6] + "config/NEICustomDiagram.cfg" 拼出,见 Config.java)。

共 9 个静态配置项,分两类(ConfigOptions.Category):options(7 个)与 diagram_specific(2 个)。

OPTIONS 类(7 项)

键 类型 默认 需重启 说明
ctrl_fast_forward Boolean true 否 按住 <Ctrl> 快进组件循环;<Ctrl+Shift> 快退
generate_diagrams_on_client_connect Boolean true 是 首次进世界时生成图表;必须开启才能被 MineTweaker 脚本影响
hard_disabled_diagram_groups List<String> 空 是 在初始化前硬禁用指定组 ID
show_empty_diagrams Boolean false 否 显示组件很少或为空的图
show_ids Boolean false 否 显示物品 ID、meta、流体 ID
show_stack_size_one Boolean false 否 数量为 1 时也显示堆叠数
tooltip_max_cycle_count Integer 8 否 <Shift> 悬停时 tooltip 里最多显示几个循环组件;0 = 关闭

DIAGRAM_SPECIFIC 类(2 项)

键 类型 默认 需重启 作用组
nbt_viewer_small_text Boolean false 否 NBT Viewer
nbt_viewer_newline_values Boolean false 否 NBT Viewer

另有 1 项非通用开关

oreproc_debug_logging(Boolean,默认 false,Category.OPTIONS)—— 矿物处理步骤出图失败时的调试日志,用于 GregTech Ore Processing。 它不走 Option<T> 注册表,而是单独定义(ConfigOptions.java:91)。

因此「配置项总数」按注册表算是 9,若把 oreproc_debug_logging 计入则是 10。

硬禁用组 ID 的格式

必须小写、无空格,形如:

neicustomdiagram.diagramgroup.<mod name>.<diagram group name>

例如 neicustomdiagram.diagramgroup.gregtech.oreprocessing。

兼容性迁移

ConfigOptions 内含 v0.8.1 之前的布尔型组可见性配置迁移逻辑: 检测到旧格式布尔值时打 info 日志并更新为枚举值。

GUI 配置界面

@Mod(guiFactory = "com.github.dcysteine.neicustomdiagram.main.config.ConfigGuiFactory"), 由 ConfigGuiFactory / ConfigGui 实现,且启动时 checkClassName() 自检类名是否一致。

相关条目

源码

  • src/main/java/com/github/dcysteine/neicustomdiagram/main/config/ConfigOptions.java
  • src/main/java/com/github/dcysteine/neicustomdiagram/main/config/Config.java
  • src/main/java/com/github/dcysteine/neicustomdiagram/main/config/ConfigGuiFactory.java
  • src/main/java/com/github/dcysteine/neicustomdiagram/main/config/ConfigGui.java