模组兼容配置(Mod Compat Config)

基本信息

属性 值
类型 客户端配置文件
实现类 roadhog360.simpleskinbackport.configuration.configs.ConfigModCompat
配置文件路径 config/simpleskinbackport/modcompat.cfg
适用端 客户端(值决定是否启用 Late Mixin)
配置项数量 1

功能

ConfigModCompat 提供 mod 间的皮肤兼容选项。当前唯一项 TwilightForest:giantSkinSet 控制 Twilight Forest 巨人怪物的默认皮肤集合 —— 该值决定了 SimpleSkinBackportLateMixins 是否为 RenderTFGiant 注入 mixin(值为 null 时不启用 mixin,保留原版行为:从客户端玩家皮肤复制)。

配置项

TwilightForest:giantSkinSet

属性 值
键 TwilightForest:giantSkinSet
分类 misc
默认值 NONE(即 null,表示不开启 mixin)
合法值 NONE、STEVE_ONLY、STEVE_ALEX、ALL_DEFAULTS

含义:Twilight Forest 巨人应使用哪套默认皮肤。NONE 表示保持原版行为 —— 巨人将复制当前客户端玩家的皮肤和手臂(通过 Utils.rendererCopiesPlayerSkin 检测)。其他值让巨人按照自己的 UUID 哈希从指定集合里抽取皮肤。

生效条件:

// SimpleSkinBackportLateMixins#getMixins
if (loadedMods.contains("TwilightForest")) {
    if (ConfigModCompat.TFgiantSkinSet != null) {  // 关键检查
        mixins.add("twilightforest.MixinRenderTFGiant");
    }
}

只有当 TFgiantSkinSet != null(即用户没选 NONE)时才注入 MixinRenderTFGiant。这是 mod 作者的"按需启用"模式,避免无用 mixin 拖慢加载。

配置分类

分类 包含项 备注
misc TwilightForest:giantSkinSet 当前唯一项;预留扩展其它 mod 兼容项的位置

来源注释:// TODO: Move Iron Chest checks here —— Iron Chest 的兼容项计划搬迁到这里。

数值

数值 值 来源
NONE 字面常量 "NONE" DefaultPlayerSkin.NONE
valueOfOrNull 失败时的返回值 null Arrays.stream().filter().findFirst().orElse(null)
TFgiantSkinSet 为 null 时的行为 跳过 MixinRenderTFGiant mixin SimpleSkinBackportLateMixins#getMixins

相关条目