rename Game -> Client
This commit is contained in:
parent
193a12b00f
commit
812a981e4a
55 changed files with 234 additions and 238 deletions
|
@ -196,46 +196,46 @@ import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||||
[[oder einfach einen Toaster mit nem LCD und Maus]]
|
[[oder einfach einen Toaster mit nem LCD und Maus]]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class Game implements IThreadListener, IClient {
|
public class Client implements IThreadListener, IClient {
|
||||||
public static class SyncFunction implements IntFunction {
|
public static class SyncFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().sync(value);
|
Client.CLIENT.sync(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class TickFunction implements FloatFunction {
|
public static class TickFunction implements FloatFunction {
|
||||||
public void apply(FloatVar cv, float value) {
|
public void apply(FloatVar cv, float value) {
|
||||||
Game.getGame().tick_target(value);
|
Client.CLIENT.tick_target(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ConsoleFunction implements IntFunction {
|
public static class ConsoleFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().resizeConsole();
|
Client.CLIENT.resizeConsole();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ChatFunction implements IntFunction {
|
public static class ChatFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().resizeChat();
|
Client.CLIENT.resizeChat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class FeedFunction implements IntFunction {
|
public static class FeedFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().resizeFeed();
|
Client.CLIENT.resizeFeed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HotbarFunction implements IntFunction {
|
public static class HotbarFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().resizeHotbar();
|
Client.CLIENT.resizeHotbar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class DistanceFunction implements IntFunction {
|
public static class DistanceFunction implements IntFunction {
|
||||||
public void apply(IntVar cv, int value) {
|
public void apply(IntVar cv, int value) {
|
||||||
Game.getGame().distance(value);
|
Client.CLIENT.distance(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,20 +455,16 @@ public class Game implements IThreadListener, IClient {
|
||||||
private long frameWait;
|
private long frameWait;
|
||||||
private long startNanoTime = System.nanoTime();
|
private long startNanoTime = System.nanoTime();
|
||||||
|
|
||||||
private static final Game INSTANCE = new Game();
|
public static final Client CLIENT = new Client();
|
||||||
|
|
||||||
private final Bind[] keyBindsHotbar = new Bind[] {
|
private final Bind[] keyBindsHotbar = new Bind[] {
|
||||||
Bind.SELECT1, Bind.SELECT2, Bind.SELECT3, Bind.SELECT4, Bind.SELECT5, Bind.SELECT6, Bind.SELECT7, Bind.SELECT8, Bind.SELECT9
|
Bind.SELECT1, Bind.SELECT2, Bind.SELECT3, Bind.SELECT4, Bind.SELECT5, Bind.SELECT6, Bind.SELECT7, Bind.SELECT8, Bind.SELECT9
|
||||||
};
|
};
|
||||||
|
|
||||||
private Game() {
|
private Client() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Game getGame() {
|
private static NetConnection createNetworkManagerAndConnect(InetAddress address, int serverPort)
|
||||||
return INSTANCE;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static NetConnection createNetworkManagerAndConnect(InetAddress address, int serverPort)
|
|
||||||
{
|
{
|
||||||
final NetConnection networkmanager = new NetConnection();
|
final NetConnection networkmanager = new NetConnection();
|
||||||
((Bootstrap)((Bootstrap)((Bootstrap)(new Bootstrap()).group(CLIENT_NIO_EVENTLOOP.getValue())).handler(new ChannelInitializer<Channel>()
|
((Bootstrap)((Bootstrap)((Bootstrap)(new Bootstrap()).group(CLIENT_NIO_EVENTLOOP.getValue())).handler(new ChannelInitializer<Channel>()
|
||||||
|
@ -2308,18 +2304,18 @@ public class Game implements IThreadListener, IClient {
|
||||||
GL11.glReadPixels(0, 0, this.fb_x, this.fb_y, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, data);
|
GL11.glReadPixels(0, 0, this.fb_x, this.fb_y, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, data);
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
byte[] pixels = new byte[stride * Game.this.fb_y];
|
byte[] pixels = new byte[stride * Client.this.fb_y];
|
||||||
data.get(pixels);
|
data.get(pixels);
|
||||||
byte[] conv = new byte[Game.this.fb_x * Game.this.fb_y * 3];
|
byte[] conv = new byte[Client.this.fb_x * Client.this.fb_y * 3];
|
||||||
for(int l = 0; l < Game.this.fb_y; l++) {
|
for(int l = 0; l < Client.this.fb_y; l++) {
|
||||||
System.arraycopy(pixels, l * stride, conv, (Game.this.fb_y - 1 - l) * Game.this.fb_x * 3, Game.this.fb_x * 3);
|
System.arraycopy(pixels, l * stride, conv, (Client.this.fb_y - 1 - l) * Client.this.fb_x * 3, Client.this.fb_x * 3);
|
||||||
}
|
}
|
||||||
BufferedImage image = new BufferedImage(Game.this.fb_x, Game.this.fb_y, BufferedImage.TYPE_INT_ARGB);
|
BufferedImage image = new BufferedImage(Client.this.fb_x, Client.this.fb_y, BufferedImage.TYPE_INT_ARGB);
|
||||||
int[] img = new int[Game.this.fb_x * Game.this.fb_y];
|
int[] img = new int[Client.this.fb_x * Client.this.fb_y];
|
||||||
for(int z = 0; z < img.length; z++) {
|
for(int z = 0; z < img.length; z++) {
|
||||||
img[z] = (int)(conv[(z * 3) + 2] & 0xff) | ((int)(conv[(z * 3) + 1] & 0xff) << 8) | ((int)(conv[(z * 3) + 0] & 0xff) << 16) | 0xff000000;
|
img[z] = (int)(conv[(z * 3) + 2] & 0xff) | ((int)(conv[(z * 3) + 1] & 0xff) << 8) | ((int)(conv[(z * 3) + 0] & 0xff) << 16) | 0xff000000;
|
||||||
}
|
}
|
||||||
image.setRGB(0, 0, Game.this.fb_x, Game.this.fb_y, img, 0, Game.this.fb_x);
|
image.setRGB(0, 0, Client.this.fb_x, Client.this.fb_y, img, 0, Client.this.fb_x);
|
||||||
|
|
||||||
File dir = new File("screenshots");
|
File dir = new File("screenshots");
|
||||||
dir.mkdirs();
|
dir.mkdirs();
|
||||||
|
@ -2336,18 +2332,18 @@ public class Game implements IThreadListener, IClient {
|
||||||
ImageIO.write(image, "png", file);
|
ImageIO.write(image, "png", file);
|
||||||
}
|
}
|
||||||
catch(IOException e) {
|
catch(IOException e) {
|
||||||
Game.this.schedule(new Runnable() {
|
Client.this.schedule(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Game.this.saving = false;
|
Client.this.saving = false;
|
||||||
Log.IO.error(e, "Konnte Textur '" + saved + "' nicht speichern");
|
Log.IO.error(e, "Konnte Textur '" + saved + "' nicht speichern");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Game.this.schedule(new Runnable() {
|
Client.this.schedule(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Game.this.saving = false;
|
Client.this.saving = false;
|
||||||
Game.this.logFeed("Bildschirmfoto als '%s' gespeichert", saved.getName());
|
Client.this.logFeed("Bildschirmfoto als '%s' gespeichert", saved.getName());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -2422,12 +2418,12 @@ public class Game implements IThreadListener, IClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void restartSound(boolean load) {
|
public void restartSound(boolean load) {
|
||||||
Game.this.logFeed("Lade Sound-System neu");
|
Client.this.logFeed("Lade Sound-System neu");
|
||||||
this.soundManager.unload();
|
this.soundManager.unload();
|
||||||
if(audio.end())
|
if(audio.end())
|
||||||
Log.SOUND.info("Audiogerät geschlossen");
|
Log.SOUND.info("Audiogerät geschlossen");
|
||||||
this.startSound(load);
|
this.startSound(load);
|
||||||
Game.this.logFeed("Das Sound-System wurde neu geladen");
|
Client.this.logFeed("Das Sound-System wurde neu geladen");
|
||||||
}
|
}
|
||||||
|
|
||||||
public AudioInterface getAudioInterface() {
|
public AudioInterface getAudioInterface() {
|
||||||
|
@ -2449,124 +2445,124 @@ public class Game implements IThreadListener, IClient {
|
||||||
this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() {
|
this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay();
|
String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay();
|
||||||
Game.this.displayGuiScreen(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DGREEN + "" + Game.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
|
Client.this.displayGuiScreen(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DGREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
|
||||||
Util.buildLines(new Function<DebugFunction, String>() {
|
Util.buildLines(new Function<DebugFunction, String>() {
|
||||||
public String apply(DebugFunction func) {
|
public String apply(DebugFunction func) {
|
||||||
return TextColor.CYAN + bind + TextColor.RED + "+" + TextColor.GREEN + func.key.getDisplay() + TextColor.GRAY + " - " + TextColor.YELLOW + func.help;
|
return TextColor.CYAN + bind + TextColor.RED + "+" + TextColor.GREEN + func.key.getDisplay() + TextColor.GRAY + " - " + TextColor.YELLOW + func.help;
|
||||||
}
|
}
|
||||||
}, Game.this.debug.values())));
|
}, Client.this.debug.values())));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.N, "NoClip umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.N, "NoClip umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.NOCLIP);
|
Client.this.performAction(Action.NOCLIP);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.G, "Unsterblichkeit umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.G, "Unsterblichkeit umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.GOD);
|
Client.this.performAction(Action.GOD);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.F, "Geschwindigkeit umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.F, "Geschwindigkeit umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.SPEED);
|
Client.this.performAction(Action.SPEED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.R, "Gegenstand reparieren und Stapel auffüllen", new DebugRunner() {
|
this.registerDebug(Keysym.R, "Gegenstand reparieren und Stapel auffüllen", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.REPAIR);
|
Client.this.performAction(Action.REPAIR);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.E, "Gegenstands-Cheat-Menü umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.E, "Gegenstands-Cheat-Menü umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Cheat-Menü: %s", (Game.this.itemCheat ^= true) ? "an" : "aus");
|
Client.this.logFeed("Cheat-Menü: %s", (Client.this.itemCheat ^= true) ? "an" : "aus");
|
||||||
if(Game.this.open instanceof GuiContainer)
|
if(Client.this.open instanceof GuiContainer)
|
||||||
Game.this.open.init();
|
Client.this.open.init();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Maximale Helligkeit: %s", (Game.this.setGamma ^= true) ? "an" : "aus");
|
Client.this.logFeed("Maximale Helligkeit: %s", (Client.this.setGamma ^= true) ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.J, "JVM GC ausführen", new DebugRunner() {
|
this.registerDebug(Keysym.J, "JVM GC ausführen", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Führe JVM GC aus");
|
Client.this.logFeed("Führe JVM GC aus");
|
||||||
long mem = Runtime.getRuntime().freeMemory();
|
long mem = Runtime.getRuntime().freeMemory();
|
||||||
System.gc();
|
System.gc();
|
||||||
System.gc();
|
System.gc();
|
||||||
mem = Runtime.getRuntime().freeMemory() - mem;
|
mem = Runtime.getRuntime().freeMemory() - mem;
|
||||||
mem = mem < 0L ? 0L : mem;
|
mem = mem < 0L ? 0L : mem;
|
||||||
Game.this.logFeed("JVM GC ausgeführt: %d MB freigegeben", (int)(mem / 1024L / 1024L));
|
Client.this.logFeed("JVM GC ausgeführt: %d MB freigegeben", (int)(mem / 1024L / 1024L));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.B, "Hitbox-Overlay umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.B, "Hitbox-Overlay umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.getRenderManager().setDebugBoundingBox(!Game.this.getRenderManager().isDebugBoundingBox());
|
Client.this.getRenderManager().setDebugBoundingBox(!Client.this.getRenderManager().isDebugBoundingBox());
|
||||||
Game.this.logFeed("Objekt-Grenzen: %s", Game.this.getRenderManager().isDebugBoundingBox() ? "an" : "aus");
|
Client.this.logFeed("Objekt-Grenzen: %s", Client.this.getRenderManager().isDebugBoundingBox() ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.K, "Debug-Kamera in 3. Person umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.K, "Debug-Kamera in 3. Person umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Debug-Kamera 3. Person: %s", (Game.this.debugCamEnable ^= true) ? "an" : "aus");
|
Client.this.logFeed("Debug-Kamera 3. Person: %s", (Client.this.debugCamEnable ^= true) ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.X, "Röntgenblick umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.X, "Röntgenblick umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.xrayActive ^= true;
|
Client.this.xrayActive ^= true;
|
||||||
Game.this.renderGlobal.loadRenderers();
|
Client.this.renderGlobal.loadRenderers();
|
||||||
Game.this.logFeed("Röntgenblick: %s", Game.this.xrayActive ? "an" : "aus");
|
Client.this.logFeed("Röntgenblick: %s", Client.this.xrayActive ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.O, "Objekt-Overlay umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.O, "Objekt-Overlay umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Objekt-Umrahmung: %s", (Game.this.renderOutlines ^= true) ? "an" : "aus");
|
Client.this.logFeed("Objekt-Umrahmung: %s", (Client.this.renderOutlines ^= true) ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.I, "Block-Objekt-Overlay umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.I, "Block-Objekt-Overlay umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Block-Objekte anzeigen: %s", (Game.this.tileOverlay ^= true) ? "an" : "aus");
|
Client.this.logFeed("Block-Objekte anzeigen: %s", (Client.this.tileOverlay ^= true) ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.Y, "Alle Chunks neu kompilieren", new DebugRunner() {
|
this.registerDebug(Keysym.Y, "Alle Chunks neu kompilieren", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Kompiliere alle Chunks neu");
|
Client.this.logFeed("Kompiliere alle Chunks neu");
|
||||||
Game.this.renderGlobal.loadRenderers();
|
Client.this.renderGlobal.loadRenderers();
|
||||||
Game.this.logFeed("Alle Chunks wurden neu kompiliert");
|
Client.this.logFeed("Alle Chunks wurden neu kompiliert");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.T, "Alle Texturen neu laden", new DebugRunner() {
|
this.registerDebug(Keysym.T, "Alle Texturen neu laden", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Lade Texturen neu");
|
Client.this.logFeed("Lade Texturen neu");
|
||||||
Game.this.refreshResources();
|
Client.this.refreshResources();
|
||||||
Game.this.logFeed("Texturen wurden neu geladen");
|
Client.this.logFeed("Texturen wurden neu geladen");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.S, "Alle Sounds neu laden", new DebugRunner() {
|
this.registerDebug(Keysym.S, "Alle Sounds neu laden", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Lade Sounds neu");
|
Client.this.logFeed("Lade Sounds neu");
|
||||||
Game.this.restartSound(true);
|
Client.this.restartSound(true);
|
||||||
Game.this.logFeed("Sounds wurden neu geladen");
|
Client.this.logFeed("Sounds wurden neu geladen");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.W, "Server-Tick-Limit umschalten (Welt beschleunigen / Warpmodus)", new DebugRunner() {
|
this.registerDebug(Keysym.W, "Server-Tick-Limit umschalten (Welt beschleunigen / Warpmodus)", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.WARP_MODE);
|
Client.this.performAction(Action.WARP_MODE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.M, "Alle Gegenstände herbei ziehen (Magnetmodus)", new DebugRunner() {
|
this.registerDebug(Keysym.M, "Alle Gegenstände herbei ziehen (Magnetmodus)", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.MAGNET);
|
Client.this.performAction(Action.MAGNET);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.Z, "Den Spieler heilen", new DebugRunner() {
|
this.registerDebug(Keysym.Z, "Den Spieler heilen", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.HEAL);
|
Client.this.performAction(Action.HEAL);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.P, "Server Performance-Anfrage senden", new DebugRunner() {
|
this.registerDebug(Keysym.P, "Server Performance-Anfrage senden", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.performAction(Action.PERF);
|
Client.this.performAction(Action.PERF);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.C, "Debug-Crash auslösen (2x schnell hintereinander)", new DebugRunner() {
|
this.registerDebug(Keysym.C, "Debug-Crash auslösen (2x schnell hintereinander)", new DebugRunner() {
|
||||||
|
@ -2578,52 +2574,52 @@ public class Game implements IThreadListener, IClient {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.lastUsed = System.currentTimeMillis();
|
this.lastUsed = System.currentTimeMillis();
|
||||||
Game.this.logFeed(TextColor.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
|
Client.this.logFeed(TextColor.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.V, "Alle Sounds stoppen", new DebugRunner() {
|
this.registerDebug(Keysym.V, "Alle Sounds stoppen", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.soundManager.stopSounds();
|
Client.this.soundManager.stopSounds();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.Q, "Programm sofort beenden und speichern", new DebugRunner() {
|
this.registerDebug(Keysym.Q, "Programm sofort beenden und speichern", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.interrupted = true;
|
Client.this.interrupted = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.A, "Bild-Synchonisation umschalten (VSync - begrenzt - unbegrenzt)", new DebugRunner() {
|
this.registerDebug(Keysym.A, "Bild-Synchonisation umschalten (VSync - begrenzt - unbegrenzt)", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.getVar("win_sync").parse("" + (Game.this.vsync ? Game.this.syncLimit : (Game.this.syncLimited ? -1 : 0)));
|
Client.this.getVar("win_sync").parse("" + (Client.this.vsync ? Client.this.syncLimit : (Client.this.syncLimited ? -1 : 0)));
|
||||||
Game.this.setDirty();
|
Client.this.setDirty();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.D, "Konsole und Chat leeren", new DebugRunner() {
|
this.registerDebug(Keysym.D, "Konsole und Chat leeren", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
GuiConsole.INSTANCE.reset();
|
GuiConsole.INSTANCE.reset();
|
||||||
if(Game.this.open instanceof GuiConsole)
|
if(Client.this.open instanceof GuiConsole)
|
||||||
((GuiConsole)Game.this.open).setLog(Game.this.buffer);
|
((GuiConsole)Client.this.open).setLog(Client.this.buffer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.U, "HUD umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.U, "HUD umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.showHud ^= true;
|
Client.this.showHud ^= true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.UE, "Spieler in Overlay umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.UE, "Spieler in Overlay umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
Game.this.logFeed("Spieler-Info in Overlay: %s", (Game.this.debugPlayer ^= true) ? "an" : "aus");
|
Client.this.logFeed("Spieler-Info in Overlay: %s", (Client.this.debugPlayer ^= true) ? "an" : "aus");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.registerDebug(Keysym.OE, "Tick-Profiler umschalten", new DebugRunner() {
|
this.registerDebug(Keysym.OE, "Tick-Profiler umschalten", new DebugRunner() {
|
||||||
public void execute(Keysym key) {
|
public void execute(Keysym key) {
|
||||||
if(Game.this.lastTickTime >= 0) {
|
if(Client.this.lastTickTime >= 0) {
|
||||||
Game.this.performAction(Action.STOP_PROFILING);
|
Client.this.performAction(Action.STOP_PROFILING);
|
||||||
Game.this.lastTickTime = -1;
|
Client.this.lastTickTime = -1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Game.this.performAction(Action.START_PROFILING);
|
Client.this.performAction(Action.START_PROFILING);
|
||||||
Game.this.lastTickTime = 0;
|
Client.this.lastTickTime = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2645,11 +2641,11 @@ public class Game implements IThreadListener, IClient {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Util.checkOs();
|
Util.checkOs();
|
||||||
Log.init(INSTANCE);
|
Log.init(CLIENT);
|
||||||
Window.init();
|
Window.init();
|
||||||
ModelBlock.setAsProvider();
|
ModelBlock.setAsProvider();
|
||||||
Registry.setup("Render thread");
|
Registry.setup("Render thread");
|
||||||
INSTANCE.run();
|
CLIENT.run();
|
||||||
Window.end();
|
Window.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3256,12 +3252,12 @@ public class Game implements IThreadListener, IClient {
|
||||||
}
|
}
|
||||||
catch(Throwable e) {
|
catch(Throwable e) {
|
||||||
Log.SYSTEM.error(e, "Konnte Zenity nicht starten");
|
Log.SYSTEM.error(e, "Konnte Zenity nicht starten");
|
||||||
Game.this.logFeed(TextColor.RED + "Konnte Dateibrowser nicht öffnen");
|
Client.this.logFeed(TextColor.RED + "Konnte Dateibrowser nicht öffnen");
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(output == null) {
|
if(output == null) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(mode == FileMode.FILE_LOAD_MULTI) {
|
if(mode == FileMode.FILE_LOAD_MULTI) {
|
||||||
|
@ -3272,17 +3268,17 @@ public class Game implements IThreadListener, IClient {
|
||||||
files.add(file);
|
files.add(file);
|
||||||
}
|
}
|
||||||
if(files.isEmpty()) {
|
if(files.isEmpty()) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Game.this.schedule(new Runnable() {
|
Client.this.schedule(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if(Game.this.waitingForFile) {
|
if(Client.this.waitingForFile) {
|
||||||
for(File file : files) {
|
for(File file : files) {
|
||||||
callback.selected(file);
|
callback.selected(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -3291,34 +3287,34 @@ public class Game implements IThreadListener, IClient {
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
case DIRECTORY_LOAD:
|
case DIRECTORY_LOAD:
|
||||||
if(!file.isDirectory()) {
|
if(!file.isDirectory()) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIRECTORY_SAVE:
|
case DIRECTORY_SAVE:
|
||||||
if(file.exists() && !file.isDirectory()) {
|
if(file.exists() && !file.isDirectory()) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FILE_LOAD:
|
case FILE_LOAD:
|
||||||
if(!file.isFile()) {
|
if(!file.isFile()) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FILE_SAVE:
|
case FILE_SAVE:
|
||||||
if(file.exists() && !file.isFile()) {
|
if(file.exists() && !file.isFile()) {
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Game.this.schedule(new Runnable() {
|
Client.this.schedule(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if(Game.this.waitingForFile)
|
if(Client.this.waitingForFile)
|
||||||
callback.selected(file);
|
callback.selected(file);
|
||||||
Game.this.waitingForFile = false;
|
Client.this.waitingForFile = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
|
@ -24,7 +24,7 @@ import common.world.WorldClient;
|
||||||
|
|
||||||
public class PlayerController
|
public class PlayerController
|
||||||
{
|
{
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
private final ClientPlayer netClientHandler;
|
private final ClientPlayer netClientHandler;
|
||||||
private BlockPos currentBlock = new BlockPos(-1, -1, -1);
|
private BlockPos currentBlock = new BlockPos(-1, -1, -1);
|
||||||
private ItemStack currentItemHittingBlock;
|
private ItemStack currentItemHittingBlock;
|
||||||
|
@ -36,7 +36,7 @@ public class PlayerController
|
||||||
private int currentPlayerItem;
|
private int currentPlayerItem;
|
||||||
private boolean interacting;
|
private boolean interacting;
|
||||||
|
|
||||||
public PlayerController(Game gmIn, ClientPlayer netHandler)
|
public PlayerController(Client gmIn, ClientPlayer netHandler)
|
||||||
{
|
{
|
||||||
this.gm = gmIn;
|
this.gm = gmIn;
|
||||||
this.netClientHandler = netHandler;
|
this.netClientHandler = netHandler;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.collect.BiMap;
|
import common.collect.BiMap;
|
||||||
import common.collect.HashBiMap;
|
import common.collect.HashBiMap;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
|
@ -85,7 +85,7 @@ public class SoundManager {
|
||||||
private final Map<String, Integer> playingSoundsStopTime = Maps.<String, Integer>newHashMap();
|
private final Map<String, Integer> playingSoundsStopTime = Maps.<String, Integer>newHashMap();
|
||||||
private final Map<String, Source> sources = new HashMap<String, Source>();
|
private final Map<String, Source> sources = new HashMap<String, Source>();
|
||||||
private final String[] channels = new String[28];
|
private final String[] channels = new String[28];
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
|
|
||||||
private float listenerX;
|
private float listenerX;
|
||||||
private float listenerY;
|
private float listenerY;
|
||||||
|
@ -94,7 +94,7 @@ public class SoundManager {
|
||||||
private int playTime = 0;
|
private int playTime = 0;
|
||||||
private int eventId = 0;
|
private int eventId = 0;
|
||||||
|
|
||||||
public SoundManager(Game gm) {
|
public SoundManager(Client gm) {
|
||||||
this.gm = gm;
|
this.gm = gm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.audio;
|
package client.audio;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.element.Slider;
|
import client.gui.element.Slider;
|
||||||
import client.vars.CVar;
|
import client.vars.CVar;
|
||||||
import client.vars.CVarCategory;
|
import client.vars.CVarCategory;
|
||||||
|
@ -91,8 +91,8 @@ public enum Volume implements CVar {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void apply() {
|
public void apply() {
|
||||||
if(Game.getGame().getAudioInterface() != null)
|
if(Client.CLIENT.getAudioInterface() != null)
|
||||||
Game.getGame().getAudioInterface().alSetVolume(this, (short)(((float)this.value) / 100.0f * 32767.0f));
|
Client.CLIENT.getAudioInterface().alSetVolume(this, (short)(((float)this.value) / 100.0f * 32767.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Slider selector(int x, int y, int w, int h) {
|
public Slider selector(int x, int y, int w, int h) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.element.Dropdown;
|
import client.gui.element.Dropdown;
|
||||||
import client.gui.element.Dropdown.Handle;
|
import client.gui.element.Dropdown.Handle;
|
||||||
import client.gui.element.Element;
|
import client.gui.element.Element;
|
||||||
|
@ -20,7 +20,7 @@ public abstract class Gui {
|
||||||
public static final int HOVER_COLOR = 0x288080ff;
|
public static final int HOVER_COLOR = 0x288080ff;
|
||||||
public static final int PRESS_COLOR = 0x30afafff;
|
public static final int PRESS_COLOR = 0x30afafff;
|
||||||
|
|
||||||
protected final Game gm = Game.getGame();
|
protected final Client gm = Client.CLIENT;
|
||||||
|
|
||||||
public Element selected;
|
public Element selected;
|
||||||
private int min_x;
|
private int min_x;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.gui;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.element.ActButton;
|
import client.gui.element.ActButton;
|
||||||
import client.gui.element.Fill;
|
import client.gui.element.Fill;
|
||||||
import client.gui.element.Textbox;
|
import client.gui.element.Textbox;
|
||||||
|
@ -142,7 +142,7 @@ public class GuiConsole extends Gui implements Textbox.Callback {
|
||||||
|
|
||||||
private void addMessage(String msg) {
|
private void addMessage(String msg) {
|
||||||
String buffer = this.gm.getBuffer();
|
String buffer = this.gm.getBuffer();
|
||||||
if((buffer.length() + msg.length() + 2) > Game.LOG_BUFFER) {
|
if((buffer.length() + msg.length() + 2) > Client.LOG_BUFFER) {
|
||||||
int offset = (msg.length() + 2) > 1024 ? (msg.length() + 2) : 1024;
|
int offset = (msg.length() + 2) > 1024 ? (msg.length() + 2) : 1024;
|
||||||
int nl = buffer.indexOf('\n', offset);
|
int nl = buffer.indexOf('\n', offset);
|
||||||
buffer = nl >= 0 ? buffer.substring(nl + 1) : "";
|
buffer = nl >= 0 ? buffer.substring(nl + 1) : "";
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.text.SimpleDateFormat;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import client.Game.FileMode;
|
import client.Client.FileMode;
|
||||||
import client.gui.element.ActButton;
|
import client.gui.element.ActButton;
|
||||||
import client.gui.element.ActButton.Mode;
|
import client.gui.element.ActButton.Mode;
|
||||||
import client.gui.element.GuiList;
|
import client.gui.element.GuiList;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package client.gui;
|
package client.gui;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.element.Bar;
|
import client.gui.element.Bar;
|
||||||
import client.gui.element.Label;
|
import client.gui.element.Label;
|
||||||
|
|
||||||
public class GuiLoading extends Gui {
|
public class GuiLoading extends Gui {
|
||||||
public static interface Callback {
|
public static interface Callback {
|
||||||
void poll(Game gm, GuiLoading gui);
|
void poll(Client gm, GuiLoading gui);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String message;
|
private final String message;
|
||||||
|
@ -19,7 +19,7 @@ public class GuiLoading extends Gui {
|
||||||
|
|
||||||
public static GuiLoading makeServerTask(String message) {
|
public static GuiLoading makeServerTask(String message) {
|
||||||
return new GuiLoading(message, new Callback() {
|
return new GuiLoading(message, new Callback() {
|
||||||
public void poll(Game gm, GuiLoading gui) {
|
public void poll(Client gm, GuiLoading gui) {
|
||||||
int progress = gm.progress;
|
int progress = gm.progress;
|
||||||
if(progress < 0) {
|
if(progress < 0) {
|
||||||
gui.resetBar();
|
gui.resetBar();
|
||||||
|
@ -35,7 +35,7 @@ public class GuiLoading extends Gui {
|
||||||
|
|
||||||
public static GuiLoading makeWaitTask(String message) {
|
public static GuiLoading makeWaitTask(String message) {
|
||||||
return new GuiLoading(message, new Callback() {
|
return new GuiLoading(message, new Callback() {
|
||||||
public void poll(Game gm, GuiLoading gui) {
|
public void poll(Client gm, GuiLoading gui) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,8 @@ import javax.imageio.ImageIO;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.Game.FileMode;
|
import client.Client.FileMode;
|
||||||
import client.SkinConverter;
|
import client.SkinConverter;
|
||||||
import client.gui.FileCallback;
|
import client.gui.FileCallback;
|
||||||
import client.gui.GuiLoading;
|
import client.gui.GuiLoading;
|
||||||
|
@ -237,8 +237,8 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
||||||
|
|
||||||
public static class FilterFunction implements EnumFunction<FilterType> {
|
public static class FilterFunction implements EnumFunction<FilterType> {
|
||||||
public void apply(EnumVar cv, FilterType value) {
|
public void apply(EnumVar cv, FilterType value) {
|
||||||
if(Game.getGame().open instanceof GuiChar)
|
if(Client.CLIENT.open instanceof GuiChar)
|
||||||
Game.getGame().displayGuiScreen(Game.getGame().open);
|
Client.CLIENT.displayGuiScreen(Client.CLIENT.open);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
||||||
ent.headYaw = ent.rotYaw;
|
ent.headYaw = ent.rotYaw;
|
||||||
ent.prevHeadYaw = ent.rotYaw;
|
ent.prevHeadYaw = ent.rotYaw;
|
||||||
GL11.glTranslatef(0.0F, -(ent.height / 2), 0.0F);
|
GL11.glTranslatef(0.0F, -(ent.height / 2), 0.0F);
|
||||||
RenderManager rendermanager = Game.getGame().getRenderManager();
|
RenderManager rendermanager = Client.CLIENT.getRenderManager();
|
||||||
rendermanager.setPlayerViewY(180.0F);
|
rendermanager.setPlayerViewY(180.0F);
|
||||||
rendermanager.renderEntity(ent, 0.0D, 0.0D, 0.0D, 1.0F);
|
rendermanager.renderEntity(ent, 0.0D, 0.0D, 0.0D, 1.0F);
|
||||||
// GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
// GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.gui.container;
|
package client.gui.container;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.inventory.ContainerChest;
|
import common.inventory.ContainerChest;
|
||||||
import common.inventory.IInventory;
|
import common.inventory.IInventory;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public class GuiChest extends GuiContainer
|
||||||
|
|
||||||
public GuiChest(IInventory upperInv, IInventory lowerInv)
|
public GuiChest(IInventory upperInv, IInventory lowerInv)
|
||||||
{
|
{
|
||||||
super(new ContainerChest(upperInv, lowerInv, Game.getGame().thePlayer));
|
super(new ContainerChest(upperInv, lowerInv, Client.CLIENT.thePlayer));
|
||||||
this.upperChestInventory = upperInv;
|
this.upperChestInventory = upperInv;
|
||||||
this.lowerChestInventory = lowerInv;
|
this.lowerChestInventory = lowerInv;
|
||||||
// this.allowUserInput = false;
|
// this.allowUserInput = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.gui.container;
|
package client.gui.container;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.inventory.ContainerHopper;
|
import common.inventory.ContainerHopper;
|
||||||
import common.inventory.IInventory;
|
import common.inventory.IInventory;
|
||||||
import common.inventory.InventoryPlayer;
|
import common.inventory.InventoryPlayer;
|
||||||
|
@ -19,7 +19,7 @@ public class GuiHopper extends GuiContainer
|
||||||
|
|
||||||
public GuiHopper(InventoryPlayer playerInv, IInventory hopperInv)
|
public GuiHopper(InventoryPlayer playerInv, IInventory hopperInv)
|
||||||
{
|
{
|
||||||
super(new ContainerHopper(playerInv, hopperInv, Game.getGame().thePlayer));
|
super(new ContainerHopper(playerInv, hopperInv, Client.CLIENT.thePlayer));
|
||||||
this.playerInventory = playerInv;
|
this.playerInventory = playerInv;
|
||||||
this.hopperInventory = hopperInv;
|
this.hopperInventory = hopperInv;
|
||||||
// this.allowUserInput = false;
|
// this.allowUserInput = false;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.gui.container;
|
package client.gui.container;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.entity.animal.EntityHorse;
|
import common.entity.animal.EntityHorse;
|
||||||
import common.inventory.ContainerHorseInventory;
|
import common.inventory.ContainerHorseInventory;
|
||||||
import common.inventory.IInventory;
|
import common.inventory.IInventory;
|
||||||
|
@ -27,7 +27,7 @@ public class GuiHorse extends GuiContainer
|
||||||
|
|
||||||
public GuiHorse(IInventory playerInv, IInventory horseInv, EntityHorse horse)
|
public GuiHorse(IInventory playerInv, IInventory horseInv, EntityHorse horse)
|
||||||
{
|
{
|
||||||
super(new ContainerHorseInventory(playerInv, horseInv, horse, Game.getGame().thePlayer));
|
super(new ContainerHorseInventory(playerInv, horseInv, horse, Client.CLIENT.thePlayer));
|
||||||
this.playerInventory = playerInv;
|
this.playerInventory = playerInv;
|
||||||
this.horseInventory = horseInv;
|
this.horseInventory = horseInv;
|
||||||
// this.horseEntity = horse;
|
// this.horseEntity = horse;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.gui.container;
|
package client.gui.container;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.inventory.ContainerMachine;
|
import common.inventory.ContainerMachine;
|
||||||
import common.inventory.IInventory;
|
import common.inventory.IInventory;
|
||||||
import common.inventory.InventoryPlayer;
|
import common.inventory.InventoryPlayer;
|
||||||
|
@ -16,7 +16,7 @@ public class GuiMachine extends GuiContainer
|
||||||
|
|
||||||
public GuiMachine(InventoryPlayer player, IInventory inv, TileEntityMachine machine)
|
public GuiMachine(InventoryPlayer player, IInventory inv, TileEntityMachine machine)
|
||||||
{
|
{
|
||||||
super(new ContainerMachine(player, machine, inv, Game.getGame().thePlayer));
|
super(new ContainerMachine(player, machine, inv, Client.CLIENT.thePlayer));
|
||||||
this.playerInv = player;
|
this.playerInv = player;
|
||||||
this.machineInv = machine;
|
this.machineInv = machine;
|
||||||
// this.allowUserInput = false;
|
// this.allowUserInput = false;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.gui.container;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.inventory.Container;
|
import common.inventory.Container;
|
||||||
import common.inventory.ContainerRepair;
|
import common.inventory.ContainerRepair;
|
||||||
import common.inventory.ICrafting;
|
import common.inventory.ICrafting;
|
||||||
|
@ -21,7 +21,7 @@ public class GuiRepair extends GuiContainer implements ICrafting
|
||||||
|
|
||||||
public GuiRepair(InventoryPlayer inventoryIn, World worldIn)
|
public GuiRepair(InventoryPlayer inventoryIn, World worldIn)
|
||||||
{
|
{
|
||||||
super(new ContainerRepair(inventoryIn, worldIn, Game.getGame().thePlayer));
|
super(new ContainerRepair(inventoryIn, worldIn, Client.CLIENT.thePlayer));
|
||||||
this.playerInventory = inventoryIn;
|
this.playerInventory = inventoryIn;
|
||||||
this.anvil = (ContainerRepair)this.inventorySlots;
|
this.anvil = (ContainerRepair)this.inventorySlots;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.gui.element;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.Formatter;
|
import client.gui.Formatter;
|
||||||
import client.gui.Gui;
|
import client.gui.Gui;
|
||||||
import client.renderer.Drawing;
|
import client.renderer.Drawing;
|
||||||
|
@ -15,7 +15,7 @@ import common.sound.PositionedSound;
|
||||||
import common.util.Util;
|
import common.util.Util;
|
||||||
|
|
||||||
public abstract class Element {
|
public abstract class Element {
|
||||||
protected final Game gm = Game.getGame();
|
protected final Client gm = Client.CLIENT;
|
||||||
|
|
||||||
protected Gui gui;
|
protected Gui gui;
|
||||||
protected Formatter format;
|
protected Formatter format;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.gui.element;
|
package client.gui.element;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.Gui;
|
import client.gui.Gui;
|
||||||
import client.renderer.Drawing;
|
import client.renderer.Drawing;
|
||||||
import common.util.Util;
|
import common.util.Util;
|
||||||
|
@ -11,7 +11,7 @@ public class NavButton extends ActButton {
|
||||||
public NavButton(int x, int y, int w, int h, Gui gui, String text) {
|
public NavButton(int x, int y, int w, int h, Gui gui, String text) {
|
||||||
super(x, y, w, h, new Callback() {
|
super(x, y, w, h, new Callback() {
|
||||||
public void use(ActButton elem, Mode action) {
|
public void use(ActButton elem, Mode action) {
|
||||||
Game.getGame().displayGuiScreen(gui);
|
Client.CLIENT.displayGuiScreen(gui);
|
||||||
}
|
}
|
||||||
}, text);
|
}, text);
|
||||||
this.navGui = gui;
|
this.navGui = gui;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.network;
|
package client.network;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.network.IClientLoginHandler;
|
import common.network.IClientLoginHandler;
|
||||||
import common.network.NetConnection;
|
import common.network.NetConnection;
|
||||||
import common.network.NetHandler;
|
import common.network.NetHandler;
|
||||||
|
@ -10,10 +10,10 @@ import common.packet.RPacketEnableCompression;
|
||||||
import common.packet.RPacketLoginSuccess;
|
import common.packet.RPacketLoginSuccess;
|
||||||
|
|
||||||
public class ClientLoginHandler extends NetHandler implements IClientLoginHandler {
|
public class ClientLoginHandler extends NetHandler implements IClientLoginHandler {
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
private final NetConnection networkManager;
|
private final NetConnection networkManager;
|
||||||
|
|
||||||
public ClientLoginHandler(NetConnection conn, Game gmIn) {
|
public ClientLoginHandler(NetConnection conn, Client gmIn) {
|
||||||
this.networkManager = conn;
|
this.networkManager = conn;
|
||||||
this.gm = gmIn;
|
this.gm = gmIn;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.PlayerController;
|
import client.PlayerController;
|
||||||
import client.gui.Gui;
|
import client.gui.Gui;
|
||||||
import client.gui.GuiConsole;
|
import client.gui.GuiConsole;
|
||||||
|
@ -150,7 +150,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
||||||
/**
|
/**
|
||||||
* Reference to the Game instance, which many handler methods operate on
|
* Reference to the Game instance, which many handler methods operate on
|
||||||
*/
|
*/
|
||||||
private Game gameController;
|
private Client gameController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference to the current ClientWorld instance, which many handler methods operate on
|
* Reference to the current ClientWorld instance, which many handler methods operate on
|
||||||
|
@ -174,7 +174,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
||||||
*/
|
*/
|
||||||
private final Random avRandomizer = new Random();
|
private final Random avRandomizer = new Random();
|
||||||
|
|
||||||
public ClientPlayer(Game gmIn, NetConnection p_i46300_3_)
|
public ClientPlayer(Client gmIn, NetConnection p_i46300_3_)
|
||||||
{
|
{
|
||||||
this.gameController = gmIn;
|
this.gameController = gmIn;
|
||||||
this.netManager = p_i46300_3_;
|
this.netManager = p_i46300_3_;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.blockmodel.BakedModel;
|
import client.renderer.blockmodel.BakedModel;
|
||||||
import client.renderer.blockmodel.BakedQuad;
|
import client.renderer.blockmodel.BakedQuad;
|
||||||
import client.renderer.blockmodel.IBakedModel;
|
import client.renderer.blockmodel.IBakedModel;
|
||||||
|
@ -32,10 +32,10 @@ import common.world.State;
|
||||||
public class BlockRenderer
|
public class BlockRenderer
|
||||||
{
|
{
|
||||||
private ModelManager manager;
|
private ModelManager manager;
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
private final Map<BlockLiquid, TextureAtlasSprite[]> fluids = Maps.newHashMap();
|
private final Map<BlockLiquid, TextureAtlasSprite[]> fluids = Maps.newHashMap();
|
||||||
|
|
||||||
public BlockRenderer(ModelManager manager, Game gm)
|
public BlockRenderer(ModelManager manager, Client gm)
|
||||||
{
|
{
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
this.gm = gm;
|
this.gm = gm;
|
||||||
|
@ -405,7 +405,7 @@ public class BlockRenderer
|
||||||
|
|
||||||
private void initAtlasSprites()
|
private void initAtlasSprites()
|
||||||
{
|
{
|
||||||
TextureMap texturemap = Game.getGame().getTextureMapBlocks();
|
TextureMap texturemap = Client.CLIENT.getTextureMapBlocks();
|
||||||
for(int z = 0; z < FluidRegistry.getNumFluids(); z++) {
|
for(int z = 0; z < FluidRegistry.getNumFluids(); z++) {
|
||||||
BlockLiquid block = FluidRegistry.getStaticBlock(z);
|
BlockLiquid block = FluidRegistry.getStaticBlock(z);
|
||||||
String name = BlockRegistry.REGISTRY.getNameForObject(block).toString();
|
String name = BlockRegistry.REGISTRY.getNameForObject(block).toString();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.Font;
|
import client.gui.Font;
|
||||||
import client.gui.FontChar;
|
import client.gui.FontChar;
|
||||||
import common.color.TextColor;
|
import common.color.TextColor;
|
||||||
|
@ -543,11 +543,11 @@ public abstract class Drawing {
|
||||||
drawText(str, x - size.xpos / 2, y - size.ypos, color);
|
drawText(str, x - size.xpos / 2, y - size.ypos, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawScaled(Game gm, String texture) {
|
public static void drawScaled(Client gm, String texture) {
|
||||||
drawScaled(gm, texture, 0, 0, gm.fb_x, gm.fb_y);
|
drawScaled(gm, texture, 0, 0, gm.fb_x, gm.fb_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void drawScaled(Game gm, String texture, double x, double y, double width, double height) {
|
public static void drawScaled(Client gm, String texture, double x, double y, double width, double height) {
|
||||||
GlState.enableTexture2D();
|
GlState.enableTexture2D();
|
||||||
GlState.disableLighting();
|
GlState.disableLighting();
|
||||||
GlState.disableFog();
|
GlState.disableFog();
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.util.function.Predicate;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.particle.EffectRenderer;
|
import client.renderer.particle.EffectRenderer;
|
||||||
import client.renderer.texture.DynamicTexture;
|
import client.renderer.texture.DynamicTexture;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
|
@ -44,7 +44,7 @@ public class EntityRenderer {
|
||||||
private static final float FOG_DISTANCE = 0.4f;
|
private static final float FOG_DISTANCE = 0.4f;
|
||||||
private static final float SQRT_2 = ExtMath.sqrtf(2.0F);
|
private static final float SQRT_2 = ExtMath.sqrtf(2.0F);
|
||||||
|
|
||||||
private Game gm;
|
private Client gm;
|
||||||
private Random random = new Random();
|
private Random random = new Random();
|
||||||
private float farPlaneDistance;
|
private float farPlaneDistance;
|
||||||
public final ItemRenderer itemRenderer;
|
public final ItemRenderer itemRenderer;
|
||||||
|
@ -72,7 +72,7 @@ public class EntityRenderer {
|
||||||
private double cameraPitch;
|
private double cameraPitch;
|
||||||
private int frameCount;
|
private int frameCount;
|
||||||
|
|
||||||
public EntityRenderer(Game gmIn)
|
public EntityRenderer(Client gmIn)
|
||||||
{
|
{
|
||||||
this.frameCount = 0;
|
this.frameCount = 0;
|
||||||
this.gm = gmIn;
|
this.gm = gmIn;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.nio.FloatBuffer;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.entity.RenderItem;
|
import client.renderer.entity.RenderItem;
|
||||||
import client.renderer.entity.RenderManager;
|
import client.renderer.entity.RenderManager;
|
||||||
import client.renderer.entity.RenderNpc;
|
import client.renderer.entity.RenderNpc;
|
||||||
|
@ -35,7 +35,7 @@ public class ItemRenderer
|
||||||
private static final Vec3 LIGHT1_POS = (new Vec3(-0.20000000298023224D, 1.0D, 0.699999988079071D)).normalize();
|
private static final Vec3 LIGHT1_POS = (new Vec3(-0.20000000298023224D, 1.0D, 0.699999988079071D)).normalize();
|
||||||
|
|
||||||
/** A reference to the Game object. */
|
/** A reference to the Game object. */
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
private ItemStack itemToRender;
|
private ItemStack itemToRender;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,7 +98,7 @@ public class ItemRenderer
|
||||||
GlState.disableColorMaterial();
|
GlState.disableColorMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemRenderer(Game gmIn)
|
public ItemRenderer(Client gmIn)
|
||||||
{
|
{
|
||||||
this.gm = gmIn;
|
this.gm = gmIn;
|
||||||
this.renderManager = gmIn.getRenderManager();
|
this.renderManager = gmIn.getRenderManager();
|
||||||
|
|
|
@ -15,7 +15,7 @@ import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
import org.lwjgl.opengl.GL15;
|
import org.lwjgl.opengl.GL15;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.chunk.ChunkRenderDispatcher;
|
import client.renderer.chunk.ChunkRenderDispatcher;
|
||||||
import client.renderer.chunk.CompiledChunk;
|
import client.renderer.chunk.CompiledChunk;
|
||||||
import client.renderer.chunk.RenderChunk;
|
import client.renderer.chunk.RenderChunk;
|
||||||
|
@ -113,7 +113,7 @@ public class RenderGlobal
|
||||||
private static final String SUN_TEX = "textures/world/sun.png";
|
private static final String SUN_TEX = "textures/world/sun.png";
|
||||||
private static final float[] SUN_COLOR = new float[4];
|
private static final float[] SUN_COLOR = new float[4];
|
||||||
|
|
||||||
private final Game gm;
|
private final Client gm;
|
||||||
private final TextureManager renderEngine;
|
private final TextureManager renderEngine;
|
||||||
private final RenderManager renderManager;
|
private final RenderManager renderManager;
|
||||||
private WorldClient theWorld;
|
private WorldClient theWorld;
|
||||||
|
@ -157,7 +157,7 @@ public class RenderGlobal
|
||||||
private double prevRenderSortZ;
|
private double prevRenderSortZ;
|
||||||
private boolean displayListEntitiesDirty = true;
|
private boolean displayListEntitiesDirty = true;
|
||||||
|
|
||||||
public RenderGlobal(Game gmIn)
|
public RenderGlobal(Client gmIn)
|
||||||
{
|
{
|
||||||
this.gm = gmIn;
|
this.gm = gmIn;
|
||||||
this.renderManager = gmIn.getRenderManager();
|
this.renderManager = gmIn.getRenderManager();
|
||||||
|
@ -939,7 +939,7 @@ public class RenderGlobal
|
||||||
float f = (float)((double)entityIn.prevPitch + (double)(entityIn.rotPitch - entityIn.prevPitch) * partialTicks);
|
float f = (float)((double)entityIn.prevPitch + (double)(entityIn.rotPitch - entityIn.prevPitch) * partialTicks);
|
||||||
float f1 = (float)((double)entityIn.prevYaw + (double)(entityIn.rotYaw - entityIn.prevYaw) * partialTicks);
|
float f1 = (float)((double)entityIn.prevYaw + (double)(entityIn.rotYaw - entityIn.prevYaw) * partialTicks);
|
||||||
|
|
||||||
if (Game.getGame().thirdPersonView == 2)
|
if (Client.CLIENT.thirdPersonView == 2)
|
||||||
{
|
{
|
||||||
f += 180.0F;
|
f += 180.0F;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.concurrent.ArrayBlockingQueue;
|
||||||
import java.util.concurrent.BlockingQueue;
|
import java.util.concurrent.BlockingQueue;
|
||||||
import java.util.concurrent.ThreadFactory;
|
import java.util.concurrent.ThreadFactory;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RegionRenderCacheBuilder;
|
import client.renderer.RegionRenderCacheBuilder;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import client.renderer.VertexBuffer;
|
import client.renderer.VertexBuffer;
|
||||||
|
@ -227,7 +227,7 @@ public class ChunkRenderDispatcher
|
||||||
|
|
||||||
public ListenableFuture<Object> uploadChunk(final BlockLayer player, final RenderBuffer p_178503_2_, final RenderChunk chunkRenderer, final CompiledChunk compiledChunkIn)
|
public ListenableFuture<Object> uploadChunk(final BlockLayer player, final RenderBuffer p_178503_2_, final RenderChunk chunkRenderer, final CompiledChunk compiledChunkIn)
|
||||||
{
|
{
|
||||||
if (Game.getGame().isMainThread())
|
if (Client.CLIENT.isMainThread())
|
||||||
{
|
{
|
||||||
p_178503_2_.reset();
|
p_178503_2_.reset();
|
||||||
chunkRenderer.getVertexBufferByLayer(player.ordinal()).bufferData(p_178503_2_.getByteBuffer());
|
chunkRenderer.getVertexBufferByLayer(player.ordinal()).bufferData(p_178503_2_.getByteBuffer());
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RegionRenderCacheBuilder;
|
import client.renderer.RegionRenderCacheBuilder;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
|
@ -75,7 +75,7 @@ public class ChunkRenderWorker implements Runnable
|
||||||
generator.getLock().unlock();
|
generator.getLock().unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity lvt_2_1_ = Game.getGame().getRenderViewEntity();
|
Entity lvt_2_1_ = Client.CLIENT.getRenderViewEntity();
|
||||||
|
|
||||||
if (lvt_2_1_ == null)
|
if (lvt_2_1_ == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.RegionRenderCache;
|
import client.renderer.RegionRenderCache;
|
||||||
|
@ -141,7 +141,7 @@ public class RenderChunk
|
||||||
{
|
{
|
||||||
++renderChunksUpdated;
|
++renderChunksUpdated;
|
||||||
boolean[] aboolean = new boolean[BlockLayer.values().length];
|
boolean[] aboolean = new boolean[BlockLayer.values().length];
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
|
|
||||||
for (BlockPos.MutableBlockPos blockpos$mutableblockpos : BlockPos.getAllInBoxMutable(blockpos, blockpos1))
|
for (BlockPos.MutableBlockPos blockpos$mutableblockpos : BlockPos.getAllInBoxMutable(blockpos, blockpos1))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.Drawing;
|
import client.renderer.Drawing;
|
||||||
import client.renderer.Frustum;
|
import client.renderer.Frustum;
|
||||||
|
@ -98,7 +98,7 @@ public abstract class Render<T extends Entity>
|
||||||
private void renderEntityOnFire(Entity entity, double x, double y, double z, float partialTicks)
|
private void renderEntityOnFire(Entity entity, double x, double y, double z, float partialTicks)
|
||||||
{
|
{
|
||||||
GlState.disableLighting();
|
GlState.disableLighting();
|
||||||
TextureMap texturemap = Game.getGame().getTextureMapBlocks();
|
TextureMap texturemap = Client.CLIENT.getTextureMapBlocks();
|
||||||
TextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("blocks/fire_layer_0");
|
TextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("blocks/fire_layer_0");
|
||||||
TextureAtlasSprite textureatlassprite1 = texturemap.getAtlasSprite("blocks/fire_layer_1");
|
TextureAtlasSprite textureatlassprite1 = texturemap.getAtlasSprite("blocks/fire_layer_1");
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
|
@ -28,7 +28,7 @@ public class RenderBlockEntity extends Render<Entity>
|
||||||
// if(entity.isInvisible()) {
|
// if(entity.isInvisible()) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.model.ModelDie;
|
import client.renderer.model.ModelDie;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
import common.entity.projectile.EntityDie;
|
import common.entity.projectile.EntityDie;
|
||||||
|
@ -33,7 +33,7 @@ public class RenderDie extends Render<EntityDie>
|
||||||
GL11.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
|
GL11.glRotatef((float)((entity.ticksExisted % 10) * (360 / 10)), 0.3f, 0.4f, 0.1f);
|
||||||
// GlState.translate(-0.05F, -0.05F, 0.05F);
|
// GlState.translate(-0.05F, -0.05F, 0.05F);
|
||||||
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||||
Game.getGame().getRenderItem().renderItem(entity.getStack(), Camera.GROUND);
|
Client.CLIENT.getRenderItem().renderItem(entity.getStack(), Camera.GROUND);
|
||||||
// blockrendererdispatcher.renderBlockBrightness(Blocks.planks.getDefaultState(), entity.getBrightness(partialTicks));
|
// blockrendererdispatcher.renderBlockBrightness(Blocks.planks.getDefaultState(), entity.getBrightness(partialTicks));
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
super.doRender(entity, x, y, z, partialTicks);
|
super.doRender(entity, x, y, z, partialTicks);
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
|
@ -51,7 +51,7 @@ public class RenderFallingBlock extends Render<EntityFalling>
|
||||||
int j = blockpos.getY();
|
int j = blockpos.getY();
|
||||||
int k = blockpos.getZ();
|
int k = blockpos.getZ();
|
||||||
worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
|
worldrenderer.setTranslation((double)((float)(-i) - 0.5F), (double)(-j), (double)((float)(-k) - 0.5F));
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null);
|
IBakedModel ibakedmodel = blockrendererdispatcher.getModelFromBlockState(iblockstate, world, (BlockPos)null);
|
||||||
blockrendererdispatcher.renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false);
|
blockrendererdispatcher.renderModel(world, ibakedmodel, iblockstate, blockpos, worldrenderer, false);
|
||||||
worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
|
worldrenderer.setTranslation(0.0D, 0.0D, 0.0D);
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
|
@ -33,7 +33,7 @@ public class RenderFireball extends Render<EntityProjectile>
|
||||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||||
GlState.enableRescaleNormal();
|
GlState.enableRescaleNormal();
|
||||||
GL11.glScalef(this.scale, this.scale, this.scale);
|
GL11.glScalef(this.scale, this.scale, this.scale);
|
||||||
TextureAtlasSprite textureatlassprite = Game.getGame().getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
|
TextureAtlasSprite textureatlassprite = Client.CLIENT.getRenderItem().getItemModelMesher().getParticleIcon(Items.fire_charge);
|
||||||
// Tessellator tessellator = Tessellator.getInstance();
|
// Tessellator tessellator = Tessellator.getInstance();
|
||||||
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
RenderBuffer worldrenderer = Tessellator.getBuffer();
|
||||||
float f = textureatlassprite.getMinU();
|
float f = textureatlassprite.getMinU();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
|
@ -65,7 +65,7 @@ public class RenderFish extends Render<EntityHook>
|
||||||
double d2 = entity.angler.prevZ + (entity.angler.posZ - entity.angler.prevZ) * (double)partialTicks + vec3.zCoord;
|
double d2 = entity.angler.prevZ + (entity.angler.posZ - entity.angler.prevZ) * (double)partialTicks + vec3.zCoord;
|
||||||
double d3 = (double)entity.angler.getEyeHeight();
|
double d3 = (double)entity.angler.getEyeHeight();
|
||||||
|
|
||||||
if (this.renderManager.gm != null && this.renderManager.gm.thirdPersonView > 0 || entity.angler != Game.getGame().thePlayer)
|
if (this.renderManager.gm != null && this.renderManager.gm.thirdPersonView > 0 || entity.angler != Client.CLIENT.thePlayer)
|
||||||
{
|
{
|
||||||
float f9 = (entity.angler.prevYawOffset + (entity.angler.yawOffset - entity.angler.prevYawOffset) * partialTicks) * (float)Math.PI / 180.0F;
|
float f9 = (entity.angler.prevYawOffset + (entity.angler.yawOffset - entity.angler.prevYawOffset) * partialTicks) * (float)Math.PI / 180.0F;
|
||||||
double d4 = (double)ExtMath.sin(f9);
|
double d4 = (double)ExtMath.sin(f9);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.model.ModelHorse;
|
import client.renderer.model.ModelHorse;
|
||||||
import client.renderer.texture.LayeredTexture;
|
import client.renderer.texture.LayeredTexture;
|
||||||
import common.collect.Sets;
|
import common.collect.Sets;
|
||||||
|
@ -90,7 +90,7 @@ public class RenderHorse extends RenderLiving<EntityHorse>
|
||||||
{
|
{
|
||||||
if (!loaded.contains(s))
|
if (!loaded.contains(s))
|
||||||
{
|
{
|
||||||
Game.getGame().getTextureManager().loadTexture(s, new LayeredTexture(horse.getVariantTexturePaths()));
|
Client.CLIENT.getTextureManager().loadTexture(s, new LayeredTexture(horse.getVariantTexturePaths()));
|
||||||
loaded.add(s);
|
loaded.add(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Map;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.init.RenderRegistry;
|
import client.init.RenderRegistry;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
|
@ -55,7 +55,7 @@ public class RenderManager
|
||||||
public Entity pointedEntity;
|
public Entity pointedEntity;
|
||||||
public float playerViewY;
|
public float playerViewY;
|
||||||
public float playerViewX;
|
public float playerViewX;
|
||||||
public Game gm;
|
public Client gm;
|
||||||
public double viewerPosX;
|
public double viewerPosX;
|
||||||
public double viewerPosY;
|
public double viewerPosY;
|
||||||
public double viewerPosZ;
|
public double viewerPosZ;
|
||||||
|
@ -145,7 +145,7 @@ public class RenderManager
|
||||||
return this.models.get(model);
|
return this.models.get(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cacheActiveRenderInfo(World worldIn, Entity livingPlayerIn, Entity pointedEntityIn, Game optionsIn, float partialTicks)
|
public void cacheActiveRenderInfo(World worldIn, Entity livingPlayerIn, Entity pointedEntityIn, Client optionsIn, float partialTicks)
|
||||||
{
|
{
|
||||||
this.worldObj = worldIn;
|
this.worldObj = worldIn;
|
||||||
this.gm = optionsIn;
|
this.gm = optionsIn;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.model.ModelBase;
|
import client.renderer.model.ModelBase;
|
||||||
import client.renderer.model.ModelMinecart;
|
import client.renderer.model.ModelMinecart;
|
||||||
|
@ -123,7 +123,7 @@ public class RenderMinecart<T extends EntityCart> extends Render<T>
|
||||||
protected void func_180560_a(T minecart, float partialTicks, State state)
|
protected void func_180560_a(T minecart, float partialTicks, State state)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
Game.getGame().getBlockRendererDispatcher().renderBlockBrightness(state, minecart.getBrightness(partialTicks));
|
Client.CLIENT.getBlockRendererDispatcher().renderBlockBrightness(state, minecart.getBrightness(partialTicks));
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import common.entity.item.EntityTntCart;
|
import common.entity.item.EntityTntCart;
|
||||||
|
@ -35,7 +35,7 @@ public class RenderTntMinecart extends RenderMinecart<EntityTntCart>
|
||||||
|
|
||||||
if (i > -1 && i / 5 % 2 == 0)
|
if (i > -1 && i / 5 % 2 == 0)
|
||||||
{
|
{
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
GlState.disableTexture2D();
|
GlState.disableTexture2D();
|
||||||
GlState.disableLighting();
|
GlState.disableLighting();
|
||||||
GlState.enableBlend();
|
GlState.enableBlend();
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.entity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.texture.TextureMap;
|
import client.renderer.texture.TextureMap;
|
||||||
|
@ -25,7 +25,7 @@ public class RenderTntPrimed extends Render<EntityTnt>
|
||||||
*/
|
*/
|
||||||
public void doRender(EntityTnt entity, double x, double y, double z, float partialTicks)
|
public void doRender(EntityTnt entity, double x, double y, double z, float partialTicks)
|
||||||
{
|
{
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
GL11.glTranslatef((float)x, (float)y + 0.5F, (float)z);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.blockmodel.ModelGenerator;
|
import client.renderer.blockmodel.ModelGenerator;
|
||||||
import client.renderer.model.ModelBox;
|
import client.renderer.model.ModelBox;
|
||||||
|
@ -62,7 +62,7 @@ public class LayerExtra implements LayerRenderer<EntityNPC>
|
||||||
// if (!entity.isInvisible())
|
// if (!entity.isInvisible())
|
||||||
// {
|
// {
|
||||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
Game.getGame().getTextureManager().bindTexture(EntityTexManager.getSkin(extended));
|
Client.CLIENT.getTextureManager().bindTexture(EntityTexManager.getSkin(extended));
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
|
||||||
if (entity.isSneakingVisually())
|
if (entity.isSneakingVisually())
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.layers;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.entity.RendererLivingEntity;
|
import client.renderer.entity.RendererLivingEntity;
|
||||||
import client.renderer.model.ModelBiped;
|
import client.renderer.model.ModelBiped;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
|
@ -53,7 +53,7 @@ public class LayerHeldItem implements LayerRenderer<EntityLiving>
|
||||||
}
|
}
|
||||||
|
|
||||||
Item item = itemstack.getItem();
|
Item item = itemstack.getItem();
|
||||||
Game gm = Game.getGame();
|
Client gm = Client.CLIENT;
|
||||||
|
|
||||||
if (item instanceof ItemBlock && item.getBlock().getRenderType() == 2)
|
if (item instanceof ItemBlock && item.getBlock().getRenderType() == 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.layers;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.entity.RenderMooshroom;
|
import client.renderer.entity.RenderMooshroom;
|
||||||
|
@ -24,7 +24,7 @@ public class LayerMooshroomMushroom implements LayerRenderer<EntityMooshroom>
|
||||||
{
|
{
|
||||||
if (!entitylivingbaseIn.isChild()) // && !entitylivingbaseIn.isInvisible())
|
if (!entitylivingbaseIn.isChild()) // && !entitylivingbaseIn.isInvisible())
|
||||||
{
|
{
|
||||||
BlockRenderer blockrendererdispatcher = Game.getGame().getBlockRendererDispatcher();
|
BlockRenderer blockrendererdispatcher = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
|
this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture);
|
||||||
GlState.enableCull();
|
GlState.enableCull();
|
||||||
GlState.cullFace(GL11.GL_FRONT);
|
GlState.cullFace(GL11.GL_FRONT);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.ItemRegistry;
|
import common.init.ItemRegistry;
|
||||||
|
@ -29,7 +29,7 @@ public class EntityBreakingFX extends EntityFX
|
||||||
protected EntityBreakingFX(World worldIn, double posXIn, double posYIn, double posZIn, Item p_i1196_8_, int p_i1196_9_)
|
protected EntityBreakingFX(World worldIn, double posXIn, double posYIn, double posZIn, Item p_i1196_8_, int p_i1196_9_)
|
||||||
{
|
{
|
||||||
super(worldIn, posXIn, posYIn, posZIn, 0.0D, 0.0D, 0.0D);
|
super(worldIn, posXIn, posYIn, posZIn, 0.0D, 0.0D, 0.0D);
|
||||||
this.setParticleIcon(Game.getGame().getRenderItem().getItemModelMesher().getParticleIcon(p_i1196_8_, p_i1196_9_));
|
this.setParticleIcon(Client.CLIENT.getRenderItem().getItemModelMesher().getParticleIcon(p_i1196_8_, p_i1196_9_));
|
||||||
this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
|
this.particleRed = this.particleGreen = this.particleBlue = 1.0F;
|
||||||
this.particleGravity = 1.0F; // Blocks.snow.particleGravity;
|
this.particleGravity = 1.0F; // Blocks.snow.particleGravity;
|
||||||
this.particleScale /= 2.0F;
|
this.particleScale /= 2.0F;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import common.block.Block;
|
import common.block.Block;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
|
@ -19,7 +19,7 @@ public class EntityDiggingFX extends EntityFX
|
||||||
{
|
{
|
||||||
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||||
this.sourceState = state;
|
this.sourceState = state;
|
||||||
this.setParticleIcon(Game.getGame().getBlockRendererDispatcher().getModelManager().getTexture(state));
|
this.setParticleIcon(Client.CLIENT.getBlockRendererDispatcher().getModelManager().getTexture(state));
|
||||||
this.particleGravity = 1.0F; // state.getBlock().particleGravity;
|
this.particleGravity = 1.0F; // state.getBlock().particleGravity;
|
||||||
this.particleRed = this.particleGreen = this.particleBlue = 0.6F;
|
this.particleRed = this.particleGreen = this.particleBlue = 0.6F;
|
||||||
this.particleScale /= 2.0F;
|
this.particleScale /= 2.0F;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import client.renderer.texture.TextureAtlasSprite;
|
import client.renderer.texture.TextureAtlasSprite;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
|
@ -102,11 +102,11 @@ public class EntityFX extends Entity implements IEntityFX
|
||||||
{
|
{
|
||||||
if (this.particleAlpha == 1.0F && alpha < 1.0F)
|
if (this.particleAlpha == 1.0F && alpha < 1.0F)
|
||||||
{
|
{
|
||||||
Game.getGame().effectRenderer.moveToAlphaLayer(this);
|
Client.CLIENT.effectRenderer.moveToAlphaLayer(this);
|
||||||
}
|
}
|
||||||
else if (this.particleAlpha < 1.0F && alpha == 1.0F)
|
else if (this.particleAlpha < 1.0F && alpha == 1.0F)
|
||||||
{
|
{
|
||||||
Game.getGame().effectRenderer.moveToNoAlphaLayer(this);
|
Client.CLIENT.effectRenderer.moveToNoAlphaLayer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.particleAlpha = alpha;
|
this.particleAlpha = alpha;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.renderer.particle;
|
package client.renderer.particle;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.init.SoundEvent;
|
import common.init.SoundEvent;
|
||||||
|
@ -18,7 +18,7 @@ public class EntityFirework
|
||||||
{
|
{
|
||||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||||
{
|
{
|
||||||
EntityFirework.SparkFX entityfirework$sparkfx = new EntityFirework.SparkFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, Game.getGame().effectRenderer);
|
EntityFirework.SparkFX entityfirework$sparkfx = new EntityFirework.SparkFX(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn, Client.CLIENT.effectRenderer);
|
||||||
entityfirework$sparkfx.setAlphaF(0.99F);
|
entityfirework$sparkfx.setAlphaF(0.99F);
|
||||||
return entityfirework$sparkfx;
|
return entityfirework$sparkfx;
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ public class EntityFirework
|
||||||
|
|
||||||
private boolean isFarAway()
|
private boolean isFarAway()
|
||||||
{
|
{
|
||||||
Game gm = Game.getGame();
|
Client gm = Client.CLIENT;
|
||||||
return gm == null || gm.getRenderViewEntity() == null || gm.getRenderViewEntity().getDistanceSq(this.posX, this.posY, this.posZ) >= 256.0D;
|
return gm == null || gm.getRenderViewEntity() == null || gm.getRenderViewEntity().getDistanceSq(this.posX, this.posY, this.posZ) >= 256.0D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.particle;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
|
@ -88,7 +88,7 @@ public class EntityFootStepFX extends EntityFX
|
||||||
{
|
{
|
||||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||||
{
|
{
|
||||||
return new EntityFootStepFX(Game.getGame().getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn);
|
return new EntityFootStepFX(Client.CLIENT.getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.particle;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.ItemRenderer;
|
import client.renderer.ItemRenderer;
|
||||||
|
@ -95,7 +95,7 @@ public class EntityLargeExplodeFX extends EntityFX
|
||||||
{
|
{
|
||||||
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
public EntityFX getEntityFX(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_)
|
||||||
{
|
{
|
||||||
return new EntityLargeExplodeFX(Game.getGame().getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
return new EntityLargeExplodeFX(Client.CLIENT.getTextureManager(), worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.particle;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL13;
|
import org.lwjgl.opengl.GL13;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.RenderBuffer;
|
import client.renderer.RenderBuffer;
|
||||||
import client.renderer.entity.RenderManager;
|
import client.renderer.entity.RenderManager;
|
||||||
|
@ -16,7 +16,7 @@ public class EntityPickupFX extends EntityFX
|
||||||
private int age;
|
private int age;
|
||||||
private int maxAge;
|
private int maxAge;
|
||||||
private float field_174841_aA;
|
private float field_174841_aA;
|
||||||
private RenderManager field_174842_aB = Game.getGame().getRenderManager();
|
private RenderManager field_174842_aB = Client.CLIENT.getRenderManager();
|
||||||
|
|
||||||
public EntityPickupFX(World worldIn, Entity p_i1233_2_, Entity p_i1233_3_, float p_i1233_4_)
|
public EntityPickupFX(World worldIn, Entity p_i1233_2_, Entity p_i1233_3_, float p_i1233_4_)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.entity.RenderNpc;
|
import client.renderer.entity.RenderNpc;
|
||||||
import client.renderer.layers.LayerExtra;
|
import client.renderer.layers.LayerExtra;
|
||||||
import common.collect.Lists;
|
import common.collect.Lists;
|
||||||
|
@ -35,7 +35,7 @@ public abstract class EntityTexManager
|
||||||
private static final Map<ModelType, LayerExtra> DEF_LAYERS = Maps.newEnumMap(ModelType.class);
|
private static final Map<ModelType, LayerExtra> DEF_LAYERS = Maps.newEnumMap(ModelType.class);
|
||||||
|
|
||||||
public static void loadNpcTextures() {
|
public static void loadNpcTextures() {
|
||||||
TextureManager manager = Game.getGame().getTextureManager();
|
TextureManager manager = Client.CLIENT.getTextureManager();
|
||||||
for(Entry<String, ModelType> entry : SpeciesRegistry.SKINS.entrySet()) {
|
for(Entry<String, ModelType> entry : SpeciesRegistry.SKINS.entrySet()) {
|
||||||
String skin = entry.getKey();
|
String skin = entry.getKey();
|
||||||
// skin = skin.startsWith("~") ? skin.substring(1) : skin;
|
// skin = skin.startsWith("~") ? skin.substring(1) : skin;
|
||||||
|
@ -130,7 +130,7 @@ public abstract class EntityTexManager
|
||||||
public static String getDefault(ModelType model) {
|
public static String getDefault(ModelType model) {
|
||||||
String def = DEF_TEXTURES.get(model);
|
String def = DEF_TEXTURES.get(model);
|
||||||
if(def == null)
|
if(def == null)
|
||||||
DEF_TEXTURES.put(model, def = Game.getGame().getRenderManager().getRenderObject(model).getDefaultTexture());
|
DEF_TEXTURES.put(model, def = Client.CLIENT.getRenderManager().getRenderObject(model).getDefaultTexture());
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,21 +149,21 @@ public abstract class EntityTexManager
|
||||||
public static LayerExtra getLayer(int id, String skin, ModelType model)
|
public static LayerExtra getLayer(int id, String skin, ModelType model)
|
||||||
{
|
{
|
||||||
if(id == -1)
|
if(id == -1)
|
||||||
return Game.getGame().getTextureManager().getTexture(getNpcSkinLocation(skin)) != null ? NPC_LAYERS.get(skin.toLowerCase()) : DEF_LAYERS.get(model);
|
return Client.CLIENT.getTextureManager().getTexture(getNpcSkinLocation(skin)) != null ? NPC_LAYERS.get(skin.toLowerCase()) : DEF_LAYERS.get(model);
|
||||||
return altNpcLayer != null ? Game.getGame().getTextureManager().getTexture(getNpcSkinLocation(altNpcLayer)) != null ?
|
return altNpcLayer != null ? Client.CLIENT.getTextureManager().getTexture(getNpcSkinLocation(altNpcLayer)) != null ?
|
||||||
NPC_LAYERS.get(altNpcLayer.toLowerCase()) : DEF_LAYERS.get(model) : (altLayer != -1 ? USER_LAYERS.get(altLayer) : (USER_TEXTURES.contains(id) ? USER_LAYERS.get(id) : (skin != null && Game.getGame().getTextureManager().getTexture(getNpcSkinLocation(skin)) != null ? NPC_LAYERS.get(skin.toLowerCase()) : DEF_LAYERS.get(model))));
|
NPC_LAYERS.get(altNpcLayer.toLowerCase()) : DEF_LAYERS.get(model) : (altLayer != -1 ? USER_LAYERS.get(altLayer) : (USER_TEXTURES.contains(id) ? USER_LAYERS.get(id) : (skin != null && Client.CLIENT.getTextureManager().getTexture(getNpcSkinLocation(skin)) != null ? NPC_LAYERS.get(skin.toLowerCase()) : DEF_LAYERS.get(model))));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getSkin(int id, String skin, ModelType model)
|
public static String getSkin(int id, String skin, ModelType model)
|
||||||
{
|
{
|
||||||
String loc = id != -1 ? (altTexture != null ? altTexture : getSkinLocation(id)) : getNpcSkinLocation(skin);
|
String loc = id != -1 ? (altTexture != null ? altTexture : getSkinLocation(id)) : getNpcSkinLocation(skin);
|
||||||
if(id != -1 && skin != null && Game.getGame().getTextureManager().getTexture(loc) == null)
|
if(id != -1 && skin != null && Client.CLIENT.getTextureManager().getTexture(loc) == null)
|
||||||
loc = getNpcSkinLocation(skin);
|
loc = getNpcSkinLocation(skin);
|
||||||
return Game.getGame().getTextureManager().getTexture(loc) != null ? loc : getDefault(model);
|
return Client.CLIENT.getTextureManager().getTexture(loc) != null ? loc : getDefault(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasCustomSkin(int id) {
|
public static boolean hasCustomSkin(int id) {
|
||||||
return Game.getGame().getTextureManager().getTexture(getSkinLocation(id)) != null;
|
return Client.CLIENT.getTextureManager().getTexture(getSkinLocation(id)) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCape(String name)
|
public static String getCape(String name)
|
||||||
|
@ -171,7 +171,7 @@ public abstract class EntityTexManager
|
||||||
if(name == null || name.isEmpty())
|
if(name == null || name.isEmpty())
|
||||||
return null;
|
return null;
|
||||||
String loc = getCapeLocation(name);
|
String loc = getCapeLocation(name);
|
||||||
return Game.getGame().getTextureManager().getTexture(loc) != null ? loc : null;
|
return Client.CLIENT.getTextureManager().getTexture(loc) != null ? loc : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void clearTextures() {
|
public static void clearTextures() {
|
||||||
|
@ -185,7 +185,7 @@ public abstract class EntityTexManager
|
||||||
if(comp == null && !USER_TEXTURES.contains(id))
|
if(comp == null && !USER_TEXTURES.contains(id))
|
||||||
return;
|
return;
|
||||||
// user = user.toLowerCase();
|
// user = user.toLowerCase();
|
||||||
TextureManager manager = Game.getGame().getTextureManager();
|
TextureManager manager = Client.CLIENT.getTextureManager();
|
||||||
String loc = getSkinLocation(id);
|
String loc = getSkinLocation(id);
|
||||||
DynamicTexture dyntex = (DynamicTexture)manager.getTexture(loc);
|
DynamicTexture dyntex = (DynamicTexture)manager.getTexture(loc);
|
||||||
if(comp == null) {
|
if(comp == null) {
|
||||||
|
@ -219,14 +219,14 @@ public abstract class EntityTexManager
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void compToImage(byte[] comp, int[] img, ModelType model) {
|
public static void compToImage(byte[] comp, int[] img, ModelType model) {
|
||||||
RenderNpc render = Game.getGame().getRenderManager().getRenderObject(model);
|
RenderNpc render = Client.CLIENT.getRenderManager().getRenderObject(model);
|
||||||
if(comp.length < render.getCompressedSize())
|
if(comp.length < render.getCompressedSize())
|
||||||
comp = new byte[render.getCompressedSize()];
|
comp = new byte[render.getCompressedSize()];
|
||||||
render.compToImage(comp, img, model.texWidth);
|
render.compToImage(comp, img, model.texWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] imageToComp(int[] img, ModelType model) {
|
public static byte[] imageToComp(int[] img, ModelType model) {
|
||||||
RenderNpc render = Game.getGame().getRenderManager().getRenderObject(model);
|
RenderNpc render = Client.CLIENT.getRenderManager().getRenderObject(model);
|
||||||
byte[] comp = new byte[render.getCompressedSize()];
|
byte[] comp = new byte[render.getCompressedSize()];
|
||||||
render.imageToComp(comp, img, model.texWidth);
|
render.imageToComp(comp, img, model.texWidth);
|
||||||
return comp;
|
return comp;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
import client.renderer.model.ModelBanner;
|
import client.renderer.model.ModelBanner;
|
||||||
import client.renderer.texture.LayeredColorMaskTexture;
|
import client.renderer.texture.LayeredColorMaskTexture;
|
||||||
|
@ -111,7 +111,7 @@ public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEnti
|
||||||
|
|
||||||
if (i - tileentitybannerrenderer$timedbannertexture1.systemTime > 60000L)
|
if (i - tileentitybannerrenderer$timedbannertexture1.systemTime > 60000L)
|
||||||
{
|
{
|
||||||
Game.getGame().getTextureManager().deleteTexture(tileentitybannerrenderer$timedbannertexture1.bannerTexture);
|
Client.CLIENT.getTextureManager().deleteTexture(tileentitybannerrenderer$timedbannertexture1.bannerTexture);
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ public class TileEntityBannerRenderer extends TileEntitySpecialRenderer<TileEnti
|
||||||
|
|
||||||
tileentitybannerrenderer$timedbannertexture = new TileEntityBannerRenderer.TimedBannerTexture();
|
tileentitybannerrenderer$timedbannertexture = new TileEntityBannerRenderer.TimedBannerTexture();
|
||||||
tileentitybannerrenderer$timedbannertexture.bannerTexture = s;
|
tileentitybannerrenderer$timedbannertexture.bannerTexture = s;
|
||||||
Game.getGame().getTextureManager().loadTexture(tileentitybannerrenderer$timedbannertexture.bannerTexture, new LayeredColorMaskTexture(BANNERTEXTURES, list2, list));
|
Client.CLIENT.getTextureManager().loadTexture(tileentitybannerrenderer$timedbannertexture.bannerTexture, new LayeredColorMaskTexture(BANNERTEXTURES, list2, list));
|
||||||
DESIGNS.put(s, tileentitybannerrenderer$timedbannertexture);
|
DESIGNS.put(s, tileentitybannerrenderer$timedbannertexture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.tileentity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import common.entity.Entity;
|
import common.entity.Entity;
|
||||||
import common.tileentity.TileEntityMobSpawner;
|
import common.tileentity.TileEntityMobSpawner;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public class TileEntityMobSpawnerRenderer extends TileEntitySpecialRenderer<Tile
|
||||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||||
GL11.glScalef(f, f, f);
|
GL11.glScalef(f, f, f);
|
||||||
entity.setLocationAndAngles(posX, posY, posZ, 0.0F, 0.0F);
|
entity.setLocationAndAngles(posX, posY, posZ, 0.0F, 0.0F);
|
||||||
Game.getGame().getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, partialTicks);
|
Client.CLIENT.getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, partialTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package client.renderer.tileentity;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.renderer.BlockRenderer;
|
import client.renderer.BlockRenderer;
|
||||||
import client.renderer.DefaultVertexFormats;
|
import client.renderer.DefaultVertexFormats;
|
||||||
import client.renderer.GlState;
|
import client.renderer.GlState;
|
||||||
|
@ -22,7 +22,7 @@ import common.world.World;
|
||||||
|
|
||||||
public class TileEntityPistonRenderer extends TileEntitySpecialRenderer<TileEntityPiston>
|
public class TileEntityPistonRenderer extends TileEntitySpecialRenderer<TileEntityPiston>
|
||||||
{
|
{
|
||||||
private final BlockRenderer blockRenderer = Game.getGame().getBlockRendererDispatcher();
|
private final BlockRenderer blockRenderer = Client.CLIENT.getBlockRendererDispatcher();
|
||||||
|
|
||||||
public void renderTileEntityAt(TileEntityPiston te, double x, double y, double z, float partialTicks, int destroyStage)
|
public void renderTileEntityAt(TileEntityPiston te, double x, double y, double z, float partialTicks, int destroyStage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.window;
|
package client.window;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.element.Element;
|
import client.gui.element.Element;
|
||||||
import client.vars.CVar;
|
import client.vars.CVar;
|
||||||
import client.vars.CVarCategory;
|
import client.vars.CVarCategory;
|
||||||
|
@ -104,9 +104,9 @@ public enum Bind implements Identifyable, CVar {
|
||||||
waitingFor.input = input;
|
waitingFor.input = input;
|
||||||
waitingFor = null;
|
waitingFor = null;
|
||||||
keyRelease = null;
|
keyRelease = null;
|
||||||
Game.getGame().setDirty();
|
Client.CLIENT.setDirty();
|
||||||
if(Game.getGame().open != null)
|
if(Client.CLIENT.open != null)
|
||||||
Game.getGame().open.reformat();
|
Client.CLIENT.open.reformat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(keyRelease == null) {
|
else if(keyRelease == null) {
|
||||||
|
@ -116,9 +116,9 @@ public enum Bind implements Identifyable, CVar {
|
||||||
else {
|
else {
|
||||||
waitingFor.input = input;
|
waitingFor.input = input;
|
||||||
waitingFor = null;
|
waitingFor = null;
|
||||||
Game.getGame().setDirty();
|
Client.CLIENT.setDirty();
|
||||||
if(Game.getGame().open != null)
|
if(Client.CLIENT.open != null)
|
||||||
Game.getGame().open.reformat();
|
Client.CLIENT.open.reformat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.window;
|
package client.window;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
|
|
||||||
public enum Button implements Input {
|
public enum Button implements Input {
|
||||||
MOUSE_LEFT("lmb", "Linke Maustaste"),
|
MOUSE_LEFT("lmb", "Linke Maustaste"),
|
||||||
|
@ -37,7 +37,7 @@ public enum Button implements Input {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean read() {
|
public boolean read() {
|
||||||
return Game.getGame().open == null && this.down;
|
return Client.CLIENT.open == null && this.down;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDown(boolean down) {
|
public void setDown(boolean down) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package client.window;
|
package client.window;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
|
|
||||||
public enum Wheel implements Input {
|
public enum Wheel implements Input {
|
||||||
SCROLL_UP("scrup", "Mausrad aufwärts"),
|
SCROLL_UP("scrup", "Mausrad aufwärts"),
|
||||||
|
@ -27,7 +27,7 @@ public enum Wheel implements Input {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean read() {
|
public boolean read() {
|
||||||
return Game.getGame().open == null && this.used;
|
return Client.CLIENT.open == null && this.used;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsed() {
|
public void setUsed() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Map.Entry;
|
||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
import java.util.zip.InflaterInputStream;
|
import java.util.zip.InflaterInputStream;
|
||||||
|
|
||||||
import client.Game;
|
import client.Client;
|
||||||
import client.gui.GuiConvert;
|
import client.gui.GuiConvert;
|
||||||
import client.gui.GuiLoading;
|
import client.gui.GuiLoading;
|
||||||
import client.gui.GuiLoading.Callback;
|
import client.gui.GuiLoading.Callback;
|
||||||
|
@ -1239,8 +1239,8 @@ public final class Converter {
|
||||||
// if(nbt == null)
|
// if(nbt == null)
|
||||||
// return false;
|
// return false;
|
||||||
final Converter conv = new Converter();
|
final Converter conv = new Converter();
|
||||||
Game.getGame().displayGuiScreen(new GuiLoading("Konvertiere Welt ...", new Callback() {
|
Client.CLIENT.displayGuiScreen(new GuiLoading("Konvertiere Welt ...", new Callback() {
|
||||||
public void poll(Game gm, GuiLoading gui) {
|
public void poll(Client gm, GuiLoading gui) {
|
||||||
if(conv.totalRegions > 0) {
|
if(conv.totalRegions > 0) {
|
||||||
gui.setBar(conv.task, "Regionen", conv.totalRegions);
|
gui.setBar(conv.task, "Regionen", conv.totalRegions);
|
||||||
gui.setProgress(conv.doneRegions);
|
gui.setProgress(conv.doneRegions);
|
||||||
|
@ -1392,9 +1392,9 @@ public final class Converter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.IO.info("Welt '" + dir + "' wurde in %d Sekunden konvertiert", (System.currentTimeMillis() - cur) / 1000L);
|
Log.IO.info("Welt '" + dir + "' wurde in %d Sekunden konvertiert", (System.currentTimeMillis() - cur) / 1000L);
|
||||||
Game.getGame().schedule(new Runnable() {
|
Client.CLIENT.schedule(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Game.getGame().displayGuiScreen(GuiConvert.INSTANCE);
|
Client.CLIENT.displayGuiScreen(GuiConvert.INSTANCE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue