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

@@ -134,11 +134,11 @@ public class GuiDropdown<T> extends GuiTextField {
@Override
public void mouseClicked(int xPos, int yPos, int mouseButton) {
mouseClickedResult(xPos, yPos, mouseButton);
mouseClickedResult(xPos, yPos);
}
public boolean mouseClickedResult(int xPos, int yPos, int mouseButton) {
public boolean mouseClickedResult(int xPos, int yPos) {
boolean success = false;
if(xPos > xPosition + width - height && xPos < xPosition + width && yPos > yPosition && yPos < yPosition + height) {
open = !open;
@@ -146,8 +146,7 @@ public class GuiDropdown<T> extends GuiTextField {
if(xPos > xPosition && xPos < xPosition + width && open) {
int requiredHeight = Math.min(maxDropoutHeight, elements.size() * dropoutElementHeight);
if(yPos > yPosition + height && yPos < yPosition + height + requiredHeight) {
int clickedIndex = (int) Math.floor((yPos - (yPosition + height)) / dropoutElementHeight) + upperIndex;
this.selectionIndex = clickedIndex;
this.selectionIndex = (int) Math.floor((yPos - (yPosition + height)) / dropoutElementHeight) + upperIndex;
success = true;
fireSelectionChangeEvent();
}
@@ -217,10 +216,6 @@ public class GuiDropdown<T> extends GuiTextField {
this.selectionListeners.add(listener);
}
public void removeSelectionListener(SelectionListener listener) {
this.selectionListeners.remove(listener);
}
public boolean isExpanded() {
return open;
}