In the TickAndRenderListenener, replace the tick() Method which listens to all TickEvents with a onRenderTick Method which listens only to RenderTickEvents. This way, Key and Mouse Inputs aren't fired more frequently while the Replay is not paused. (Camera Roll has the same speed now while paused and unpaused)

This commit is contained in:
CrushedPixel
2015-08-20 11:41:41 +02:00
parent b63f19d082
commit e4b52c62f8

View File

@@ -10,7 +10,6 @@ import net.minecraftforge.client.event.MouseEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
@@ -61,7 +60,7 @@ public class TickAndRenderListener {
}
@SubscribeEvent
public void tick(TickEvent event) {
public void onRenderTick(TickEvent.RenderTickEvent event) {
if(!ReplayHandler.isInReplay() || ReplayProcess.isVideoRecording()) return;
if(ReplayHandler.getCameraEntity() != null)
@@ -70,7 +69,7 @@ public class TickAndRenderListener {
ReplayProcess.tickReplay(true);
} else onMouseMove(new MouseEvent());
FMLCommonHandler.instance().bus().post(new InputEvent.KeyInputEvent());
FMLCommonHandler.instance().fireKeyInput();
}
@SubscribeEvent