Fix all warnings

Add and make use of Lombok
Remove Mojang API
Remove ZipFileUtils
Remove StreamTools in favor of Apache IOUtils
Keyframe should be abstract all derivatives final
Replace clone in Keyframe with copy
Move some constants from GuiReplaySetttings to GuiConstants
This commit is contained in:
johni0702
2015-06-29 21:45:37 +02:00
parent 3122c0a71e
commit a058497727
110 changed files with 487 additions and 1921 deletions

View File

@@ -193,7 +193,9 @@ public class VideoRenderer {
PositionKeyframe nextPos = null;
if (movement == null || lastPos == null) {
// Stay at one position, no movement
pos = ReplayHandler.getNextPositionKeyframe(-1).getPosition();
PositionKeyframe keyframe = ReplayHandler.getNextPositionKeyframe(-1);
assert keyframe != null;
pos = keyframe.getPosition();
} else {
// Position interpolation
nextPos = ReplayHandler.getNextPositionKeyframe(videoTime);
@@ -267,8 +269,7 @@ public class VideoRenderer {
}
if(!(nextTime == null || lastTime == null)) {
if(lastTimeStamp == nextTimeStamp) curSpeed = 0f;
else curSpeed = ((double)((nextTime.getTimestamp()-lastTime.getTimestamp())))/((double)((nextTimeStamp-lastTimeStamp)));
curSpeed = ((double)((nextTime.getTimestamp()-lastTime.getTimestamp())))/((double)((nextTimeStamp-lastTimeStamp)));
}
if(lastTimeStamp == nextTimeStamp) {