GiantNuker Posted August 6, 2017 Posted August 6, 2017 Before you say "go look it up", here is what I have: in "src/main/resources/assets/mocakes/recipes" I have "cake_pan.json": { "type": "crafting_shaped", "pattern": [ "# #", "###" ], "key": { "#": { "item": "minecraft:iron_nugget" } }, "result": { "item": "mocakes:cake_pan" } } and "batter_plain.json": { "type": "crafting_shaped", "pattern": [ "ACA", "BEB", "CDC" ], "key": { "A": { "item": "minecraft:milk_bucket" }, "B": { "item": "minecraft:sugar" }, "C": { "item": "minecraft:wheat" }, "D": { "item": "mocakes:cake_pan" }, "E": { "item": "minecraft:egg" } }, "result": { "item": "mocakes:batter_plain" } } NIETHER items are craftable(they ARE registered though, they appear in tab,) I know the names are right because: [19:59:49] [main/INFO] [STDOUT]: [mods.giantnuker.backslash.BackHandler:registerItems:179]: mocakes:cake_pan [19:59:49] [main/INFO] [STDOUT]: [mods.giantnuker.backslash.BackHandler:registerItems:179]: mocakes:batter_plain log for my API Quote
Choonster Posted August 6, 2017 Posted August 6, 2017 Are there any errors in the log? Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
minedogg Posted August 6, 2017 Posted August 6, 2017 Hi, I am far from being an experienced modder, but I think the crafting type is what is wrong here. You are using "type": "crafting_shaped" which is missing a domain name. What happens is: Forge (or Minecraft - not exactly sure what exactly handels the recipes) checks in your mods domain for modid:crafting_shaped which most likely does not exist. You have to use "type": "minecraft:crafting_shaped" in this case. 1 Quote
GiantNuker Posted August 14, 2017 Author Posted August 14, 2017 On 8/6/2017 at 2:02 AM, Choonster said: Are there any errors in the log? [19:33:12] [main/ERROR]: Parsing error loading recipe mopi:crafting com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 15 column 8 path $.key.S[0].item at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:494) ~[JsonUtils.class:?] at net.minecraft.util.JsonUtils.fromJson(SourceFile:532) ~[JsonUtils.class:?] at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$21(CraftingHelper.java:699) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper$$Lambda$97/1112485320.apply(Unknown Source) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:790) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:659) [CraftingHelper.class:?] at net.minecraftforge.common.crafting.CraftingHelper$$Lambda$95/2001998233.accept(Unknown Source) [CraftingHelper.class:?] at java.util.ArrayList.forEach(ArrayList.java:1249) [?:1.8.0_25] at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:614) [CraftingHelper.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:779) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:343) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:534) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:377) [Minecraft.class:?] at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_25] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 15 column 8 path $.key.S[0].item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:505) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414) ~[JsonReader.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:731) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:739) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714) ~[TypeAdapters$29.class:?] at com.google.gson.internal.bind.TypeAdapters$35$1.read(TypeAdapters.java:910) ~[TypeAdapters$35$1.class:?] at net.minecraft.util.JsonUtils.gsonDeserialize(SourceFile:492) ~[JsonUtils.class:?] ... 25 more Not sure what caused it, my recipes are almost exact vanilla copies Quote
jabelar Posted August 14, 2017 Posted August 14, 2017 If you get malformed JSON it means that you have something syntactically wrong, like an extra comma or missing brace somewhere. There are websites that can verify that your JSON is valid, and I use a JSON formatter plugin for Eclipse to help me make sure I did it all right. Basically you have a typo, which is easy to do in JSON files. Use a verifier and it will quickly be obvious. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
GiantNuker Posted August 15, 2017 Author Posted August 15, 2017 20 hours ago, jabelar said: If you get malformed JSON it means that you have something syntactically wrong, like an extra comma or missing brace somewhere. There are websites that can verify that your JSON is valid, and I use a JSON formatter plugin for Eclipse to help me make sure I did it all right. Basically you have a typo, which is easy to do in JSON files. Use a verifier and it will quickly be obvious. Verivier said it was OK Quote
Draco18s Posted August 15, 2017 Posted August 15, 2017 Expected name at line 15 column 8 path The json is valid JSON but it's missing a required key entry Quote 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.
GiantNuker Posted August 16, 2017 Author Posted August 16, 2017 On 8/14/2017 at 6:57 PM, Draco18s said: Expected name at line 15 column 8 path The json is valid JSON but it's missing a required key entry What entry, it is almost exactly a vanilla copy, one of the minecrart recipe, one of the cake recipe? Quote
Choonster Posted August 17, 2017 Posted August 17, 2017 On 14/08/2017 at 0:36 PM, GiantNuker said: [19:33:12] [main/ERROR]: Parsing error loading recipe mopi:crafting com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 15 column 8 path $.key.S[0].item This is a syntax error, not a missing entry. Post the mopi:crafting recipe file. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
GiantNuker Posted August 17, 2017 Author Posted August 17, 2017 20 hours ago, Choonster said: This is a syntax error, not a missing entry. Post the mopi:crafting recipe file. I did not know there had to be a <modid>:crafting json Quote
Choonster Posted August 18, 2017 Posted August 18, 2017 1 hour ago, GiantNuker said: I did not know there had to be a <modid>:crafting json mopi:crafting is expanded to assets/mopi/recipes/crafting.json, the mod ID isn't included in the file name. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
GiantNuker Posted August 18, 2017 Author Posted August 18, 2017 18 hours ago, Choonster said: mopi:crafting is expanded to assets/mopi/recipes/crafting.json, the mod ID isn't included in the file name. got confused, thought there had to be a file actully named "crafting.json" Quote
GiantNuker Posted August 20, 2017 Author Posted August 20, 2017 (edited) Still not working, just figured out file path was ".../recipe/..." instead of ".../recipes/..." LOL Edited August 20, 2017 by GiantNuker Quote
Recommended Posts
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.