AllowFortuneBags 配置项

基本信息

属性 值
类型 布尔(boolean)
配置类 config/ELBConfig.java(继承 YAMCore ConfigManager)
配置键 AllowFortuneBags
分类 Generic
默认值 true(PreInit() 中硬编码 AllowFortuneBags = true)
全局访问 EnhancedLootBags.ELBCfg.AllowFortuneBags

行为

这是本 mod 全唯一的配置项(ELBConfig 里只有这一个字段,PostInit() 是空实现)。

true(默认)时:

生效点 代码
开袋时按当前时运等级合并垃圾组 getMergedGroupFromID:AllowFortuneBags && pFortuneLevel == 3 才跳过合并
垃圾权重按时运等级削减 copyDrop(drop, pFortuneLevel) → recalcWeightByFortune
物品 tooltip 按时运显示 addInformation 显示 fortuned 或 not_fortuned 提示
创造模式标签页列出时运 III 副本 getSubItems:AllowFortuneBags && CombineTrashGroup 才生成附魔副本

false 时:

后果 说明
时运完全失效 时运 I/II/III 的袋子与普通袋子行为完全一致,垃圾组照常合并
物品 tooltip 改为固定文本 显示 enhancedlootbags.string.no_fortune_needed = “You’re feeling lucky!”
创造标签页不再列出附魔副本 每组只出现一个未附魔袋子
Nei 不再显示垃圾组信息行 drawExtras 的 isEnchantedLootbagIngredient 判断连带失效

⚠️ 配置项自带注释与代码语义相反,ELBConfig.Init() 里的描述是:

“Set to true to disable the TrashGroup merging if FortuneIII is applied to a lootbag”

这句话把 true 和 disable 对调了。以代码为准:true = 启用时运(会削减垃圾、并且时运 III 会禁止合并垃圾组);false = 关闭时运。管理员改这个开关时请勿依赖注释文本。

数值

数值 值
可选值 true / false
默认值 true
生效时机 客户端 PreInit 读配置;服务端 PreInit 读配置。改完需重启(LoadConfig() 有 _mInitialized 保护,二次调用会报 error)

相关条目