Refactored and reformatted code to use less static variables

This commit is contained in:
CrushedPixel
2015-04-23 14:09:54 +02:00
parent f22416be2c
commit 0003f040ed
109 changed files with 9037 additions and 10229 deletions

View File

@@ -2,27 +2,26 @@ package eu.crushedpixel.replaymod.gui;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.gui.GuiYesNoCallback;
public class GuiCancelRender extends GuiYesNo {
private static Minecraft mc = Minecraft.getMinecraft();
private static GuiYesNoCallback callback = new GuiYesNoCallback() {
@Override
public void confirmClicked(boolean result, int id) {
if(result) {
ReplayProcess.stopReplayProcess(false);
}
mc.displayGuiScreen(null);
}
};
public GuiCancelRender() {
super(callback, "Cancel Rendering", "Are you sure that you want to cancel the current rendering process?", 0);
}
private static Minecraft mc = Minecraft.getMinecraft();
private static GuiYesNoCallback callback = new GuiYesNoCallback() {
@Override
public void confirmClicked(boolean result, int id) {
if(result) {
ReplayProcess.stopReplayProcess(false);
}
mc.displayGuiScreen(null);
}
};
public GuiCancelRender() {
super(callback, "Cancel Rendering", "Are you sure that you want to cancel the current rendering process?", 0);
}
}