Posted January 25, 20205 yr I'm trying to add some recipes using a basic item I made, but I keep getting the same error for every recipe. All my items show up fine in-game, but the recipes just don't work. I have my recipes saved in Tutorialmod/src/main/resources/data/tutorialmod/recipes/tutorial_block.json. Please help, I can't find any solutions for this that work. Here's how I made my recipe: { "type": "minecraft:crafting_shaped", "pattern": [ "III", "III", "III" ], "key": { "I": {"item": "tutorialmod:tutorial_item"}, }, "result": {"item": "tutorialmod: tutorial_block"} } Here's the error I kept getting: [24Jan2020 20:54:55.938] [Server-Worker-7/ERROR] [net.minecraft.client.resources.JsonReloadListener/]: Couldn't parse data file tutorialmod:tutorial_block from tutorialmod:recipes/tutorial_block.json com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 10 column 3 path $.key.I at net.minecraft.util.JSONUtils.fromJson(JSONUtils.java:359) ~[?:?] at net.minecraft.util.JSONUtils.fromJson(JSONUtils.java:398) ~[?:?] at net.minecraft.client.resources.JsonReloadListener.prepare(JsonReloadListener.java:51) ~[?:?] at net.minecraft.client.resources.JsonReloadListener.prepare(JsonReloadListener.java:22) ~[?:?] at net.minecraft.client.resources.ReloadListener.lambda$reload$0(ReloadListener.java:12) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) [?:1.8.0_241] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) [?:1.8.0_241] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_241] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_241] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_241] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_241] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 10 column 3 path $.key.I at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[gson-2.8.0.jar:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:505) ~[gson-2.8.0.jar:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[gson-2.8.0.jar:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[gson-2.8.0.jar:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739) ~[gson-2.8.0.jar:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[gson-2.8.0.jar:?] at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910) ~[gson-2.8.0.jar:?] at net.minecraft.util.JSONUtils.fromJson(JSONUtils.java:357) ~[?:?] ... 10 more
January 25, 20205 yr Your json is invalid. https://jsonlint.com/ Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
January 25, 20205 yr As an aside, you can add a json editor to Eclipse so it catches these kinds of errors for you.
January 25, 20205 yr Author Thanks for the help. Also, how would I add a json editor to eclipse and what’s a good one to use?
January 25, 20205 yr 1 hour ago, Turtle_Bot said: Thanks for the help. Also, how would I add a json editor to eclipse and what’s a good one to use? Search the marketplace for "json" there's about three. I use the one called "json editor plugin" Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.