1
0
Fork 0

color changes

This commit is contained in:
Sen 2025-07-28 17:36:14 +02:00
parent c8bb712930
commit 9e72902142
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
145 changed files with 667 additions and 734 deletions

View file

@ -104,7 +104,6 @@ import common.block.Block;
import common.collect.Lists;
import common.collect.Maps;
import common.collect.Sets;
import common.color.TextColor;
import common.dimension.Dimension;
import common.dimension.Space;
import common.effect.Effect;
@ -169,6 +168,7 @@ import common.util.HitPosition;
import common.util.IntHashMap;
import common.util.LongHashMap;
import common.util.ParticleType;
import common.util.TextColor;
import common.util.Util;
import common.util.Var;
import common.util.HitPosition.ObjectType;
@ -1153,7 +1153,7 @@ public class Client implements IThreadListener {
int energy = entity.getEnergy(type);
if(energy > 0) {
int emax = entity.getEnergyCap(type);
y = this.drawStat(x, y, TextColor.LGRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
y = this.drawStat(x, y, TextColor.LIGHT_GRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
}
}
@ -1241,7 +1241,7 @@ public class Client implements IThreadListener {
else {
Drawing.drawText(String.format("%s%.2f" + TextColor.RESET + " %s [%s" + TextColor.RESET + "], %.3f ms, W %d x %d%s",
this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS",
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
this.vsync ? TextColor.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : ""),
0, 0, 0xffffffff);
@ -1271,7 +1271,7 @@ public class Client implements IThreadListener {
GL11.glGetString(GL11.GL_VERSION),
GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VENDOR),
this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS",
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
this.vsync ? TextColor.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : "",
this.tpscode(), this.tickrate < 1.0f ? 1.0f / this.tickrate : this.tickrate,
@ -1905,7 +1905,7 @@ public class Client implements IThreadListener {
String.format("Position: %d %d %d", pos.getX(), pos.getY(), pos.getZ())
);
for(Entry<Property, Comparable> entry : block.getProperties().entrySet()) {
str.append("\n" + (block.getBlock().getSavedProperties().contains(entry.getKey()) ? TextColor.NEON : TextColor.LGRAY) + entry.getKey().getName() + TextColor.RESET + ": " + (entry.getValue() instanceof Boolean bool ? (bool ? TextColor.GREEN : TextColor.RED) + "" + entry.getValue() + TextColor.RESET : entry.getValue()));
str.append("\n" + (block.getBlock().getSavedProperties().contains(entry.getKey()) ? TextColor.NEON : TextColor.LIGHT_GRAY) + entry.getKey().getName() + TextColor.RESET + ": " + (entry.getValue() instanceof Boolean bool ? (bool ? TextColor.GREEN : TextColor.RED) + "" + entry.getValue() + TextColor.RESET : entry.getValue()));
}
return str.toString();
@ -2490,7 +2490,7 @@ public class Client implements IThreadListener {
this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() {
public void execute(Keysym key) {
String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay();
Client.this.show(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DGREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
Client.this.show(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DARK_GREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
Util.buildLines(new Function<DebugFunction, String>() {
public String apply(DebugFunction func) {
return TextColor.CYAN + bind + TextColor.RED + "+" + TextColor.GREEN + func.key.getDisplay() + TextColor.GRAY + " - " + TextColor.YELLOW + func.help;
@ -2862,9 +2862,9 @@ public class Client implements IThreadListener {
private void printVar(CVar cv) {
String values = cv.getValues();
this.logConsole("%s " + TextColor.NEON + "%s " + TextColor.DGRAY + "[%s" + TextColor.DGRAY + "]" + TextColor.GRAY + " = " + TextColor.WHITE + "%s " + TextColor.DGRAY +
"[" + TextColor.GRAY + "D " + TextColor.CRIMSON + "%s" + TextColor.DGRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
values != null ? " [" + TextColor.LGRAY + values + TextColor.DGRAY + "]" : "");
this.logConsole("%s " + TextColor.NEON + "%s " + TextColor.DARK_GRAY + "[%s" + TextColor.DARK_GRAY + "]" + TextColor.GRAY + " = " + TextColor.WHITE + "%s " + TextColor.DARK_GRAY +
"[" + TextColor.GRAY + "D " + TextColor.CRIMSON + "%s" + TextColor.DARK_GRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
values != null ? " [" + TextColor.LIGHT_GRAY + values + TextColor.DARK_GRAY + "]" : "");
}
public void exec(String line) {
@ -3018,7 +3018,7 @@ public class Client implements IThreadListener {
TextColor color;
if(ping < 0 || ping >= 20000) {
bars = 0;
color = ping < 0 ? TextColor.GRAY : TextColor.DRED;
color = ping < 0 ? TextColor.GRAY : TextColor.DARK_RED;
}
else if(ping < 80) {
bars = ping < 50 ? 8 : 7;
@ -3026,7 +3026,7 @@ public class Client implements IThreadListener {
}
else if(ping < 160) {
bars = ping < 120 ? 6 : 5;
color = TextColor.DGREEN;
color = TextColor.DARK_GREEN;
}
else if(ping < 350) {
bars = ping < 220 ? 4 : 3;
@ -3038,7 +3038,7 @@ public class Client implements IThreadListener {
}
else {
bars = 1;
color = TextColor.DRED;
color = TextColor.DARK_RED;
}
Drawing.drawTextRight(color + (ping < 10000 ? String.format("%d", ping) + "ms" : String.format("%.1f", ((float)ping) / 1000.0f) + "s"), x - 18, y, 0xffffffff);
for(int z = 0; z < bars; z++) {