禁用内容配置

基本信息

属性 值
配置分类 general(Configuration.CATEGORY_GENERAL)
需要重启 是,两项均 setRequiresMcRestart(true)
作用范围 仅影响 Disabled Items 列表中的条目

功能

两个字符串列表配置项,分别控制物品本身与合成配方的启停。

Disabled Items

关闭物品会同时移除其物品、渲染器与配方(BattlegearConfig.java:170-171 注释):

sb.append("This will disable completely the provided item, along with their renderers and recipes including them.\n");

合法值取自 itemNames 数组(BattlegearConfig.java:60-61),共 12 个:

索引 合法值 对应内容
0 heraldric 纹章编辑器物品
1 chain 锁链
2 quiver 箭袋
3 dagger 匕首(5 材质)
4 waraxe 战斧(5 材质)
5 mace 钉头锤(5 材质)
6 spear 长矛(5 材质)
7 shield 盾牌(5 类型)
8 knight.armour 骑士盔甲(4 部位)
9 mb.arrow 本模组箭矢(1 物品 9 子类型)
10 flagpole 旗杆方块
11 bow 铁弓与钻石弓

特殊行为:若该列表包含全部 12 个值,getConfig 直接 return,后续所有配置项与物品注册全部跳过(BattlegearConfig.java:187-189)。这意味着此时连 Rendering、Server、EnchantmentsID 分类都不会被读取。

Disabled Recipies

只关闭配方,不移除物品(BattlegearConfig.java:237-240 注释):

sb.append("In this way the items may still be obtained through creative mode and cheats, but players will be unable to craft them.\n");

合法值由代码动态生成(BattlegearConfig.java:244-265):

类别 合法值
itemNames 索引 1–11 chain、quiver、dagger、waraxe、mace、spear、shield、knight.armour、flagpole、bow(跳过索引 0 heraldric 与索引 9 mb.arrow)
箭矢细分 mb.arrow.<name>,<name> 取 ItemMBArrow.names 的 9 个值
额外 chain.armour

索引 9(mb.arrow)在合法值枚举中被显式跳过(BattlegearConfig.java:245),因为箭矢配方按 mb.arrow.<name> 逐个控制,无法整体关闭。

索引 0(heraldric)同样不在合法值列表中 —— 纹章编辑器物品本就没有配方(BattlegearConfig.java:244 从索引 1 开始循环)。

合法值中没有 bow.gold / bow.greg(死代码)与 cloak(本地化字符串遗留,Java 代码中 0 处匹配)。

数值

配置项 默认值 类型 来源
Disabled Items new String[0] String 列表 BattlegearConfig.java:77, 184
Disabled Recipies new String[0] String 列表 BattlegearConfig.java:78, 266

两个列表读入后均 Arrays.sort,供 Arrays.binarySearch 判定(BattlegearConfig.java:190, 268)。

交互

触发 行为
修改配置 两项均需重启游戏方生效
Disabled Items 含全部 12 值 getConfig 提前返回,后续配置与注册全部跳过(BattlegearConfig.java:187-189)
Disabled Items 含 bow 铁弓与钻石弓均不注册(共用索引 11 判定,BattlegearConfig.java:203-214)
Disabled Items 含 shield 5 种盾牌均不注册(BattlegearConfig.java:285-288)
Disabled Items 含 knight.armour 头盔/胸甲/护腿/靴子均不注册(BattlegearConfig.java:289-291)
Disabled Recipies 含 chain.armour 仅关闭 4 件锁链甲配方,锁链本身保留(BattlegearConfig.java:328-334)
Disabled Recipies 含 mb.arrow.<name> 仅关闭该子类型的正/逆合成配方(BattlegearConfig.java:505)

合成配方

不适用。

相关条目