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

I had upgraded my mod to use the json recipes as part of the 1.12.X port and I believe they were working find when I first tested them. I used to use a custom recipe handler in the pre-1.12 versions.

However I've recently retested due to a bug report (StoredEnchandments needing to use shorts in the nbt) and seem to be getting the same output item for all the recipes that have the all the same ingredients, apart from a different enchanted book.

These recipes all use vanilla enchanted books as an ingredient.

JEI shows the correct output for the input ingredients, but the vanilla crafting table gives the wrong output.

 

I've updated to using Forge 14.23.1.2554 with no difference.

 

eg. 

rate 1 upgrade (metadata 0) - factory base + t1 upgrade core + power I enchanted book -> output is decapitate I (metadata 12)

looting 1 upgrade (metadata 3) - factory base + t1 upgrade core + looting I enchanted book -> output is decapitate I (metadata 12)

 

https://github.com/Ipsis/Woot/tree/1_12/src/main/resources/assets/woot/recipes

https://github.com/Ipsis/Woot/blob/1_12/src/main/resources/assets/woot/recipes/upgrade_looting_i.json

https://github.com/Ipsis/Woot/blob/1_12/src/main/resources/assets/woot/recipes/upgrade_rate_i.json

https://github.com/Ipsis/Woot/blob/1_12/src/main/resources/assets/woot/recipes/upgrade_decapitate_i.json

 

 

All the recipes with enchanted books output the same item but with different metadata. 

 "result": {
    "item": "woot:upgrade",
    "data": 3
  },

 

 

This is the format of ingredient I was using successfully(?) before, probably during 1.12 development rather than 1.12.1 or 1.12.2.

    {
      "type": "minecraft:item_nbt",
      "item": "minecraft:enchanted_book",
      "nbt": {
        "StoredEnchantments": [
          {
            "id": 21,
            "lvl": 1
          }
        ]
      }
    }

 

I've also tried using the vanilla string nbt version of this with the same results.

     {
       "type": "minecraft:item_nbt",
       "item": "minecraft:enchanted_book",
      "nbt": "{ StoredEnchantments: [ { id: 32s, lvl: 1s } ] }"
     }

 

Edited by Ipsissimus418

  • Author

So I think I've solved this, because my upgrade to Forge 14.23.1.2554 didn't fully refresh the dev environment.

Now that I'm definitely running with the latest forge, it looks like my recipe issues are not happening anymore and I've getting unique items.

 

So I'll pass on my apologies for wasting peoples time.

(No matter how much you check, you always miss the obvious!)

 

 

  • 3 years later...

Man you're a legend! 

I was searching the wide web on how to get enchanted books into crafting recipes in json format and stumbled upon your post. The format 

{
      "type": "minecraft:item_nbt",
      "item": "minecraft:enchanted_book",
      "nbt": {
        "StoredEnchantments": [
          {
            "id": minecraft:sharpness,
            "lvl": 1
          }
        ]
      }
    }

still works on 1.16.5 forge, so thanks alot!

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.