Gigantic warning cleanup
This commit is contained in:
@@ -10,9 +10,6 @@ public class CustomObjectRepository {
|
||||
public CustomObjectRepository() {
|
||||
this.objects = new ArrayList<CustomImageObject>();
|
||||
}
|
||||
public CustomObjectRepository(List<CustomImageObject> objects) {
|
||||
setObjects(objects);
|
||||
}
|
||||
|
||||
public void setObjects(List<CustomImageObject> objects) {
|
||||
this.objects = new ArrayList<CustomImageObject>(objects);
|
||||
|
||||
@@ -28,6 +28,7 @@ public class ReplayImageAsset implements ReplayAsset<BufferedImage> {
|
||||
|
||||
private String name;
|
||||
|
||||
@Override
|
||||
public ReplayImageAsset copy() {
|
||||
ReplayImageAsset newReplay = new ReplayImageAsset(name);
|
||||
newReplay.object = object;
|
||||
|
||||
@@ -379,6 +379,7 @@ public class GuiObjectManager extends GuiScreen implements GuiReplayOverlay.NoOv
|
||||
}
|
||||
|
||||
ReplayHandler.setCustomImageObjects(objects);
|
||||
|
||||
}
|
||||
|
||||
private void updateValuesForTransformation(Transformation transformation) {
|
||||
|
||||
@@ -22,6 +22,7 @@ public class GuiReplaySettings extends GuiScreen {
|
||||
this.parentGuiScreen = parentGuiScreen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
this.screenTitle = I18n.format("replaymod.gui.settings.title");
|
||||
|
||||
@@ -107,7 +108,7 @@ public class GuiReplaySettings extends GuiScreen {
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
if(button.enabled) {
|
||||
switch(button.id) {
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ComposedElement implements GuiElement {
|
||||
//if GuiOutsideClickableElement, forward mouse clicks outside of that element
|
||||
if(!clicked || (part instanceof GuiOutsideClickableElement && !part.isHovering(mouseX, mouseY))) {
|
||||
boolean cl = part.mouseClick(mc, mouseX, mouseY, button);
|
||||
if(cl) clicked = cl;
|
||||
if(cl) clicked = true;
|
||||
}
|
||||
}
|
||||
return clicked;
|
||||
|
||||
@@ -74,11 +74,12 @@ public class GuiTextArea extends Gui implements GuiElement, GuiOutsideClickableE
|
||||
public int textColorEnabled = 0xE0E0E0;
|
||||
public int textColorDisabled = 0x707070;
|
||||
|
||||
|
||||
/*
|
||||
public GuiTextArea(FontRenderer fontRenderer, int positionX, int positionY, int width, int height,
|
||||
int maxTextWidth, int maxTextHeight) {
|
||||
this(0, fontRenderer, positionX, positionY, width, height, maxTextWidth, maxTextHeight, -1);
|
||||
}
|
||||
*/
|
||||
|
||||
public GuiTextArea(FontRenderer fontRenderer, int positionX, int positionY, int width, int height,
|
||||
int maxTextWidth, int maxTextHeight, int maxCharCount) {
|
||||
|
||||
@@ -366,9 +366,8 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
if(searchServerInput.getText().trim().length() > 0) {
|
||||
searchQuery.server = searchServerInput.getText().trim();
|
||||
}
|
||||
|
||||
Boolean order = searchSortToggle.getValue() == 0;
|
||||
searchQuery.order = order;
|
||||
|
||||
searchQuery.order = searchSortToggle.getValue() == 0;
|
||||
|
||||
SearchPagination searchPagination = new SearchPagination(searchQuery);
|
||||
showReplaySearch(searchPagination);
|
||||
|
||||
@@ -55,9 +55,6 @@ public class GuiReplayOverlay extends Gui {
|
||||
return new GuiTexturedButton(0, x, y, size, size, replay_gui, u, v, TEXTURE_SIZE, TEXTURE_SIZE, action, I18n.format(hoverText));
|
||||
}
|
||||
|
||||
private final int displayWidth = mc.displayWidth;
|
||||
private final int displayHeight = mc.displayHeight;
|
||||
|
||||
private final Point screenDimensions = MouseUtils.getScaledDimensions();
|
||||
private final int WIDTH = screenDimensions.getX();
|
||||
private final int HEIGHT = screenDimensions.getY();
|
||||
|
||||
@@ -25,10 +25,12 @@ public class GuiRenameReplay extends GuiScreen {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
this.replayNameInput.updateCursorCounter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -42,10 +44,12 @@ public class GuiRenameReplay extends GuiScreen {
|
||||
this.replayNameInput.setText(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed() {
|
||||
Keyboard.enableRepeatEvents(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException {
|
||||
if(button.enabled) {
|
||||
if(button.id == 1) {
|
||||
@@ -70,6 +74,7 @@ public class GuiRenameReplay extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char typedChar, int keyCode) throws IOException {
|
||||
this.replayNameInput.textboxKeyTyped(typedChar, keyCode);
|
||||
((GuiButton) this.buttonList.get(0)).enabled = this.replayNameInput.getText().trim().length() > 0;
|
||||
@@ -79,11 +84,13 @@ public class GuiRenameReplay extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
this.replayNameInput.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
this.drawDefaultBackground();
|
||||
this.drawCenteredString(this.fontRendererObj, I18n.format("replaymod.gui.viewer.rename.title"), this.width / 2, 20, 16777215);
|
||||
|
||||
@@ -19,6 +19,7 @@ public class GenericLinearInterpolation<T extends KeyframeValue> implements Inte
|
||||
@Override
|
||||
public void prepare() {}
|
||||
|
||||
@Override
|
||||
public void addPoint(T point) {
|
||||
points.add(point);
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.apache.commons.io.FileUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
@@ -166,12 +167,14 @@ public class PacketListener extends DataListener {
|
||||
if (levelDir.isFile()) {
|
||||
netManager.sendPacket(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.ACCEPTED));
|
||||
Futures.addCallback(mc.getResourcePackRepository().func_177319_a(levelDir), new FutureCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
recordResourcePack(levelDir, requestId);
|
||||
netManager.sendPacket(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
||||
}
|
||||
|
||||
public void onFailure(Throwable throwable) {
|
||||
@Override
|
||||
public void onFailure(@Nonnull Throwable throwable) {
|
||||
netManager.sendPacket(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
||||
}
|
||||
});
|
||||
@@ -187,8 +190,10 @@ public class PacketListener extends DataListener {
|
||||
netManager.sendPacket(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.DECLINED));
|
||||
} else {
|
||||
mc.addScheduledTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mc.displayGuiScreen(new GuiYesNo(new GuiYesNoCallback() {
|
||||
@Override
|
||||
public void confirmClicked(boolean result, int id) {
|
||||
if (serverData != null) {
|
||||
serverData.setResourceMode(result ? ServerData.ServerResourceMode.ENABLED : ServerData.ServerResourceMode.DISABLED);
|
||||
@@ -224,11 +229,13 @@ public class PacketListener extends DataListener {
|
||||
|
||||
private void downloadResourcePackFuture(int requestId, String url, final String hash) {
|
||||
Futures.addCallback(downloadResourcePack(requestId, url, hash), new FutureCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object result) {
|
||||
mc.getNetHandler().addToSendQueue(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.SUCCESSFULLY_LOADED));
|
||||
}
|
||||
|
||||
public void onFailure(Throwable throwable) {
|
||||
@Override
|
||||
public void onFailure(@Nonnull Throwable throwable) {
|
||||
mc.getNetHandler().addToSendQueue(new C19PacketResourcePackStatus(hash, C19PacketResourcePackStatus.Action.FAILED_DOWNLOAD));
|
||||
}
|
||||
});
|
||||
@@ -278,6 +285,7 @@ public class PacketListener extends DataListener {
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
Futures.getUnchecked(mc.addScheduledTask(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mc.displayGuiScreen(guiScreen);
|
||||
}
|
||||
@@ -286,12 +294,14 @@ public class PacketListener extends DataListener {
|
||||
Map sessionInfo = Minecraft.getSessionInfo();
|
||||
repo.field_177322_i = HttpUtil.func_180192_a(file, url, sessionInfo, 50 * 1024 * 1024, guiScreen, mc.getProxy());
|
||||
Futures.addCallback(repo.field_177322_i, new FutureCallback() {
|
||||
@Override
|
||||
public void onSuccess(Object value) {
|
||||
recordResourcePack(file, requestId);
|
||||
repo.func_177319_a(file);
|
||||
}
|
||||
|
||||
public void onFailure(Throwable throwable) {
|
||||
@Override
|
||||
public void onFailure(@Nonnull Throwable throwable) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -13,8 +13,6 @@ public class LightingHandler {
|
||||
|
||||
private static float initialGamma = 0;
|
||||
|
||||
private static boolean enabled = false;
|
||||
|
||||
public static void setLighting(boolean lighting) {
|
||||
|
||||
float gamma = mc.gameSettings.getOptionFloatValue(Options.GAMMA);
|
||||
@@ -25,8 +23,6 @@ public class LightingHandler {
|
||||
if(lighting) mc.gameSettings.setOptionFloatValue(Options.GAMMA, AMBIENT_GAMMA);
|
||||
else mc.gameSettings.setOptionFloatValue(Options.GAMMA, initialGamma);
|
||||
|
||||
enabled = lighting;
|
||||
|
||||
if(ReplayMod.replaySender.paused()) {
|
||||
mc.entityRenderer.lightmapUpdateNeeded = true;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ public class SpectatorRenderer {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
|
||||
public void cleanup() {
|
||||
FMLCommonHandler.instance().bus().unregister(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user