Fix potion-based fluid recipes. #9563
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
58876e2 migrated from a custom ingredient handler for fluids to NeoForge's
SizedFluidIngredient.In some places, references were updated to use a
SizedFluidIngredientcontaining aDataComponentFluidIngredientin order to preserve behaviors which would require the presence of specific components in fluid ingredients (the previous behavior).In other places, references were updated to use
SizedFluidIngredient.of(FluidStack stack), which discards components when creating the fluid ingredient.This resulted in #9474, where potion recipes were effectively created such that a non-fluid potion ingredient could be mixed with any potion base to create (one of) the possible outputs when brewing a potion with said ingredient.
This change updates the potion-mixing recipes logic to use a
DataComponentFluidIngredientas the base fluid ingredient inside theSizedFluidIngredient, fixing#9474.
This change also updates JEI integration code to similarly use
DataComponentFluidIngredients, fixing visualization issues with potion-bottle and potion-application (e.g., redstone from cinder flour) recipes.Adds tests to verify potion brewing and potion-application recipes function as intended.