Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

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.

  • 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
  }
}

  • 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
  }
  }
}

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.

  • 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?

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.