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

@@ -1,33 +1,15 @@
package eu.crushedpixel.replaymod.holders;
public class Keyframe {
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode
@AllArgsConstructor
public abstract class Keyframe {
private int realTimestamp;
public Keyframe clone() {
return new Keyframe(realTimestamp);
}
public Keyframe(int realTimestamp) {
this.realTimestamp = realTimestamp;
}
public int getRealTimestamp() {
return realTimestamp;
}
public void setRealTimestamp(int realTimestamp) { this.realTimestamp = realTimestamp; }
@Override
public boolean equals(Object o2) {
if(o2 == null) return false;
if(!(o2 instanceof Keyframe)) return false;
Keyframe kf = (Keyframe)o2;
return hashCode() == kf.hashCode();
}
@Override
public int hashCode() {
return realTimestamp;
}
public abstract Keyframe copy();
}