fix debug mode clutter
This commit is contained in:
parent
b801a47df6
commit
681bb4dc4e
3 changed files with 68 additions and 55 deletions
|
@ -2578,11 +2578,12 @@ public class Client implements IThreadListener {
|
|||
Client.this.open.init();
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Maximale Helligkeit: %s", (Client.this.setGamma ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.L, "Maximale Helligkeit umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Maximale Helligkeit: %s", (Client.this.setGamma ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.J, "JVM GC ausführen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Führe JVM GC aus");
|
||||
|
@ -2594,34 +2595,38 @@ public class Client implements IThreadListener {
|
|||
Client.this.logFeed("JVM GC ausgeführt: %d MB freigegeben", (int)(mem / 1024L / 1024L));
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.B, "Hitbox-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.getRenderManager().setDebugBoundingBox(!Client.this.getRenderManager().isDebugBoundingBox());
|
||||
Client.this.logFeed("Objekt-Grenzen: %s", Client.this.getRenderManager().isDebugBoundingBox() ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.B, "Hitbox-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.getRenderManager().setDebugBoundingBox(!Client.this.getRenderManager().isDebugBoundingBox());
|
||||
Client.this.logFeed("Objekt-Grenzen: %s", Client.this.getRenderManager().isDebugBoundingBox() ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.K, "Debug-Kamera in 3. Person umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Debug-Kamera 3. Person: %s", (Client.this.debugCamEnable ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.X, "Röntgenblick umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.xrayActive ^= true;
|
||||
Client.this.renderGlobal.loadRenderers();
|
||||
Client.this.logFeed("Röntgenblick: %s", Client.this.xrayActive ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.O, "Objekt-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Objekt-Umrahmung: %s", (Client.this.renderOutlines ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.I, "Block-Objekt-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Block-Objekte anzeigen: %s", (Client.this.tileOverlay ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.X, "Röntgenblick umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.xrayActive ^= true;
|
||||
Client.this.renderGlobal.loadRenderers();
|
||||
Client.this.logFeed("Röntgenblick: %s", Client.this.xrayActive ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.O, "Objekt-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Objekt-Umrahmung: %s", (Client.this.renderOutlines ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.I, "Block-Objekt-Overlay umschalten", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Block-Objekte anzeigen: %s", (Client.this.tileOverlay ^= true) ? "an" : "aus");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.Y, "Alle Chunks neu kompilieren", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.logFeed("Kompiliere alle Chunks neu");
|
||||
|
@ -2643,11 +2648,12 @@ public class Client implements IThreadListener {
|
|||
Client.this.logFeed("Sounds wurden neu geladen");
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.W, "Server-Tick-Limit umschalten (Welt beschleunigen / Warpmodus)", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.WARP_MODE);
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.W, "Server-Tick-Limit umschalten (Welt beschleunigen / Warpmodus)", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.WARP_MODE);
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.M, "Alle Gegenstände herbei ziehen (Magnetmodus)", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.MAGNET);
|
||||
|
@ -2658,34 +2664,37 @@ public class Client implements IThreadListener {
|
|||
Client.this.performAction(Action.HEAL);
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.P, "Server Performance-Anfrage senden", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.PERF);
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.C, "Debug-Crash auslösen (2x schnell hintereinander)", new DebugRunner() {
|
||||
long lastUsed;
|
||||
|
||||
public void execute(Keysym key) {
|
||||
if(System.currentTimeMillis() - this.lastUsed <= 1000L) {
|
||||
throw new RuntimeException("Manuell herbeigerufener Debugging-Absturz");
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.P, "Server Performance-Anfrage senden", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.performAction(Action.PERF);
|
||||
}
|
||||
else {
|
||||
this.lastUsed = System.currentTimeMillis();
|
||||
Client.this.logFeed(TextColor.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.C, "Debug-Crash auslösen (2x schnell hintereinander)", new DebugRunner() {
|
||||
long lastUsed;
|
||||
|
||||
public void execute(Keysym key) {
|
||||
if(System.currentTimeMillis() - this.lastUsed <= 1000L) {
|
||||
throw new RuntimeException("Manuell herbeigerufener Debugging-Absturz");
|
||||
}
|
||||
else {
|
||||
this.lastUsed = System.currentTimeMillis();
|
||||
Client.this.logFeed(TextColor.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
this.registerDebug(Keysym.V, "Alle Sounds stoppen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.soundManager.stopSounds();
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.Q, "Programm sofort beenden und trennen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.interrupted = true;
|
||||
}
|
||||
});
|
||||
if(Util.DEVMODE)
|
||||
this.registerDebug(Keysym.Q, "Programm sofort beenden und trennen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.interrupted = true;
|
||||
}
|
||||
});
|
||||
this.registerDebug(Keysym.A, "Bild-Synchonisation umschalten (VSync - begrenzt - unbegrenzt)", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
Client.this.getVar("win_sync").parse("" + (Client.this.vsync ? Client.this.syncLimit : (Client.this.syncLimited ? -1 : 0)));
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.function.Predicate;
|
|||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.natural.BlockFire;
|
||||
import common.collect.Lists;
|
||||
import common.entity.Entity;
|
||||
import common.init.BlockRegistry;
|
||||
|
@ -30,7 +31,10 @@ public class ChunkEmpty extends ChunkClient {
|
|||
|
||||
static {
|
||||
for(Block block : BlockRegistry.blocks()) {
|
||||
STATES.addAll(block.getValidStates());
|
||||
if(block instanceof BlockFire)
|
||||
STATES.add(block.getState());
|
||||
else
|
||||
STATES.addAll(block.getValidStates());
|
||||
}
|
||||
XSTRETCH = ExtMath.ceilf(ExtMath.sqrtf((float)STATES.size()));
|
||||
ZSTRETCH = ExtMath.ceilf((float)STATES.size() / (float)XSTRETCH);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.7 KiB |
Loading…
Add table
Add a link
Reference in a new issue