Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

(1.12.2) Recipe GoldenApple:1


MrSawZ
 Share

Recommended Posts

Hello,

I have created a recipe for the golden apple data 1 in my mod but i got this error:

 

[00:56:42] [main/ERROR] [FML]: Parsing error loading recipe sm:gap
com.google.gson.JsonSyntaxException: Unknown recipe type: sm:crafting_shaped
	at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:407) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:711) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:822) ~[CraftingHelper.class:?]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:668) ~[CraftingHelper.class:?]
	at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_201]
	at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:620) [CraftingHelper.class:?]
	at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:581) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_201]
	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_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_201]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_201]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:25) [start/:?]

 

Here's my recipe:

{
    "type": "crafting_shaped",
    "pattern": [
        "#D#",
        "DGD",
        "#D#"
    ],
    "key": {
        "#": {
            "item": "minecraft:gold_block"
        },
        "D": {
            "item": "minecraft:diamond_block"
        },
        "G": {
            "item": "minecraft:golden_apple",
            "data": 0
        }
    },
    "result": {
        "item": "minecraft:golden_apple",
        "data": 1,
        "count": 1
    }
}

 

Can you help me, please? :c 

 

Link to comment
Share on other sites

2 hours ago, MrSawZ said:

Unknown recipe type: sm:crafting_shaped

 

2 hours ago, MrSawZ said:

"type": "crafting_shaped",

 

This seems to be your problem. According to the documentation here, the proper type is "minecraft:crafting_shaped", not "crafting_shaped". It looks like that by leaving off "minecraft:" the game assumes you are using a custom recipe, which is why it's looking for the recipe type "sm:crafting_shaped" ("sm" must be your modid).

 

If you're trying to use a custom recipe type, perhaps the name you gave it in your _factories.json file isn't "crafting_shaped" because you had a typo.

 

On another note, it would be good to get a longer modid. You might be using a two-letter one because of a tutorial you followed, but there is pretty much no reason to not use a longer, more descriptive one. That will minimize the chances for conflicts between your mod and other mod!

Link to comment
Share on other sites

"sm" is a bad mod ID that will conflict with other mods.

You should use a longer mod ID than just 2 letters.

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

14 hours ago, MrSawZ said:

it's a private mod for my server so the conflicts are minimal but that's a good tip

You have 64 characters worth of length available. Use it.

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.