Skip to content

Commit

Permalink
#3630 Add defensive push/pop pose around IRecipeTransferError#showError
Browse files Browse the repository at this point in the history
  • Loading branch information
mezz committed Jul 25, 2024
1 parent 5967952 commit a6ce5ff
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package mezz.jei.gui.recipes;

import com.mojang.blaze3d.vertex.PoseStack;
import mezz.jei.api.gui.IRecipeLayoutDrawable;
import mezz.jei.api.gui.drawable.IDrawable;
import mezz.jei.api.gui.ingredient.IRecipeSlotsView;
Expand Down Expand Up @@ -119,7 +120,12 @@ public void draw(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialT
if (isMouseOver(mouseX, mouseY)) {
IRecipeSlotsView recipeSlotsView = recipeLayout.getRecipeSlotsView();
Rect2i recipeRect = recipeLayout.getRect();
recipeTransferError.showError(guiGraphics, mouseX, mouseY, recipeSlotsView, recipeRect.getX(), recipeRect.getY());
PoseStack poseStack = guiGraphics.pose();
poseStack.pushPose();
{
recipeTransferError.showError(guiGraphics, mouseX, mouseY, recipeSlotsView, recipeRect.getX(), recipeRect.getY());
}
poseStack.popPose();
}
}
}
Expand Down

0 comments on commit a6ce5ff

Please sign in to comment.