Skip to content

Commit c4c7d94

Browse files
authored
Skip GL state manipulation in ItemDecoratorHandler when there are no decorators (#1737)
1 parent 220ce16 commit c4c7d94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/main/java/net/neoforged/neoforge/client/ItemDecoratorHandler.java

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ public static ItemDecoratorHandler of(ItemStack stack) {
5050
}
5151

5252
public void render(GuiGraphics guiGraphics, Font font, ItemStack stack, int xOffset, int yOffset) {
53+
if (itemDecorators.isEmpty()) {
54+
return;
55+
}
56+
5357
RenderSystem.backupGlState(stateBackup);
5458

5559
resetRenderState();

0 commit comments

Comments
 (0)