villager professions
基本信息
| 属性 | 值 |
|---|---|
| 配置分类名 | villager professions(Reference.CATEGORY_VILLAGER_PROFESSIONS) |
| 类 | astrotibs.villagenames.config.GeneralConfig |
| 条目数 | 11 |
| 核心实现 | astrotibs.villagenames.handler.VillagerTradeHandler(2418 行) |
功能
本分类控制本 mod 对村民职业系统的全面改造,是本 mod 除命名外最大的功能面。VillagerTradeHandler 按 career 值做 switch 分支,为不同职业层级提供差异化交易(handler/VillagerTradeHandler.java:95、:907、:1512、:1611、:2121 共 5 处职业分支;:1931 有 case 4: // Mason)。
11 项配置
| 配置键 | 字段 | 默认值 | 行 | 说明 |
|---|---|---|---|---|
Villager Careers |
villagerCareers |
true | :184 |
为原版职业分配 1.8+ 职业层级细分。交易仍是 1.7 风格,但商人商品更有进程感。⚠️ 源码警告:"WARNING: This will permanently modify already-generated vanilla Villager trade offers." |
Treasure Trades |
treasureTrades |
true | :186 |
高等级图书管理员与制图师用附魔书与珍宝交换本 mod 物品。仅当 Villager Careers 为 true 时生效 |
Modern Villager Profession Skins |
modernVillagerSkins |
true | :190 |
使用合成的 1.14 村民皮肤 |
Modern Zombie Profession Skins |
modernZombieSkins |
true | :191 |
使用合成的 1.14 僵尸皮肤 |
Modern Villager Trades |
modernVillagerTrades |
true | :192 |
使用 JE 1.14 / BE 1.12 的交易内容,并新增石匠(Mason)村民 |
Nitwit Villager |
enableNitwit |
true | :193 |
启用 1.11 的 NitWit(无用)村民 |
Modded Villager Headwear |
moddedVillagerHeadwear |
false | :195 |
启用现代皮肤时,为非原版职业渲染头饰层(若存在) |
Modded Villager Headwear Graylist |
moddedVillagerHeadwearGraylist |
String[] | :199 |
头饰灰名单,可逐职业强制启用/禁用,无视上一项总开关 |
Remove Armor for Modern Skins |
removeMobArmor |
true | :197 |
启用现代皮肤时自动移除村民/僵尸盔甲,以规避渲染 bug |
Modded Villager Modular Skins |
moddedVillagerModularSkins |
String[] | :229 |
为其他 mod 职业接入模块化皮肤系统 |
Villager Legacy Trades |
— | — | :188 |
被整条注释掉,当前不存在 |
Villager Legacy Trades的注释源码(config/GeneralConfig.java:188)为:"When using Villager Careers: some trades that were removed in 1.8 can still be unlocked.";对应字段LEGACYTRADESFALSE(config/GeneralConfig.java:83)以= false硬编码,源码注释"I don't want to allow these old trades."
职业与交易表
1.8+ 职业层级(JE 1.14 / BE 1.12)
README.md 记载:"villagers have adopted the modular JE 1.14 skins and offer trades similar to JE 1.14 and BE 1.12."
本 mod 为原版职业补齐了 1.14 的完整称谓(en_US.lang:123-139):
| 键 | 显示名 | 备注 |
|---|---|---|
entity.Villager.cartographer |
Cartographer | 制图师(1.14 命名) |
entity.Villager.leather |
Leatherworker | 皮革工(1.14 更名) |
entity.Villager.fletcher |
Fletcher | 制箭师 |
entity.Villager.fisherman |
Fisherman | 渔夫 |
entity.Villager.shepherd |
Shepherd | 牧羊人 |
entity.Villager.tool |
Tool Smith | 工具匠 |
entity.Villager.weapon |
Weapon Smith | 武器匠 |
entity.Villager.armor |
Armorer | 护甲匠 |
entity.Villager.cleric |
Cleric | 牧师 |
entity.Villager.librarian |
Librarian | 图书管理员 |
entity.Villager.butcher |
Butcher | 屠夫 |
entity.Villager.farmer |
Farmer | 农民 |
entity.Villager.blacksmith |
Blacksmith | ⚠️ 源码注释:// This one's custom because there was no such title in vanilla(en_US.lang:137) |
entity.Villager.mason |
Mason | 石匠,由本 mod 新增(en_US.lang:139) |
entity.Villager.nitwit |
Nitwit | 无用(en_US.lang:135) |
NitWit 注册
enableNitwit 为 true 时注册职业 ID 5(VillageNames.java:565-567):
if (GeneralConfig.enableNitwit) {
VillagerRegistry.instance().registerVillagerId(5);
LogHelper.info("Registered Nitwit villager");
}
职业 ID 6 的注册代码(VillageNames.java:570-572)被整段注释,注释标明用途为 "Register prof 6 for testing purposes",故当前不存在。
NitWit 的显示称谓由 naming 分类的 Nitwit Profession(config/GeneralConfig.java)控制,默认为空字符串。
兼容性与已知冲突
- Villager Mantle Fix 不兼容:
README.md明确写道"This mod is not compatible with Villager Mantle Fix, because Village Names villagers have headwear."变通方案是 v3.2 引入的头饰总开关 + 灰名单(即上表的 195/199 两项)。 - 交易 meta 区分依赖
VillagerMetaFix:加载时置canVillagerTradesDistinguishMeta = true(VillageNames.java:163),源码注明这是为了给 BugTorch 等 mod 留出接口。
相关条目
- villager skin tones - 村民肤色分布配置
- general settings - 含 mod 职业/结构映射的 50 项集成配置
- Village Names Network - 消息 ID 3 同步现代村民皮肤的 6 个参数
- Codex / Village Book - 与图书管理员、制图师交易/交互相关