Fix jittering once a tick during rendering pre-1.16 (fixes #264)

The fetching of the ticks variable was accidentally moved to before the timer
update while updating to 1.16, this caused the interpolation to be off by one
tick each frame in which the timer advances to the next tick.
This commit is contained in:
Jonas Herzig
2020-07-25 16:57:36 +02:00
parent fc1ae0e109
commit 5983d99354

View File

@@ -236,14 +236,15 @@ public class VideoRenderer implements RenderInfo {
RenderTickCounter timer = ((MinecraftAccessor) mc).getTimer();
//#if MC>=11600
//$$ int elapsedTicks =
//#else
int elapsedTicks = timer.ticksThisFrame;
//#endif
timer.beginRenderTick(
//#if MC>=11400
MCVer.milliTime()
//#endif
);
//#if MC<11600
int elapsedTicks = timer.ticksThisFrame;
//#endif
executeTaskQueue();