Skip to content

Commit

Permalink
Update Render Cache after window resize (#592)
Browse files Browse the repository at this point in the history
Co-authored-by: slprime <[email protected]>
  • Loading branch information
slprime and slprime authored Jan 19, 2025
1 parent e357480 commit 39578a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/codechicken/nei/ItemsGrid.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ protected int getGridRenderingCacheFPS(int mode) {
}

public boolean needRefresh(int mode) {
return this.nextCacheRefresh == 0
final Minecraft minecraft = Minecraft.getMinecraft();
return this.nextCacheRefresh == 0 || this.framebuffer.framebufferWidth != minecraft.displayWidth
|| framebuffer.framebufferHeight != minecraft.displayHeight
|| getGridRenderingCacheFPS(mode) > 0 && this.nextCacheRefresh < System.currentTimeMillis();
}

Expand Down

0 comments on commit 39578a4

Please sign in to comment.