naming settings
基本信息
| 属性 | 值 |
|---|---|
| 配置分类名 | naming(Reference.CATEGORY_NAMING) |
| 类 | astrotibs.villagenames.config.GeneralConfig |
| 条目数 | 7 |
| 核心实现 | astrotibs.villagenames.name.NameGenerator |
| 音节池配置文件 | config/pieces/ 下 18 个独立处理器 |
功能
本分类控制本 mod 的核心玩法——为村民、村庄与各类结构生成随机名称。README.md 开头即写明:"This is a mod for Minecraft Forge that allows the user to generate random names for Villagers and villages."
7 项配置
| 配置键 | 字段 | 类型 | 默认值 | 行 |
|---|---|---|---|---|
Entity names |
nameEntities |
boolean | true | :359 |
Entity professions |
addJobToName |
boolean | false | :360 |
Golem names |
nameGolems |
boolean | true | :361 |
Nitwit Profession |
nitwitProfession |
String | ""(空串) |
:363 |
Automatic Names |
modNameMappingAutomatic |
String[] | 见下 | :366 |
| (可点击名映射) | modNameMappingClickable |
String[] | 见下 | — |
| 音节池分类 | — | — | — | 独立配置文件 |
7 项计数来自
grep -oE 'Reference\.CATEGORY_NAMING' config/GeneralConfig.java的 7 次匹配。其中modNameMappingClickable(字段声明config/GeneralConfig.java:52)在本分类内没有独立的config.get调用——它与Automatic Names共用同一分类,仅在字段层声明,因此上表未给出其config.get行号。
前三项说明
| 配置键 | 源码说明(原文) |
|---|---|
Entity names |
"Entities reveal their names when you right-click them, or automatically if so assigned." |
Entity professions |
"An entity's name also includes its profession/title. You may need to right-click the entity to update its name plate." |
Golem names |
"Right-click village Golems to learn their name." |
即:Entity professions 开启后实体名会附带职业称谓,但需要右键刷新名牌。
Automatic Names 映射表
modNameMappingAutomatic 是一个结构化的字符串列表(config/GeneralConfig.java:370 起),每条记录形如:
<名称池>|<显示名>|<实体类路径>|<动作>
源码中可见的实际条目(config/GeneralConfig.java:372-380):
| 名称池 | 显示名 | 实体类路径 |
|---|---|---|
(注释样例)demon |
(空) | net.minecraft.entity.boss.EntityWither |
villager-goblin |
Witch | net.minecraft.entity.monster.EntityWitch |
dragon-angel |
Ender Dragon | net.minecraft.entity.boss.EntityDragon |
villager-demon |
Evoker | net.minecraft.entity.monster.EntityEvoker |
villager-demon |
Vindicator | net.minecraft.entity.monster.EntityVindicator |
villager-demon |
Illusioner | net.minecraft.entity.monster.EntityIllusionIllager |
dragon-angel |
Ender Dragon | chylex.hee.entity.boss.EntityBossDragon |
demon |
Ender Demon | chylex.hee.entity.boss.EntityBossEnderDemon |
格式来自被注释的样例行
"demon||net.minecraft.entity.boss.EntityWither|add"(config/GeneralConfig.java:372)——用||表示空字段。add应为动作标记。后 3 条(
chylex.hee.*)注明来源为 Hardcore Ender Expansion mod(源码注释// Hardcore Ender Expansion,:377),说明本 mod 预置了对特定附属 mod 实体的命名支持。
这解释了源码中 NameGenerator 的音节池为何包含 alien / demon / goblin / angel / dragon 等看似离奇的类别:它们是按"意象族群"给生物分组命名,而非按类型。
modNameMappingClickable(config/GeneralConfig.java:52 声明)是同一机制的可点击版本——写入书本时生成可跳转的映射(GeneralConfig 字段注释见 :50-52)。
自定义任意实体命名
README.md 记载的能力:"The config files allow you to generate names for nearly any vanilla or mod entity so long as you know the class path."——由于映射表按类路径匹配,用户可把任意实体(含 mod 实体)加入命名系统。
音节池
18 个音节池各对应一个独立配置文件(详见 VNGuiFactory / 配置 GUI 的音节池处理器表),每个含 9 类命名参数(前缀/根音节/后缀/长度权重等)。
音节池分类名由 Reference.java 的 CATEGORY_*_SYLLABLE_POOL 常量族定义,构成为 基础名 + " syllable pool"(SYL_SUF = " syllable pool"):
villager / village / temple / mineshaft / fortress / stronghold / monument / end city / mansion / golem / pet / dragon / angel / demon / goblin / alien / alien village / custom
结构命名
README.md 另记载:结构可通过 Codex 命名,附属 mod 的结构只要"数据以特定格式存储"即可支持("provided that the structure data is stored in a particular format")。结构名映射字段为 modStructureNames(config/GeneralConfig.java:63)。
相关条目
- VNGuiFactory / 配置 GUI - 音节池配置文件的入口与 9 类参数
- Codex - 结构命名的交互入口
- Village Book - 村民/村庄命名的交互入口
- general settings - 主配置页