Build: 1.14.2-2.60.0.14-mdk
The 1.12.2 PotionHelper class has been renamed to PotionBrewing for 1.14.2; however methods like addMix, addContainer, and addContainerRecipe are no longer public and I don't see an alternate way to add modded items to brewing.
williewullus noted this might be a simple issue with the forge AT not being updated to handle the name change.
Is there an alternate way to register brewing recipes in 1.14.3? This issue doesn't seem to be something of interest and many mods must alter brewing so maybe I'm missing how this functionality is done for modded now.
After you register the potion and effect, you can register the recipe like this:
Ingredient base = Ingredient.fromStacks(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER));
Ingredient reagant = Ingredient.fromStacks(new ItemStack(Items.COCOA_BEANS));
ItemStack out = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), potion);
BrewingRecipeRegistry.addRecipe(new BrewingRecipe(base, reagant, out));
The above is what I'm using for Charm's "Coffee" potion in 1.14.4 and it seems to work fine as a solution until the addMix() is made public.
Thanks, this was my "plan B" which is looking like the "plan A" for the forseeable future...
It might actually be good that addMix and friends are private. This way the original Vanilla recipes are untouched, with mod recipes added separately to the BrewingRecipeRegistry on top. Maybe a few overloads should be added to BrewingRecipe to replicate those helper method signatures. The only reason to modify the vanilla ones would then be to remove any, which would be fairly rare.
I use the brewing recipes currently but the old (and new) addMix are not modifications to vanilla recipes although they can supplement them. I think to replace the vanilla ones, you'd have to alter the registry(?!) and/or go in and clear the internal lists inside this class. Even with custom recipes I have problems with addContainer being private as it's a modifier for containers (like splash->lingering) that a recipe does not cover.
Don't know about addContainer, but with addMix even if you AT that and use it, all it will do would be adding to the registry a vanilla recipe. It would still work as the way BrewingRecipeRegistry contains one "vanilla recipe" that then checks against all of the recipes in vanilla's map.
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___." or "Here's a screenshot of this issue on the latest version"). Thank you for your contributions!
I opened a PR for this url feedbacks wanted
Most helpful comment
Thanks, this was my "plan B" which is looking like the "plan A" for the forseeable future...