#Simple Recipe Jsons

11 messages · Page 1 of 1 (latest)

silk oak
#

Did what I've done in my other projects, looked up docs, followed a tutorial; any recipes I try to add simply don't work.

Directory structure: src/main/resources/data/mod_id/recipes/item_name.json

#

This is the tutorial I followed: https://www.youtube.com/watch?v=xV3JiF-7TDE
I'm on fabric 1.20.6, not sure if the recipe system has changed but I also looked at the source code and it seemed consistent to me.

In this Minecraft Modding Tutorial for Fabric, we are adding Custom Recipes to Minecraft 1.20 :)

== MODDING COURSES ==
FORGE ▶️ https://url.kaupenjoe.net/CourseForge120X
FABRIC ▶️ https://url.kaupenjoe.net/CourseFabric120X

== COMPATIBILITY ==
✅ Compatible with 1.20, 1.20.1, 1.20.2

== ASSETS & DOWNLOAD LINKS ==
GitHub Repo: https://github...

▶ Play video
gleaming lintel
#

Have you by chance removed your fabric api dependnecy from your build.gradle? Fabric apis is required for loading mod resources

#

@silk oak

silk oak
#

i have other things in the mod loading correctly and other mods in the run config which which properly, and the fabric dependency is still there

gleaming lintel
#

Check the logs, you might be getting an error there

silk oak
#

🤦‍♂️ dont know how i missed that

#
 com.google.gson.JsonParseException: No key id in MapLike[{"item":"minecraft:diamond_horse_armor"}]```
#

and this is the json, copied from CHAS

#
{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "  M",
    "XWX",
    "I I"
  ],
  "key": {
    "W": {
      "item": "minecraft:white_wool"
    },
    "X": {
      "item": "minecraft:diamond"
    },
    "I": {
      "item": "minecraft:diamond_leggings"
    },
    "M": {
      "item": "minecraft:diamond_helmet"
    }
  },
  "result": {
    "item": "minecraft:diamond_horse_armor"
  }
}
gleaming lintel
#

I think the item in result should be id