跳到正文
烈焰甘蔗Wiki

Chestnut Butter(chestnutbutterItem)

基本信息

属性 值
注册名 harvestcraft:chestnutbutterItem
源码类 ItemFood(原版 net.minecraft.item.ItemFood,无 HarvestCraft 子类覆写)
实例化 ItemRegistry.java:1728
注册 ItemRegistry.java:2166(GameRegistry.registerItem)
语言键 item.chestnutbutterItem.name = “Chestnut Butter”
最大堆叠 64(Item 默认,未调用 setMaxStackSize)
耐久 无(未调用 setMaxDamage)→ 不可附魔
创造标签 tabHarvestCraft3(HarvestCraft Food)

食物属性

属性 值 依据
饥饿值(ItemFood 第 1 构造参数) 5 ItemRegistry.java:1728
饱和度系数(第 2 构造参数) mealsaturation 配置项 crops.mealsaturation,默认 1.2,玩家可改
第 3 构造参数 false 与全 mod 其余 ItemFood 一致
使用动作 吃(ItemPamPotionFood 之外的 ItemFood 未覆写使用动作) ItemRegistry.java:1728 构造为原版 net.minecraft.item.ItemFood(非 harvestcraft 自有类);本 jar 内 func_77661_b 仅 ItemPamPotionFood.java:18 一处覆写 ⇒ 走原版 EAT

饱和度不是写死的数字:mealsaturation 在 ItemRegistry.initItems 中由配置文件读取(ItemRegistry.java:917),实例化时读的是字段当前值。

产出途径

产出途径 材料 源码位置
工作台合成(CraftingManager 配方表,2×2/3×3 网格均可用) toolJuicer + cropChestnut PamFoodRecipes.java:699

矿辞(OreDictionary)

注册于 PamFoodOreDictionaryRegistry.java:

  • foodChestnutbutter
  • listAllnutbutter

相关条目

  • ItemPamFood - HarvestCraft 自有食物基类对照(本物品用的是原版 ItemFood)

源码证据

  • 实例化:com/pam/harvestcraft/ItemRegistry.java:1728
    chestnutbutterItem = new ItemFood(5, mealsaturation, false).func_77655_b("chestnutbutterItem").func_111206_d("harvestcraft:chestnutbutterItem").func_77637_a(HarvestCraft.tabHarvestCraft3);
    
  • 注册:ItemRegistry.java:2166 `
    GameRegistry.registerItem((Item)chestnutbutterItem, (String)"chestnutbutterItem");
    
浏览全部模组