Added static reference to current VideoRenderer instance to allow CustomObjectRenderer to correctly interpolate Object Transformations while rendering

This commit is contained in:
CrushedPixel
2015-07-12 18:59:19 +02:00
parent cb912d7e54
commit 06686d20a6
3 changed files with 11 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import eu.crushedpixel.replaymod.gui.GuiObjectManager;
import eu.crushedpixel.replaymod.holders.Position;
import eu.crushedpixel.replaymod.holders.Transformation;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
@@ -71,7 +72,9 @@ public class CustomObjectRenderer {
int renderTimestamp;
if(mc.currentScreen instanceof GuiObjectManager) {
renderTimestamp = ((GuiObjectManager)mc.currentScreen).getObjectKeyframeTimeline().cursorPosition;
renderTimestamp = ((GuiObjectManager) mc.currentScreen).getObjectKeyframeTimeline().cursorPosition;
} else if(ReplayProcess.isVideoRecording()) {
renderTimestamp = ReplayProcess.getVideoRenderer().getVideoTime();
} else {
renderTimestamp = ReplayHandler.getRealTimelineCursor();
}