You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Minecraft Forge自定义配方加载失败报错解决咨询

Minecraft Forge自定义配方加载失败解决

你在制作Minecraft Forge模组时添加的自定义合成配方无法加载,配方JSON代码如下:

{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "E",
    "S",
    "S"
  ],
  "key": {
    "E": {
      "item": "minecraft:emerald"
    },
    "S": {
      "item": "minecraft:stick"
    }
  },
  "result": {
    "item": "itemsplus:emerald_stick",
    "count": 1
  }
}

游戏日志报错:

[Render thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe itemsplus:emerald_stick_from_crafting_table com.google.gson.JsonParseException: No key id in MapLike[{"item":"itemsplus:emerald_stick","count":1}]

尝试在result中添加id字段后引发新错误,且modid与物品ID均已正确定义,解决方法如下:

  • 该错误是因为你使用的Forge/Minecraft版本要求合成配方的result字段格式更新,需将result里的item键替换为id键,而非额外添加id字段。修改后的配方JSON如下:
{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "E",
    "S",
    "S"
  ],
  "key": {
    "E": {
      "item": "minecraft:emerald"
    },
    "S": {
      "item": "minecraft:stick"
    }
  },
  "result": {
    "id": "itemsplus:emerald_stick",
    "count": 1
  }
}
  • 补充说明:Minecraft 1.19.3及以后的版本,合成配方结果字段统一使用id指定物品标识,旧版的item键已被废弃,这是导致解析错误的核心原因。

  • 额外检查:确保配方文件放在resources/data/[modid]/recipes/目录下,文件名建议与配方结果对应(比如命名为emerald_stick.json),避免因路径或命名不规范引发加载问题。

内容的提问来源于stack exchange,提问作者wmarcos15

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 05:06:03