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 poseStack translation leak in JEI RecipeTransferCraftingGridError #3718

Open
wants to merge 1 commit into
base: develop
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
Fix poseStack translation leak in JEI RecipeTransferCraftingGridError
  • Loading branch information
mezz committed Jul 25, 2024
commit c41d3fa418306d6a6653bf9404d76b47c3c44068
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.refinedmods.refinedstorage.integration.jei;

import com.mojang.blaze3d.vertex.PoseStack;
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
import mezz.jei.api.recipe.transfer.IRecipeTransferError;
import net.minecraft.ChatFormatting;
@@ -39,9 +40,12 @@ public int getButtonHighlightColor() {

@Override
public void showError(GuiGraphics graphics, int mouseX, int mouseY, IRecipeSlotsView recipeSlotsView, int recipeX, int recipeY) {
graphics.pose().translate(recipeX, recipeY, 0);
PoseStack poseStack = graphics.pose();
poseStack.pushPose();
poseStack.translate(recipeX, recipeY, 0);
List<Component> message = drawIngredientHighlights(graphics, recipeX, recipeY);
graphics.renderComponentTooltip(Minecraft.getInstance().font, message, mouseX, mouseY);
poseStack.popPose();
}

protected List<Component> drawIngredientHighlights(GuiGraphics graphics, int recipeX, int recipeY) {
Loading