-
Bug
-
Resolution: Fixed
-
1.21
-
None
-
Community Consensus
-
UI
-
Normal
-
Platform
Screens relying on partial ticks for interpolation are using the wrong value in 1.21, causing animations to be played in extremely low FPS. As an example, a video clip of the Enchanting Table's book (which relies on partial ticks) is attached. The first clip shows 1.20.1, and the latter shows 1.21. The FPS difference is extremely noticeable.
The source of the problem lies in using the wrong method when calling render for both the overlay and the current screen. Both uses of getRealtimeDeltaTicks in the following code block (from GameRenderer) should be replaced with getGameTimeDeltaPartialTick(false)
Snippet from GameRenderer#render:
if (this.minecraft.getOverlay() != null) { try { this.minecraft.getOverlay().render(guigraphics, i, j, p_348648_.getRealtimeDeltaTicks()); } catch (Throwable throwable2) { CrashReport crashreport = CrashReport.forThrowable(throwable2, "Rendering overlay"); CrashReportCategory crashreportcategory = crashreport.addCategory("Overlay render details"); crashreportcategory.setDetail("Overlay name", () -> this.minecraft.getOverlay().getClass().getCanonicalName()); throw new ReportedException(crashreport); } } else if (flag && this.minecraft.screen != null) { try { this.minecraft.screen.renderWithTooltip(guigraphics, i, j, p_348648_.getRealtimeDeltaTicks());