Significantly improved the performance of video rendering by using the magic of multithreading

This commit is contained in:
Marius Metzger
2015-04-05 02:10:44 +02:00
parent 9df94fd789
commit e7c2a462f3
5 changed files with 22 additions and 12 deletions

View File

@@ -121,7 +121,6 @@ public class GuiReplayOverlay extends Gui {
@SubscribeEvent
public void tick(TickEvent event) {
if(!ReplayHandler.isInReplay()) return;
if(ReplayHandler.isInPath()) ReplayProcess.unblockAndTick();
if(ReplayHandler.getCameraEntity() != null)
ReplayHandler.getCameraEntity().updateMovement();
if(!ReplayHandler.isInPath()) onMouseMove(new MouseEvent());
@@ -145,15 +144,15 @@ public class GuiReplayOverlay extends Gui {
throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException, IOException {
if(!ReplayHandler.isInReplay()) return;
if(ReplayHandler.isInPath()) ReplayProcess.unblockAndTick();
if(ReplayHandler.isCamera()) ReplayHandler.setCameraEntity(ReplayHandler.getCameraEntity());
if(ReplayHandler.isInReplay() && ReplayHandler.isPaused()) {
if(mc != null && mc.thePlayer != null)
MinecraftTicker.runMouseKeyboardTick(mc);
}
if((mc.getRenderViewEntity() == mc.thePlayer || !mc.getRenderViewEntity().isEntityAlive())
&& ReplayHandler.getCameraEntity() != null) {
&& ReplayHandler.getCameraEntity() != null && !ReplayHandler.isInPath()) {
ReplayHandler.spectateCamera();
ReplayHandler.getCameraEntity().movePath(new Position(lastX, lastY, lastZ, lastPitch, lastYaw));
} else if(!ReplayHandler.isCamera()) {
lastX = mc.getRenderViewEntity().posX;
lastY = mc.getRenderViewEntity().posY;