Fix camera spectating entity of previous world when restarting replay
This commit is contained in:
@@ -52,13 +52,10 @@ public class CameraEntity extends EntityPlayerSP {
|
||||
|
||||
private boolean speedup = false;
|
||||
|
||||
private UUID spectating;
|
||||
private static UUID spectating;
|
||||
|
||||
public CameraEntity(Minecraft mcIn, World worldIn, NetHandlerPlayClient netHandlerPlayClient, StatFileWriter statFileWriter) {
|
||||
super(mcIn, worldIn, netHandlerPlayClient, statFileWriter);
|
||||
if (mc.thePlayer instanceof CameraEntity) {
|
||||
spectating = ((CameraEntity) mc.thePlayer).spectating;
|
||||
}
|
||||
}
|
||||
|
||||
//frac = time since last tick
|
||||
@@ -217,6 +214,14 @@ public class CameraEntity extends EntityPlayerSP {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preparePlayerToSpawn() {
|
||||
if (mc.theWorld != null) {
|
||||
worldObj = mc.theWorld;
|
||||
}
|
||||
super.preparePlayerToSpawn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEntityInsideOpaqueBlock() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user