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
  • Loading branch information
embeddedt committed Dec 4, 2024
1 parent 4824499 commit 59bf3cf
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 59bf3cf

Please sign in to comment.