Skip to content

Commit

Permalink
Backport to 1.21.1: Skip GL state manipulation in ItemDecoratorHandle…
Browse files Browse the repository at this point in the history
…r when there are no decorators (#1904)

Co-authored-by: embeddedt <[email protected]>
  • Loading branch information
neoforged-automation[bot] and embeddedt authored Jan 24, 2025
1 parent 47f9d24 commit 8e82c7b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public static ItemDecoratorHandler of(ItemStack stack) {
}

public void render(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) {
if (itemDecorators.isEmpty()) {
return;
}

RenderSystem.backupGlState(stateBackup);

resetRenderState();
Expand Down

0 comments on commit 8e82c7b

Please sign in to comment.