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

@@ -39,14 +39,6 @@ public class GuiReplaySpeedSlider extends GuiButton implements GuiElement {
displayString = displayKey + ": 1x";
}
public static float convertScaleRet(float value) {
if(value <= 1) {
return Math.round(value * 10);
}
float steps = value - 1;
return Math.round(steps / 0.25f);
}
public static float convertScale(float value) {
if(value == 10) {
return 1;
@@ -89,6 +81,7 @@ public class GuiReplaySpeedSlider extends GuiButton implements GuiElement {
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
} catch(Exception e) {
// TODO: Fix exception
}
}
}
@@ -121,6 +114,7 @@ public class GuiReplaySpeedSlider extends GuiButton implements GuiElement {
this.drawTexturedModalRect(this.xPosition + (int) (sliderValue * (float) (this.width - 8)), this.yPosition, 0, 66, 4, 20);
this.drawTexturedModalRect(this.xPosition + (int) (sliderValue * (float) (this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
} catch(Exception e) {
// TODO: Fix exception
}
}
}
@@ -129,13 +123,6 @@ public class GuiReplaySpeedSlider extends GuiButton implements GuiElement {
return MathHelper.clamp_float((this.snapToStepClamp(p_148266_1_) - this.valueMin) / (this.valueMax - this.valueMin), 0.0F, 1.0F);
}
public float realToNormalized(float value) {
float min = 0 - valueMin;
float max = valueMax + min;
return value / (max) - min;
}
public float denormalizeValue(float p_148262_1_) {
return this.snapToStepClamp(this.valueMin + (this.valueMax - this.valueMin) * MathHelper.clamp_float(p_148262_1_, 0.0F, 1.0F));
}