鞣制皮革
[!INFO] 注册真源:
ItemsBackpack.initItems()(de.eydamos.backpack.item.ItemsBackpack:32)
基本信息
| 属性 | 值 |
|---|---|
| 注册调用 | GameRegistry.registerItem(tannedLeather, "tannedLeather") |
| 实现类 | de.eydamos.backpack.item.ItemLeather(与 捆绑皮革 共用同一个类) |
| 最大堆叠 | 64 |
| 创造标签 | 原版 CreativeTabs.tabMaterials |
| 图标 | backpack:leatherTanned(ItemLeather.registerIcons 的 icons[1]) |
获取方式
只能冶炼得到,无直接合成配方:
GameRegistry.addSmelting(ItemsBackpack.boundLeather, tannedLeatherStack, 0.1f);
即 捆绑皮革 + 任意燃料 → 1 鞣制皮革,经验值 0.1f
(RecipeHelper.registerRecipes 末尾)。注意这会消耗捆绑皮革,
不是可逆配方。
三大用途
| 用途 | 配方形状 | 说明 |
|---|---|---|
| 大背包直制 | "LLL" / "L L" / "LLL",L = tannedLeather |
metadata 200 + i |
| 工作台背包 | "LLL" / "LWL" / "LLL" |
metadata 217 |
| 环绕升级 | 8 个鞣制皮革 + 中心背包 | 见 背包升级配方 |
| 染色材料 | 作为 RecipeRecolorBackpack 的合法染色剂 |
限于 tier 1 / 2 背包 |
即:皮革负责第一级,鞣制皮革负责第二级——这与 捆绑皮革 的关系共同构成本模组的皮革升级树。
命名同样为驼峰
与 捆绑皮革 共享 ItemLeather 的同一套写法,
注册名与 unlocalizedName 均为 tannedLeather(驼峰),
物品标识符为 Backpack:tannedLeather,语言键 item.tannedLeather.name。
与捆绑皮革的类共享陷阱
因为两者是同一个 Java 类的两个实例,任何 instanceof ItemLeather 判断
同时匹配两者。RecipeEnhanceBackpack 就依赖这一点来校验升级材料:
if (!(slotStack.getItem() instanceof ItemLeather)) { return false; }
if (slotStack.getItem() != ItemsBackpack.tannedLeather) { return false; }
第一行放行两种皮革,第二行再精确收窄到 tannedLeather ——
两行缺一不可,删掉任一行都会让配方行为改变。