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

Okay, so this is kind of a follow-up to this post, so, I've now made a potion, and in the creative inventory, it appears. So do the Lingering and Splash variants. I do not want this. In the aforementioned post, diesieben07 mentioned using an IBrewingRecipe to do this. I have tried creating one for my potion, but I ended up deleting it in favour of BrewingRecipeRegistry.addRecipe(). However, my recipe doesn't work (I can't even insert my custom item that I want to use as an ingredient into a brewing stand), and I've no idea where in an IBrewingRecipe I''d disable potion variants. I'm 100% new to potions, how would I do this?

 

All help appreciated!

 

[Merged from a comment and edited to fit the present]

Okay, now, I've made a new IBrewingRecipe class called FlyingPotionRecipe, here's the code:

package ...

import ...

public class FlyingPotionRecipe implements IBrewingRecipe {
	
	private ItemStack output = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), ModPotions.FLYING_POTION);

	@Override
	public boolean isInput(ItemStack input) {
		return input.getItem() == PotionUtils.addPotionToItemStack(input, Potions.WATER).getItem();
	}

	@Override
	public boolean isIngredient(ItemStack ingredient) {
		return ingredient.getItem() == ModItems.GOLDEN_FEATHER;
	}

	@Override
	public ItemStack getOutput(ItemStack input, ItemStack ingredient) {
		return PotionUtils.addPotionToItemStack(output, ModPotions.FLYING_POTION);
	}

}

So, I've tested that now, and all looks good, but where in here would I set the splash and lingering potions on/off? TIA!

Edited by BlockyPenguin
Made title more descriptive

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

 Ignore this comment! ? sorry

Edited by BlockyPenguin
Merged with main post

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

  • Author

I was trying to check if what was in the input slot is the correct input (a water bottle)... I'm guessing that's not what it does? I couldn't find much up-to-date documentation on brewing, sorry if this is an obvious solution.

EDIT: So I've done some digging and I think what  you saying is to check if the input is a splash water bottle, right? Please bear in mind, I'd like these potions to completely disappear from the game, even the creative inventory. If I'm right, making sure that the input is not a splash potion won't remove it from the registry.

Edited by BlockyPenguin

Today (22/10/20) I reached 100 posts!

I'm probably more excited than I should be for something so realistically minor...

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.