跳到正文
烈焰甘蔗Wiki

Mortar and Pestle(臼与杵)

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

基本信息

属性 值 来源
注册名 harvestcraft:mortarandpestleItem ItemRegistry.java:1801
显示名 Mortar and Pestle en_US.lang:270
Java 类 ItemPamTool ItemRegistry.java:1008
字段 ItemRegistry.mortarandpestleItem ItemRegistry.java 字段声明
创造标签 tabHarvestCraft(HarvestCraft Misc) ItemRegistry.java:1008
条件注册 否,无条件注册 ItemRegistry.java:1801
属性 值 来源
最大堆叠 1(func_77625_d(1)) ItemPamTool.java
耐久度 无(类中无 setMaxDamage 调用,物品不可损坏) 同上
是否可重复使用 可(无 setMaxDamage,不会损坏);但会消耗——见「合成配方」 源码中全仓库无 setContainerItem / getContainerItem 覆写
矿词典名 toolMortarandpestle PamOtherOreDictionaryRegistry.java
合成配方来源类 PamOtherRecipes.java(制作工具本身)+ PamFoodRecipes.java / PamFoodFishingCraftRecipes.java(作为材料);没有 Container/GUI —— 它不在方块界面里使用 本条目「作为材料被使用」表的来源列

用途

在原版合成台里作为材料参与配方(矿词典 toolMortarandpestle)。

它不是方块形态 —— ItemPamTool 没有 placeBlockAt,右键不会放置任何方块。

合成配方(制作这件工具)

来源 图案(自上而下) 材料 镜像
PamOtherRecipes.java:59 X@X<br>X stickWood + stone 是

全部为 Forge 的 ShapedOreRecipe(Item, new Object[]{ **mirrored**, 图案, … }) 重载,第一个 Object 是镜像标记。true 表示同一配方在水平镜像后同样成立 —— 例如锅的 X@@ / @@ 镜像后是 @@X / @@ ,即锅柄朝左朝右都能合成。

作为材料被使用

下列配方通过矿词典名 toolMortarandpestle 把本物品当作材料。这是「集合」关系:一条矿词典名可对应多个物品,一条配方也可引用多个矿词典名,因此下表按 (来源, 产物) 去重,不按调用点计数。

来源 产物 本物品命中的矿词典名 同一配方中的其它矿词典材料
PamFoodRecipes.java:100 flourItem toolMortarandpestle cropRice
PamFoodRecipes.java:101 flourItem toolMortarandpestle cropPotato
PamFoodRecipes.java:102 flourItem toolMortarandpestle cropRye
PamFoodRecipes.java:103 flourItem toolMortarandpestle cropOats
PamFoodRecipes.java:104 flourItem toolMortarandpestle cropBarley
PamFoodRecipes.java:177 cocoapowderItem toolMortarandpestle —
PamFoodRecipes.java:224 cornmealItem toolMortarandpestle cropCorn
PamFoodRecipes.java:478 blackpepperItem toolMortarandpestle cropPeppercorn
PamFoodRecipes.java:479 groundcinnamonItem toolMortarandpestle cropCinnamon
PamFoodRecipes.java:480 groundnutmegItem toolMortarandpestle cropNutmeg
PamFoodRecipes.java:703 currypowderItem toolMortarandpestle cropCurryleaf
PamFoodRecipes.java:716 mochiItem toolMortarandpestle cropRice、listAllsugar、listAllwater
PamFoodRecipes.java:743 garammasalaItem toolMortarandpestle cropSpiceleaf、foodBlackpepper、foodGroundcinnamon、foodGroundnutmeg
PamFoodRecipes.java:750 marzipanItem toolMortarandpestle cropAlmond、foodHoneydrop
PamFoodRecipes.java:751 marzipanItem toolMortarandpestle cropAlmond
PamFoodRecipes.java:99 flourItem toolMortarandpestle —

矿词典(OreDictionary)

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

矿词典名 注册位置
toolMortarandpestle PamOtherOreDictionaryRegistry.java:20

源码缺陷

  1. 工具会消耗掉。 ItemPamTool / ItemPamBlockTool 都没有覆写 setContainerItem / getContainerItem / hasContainerItem(全仓库 grep setContainerItem|func_77966_j|func_77965_c = 0 命中)。因此把它放进合成格再取出成品时,工具本身不在返还列表里。
  2. func_77630_h(ItemStack) 被覆写为恒 false(ItemPamTool.java:15-17、ItemPamBlockTool.java:25-27)。本仓库不含 MCP 映射表,无法确定该混淆名的确切语义,但无论如何返回值是常量 false,且它不是容器返还方法。
  3. ItemPamTool 构造函数体只有一行 func_77625_d(1)(堆叠上限 1)。类中没有任何右键使用逻辑、Tooltip、NBT 状态或配方判定 —— 它纯粹是一个「堆叠上限为 1 的占位物品」。

相关条目

浏览全部模组