浆果与食物

基本信息

属性 值
食物类物品 浆果(2 种 × 4 meta)、混合果酱、仙人掌果、下界食物、炖菜碗
非食物容器 空碗(13 meta 贴图变种,继承 Item 不可食用)
干粮物品 箭毒蛙皮革等 9 种 PlantItem 变种
种子类 大麦种子、棉花种子
容器类 种子袋 5 种、骨粉袋 1 种
开关 enableBerryBushes / enableCactusJuice / enableSeedBags / enableNetherWartBags / enableBonemealBags

功能

Natura 的食物线按来源分为浆果系、干粮系与容器系三组。所有营养值直接来自源码中的 ItemFood 构造参数,无推测成分。

浆果系

物品 类 恢复量 饱和度 来源
浆果(主世界 4 种) BerryItem 1 0.4F items/BerryItem.java:24-25
浆果(下界 4 种) NetherBerryItem 1 0.4F items/NetherBerryItem.java:27-28
混合果酱 BerryMedley 5 1.4F items/BerryMedley.java:19-20

BerryItem 与 NetherBerryItem 构造参数均为 healAmount = 1,注册时分别传入 1(NContent.java:757, 765);BerryMedley 注册时传入 5(NContent.java:773)。

混合果酱的饱和度 1.4F 是全组最高值,为单颗浆果(0.4F)的 3.5 倍。

其他可食用物品

物品 类 恢复量 饱和度 来源
仙人掌果 SeedFood 3 0.3f items/SeedFood.java:25-27、NContent.java:746
下界食物(钾苹果) NetherFoodItem 4 0.4F items/NetherFoodItem.java:27-28
炖菜碗 BowlStew 6 0.6f items/BowlStew.java:27-28
空碗 BowlEmpty 非食物(继承 Item) — items/BowlEmpty.java:15

SeedFood 构造为 super(hunger, saturation, cropID, Blocks.farmland) —— 其余 ItemFood 均为三参构造。

BowlEmpty 继承 net.minecraft.item.Item 而非 ItemFood,因此完全不可食用。 它是一个 13 meta 的贴图变种容器,textureNames 中 meta 2 = ghostwood、4 = bloodwood、11 = darkwood、12 = fusewood,其余为空串(回退到原版 bowl 贴图)(items/BowlEmpty.java:20-21, 33-40)。其 getUnlocalizedName 直接返回 Items.bowl.getUnlocalizedName(stack)(:42-48)。

注意:BowlStew 恢复量 6 是全部食物中最高的。

干粮物品(PlantItem)

PlantItem 是一个多变种干粮物品,通过元数据区分 9 种(items/PlantItem.java:20-29):

meta 英文名 物品字典名
0 barley.plant barley_plant
1 barley.flour barley_flour
2 wheat.flour wheat_flour
3 cotton.plant cotton_plant
4 powder.sulfur sulfur
5 fletching.ghostwood ghostwood_fletching
6 leather.imp leather_imp
7 string.flame flamestring
8 dye.blue dye_blue

PlantItem 继承 NCraftingItem(不是 ItemFood),设 setHasSubtypes(true),其 getUnlocalizedName 按元数据拼接(items/PlantItem.java:32-35)。

PlantItem 同时是繁殖道具:Natura.interactEvent 中,玩家用 meta 0 的 plantItem 对牛与羊右键即可使其进入繁殖状态(Natura.java:212-234)。牛/羊还会被添加 EntityAITempt AI 以 meta 0 的 plantItem 诱惑(Natura.java:238-241)。

种子

物品 注册名 作物 meta 来源
大麦/棉花种子 Natura:barley.seed NContent.crops meta 0 = 大麦,meta 1 = 棉花 NContent.java:742-745

种子对象为 NaturaSeeds(crops, Blocks.farmland),并通过 registerCustomItemStack 注册为:

字典名 对应
seedBarley seeds meta 0
seedCotton seeds meta 1

骨粉袋中的大麦与棉花种子可从草地掉落(MinecraftForge.addGrassSeed,概率权重 3),受配置 Drop barley seeds from grass / Drop cotton seeds from grass 控制,默认均为 true(NContent.java:748-753、PHNatura.java:84-85)。

种子袋

SeedBag 可在 3×3 范围内批量播种(items/SeedBag.java:36-40):

种子袋 注册名 对应作物 meta
小麦袋 Natura:wheatBag Blocks.wheat 0
大麦袋 Natura:barleyBag NContent.crops 0
土豆袋 Natura:potatoBag Blocks.potatoes 0
胡萝卜袋 Natura:carrotBag Blocks.carrots 0
棉花袋 Natura:cottonBag NContent.crops 4
下界疣袋 Natura:wartBag Blocks.nether_wart 0
骨粉袋 Natura:boneBag BoneBag("bone") —

onItemUse 要求 side == 1(即只能点击方块顶面),否则返回 false(items/SeedBag.java:34)。

数值

数值名 值
混合果酱恢复 / 饱和 5 / 1.4F
炖菜碗恢复 / 饱和 6 / 0.6f
下界食物恢复 / 饱和 4 / 0.4F
仙人掌果恢复 / 饱和 3 / 0.3f
单颗浆果恢复 / 饱和 1 / 0.4F
种子袋播种范围 3×3
草地掉种子权重 3
箭毒蛙皮革 PlantItem meta 6

交互

触发 行为
右键浆果丛(meta ≥ 12) 采摘浆果
对牛/羊右键 PlantItem meta 0 消耗 1 个使该动物进入繁殖状态(创造模式不消耗)
使用种子袋 在点击点 3×3 范围内播种
用骨粉袋 BoneBag 类,未核实具体行为

相关条目