Update Render Cache after window resize (#592)

Co-authored-by: slprime <history-21@yandex.ru>
This commit is contained in:
slprimeandslprime authored and GitHub committed 2025-01-19 11:33:26 -06:00
1 parent e3574800c0
commit 39578a4419
1 file changed
+3 -1
+3 -1
View File
@@ -43,7 +43,9 @@ public class ItemsGrid {
}
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();
}