Jump to content

Recommended Posts

Posted

I am trying to add a crafting table recipe via JSON

{
    "type": "minecraft:crafting_shaped",
   
    "pattern":
    [
        "AAA",
        "ALA",
        "AAA"
    ],
   
    "key":
    {
        "A":
        {
            "item": "crumblemod:arcana_shards"
        },
        
        "L":
        {
            "item": "minecraft:oak_log"
        }
    },
   
    "result":
    {
        "item": "crumblemod:magic_logs_block",
        "count": 1
    }
}

All my other recipes work just fine, yet with this JSON recipe for some reason it throws the exception:

Quote

[main/ERROR] [FML]: Parsing error loading recipe crumblemod:magic_logs
com.google.gson.JsonSyntaxException: Unknown item 'minecraft:oak_log'

As in it cannot find the vanilla item oak logs. If I swap out oak logs with something like glass, however, the recipe would work again. What might be causing this?

Posted
9 minutes ago, Lumby said:

What might be causing this?

The oak log isnt called minecraft:oak_log yet, that is its name in 1.13. In 1.12 you need to use its metadata value via the data tag in the JSON.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Thanks for the help! Is there any way where I can make the recipe so that it takes in any type of logs (oak, birch, jg) or do I have to make an individual json for every log type?

Posted
2 minutes ago, Lumby said:

Thanks for the help! Is there any way where I can make the recipe so that it takes in any type of logs (oak, birch, jg) or do I have to make an individual json for every log type?

You would need to use ore dict there was a post recently on how to do any type of planks it should function the same as the answer on there. 

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Nvm, I got it, sorry I'm new to using data tags in JSON. Found out if I add "data": 32767 as the data tag it'll accept any type of log since 32767 is the wildcard value

Posted
1 hour ago, Lumby said:

Nvm, I got it, sorry I'm new to using data tags in JSON. Found out if I add "data": 32767 as the data tag it'll accept any type of log since 32767 is the wildcard value

You only want to do it this way if you don't want other modded logs to work with the recipe. If you want them to work then you must use the ore dictionary method.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.

Announcements



×
×
  • Create New...

Important Information

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