Chocolate Cherry(chocolatecherryItem)
基本信息
| 属性 | 值 |
|---|---|
| 注册名 | harvestcraft:chocolatecherryItem |
| 源码类 | ItemFood(原版 net.minecraft.item.ItemFood,无 HarvestCraft 子类覆写) |
| 实例化 | ItemRegistry.java:1349 |
| 注册 | ItemRegistry.java:2348(GameRegistry.registerItem) |
| 语言键 | item.chocolatecherryItem.name = “Chocolate Cherry” |
| 最大堆叠 | 64(Item 默认,未调用 setMaxStackSize) |
| 耐久 | 无(未调用 setMaxDamage)→ 不可附魔 |
| 创造标签 | tabHarvestCraft3(HarvestCraft Food) |
食物属性
| 属性 | 值 | 依据 |
|---|---|---|
饥饿值(ItemFood 第 1 构造参数) |
8 | ItemRegistry.java:1349 |
| 饱和度系数(第 2 构造参数) | snacksaturation |
配置项 crops.snacksaturation,默认 0.6,玩家可改 |
| 第 3 构造参数 | false |
与全 mod 其余 ItemFood 一致 |
| 使用动作 | 吃(ItemPamPotionFood 之外的 ItemFood 未覆写使用动作) |
ItemRegistry.java:1349 构造为原版 net.minecraft.item.ItemFood(非 harvestcraft 自有类);本 jar 内 func_77661_b 仅 ItemPamPotionFood.java:18 一处覆写 ⇒ 走原版 EAT |
饱和度不是写死的数字:
snacksaturation在ItemRegistry.initItems中由配置文件读取(ItemRegistry.java:916),实例化时读的是字段当前值。
产出途径
| 产出途径 | 材料 | 源码位置 |
|---|---|---|
工作台合成(CraftingManager 配方表,2×2/3×3 网格均可用) |
toolSaucepan + cropCherry + foodChocolatebar |
PamFoodRecipes.java:299 |
矿辞(OreDictionary)
注册于 PamFoodOreDictionaryRegistry.java:
foodChocolatecherry
相关条目
- ItemPamFood - HarvestCraft 自有食物基类对照(本物品用的是原版
ItemFood)
源码证据
- 实例化:
com/pam/harvestcraft/ItemRegistry.java:1349chocolatecherryItem = new ItemFood(8, snacksaturation, false).func_77655_b("chocolatecherryItem").func_111206_d("harvestcraft:chocolatecherryItem").func_77637_a(HarvestCraft.tabHarvestCraft3);
- 注册:
ItemRegistry.java:2348`GameRegistry.registerItem((Item)chocolatecherryItem, (String)"chocolatecherryItem");