Roasted Pumpkin Seeds(roastedpumpkinseedsItem)
基本信息
| 属性 | 值 |
|---|---|
| 注册名 | harvestcraft:roastedpumpkinseedsItem |
| 源码类 | ItemFood(原版 net.minecraft.item.ItemFood,无 HarvestCraft 子类覆写) |
| 实例化 | ItemRegistry.java:1224 |
| 注册 | ItemRegistry.java:2462(GameRegistry.registerItem) |
| 语言键 | item.roastedpumpkinseedsItem.name = “Roasted Pumpkin Seeds” |
| 最大堆叠 | 64(Item 默认,未调用 setMaxStackSize) |
| 耐久 | 无(未调用 setMaxDamage)→ 不可附魔 |
| 创造标签 | tabHarvestCraft3(HarvestCraft Food) |
食物属性
| 属性 | 值 | 依据 |
|---|---|---|
饥饿值(ItemFood 第 1 构造参数) |
2 | ItemRegistry.java:1224 |
| 饱和度系数(第 2 构造参数) | snacksaturation |
配置项 crops.snacksaturation,默认 0.6,玩家可改 |
| 第 3 构造参数 | false |
与全 mod 其余 ItemFood 一致 |
| 使用动作 | 吃(ItemPamPotionFood 之外的 ItemFood 未覆写使用动作) |
ItemRegistry.java:1224 构造为原版 net.minecraft.item.ItemFood(非 harvestcraft 自有类);本 jar 内 func_77661_b 仅 ItemPamPotionFood.java:18 一处覆写 ⇒ 走原版 EAT |
饱和度不是写死的数字:
snacksaturation在ItemRegistry.initItems中由配置文件读取(ItemRegistry.java:916),实例化时读的是字段当前值。
产出途径
| 产出途径 | 材料 | 源码位置 |
|---|---|---|
| 原版熔炉 | Items.field_151080_bb(原版 SRG 名,未解析——本机无 1.7.10 映射表)(经验 0.1) |
PamFoodRecipes.java:58 |
| 烤箱 (Oven) | Items.field_151080_bb(原版 SRG 名,未解析——本机无 1.7.10 映射表)(经验 0.1) |
OvenRecipes.java:31 |
矿辞(OreDictionary)
注册于 PamFoodOreDictionaryRegistry.java:
foodRoastedpumpkinseeds
相关条目
- Oven(烤箱) - 上表「产出途径」中用到的机器 |
- ItemPamFood - HarvestCraft 自有食物基类对照(本物品用的是原版
ItemFood)
源码证据
- 实例化:
com/pam/harvestcraft/ItemRegistry.java:1224roastedpumpkinseedsItem = new ItemFood(2, snacksaturation, false).func_77655_b("roastedpumpkinseedsItem").func_111206_d("harvestcraft:roastedpumpkinseedsItem").func_77637_a(HarvestCraft.tabHarvestCraft3);
- 注册:
ItemRegistry.java:2462`GameRegistry.registerItem((Item)roastedpumpkinseedsItem, (String)"roastedpumpkinseedsItem");