Jump to content

[1.14.4 - eclipse] Recipes not working


Turtle_Bot

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.