Wait until world has loaded when previewing a Camera Path
Clean up unused fields and thus unnecessary methods in ReplayProcess
This commit is contained in:
@@ -52,7 +52,7 @@ public class TickAndRenderListener {
|
||||
});
|
||||
}
|
||||
|
||||
if(ReplayHandler.isInPath()) ReplayProcess.unblockAndTick(false);
|
||||
if(ReplayHandler.isInPath()) ReplayProcess.tickReplay(false);
|
||||
if(ReplayHandler.isCamera()) mc.setRenderViewEntity(ReplayHandler.getCameraEntity());
|
||||
if(mc.getRenderViewEntity() != null && (mc.getRenderViewEntity() == mc.thePlayer || !mc.getRenderViewEntity().isEntityAlive())
|
||||
&& ReplayHandler.getCameraEntity() != null && !ReplayHandler.isInPath()) {
|
||||
@@ -71,7 +71,7 @@ public class TickAndRenderListener {
|
||||
if(ReplayHandler.getCameraEntity() != null)
|
||||
ReplayHandler.getCameraEntity().updateMovement();
|
||||
if(ReplayHandler.isInPath()) {
|
||||
ReplayProcess.unblockAndTick(true);
|
||||
ReplayProcess.tickReplay(true);
|
||||
} else onMouseMove(new MouseEvent());
|
||||
|
||||
FMLCommonHandler.instance().bus().post(new InputEvent.KeyInputEvent());
|
||||
|
||||
@@ -15,6 +15,7 @@ import eu.crushedpixel.replaymod.video.VideoRenderer;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiErrorScreen;
|
||||
import net.minecraft.client.renderer.chunk.RenderChunk;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.util.ReportedException;
|
||||
@@ -42,8 +43,6 @@ public class ReplayProcess {
|
||||
private static VideoRenderer videoRenderer = null;
|
||||
|
||||
private static boolean isVideoRecording = false;
|
||||
private static boolean blocked = false;
|
||||
private static boolean deepBlock = false;
|
||||
private static boolean requestFinish = false;
|
||||
private static boolean firstTime = false;
|
||||
|
||||
@@ -60,8 +59,6 @@ public class ReplayProcess {
|
||||
calculated = false;
|
||||
requestFinish = false;
|
||||
|
||||
blocked = deepBlock = false;
|
||||
|
||||
lastRealTime = System.currentTimeMillis();
|
||||
lastRealReplayTime = 0;
|
||||
linear = ReplayMod.replaySettings.isLinearMovement();
|
||||
@@ -145,12 +142,6 @@ public class ReplayProcess {
|
||||
ReplayMod.replaySender.setReplaySpeed(0);
|
||||
}
|
||||
|
||||
public static void unblockAndTick(boolean justCheck) {
|
||||
if(!deepBlock) blocked = false;
|
||||
if(!blocked || !isVideoRecording())
|
||||
ReplayProcess.tickReplay(justCheck);
|
||||
}
|
||||
|
||||
//if justCheck is true, no Screenshot will be taken, it will only be checked
|
||||
//whether all chunks have been rendered. This is necessary because no Render ticks
|
||||
//are called if the Timer speed is set to 0, leading to this method never being
|
||||
@@ -165,6 +156,13 @@ public class ReplayProcess {
|
||||
}
|
||||
|
||||
if(firstTime) {
|
||||
if(RenderChunk.renderChunksUpdated != 0 || mc.currentScreen != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
lastRealTime = System.currentTimeMillis();
|
||||
lastRealReplayTime = 0;
|
||||
|
||||
firstTime = false;
|
||||
mc.timer.renderPartialTicks = 100;
|
||||
mc.timer.elapsedPartialTicks = 100;
|
||||
|
||||
Reference in New Issue
Block a user