Added prerequisites for future Camera Tilt feature
This commit is contained in:
@@ -32,6 +32,8 @@ public class ReplayHandler {
|
||||
private static Entity currentEntity = null;
|
||||
private static Position lastPosition = null;
|
||||
|
||||
private static float cameraTilt = 0;
|
||||
|
||||
private static KeyframeSet[] keyframeRepository = new KeyframeSet[]{};
|
||||
|
||||
public static KeyframeSet[] getKeyframeRepository() {
|
||||
@@ -102,6 +104,18 @@ public class ReplayHandler {
|
||||
spectateCamera();
|
||||
}
|
||||
|
||||
public static float getCameraTilt() {
|
||||
return cameraTilt;
|
||||
}
|
||||
|
||||
public static void setCameraTilt(float tilt) {
|
||||
cameraTilt = tilt;
|
||||
}
|
||||
|
||||
public static void addCameraTilt(float tilt) {
|
||||
cameraTilt += tilt;
|
||||
}
|
||||
|
||||
public static void sortKeyframes() {
|
||||
Collections.sort(keyframes, new KeyframeComparator());
|
||||
}
|
||||
@@ -281,6 +295,8 @@ public class ReplayHandler {
|
||||
channel.close();
|
||||
}
|
||||
|
||||
setCameraTilt(0);
|
||||
|
||||
networkManager = new NetworkManager(EnumPacketDirection.CLIENTBOUND);
|
||||
INetHandlerPlayClient pc = new NetHandlerPlayClient(mc, null, networkManager, new GameProfile(UUID.randomUUID(), "Player"));
|
||||
networkManager.setNetHandler(pc);
|
||||
|
||||
Reference in New Issue
Block a user