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.

[1.16.5 official mapping] Specifying potion in recipe builder (Solved)

Featured Replies

Posted

How can I specify potions in recipes?

ShapelessRecipeBuilder.shapeless(ModItems.POSION_APPLE.get())
                .requires(Items.APPLE)
                .requires(Ingredient.of(PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.POISON)))
                .unlockedBy("has_item", has(Items.APPLE))
                .save(consumer);

It's not work
 

Edited by reasure

  • Author
ShapelessRecipeBuilder.shapeless(ModItems.POISON_APPLE.get())
                .requires(Items.APPLE)
                .requires(NBTIngredient.of(PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.POISON)))
                .unlockedBy("has_item", has(Items.APPLE))
                .save(consumer);

It's not work too

  • Author
{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:apple"
    },
    {
      "item": "minecraft:potion"
    }
  ],
  "result": {
    "item": "reasurecraft:poison_apple"
  }
}

Here is Json file

NBTIngredient doesn't have an of method itself, you're actually calling Ingredient.of. You need to create an instance of NBTIngredient directly (or a class that extends it, since the constructor is protected).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • reasure changed the title to [1.16.5 official mapping] Specifying potion in recipe builder (Solved)
  • Author
{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    {
      "item": "minecraft:apple"
    },
    {
      "type": "forge:nbt",
      "item": "minecraft:potion",
      "count": 1,
      "nbt": "{Potion:\"minecraft:poison\"}"
    }
  ],
  "result": {
    "item": "reasurecraft:poison_apple"
  }
}

It worked! Thank you!!!

Edited by reasure

  • 3 years later...

Ive been looking so hard for a guide on how to add a potion to a recipe for making paints in my mod. This the only one i found which works, and it took forever to find. Thanks a lot!

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.