跳到正文
烈焰甘蔗Wiki

Apple Yogurt(appleyogurtItem)

基本信息

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

食物属性

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

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

产出途径

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

矿辞(OreDictionary)

注册于 PamFoodOreDictionaryRegistry.java:

  • foodAppleyogurt

相关条目

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

源码证据

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