Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fluid slot role being incorrect for fluid inputs #8035

Open
wants to merge 1 commit into
base: mc1.20.1/dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static IRecipeSlotRichTooltipCallback addStochasticTooltip(ProcessingOutp
@SuppressWarnings("removal") // see below
public static IRecipeSlotBuilder addFluidSlot(IRecipeLayoutBuilder builder, int x, int y, FluidIngredient ingredient) {
int amount = ingredient.getRequiredAmount();
return builder.addSlot(RecipeIngredientRole.OUTPUT, x, y)
return builder.addSlot(RecipeIngredientRole.INPUT, x, y)
.setBackground(getRenderedSlot(), -1, -1)
.addIngredients(ForgeTypes.FLUID_STACK, ingredient.getMatchingFluidStacks())
.setFluidRenderer(amount, false, 16, 16) // make fluid take up the full slot

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 1 to replace the amount is sufficient enough to make the fluid take up the full slot (JEI will limit the rendered fluid not exceeding the height limit), which should eliminate the need to pass in the fluid ingredient or fluid stack to get the amount, and allows rendering multiple fluid stacks that might not be of the same size in the slot, the current methods can still be left as short cuts.

Expand Down