item retexture - most fixed

This commit is contained in:
Sen 2025-07-29 14:10:19 +02:00
parent ff4b41acc1
commit 9c4287dcad
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
132 changed files with 757 additions and 746 deletions

View file

@ -168,7 +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.Color;
import common.util.Util;
import common.util.Var;
import common.util.HitPosition.ObjectType;
@ -1036,7 +1036,7 @@ public class Client implements IThreadListener {
private int drawStat(int x, int y, String name, int value, int max, int color) {
int w = (int)(246.0f * (float)value / (float)max);
Drawing.drawTextboxRight(name, x + 250, y, 0x3f000000);
Drawing.drawTextbox(String.format(TextColor.GREEN + "%d " + TextColor.GRAY + "/ " + TextColor.NEON + "%d", value, max), x, y, 0x3f000000);
Drawing.drawTextbox(String.format(Color.GREEN + "%d " + Color.GRAY + "/ " + Color.NEON + "%d", value, max), x, y, 0x3f000000);
Drawing.drawRectBorder(x, y + 20, 250, 10, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
Drawing.drawGradient(x + 2 + 246 - w, y + 20 + 2, w, 6, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000));
return y + 40;
@ -1085,10 +1085,10 @@ public class Client implements IThreadListener {
Entity ent;
if(this.player != null && now - status.getValue() < 10000L && (ent = this.player.worldObj.getEntityByID(status.getKey())) instanceof EntityLiving) {
EntityLiving entity = (EntityLiving)ent;
String s = entity.getName() + TextColor.GRAY + " [" +
String s = entity.getName() + Color.GRAY + " [" +
EntityLiving.getHealthColor(entity.getHealth(), entity.getMaxHealth()) +
entity.getHealth() + TextColor.GRAY + " / " + EntityLiving.getMaxHpColor(entity.getMaxHealth()) +
entity.getMaxHealth() + TextColor.GRAY + "]";
entity.getHealth() + Color.GRAY + " / " + EntityLiving.getMaxHpColor(entity.getMaxHealth()) +
entity.getMaxHealth() + Color.GRAY + "]";
Drawing.drawTextboxCentered(s, x, y, 0x3f000000);
Drawing.drawRectBorder(x - 200, y + 20, 400, 10, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
Drawing.drawGradient(x - 200 + 2, y + 20 + 2, (int)(396.0f * ((float)entity.getHealth() / (float)entity.getMaxHealth())), 6, entity.getColor() | 0xff000000, Util.mixColor(entity.getColor() | 0xff000000, 0xff000000));
@ -1105,8 +1105,8 @@ public class Client implements IThreadListener {
for(StatusEffect effect : this.player.getEffects()) {
Effect potion = effect.getPotion();
int color = potion.getColor();
String name = (potion.isBadEffect() ? TextColor.ORANGE : TextColor.ACID) + effect.getEffectName();
String desc = TextColor.NEON + effect.getDurationString();
String name = (potion.isBadEffect() ? Color.ORANGE : Color.ACID) + effect.getEffectName();
String desc = Color.NEON + effect.getDurationString();
Drawing.drawRectBorder(x, y, 250, Font.YGLYPH + 6, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
Drawing.drawGradient(x + 2, y + 2, effect.isInfinite() ? 246 : ((int)(246.0f * ((float)effect.getRemaining() / (float)effect.getDuration()))), Font.YGLYPH + 2, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000));
Drawing.drawText(name, x + 4, y + 3, 0xffffffff);
@ -1128,16 +1128,16 @@ public class Client implements IThreadListener {
y = this.fbY - 40 - stats * 40;
int hp = entity.getHealth();
int max = entity.getMaxHealth();
y = this.drawStat(x, y, TextColor.RED + "Schaden", hp, max, 0xff0000);
y = this.drawStat(x, y, Color.RED + "Schaden", hp, max, 0xff0000);
if(absorb > 0)
y = this.drawStat(x, y, TextColor.YELLOW + "Schadenspuffer", absorb, 1024, 0xffff00);
y = this.drawStat(x, y, Color.YELLOW + "Schadenspuffer", absorb, 1024, 0xffff00);
if(entity instanceof EntityWaterNPC npc) {
int moist = npc.getMoisture();
int maxm = npc.getMaxMoisture();
y = this.drawStat(x, y, TextColor.BLUE + "Feuchtigkeit", moist, maxm, 0x4f4fff);
y = this.drawStat(x, y, Color.BLUE + "Feuchtigkeit", moist, maxm, 0x4f4fff);
}
if(armor > 0)
y = this.drawStat(x, y, TextColor.GRAY + "Rüstung", armor, 1024, 0x707070);
y = this.drawStat(x, y, Color.GRAY + "Rüstung", armor, 1024, 0x707070);
if(entity.vehicle instanceof EntityLiving living) {
int vh = living.getHealth();
int vhMax = living.getMaxHealth();
@ -1146,23 +1146,23 @@ public class Client implements IThreadListener {
if(entity.getManaPoints() > 0) {
int mana = entity.getManaPoints();
int maxm = entity.getMaxMana();
y = this.drawStat(x, y, TextColor.CYAN + "Mana", mana, maxm, 0x0000ff);
y = this.drawStat(x, y, Color.CYAN + "Mana", mana, maxm, 0x0000ff);
}
for(int z = 0; z < Energy.values().length; z++) {
Energy type = Energy.values()[z];
int energy = entity.getEnergy(type);
if(energy > 0) {
int emax = entity.getEnergyCap(type);
y = this.drawStat(x, y, TextColor.LIGHT_GRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
y = this.drawStat(x, y, Color.LIGHT_GRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
}
}
x = 40;
y = this.fbY - 40 - (this.player.isRidingHorse() && this.player.getHorseJumpPower() != 0.0f ? 2 : 1) * 40;
if(this.player.isRidingHorse() && this.player.getHorseJumpPower() != 0.0f) // {
y = this.drawBar(x, y, String.format(TextColor.NEON + "Sprungkraft: " + TextColor.CYAN + "%d %%", (int)(this.player.getHorseJumpPower() * 100.0f)),
y = this.drawBar(x, y, String.format(Color.NEON + "Sprungkraft: " + Color.CYAN + "%d %%", (int)(this.player.getHorseJumpPower() * 100.0f)),
this.player.getHorseJumpPower(), 0x4040ff);
y = this.drawBar(x, y, String.format(TextColor.ACID + "EXP: " + TextColor.GREEN + "Level %d, %d/%d", this.player.experienceLevel, (int)((float)this.player.xpBarCap() * this.player.experience), this.player.xpBarCap()), this.player.experience, 0x40ff40);
y = this.drawBar(x, y, String.format(Color.ACID + "EXP: " + Color.GREEN + "Level %d, %d/%d", this.player.experienceLevel, (int)((float)this.player.xpBarCap() * this.player.experience), this.player.xpBarCap()), this.player.experience, 0x40ff40);
}
GlState.bindTexture(0);
@ -1239,9 +1239,9 @@ public class Client implements IThreadListener {
this.renderLagometer();
}
else {
Drawing.drawText(String.format("%s%.2f" + TextColor.RESET + " %s [%s" + TextColor.RESET + "], %.3f ms, W %d x %d%s",
Drawing.drawText(String.format("%s%.2f" + Color.RESET + " %s [%s" + Color.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.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
this.vsync ? Color.DARK_GRAY + "VSYNC" : (this.syncLimited ? Color.GREEN + "" + this.syncLimit : Color.RED + "UNL"),
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : ""),
0, 0, 0xffffffff);
@ -1264,14 +1264,14 @@ public class Client implements IThreadListener {
String draw = String.format(
"OpenGL: %s\n" +
"Renderer: %s (%s)\n" +
"Bildrate: %s%.2f" + TextColor.RESET + " %s [%s" + TextColor.RESET + "], %.3f ms, W %d x %d%s\n" +
"Tickrate: %s%.2f" + TextColor.RESET + " %s [" + TextColor.GREEN + "%.1f" + TextColor.RESET + "], %.3f ms, E %d ms" +
"Bildrate: %s%.2f" + Color.RESET + " %s [%s" + Color.RESET + "], %.3f ms, W %d x %d%s\n" +
"Tickrate: %s%.2f" + Color.RESET + " %s [" + Color.GREEN + "%.1f" + Color.RESET + "], %.3f ms, E %d ms" +
"%s%s"
,
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.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
this.vsync ? Color.DARK_GRAY + "VSYNC" : (this.syncLimited ? Color.GREEN + "" + this.syncLimit : Color.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,
@ -1856,7 +1856,7 @@ public class Client implements IThreadListener {
String.format("Richtung: %s (%.1f / %.1f)", dirStr,
ExtMath.wrapf(this.viewEntity.rotYaw), ExtMath.wrapf(this.viewEntity.rotPitch)) + "\n" +
String.format("Biom: %.2f K, N: %.2f K, D: %s (%s)", chunk.getTemperature(pos), chunk.getOffset(pos),
TextColor.stripCodes(this.world.dimension.getDisplay()),
Color.stripCodes(this.world.dimension.getDisplay()),
this.dimensionName) + "\n" +
"Licht: " + chunk.getLightSub(pos, 0) + " (" + chunk.getLight(LightType.SKY, pos) + " Himmel, "
+ chunk.getLight(LightType.BLOCK, pos) + " Blöcke, " + String.format(
@ -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.LIGHT_GRAY) + 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()) ? Color.NEON : Color.LIGHT_GRAY) + entry.getKey().getName() + Color.RESET + ": " + (entry.getValue() instanceof Boolean bool ? (bool ? Color.GREEN : Color.RED) + "" + entry.getValue() + Color.RESET : entry.getValue()));
}
return str.toString();
@ -1936,7 +1936,7 @@ public class Client implements IThreadListener {
+ (entity.isWet() ? "W" : "") + (entity.canAttackWithItem() ? "A" : "")
+ (entity.passenger != null ? "H" : "") + (entity.vehicle != null ? "R" : "")
+ (entity.doesEntityNotTriggerPressurePlate() ? "L" : "") + "\n" +
(entity.hasCustomName() ? "Name: '" + TextColor.stripCodes(entity.getCustomNameTag()) + "'" : "Name: n/a")
(entity.hasCustomName() ? "Name: '" + Color.stripCodes(entity.getCustomNameTag()) + "'" : "Name: n/a")
;
}
@ -2286,7 +2286,7 @@ public class Client implements IThreadListener {
public void disconnected(String msg) {
Log.NETWORK.info("Getrennt: %s", msg);
this.unload(true);
this.show(new GuiInfo("Von Server getrennt", TextColor.RED + "Verbindung zum Server wurde getrennt\n\n" + TextColor.RESET + msg));
this.show(new GuiInfo("Von Server getrennt", Color.RED + "Verbindung zum Server wurde getrennt\n\n" + Color.RESET + msg));
}
@ -2397,13 +2397,13 @@ public class Client implements IThreadListener {
}, "Screenshot writer").start();
}
public TextColor framecode() {
return (this.framerate >= 59.0f) ? TextColor.GREEN : ((this.framerate >= 29.0f) ? TextColor.YELLOW : ((this.framerate >= 14.0f) ? TextColor.ORANGE : TextColor.RED));
public Color framecode() {
return (this.framerate >= 59.0f) ? Color.GREEN : ((this.framerate >= 29.0f) ? Color.YELLOW : ((this.framerate >= 14.0f) ? Color.ORANGE : Color.RED));
}
public TextColor tpscode() {
return (this.tickrate >= (((float)this.tickTarget / 1000.0f) - 1.0f)) ? TextColor.GREEN : ((this.tickrate >= (((float)this.tickTarget / 1000.0f) / 2.0f - 1.0f)) ? TextColor.YELLOW :
((this.tickrate >= (((float)this.tickTarget / 1000.0f) / 4.0f - 1.0f)) ? TextColor.ORANGE : TextColor.RED));
public Color tpscode() {
return (this.tickrate >= (((float)this.tickTarget / 1000.0f) - 1.0f)) ? Color.GREEN : ((this.tickrate >= (((float)this.tickTarget / 1000.0f) / 2.0f - 1.0f)) ? Color.YELLOW :
((this.tickrate >= (((float)this.tickTarget / 1000.0f) / 4.0f - 1.0f)) ? Color.ORANGE : Color.RED));
}
private void doTicks() {
@ -2490,10 +2490,10 @@ 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.DARK_GREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
Client.this.show(new GuiInfo("Hilfe zu Tastenkombinationen", Color.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;
return Color.CYAN + bind + Color.RED + "+" + Color.GREEN + func.key.getDisplay() + Color.GRAY + " - " + Color.YELLOW + func.help;
}
}, Client.this.debug.values())));
}
@ -2623,7 +2623,7 @@ public class Client implements IThreadListener {
}
else {
this.lastUsed = System.currentTimeMillis();
Client.this.logFeed(TextColor.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
Client.this.logFeed(Color.RED + "VORSICHT: Debug-Absturz nach mehrmaligem Drücken innerhalb einer Sekunde");
}
}
});
@ -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.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 + "]" : "");
this.logConsole("%s " + Color.NEON + "%s " + Color.DARK_GRAY + "[%s" + Color.DARK_GRAY + "]" + Color.GRAY + " = " + Color.WHITE + "%s " + Color.DARK_GRAY +
"[" + Color.GRAY + "D " + Color.CRIMSON + "%s" + Color.DARK_GRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
values != null ? " [" + Color.LIGHT_GRAY + values + Color.DARK_GRAY + "]" : "");
}
public void exec(String line) {
@ -2872,7 +2872,7 @@ public class Client implements IThreadListener {
for(CVar cv : this.cvars.values()) {
printVar(cv);
}
this.logConsole(TextColor.GREEN + "CVARs insgesamt registriert: %d", this.cvars.size());
this.logConsole(Color.GREEN + "CVARs insgesamt registriert: %d", this.cvars.size());
return;
}
else if(line.startsWith("#")) {
@ -2890,7 +2890,7 @@ public class Client implements IThreadListener {
this.logConsole("%s -> %s", cv.getCVarName(), cv.format());
}
else {
this.logConsole(TextColor.RED + "Kann CVAR '%s' nicht auf '%s' setzen", cv.getCVarName(), value);
this.logConsole(Color.RED + "Kann CVAR '%s' nicht auf '%s' setzen", cv.getCVarName(), value);
}
return;
}
@ -2900,7 +2900,7 @@ public class Client implements IThreadListener {
}
public void reset() {
this.buffer = TextColor.NEON + "*** " + VERSION + " ***";
this.buffer = Color.NEON + "*** " + VERSION + " ***";
this.console.clear();
this.chat.clear();
this.feed.clear();
@ -3015,30 +3015,30 @@ public class Client implements IThreadListener {
private void drawPing(int x, int y, int ping) {
int bars;
TextColor color;
Color color;
if(ping < 0 || ping >= 20000) {
bars = 0;
color = ping < 0 ? TextColor.GRAY : TextColor.DARK_RED;
color = ping < 0 ? Color.GRAY : Color.DARK_RED;
}
else if(ping < 80) {
bars = ping < 50 ? 8 : 7;
color = TextColor.GREEN;
color = Color.GREEN;
}
else if(ping < 160) {
bars = ping < 120 ? 6 : 5;
color = TextColor.DARK_GREEN;
color = Color.DARK_GREEN;
}
else if(ping < 350) {
bars = ping < 220 ? 4 : 3;
color = TextColor.YELLOW;
color = Color.YELLOW;
}
else if(ping < 700) {
bars = ping < 500 ? 2 : 1;
color = TextColor.RED;
color = Color.RED;
}
else {
bars = 1;
color = TextColor.DARK_RED;
color = Color.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++) {

View file

@ -6,7 +6,7 @@ import client.gui.element.SliderCallback;
import client.vars.CVar;
import client.vars.CVarCategory;
import common.sound.EventType;
import common.util.TextColor;
import common.util.Color;
public enum Volume implements CVar {
MASTER("master", "Gesamt"),
@ -52,7 +52,7 @@ public enum Volume implements CVar {
}
public String getType() {
return TextColor.DARK_GREEN + "volume";
return Color.DARK_GREEN + "volume";
}
public CVarCategory getCategory() {

View file

@ -20,7 +20,7 @@ import common.log.Log;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.Pair;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements ButtonCallback {
@ -152,12 +152,12 @@ public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements Button
}
public void draw(int x, int y, int width, int height, int mouseXIn, int mouseYIn, boolean hover) {
Drawing.drawText(this.name + TextColor.GRAY + " - " + TextColor.RESET + this.user, x + 2, y, 0xffffffff);
Drawing.drawText(this.name + Color.GRAY + " - " + Color.RESET + this.user, x + 2, y, 0xffffffff);
if(this.keypair != null || !this.password.isEmpty())
Drawing.drawTextRight(
(this.keypair != null ? "Pubkey " + this.keyDigest : "") + (this.keypair != null && !this.password.isEmpty() ? " + " : "") + (!this.password.isEmpty() ? "Passwort" : ""),
x + width - 2, y, 0xffffffff);
Drawing.drawText(this.address + TextColor.GRAY + " Port " + TextColor.RESET + this.port + (this.enforceEncryption ? TextColor.GRAY + ", nur verschlüsselt" : ""),
Drawing.drawText(this.address + Color.GRAY + " Port " + Color.RESET + this.port + (this.enforceEncryption ? Color.GRAY + ", nur verschlüsselt" : ""),
x + 2, y + height - Font.YGLYPH * 2, 0xffb0b0b0);
if(!this.access.isEmpty())
Drawing.drawTextRight((this.keypair != null || !this.password.isEmpty() ? "+ " : "") + "Server-Passwort", x + width - 2, y + height - Font.YGLYPH * 2, 0xffb0b0b0);

View file

@ -22,7 +22,7 @@ import common.packet.CPacketComplete;
import common.util.BlockPos;
import common.util.ExtMath;
import common.util.HitPosition;
import common.util.TextColor;
import common.util.Color;
public class GuiConsole extends Gui implements FieldCallback {
private class ConsoleArea extends Area {
@ -42,7 +42,7 @@ public class GuiConsole extends Gui implements FieldCallback {
if(this.sel_start >= 0 && this.sel_end == this.sel_start) {
for(int z = this.sel_start; z >= 0; z--) {
char c = this.text.charAt(z);
if(c == TextColor.COMMAND) {
if(c == Color.COMMAND) {
for(int n = z + 1; n < this.text.length(); n++) {
c = this.text.charAt(n);
if(c < 0x20) {
@ -189,7 +189,7 @@ public class GuiConsole extends Gui implements FieldCallback {
int nl = buffer.indexOf('\n', offset);
buffer = nl >= 0 ? buffer.substring(nl + 1) : "";
}
this.setLog(buffer + "\n" + TextColor.RESET + msg);
this.setLog(buffer + "\n" + Color.RESET + msg);
}
public void autocompletePlayerNames()

View file

@ -4,13 +4,13 @@ import client.Client;
import client.gui.element.MultiLabel;
import client.gui.element.NavButton;
import common.Version;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class GuiInfo extends Gui {
private static final String VER =
TextColor.GREEN + "" + Util.repeatString("\u009a", Version.RELEASE.getId()) + TextColor.DARK_VIOLET + "|-| " + TextColor.VIOLET + Client.VERSION + TextColor.DARK_VIOLET + " |-|" +
TextColor.GREEN + Util.repeatString("\u009a", Version.RELEASE.getId());
Color.GREEN + "" + Util.repeatString("\u009a", Version.RELEASE.getId()) + Color.DARK_VIOLET + "|-| " + Color.VIOLET + Client.VERSION + Color.DARK_VIOLET + " |-|" +
Color.GREEN + Util.repeatString("\u009a", Version.RELEASE.getId());
private static final String INFO = "Ein Spiel zur Simulation, zum Testen, für Rollenspiele, Mehrspieler und vieles mehr." + "\n" +
"Optimiert für Geschwindigkeit, Stabilität und\u007f\u007f [Speicherzugriffsfehler]";
@ -42,28 +42,28 @@ public class GuiInfo extends Gui {
}
private static String getHeader(boolean hax, String normal, String hacked) {
return (hax ? TextColor.RED : TextColor.YELLOW) + (hax ? hacked : normal) + "\n" +
(hax ? TextColor.CYAN : TextColor.WHITE) + "==========================+==========================";
return (hax ? Color.RED : Color.YELLOW) + (hax ? hacked : normal) + "\n" +
(hax ? Color.CYAN : Color.WHITE) + "==========================+==========================";
}
private static void addLines(StringBuilder sb, boolean hax, String alternate, String category, String... authors) {
sb.append("\n" + (hax ? TextColor.BLUE : TextColor.GRAY)
sb.append("\n" + (hax ? Color.BLUE : Color.GRAY)
+ (hax ? alternate : category) + "\n ");
for(int z = 0; z < authors.length; z++) {
if(z > 0)
sb.append((hax ? TextColor.VIOLET : TextColor.GRAY) + ", ");
sb.append((hax ? TextColor.DARK_VIOLET : TextColor.WHITE) + authors[z]);
sb.append((hax ? Color.VIOLET : Color.GRAY) + ", ");
sb.append((hax ? Color.DARK_VIOLET : Color.WHITE) + authors[z]);
}
}
private static String getInfo(boolean hax) {
return getHeader(hax, VER, VER) + "\n" + (hax ? (TextColor.VIOLET + HACKED) : (TextColor.LIGHT_GRAY + INFO));
return getHeader(hax, VER, VER) + "\n" + (hax ? (Color.VIOLET + HACKED) : (Color.LIGHT_GRAY + INFO));
}
private static String getLibraries(boolean hax) {
StringBuilder sb = new StringBuilder(getHeader(hax, "Verwendete Programmbibliotheken", "U$3d 3xpl0its"));
for(String lib : LIBRARIES) {
sb.append("\n" + TextColor.NEON + lib);
sb.append("\n" + Color.NEON + lib);
}
return sb.toString();
}
@ -71,17 +71,17 @@ public class GuiInfo extends Gui {
private static String getCode(boolean hax) {
StringBuilder sb = new StringBuilder(getHeader(hax, "Zusätzlicher Quellcode", "M0ar 3xpl01ts"));
for(String lib : CODE) {
sb.append("\n" + TextColor.NEON + lib);
sb.append("\n" + Color.NEON + lib);
}
return sb.toString();
}
private static String getColors() {
StringBuilder sb = new StringBuilder(TextColor.RESET + "#D ");
StringBuilder sb = new StringBuilder(Color.RESET + "#D ");
int num = 0;
for(TextColor color : TextColor.values()) {
if(num == TextColor.values().length / 2)
sb.append("\n" + TextColor.COMMAND + "#d ");
for(Color color : Color.values()) {
if(num == Color.values().length / 2)
sb.append("\n" + Color.COMMAND + "#d ");
sb.append(color + "#" + color.colorId + ' ');
num++;
}
@ -92,8 +92,8 @@ public class GuiInfo extends Gui {
StringBuilder sb = new StringBuilder(getHeader(hax, "Mitwirkende dieses Programms", "Das Team -- TCQ"));
addLines(sb, hax, "Die dunklen Herrscher", "Quellcode, Design, Grafiken, Refactoring und Code-Cleanup",
TextColor.CYAN + "Sen der \"kleine\" Dämon",
TextColor.RED + "Shen, Herrscher des Schattenlandes");
Color.CYAN + "Sen der \"kleine\" Dämon",
Color.RED + "Shen, Herrscher des Schattenlandes");
return sb.toString();
}

View file

@ -13,7 +13,7 @@ import client.renderer.Drawing;
import client.window.Keysym;
import common.rng.Random;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public class GuiMenu extends Gui {
public static final GuiMenu INSTANCE = new GuiMenu();
@ -59,7 +59,7 @@ public class GuiMenu extends Gui {
}
if(GuiMenu.this.hacked == 9) {
GuiMenu.this.hacked++;
GuiMenu.this.splashLabel.setText(TextColor.VIOLET + "Hax!");
GuiMenu.this.splashLabel.setText(Color.VIOLET + "Hax!");
}
else {
GuiMenu.this.gm.show(GuiConnect.INSTANCE);
@ -104,7 +104,7 @@ public class GuiMenu extends Gui {
}
}, "Client schließen"));
this.shift();
this.add(new Label(4, 4, 200, 0, TextColor.VIOLET + Client.VERSION, true));
this.add(new Label(4, 4, 200, 0, Color.VIOLET + Client.VERSION, true));
this.splashLabel = this.add(new Label(0, 100, width, 0, ""));
this.pickSplash();
}
@ -128,7 +128,7 @@ public class GuiMenu extends Gui {
}
private void pickSplash() {
this.splashLabel.setText(TextColor.VIOLET + this.rand.pick(Splashes.SPLASHES));
this.splashLabel.setText(Color.VIOLET + this.rand.pick(Splashes.SPLASHES));
}
private void resetAnimation() {
@ -162,9 +162,9 @@ public class GuiMenu extends Gui {
}
this.animStep = !this.animStep;
StringBuilder sb = new StringBuilder(11);
sb.append(TextColor.GRAY);
sb.append(Color.GRAY);
sb.append("[");
sb.append(TextColor.YELLOW);
sb.append(Color.YELLOW);
switch(this.animDir) {
case -1:
sb.append((this.animStep ? '>' : '-') + "' ");
@ -176,7 +176,7 @@ public class GuiMenu extends Gui {
sb.append(" `" + (this.animStep ? '<' : '-'));
break;
}
sb.append(TextColor.GRAY);
sb.append(Color.GRAY);
sb.append("]");
this.animStr = sb.toString();
for(int z = this.animPos; z < this.animPos + 4; z++) {
@ -186,39 +186,39 @@ public class GuiMenu extends Gui {
this.animGrow[this.rand.zrange(this.animWidth)] += 1;
}
sb = new StringBuilder(this.animWidth + 2);
sb.append(TextColor.DARK_GREEN);
sb.append(Color.DARK_GREEN);
for(int z = 0; z < this.animWidth; z++) {
switch(this.animGrow[z] / 5) {
case 0:
sb.append(TextColor.BLACK);
sb.append(Color.BLACK);
break;
case 1:
sb.append(TextColor.GRAY);
sb.append(Color.GRAY);
break;
case 2:
case 3:
sb.append(TextColor.LIGHT_GRAY);
sb.append(Color.LIGHT_GRAY);
break;
case 4:
case 5:
case 6:
sb.append(TextColor.WHITE);
sb.append(Color.WHITE);
break;
case 7:
case 8:
case 9:
case 10:
sb.append(TextColor.MAGENTA);
sb.append(Color.MAGENTA);
break;
case 11:
case 12:
case 13:
case 14:
case 15:
sb.append(TextColor.DARK_VIOLET);
sb.append(Color.DARK_VIOLET);
break;
default:
sb.append(TextColor.VIOLET);
sb.append(Color.VIOLET);
break;
}
sb.append(",.");

View file

@ -19,7 +19,7 @@ import client.vars.Variable;
import client.window.Window;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.TextColor;
import common.util.Color;
public class GuiServer extends Gui implements FieldCallback {
public static final GuiServer INSTANCE = new GuiServer(null);
@ -193,22 +193,22 @@ public class GuiServer extends Gui implements FieldCallback {
if(this.server != null) {
name = this.nameBox.getText();
if(name.isEmpty()) {
this.nameLabel.setText(TextColor.RED + "Name in der Liste");
this.nameLabel.setText(Color.RED + "Name in der Liste");
return;
}
if(GuiConnect.INSTANCE.isNameTaken(name)) {
this.nameLabel.setText("Name in der Liste - " + TextColor.RED + "Bereits vorhanden");
this.nameLabel.setText("Name in der Liste - " + Color.RED + "Bereits vorhanden");
return;
}
}
String addr = this.addrBox.getText();
if(addr.isEmpty()) {
this.addrLabel.setText(TextColor.RED + "Adresse / Hostname");
this.addrLabel.setText(Color.RED + "Adresse / Hostname");
return;
}
int port = -1;
if(this.portBox.getText().isEmpty()) {
this.portLabel.setText(TextColor.RED + "Port");
this.portLabel.setText(Color.RED + "Port");
return;
}
else {
@ -216,27 +216,27 @@ public class GuiServer extends Gui implements FieldCallback {
port = Integer.parseInt(this.portBox.getText());
}
catch(NumberFormatException e) {
this.rangeLabel.setText("[" + TextColor.RED + "1024..32767" + TextColor.RESET + "]");
this.rangeLabel.setText("[" + Color.RED + "1024..32767" + Color.RESET + "]");
return;
}
if(port < 1024 || port > 32767) {
this.rangeLabel.setText("[" + (port < 1024 ? TextColor.RED + "1024" + TextColor.RESET + "..32767" : "1024.." + TextColor.RED + "32767" + TextColor.RESET) + "]");
this.rangeLabel.setText("[" + (port < 1024 ? Color.RED + "1024" + Color.RESET + "..32767" : "1024.." + Color.RED + "32767" + Color.RESET) + "]");
return;
}
}
String user = this.userBox.getText();
if(user.isEmpty()) {
this.userLabel.setText(TextColor.RED + "Benutzername");
this.userLabel.setText(Color.RED + "Benutzername");
return;
}
String pass = this.passBox.getText();
if(!pass.isEmpty() && pass.length() < 8) {
this.passLabel.setText((this.keypair == null ? "Anmelde" : "Ersatz") + "-Passwort (" + TextColor.RED + "mind. 8 Zeichen" + TextColor.RESET + ")");
this.passLabel.setText((this.keypair == null ? "Anmelde" : "Ersatz") + "-Passwort (" + Color.RED + "mind. 8 Zeichen" + Color.RESET + ")");
return;
}
String acc = this.accBox.getText();
if(!acc.isEmpty() && acc.length() < 8) {
this.accLabel.setText("Zugang (" + TextColor.RED + "mind. 8 Zeichen" + TextColor.RESET + ")");
this.accLabel.setText("Zugang (" + Color.RED + "mind. 8 Zeichen" + Color.RESET + ")");
return;
}
if(this.server == null) {

View file

@ -15,7 +15,7 @@ import common.entity.npc.PlayerCharacter;
import common.packet.CPacketAction;
import common.packet.CPacketAction.Action;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ButtonCallback
{
@ -34,11 +34,11 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
{
if(this.initial)
Drawing.drawRect(x, y, 1, 36, 0xffaf0000);
String str = this.character == null ? TextColor.BLUE + "[" + TextColor.CYAN + "+" + TextColor.BLUE + "]" :
String.format(TextColor.GREEN + "Level " + TextColor.DARK_GREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.VIOLET + "%s",
String str = this.character == null ? Color.BLUE + "[" + Color.CYAN + "+" + Color.BLUE + "]" :
String.format(Color.GREEN + "Level " + Color.DARK_GREEN + "%d " + Color.YELLOW + "%s " + Color.VIOLET + "%s",
character.level(), character.type(), character.name());
String pos = this.character == null ? TextColor.BROWN + "Neuen Charakter erstellen" :
String.format(TextColor.NEON + "%s " + TextColor.GRAY + "bei " + TextColor.ACID + "%d" + TextColor.GRAY + ", " + TextColor.ACID + "%d" + TextColor.GRAY + ", " + TextColor.ACID + "%d",
String pos = this.character == null ? Color.BROWN + "Neuen Charakter erstellen" :
String.format(Color.NEON + "%s " + Color.GRAY + "bei " + Color.ACID + "%d" + Color.GRAY + ", " + Color.ACID + "%d" + Color.GRAY + ", " + Color.ACID + "%d",
character.dim(), character.pos().getX(), character.pos().getY(), character.pos().getZ());
Drawing.drawText(str, x + 3, y, 0xffffffff);
Drawing.drawText(pos, x + 3, y + height - Font.YGLYPH, 0xffffffff);
@ -63,7 +63,7 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
private void updateButtons() {
CharacterEntry entry = this.getSelected();
this.descField.setText(entry == null ? "" : (entry.character == null ? "*neuer Charakter*" : String.format(TextColor.GRAY + "[%s%s" + TextColor.GRAY + "]\n" + TextColor.LIGHT_YELLOW + "Herkunft" + TextColor.LIGHT_GRAY + ": " + TextColor.LIGHT_BROWN + "%s\n" + TextColor.RESET + "%s", entry.character.align().color, entry.character.align().display, entry.character.origin() == null ? TextColor.DARK_GRAY + "*unbekannt*" : entry.character.origin(), entry.character.info() == null ? "*keine Beschreibung vorhanden*" : this.getSelected().character.info())));
this.descField.setText(entry == null ? "" : (entry.character == null ? "*neuer Charakter*" : String.format(Color.GRAY + "[%s%s" + Color.GRAY + "]\n" + Color.LIGHT_YELLOW + "Herkunft" + Color.LIGHT_GRAY + ": " + Color.LIGHT_BROWN + "%s\n" + Color.RESET + "%s", entry.character.align().color, entry.character.align().display, entry.character.origin() == null ? Color.DARK_GRAY + "*unbekannt*" : entry.character.origin(), entry.character.info() == null ? "*keine Beschreibung vorhanden*" : this.getSelected().character.info())));
this.actionButtom.setText(entry != null && entry.character == null ? "Charakter erstellen" : "Charakter spielen");
this.actionButtom.enabled = entry != null && !entry.initial;
this.deleteButtom.enabled = !this.gm.charEditor && entry != null && entry.character != null && !entry.initial;

View file

@ -40,7 +40,7 @@ import common.item.ItemStack;
import common.packet.CPacketAction;
import common.packet.CPacketCheat;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public abstract class GuiContainer extends Gui
{
@ -125,14 +125,14 @@ public abstract class GuiContainer extends Gui
List<String> list = Lists.<String>newArrayList();
String s = stack.getColoredName();
if(stack.getSize() != 1)
s = TextColor.YELLOW + "" + stack.getSize() + " " + TextColor.RESET + s;
s = s + TextColor.RESET;
s = Color.YELLOW + "" + stack.getSize() + " " + Color.RESET + s;
s = s + Color.RESET;
list.add(s);
stack.getItem().addInformation(stack, this.gm.player, list);
if(stack.getItem().isAdminItem())
list.add(TextColor.RED + "Admin-Gegenstand");
list.add(Color.RED + "Admin-Gegenstand");
if(stack.getItem().isMagnetic())
list.add(TextColor.LIGHT_GRAY + "Magnetisch");
list.add(Color.LIGHT_GRAY + "Magnetisch");
if(stack.getItem().canBeDyed())
list.add("Farbe: #" + Integer.toHexString(stack.getDyeColor()).toUpperCase());
@ -146,9 +146,9 @@ public abstract class GuiContainer extends Gui
damage += EnchantmentHelper.getDamageModifier(stack);
if(damage != 0) {
if(damage > 0)
list.add(TextColor.BLUE + String.format("+%d Angriffsschaden", damage));
list.add(Color.BLUE + String.format("+%d Angriffsschaden", damage));
else
list.add(TextColor.RED + String.format("-%d Angriffsschaden", damage));
list.add(Color.RED + String.format("-%d Angriffsschaden", damage));
}
Map<Attribute, Float> mods = stack.getAttributeModifiers(null);
@ -160,17 +160,17 @@ public abstract class GuiContainer extends Gui
if(stack.getSize() != 1) {
double total = amt * (double)stack.getSize();
if(amt > 0.0D)
list.add(TextColor.BLUE + String.format("+%s %s [%dx +%s]", DECIMALFORMAT.format(total), entry.getKey(), stack.getSize(),
list.add(Color.BLUE + String.format("+%s %s [%dx +%s]", DECIMALFORMAT.format(total), entry.getKey(), stack.getSize(),
DECIMALFORMAT.format(amt)));
else if(amt < 0.0D)
list.add(TextColor.RED + String.format("-%s %s [%dx -%s]", DECIMALFORMAT.format(total * -1.0), entry.getKey(), stack.getSize(),
list.add(Color.RED + String.format("-%s %s [%dx -%s]", DECIMALFORMAT.format(total * -1.0), entry.getKey(), stack.getSize(),
DECIMALFORMAT.format(amt * -1.0)));
}
else {
if(amt > 0.0D)
list.add(TextColor.BLUE + String.format("+%s %s", DECIMALFORMAT.format(amt), entry.getKey()));
list.add(Color.BLUE + String.format("+%s %s", DECIMALFORMAT.format(amt), entry.getKey()));
else if(amt < 0.0D)
list.add(TextColor.RED + String.format("-%s %s", DECIMALFORMAT.format(amt * -1.0), entry.getKey()));
list.add(Color.RED + String.format("-%s %s", DECIMALFORMAT.format(amt * -1.0), entry.getKey()));
}
}
}
@ -188,7 +188,7 @@ public abstract class GuiContainer extends Gui
else
list.add("Stapelbar bis " + stack.getItem().getMaxAmount());
list.add(TextColor.GRAY + ItemRegistry.getName(stack.getItem()));
list.add(Color.GRAY + ItemRegistry.getName(stack.getItem()));
return list;
}
@ -420,11 +420,11 @@ public abstract class GuiContainer extends Gui
if (stack.isEmpty())
{
s = "" + TextColor.YELLOW + "0";
s = "" + Color.YELLOW + "0";
}
}
else if(stack == this.cheatStack) {
s = TextColor.DARK_GREEN + "+" + TextColor.GREEN + formatAmount(stack.getSize());
s = Color.DARK_GREEN + "+" + Color.GREEN + formatAmount(stack.getSize());
}
this.drawItemStack(stack, mouseX - j2, mouseY - k2, s);
@ -472,7 +472,7 @@ public abstract class GuiContainer extends Gui
StringBuilder sb = new StringBuilder();
for(int i = 0; i < list.size(); ++i) {
if(i != 0)
sb.append("\n" + TextColor.LIGHT_GRAY + (String)list.get(i));
sb.append("\n" + Color.LIGHT_GRAY + (String)list.get(i));
else
sb.append((String)list.get(i));
}
@ -532,13 +532,13 @@ public abstract class GuiContainer extends Gui
if (itemstack.getSize() > itemstack.getMaxStackSize())
{
s = TextColor.YELLOW + formatAmount(itemstack.getMaxStackSize());
s = Color.YELLOW + formatAmount(itemstack.getMaxStackSize());
itemstack.setSize(itemstack.getMaxStackSize());
}
if (itemstack.getSize() > slotIn.getItemStackLimit(itemstack))
{
s = TextColor.YELLOW + formatAmount(slotIn.getItemStackLimit(itemstack));
s = Color.YELLOW + formatAmount(slotIn.getItemStackLimit(itemstack));
itemstack.setSize(slotIn.getItemStackLimit(itemstack));
}
}
@ -880,7 +880,7 @@ public abstract class GuiContainer extends Gui
if (text == null && stack.isEmpty())
{
s = TextColor.RED + formatAmount(stack.getSize());
s = Color.RED + formatAmount(stack.getSize());
}
Drawing.drawTextRight(s, xPosition + scale * 16, yPosition + scale * 16 + 1 - Font.YGLYPH, 0xffffffff);
}

View file

@ -10,7 +10,7 @@ import common.inventory.ContainerEnchantment;
import common.inventory.InventoryPlayer;
import common.rng.Random;
import common.util.Pair;
import common.util.TextColor;
import common.util.Color;
import common.world.World;
public class GuiEnchant extends GuiContainer implements ButtonCallback {
@ -46,13 +46,13 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
else {
if(this.gm.player.getManaPoints() < mana) {
this.buttons[l].enabled = false;
this.labels[l].setText(TextColor.DARK_GRAY + name);
this.mana[l].setText(TextColor.DARK_RED + "Mana-Level " + mana);
this.labels[l].setText(Color.DARK_GRAY + name);
this.mana[l].setText(Color.DARK_RED + "Mana-Level " + mana);
}
else {
this.buttons[l].enabled = true;
this.labels[l].setText(TextColor.GREEN + name);
this.mana[l].setText(TextColor.DARK_GREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana");
this.labels[l].setText(Color.GREEN + name);
this.mana[l].setText(Color.DARK_GREEN + "Mana-Level " + mana + Color.GRAY + ", " + Color.YELLOW + "-" + (l + 1) + " Mana");
}
}
}
@ -95,10 +95,10 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
StringBuilder sb = new StringBuilder();
String s = l.first().getFormattedName(l.second());
sb.append(TextColor.WHITE + s + " . . . ?");
sb.append(Color.WHITE + s + " . . . ?");
if(this.gm.player.getManaPoints() < k) {
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.RED + String.format("%d Mana erforderlich", this.enchantment.mana[j]));
sb.append((sb.length() != 0 ? "\n" : "") + Color.RED + String.format("%d Mana erforderlich", this.enchantment.mana[j]));
}
else {
String s1 = "";
@ -110,7 +110,7 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
s1 = String.format("%d Manapunkte", i1);
}
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.LIGHT_GRAY.toString() + "" + s1);
sb.append((sb.length() != 0 ? "\n" : "") + Color.LIGHT_GRAY.toString() + "" + s1);
}
this.hover(sb.toString(), mouseX, mouseY);

View file

@ -3,7 +3,7 @@ package client.gui.container;
import client.gui.element.Label;
import common.inventory.ContainerRepair;
import common.inventory.InventoryPlayer;
import common.util.TextColor;
import common.util.Color;
import common.world.World;
public class GuiRepair extends GuiContainer {
@ -20,13 +20,13 @@ public class GuiRepair extends GuiContainer {
public void updateScreen() {
super.updateScreen();
if(this.anvil.maximumCost >= 40)
this.info.setText(TextColor.DARK_RED + "Zu teuer!");
this.info.setText(Color.DARK_RED + "Zu teuer!");
else if(this.anvil.maximumCost <= 0 || !this.anvil.getSlot(2).getHasStack())
this.info.setText("");
else if(!this.anvil.getSlot(2).canTakeStack(this.playerInv.player))
this.info.setText(TextColor.RED + "Manakosten: " + this.anvil.maximumCost);
this.info.setText(Color.RED + "Manakosten: " + this.anvil.maximumCost);
else
this.info.setText(TextColor.GREEN + "Manakosten: " + this.anvil.maximumCost);
this.info.setText(Color.GREEN + "Manakosten: " + this.anvil.maximumCost);
}
public void addElements() {

View file

@ -18,7 +18,7 @@ import client.gui.element.ToggleCallback;
import client.network.ClientPlayer;
import common.packet.CPacketForm;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
import common.util.Triplet;
public class GuiForm extends Gui implements ButtonCallback {
@ -107,8 +107,8 @@ public class GuiForm extends Gui implements ButtonCallback {
int min = (this.inputData[z].third() & 0x7fffffff) >> 16;
String text = this.inputs[z].getText();
if(text.length() < min) {
if(!GuiForm.this.labels[z].getText().startsWith("" + TextColor.RED))
GuiForm.this.labels[z].setText(TextColor.RED + GuiForm.this.labels[z].getText());
if(!GuiForm.this.labels[z].getText().startsWith("" + Color.RED))
GuiForm.this.labels[z].setText(Color.RED + GuiForm.this.labels[z].getText());
return;
}
this.outputData[z] = text;

View file

@ -4,7 +4,7 @@ import client.gui.Gui;
import client.gui.element.ActButton;
import client.gui.element.ButtonCallback;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
import client.gui.element.Label;
import client.gui.element.MultiLabel;
import client.gui.element.PressType;
@ -20,8 +20,8 @@ public class GuiGameOver extends Gui {
public void init(int width, int height) {
this.timer = 0;
this.add(new Label(0, 0, 400, 0, TextColor.DARK_RED + "Du bist gestorben!"));
this.add(new MultiLabel(0, 32, 400, 42, String.format(TextColor.GREEN + "Letzte Position" + TextColor.GRAY + ":\n" + TextColor.YELLOW + "%d, %d, %d\n" + TextColor.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getDisplay())));
this.add(new Label(0, 0, 400, 0, Color.DARK_RED + "Du bist gestorben!"));
this.add(new MultiLabel(0, 32, 400, 42, String.format(Color.GREEN + "Letzte Position" + Color.GRAY + ":\n" + Color.YELLOW + "%d, %d, %d\n" + Color.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getDisplay())));
this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
public void use(ActButton elem, PressType action) {
GuiGameOver.this.gm.player.respawnPlayer();

View file

@ -12,7 +12,7 @@ import client.gui.element.FieldCallback;
import client.network.ClientPlayer;
import common.item.ItemStack;
import common.packet.CPacketMessage;
import common.util.TextColor;
import common.util.Color;
public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
private final String itemName;
@ -37,7 +37,7 @@ public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
public GuiRename(int slot, ItemStack stack, Gui prev) {
this.itemName = stack.getItem().getDisplay();
this.origName = stack.hasDisplayName() ? TextColor.stripCodes(stack.getDisplayName()) : "";
this.origName = stack.hasDisplayName() ? Color.stripCodes(stack.getDisplayName()) : "";
this.slot = slot;
this.previous = prev;
}

View file

@ -6,7 +6,7 @@ import client.gui.element.ButtonCallback;
import client.gui.element.Label;
import client.gui.element.PressType;
import client.window.Bind;
import common.util.TextColor;
import common.util.Color;
public class GuiBinds extends GuiOptions {
protected GuiBinds() {
@ -41,9 +41,9 @@ public class GuiBinds extends GuiOptions {
}, new Formatter<ActButton>() {
public String use(ActButton elem) {
if(bind == Bind.getWaiting())
return TextColor.BLUE + "***";
return Color.BLUE + "***";
else
return (bind.isDupe() ? TextColor.RED : TextColor.YELLOW) + (bind.getInput() == null ? "---" : bind.getInput().getDisplay());
return (bind.isDupe() ? Color.RED : Color.YELLOW) + (bind.getInput() == null ? "---" : bind.getInput().getDisplay());
}
}));
if(++x == cols) {

View file

@ -18,7 +18,7 @@ import client.window.DisplayMode;
import client.window.Window;
import common.collect.Lists;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public class GuiDisplay extends GuiOptions {
private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"};
@ -61,7 +61,7 @@ public class GuiDisplay extends GuiOptions {
}
}
if(dmodes == null)
this.add(new Fill(242, 0, 240, 0, TextColor.RED + "<?>"));
this.add(new Fill(242, 0, 240, 0, Color.RED + "<?>"));
this.add(new Slider(0, 20, 240, 0, 0, 0, 360 - 8, 0, (this.gm.sync < 0) ? (360 - 8) : (this.gm.sync != 0 ? ((this.gm.sync < 10) ? 1 : (this.gm.sync - 9)) : 0), new SliderCallback() {
public void use(Slider elem, int value) {

View file

@ -56,6 +56,7 @@ import common.inventory.InventoryPlayer;
import common.inventory.InventoryWarpChest;
import common.item.ItemStack;
import common.item.material.ItemDye;
import common.item.material.ItemGrindedBones;
import common.log.Log;
import common.network.IClientPlayer;
import common.network.NetConnection;
@ -1595,7 +1596,7 @@ public class ClientPlayer implements IClientPlayer
break;
case 2005:
ItemDye.spawnBonemealParticles(this.gm.world, blockPosIn, data);
ItemGrindedBones.spawnParticles(this.gm.world, blockPosIn, data);
break;
case 2016:

View file

@ -6,7 +6,7 @@ import client.Client;
import client.gui.Font;
import client.gui.FontChar;
import common.log.Log;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public abstract class Drawing {
@ -52,7 +52,7 @@ public abstract class Drawing {
continue;
}
else if((ch >= Log.CHR_COLORS1 && ch <= Log.CHR_COLORE1) || (ch >= Log.CHR_COLORS2 && ch <= Log.CHR_COLORE2)) {
ncolor = TextColor.getColor(ch) | (color & 0xff000000);
ncolor = Color.getColor(ch) | (color & 0xff000000);
continue;
}
else if(ch == Log.CHR_CRESET) {
@ -315,7 +315,7 @@ public abstract class Drawing {
continue;
}
else if((ch >= Log.CHR_COLORS1 && ch <= Log.CHR_COLORE1) || (ch >= Log.CHR_COLORS2 && ch <= Log.CHR_COLORE2)) {
bcolor = TextColor.getShadow(ch) | (scolor & 0xff000000);
bcolor = Color.getShadow(ch) | (scolor & 0xff000000);
continue;
}
else if(ch == Log.CHR_CRESET) {
@ -343,7 +343,7 @@ public abstract class Drawing {
continue;
}
else if((ch >= Log.CHR_COLORS1 && ch <= Log.CHR_COLORE1) || (ch >= Log.CHR_COLORS2 && ch <= Log.CHR_COLORE2)) {
ncolor = TextColor.getColor(ch) | (color & 0xff000000);
ncolor = Color.getColor(ch) | (color & 0xff000000);
continue;
}
else if(ch == Log.CHR_CRESET) {

View file

@ -2,7 +2,7 @@ package client.renderer.entity;
import client.renderer.model.ModelBase;
import common.entity.animal.EntityRabbit;
import common.util.TextColor;
import common.util.Color;
public class RenderRabbit extends RenderLiving<EntityRabbit> {
@ -26,7 +26,7 @@ public class RenderRabbit extends RenderLiving<EntityRabbit> {
}
protected String getEntityTexture(EntityRabbit entity) {
String name = TextColor.stripCodes(entity.getCustomNameTag());
String name = Color.stripCodes(entity.getCustomNameTag());
if("Lola".equalsIgnoreCase(name) || "Lolo".equalsIgnoreCase(name))
return HALF;
int type = entity.getRabbitType();

View file

@ -23,7 +23,7 @@ import common.entity.types.EntityAnimal;
import common.entity.types.EntityLiving;
import common.log.Log;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
{
@ -436,7 +436,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
}
else
{
String s = TextColor.stripCodes(bat.getCustomNameTag());
String s = Color.stripCodes(bat.getCustomNameTag());
if (s != null && (s.startsWith("Australia") || s.startsWith("Australien"))) // && (!(bat.isPlayer()) || ((EntityNPC)bat).isWearing(ModelPart.CAPE)))
{

View file

@ -4,7 +4,7 @@ import java.lang.reflect.Field;
import client.gui.element.Toggle;
import client.gui.element.ToggleCallback;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class BoolVar extends BaseVar {
@ -27,7 +27,7 @@ public class BoolVar extends BaseVar {
}
public String getType() {
return TextColor.MAGENTA + "bool";
return Color.MAGENTA + "bool";
}
public boolean parse(String str) {

View file

@ -1,15 +1,15 @@
package client.vars;
import common.util.TextColor;
import common.util.Color;
public enum CVarCategory {
SYSTEM(TextColor.RED + "system"),
WINDOW(TextColor.BLUE + "window"),
GUI(TextColor.GREEN + "gui"),
RENDER(TextColor.NEON + "render"),
INPUT(TextColor.ORANGE + "input"),
CONSOLE(TextColor.YELLOW + "console"),
SOUND(TextColor.CRIMSON + "sound");
SYSTEM(Color.RED + "system"),
WINDOW(Color.BLUE + "window"),
GUI(Color.GREEN + "gui"),
RENDER(Color.NEON + "render"),
INPUT(Color.ORANGE + "input"),
CONSOLE(Color.YELLOW + "console"),
SOUND(Color.CRIMSON + "sound");
private final String name;

View file

@ -7,7 +7,7 @@ import client.gui.element.FieldCallback;
import client.gui.element.Label;
import client.gui.element.Slider;
import client.gui.element.FieldAction;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class ColorVar extends IntVar {
@ -19,7 +19,7 @@ public class ColorVar extends IntVar {
}
public String getType() {
return this.alpha ? (TextColor.GRAY + "color32") : (TextColor.LIGHT_GRAY + "color");
return this.alpha ? (Color.GRAY + "color32") : (Color.LIGHT_GRAY + "color");
}
protected Integer parseValue(String str) {

View file

@ -8,7 +8,7 @@ import client.gui.element.Element;
import client.gui.element.Switch;
import client.gui.element.SwitchCallback;
import common.util.Identifyable;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class EnumVar<T extends Enum> extends BaseVar {
@ -41,7 +41,7 @@ public class EnumVar<T extends Enum> extends BaseVar {
}
public String getType() {
return TextColor.CYAN + "enum";
return Color.CYAN + "enum";
}
public boolean parse(String str) {

View file

@ -5,7 +5,7 @@ import java.lang.reflect.Field;
import client.gui.element.Slider;
import client.gui.element.SliderFloatCallback;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
public class FloatVar extends BaseVar {
public static interface FloatFunction extends VarFunction {
@ -47,7 +47,7 @@ public class FloatVar extends BaseVar {
}
public String getType() {
return TextColor.YELLOW + "float";
return Color.YELLOW + "float";
}
public boolean parse(String str) {

View file

@ -5,7 +5,7 @@ import java.lang.reflect.Field;
import client.gui.element.Slider;
import client.gui.element.SliderCallback;
import common.util.ExtMath;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public class IntVar extends BaseVar {
@ -36,7 +36,7 @@ public class IntVar extends BaseVar {
}
public String getType() {
return TextColor.GREEN + "int";
return Color.GREEN + "int";
}
protected Integer parseValue(String str) {

View file

@ -5,7 +5,7 @@ import java.lang.reflect.Field;
import client.gui.element.FieldCallback;
import client.gui.element.FieldAction;
import common.util.CharValidator;
import common.util.TextColor;
import common.util.Color;
public class StringVar extends BaseVar {
public static interface StringFunction extends VarFunction {
@ -33,7 +33,7 @@ public class StringVar extends BaseVar {
}
public String getType() {
return TextColor.YELLOW + "float";
return Color.YELLOW + "float";
}
public boolean parse(String str) {

View file

@ -5,7 +5,7 @@ import client.gui.element.Element;
import client.vars.CVar;
import client.vars.CVarCategory;
import common.util.Identifyable;
import common.util.TextColor;
import common.util.Color;
import common.util.Util;
public enum Bind implements Identifyable, CVar {
@ -180,7 +180,7 @@ public enum Bind implements Identifyable, CVar {
}
public String getType() {
return TextColor.VIOLET + "key";
return Color.VIOLET + "key";
}
public CVarCategory getCategory() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After