Skip to content

Commit

Permalink
Skip GL state manipulation in ItemDecoratorHandler when there are no …
Browse files Browse the repository at this point in the history
…decorators (neoforged#1737)
  • Loading branch information
embeddedt authored and Soaryn committed Jan 21, 2025
1 parent be68be9 commit 9302cf6
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 9302cf6

Please sign in to comment.