color changes
|
@ -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++) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import client.gui.element.Slider;
|
|||
import client.gui.element.SliderCallback;
|
||||
import client.vars.CVar;
|
||||
import client.vars.CVarCategory;
|
||||
import common.color.TextColor;
|
||||
import common.sound.EventType;
|
||||
import common.util.TextColor;
|
||||
|
||||
public enum Volume implements CVar {
|
||||
MASTER("master", "Gesamt"),
|
||||
|
@ -52,7 +52,7 @@ public enum Volume implements CVar {
|
|||
}
|
||||
|
||||
public String getType() {
|
||||
return TextColor.DGREEN + "volume";
|
||||
return TextColor.DARK_GREEN + "volume";
|
||||
}
|
||||
|
||||
public CVarCategory getCategory() {
|
||||
|
|
|
@ -16,11 +16,11 @@ import client.gui.element.NavButton;
|
|||
import client.gui.element.PressType;
|
||||
import client.renderer.Drawing;
|
||||
import client.util.FileUtils;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.network.IPlayer;
|
||||
import common.util.EncryptUtil;
|
||||
import common.util.Pair;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements ButtonCallback {
|
||||
|
|
|
@ -17,12 +17,12 @@ import client.vars.BoolVar;
|
|||
import client.vars.CVar;
|
||||
import client.window.Keysym;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.network.IPlayer;
|
||||
import common.packet.CPacketComplete;
|
||||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
import common.util.HitPosition;
|
||||
import common.util.TextColor;
|
||||
|
||||
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.code) {
|
||||
if(c == TextColor.COMMAND) {
|
||||
for(int n = z + 1; n < this.text.length(); n++) {
|
||||
c = this.text.charAt(n);
|
||||
if(c < 0x20) {
|
||||
|
|
|
@ -4,17 +4,16 @@ import client.Client;
|
|||
import client.gui.element.MultiLabel;
|
||||
import client.gui.element.NavButton;
|
||||
import common.Version;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class GuiInfo extends Gui {
|
||||
private static final String VER =
|
||||
TextColor.GREEN + "" + Util.repeatString(TextColor.BUG, Version.RELEASE.getId()) + TextColor.DVIOLET + "|-| " + TextColor.VIOLET + Client.VERSION + TextColor.DVIOLET + " |-|" +
|
||||
TextColor.GREEN + Util.repeatString(TextColor.BUG, Version.RELEASE.getId());
|
||||
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());
|
||||
|
||||
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" + TextColor.UNKNOWN + "" + TextColor.UNKNOWN + " [Speicherzugriffsfehler]";
|
||||
"Optimiert für Geschwindigkeit, Stabilität und\u007f\u007f [Speicherzugriffsfehler]";
|
||||
private static final String HACKED = "Ein weiterer Release von WAAAAAAAAAAAAGHDRIVE!!!1!!!ONEoneOnetyone!1!!!" + "\n" +
|
||||
"Update 0.2 - Läuft jetzt auch mit nur 512KB Fast-RAM!";
|
||||
|
||||
|
@ -53,12 +52,12 @@ public class GuiInfo extends Gui {
|
|||
for(int z = 0; z < authors.length; z++) {
|
||||
if(z > 0)
|
||||
sb.append((hax ? TextColor.VIOLET : TextColor.GRAY) + ", ");
|
||||
sb.append((hax ? TextColor.DVIOLET : TextColor.WHITE) + authors[z]);
|
||||
sb.append((hax ? TextColor.DARK_VIOLET : TextColor.WHITE) + authors[z]);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getInfo(boolean hax) {
|
||||
return getHeader(hax, VER, VER) + "\n" + (hax ? (TextColor.VIOLET + HACKED) : (TextColor.LGRAY + INFO));
|
||||
return getHeader(hax, VER, VER) + "\n" + (hax ? (TextColor.VIOLET + HACKED) : (TextColor.LIGHT_GRAY + INFO));
|
||||
}
|
||||
|
||||
private static String getLibraries(boolean hax) {
|
||||
|
@ -78,15 +77,13 @@ public class GuiInfo extends Gui {
|
|||
}
|
||||
|
||||
private static String getColors() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder sb = new StringBuilder(TextColor.RESET + "#D ");
|
||||
int num = 0;
|
||||
for(TextColor color : TextColor.values()) {
|
||||
if(num == 14)
|
||||
sb.append('\n');
|
||||
if((color.code >= Log.CHR_COLORS1 && color.code <= Log.CHR_COLORE1) || (color.code >= Log.CHR_COLORS2 && color.code <= Log.CHR_COLORE2)) {
|
||||
sb.append(color + "#" + color.colorId + ' ');
|
||||
num++;
|
||||
}
|
||||
if(num == TextColor.values().length / 2)
|
||||
sb.append("\n" + TextColor.COMMAND + "#d ");
|
||||
sb.append(color + "#" + color.colorId + ' ');
|
||||
num++;
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -95,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.CRIMSON + TextColor.DEMON + TextColor.BLACK + TextColor.BLKHEART,
|
||||
TextColor.RED + "Shen, Herrscher des Schattenlandes " + TextColor.CRIMSON + TextColor.IMP);
|
||||
TextColor.CYAN + "Sen der \"kleine\" Dämon",
|
||||
TextColor.RED + "Shen, Herrscher des Schattenlandes");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ import client.gui.element.PressType;
|
|||
import client.gui.options.GuiOptions;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Keysym;
|
||||
import common.color.TextColor;
|
||||
import common.rng.Random;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiMenu extends Gui {
|
||||
public static final GuiMenu INSTANCE = new GuiMenu();
|
||||
|
@ -186,7 +186,7 @@ public class GuiMenu extends Gui {
|
|||
this.animGrow[this.rand.zrange(this.animWidth)] += 1;
|
||||
}
|
||||
sb = new StringBuilder(this.animWidth + 2);
|
||||
sb.append(TextColor.DGREEN);
|
||||
sb.append(TextColor.DARK_GREEN);
|
||||
for(int z = 0; z < this.animWidth; z++) {
|
||||
switch(this.animGrow[z] / 5) {
|
||||
case 0:
|
||||
|
@ -197,7 +197,7 @@ public class GuiMenu extends Gui {
|
|||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sb.append(TextColor.LGRAY);
|
||||
sb.append(TextColor.LIGHT_GRAY);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
|
@ -215,7 +215,7 @@ public class GuiMenu extends Gui {
|
|||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
sb.append(TextColor.DVIOLET);
|
||||
sb.append(TextColor.DARK_VIOLET);
|
||||
break;
|
||||
default:
|
||||
sb.append(TextColor.VIOLET);
|
||||
|
|
|
@ -17,9 +17,9 @@ import client.gui.element.FieldCallback;
|
|||
import client.vars.CVarCategory;
|
||||
import client.vars.Variable;
|
||||
import client.window.Window;
|
||||
import common.color.TextColor;
|
||||
import common.network.IPlayer;
|
||||
import common.util.EncryptUtil;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiServer extends Gui implements FieldCallback {
|
||||
public static final GuiServer INSTANCE = new GuiServer(null);
|
||||
|
|
|
@ -11,11 +11,11 @@ import client.gui.element.ListEntry;
|
|||
import client.gui.element.NavButton;
|
||||
import client.gui.element.PressType;
|
||||
import client.renderer.Drawing;
|
||||
import common.color.TextColor;
|
||||
import common.entity.npc.PlayerCharacter;
|
||||
import common.packet.CPacketAction;
|
||||
import common.packet.CPacketAction.Action;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ButtonCallback
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ 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.DGREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.VIOLET + "%s",
|
||||
String.format(TextColor.GREEN + "Level " + TextColor.DARK_GREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.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",
|
||||
|
@ -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.LYELLOW + "Herkunft" + TextColor.LGRAY + ": " + TextColor.LBROWN + "%s\n" + TextColor.RESET + "%s", entry.character.align().color, entry.character.align().display, entry.character.origin() == null ? TextColor.DGRAY + "*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(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.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;
|
||||
|
|
|
@ -29,7 +29,6 @@ import client.window.Button;
|
|||
import common.attributes.Attribute;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Sets;
|
||||
import common.color.TextColor;
|
||||
import common.enchantment.Enchantment;
|
||||
import common.enchantment.EnchantmentHelper;
|
||||
import common.init.ItemRegistry;
|
||||
|
@ -41,6 +40,7 @@ import common.item.ItemStack;
|
|||
import common.packet.CPacketAction;
|
||||
import common.packet.CPacketCheat;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public abstract class GuiContainer extends Gui
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ public abstract class GuiContainer extends Gui
|
|||
if(stack.getItem().isAdminItem())
|
||||
list.add(TextColor.RED + "Admin-Gegenstand");
|
||||
if(stack.getItem().isMagnetic())
|
||||
list.add(TextColor.LGRAY + "Magnetisch");
|
||||
list.add(TextColor.LIGHT_GRAY + "Magnetisch");
|
||||
if(stack.getItem().canBeDyed())
|
||||
list.add("Farbe: #" + Integer.toHexString(stack.getDyeColor()).toUpperCase());
|
||||
|
||||
|
@ -424,7 +424,7 @@ public abstract class GuiContainer extends Gui
|
|||
}
|
||||
}
|
||||
else if(stack == this.cheatStack) {
|
||||
s = TextColor.DGREEN + "+" + TextColor.GREEN + formatAmount(stack.getSize());
|
||||
s = TextColor.DARK_GREEN + "+" + TextColor.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.LGRAY + (String)list.get(i));
|
||||
sb.append("\n" + TextColor.LIGHT_GRAY + (String)list.get(i));
|
||||
else
|
||||
sb.append((String)list.get(i));
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ import client.gui.element.ActButton;
|
|||
import client.gui.element.ButtonCallback;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.PressType;
|
||||
import common.color.TextColor;
|
||||
import common.enchantment.Enchantment;
|
||||
import common.init.Blocks;
|
||||
import common.inventory.ContainerEnchantment;
|
||||
import common.inventory.InventoryPlayer;
|
||||
import common.rng.Random;
|
||||
import common.util.Pair;
|
||||
import common.util.TextColor;
|
||||
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.DGRAY + name);
|
||||
this.mana[l].setText(TextColor.DRED + "Mana-Level " + mana);
|
||||
this.labels[l].setText(TextColor.DARK_GRAY + name);
|
||||
this.mana[l].setText(TextColor.DARK_RED + "Mana-Level " + mana);
|
||||
}
|
||||
else {
|
||||
this.buttons[l].enabled = true;
|
||||
this.labels[l].setText(TextColor.GREEN + name);
|
||||
this.mana[l].setText(TextColor.DGREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana");
|
||||
this.mana[l].setText(TextColor.DARK_GREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
|
|||
s1 = String.format("%d Manapunkte", i1);
|
||||
}
|
||||
|
||||
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.LGRAY.toString() + "" + s1);
|
||||
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.LIGHT_GRAY.toString() + "" + s1);
|
||||
}
|
||||
|
||||
this.hover(sb.toString(), mouseX, mouseY);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package client.gui.container;
|
||||
|
||||
import client.gui.element.Label;
|
||||
import common.color.TextColor;
|
||||
import common.inventory.ContainerRepair;
|
||||
import common.inventory.InventoryPlayer;
|
||||
import common.util.TextColor;
|
||||
import common.world.World;
|
||||
|
||||
public class GuiRepair extends GuiContainer {
|
||||
|
@ -20,7 +20,7 @@ public class GuiRepair extends GuiContainer {
|
|||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
if(this.anvil.maximumCost >= 40)
|
||||
this.info.setText(TextColor.DRED + "Zu teuer!");
|
||||
this.info.setText(TextColor.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))
|
||||
|
|
|
@ -16,9 +16,9 @@ import client.gui.element.FieldCallback;
|
|||
import client.gui.element.Toggle;
|
||||
import client.gui.element.ToggleCallback;
|
||||
import client.network.ClientPlayer;
|
||||
import common.color.TextColor;
|
||||
import common.packet.CPacketForm;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import common.util.Triplet;
|
||||
|
||||
public class GuiForm extends Gui implements ButtonCallback {
|
||||
|
|
|
@ -3,8 +3,8 @@ package client.gui.ingame;
|
|||
import client.gui.Gui;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ButtonCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.MultiLabel;
|
||||
import client.gui.element.PressType;
|
||||
|
@ -20,7 +20,7 @@ public class GuiGameOver extends Gui {
|
|||
|
||||
public void init(int width, int height) {
|
||||
this.timer = 0;
|
||||
this.add(new Label(0, 0, 400, 0, TextColor.DRED + "Du bist gestorben!"));
|
||||
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.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
|
||||
public void use(ActButton elem, PressType action) {
|
||||
|
|
|
@ -10,9 +10,9 @@ import client.gui.element.ButtonCallback;
|
|||
import client.gui.element.Field;
|
||||
import client.gui.element.FieldCallback;
|
||||
import client.network.ClientPlayer;
|
||||
import common.color.TextColor;
|
||||
import common.item.ItemStack;
|
||||
import common.packet.CPacketMessage;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
|
||||
private final String itemName;
|
||||
|
|
|
@ -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.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiBinds extends GuiOptions {
|
||||
protected GuiBinds() {
|
||||
|
|
|
@ -17,8 +17,8 @@ import client.window.Button;
|
|||
import client.window.DisplayMode;
|
||||
import client.window.Window;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiDisplay extends GuiOptions {
|
||||
private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"};
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.lwjgl.opengl.GL11;
|
|||
import client.Client;
|
||||
import client.gui.Font;
|
||||
import client.gui.FontChar;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public abstract class Drawing {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.color.TextColor;
|
||||
import common.entity.animal.EntityRabbit;
|
||||
import common.util.TextColor;
|
||||
|
||||
|
||||
public class RenderRabbit extends RenderLiving<EntityRabbit> {
|
||||
|
|
|
@ -17,13 +17,13 @@ import client.renderer.layers.LayerRenderer;
|
|||
import client.renderer.model.ModelBase;
|
||||
import client.renderer.texture.DynamicTexture;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.entity.Entity;
|
||||
import common.entity.item.EntityCrystal;
|
||||
import common.entity.types.EntityAnimal;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.log.Log;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
|
||||
{
|
||||
|
|
|
@ -38,8 +38,7 @@ public class LayerSheepWool implements LayerRenderer<EntitySheep>
|
|||
}
|
||||
else
|
||||
{
|
||||
float[] afloat = EntitySheep.getDyeRgb(entitylivingbaseIn.getFleeceColor());
|
||||
GlState.color(afloat[0], afloat[1], afloat[2], 1.0F);
|
||||
GlState.color(entitylivingbaseIn.getFleeceColor().getColor() | 0xff000000);
|
||||
}
|
||||
|
||||
this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel());
|
||||
|
|
|
@ -2,8 +2,6 @@ package client.renderer.layers;
|
|||
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.entity.RenderWolf;
|
||||
import common.color.DyeColor;
|
||||
import common.entity.animal.EntitySheep;
|
||||
import common.entity.animal.EntityWolf;
|
||||
|
||||
|
||||
|
@ -22,9 +20,7 @@ public class LayerWolfCollar implements LayerRenderer<EntityWolf>
|
|||
if (entitylivingbaseIn.isTamed()) // && !entitylivingbaseIn.isInvisible())
|
||||
{
|
||||
this.wolfRenderer.bindTexture(WOLF_COLLAR);
|
||||
DyeColor enumdyecolor = entitylivingbaseIn.getCollarColor();
|
||||
float[] afloat = EntitySheep.getDyeRgb(enumdyecolor);
|
||||
GlState.color(afloat[0], afloat[1], afloat[2], 1.0F);
|
||||
GlState.color(entitylivingbaseIn.getCollarColor().getColor() | 0xff000000);
|
||||
this.wolfRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
package client.renderer.texture;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import client.util.FileUtils;
|
||||
import common.color.DyeColor;
|
||||
import common.log.Log;
|
||||
|
||||
public class LayeredColorMaskTexture extends Texture
|
||||
{
|
||||
private final String texture;
|
||||
private final List<String> layers;
|
||||
private final List<DyeColor> colors;
|
||||
|
||||
private static int applyTint(int color, int tint) {
|
||||
int i = (color & 16711680) >> 16;
|
||||
int j = (tint & 16711680) >> 16;
|
||||
int k = (color & 65280) >> 8;
|
||||
int l = (tint & 65280) >> 8;
|
||||
int i1 = (color & 255) >> 0;
|
||||
int j1 = (tint & 255) >> 0;
|
||||
int k1 = (int)((float)i * (float)j / 255.0F);
|
||||
int l1 = (int)((float)k * (float)l / 255.0F);
|
||||
int i2 = (int)((float)i1 * (float)j1 / 255.0F);
|
||||
return color & -16777216 | k1 << 16 | l1 << 8 | i2;
|
||||
}
|
||||
|
||||
public LayeredColorMaskTexture(String texture, List<String> layers, List<DyeColor> colors)
|
||||
{
|
||||
this.texture = texture;
|
||||
this.layers = layers;
|
||||
this.colors = colors;
|
||||
}
|
||||
|
||||
public void loadTexture() throws IOException
|
||||
{
|
||||
this.deleteGlTexture();
|
||||
BufferedImage bufferedimage;
|
||||
|
||||
try
|
||||
{
|
||||
BufferedImage bufferedimage1 = TextureUtil.readImage(FileUtils.getResource(this.texture));
|
||||
int i = bufferedimage1.getType();
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
i = 6;
|
||||
}
|
||||
|
||||
bufferedimage = new BufferedImage(bufferedimage1.getWidth(), bufferedimage1.getHeight(), i);
|
||||
Graphics graphics = bufferedimage.getGraphics();
|
||||
graphics.drawImage(bufferedimage1, 0, 0, (ImageObserver)null);
|
||||
|
||||
for (int j = 0; j < 17 && j < this.layers.size() && j < this.colors.size(); ++j)
|
||||
{
|
||||
String s = this.layers.get(j);
|
||||
int color = this.colors.get(j).getColor();
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
InputStream inputstream = FileUtils.getResource(s);
|
||||
BufferedImage bufferedimage2 = TextureUtil.readImage(inputstream);
|
||||
|
||||
if (bufferedimage2.getWidth() == bufferedimage.getWidth() && bufferedimage2.getHeight() == bufferedimage.getHeight() && bufferedimage2.getType() == 6)
|
||||
{
|
||||
for (int k = 0; k < bufferedimage2.getHeight(); ++k)
|
||||
{
|
||||
for (int l = 0; l < bufferedimage2.getWidth(); ++l)
|
||||
{
|
||||
int i1 = bufferedimage2.getRGB(l, k);
|
||||
|
||||
if ((i1 & -16777216) != 0)
|
||||
{
|
||||
int j1 = (i1 & 16711680) << 8 & -16777216;
|
||||
int k1 = bufferedimage1.getRGB(l, k);
|
||||
int l1 = applyTint(k1, color) & 16777215;
|
||||
bufferedimage2.setRGB(l, k, j1 | l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bufferedimage.getGraphics().drawImage(bufferedimage2, 0, 0, (ImageObserver)null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
{
|
||||
Log.IO.error((Throwable)ioexception, (String)"Konnte Bild mit mehreren Schichten nicht laden");
|
||||
return;
|
||||
}
|
||||
|
||||
TextureUtil.uploadImage(this.getGlTextureId(), bufferedimage);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Toggle;
|
||||
import client.gui.element.ToggleCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class BoolVar extends BaseVar {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package client.vars;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public enum CVarCategory {
|
||||
SYSTEM(TextColor.RED + "system"),
|
||||
|
|
|
@ -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.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
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.LGRAY + "color");
|
||||
return this.alpha ? (TextColor.GRAY + "color32") : (TextColor.LIGHT_GRAY + "color");
|
||||
}
|
||||
|
||||
protected Integer parseValue(String str) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import client.gui.element.DropdownCallback;
|
|||
import client.gui.element.Element;
|
||||
import client.gui.element.Switch;
|
||||
import client.gui.element.SwitchCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.Identifyable;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class EnumVar<T extends Enum> extends BaseVar {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.SliderFloatCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class FloatVar extends BaseVar {
|
||||
public static interface FloatFunction extends VarFunction {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.SliderCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class IntVar extends BaseVar {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.FieldCallback;
|
||||
import client.gui.element.FieldAction;
|
||||
import common.color.TextColor;
|
||||
import common.util.CharValidator;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class StringVar extends BaseVar {
|
||||
public static interface StringFunction extends VarFunction {
|
||||
|
|
|
@ -4,8 +4,8 @@ import client.Client;
|
|||
import client.gui.element.Element;
|
||||
import client.vars.CVar;
|
||||
import client.vars.CVarCategory;
|
||||
import common.color.TextColor;
|
||||
import common.util.Identifyable;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public enum Bind implements Identifyable, CVar {
|
||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
client/src/main/resources/textures/blocks/dark_green_wool.png
Executable file
After Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |