CameraEntity now registers itself. It doesn't need external code doing its job!

This commit is contained in:
CrushedPixel
2015-07-16 17:45:52 +02:00
parent 86bd646b35
commit a19317ecdd
2 changed files with 3 additions and 4 deletions

View File

@@ -204,16 +204,13 @@ public class ReplayHandler {
}
public static CameraEntity getCameraEntity() {
if(cameraEntity == null && mc.theWorld != null) cameraEntity = new CameraEntity(mc.theWorld);
return cameraEntity;
}
public static void setCameraEntity(CameraEntity entity) {
if(entity == null) return;
if (cameraEntity != null) {
FMLCommonHandler.instance().bus().unregister(cameraEntity);
}
cameraEntity = entity;
FMLCommonHandler.instance().bus().register(cameraEntity);
spectateCamera();
}