Archaeologist
基本信息
| 属性 | 值 |
|---|---|
| 成就 ID | villagenames.achievement.archaeologist |
| 字段 | VillageNames.archaeologist(VillageNames.java:110) |
| 内部名 | archaeologist |
| 注册处 | proxy/CommonProxy.java:66-67 |
| 成就页坐标 | pageX -1, pageY 0 |
| 图标 | ModItems.codex(Codex) |
| 依赖成就 | 无 |
| 特殊标记 | func_150953_b(JsonSerializableSet.class) —— 本 mod 唯一带外部统计的成就 |
| 显示名 | §6Archaeologist |
| 描述 | Identify multiple different kinds of structures |
功能
用 Codex 命名足够多种类的不同结构后解锁。
触发条件
Codex 每次成功命名结构时,把该结构类型加入玩家统计中的 JsonSerializableSet 集合;当集合大小达到阈值即解锁(item/ItemCodex.java:379-395):
EntityPlayerMP playerMP = (EntityPlayerMP)player;
JsonSerializableSet jsonserializableset =
(JsonSerializableSet)playerMP.func_147099_x().func_150870_b(VillageNames.archaeologist);
if (jsonserializableset == null) {
jsonserializableset = (JsonSerializableSet)playerMP.func_147099_x()
.func_150872_a(VillageNames.archaeologist, new JsonSerializableSet());
}
jsonserializableset.add(structureType);
if (jsonserializableset.size() >= VillageNames.numberStructuresArchaeologist) {
if (!playerMP.func_147099_x().hasAchievementUnlocked(VillageNames.archaeologist)) {
player.triggerAchievement(VillageNames.archaeologist);
AchievementReward.allFiveAchievements(playerMP);
}
}
集合为空时按 func_150872_a 新建并写回统计文件(item/ItemCodex.java:379-384)。
阈值
numberStructuresArchaeologist = 7(VillageNames.java:131)。源码注释列出的 7 种默认结构(VillageNames.java:123-130):
| # | 结构 |
|---|---|
| 1 | 村庄(Village) |
| 2 | 沙漠金字塔(Desert Pyramid) |
| 3 | 丛林神庙(Jungle Temple) |
| 4 | 沼泽小屋(Swamp Hut) |
| 5 | 废弃矿井(Mineshaft) |
| 6 | 要塞(Stronghold) |
| 7 | 地狱要塞(Nether Fortress) |
源码注释同时说明:若安装了增加可命名结构的 mod,或启用了本 mod 的 Monument / Igloo 生成,需要识别的结构种类会更多(注释中的 "there are seven structures they can identify" 是在"无额外结构 mod 且关闭 Monument/Igloo 生成"的前提下成立的)。
⚠️ 这是一个硬编码常量,源码未提供把它改成"按实际结构总数自适应"的逻辑。
统计持久化
整个 add/size 判定被包在 try { } catch (Exception e) {} 中(item/ItemCodex.java:375、:399-400),异常被静默吞掉(源码注释:// Any of the above was illegal; probably the casting?)。若发生异常,本次命名不会计入进度也不会报错。
相关条目
- Codex - 唯一能推进本成就的物品
- allFiveAchievements 奖励 - 集齐全部成就后的奖励