护符类物品
[!INFO] 注册真源:
WarpItems.initItems()(shukaro.warptheory.items.WarpItems)
2 个 Baubles 饰品
| 常量字段 | 值 | 类 | 堆叠 | 说明 |
|---|---|---|---|---|
ITEM_PURE_TALISMAN |
"warptheory.amulet" |
ItemAmulet |
1 | 纯净护符 |
ITEM_PORTABLE_SHOWER |
"warptheory.portableshower" |
ItemWarpWardAmulet |
1 | 便携式淋浴(曲曲护符) |
⚠️ ITEM_PORTABLE_SHOWER 的常量名与物品用途完全无关 ——
它叫「便携式淋浴」,类名却是 ItemWarpWardAmulet(曲曲护符),
本地化键为 item.warptheory.portableshower.name。
这是本模组最易误读的命名陷阱:三个概念(常量名 / 类名 / 实际功能)
指向同一物品但互不相同。
两者的注册名同样走 getUnlocalizedName(),故物品标识符为
WarpTheory:warptheory.amulet 与 WarpTheory:warptheory.portableshower。
为什么依赖 Baubles
@Mod 注解声明 required-after:Baubles(无版本约束),
两件护符都以 Baubles 饰品形式存在。
⚠️ mcmod.info 的 dependencies 只列了 MinecraftForge 与
Thaumcraft,漏掉了 Baubles —— 实际依赖以 @Mod 注解为准。
详见 WarpTheory 分类页 的依赖表。
曲曲护符的作用
ItemWarpWardAmulet 对应
WarpEventHandler 中被豁免检查的 potionWarpWardID:
佩戴时玩家获得曲曲护盾药水效果,从而免疫曲曲效果触发。
即 曲曲机制 中
!player.isPotionActive(potionWarpWardID) 这一豁免条件,
由本物品(或 Thaumcraft 的同名效果)提供。
faceplateReduction 与纯净护符
WarpHandler.faceplateReduction(player) 计算面纱减免,
在有效曲曲值上直接做减法:
effectiveWarp -= WarpHandler.faceplateReduction(player);
护符类物品是该减免的来源之一,使佩戴者的曲曲门槛整体上移 (效果更难触发)。
⚠️ 曲曲护符在生存模式无法合成
ItemWarpWardAmulet 有研究、无配方:
| 项 | 状态 |
|---|---|
研究(WarpResearch.java:82,键 Constants.ITEM_PORTABLE_SHOWER) |
✅ 存在 |
| 注魔配方 | ❌ 不存在 |
WarpRecipes 中名为 "WarpWardAmulet" 的那个配方块实为
复制粘贴 bug,详见 Warp 配方 的
「⚠️ 配方键冲突」一节:它用的是
Constants.ITEM_PURE_TALISMAN 作键、且产出 WarpItems.itemAmulet。
全仓 grep 'itemWarpWardAmulet' 仅 5 处命中
(字段声明、实例化、注册、图标、研究页产物),
无任何配方指向它 —— 即该物品只能通过创造标签获得。
图标注册差异
两者的图标注册方式不同:
| 类 | 图标资源名 |
|---|---|
ItemWarpWardAmulet |
Constants.modID.toLowerCase(Locale.ENGLISH) + ":itemWarpWardAmulet" → warptheory:itemWarpWardAmulet |
ItemOblivionPotion |
warptheory:itemOblivionPotion(同类写法) |
⚠️ 用 modID.toLowerCase(Locale.ENGLISH) 而非硬编码小写字符串,
是为了把 modid WarpTheory 规范成资源域 warptheory。
遗忘药水 用的是同一套路。