Posted August 5, 20187 yr When I Run the client, and put the items in the correct order in the crafting table, nothing comes out at all! Here is my json file: { "type": "minecraft:crafting_shaped", "pattern": [ " A ", "ASA", " A " ], "key": { "S": { "item": "minecraft:bone" }, "A": [ { "item": "minecraft:cooked_beef" }, ] }, "result": { "item": "im:pet_treat" } } im:pet_treat is an item id in the game. I tested this with other items and blocks and even changed the result but it still didn't work. Can anyone help?
August 5, 20187 yr Your recipe json has syntax errors. Specifically these lines: 7 minutes ago, cherrylime said: "A": [ { "item": "minecraft:cooked_beef" }, ] As an advice - install any kind of json syntax plugin in your IDE. It will then tell you if your json has syntax errors. Alternatively you can check your json files through a json validator like jsonlint.
August 5, 20187 yr Author Here is my new code. It still does not work. Do I have to do anything to register the crafting recipe? { "type": "minecraft:crafting_shaped", "pattern": [ " A ", "ASA", " A " ], "key": { "S": { "item": "minecraft:bone" }, "A": [ { "item": "minecraft:cooked_beef" }, ] }, "result": { "item": "im:pet_treat", "data": 0 } }
August 5, 20187 yr Author I changed the code to this to make the JSON valid, but it still is not working in the game. { "type": "minecraft:crafting_shaped", "pattern": [ " A ", "ASA", " A " ], "key": { "S": { "item": "minecraft:bone" }, "A": { "item": "minecraft:cooked_beef" }, "result": { "item": "im:pet_treat", "data": 0 } } }
August 5, 20187 yr Your result object is specified as one of the keys. It needs to be it's own object with no parent.
August 5, 20187 yr By changing the structure of your json. Currently your result property is one of the properties specified in the key object. It however must be on the same level as the type property(have no parent). Pull it up one level. See this page on the minecraft wiki for the json structure.
August 5, 20187 yr Author I have changed my code to this: { "type": "minecraft:crafting_shaped", "pattern": [ " A ", "ASA", " A " ], "key": { "S": { "item": "minecraft:bone" }, "A": { "item": "minecraft:cooked_beef" } } "result": { "item": "im:pet_treat", "data": 0 } } However no result shows up. Do I need to register this crafting recipe on a different class or interface?
August 5, 20187 yr Your json now contains syntax errors. It's missing a comma just before the result property.
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.