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

@@ -17,8 +17,6 @@ public class ReplayScreenshot {
private static Minecraft mc = Minecraft.getMinecraft();
private static long last_finish = -1;
private static boolean before;
private static double beforeSpeed;
private static GuiScreen beforeScreen;
@@ -103,9 +101,5 @@ public class ReplayScreenshot {
exception.printStackTrace();
ReplayMod.chatMessageHandler.addLocalizedChatMessage("replaymod.chat.failedthumb", ChatMessageType.WARNING);
}
last_finish = System.currentTimeMillis();
}
}

View File

@@ -50,7 +50,7 @@ public class ScreenCapture {
pixelBuffer.get(pixelValues);
TextureUtil.processPixelValues(pixelValues, width, height);
BufferedImage bufferedimage = null;
BufferedImage bufferedimage;
if(OpenGlHelper.isFramebufferEnabled()) {

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) {

View File

@@ -132,10 +132,6 @@ public class VideoWriter {
writerThread.start();
}
public void setQueueLimit(int limit) {
this.queueLimit = limit;
}
/**
* Add the image to the writer queue.
* @param image The image

View File

@@ -10,7 +10,7 @@ import net.minecraft.util.ResourceLocation;
public class CubicEntityRenderer extends CustomEntityRenderer {
public static enum Direction {
public enum Direction {
TOP(1), BOTTOM(9), LEFT(4), FRONT(5), RIGHT(6), BACK(7);
private final int frame;

View File

@@ -434,11 +434,11 @@ public abstract class CustomEntityRenderer {
}
}
public static interface GluPerspectiveHook {
public interface GluPerspectiveHook {
void gluPerspective(float fovY, float aspect, float zNear, float zFar);
}
public static interface LoadShaderHook {
public interface LoadShaderHook {
void loadShader(ResourceLocation resourceLocation);
}
}