跳到正文
烈焰甘蔗Wiki

Lettuce(可食用作物)

事实基准:harvestcraft-1.3.14-GTNH.jar(MC 1.7.10 / Forge 10.13.4.1614)CFR 0.152 反编译源码。

基本信息

属性 值 来源
注册名 harvestcraft:lettuceItem ItemRegistry.java:1912
显示名 Lettuce en_US.lang:297
Java 类 ItemPamSeedFood ItemRegistry.java:1075
字段 ItemRegistry.lettuceItem ItemRegistry.java 字段声明
创造标签 tabHarvestCraft2(HarvestCraft Crops) ItemRegistry.java:1075
条件注册 否,无条件注册 ItemRegistry.java:1912
属性 值 来源
最大堆叠 64(未覆写,Item 默认) ItemPamSeedFood 未调用 func_77625_d
耐久度 无 无 setMaxDamage 调用
可食用 是 —— 继承 ItemFood ItemPamSeedFood.java:19
饥饿值恢复 cropfoodRestore(配置项 cropfoodRestore,默认 1) ItemRegistry.java:912(配置默认值)
饱和度 config.cropsaturationRestore(默认 0.6) ItemRegistry.java:913
狼食物(isWolfFood) 恒为 false —— 构造器把它写死(ItemPamSeedFood.java:25) ItemPamSeedFood.java:25
可种植 是 —— 实现 IPlantable ItemPamSeedFood.java:20
种植出的方块 BlockRegistry.pamlettuceCrop | pamlettuceCrop ItemRegistry.java:1075
要求土壤方块 field_150458_ak ItemRegistry.java:1075

种植行为(ItemPamSeedFood.java:30-52)

  • EnumPlantType = Crop(ItemPamSeedFood.java:72 的默认值)
  • 总开关:配置 enablecropitemsasseeds,默认 true(ItemRegistry.java:923);关闭后右键完全不响应。
  • 必须点击方块的顶面(par7 != 1 直接 return false)。
  • 陆生分支:要求点击处是本物品的 soilId、且 y+1 可放置,作物种在 y+1(ItemPamSeedFood.java:44-48)。

关联的种子物品

  • 种子:lettuceseedItem
  • 反向配方:lettuceseedItem 无序合成 1 个本物品(PamFoodRecipes.java:38-40 的 PamCropItems[i] → PamSeeds[i] 循环,受配置 enablecroptoseedRecipe 门控,默认 true)

作为材料被使用

下列合成台配方把本物品列为材料。分两类:经矿词典名匹配的,与把本物品以 Item 实例直接引用的。两者都是集合关系,已按 (来源, 产物) 去重。

经矿词典名匹配

来源 产物 命中的矿词典名 同一配方中的其它矿词典材料
PamFoodFishingCraftRecipes.java:19 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:20 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:26 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:27 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:33 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:34 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:40 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:41 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:47 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:48 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:54 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:55 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:61 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:62 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:68 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:69 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:75 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:76 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:82 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:83 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodFishingCraftRecipes.java:89 fishlettucewrapItem cropLettuce 砧板(toolCuttingboard)
PamFoodFishingCraftRecipes.java:90 fishtacoItem cropLettuce foodCheese、foodTortilla
PamFoodRecipes.java:186 stockItem listAllveggie 烹饪锅(toolPot)
PamFoodRecipes.java:194 springsaladItem cropLettuce cropCarrot、砧板(toolCuttingboard)
PamFoodRecipes.java:195 springsaladItem cropLettuce cropOnion、砧板(toolCuttingboard)
PamFoodRecipes.java:196 springsaladItem cropLettuce cropRadish、砧板(toolCuttingboard)
PamFoodRecipes.java:197 springsaladItem cropLettuce cropCucumber、砧板(toolCuttingboard)
PamFoodRecipes.java:198 springsaladItem cropLettuce cropBellpepper、砧板(toolCuttingboard)
PamFoodRecipes.java:199 springsaladItem cropLettuce cropSpiceleaf、砧板(toolCuttingboard)
PamFoodRecipes.java:200 springsaladItem cropLettuce cropZucchini、砧板(toolCuttingboard)
PamFoodRecipes.java:201 springsaladItem cropLettuce cropASparagus、砧板(toolCuttingboard)
PamFoodRecipes.java:202 springsaladItem cropLettuce cropBroccoli、砧板(toolCuttingboard)
PamFoodRecipes.java:203 springsaladItem cropLettuce cropPeas、砧板(toolCuttingboard)
PamFoodRecipes.java:204 springsaladItem cropLettuce cropTomato、砧板(toolCuttingboard)
PamFoodRecipes.java:205 springsaladItem cropLettuce cropSunflower、砧板(toolCuttingboard)
PamFoodRecipes.java:206 springsaladItem cropLettuce cropWalnut、砧板(toolCuttingboard)
PamFoodRecipes.java:207 springsaladItem cropLettuce cropCauliflower、砧板(toolCuttingboard)
PamFoodRecipes.java:208 springsaladItem cropLettuce cropRhubarb、砧板(toolCuttingboard)
PamFoodRecipes.java:209 porklettucewrapItem cropLettuce listAllporkcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:210 fishlettucewrapItem cropLettuce listAllfishcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:211 bltItem cropLettuce cropTomato、foodToast、listAllporkcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:212 leafychickensandwichItem cropLettuce foodChickensandwich
PamFoodRecipes.java:213 leafyfishsandwichItem cropLettuce foodFishsandwich
PamFoodRecipes.java:214 deluxecheeseburgerItem cropLettuce cropTomato、foodCheeseburger
PamFoodRecipes.java:228 tacoItem cropLettuce foodCheese、foodTortilla、listAllbeefcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:229 fishtacoItem cropLettuce foodCheese、foodTortilla、listAllfishcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:253 vegetarianlettucewrapItem cropLettuce cropCucumber、cropTomato、砧板(toolCuttingboard)
PamFoodRecipes.java:315 beetsaladItem cropLettuce cropBeet、foodCheese、foodVinegar、搅拌盆(toolMixingbowl)
PamFoodRecipes.java:351 spicygreensItem cropLettuce cropGarlic、cropOnion、foodBlackpepper、foodMustard、foodOliveoil、深锅(toolSaucepan)
PamFoodRecipes.java:440 footlongItem cropLettuce cropTomato、foodBread、foodMayo、listAllbeefcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:441 footlongItem cropLettuce cropTomato、foodBread、foodMayo、listAllchickencooked、砧板(toolCuttingboard)
PamFoodRecipes.java:442 footlongItem cropLettuce cropTomato、foodBread、foodMayo、listAllporkcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:490 mixedsaladItem listAllveggie foodSaladdressing、砧板(toolCuttingboard)
PamFoodRecipes.java:500 gardensoupItem listAllveggie foodStock、烹饪锅(toolPot)
PamFoodRecipes.java:587 citrussaladItem cropLettuce listAllcitrus、砧板(toolCuttingboard)
PamFoodRecipes.java:642 mcpamItem cropLettuce cropOnion、foodPickles、foodSaladdressing、foodToast、listAllbeefcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:643 mcpamItem cropLettuce cropOnion、foodGherkin、foodSaladdressing、foodToast、listAllbeefcooked、砧板(toolCuttingboard)
PamFoodRecipes.java:644 ceasarsaladItem cropLettuce cropGarlic、foodBlackpepper、foodCheese、foodToast、搅拌盆(toolMixingbowl)
PamFoodRecipes.java:688 sundayroastItem listAllgreenveggie foodRoastchicken、foodRoastpotatoes、烤盘(toolBakeware)
PamFoodRecipes.java:732 veggiestripsItem listAllveggie foodSalt、listAllspice、烤盘(toolBakeware)
PamOtherRecipes.java:147 veggiebaitItem listAllveggie —

矿词典(OreDictionary)

本物品注册进以下矿词典名。注意方向:注册进矿词典只代表本物品可被当作这些名字的材料使用,不代表它拥有这些名字对应的其他物品。

矿词典名 注册位置
cropLettuce PamFoodOreDictionaryRegistry.java:247
listAllveggie PamFoodOreDictionaryRegistry.java:248
listAllgreenveggie PamFoodOreDictionaryRegistry.java:249

获取方式

**源码中没有任何配方、机器加工或熔炼把本物品列为产物。**这不是数据缺失,而是本 jar 的客观事实 —— 它的来源是下面这条路径:

来源 证据
收割 pamlettuceCrop 作物方块 | pamlettuceCrop BlockPamCrop.func_149650_a

补充:lettuceItem 可在 Market 购买(MarketItems 按 ItemRegistry.PamSeeds[] / 各分类数组批量登记)。

源码缺陷

  1. getPlantMetadata 恒返回 0(ItemPamSeedFood.java:79-81),所有 ItemPamSeedFood 作物只使用 meta 0。
  2. 构造函数签名收了 int amount, float saturation, boolean isWolfFood, … 四个语义参数,但实际只用了前两个,isWolfFood 在 :25 被替换成字面量 false —— 调用方无法通过构造参数改变它。

相关条目

浏览全部模组