Moved Key Events to KeyInputHandler

Added Spectator Menu and Mode to Replay
This commit is contained in:
Marius Metzger
2015-02-01 15:44:55 +01:00
parent 521bf52e79
commit 101a0359d3
13 changed files with 450 additions and 115 deletions

View File

@@ -28,23 +28,19 @@ public class CameraEntity extends EntityPlayer {
private double decay = 6; //decays by 75% per second;
private long lastCall = 0;
//frac = time since last tick
public void updateMovement() {
Minecraft mc = Minecraft.getMinecraft();
if(ReplayHandler.getCameraEntity() != null && mc.thePlayer != null) {
//Aligns the particle rotation
mc.thePlayer.rotationPitch = ReplayHandler.getCameraEntity().rotationPitch;
mc.thePlayer.rotationYaw = ReplayHandler.getCameraEntity().rotationYaw;
mc.thePlayer.rotationPitch = mc.getRenderViewEntity().rotationPitch;
mc.thePlayer.rotationYaw = mc.getRenderViewEntity().rotationYaw;
//removes water/suffocation/shadow overlays in screen
mc.thePlayer.posX = 0;
mc.thePlayer.posY = 500;
mc.thePlayer.posZ = 0;
//mc.thePlayer.posX = ReplayHandler.getCameraEntity().posX;
//mc.thePlayer.posY = ReplayHandler.getCameraEntity().posY;
//mc.thePlayer.posZ = ReplayHandler.getCameraEntity().posZ;
}
if(direction == null || motion < 0.1) {
@@ -182,5 +178,5 @@ public class CameraEntity extends EntityPlayer {
public boolean isSpectator() {
return true;
}
}