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.IntHashMap;
import common.util.LongHashMap; import common.util.LongHashMap;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
import common.util.Var; import common.util.Var;
import common.util.HitPosition.ObjectType; 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) { private int drawStat(int x, int y, String name, int value, int max, int color) {
int w = (int)(246.0f * (float)value / (float)max); int w = (int)(246.0f * (float)value / (float)max);
Drawing.drawTextboxRight(name, x + 250, y, 0x3f000000); 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.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)); Drawing.drawGradient(x + 2 + 246 - w, y + 20 + 2, w, 6, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000));
return y + 40; return y + 40;
@ -1085,10 +1085,10 @@ public class Client implements IThreadListener {
Entity ent; Entity ent;
if(this.player != null && now - status.getValue() < 10000L && (ent = this.player.worldObj.getEntityByID(status.getKey())) instanceof EntityLiving) { if(this.player != null && now - status.getValue() < 10000L && (ent = this.player.worldObj.getEntityByID(status.getKey())) instanceof EntityLiving) {
EntityLiving entity = (EntityLiving)ent; EntityLiving entity = (EntityLiving)ent;
String s = entity.getName() + TextColor.GRAY + " [" + String s = entity.getName() + Color.GRAY + " [" +
EntityLiving.getHealthColor(entity.getHealth(), entity.getMaxHealth()) + EntityLiving.getHealthColor(entity.getHealth(), entity.getMaxHealth()) +
entity.getHealth() + TextColor.GRAY + " / " + EntityLiving.getMaxHpColor(entity.getMaxHealth()) + entity.getHealth() + Color.GRAY + " / " + EntityLiving.getMaxHpColor(entity.getMaxHealth()) +
entity.getMaxHealth() + TextColor.GRAY + "]"; entity.getMaxHealth() + Color.GRAY + "]";
Drawing.drawTextboxCentered(s, x, y, 0x3f000000); Drawing.drawTextboxCentered(s, x, y, 0x3f000000);
Drawing.drawRectBorder(x - 200, y + 20, 400, 10, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f); 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)); 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()) { for(StatusEffect effect : this.player.getEffects()) {
Effect potion = effect.getPotion(); Effect potion = effect.getPotion();
int color = potion.getColor(); int color = potion.getColor();
String name = (potion.isBadEffect() ? TextColor.ORANGE : TextColor.ACID) + effect.getEffectName(); String name = (potion.isBadEffect() ? Color.ORANGE : Color.ACID) + effect.getEffectName();
String desc = TextColor.NEON + effect.getDurationString(); String desc = Color.NEON + effect.getDurationString();
Drawing.drawRectBorder(x, y, 250, Font.YGLYPH + 6, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f); 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.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); Drawing.drawText(name, x + 4, y + 3, 0xffffffff);
@ -1128,16 +1128,16 @@ public class Client implements IThreadListener {
y = this.fbY - 40 - stats * 40; y = this.fbY - 40 - stats * 40;
int hp = entity.getHealth(); int hp = entity.getHealth();
int max = entity.getMaxHealth(); 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) 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) { if(entity instanceof EntityWaterNPC npc) {
int moist = npc.getMoisture(); int moist = npc.getMoisture();
int maxm = npc.getMaxMoisture(); 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) 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) { if(entity.vehicle instanceof EntityLiving living) {
int vh = living.getHealth(); int vh = living.getHealth();
int vhMax = living.getMaxHealth(); int vhMax = living.getMaxHealth();
@ -1146,23 +1146,23 @@ public class Client implements IThreadListener {
if(entity.getManaPoints() > 0) { if(entity.getManaPoints() > 0) {
int mana = entity.getManaPoints(); int mana = entity.getManaPoints();
int maxm = entity.getMaxMana(); 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++) { for(int z = 0; z < Energy.values().length; z++) {
Energy type = Energy.values()[z]; Energy type = Energy.values()[z];
int energy = entity.getEnergy(type); int energy = entity.getEnergy(type);
if(energy > 0) { if(energy > 0) {
int emax = entity.getEnergyCap(type); 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; x = 40;
y = this.fbY - 40 - (this.player.isRidingHorse() && this.player.getHorseJumpPower() != 0.0f ? 2 : 1) * 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) // { 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); 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); GlState.bindTexture(0);
@ -1239,9 +1239,9 @@ public class Client implements IThreadListener {
this.renderLagometer(); this.renderLagometer();
} }
else { 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.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, (float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : ""), this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : ""),
0, 0, 0xffffffff); 0, 0, 0xffffffff);
@ -1264,14 +1264,14 @@ public class Client implements IThreadListener {
String draw = String.format( String draw = String.format(
"OpenGL: %s\n" + "OpenGL: %s\n" +
"Renderer: %s (%s)\n" + "Renderer: %s (%s)\n" +
"Bildrate: %s%.2f" + TextColor.RESET + " %s [%s" + TextColor.RESET + "], %.3f ms, W %d x %d%s\n" + "Bildrate: %s%.2f" + Color.RESET + " %s [%s" + Color.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" + "Tickrate: %s%.2f" + Color.RESET + " %s [" + Color.GREEN + "%.1f" + Color.RESET + "], %.3f ms, E %d ms" +
"%s%s" "%s%s"
, ,
GL11.glGetString(GL11.GL_VERSION), GL11.glGetString(GL11.GL_VERSION),
GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VENDOR), 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.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, (float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : "", this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : "",
this.tpscode(), this.tickrate < 1.0f ? 1.0f / this.tickrate : this.tickrate, 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, String.format("Richtung: %s (%.1f / %.1f)", dirStr,
ExtMath.wrapf(this.viewEntity.rotYaw), ExtMath.wrapf(this.viewEntity.rotPitch)) + "\n" + 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), 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" + this.dimensionName) + "\n" +
"Licht: " + chunk.getLightSub(pos, 0) + " (" + chunk.getLight(LightType.SKY, pos) + " Himmel, " "Licht: " + chunk.getLightSub(pos, 0) + " (" + chunk.getLight(LightType.SKY, pos) + " Himmel, "
+ chunk.getLight(LightType.BLOCK, pos) + " Blöcke, " + String.format( + 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()) String.format("Position: %d %d %d", pos.getX(), pos.getY(), pos.getZ())
); );
for(Entry<Property, Comparable> entry : block.getProperties().entrySet()) { 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(); return str.toString();
@ -1936,7 +1936,7 @@ public class Client implements IThreadListener {
+ (entity.isWet() ? "W" : "") + (entity.canAttackWithItem() ? "A" : "") + (entity.isWet() ? "W" : "") + (entity.canAttackWithItem() ? "A" : "")
+ (entity.passenger != null ? "H" : "") + (entity.vehicle != null ? "R" : "") + (entity.passenger != null ? "H" : "") + (entity.vehicle != null ? "R" : "")
+ (entity.doesEntityNotTriggerPressurePlate() ? "L" : "") + "\n" + + (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) { public void disconnected(String msg) {
Log.NETWORK.info("Getrennt: %s", msg); Log.NETWORK.info("Getrennt: %s", msg);
this.unload(true); 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(); }, "Screenshot writer").start();
} }
public TextColor framecode() { public Color framecode() {
return (this.framerate >= 59.0f) ? TextColor.GREEN : ((this.framerate >= 29.0f) ? TextColor.YELLOW : ((this.framerate >= 14.0f) ? TextColor.ORANGE : TextColor.RED)); return (this.framerate >= 59.0f) ? Color.GREEN : ((this.framerate >= 29.0f) ? Color.YELLOW : ((this.framerate >= 14.0f) ? Color.ORANGE : Color.RED));
} }
public TextColor tpscode() { public Color 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 : 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)) ? TextColor.ORANGE : TextColor.RED)); ((this.tickrate >= (((float)this.tickTarget / 1000.0f) / 4.0f - 1.0f)) ? Color.ORANGE : Color.RED));
} }
private void doTicks() { private void doTicks() {
@ -2490,10 +2490,10 @@ public class Client implements IThreadListener {
this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() { this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() {
public void execute(Keysym key) { public void execute(Keysym key) {
String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay(); String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay();
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>() { Util.buildLines(new Function<DebugFunction, String>() {
public String apply(DebugFunction func) { public String apply(DebugFunction func) {
return TextColor.CYAN + bind + TextColor.RED + "+" + TextColor.GREEN + func.key.getDisplay() + TextColor.GRAY + " - " + TextColor.YELLOW + func.help; return Color.CYAN + bind + Color.RED + "+" + Color.GREEN + func.key.getDisplay() + Color.GRAY + " - " + Color.YELLOW + func.help;
} }
}, Client.this.debug.values()))); }, Client.this.debug.values())));
} }
@ -2623,7 +2623,7 @@ public class Client implements IThreadListener {
} }
else { else {
this.lastUsed = System.currentTimeMillis(); 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) { private void printVar(CVar cv) {
String values = cv.getValues(); 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 + this.logConsole("%s " + Color.NEON + "%s " + Color.DARK_GRAY + "[%s" + Color.DARK_GRAY + "]" + Color.GRAY + " = " + Color.WHITE + "%s " + Color.DARK_GRAY +
"[" + TextColor.GRAY + "D " + TextColor.CRIMSON + "%s" + TextColor.DARK_GRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(), "[" + Color.GRAY + "D " + Color.CRIMSON + "%s" + Color.DARK_GRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
values != null ? " [" + TextColor.LIGHT_GRAY + values + TextColor.DARK_GRAY + "]" : ""); values != null ? " [" + Color.LIGHT_GRAY + values + Color.DARK_GRAY + "]" : "");
} }
public void exec(String line) { public void exec(String line) {
@ -2872,7 +2872,7 @@ public class Client implements IThreadListener {
for(CVar cv : this.cvars.values()) { for(CVar cv : this.cvars.values()) {
printVar(cv); 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; return;
} }
else if(line.startsWith("#")) { else if(line.startsWith("#")) {
@ -2890,7 +2890,7 @@ public class Client implements IThreadListener {
this.logConsole("%s -> %s", cv.getCVarName(), cv.format()); this.logConsole("%s -> %s", cv.getCVarName(), cv.format());
} }
else { 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; return;
} }
@ -2900,7 +2900,7 @@ public class Client implements IThreadListener {
} }
public void reset() { public void reset() {
this.buffer = TextColor.NEON + "*** " + VERSION + " ***"; this.buffer = Color.NEON + "*** " + VERSION + " ***";
this.console.clear(); this.console.clear();
this.chat.clear(); this.chat.clear();
this.feed.clear(); this.feed.clear();
@ -3015,30 +3015,30 @@ public class Client implements IThreadListener {
private void drawPing(int x, int y, int ping) { private void drawPing(int x, int y, int ping) {
int bars; int bars;
TextColor color; Color color;
if(ping < 0 || ping >= 20000) { if(ping < 0 || ping >= 20000) {
bars = 0; bars = 0;
color = ping < 0 ? TextColor.GRAY : TextColor.DARK_RED; color = ping < 0 ? Color.GRAY : Color.DARK_RED;
} }
else if(ping < 80) { else if(ping < 80) {
bars = ping < 50 ? 8 : 7; bars = ping < 50 ? 8 : 7;
color = TextColor.GREEN; color = Color.GREEN;
} }
else if(ping < 160) { else if(ping < 160) {
bars = ping < 120 ? 6 : 5; bars = ping < 120 ? 6 : 5;
color = TextColor.DARK_GREEN; color = Color.DARK_GREEN;
} }
else if(ping < 350) { else if(ping < 350) {
bars = ping < 220 ? 4 : 3; bars = ping < 220 ? 4 : 3;
color = TextColor.YELLOW; color = Color.YELLOW;
} }
else if(ping < 700) { else if(ping < 700) {
bars = ping < 500 ? 2 : 1; bars = ping < 500 ? 2 : 1;
color = TextColor.RED; color = Color.RED;
} }
else { else {
bars = 1; 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); 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++) { 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.CVar;
import client.vars.CVarCategory; import client.vars.CVarCategory;
import common.sound.EventType; import common.sound.EventType;
import common.util.TextColor; import common.util.Color;
public enum Volume implements CVar { public enum Volume implements CVar {
MASTER("master", "Gesamt"), MASTER("master", "Gesamt"),
@ -52,7 +52,7 @@ public enum Volume implements CVar {
} }
public String getType() { public String getType() {
return TextColor.DARK_GREEN + "volume"; return Color.DARK_GREEN + "volume";
} }
public CVarCategory getCategory() { public CVarCategory getCategory() {

View file

@ -20,7 +20,7 @@ import common.log.Log;
import common.network.IPlayer; import common.network.IPlayer;
import common.util.EncryptUtil; import common.util.EncryptUtil;
import common.util.Pair; import common.util.Pair;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements ButtonCallback { 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) { 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()) if(this.keypair != null || !this.password.isEmpty())
Drawing.drawTextRight( Drawing.drawTextRight(
(this.keypair != null ? "Pubkey " + this.keyDigest : "") + (this.keypair != null && !this.password.isEmpty() ? " + " : "") + (!this.password.isEmpty() ? "Passwort" : ""), (this.keypair != null ? "Pubkey " + this.keyDigest : "") + (this.keypair != null && !this.password.isEmpty() ? " + " : "") + (!this.password.isEmpty() ? "Passwort" : ""),
x + width - 2, y, 0xffffffff); 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); x + 2, y + height - Font.YGLYPH * 2, 0xffb0b0b0);
if(!this.access.isEmpty()) if(!this.access.isEmpty())
Drawing.drawTextRight((this.keypair != null || !this.password.isEmpty() ? "+ " : "") + "Server-Passwort", x + width - 2, y + height - Font.YGLYPH * 2, 0xffb0b0b0); 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.BlockPos;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.TextColor; import common.util.Color;
public class GuiConsole extends Gui implements FieldCallback { public class GuiConsole extends Gui implements FieldCallback {
private class ConsoleArea extends Area { 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) { if(this.sel_start >= 0 && this.sel_end == this.sel_start) {
for(int z = this.sel_start; z >= 0; z--) { for(int z = this.sel_start; z >= 0; z--) {
char c = this.text.charAt(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++) { for(int n = z + 1; n < this.text.length(); n++) {
c = this.text.charAt(n); c = this.text.charAt(n);
if(c < 0x20) { if(c < 0x20) {
@ -189,7 +189,7 @@ public class GuiConsole extends Gui implements FieldCallback {
int nl = buffer.indexOf('\n', offset); int nl = buffer.indexOf('\n', offset);
buffer = nl >= 0 ? buffer.substring(nl + 1) : ""; buffer = nl >= 0 ? buffer.substring(nl + 1) : "";
} }
this.setLog(buffer + "\n" + TextColor.RESET + msg); this.setLog(buffer + "\n" + Color.RESET + msg);
} }
public void autocompletePlayerNames() public void autocompletePlayerNames()

View file

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

View file

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

View file

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

View file

@ -15,7 +15,7 @@ import common.entity.npc.PlayerCharacter;
import common.packet.CPacketAction; import common.packet.CPacketAction;
import common.packet.CPacketAction.Action; import common.packet.CPacketAction.Action;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ButtonCallback public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ButtonCallback
{ {
@ -34,11 +34,11 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
{ {
if(this.initial) if(this.initial)
Drawing.drawRect(x, y, 1, 36, 0xffaf0000); Drawing.drawRect(x, y, 1, 36, 0xffaf0000);
String str = this.character == null ? TextColor.BLUE + "[" + TextColor.CYAN + "+" + TextColor.BLUE + "]" : String str = this.character == null ? Color.BLUE + "[" + Color.CYAN + "+" + Color.BLUE + "]" :
String.format(TextColor.GREEN + "Level " + TextColor.DARK_GREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.VIOLET + "%s", String.format(Color.GREEN + "Level " + Color.DARK_GREEN + "%d " + Color.YELLOW + "%s " + Color.VIOLET + "%s",
character.level(), character.type(), character.name()); character.level(), character.type(), character.name());
String pos = this.character == null ? TextColor.BROWN + "Neuen Charakter erstellen" : String pos = this.character == null ? Color.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.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()); character.dim(), character.pos().getX(), character.pos().getY(), character.pos().getZ());
Drawing.drawText(str, x + 3, y, 0xffffffff); Drawing.drawText(str, x + 3, y, 0xffffffff);
Drawing.drawText(pos, x + 3, y + height - Font.YGLYPH, 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() { private void updateButtons() {
CharacterEntry entry = this.getSelected(); 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.setText(entry != null && entry.character == null ? "Charakter erstellen" : "Charakter spielen");
this.actionButtom.enabled = entry != null && !entry.initial; this.actionButtom.enabled = entry != null && !entry.initial;
this.deleteButtom.enabled = !this.gm.charEditor && entry != null && entry.character != 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.CPacketAction;
import common.packet.CPacketCheat; import common.packet.CPacketCheat;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
public abstract class GuiContainer extends Gui public abstract class GuiContainer extends Gui
{ {
@ -125,14 +125,14 @@ public abstract class GuiContainer extends Gui
List<String> list = Lists.<String>newArrayList(); List<String> list = Lists.<String>newArrayList();
String s = stack.getColoredName(); String s = stack.getColoredName();
if(stack.getSize() != 1) if(stack.getSize() != 1)
s = TextColor.YELLOW + "" + stack.getSize() + " " + TextColor.RESET + s; s = Color.YELLOW + "" + stack.getSize() + " " + Color.RESET + s;
s = s + TextColor.RESET; s = s + Color.RESET;
list.add(s); list.add(s);
stack.getItem().addInformation(stack, this.gm.player, list); stack.getItem().addInformation(stack, this.gm.player, list);
if(stack.getItem().isAdminItem()) if(stack.getItem().isAdminItem())
list.add(TextColor.RED + "Admin-Gegenstand"); list.add(Color.RED + "Admin-Gegenstand");
if(stack.getItem().isMagnetic()) if(stack.getItem().isMagnetic())
list.add(TextColor.LIGHT_GRAY + "Magnetisch"); list.add(Color.LIGHT_GRAY + "Magnetisch");
if(stack.getItem().canBeDyed()) if(stack.getItem().canBeDyed())
list.add("Farbe: #" + Integer.toHexString(stack.getDyeColor()).toUpperCase()); list.add("Farbe: #" + Integer.toHexString(stack.getDyeColor()).toUpperCase());
@ -146,9 +146,9 @@ public abstract class GuiContainer extends Gui
damage += EnchantmentHelper.getDamageModifier(stack); damage += EnchantmentHelper.getDamageModifier(stack);
if(damage != 0) { if(damage != 0) {
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 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); Map<Attribute, Float> mods = stack.getAttributeModifiers(null);
@ -160,17 +160,17 @@ public abstract class GuiContainer extends Gui
if(stack.getSize() != 1) { if(stack.getSize() != 1) {
double total = amt * (double)stack.getSize(); double total = amt * (double)stack.getSize();
if(amt > 0.0D) 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))); DECIMALFORMAT.format(amt)));
else if(amt < 0.0D) 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))); DECIMALFORMAT.format(amt * -1.0)));
} }
else { else {
if(amt > 0.0D) 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) 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 else
list.add("Stapelbar bis " + stack.getItem().getMaxAmount()); 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; return list;
} }
@ -420,11 +420,11 @@ public abstract class GuiContainer extends Gui
if (stack.isEmpty()) if (stack.isEmpty())
{ {
s = "" + TextColor.YELLOW + "0"; s = "" + Color.YELLOW + "0";
} }
} }
else if(stack == this.cheatStack) { 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); this.drawItemStack(stack, mouseX - j2, mouseY - k2, s);
@ -472,7 +472,7 @@ public abstract class GuiContainer extends Gui
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for(int i = 0; i < list.size(); ++i) { for(int i = 0; i < list.size(); ++i) {
if(i != 0) if(i != 0)
sb.append("\n" + TextColor.LIGHT_GRAY + (String)list.get(i)); sb.append("\n" + Color.LIGHT_GRAY + (String)list.get(i));
else else
sb.append((String)list.get(i)); sb.append((String)list.get(i));
} }
@ -532,13 +532,13 @@ public abstract class GuiContainer extends Gui
if (itemstack.getSize() > itemstack.getMaxStackSize()) if (itemstack.getSize() > itemstack.getMaxStackSize())
{ {
s = TextColor.YELLOW + formatAmount(itemstack.getMaxStackSize()); s = Color.YELLOW + formatAmount(itemstack.getMaxStackSize());
itemstack.setSize(itemstack.getMaxStackSize()); itemstack.setSize(itemstack.getMaxStackSize());
} }
if (itemstack.getSize() > slotIn.getItemStackLimit(itemstack)) 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)); itemstack.setSize(slotIn.getItemStackLimit(itemstack));
} }
} }
@ -880,7 +880,7 @@ public abstract class GuiContainer extends Gui
if (text == null && stack.isEmpty()) 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); 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.inventory.InventoryPlayer;
import common.rng.Random; import common.rng.Random;
import common.util.Pair; import common.util.Pair;
import common.util.TextColor; import common.util.Color;
import common.world.World; import common.world.World;
public class GuiEnchant extends GuiContainer implements ButtonCallback { public class GuiEnchant extends GuiContainer implements ButtonCallback {
@ -46,13 +46,13 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
else { else {
if(this.gm.player.getManaPoints() < mana) { if(this.gm.player.getManaPoints() < mana) {
this.buttons[l].enabled = false; this.buttons[l].enabled = false;
this.labels[l].setText(TextColor.DARK_GRAY + name); this.labels[l].setText(Color.DARK_GRAY + name);
this.mana[l].setText(TextColor.DARK_RED + "Mana-Level " + mana); this.mana[l].setText(Color.DARK_RED + "Mana-Level " + mana);
} }
else { else {
this.buttons[l].enabled = true; this.buttons[l].enabled = true;
this.labels[l].setText(TextColor.GREEN + name); this.labels[l].setText(Color.GREEN + name);
this.mana[l].setText(TextColor.DARK_GREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana"); 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(); StringBuilder sb = new StringBuilder();
String s = l.first().getFormattedName(l.second()); String s = l.first().getFormattedName(l.second());
sb.append(TextColor.WHITE + s + " . . . ?"); sb.append(Color.WHITE + s + " . . . ?");
if(this.gm.player.getManaPoints() < k) { 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 { else {
String s1 = ""; String s1 = "";
@ -110,7 +110,7 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
s1 = String.format("%d Manapunkte", i1); 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); this.hover(sb.toString(), mouseX, mouseY);

View file

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

View file

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

View file

@ -4,7 +4,7 @@ import client.gui.Gui;
import client.gui.element.ActButton; import client.gui.element.ActButton;
import client.gui.element.ButtonCallback; import client.gui.element.ButtonCallback;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
import client.gui.element.Label; import client.gui.element.Label;
import client.gui.element.MultiLabel; import client.gui.element.MultiLabel;
import client.gui.element.PressType; import client.gui.element.PressType;
@ -20,8 +20,8 @@ public class GuiGameOver extends Gui {
public void init(int width, int height) { public void init(int width, int height) {
this.timer = 0; this.timer = 0;
this.add(new Label(0, 0, 400, 0, TextColor.DARK_RED + "Du bist gestorben!")); this.add(new Label(0, 0, 400, 0, Color.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 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() { this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
public void use(ActButton elem, PressType action) { public void use(ActButton elem, PressType action) {
GuiGameOver.this.gm.player.respawnPlayer(); GuiGameOver.this.gm.player.respawnPlayer();

View file

@ -12,7 +12,7 @@ import client.gui.element.FieldCallback;
import client.network.ClientPlayer; import client.network.ClientPlayer;
import common.item.ItemStack; import common.item.ItemStack;
import common.packet.CPacketMessage; import common.packet.CPacketMessage;
import common.util.TextColor; import common.util.Color;
public class GuiRename extends Gui implements FieldCallback, ButtonCallback { public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
private final String itemName; private final String itemName;
@ -37,7 +37,7 @@ public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
public GuiRename(int slot, ItemStack stack, Gui prev) { public GuiRename(int slot, ItemStack stack, Gui prev) {
this.itemName = stack.getItem().getDisplay(); 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.slot = slot;
this.previous = prev; this.previous = prev;
} }

View file

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

View file

@ -18,7 +18,7 @@ import client.window.DisplayMode;
import client.window.Window; import client.window.Window;
import common.collect.Lists; import common.collect.Lists;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
public class GuiDisplay extends GuiOptions { public class GuiDisplay extends GuiOptions {
private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"}; private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"};
@ -61,7 +61,7 @@ public class GuiDisplay extends GuiOptions {
} }
} }
if(dmodes == null) 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() { 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) { public void use(Slider elem, int value) {

View file

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

View file

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

View file

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

View file

@ -23,7 +23,7 @@ import common.entity.types.EntityAnimal;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.log.Log; import common.log.Log;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T> public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
{ {
@ -436,7 +436,7 @@ public abstract class RendererLivingEntity<T extends EntityLiving> extends Rende
} }
else 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))) 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.Toggle;
import client.gui.element.ToggleCallback; import client.gui.element.ToggleCallback;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
public class BoolVar extends BaseVar { public class BoolVar extends BaseVar {
@ -27,7 +27,7 @@ public class BoolVar extends BaseVar {
} }
public String getType() { public String getType() {
return TextColor.MAGENTA + "bool"; return Color.MAGENTA + "bool";
} }
public boolean parse(String str) { public boolean parse(String str) {

View file

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

View file

@ -7,7 +7,7 @@ import client.gui.element.FieldCallback;
import client.gui.element.Label; import client.gui.element.Label;
import client.gui.element.Slider; import client.gui.element.Slider;
import client.gui.element.FieldAction; import client.gui.element.FieldAction;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
public class ColorVar extends IntVar { public class ColorVar extends IntVar {
@ -19,7 +19,7 @@ public class ColorVar extends IntVar {
} }
public String getType() { 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) { 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.Switch;
import client.gui.element.SwitchCallback; import client.gui.element.SwitchCallback;
import common.util.Identifyable; import common.util.Identifyable;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
public class EnumVar<T extends Enum> extends BaseVar { public class EnumVar<T extends Enum> extends BaseVar {
@ -41,7 +41,7 @@ public class EnumVar<T extends Enum> extends BaseVar {
} }
public String getType() { public String getType() {
return TextColor.CYAN + "enum"; return Color.CYAN + "enum";
} }
public boolean parse(String str) { 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.Slider;
import client.gui.element.SliderFloatCallback; import client.gui.element.SliderFloatCallback;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
public class FloatVar extends BaseVar { public class FloatVar extends BaseVar {
public static interface FloatFunction extends VarFunction { public static interface FloatFunction extends VarFunction {
@ -47,7 +47,7 @@ public class FloatVar extends BaseVar {
} }
public String getType() { public String getType() {
return TextColor.YELLOW + "float"; return Color.YELLOW + "float";
} }
public boolean parse(String str) { 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.Slider;
import client.gui.element.SliderCallback; import client.gui.element.SliderCallback;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
public class IntVar extends BaseVar { public class IntVar extends BaseVar {
@ -36,7 +36,7 @@ public class IntVar extends BaseVar {
} }
public String getType() { public String getType() {
return TextColor.GREEN + "int"; return Color.GREEN + "int";
} }
protected Integer parseValue(String str) { 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.FieldCallback;
import client.gui.element.FieldAction; import client.gui.element.FieldAction;
import common.util.CharValidator; import common.util.CharValidator;
import common.util.TextColor; import common.util.Color;
public class StringVar extends BaseVar { public class StringVar extends BaseVar {
public static interface StringFunction extends VarFunction { public static interface StringFunction extends VarFunction {
@ -33,7 +33,7 @@ public class StringVar extends BaseVar {
} }
public String getType() { public String getType() {
return TextColor.YELLOW + "float"; return Color.YELLOW + "float";
} }
public boolean parse(String str) { public boolean parse(String str) {

View file

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

View file

@ -51,7 +51,7 @@ import common.util.Vec3;
import common.util.HitPosition.ObjectType; import common.util.HitPosition.ObjectType;
import common.util.Pair; import common.util.Pair;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
import common.world.Explosion; import common.world.Explosion;
import common.world.IBlockAccess; import common.world.IBlockAccess;
@ -1102,8 +1102,8 @@ public class Block {
return this.getState(); return this.getState();
} }
public TextColor getItemColor() { public Color getItemColor() {
return this.radiation > 0.0f ? TextColor.GREEN : null; return this.radiation > 0.0f ? Color.GREEN : null;
} }
@Clientside @Clientside

View file

@ -19,7 +19,7 @@ import common.util.Clientside;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.Identifyable; import common.util.Identifyable;
import common.util.TextColor; import common.util.Color;
import common.util.WorldPos; import common.util.WorldPos;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.IWorldAccess; import common.world.IWorldAccess;
@ -47,11 +47,11 @@ public class BlockBed extends Block implements Rotatable {
public static final PropertyEnum<BlockBed.EnumPartType> PART = public static final PropertyEnum<BlockBed.EnumPartType> PART =
PropertyEnum.<BlockBed.EnumPartType>create("part", BlockBed.EnumPartType.class); PropertyEnum.<BlockBed.EnumPartType>create("part", BlockBed.EnumPartType.class);
public static final TextColor[] COLORS = new TextColor[] {TextColor.RED, TextColor.WHITE, TextColor.BLACK, TextColor.VIOLET}; public static final Color[] COLORS = new Color[] {Color.RED, Color.WHITE, Color.BLACK, Color.VIOLET};
private final TextColor color; private final Color color;
public BlockBed(TextColor color) { public BlockBed(Color color) {
super(Material.BURNABLE); super(Material.BURNABLE);
this.color = color; this.color = color;
this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT)); this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT));
@ -73,7 +73,7 @@ public class BlockBed extends Block implements Rotatable {
if(player.isEntityAlive() && Math.abs(player.posX - (double)pos.getX()) <= 3.0D if(player.isEntityAlive() && Math.abs(player.posX - (double)pos.getX()) <= 3.0D
&& Math.abs(player.posY - (double)pos.getY()) <= 2.0D && Math.abs(player.posZ - (double)pos.getZ()) <= 3.0D) { && Math.abs(player.posY - (double)pos.getY()) <= 2.0D && Math.abs(player.posZ - (double)pos.getZ()) <= 3.0D) {
player.setSpawnPoint(new WorldPos(pos, player.worldObj)); player.setSpawnPoint(new WorldPos(pos, player.worldObj));
player.connection.addHotbar(TextColor.DARK_GREEN + "Dein Einstiegspunkt wurde auf %s bei [%s, %s, %s] gesetzt", player.connection.addHotbar(Color.DARK_GREEN + "Dein Einstiegspunkt wurde auf %s bei [%s, %s, %s] gesetzt",
player.worldObj.dimension.getDisplay(), player.getSpawnPoint().getX(), player.worldObj.dimension.getDisplay(), player.getSpawnPoint().getX(),
player.getSpawnPoint().getY(), player.getSpawnPoint().getZ()); player.getSpawnPoint().getY(), player.getSpawnPoint().getZ());
} }

View file

@ -7,7 +7,7 @@ import common.model.Model;
import common.model.Model.ModelProvider; import common.model.Model.ModelProvider;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.TextColor; import common.util.Color;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.IWorldAccess; import common.world.IWorldAccess;
import common.world.State; import common.world.State;
@ -15,15 +15,15 @@ import common.world.World;
public class BlockCarpet extends Block public class BlockCarpet extends Block
{ {
public static final BlockCarpet[] CARPETS = new BlockCarpet[TextColor.values().length]; public static final BlockCarpet[] CARPETS = new BlockCarpet[Color.values().length];
private final TextColor color; private final Color color;
public static BlockCarpet getByColor(TextColor color) { public static BlockCarpet getByColor(Color color) {
return CARPETS[color.ordinal()]; return CARPETS[color.ordinal()];
} }
public BlockCarpet(TextColor color) public BlockCarpet(Color color)
{ {
super(Material.FLEECE); super(Material.FLEECE);
this.color = color; this.color = color;
@ -34,7 +34,7 @@ public class BlockCarpet extends Block
CARPETS[color.ordinal()] = this; CARPETS[color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }

View file

@ -1,22 +1,22 @@
package common.block.artificial; package common.block.artificial;
import common.util.TextColor; import common.util.Color;
public class BlockStainedGlass extends BlockGlass { public class BlockStainedGlass extends BlockGlass {
public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[TextColor.values().length]; public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[Color.values().length];
private final TextColor color; private final Color color;
public static BlockStainedGlass getByColor(TextColor color) { public static BlockStainedGlass getByColor(Color color) {
return GLASS[color.ordinal()]; return GLASS[color.ordinal()];
} }
public BlockStainedGlass(TextColor color) { public BlockStainedGlass(Color color) {
this.color = color; this.color = color;
GLASS[color.ordinal()] = this; GLASS[color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }
} }

View file

@ -3,19 +3,19 @@ package common.block.artificial;
import common.block.Material; import common.block.Material;
import common.item.CheatTab; import common.item.CheatTab;
import common.properties.Property; import common.properties.Property;
import common.util.TextColor; import common.util.Color;
public class BlockStainedGlassPane extends BlockPane public class BlockStainedGlassPane extends BlockPane
{ {
public static final BlockStainedGlassPane[] PANES = new BlockStainedGlassPane[TextColor.values().length]; public static final BlockStainedGlassPane[] PANES = new BlockStainedGlassPane[Color.values().length];
private final TextColor color; private final Color color;
public static BlockStainedGlassPane getByColor(TextColor color) { public static BlockStainedGlassPane getByColor(Color color) {
return PANES[color.ordinal()]; return PANES[color.ordinal()];
} }
public BlockStainedGlassPane(TextColor color) public BlockStainedGlassPane(Color color)
{ {
super(Material.TRANSLUCENT); super(Material.TRANSLUCENT);
this.color = color; this.color = color;
@ -24,7 +24,7 @@ public class BlockStainedGlassPane extends BlockPane
PANES[color.ordinal()] = this; PANES[color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }

View file

@ -5,19 +5,19 @@ import common.block.Material;
import common.item.CheatTab; import common.item.CheatTab;
import common.model.Model; import common.model.Model;
import common.model.Model.ModelProvider; import common.model.Model.ModelProvider;
import common.util.TextColor; import common.util.Color;
import common.world.State; import common.world.State;
public class BlockWool extends Block { public class BlockWool extends Block {
public static final BlockWool[] WOOLS = new BlockWool[TextColor.values().length]; public static final BlockWool[] WOOLS = new BlockWool[Color.values().length];
private final TextColor color; private final Color color;
public static BlockWool getByColor(TextColor color) { public static BlockWool getByColor(Color color) {
return WOOLS[color.ordinal()]; return WOOLS[color.ordinal()];
} }
public BlockWool(TextColor color) { public BlockWool(Color color) {
super(Material.BURNABLE); super(Material.BURNABLE);
this.color = color; this.color = color;
this.setTab(CheatTab.BLOCKS); this.setTab(CheatTab.BLOCKS);
@ -25,7 +25,7 @@ public class BlockWool extends Block {
WOOLS[color.ordinal()] = this; WOOLS[color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }

View file

@ -5,26 +5,26 @@ import common.block.Material;
import common.item.CheatTab; import common.item.CheatTab;
import common.model.Model; import common.model.Model;
import common.model.Model.ModelProvider; import common.model.Model.ModelProvider;
import common.util.TextColor; import common.util.Color;
import common.world.State; import common.world.State;
public class BlockColoredClay extends Block { public class BlockColoredClay extends Block {
public static final BlockColoredClay[] CLAY = new BlockColoredClay[TextColor.values().length]; public static final BlockColoredClay[] CLAY = new BlockColoredClay[Color.values().length];
private final TextColor color; private final Color color;
public static BlockColoredClay getByColor(TextColor color) { public static BlockColoredClay getByColor(Color color) {
return CLAY[color.ordinal()]; return CLAY[color.ordinal()];
} }
public BlockColoredClay(TextColor color) { public BlockColoredClay(Color color) {
super(Material.SOLID); super(Material.SOLID);
this.color = color; this.color = color;
this.setTab(CheatTab.ROCK); this.setTab(CheatTab.ROCK);
CLAY[color.ordinal()] = this; CLAY[color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }

View file

@ -29,7 +29,7 @@ import common.tileentity.TileEntityChest;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.BoundingBox; import common.util.BoundingBox;
import common.util.Facing; import common.util.Facing;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -165,14 +165,14 @@ public class BlockChest extends Block implements ITileEntityProvider, Rotatable
if(chest.getLockCode() != null) { if(chest.getLockCode() != null) {
if(stack.hasDisplayName() && stack.getDisplayName().equals(chest.getLockCode())) { if(stack.hasDisplayName() && stack.getDisplayName().equals(chest.getLockCode())) {
chest.setLockCode(null); chest.setLockCode(null);
playerIn.connection.addHotbar(TextColor.BLUE + "%s wurde entriegelt", chest.getName()); playerIn.connection.addHotbar(Color.BLUE + "%s wurde entriegelt", chest.getName());
playerIn.connection.sendPacket(new SPacketSoundEffect(SoundEvent.DOOR, playerIn.posX, playerIn.posY, playerIn.posZ, 1.0F)); playerIn.connection.sendPacket(new SPacketSoundEffect(SoundEvent.DOOR, playerIn.posX, playerIn.posY, playerIn.posZ, 1.0F));
return true; return true;
} }
} }
else if(stack.hasDisplayName() && !stack.getDisplayName().isEmpty()) { else if(stack.hasDisplayName() && !stack.getDisplayName().isEmpty()) {
chest.setLockCode(stack.getDisplayName()); chest.setLockCode(stack.getDisplayName());
playerIn.connection.addHotbar(TextColor.ORANGE + "%s wurde verriegelt", chest.getName()); playerIn.connection.addHotbar(Color.ORANGE + "%s wurde verriegelt", chest.getName());
playerIn.connection.sendPacket(new SPacketSoundEffect(SoundEvent.DOOR, playerIn.posX, playerIn.posY, playerIn.posZ, 1.0F)); playerIn.connection.sendPacket(new SPacketSoundEffect(SoundEvent.DOOR, playerIn.posX, playerIn.posY, playerIn.posZ, 1.0F));
return true; return true;
} }

View file

@ -9,7 +9,7 @@ import common.item.CheatTab;
import common.model.Model; import common.model.Model;
import common.model.Model.ModelProvider; import common.model.Model.ModelProvider;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.TextColor; import common.util.Color;
import common.world.Explosion; import common.world.Explosion;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -54,7 +54,7 @@ public class BlockNuke extends Block
return provider.getModel("nuke_side").add().nswe().d("nuke_bottom").u("nuke_top"); return provider.getModel("nuke_side").add().nswe().d("nuke_bottom").u("nuke_top");
} }
public TextColor getItemColor() { public Color getItemColor() {
return TextColor.RED; return Color.RED;
} }
} }

View file

@ -20,7 +20,7 @@ import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.Explosion; import common.world.Explosion;
@ -161,8 +161,8 @@ public class BlockTNT extends Block
this.onBroken(world, pos, state.withProperty(BlockTNT.EXPLODE, Boolean.valueOf(true))); this.onBroken(world, pos, state.withProperty(BlockTNT.EXPLODE, Boolean.valueOf(true)));
} }
public TextColor getItemColor() { public Color getItemColor() {
return TextColor.RED; return Color.RED;
} }
public boolean dispense(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) { public boolean dispense(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {

View file

@ -7,18 +7,18 @@ import common.entity.npc.EntityNPC;
import common.entity.projectile.EntityPotion; import common.entity.projectile.EntityPotion;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
public enum Effect { public enum Effect {
SPEED("speed", 2, 180, "Schnelligkeit", "Trank der Schnelligkeit", false, 8171462) { SPEED("speed", 2, 180, "Schnelligkeit", "Trank der Schnelligkeit", false, 8171462) {
public String getTooltip(int amp) { public String getTooltip(int amp) {
return String.format(TextColor.BLUE + "+%d%% Geschwindigkeit", 20 * (amp + 1)); return String.format(Color.BLUE + "+%d%% Geschwindigkeit", 20 * (amp + 1));
} }
}, },
SLOWNESS("slowness", 1, 90, "Langsamkeit", "Trank der Langsamkeit", true, 5926017) { SLOWNESS("slowness", 1, 90, "Langsamkeit", "Trank der Langsamkeit", true, 5926017) {
public String getTooltip(int amp) { public String getTooltip(int amp) {
return String.format(TextColor.RED + "-%d%% Geschwindigkeit", 15 * (amp + 1)); return String.format(Color.RED + "-%d%% Geschwindigkeit", 15 * (amp + 1));
} }
}, },
HASTE("haste", "Eile", "Trank der Eile", false, 14270531) { HASTE("haste", "Eile", "Trank der Eile", false, 14270531) {
@ -29,7 +29,7 @@ public enum Effect {
FATIGUE("mining_fatigue", "Abbaulähmung", "Trank der Trägheit", true, 4866583), FATIGUE("mining_fatigue", "Abbaulähmung", "Trank der Trägheit", true, 4866583),
STRENGTH("strength", 2, 180, "Stärke", "Trank der Stärke", false, 9643043) { STRENGTH("strength", 2, 180, "Stärke", "Trank der Stärke", false, 9643043) {
public String getTooltip(int amp) { public String getTooltip(int amp) {
return String.format(TextColor.BLUE + "+%d%% Angriffsschaden", 50 * (amp + 1)); return String.format(Color.BLUE + "+%d%% Angriffsschaden", 50 * (amp + 1));
} }
}, },
HEAL("health", 2, "Direktheilung", "Trank der Heilung", false, 16262179) { HEAL("health", 2, "Direktheilung", "Trank der Heilung", false, 16262179) {
@ -110,7 +110,7 @@ public enum Effect {
STABILITY("stability", 1, 180, "Stabilität", "Trank der Standfestigkeit", false, 5797459), STABILITY("stability", 1, 180, "Stabilität", "Trank der Standfestigkeit", false, 5797459),
WEAKNESS("weakness", 1, 90, "Schwäche", "Trank der Schwäche", true, 4738376) { WEAKNESS("weakness", 1, 90, "Schwäche", "Trank der Schwäche", true, 4738376) {
public String getTooltip(int amp) { public String getTooltip(int amp) {
return String.format(TextColor.RED + "-%d%% Angriffsschaden", 20 * (amp + 1)); return String.format(Color.RED + "-%d%% Angriffsschaden", 20 * (amp + 1));
} }
}, },
POISON("poison", 2, 45, "Vergiftung", "Trank der Vergiftung", true, 5149489) { POISON("poison", 2, 45, "Vergiftung", "Trank der Vergiftung", true, 5149489) {

View file

@ -2,44 +2,44 @@ package common.entity;
import common.entity.projectile.EntityProjectile; import common.entity.projectile.EntityProjectile;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.util.TextColor; import common.util.Color;
import common.world.Explosion; import common.world.Explosion;
public class DamageSource public class DamageSource
{ {
public static final DamageSource inFire = public static final DamageSource inFire =
(new DamageSource(TextColor.ORANGE, "%s ging in Flammen auf", "%s lief ins Feuer, während er mit %s kämpfte", "%s ins Feuer gelaufen")).setFireDamage(); (new DamageSource(Color.ORANGE, "%s ging in Flammen auf", "%s lief ins Feuer, während er mit %s kämpfte", "%s ins Feuer gelaufen")).setFireDamage();
public static final DamageSource onFire = public static final DamageSource onFire =
(new DamageSource(TextColor.ORANGE, "%s wurde zu heiß und verbrannte", "%s wurde während des Kampfes mit %s geröstet", "%s geröstet")).setDamageBypassesArmor().setFireDamage(); (new DamageSource(Color.ORANGE, "%s wurde zu heiß und verbrannte", "%s wurde während des Kampfes mit %s geröstet", "%s geröstet")).setDamageBypassesArmor().setFireDamage();
public static final DamageSource hotLiquid = public static final DamageSource hotLiquid =
(new DamageSource(TextColor.ORANGE, "%s versuchte in einer unangenehm brennenden Flüssigkeit zu schwimmen", "%s fiel beim Versuch %s zu entkommen in eine unangenehm brennende Flüssigkeit", "%s in unangenehm brennender Flüssigkeit gelandet")).setFireDamage(); (new DamageSource(Color.ORANGE, "%s versuchte in einer unangenehm brennenden Flüssigkeit zu schwimmen", "%s fiel beim Versuch %s zu entkommen in eine unangenehm brennende Flüssigkeit", "%s in unangenehm brennender Flüssigkeit gelandet")).setFireDamage();
public static final DamageSource molten = public static final DamageSource molten =
(new DamageSource(TextColor.ORANGE, "%s versuchte dem Magmaregen zu trotzen", "%s geriet beim Versuch %s zu entkommen in Magmaregen", "%s in Magmaregen geraten")).setFireDamage(); (new DamageSource(Color.ORANGE, "%s versuchte dem Magmaregen zu trotzen", "%s geriet beim Versuch %s zu entkommen in Magmaregen", "%s in Magmaregen geraten")).setFireDamage();
public static final DamageSource inWall = public static final DamageSource inWall =
(new DamageSource(TextColor.GRAY, "%s wurde lebendig begraben")).setDamageBypassesArmor(); (new DamageSource(Color.GRAY, "%s wurde lebendig begraben")).setDamageBypassesArmor();
public static final DamageSource dry = public static final DamageSource dry =
(new DamageSource(TextColor.GRAY, "%s ist vertrocknet", "%s ist beim Versuch %s zu entkommen vertrocknet", "%s vertrocknet")).setDamageBypassesArmor(); (new DamageSource(Color.GRAY, "%s ist vertrocknet", "%s ist beim Versuch %s zu entkommen vertrocknet", "%s vertrocknet")).setDamageBypassesArmor();
public static final DamageSource cactus = public static final DamageSource cactus =
new DamageSource(TextColor.ORK, "%s wurde zu Tode gestochen", "%s rannte beim Versuch %s zu entkommen in einen Kaktus", "%s in Kaktus gerannt"); new DamageSource(Color.ORK, "%s wurde zu Tode gestochen", "%s rannte beim Versuch %s zu entkommen in einen Kaktus", "%s in Kaktus gerannt");
public static final DamageSource fall = public static final DamageSource fall =
(new DamageSource(TextColor.NEON, "%s fiel der Schwerkraft zum Opfer")).setDamageBypassesArmor(); (new DamageSource(Color.NEON, "%s fiel der Schwerkraft zum Opfer")).setDamageBypassesArmor();
public static final DamageSource outOfWorld = public static final DamageSource outOfWorld =
(new DamageSource(TextColor.DARK_GRAY, "%s fiel aus der Welt")).setDamageBypassesArmor(); (new DamageSource(Color.DARK_GRAY, "%s fiel aus der Welt")).setDamageBypassesArmor();
public static final DamageSource generic = public static final DamageSource generic =
(new DamageSource(TextColor.LIGHT_GRAY, "%s starb")).setDamageBypassesArmor(); (new DamageSource(Color.LIGHT_GRAY, "%s starb")).setDamageBypassesArmor();
public static final DamageSource magic = public static final DamageSource magic =
(new DamageSource(TextColor.DARK_MAGENTA, "%s wurde durch Magie getötet")).setDamageBypassesArmor().setMagicDamage(); (new DamageSource(Color.DARK_MAGENTA, "%s wurde durch Magie getötet")).setDamageBypassesArmor().setMagicDamage();
public static final DamageSource anvil = public static final DamageSource anvil =
new DamageSource(TextColor.DARK_RED, "%s wurde von einem fallenden Amboss zerquetscht"); new DamageSource(Color.DARK_RED, "%s wurde von einem fallenden Amboss zerquetscht");
public static final DamageSource fallingBlock = public static final DamageSource fallingBlock =
new DamageSource(TextColor.GRAY, "%s wurde von einem fallenden Block zerquetscht"); new DamageSource(Color.GRAY, "%s wurde von einem fallenden Block zerquetscht");
public static final DamageSource radiation = public static final DamageSource radiation =
(new DamageSource(TextColor.GREEN, "%s hat seine Halbwertszeit nicht rechtzeitig erreicht")).setDamageBypassesArmor(); (new DamageSource(Color.GREEN, "%s hat seine Halbwertszeit nicht rechtzeitig erreicht")).setDamageBypassesArmor();
protected final String display; protected final String display;
protected final String displayExtra; protected final String displayExtra;
protected final String displayKill; protected final String displayKill;
protected final TextColor color; protected final Color color;
private boolean isUnblockable; private boolean isUnblockable;
private boolean fireDamage; private boolean fireDamage;
@ -49,57 +49,57 @@ public class DamageSource
public static DamageSource causeMobDamage(EntityLiving mob) public static DamageSource causeMobDamage(EntityLiving mob)
{ {
return new EntityDamageSource(TextColor.CRIMSON, "%s wurde von %s erschlagen", "%s wurde von %s mit %s erschlagen", return new EntityDamageSource(Color.CRIMSON, "%s wurde von %s erschlagen", "%s wurde von %s mit %s erschlagen",
"%s erschlagen", "%s mit %s erschlagen", mob); "%s erschlagen", "%s mit %s erschlagen", mob);
} }
public static DamageSource causeLightningDamage(EntityLiving mob) public static DamageSource causeLightningDamage(EntityLiving mob)
{ {
return mob == null ? new DamageSource(TextColor.YELLOW, "%s wurde vom Blitz getroffen und gegrillt") : return mob == null ? new DamageSource(Color.YELLOW, "%s wurde vom Blitz getroffen und gegrillt") :
new EntityDamageSource(TextColor.YELLOW, "%s wurde von %s gegrillt", "%s wurde von %s mit %s gegrillt", new EntityDamageSource(Color.YELLOW, "%s wurde von %s gegrillt", "%s wurde von %s mit %s gegrillt",
"%s gegrillt", "%s mit %s gegrillt", mob); "%s gegrillt", "%s mit %s gegrillt", mob);
} }
public static DamageSource causeExterminatusDamage(EntityLiving mob) public static DamageSource causeExterminatusDamage(EntityLiving mob)
{ {
return mob == null ? new DamageSource(TextColor.DARK_RED, "%s wurde vernichtet") : return mob == null ? new DamageSource(Color.DARK_RED, "%s wurde vernichtet") :
new EntityDamageSource(TextColor.DARK_RED, "%s wurde von %s vernichtet", "%s wurde von %s mit %s vernichtet", new EntityDamageSource(Color.DARK_RED, "%s wurde von %s vernichtet", "%s wurde von %s mit %s vernichtet",
"%s vernichtet", "%s mit %s vernichtet", mob); "%s vernichtet", "%s mit %s vernichtet", mob);
} }
public static DamageSource causeShotDamage(Entity projectile, Entity shooter) public static DamageSource causeShotDamage(Entity projectile, Entity shooter)
{ {
return (new EntityDamageSourceIndirect(TextColor.RED, "%s wurde von %s erschossen", "%s wurde von %s mit %s erschossen", "%s erschossen", "%s mit %s erschossen", projectile, shooter)).setProjectile(); return (new EntityDamageSourceIndirect(Color.RED, "%s wurde von %s erschossen", "%s wurde von %s mit %s erschossen", "%s erschossen", "%s mit %s erschossen", projectile, shooter)).setProjectile();
} }
public static DamageSource causeFireballDamage(EntityProjectile fireball, Entity shooter) public static DamageSource causeFireballDamage(EntityProjectile fireball, Entity shooter)
{ {
return shooter == null ? (new EntityDamageSourceIndirect(TextColor.YELLOW, "%s wurde von %s flambiert", fireball)).setFireDamage().setProjectile() : (new EntityDamageSourceIndirect(TextColor.YELLOW, "%s wurde von %s flambiert", "%s wurde von %s mit %s flambiert", "%s flambiert", "%s mit %s flambiert", fireball, shooter)).setFireDamage().setProjectile(); return shooter == null ? (new EntityDamageSourceIndirect(Color.YELLOW, "%s wurde von %s flambiert", fireball)).setFireDamage().setProjectile() : (new EntityDamageSourceIndirect(Color.YELLOW, "%s wurde von %s flambiert", "%s wurde von %s mit %s flambiert", "%s flambiert", "%s mit %s flambiert", fireball, shooter)).setFireDamage().setProjectile();
} }
public static DamageSource causeThrownDamage(Entity source, Entity thrower) public static DamageSource causeThrownDamage(Entity source, Entity thrower)
{ {
return (new EntityDamageSourceIndirect(TextColor.DARK_GREEN, "%s wurde von %s zu Tode geprügelt", "%s wurde von %s mit %s zu Tode geprügelt", "%s zu Tode geprügelt", "%s mit %s zu Tode geprügelt", source, thrower)).setProjectile(); return (new EntityDamageSourceIndirect(Color.DARK_GREEN, "%s wurde von %s zu Tode geprügelt", "%s wurde von %s mit %s zu Tode geprügelt", "%s zu Tode geprügelt", "%s mit %s zu Tode geprügelt", source, thrower)).setProjectile();
} }
public static DamageSource causeTeleFragDamage(Entity source, Entity replacer) public static DamageSource causeTeleFragDamage(Entity source, Entity replacer)
{ {
return (new EntityDamageSourceIndirect(TextColor.MAGENTA, "%s wurde von %s verdrängt", "%s wurde von %s mit %s verdrängt", "%s verdrängt", "%s mit %s verdrängt", source, replacer)).setDamageBypassesArmor(); return (new EntityDamageSourceIndirect(Color.MAGENTA, "%s wurde von %s verdrängt", "%s wurde von %s mit %s verdrängt", "%s verdrängt", "%s mit %s verdrängt", source, replacer)).setDamageBypassesArmor();
} }
public static DamageSource causeIndirectMagicDamage(Entity source, Entity mage) public static DamageSource causeIndirectMagicDamage(Entity source, Entity mage)
{ {
return (new EntityDamageSourceIndirect(TextColor.DARK_MAGENTA, "%s wurde von %s mit Magie getötet", "%s wurde von %s mit %s getötet", "%s mit Magie getötet", "%s mit %s getötet", source, mage)).setDamageBypassesArmor().setMagicDamage(); return (new EntityDamageSourceIndirect(Color.DARK_MAGENTA, "%s wurde von %s mit Magie getötet", "%s wurde von %s mit %s getötet", "%s mit Magie getötet", "%s mit %s getötet", source, mage)).setDamageBypassesArmor().setMagicDamage();
} }
public static DamageSource causeThornsDamage(Entity source) public static DamageSource causeThornsDamage(Entity source)
{ {
return (new EntityDamageSource(TextColor.ORK, "%s wurde beim Versuch %s zu verletzen getötet", "%s durch Dornen getötet", source)).setIsThornsDamage().setMagicDamage(); return (new EntityDamageSource(Color.ORK, "%s wurde beim Versuch %s zu verletzen getötet", "%s durch Dornen getötet", source)).setIsThornsDamage().setMagicDamage();
} }
public static DamageSource causeExplosionDamage(Explosion explosion) public static DamageSource causeExplosionDamage(Explosion explosion)
{ {
return explosion != null && explosion.getExplosivePlacedBy() != null ? (new EntityDamageSource(TextColor.YELLOW, "%s wurde durch %s in die Luft gesprengt", "%s in die Luft gesprengt", explosion.getExplosivePlacedBy())).setExplosion() : (new DamageSource(TextColor.YELLOW, "%s wurde in die Luft gesprengt")).setExplosion(); return explosion != null && explosion.getExplosivePlacedBy() != null ? (new EntityDamageSource(Color.YELLOW, "%s wurde durch %s in die Luft gesprengt", "%s in die Luft gesprengt", explosion.getExplosivePlacedBy())).setExplosion() : (new DamageSource(Color.YELLOW, "%s wurde in die Luft gesprengt")).setExplosion();
} }
/** /**
@ -135,7 +135,7 @@ public class DamageSource
return this.isUnblockable; return this.isUnblockable;
} }
protected DamageSource(TextColor color, String display, String extra, String kill) protected DamageSource(Color color, String display, String extra, String kill)
{ {
this.color = color; this.color = color;
this.display = this.color + display; this.display = this.color + display;
@ -143,7 +143,7 @@ public class DamageSource
this.displayKill = this.color + "* " + kill; this.displayKill = this.color + "* " + kill;
} }
protected DamageSource(TextColor color, String display) protected DamageSource(Color color, String display)
{ {
this(color, display, display, ""); this(color, display, display, "");
} }

View file

@ -37,7 +37,7 @@ import common.util.ParticleType;
import common.util.PortalType; import common.util.PortalType;
import common.util.Position; import common.util.Position;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.vars.Vars; import common.vars.Vars;
import common.world.Explosion; import common.world.Explosion;
@ -2410,12 +2410,12 @@ public abstract class Entity
public final String getCommandName() public final String getCommandName()
{ {
return TextColor.stripCodes(this.getName()); return Color.stripCodes(this.getName());
} }
public final String getColoredName(TextColor reset) public final String getColoredName(Color reset)
{ {
return TextColor.DARK_GRAY + "[" + this.getName() + TextColor.DARK_GRAY + "]" + reset; return Color.DARK_GRAY + "[" + this.getName() + Color.DARK_GRAY + "]" + reset;
} }
// public Text formatComponent(Text comp) { // public Text formatComponent(Text comp) {

View file

@ -2,7 +2,7 @@ package common.entity;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.TextColor; import common.util.Color;
public class EntityDamageSource extends DamageSource public class EntityDamageSource extends DamageSource
{ {
@ -14,14 +14,14 @@ public class EntityDamageSource extends DamageSource
*/ */
private boolean isThornsDamage = false; private boolean isThornsDamage = false;
public EntityDamageSource(TextColor color, String display, String item, String kill, String killItem, Entity damageSourceEntityIn) public EntityDamageSource(Color color, String display, String item, String kill, String killItem, Entity damageSourceEntityIn)
{ {
super(color, display, item, kill); super(color, display, item, kill);
this.damageSourceEntity = damageSourceEntityIn; this.damageSourceEntity = damageSourceEntityIn;
this.displayKillItem = killItem; this.displayKillItem = killItem;
} }
public EntityDamageSource(TextColor color, String display, String kill, Entity damageSourceEntityIn) public EntityDamageSource(Color color, String display, String kill, Entity damageSourceEntityIn)
{ {
this(color, display, display, kill, kill, damageSourceEntityIn); this(color, display, display, kill, kill, damageSourceEntityIn);
} }

View file

@ -2,19 +2,19 @@ package common.entity;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.TextColor; import common.util.Color;
public class EntityDamageSourceIndirect extends EntityDamageSource public class EntityDamageSourceIndirect extends EntityDamageSource
{ {
private Entity indirectEntity; private Entity indirectEntity;
public EntityDamageSourceIndirect(TextColor color, String display, String item, String kill, String killItem, Entity source, Entity indirectEntityIn) public EntityDamageSourceIndirect(Color color, String display, String item, String kill, String killItem, Entity source, Entity indirectEntityIn)
{ {
super(color, display, item, kill, killItem, source); super(color, display, item, kill, killItem, source);
this.indirectEntity = indirectEntityIn; this.indirectEntity = indirectEntityIn;
} }
public EntityDamageSourceIndirect(TextColor color, String display, Entity source) public EntityDamageSourceIndirect(Color color, String display, Entity source)
{ {
this(color, display, display, "", "", source, source); this(color, display, display, "", "", source, source);
} }

View file

@ -29,7 +29,7 @@ import common.rng.Random;
import common.tags.TagObject; import common.tags.TagObject;
import common.util.Clientside; import common.util.Clientside;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.TextColor; import common.util.Color;
import common.world.World; import common.world.World;
public class EntitySheep extends EntityAnimal public class EntitySheep extends EntityAnimal
@ -100,7 +100,7 @@ public class EntitySheep extends EntityAnimal
{ {
super.entityInit(); super.entityInit();
this.dataWatcher.addObject(16, (byte)0); this.dataWatcher.addObject(16, (byte)0);
this.dataWatcher.addObject(17, (byte)(TextColor.WHITE.ordinal() & 255)); this.dataWatcher.addObject(17, (byte)(Color.WHITE.ordinal() & 255));
} }
/** /**
@ -209,7 +209,7 @@ public class EntitySheep extends EntityAnimal
{ {
super.readEntity(tagCompund); super.readEntity(tagCompund);
this.setSheared(tagCompund.getBool("Sheared")); this.setSheared(tagCompund.getBool("Sheared"));
this.setFleeceColor(TextColor.byName(tagCompund.getString("Color"))); this.setFleeceColor(Color.byName(tagCompund.getString("Color")));
} }
/** /**
@ -244,15 +244,15 @@ public class EntitySheep extends EntityAnimal
/** /**
* Gets the wool color of this sheep. * Gets the wool color of this sheep.
*/ */
public TextColor getFleeceColor() public Color getFleeceColor()
{ {
return TextColor.values()[(this.dataWatcher.getWatchableObjectByte(17) & 255) % TextColor.values().length]; return Color.values()[(this.dataWatcher.getWatchableObjectByte(17) & 255) % Color.values().length];
} }
/** /**
* Sets the wool color of this sheep * Sets the wool color of this sheep
*/ */
public void setFleeceColor(TextColor color) public void setFleeceColor(Color color)
{ {
this.dataWatcher.updateObject(17, (byte)(color.ordinal() & 255)); this.dataWatcher.updateObject(17, (byte)(color.ordinal() & 255));
} }
@ -273,23 +273,23 @@ public class EntitySheep extends EntityAnimal
this.dataWatcher.updateObject(16, (byte)(sheared ? 1 : 0)); this.dataWatcher.updateObject(16, (byte)(sheared ? 1 : 0));
} }
private static final TextColor[] RARE_COLORS = { private static final Color[] RARE_COLORS = {
TextColor.BLUE, TextColor.CYAN, TextColor.DARK_GREEN, TextColor.LIGHT_BLUE, TextColor.GREEN, Color.BLUE, Color.CYAN, Color.DARK_GREEN, Color.LIGHT_BLUE, Color.GREEN,
TextColor.MAGENTA, TextColor.ORANGE, TextColor.DARK_VIOLET, TextColor.VIOLET, TextColor.RED Color.MAGENTA, Color.ORANGE, Color.DARK_VIOLET, Color.VIOLET, Color.RED
}; };
public static TextColor getRandomSheepColor(Random random, float temp) public static Color getRandomSheepColor(Random random, float temp)
{ {
if(temp <= 0.0f) if(temp <= 0.0f)
return TextColor.WHITE; return Color.WHITE;
int i = random.zrange(140); int i = random.zrange(140);
return i < 20 ? TextColor.BLACK : return i < 20 ? Color.BLACK :
(i < 30 ? TextColor.GRAY : (i < 30 ? Color.GRAY :
(i < 40 ? TextColor.LIGHT_GRAY : (i < 40 ? Color.LIGHT_GRAY :
(i < 70 ? TextColor.BROWN : (i < 70 ? Color.BROWN :
(i < 120 ? TextColor.WHITE : (i < 120 ? Color.WHITE :
(i < 130 ? (random.chance(10) ? RARE_COLORS[i - 120] : TextColor.WHITE) : (i < 130 ? (random.chance(10) ? RARE_COLORS[i - 120] : Color.WHITE) :
(random.chance(500) ? TextColor.YELLOW : TextColor.WHITE) (random.chance(500) ? Color.YELLOW : Color.WHITE)
))))); )))));
} }
@ -322,14 +322,14 @@ public class EntitySheep extends EntityAnimal
return livingdata; return livingdata;
} }
private TextColor getDyeColorMixFromParents(EntityAnimal father, EntityAnimal mother) private Color getDyeColorMixFromParents(EntityAnimal father, EntityAnimal mother)
{ {
TextColor i = ((EntitySheep)father).getFleeceColor(); Color i = ((EntitySheep)father).getFleeceColor();
TextColor j = ((EntitySheep)mother).getFleeceColor(); Color j = ((EntitySheep)mother).getFleeceColor();
this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(ItemDye.getByColor(i))); this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(ItemDye.getByColor(i)));
this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(ItemDye.getByColor(j))); this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(ItemDye.getByColor(j)));
ItemStack itemstack = CraftingRegistry.getMatching(this.inventoryCrafting); ItemStack itemstack = CraftingRegistry.getMatching(this.inventoryCrafting);
TextColor k; Color k;
if (itemstack != null && itemstack.getItem() instanceof ItemDye dye) if (itemstack != null && itemstack.getItem() instanceof ItemDye dye)
{ {

View file

@ -33,7 +33,7 @@ import common.tags.TagObject;
import common.util.Clientside; import common.util.Clientside;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
import common.world.World; import common.world.World;
@ -118,7 +118,7 @@ public class EntityWolf extends EntityTameable
super.entityInit(); super.entityInit();
this.dataWatcher.addObject(18, this.getHealth()); this.dataWatcher.addObject(18, this.getHealth());
this.dataWatcher.addObject(19, (byte)0); this.dataWatcher.addObject(19, (byte)0);
this.dataWatcher.addObject(20, (byte)(TextColor.RED.ordinal() & 255)); this.dataWatcher.addObject(20, (byte)(Color.RED.ordinal() & 255));
} }
// protected void playStepSound(BlockPos pos, Block blockIn) // protected void playStepSound(BlockPos pos, Block blockIn)
@ -137,7 +137,7 @@ public class EntityWolf extends EntityTameable
{ {
super.readEntity(tagCompund); super.readEntity(tagCompund);
this.setAngry(tagCompund.getBool("Angry")); this.setAngry(tagCompund.getBool("Angry"));
this.setCollarColor(TextColor.byName(tagCompund.getString("CollarColor"))); this.setCollarColor(Color.byName(tagCompund.getString("CollarColor")));
} }
/** /**
@ -373,7 +373,7 @@ public class EntityWolf extends EntityTameable
} }
else if (itemstack.getItem() instanceof ItemDye dye) else if (itemstack.getItem() instanceof ItemDye dye)
{ {
TextColor enumdyecolor = dye.getColor(); Color enumdyecolor = dye.getColor();
if (enumdyecolor != this.getCollarColor()) if (enumdyecolor != this.getCollarColor())
{ {
@ -492,12 +492,12 @@ public class EntityWolf extends EntityTameable
} }
} }
public TextColor getCollarColor() public Color getCollarColor()
{ {
return TextColor.values()[(this.dataWatcher.getWatchableObjectByte(20) & 255) % TextColor.values().length]; return Color.values()[(this.dataWatcher.getWatchableObjectByte(20) & 255) % Color.values().length];
} }
public void setCollarColor(TextColor collarcolor) public void setCollarColor(Color collarcolor)
{ {
this.dataWatcher.updateObject(20, (byte)(collarcolor.ordinal() & 255)); this.dataWatcher.updateObject(20, (byte)(collarcolor.ordinal() & 255));
} }

View file

@ -18,7 +18,7 @@ import common.util.BlockPos;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.PortalType; import common.util.PortalType;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
import common.world.World; import common.world.World;
import common.world.AWorldServer; import common.world.AWorldServer;
@ -599,7 +599,7 @@ public class EntityItem extends Entity
ItemStack stack = this.getEntityItem(); ItemStack stack = this.getEntityItem();
if(!stack.isStacked()) if(!stack.isStacked())
return null; return null;
return TextColor.DARK_GREEN + "" + stack.getSize(); return Color.DARK_GREEN + "" + stack.getSize();
} }
public EntityType getType() { public EntityType getType() {

View file

@ -14,7 +14,7 @@ import common.util.Clientside;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.PortalType; import common.util.PortalType;
import common.util.TextColor; import common.util.Color;
import common.vars.Vars; import common.vars.Vars;
import common.world.World; import common.world.World;
@ -396,7 +396,7 @@ public class EntityXp extends Entity implements IObjectData
// if(!this.hasCustomName()) { // if(!this.hasCustomName()) {
// return super.getDisplayName(); // return super.getDisplayName();
// } // }
return this.hasCustomName() ? TextColor.GREEN + this.getCustomNameTag() : null; return this.hasCustomName() ? Color.GREEN + this.getCustomNameTag() : null;
} }
public EntityType getType() { public EntityType getType() {

View file

@ -3,18 +3,18 @@ package common.entity.npc;
import java.util.Map; import java.util.Map;
import common.collect.Maps; import common.collect.Maps;
import common.util.TextColor; import common.util.Color;
public enum Alignment { public enum Alignment {
LAWFUL_GOOD("lgood", "Rechtsch. gut", 1, 1, TextColor.NEON), LAWFUL_GOOD("lgood", "Rechtsch. gut", 1, 1, Color.NEON),
GOOD("good", "Gut", 0, 1, TextColor.BLUE), GOOD("good", "Gut", 0, 1, Color.BLUE),
CHAOTIC_GOOD("cgood", "Chaotisch gut", -1, 1, TextColor.CYAN), CHAOTIC_GOOD("cgood", "Chaotisch gut", -1, 1, Color.CYAN),
LAWFUL("lawful", "Rechtschaffen", 1, 0, TextColor.WHITE), LAWFUL("lawful", "Rechtschaffen", 1, 0, Color.WHITE),
NEUTRAL("neutral", "Neutral", 0, 0, TextColor.LIGHT_GRAY), NEUTRAL("neutral", "Neutral", 0, 0, Color.LIGHT_GRAY),
CHAOTIC("chaotic", "Chaotisch", -1, 0, TextColor.GRAY), CHAOTIC("chaotic", "Chaotisch", -1, 0, Color.GRAY),
LAWFUL_EVIL("levil", "Rechtsch. böse", 1, -1, TextColor.ORANGE), LAWFUL_EVIL("levil", "Rechtsch. böse", 1, -1, Color.ORANGE),
EVIL("evil", "Böse", 0, -1, TextColor.RED), EVIL("evil", "Böse", 0, -1, Color.RED),
CHAOTIC_EVIL("cevil", "Chaotisch böse", -1, -1, TextColor.DARK_RED); CHAOTIC_EVIL("cevil", "Chaotisch böse", -1, -1, Color.DARK_RED);
private static final Map<String, Alignment> LOOKUP = Maps.newHashMap(); private static final Map<String, Alignment> LOOKUP = Maps.newHashMap();
@ -22,12 +22,12 @@ public enum Alignment {
public final boolean chaotic; public final boolean chaotic;
public final boolean good; public final boolean good;
public final boolean evil; public final boolean evil;
public final TextColor color; public final Color color;
public final String name; public final String name;
public final String prefix; public final String prefix;
public final String display; public final String display;
private Alignment(String name, String display, int temper, int morale, TextColor color) { private Alignment(String name, String display, int temper, int morale, Color color) {
this.lawful = temper == 1; this.lawful = temper == 1;
this.chaotic = temper == -1; this.chaotic = temper == -1;
this.good = morale == 1; this.good = morale == 1;
@ -35,10 +35,10 @@ public enum Alignment {
this.color = color; this.color = color;
this.name = name; this.name = name;
this.display = display; this.display = display;
this.prefix = TextColor.GRAY + "[" + (temper == 0 && morale == 0 ? TextColor.LIGHT_GRAY + "~" : "") + this.prefix = Color.GRAY + "[" + (temper == 0 && morale == 0 ? Color.LIGHT_GRAY + "~" : "") +
(this.good ? TextColor.BLUE + "*" : (this.evil ? TextColor.RED + "!" : "")) + (this.good ? Color.BLUE + "*" : (this.evil ? Color.RED + "!" : "")) +
(this.lawful ? TextColor.GREEN + "+" : (this.chaotic ? TextColor.DARK_MAGENTA + "-" : "")) + (this.lawful ? Color.GREEN + "+" : (this.chaotic ? Color.DARK_MAGENTA + "-" : "")) +
TextColor.GRAY + "]"; Color.GRAY + "]";
} }
public static Alignment getByName(String name) { public static Alignment getByName(String name) {

View file

@ -92,7 +92,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.PortalType; import common.util.PortalType;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.util.WorldPos; import common.util.WorldPos;
import common.vars.Vars; import common.vars.Vars;
@ -1139,7 +1139,7 @@ public abstract class EntityNPC extends EntityLiving
} }
public String formatStats() { public String formatStats() {
return super.formatStats() + (this.getManaPoints() == 0 ? "" : TextColor.GRAY + " [" + TextColor.MIDNIGHT + this.getManaPoints() + TextColor.GRAY + "]"); return super.formatStats() + (this.getManaPoints() == 0 ? "" : Color.GRAY + " [" + Color.MIDNIGHT + this.getManaPoints() + Color.GRAY + "]");
} }
public MerchantRecipeList getTrades(EntityNPC player) { public MerchantRecipeList getTrades(EntityNPC player) {

View file

@ -57,7 +57,7 @@ import common.util.Clientside;
import common.util.ExtMath; import common.util.ExtMath;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.vars.Vars; import common.vars.Vars;
import common.world.State; import common.world.State;
@ -2243,15 +2243,15 @@ public abstract class EntityLiving extends Entity
this.effectsDirty = true; this.effectsDirty = true;
} }
public static TextColor getHealthColor(int health, int max) { public static Color getHealthColor(int health, int max) {
float perc = (float)health / (float)max; float perc = (float)health / (float)max;
return /* health <= 1.0f ? ChatFormat.DARK_RED : ( */ perc >= 1.0f ? TextColor.DARK_GREEN : (perc >= 0.75f ? TextColor.GREEN : return /* health <= 1.0f ? ChatFormat.DARK_RED : ( */ perc >= 1.0f ? Color.DARK_GREEN : (perc >= 0.75f ? Color.GREEN :
(perc >= 0.5f ? TextColor.YELLOW : (perc >= 0.25f ? TextColor.ORANGE : (perc >= 0.1f ? TextColor.RED : TextColor.DARK_RED)))); (perc >= 0.5f ? Color.YELLOW : (perc >= 0.25f ? Color.ORANGE : (perc >= 0.1f ? Color.RED : Color.DARK_RED))));
} }
public static TextColor getMaxHpColor(int max) { public static Color getMaxHpColor(int max) {
return max >= 2000 ? TextColor.BLACK : (max >= 500 ? TextColor.DARK_MAGENTA : (max >= 120 ? TextColor.MAGENTA : return max >= 2000 ? Color.BLACK : (max >= 500 ? Color.DARK_MAGENTA : (max >= 120 ? Color.MAGENTA :
(max >= 40 ? TextColor.CYAN : (max >= 15 ? TextColor.NEON : (max >= 5 ? TextColor.BLUE : TextColor.LIGHT_GRAY))))); (max >= 40 ? Color.CYAN : (max >= 15 ? Color.NEON : (max >= 5 ? Color.BLUE : Color.LIGHT_GRAY)))));
} }
public int getEnergy(Energy type) { public int getEnergy(Energy type) {
@ -2272,7 +2272,7 @@ public abstract class EntityLiving extends Entity
public String formatStats() { public String formatStats() {
return String.format(this.getAlignment().prefix + " " + getHealthColor(this.getHealth(), this.getMaxHealth()) + "%d" + return String.format(this.getAlignment().prefix + " " + getHealthColor(this.getHealth(), this.getMaxHealth()) + "%d" +
TextColor.GRAY + "/" + getMaxHpColor(this.getMaxHealth()) + "%d", Color.GRAY + "/" + getMaxHpColor(this.getMaxHealth()) + "%d",
this.getHealth(), this.getMaxHealth()); this.getHealth(), this.getMaxHealth());
} }
@ -2327,7 +2327,7 @@ public abstract class EntityLiving extends Entity
String kill; String kill;
IPlayer receiver = null; IPlayer receiver = null;
if(this.combat.size() == 0) { if(this.combat.size() == 0) {
msg = kill = natural ? String.format("%s starb", this.getColoredName(TextColor.LIGHT_GRAY)) : null; msg = kill = natural ? String.format("%s starb", this.getColoredName(Color.LIGHT_GRAY)) : null;
} }
else { else {
CombatEntry strong = null; CombatEntry strong = null;
@ -2366,16 +2366,16 @@ public abstract class EntityLiving extends Entity
ItemStack fallItem = fallEnt instanceof EntityLiving ? ((EntityLiving)fallEnt).getHeldItem() : null; ItemStack fallItem = fallEnt instanceof EntityLiving ? ((EntityLiving)fallEnt).getHeldItem() : null;
receiver = fallEnt.isPlayer() ? ((EntityNPC)fallEnt).connection : null; receiver = fallEnt.isPlayer() ? ((EntityNPC)fallEnt).connection : null;
if(fallItem != null) { // && fallItem.hasDisplayName()) { if(fallItem != null) { // && fallItem.hasDisplayName()) {
msg = String.format("%s wurde von %s mit %s zum Fallen verdammt", this.getColoredName(TextColor.CYAN), msg = String.format("%s wurde von %s mit %s zum Fallen verdammt", this.getColoredName(Color.CYAN),
fallEnt.getColoredName(TextColor.CYAN), fallItem.getColoredName(TextColor.CYAN)); fallEnt.getColoredName(Color.CYAN), fallItem.getColoredName(Color.CYAN));
kill = String.format(TextColor.CYAN + "* %s mit %s zum Fallen verdammt", kill = String.format(Color.CYAN + "* %s mit %s zum Fallen verdammt",
this.getColoredName(TextColor.CYAN), fallItem.getColoredName(TextColor.CYAN)); this.getColoredName(Color.CYAN), fallItem.getColoredName(Color.CYAN));
} }
else { else {
msg = String.format("%s wurde von %s zum Fallen verdammt", this.getColoredName(TextColor.CYAN), msg = String.format("%s wurde von %s zum Fallen verdammt", this.getColoredName(Color.CYAN),
fallEnt.getColoredName(TextColor.CYAN)); fallEnt.getColoredName(Color.CYAN));
kill = String.format(TextColor.CYAN + "* %s zum Fallen verdammt", kill = String.format(Color.CYAN + "* %s zum Fallen verdammt",
this.getColoredName(TextColor.CYAN)); this.getColoredName(Color.CYAN));
} }
} }
else if(lastEnt != null) { else if(lastEnt != null) {
@ -2383,24 +2383,24 @@ public abstract class EntityLiving extends Entity
receiver = lastEnt.isPlayer() ? ((EntityNPC)lastEnt).connection : null; receiver = lastEnt.isPlayer() ? ((EntityNPC)lastEnt).connection : null;
if(lastItem != null) { // && lastItem.hasDisplayName()) { if(lastItem != null) { // && lastItem.hasDisplayName()) {
msg = String.format("%s fiel zu tief und wurde von %s mit %s erledigt", msg = String.format("%s fiel zu tief und wurde von %s mit %s erledigt",
this.getColoredName(TextColor.BLUE), this.getColoredName(Color.BLUE),
lastEnt.getColoredName(TextColor.BLUE), lastItem.getColoredName(TextColor.BLUE)); lastEnt.getColoredName(Color.BLUE), lastItem.getColoredName(Color.BLUE));
kill = String.format(TextColor.BLUE + "* %s mit %s erledigt", kill = String.format(Color.BLUE + "* %s mit %s erledigt",
this.getColoredName(TextColor.BLUE), lastItem.getColoredName(TextColor.BLUE)); this.getColoredName(Color.BLUE), lastItem.getColoredName(Color.BLUE));
} }
else { else {
msg = String.format("%s fiel zu tief und wurde von %s erledigt", this.getColoredName(TextColor.BLUE), msg = String.format("%s fiel zu tief und wurde von %s erledigt", this.getColoredName(Color.BLUE),
lastEnt.getColoredName(TextColor.BLUE)); lastEnt.getColoredName(Color.BLUE));
kill = String.format(TextColor.BLUE + "%s erledigt", this.getColoredName(TextColor.BLUE)); kill = String.format(Color.BLUE + "%s erledigt", this.getColoredName(Color.BLUE));
} }
} }
else { else {
msg = kill = natural ? String.format("%s wurde zum Fallen verdammt", this.getColoredName(TextColor.CYAN)) : null; msg = kill = natural ? String.format("%s wurde zum Fallen verdammt", this.getColoredName(Color.CYAN)) : null;
} }
} }
else { else {
msg = kill = natural ? String.format("%s fiel " + (fall.blockType() == null ? "aus zu großer Höhe" : fall.blockType()), msg = kill = natural ? String.format("%s fiel " + (fall.blockType() == null ? "aus zu großer Höhe" : fall.blockType()),
this.getColoredName(TextColor.NEON)) : null; this.getColoredName(Color.NEON)) : null;
} }
} }
else { else {

View file

@ -134,7 +134,7 @@ import common.log.Log;
import common.model.TextureAnimation; import common.model.TextureAnimation;
import common.properties.Property; import common.properties.Property;
import common.util.PortalType; import common.util.PortalType;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
import common.world.State; import common.world.State;
@ -265,7 +265,7 @@ public abstract class BlockRegistry {
.setDisplay("Obsidian").setMiningLevel(3)); .setDisplay("Obsidian").setMiningLevel(3));
register("clay", (new BlockClay()).setHardness(0.6F).setSound(SoundType.GRAVEL).setDisplay("Ton").setShovelHarvestable()); register("clay", (new BlockClay()).setHardness(0.6F).setSound(SoundType.GRAVEL).setDisplay("Ton").setShovelHarvestable());
register("hardened_clay", (new BlockHardenedClay()).setHardness(1.25F).setResistance(7.0F).setSound(SoundType.STONE).setDisplay("Gebrannter Ton")); register("hardened_clay", (new BlockHardenedClay()).setHardness(1.25F).setResistance(7.0F).setSound(SoundType.STONE).setDisplay("Gebrannter Ton"));
for(TextColor color : TextColor.values()) { for(Color color : Color.values()) {
register(color.getName() + "_clay", (new BlockColoredClay(color)).setHardness(1.25F).setResistance(7.0F) register(color.getName() + "_clay", (new BlockColoredClay(color)).setHardness(1.25F).setResistance(7.0F)
.setSound(SoundType.STONE).setDisplay(color.getDisplay() + " gefärbter Ton")); .setSound(SoundType.STONE).setDisplay(color.getDisplay() + " gefärbter Ton"));
} }
@ -414,23 +414,23 @@ public abstract class BlockRegistry {
.setSound(SoundType.STONE).setDisplay("Geladener Block").setTab(CheatTab.GEMS)); .setSound(SoundType.STONE).setDisplay("Geladener Block").setTab(CheatTab.GEMS));
register("glass", (new BlockGlass()).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glas")); register("glass", (new BlockGlass()).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glas"));
for(TextColor color : TextColor.values()) { for(Color color : Color.values()) {
register(color.getName() + "_glass", (new BlockStainedGlass(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbtes Glas")); register(color.getName() + "_glass", (new BlockStainedGlass(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbtes Glas"));
} }
register("glass_pane", (new BlockPane(Material.TRANSLUCENT)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glasscheibe")); register("glass_pane", (new BlockPane(Material.TRANSLUCENT)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glasscheibe"));
for(TextColor color : TextColor.values()) { for(Color color : Color.values()) {
register(color.getName() + "_glass_pane", (new BlockStainedGlassPane(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbte Glasscheibe")); register(color.getName() + "_glass_pane", (new BlockStainedGlassPane(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbte Glasscheibe"));
} }
for(TextColor color : TextColor.values()) { for(Color color : Color.values()) {
register(color.getName() + "_wool", (new BlockWool(color)).setHardness(0.8F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(-1) + " Wolle") register(color.getName() + "_wool", (new BlockWool(color)).setHardness(0.8F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(-1) + " Wolle")
.setShearsEfficiency(1)); .setShearsEfficiency(1));
} }
for(TextColor color : TextColor.values()) { for(Color color : Color.values()) {
register(color.getName() + "_carpet", (new BlockCarpet(color)).setHardness(0.1F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(1) + " Teppich").setOpacity(0)); register(color.getName() + "_carpet", (new BlockCarpet(color)).setHardness(0.1F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(1) + " Teppich").setOpacity(0));
} }
for(TextColor color : BlockBed.COLORS) { for(Color color : BlockBed.COLORS) {
register(color.getName() + "_bed", (new BlockBed(color)).setSound(SoundType.WOOD).setHardness(0.2F).setDisplay(color.getSubject(0) + " Bett")); register(color.getName() + "_bed", (new BlockBed(color)).setSound(SoundType.WOOD).setHardness(0.2F).setDisplay(color.getSubject(0) + " Bett"));
} }

View file

@ -18,7 +18,7 @@ import common.inventory.InventoryCrafting;
import common.item.Item; import common.item.Item;
import common.item.ItemStack; import common.item.ItemStack;
import common.item.material.ItemDye; import common.item.material.ItemDye;
import common.util.TextColor; import common.util.Color;
public abstract class CraftingRegistry public abstract class CraftingRegistry
{ {
@ -156,47 +156,51 @@ public abstract class CraftingRegistry
add(new ItemStack(Items.blood_brick, 1), "NN", "NN", 'N', Items.bloodbrick); add(new ItemStack(Items.blood_brick, 1), "NN", "NN", 'N', Items.bloodbrick);
add(new ItemStack(Items.coarse_dirt, 4), "DG", "GD", 'D', Items.dirt, 'G', Items.gravel); add(new ItemStack(Items.coarse_dirt, 4), "DG", "GD", 'D', Items.dirt, 'G', Items.gravel);
for (TextColor color : TextColor.values()) for (Color color : Color.values())
{ {
ItemDye dye = ItemDye.getByColor(color); ItemDye dye = ItemDye.getByColor(color);
if(color != TextColor.WHITE) if(color != Color.WHITE)
addShapeless(new ItemStack(BlockWool.getByColor(color).getItem()), dye, Items.white_wool); addShapeless(new ItemStack(BlockWool.getByColor(color).getItem()), dye, Items.white_wool);
add(new ItemStack(BlockColoredClay.getByColor(color).getItem(), 8), "###", "#X#", "###", '#', Items.hardened_clay, 'X', dye); add(new ItemStack(BlockColoredClay.getByColor(color).getItem(), 8), "###", "#X#", "###", '#', Items.hardened_clay, 'X', dye);
add(new ItemStack(BlockStainedGlass.getByColor(color).getItem(), 8), "###", "#X#", "###", '#', Items.glass, 'X', dye); add(new ItemStack(BlockStainedGlass.getByColor(color).getItem(), 8), "###", "#X#", "###", '#', Items.glass, 'X', dye);
add(new ItemStack(BlockStainedGlassPane.getByColor(color).getItem(), 16), "###", "###", '#', BlockStainedGlass.getByColor(color).getItem()); add(new ItemStack(BlockStainedGlassPane.getByColor(color).getItem(), 16), "###", "###", '#', BlockStainedGlass.getByColor(color).getItem());
} }
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.YELLOW)), Items.dandelion); addShapeless(new ItemStack(ItemDye.getByColor(Color.YELLOW)), Items.dandelion);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.rose); addShapeless(new ItemStack(ItemDye.getByColor(Color.RED)), Items.rose);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.poppy); addShapeless(new ItemStack(ItemDye.getByColor(Color.RED)), Items.poppy);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.WHITE), 3), Items.bone); addShapeless(new ItemStack(ItemDye.getByColor(Color.WHITE), 3), Items.bone);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 2), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA), 2), new ItemStack(ItemDye.getByColor(Color.RED)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.ORANGE), 2), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.YELLOW))); addShapeless(new ItemStack(ItemDye.getByColor(Color.ORANGE), 2), new ItemStack(ItemDye.getByColor(Color.RED)), new ItemStack(ItemDye.getByColor(Color.YELLOW)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.GREEN), 2), new ItemStack(ItemDye.getByColor(TextColor.DARK_GREEN)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.GREEN), 2), new ItemStack(ItemDye.getByColor(Color.DARK_GREEN)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.GRAY), 2), new ItemStack(ItemDye.getByColor(TextColor.BLACK)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.GRAY), 2), new ItemStack(ItemDye.getByColor(Color.BLACK)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY), 2), new ItemStack(ItemDye.getByColor(TextColor.GRAY)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_GRAY), 2), new ItemStack(ItemDye.getByColor(Color.GRAY)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY), 3), new ItemStack(ItemDye.getByColor(TextColor.BLACK)), new ItemStack(ItemDye.getByColor(TextColor.WHITE)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_GRAY), 3), new ItemStack(ItemDye.getByColor(Color.BLACK)), new ItemStack(ItemDye.getByColor(Color.WHITE)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_BLUE), 2), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_BLUE), 2), new ItemStack(ItemDye.getByColor(Color.BLUE)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.CYAN), 2), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.DARK_GREEN))); addShapeless(new ItemStack(ItemDye.getByColor(Color.CYAN), 2), new ItemStack(ItemDye.getByColor(Color.BLUE)), new ItemStack(ItemDye.getByColor(Color.DARK_GREEN)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.VIOLET), 2), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.RED))); addShapeless(new ItemStack(ItemDye.getByColor(Color.VIOLET), 2), new ItemStack(ItemDye.getByColor(Color.BLUE)), new ItemStack(ItemDye.getByColor(Color.RED)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.DARK_MAGENTA), 2), new ItemStack(ItemDye.getByColor(TextColor.VIOLET)), new ItemStack(ItemDye.getByColor(TextColor.MAGENTA))); addShapeless(new ItemStack(ItemDye.getByColor(Color.DARK_MAGENTA), 2), new ItemStack(ItemDye.getByColor(Color.VIOLET)), new ItemStack(ItemDye.getByColor(Color.MAGENTA)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.DARK_MAGENTA), 3), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.MAGENTA))); addShapeless(new ItemStack(ItemDye.getByColor(Color.DARK_MAGENTA), 3), new ItemStack(ItemDye.getByColor(Color.BLUE)), new ItemStack(ItemDye.getByColor(Color.RED)), new ItemStack(ItemDye.getByColor(Color.MAGENTA)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 4), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.WHITE))); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA), 4), new ItemStack(ItemDye.getByColor(Color.BLUE)), new ItemStack(ItemDye.getByColor(Color.RED)), new ItemStack(ItemDye.getByColor(Color.RED)), new ItemStack(ItemDye.getByColor(Color.WHITE)));
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_BLUE)), Items.blue_orchid); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_BLUE)), Items.blue_orchid);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA)), Items.allium); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA)), Items.allium);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.houstonia); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_GRAY)), Items.houstonia);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.red_tulip); addShapeless(new ItemStack(ItemDye.getByColor(Color.RED)), Items.red_tulip);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.ORANGE)), Items.orange_tulip); addShapeless(new ItemStack(ItemDye.getByColor(Color.ORANGE)), Items.orange_tulip);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.white_tulip); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_GRAY)), Items.white_tulip);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA)), Items.pink_tulip); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA)), Items.pink_tulip);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.daisy); addShapeless(new ItemStack(ItemDye.getByColor(Color.LIGHT_GRAY)), Items.daisy);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.YELLOW), 2), Items.sunflower); addShapeless(new ItemStack(ItemDye.getByColor(Color.YELLOW), 2), Items.sunflower);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 2), Items.syringa); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA), 2), Items.syringa);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED), 2), Items.rose_bush); addShapeless(new ItemStack(ItemDye.getByColor(Color.RED), 2), Items.rose_bush);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 2), Items.paeonia); addShapeless(new ItemStack(ItemDye.getByColor(Color.MAGENTA), 2), Items.paeonia);
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.DARK_GREEN)), Items.cactus); addShapeless(new ItemStack(ItemDye.getByColor(Color.DARK_GREEN)), Items.cactus);
addShapeless(new ItemStack(ItemDye.getByColor(Color.WHITE)), Items.grinded_bones);
addShapeless(new ItemStack(ItemDye.getByColor(Color.BROWN)), Items.cocoa_powder);
addShapeless(new ItemStack(ItemDye.getByColor(Color.BLACK)), Items.ink_sack);
addShapeless(new ItemStack(ItemDye.getByColor(Color.BLUE)), Items.lapis_lazuli);
for (TextColor color : TextColor.values()) for (Color color : Color.values())
{ {
add(new ItemStack(BlockCarpet.getByColor(color).getItem(), 3), "##", '#', BlockWool.getByColor(color).getItem()); add(new ItemStack(BlockCarpet.getByColor(color).getItem(), 3), "##", '#', BlockWool.getByColor(color).getItem());
} }
@ -230,7 +234,7 @@ public abstract class CraftingRegistry
add(new ItemStack(Items.wooden_button, 1), "#", '#', planks); add(new ItemStack(Items.wooden_button, 1), "#", '#', planks);
add(new ItemStack(Items.wooden_pressure_plate, 1), "##", '#', planks); add(new ItemStack(Items.wooden_pressure_plate, 1), "##", '#', planks);
add(new ItemStack(Items.piston, 1), "TTT", "#X#", "#R#", '#', Items.cobblestone, 'X', Items.iron_ingot, 'R', Items.charged_powder, 'T', planks); add(new ItemStack(Items.piston, 1), "TTT", "#X#", "#R#", '#', Items.cobblestone, 'X', Items.iron_ingot, 'R', Items.charged_powder, 'T', planks);
for(TextColor color : BlockBed.COLORS) { for(Color color : BlockBed.COLORS) {
add(new ItemStack(ItemRegistry.byName(color.getName() + "_bed"), 1), "###", "XXX", '#', BlockWool.getByColor(color).getItem(), 'X', planks); add(new ItemStack(ItemRegistry.byName(color.getName() + "_bed"), 1), "###", "XXX", '#', BlockWool.getByColor(color).getItem(), 'X', planks);
} }
} }

View file

@ -36,6 +36,7 @@ import common.item.material.ItemBottle;
import common.item.material.ItemBucket; import common.item.material.ItemBucket;
import common.item.material.ItemDye; import common.item.material.ItemDye;
import common.item.material.ItemEnchantedBook; import common.item.material.ItemEnchantedBook;
import common.item.material.ItemGrindedBones;
import common.item.material.ItemHorseArmor; import common.item.material.ItemHorseArmor;
import common.item.material.ItemMetal; import common.item.material.ItemMetal;
import common.item.material.ItemRecord; import common.item.material.ItemRecord;
@ -79,7 +80,7 @@ import common.item.weapon.ItemSword;
import common.item.weapon.ItemTrident; import common.item.weapon.ItemTrident;
import common.log.Log; import common.log.Log;
import common.util.Pair; import common.util.Pair;
import common.util.TextColor; import common.util.Color;
import common.util.Util; import common.util.Util;
import common.world.Weather; import common.world.Weather;
@ -204,7 +205,7 @@ public abstract class ItemRegistry {
register("green_keycard", (new ItemKey()).setDisplay("Grüne Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L)); register("green_keycard", (new ItemKey()).setDisplay("Grüne Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L));
register("blue_keycard", (new ItemKey()).setDisplay("Blaue Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L)); register("blue_keycard", (new ItemKey()).setDisplay("Blaue Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L));
register("black_keycard", (new ItemKey()).setDisplay("Schwarze Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L)); register("black_keycard", (new ItemKey()).setDisplay("Schwarze Schlüsselkarte").setTab(CheatTab.TOOLS).setMaxAmount(StackSize.L));
for(Pair<Integer, TextColor> sides : ItemDie.DIE_SIDES) { for(Pair<Integer, Color> sides : ItemDie.DIE_SIDES) {
register("die_" + sides.first(), (new ItemDie(sides.first(), sides.second())).setMaxAmount(StackSize.L)); register("die_" + sides.first(), (new ItemDie(sides.first(), sides.second())).setMaxAmount(StackSize.L));
} }
register("chick_magnet", (new ItemMagnet(true)).setDisplay("Kükenmagnet")); register("chick_magnet", (new ItemMagnet(true)).setDisplay("Kükenmagnet"));
@ -258,12 +259,8 @@ public abstract class ItemRegistry {
register(type.getName(), (new ItemFishFood(false, type))); register(type.getName(), (new ItemFishFood(false, type)));
register("cooked_" + type.getName(), (new ItemFishFood(true, type))); register("cooked_" + type.getName(), (new ItemFishFood(true, type)));
} }
Item lapis = null; for(Color color : Color.values()) {
for(TextColor color : TextColor.values()) { register(color.getName() + "_dye", new ItemDye(color));
Item dye = new ItemDye(color);
if(color == TextColor.BLUE)
lapis = dye;
register(color.getDye(), dye);
} }
register("bone", (new Item()).setDisplay("Knochen").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.L)); register("bone", (new Item()).setDisplay("Knochen").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.L));
register("sugar", (new Item()).setDisplay("Zucker").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XXL)); register("sugar", (new Item()).setDisplay("Zucker").setTab(CheatTab.MATERIALS).setMaxAmount(StackSize.XXL));
@ -295,6 +292,11 @@ public abstract class ItemRegistry {
register("fireball", (new ItemFireball()).setDisplay("Feuerkugel")); register("fireball", (new ItemFireball()).setDisplay("Feuerkugel"));
Item emerald = (new Item()).setDisplay("Smaragd").setTab(CheatTab.METALS); Item emerald = (new Item()).setDisplay("Smaragd").setTab(CheatTab.METALS);
register("emerald", emerald); register("emerald", emerald);
register("cocoa_powder", new Item().setTab(CheatTab.MATERIALS).setDisplay("Gemahlene Kakaobohnen").setMaxAmount(StackSize.L));
Item lapis = new Item().setTab(CheatTab.METALS).setDisplay("Lapislazuli").setMaxAmount(StackSize.L);
register("lapis_lazuli", lapis);
register("grinded_bones", new ItemGrindedBones().setTab(CheatTab.MATERIALS).setDisplay("Gemahlene Knochen").setMaxAmount(StackSize.L));
register("ink_sack", new Item().setTab(CheatTab.MATERIALS).setDisplay("Tintenbeutel").setMaxAmount(StackSize.L));
register("carrot", new ItemSeedFood(3, Blocks.carrots, Blocks.farmland).setDisplay("Karotte").setMaxAmount(StackSize.L)); register("carrot", new ItemSeedFood(3, Blocks.carrots, Blocks.farmland).setDisplay("Karotte").setMaxAmount(StackSize.L));
@ -305,7 +307,7 @@ public abstract class ItemRegistry {
register("melon_seed", new ItemSeeds(Blocks.melon_stem, Blocks.farmland).setDisplay("Melonenkerne").setMaxAmount(StackSize.XL)); register("melon_seed", new ItemSeeds(Blocks.melon_stem, Blocks.farmland).setDisplay("Melonenkerne").setMaxAmount(StackSize.XL));
register("whip", (new ItemWhip()).setDisplay("Peitsche")); register("whip", (new ItemWhip()).setDisplay("Peitsche"));
register("charge_crystal", (new Item()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(TextColor.DARK_MAGENTA).setGleaming()); register("charge_crystal", (new Item()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(Color.DARK_MAGENTA).setGleaming());
for(Enchantment ench : Enchantment.values()) { for(Enchantment ench : Enchantment.values()) {
register("enchanted_book_" + ench.getName(), (new ItemEnchantedBook(ench, 1)).setUnstackable().setDisplay("Verzaubertes Buch mit " + ench.getFormattedName(1)).setTab(CheatTab.ENCHANTMENTS)); register("enchanted_book_" + ench.getName(), (new ItemEnchantedBook(ench, 1)).setUnstackable().setDisplay("Verzaubertes Buch mit " + ench.getFormattedName(1)).setTab(CheatTab.ENCHANTMENTS));
int max = ench.getMaxLevel(); int max = ench.getMaxLevel();
@ -323,7 +325,7 @@ public abstract class ItemRegistry {
register("lead", (new ItemLead()).setDisplay("Leine").setMaxAmount(StackSize.L)); register("lead", (new ItemLead()).setDisplay("Leine").setMaxAmount(StackSize.L));
register("name_tag", (new ItemNameTag()).setDisplay("Namensschild")); register("name_tag", (new ItemNameTag()).setDisplay("Namensschild"));
for(int z = 0; z < ItemDynamite.DYNAMITE.length; z++) { for(int z = 0; z < ItemDynamite.DYNAMITE.length; z++) {
register("dynamite" + (z == 0 ? "" : ("_" + z)), (new ItemDynamite(z)).setDisplay("Dynamit" + Util.getTierSuffix(z)).setColor(TextColor.RED)); register("dynamite" + (z == 0 ? "" : ("_" + z)), (new ItemDynamite(z)).setDisplay("Dynamit" + Util.getTierSuffix(z)).setColor(Color.RED));
} }
register("chain", (new Item()).setDisplay("Kette").setTab(CheatTab.MATERIALS).setMagnetic()); register("chain", (new Item()).setDisplay("Kette").setTab(CheatTab.MATERIALS).setMagnetic());
Item chargedPowder = (new Item()).setDisplay("Geladener Staub").setTab(CheatTab.METALS).setMagnetic(); Item chargedPowder = (new Item()).setDisplay("Geladener Staub").setTab(CheatTab.METALS).setMagnetic();

View file

@ -23,6 +23,7 @@ import common.item.material.ItemBottle;
import common.item.material.ItemBucket; import common.item.material.ItemBucket;
import common.item.material.ItemDye; import common.item.material.ItemDye;
import common.item.material.ItemEnchantedBook; import common.item.material.ItemEnchantedBook;
import common.item.material.ItemGrindedBones;
import common.item.material.ItemHorseArmor; import common.item.material.ItemHorseArmor;
import common.item.material.ItemMetal; import common.item.material.ItemMetal;
import common.item.material.ItemRecord; import common.item.material.ItemRecord;
@ -187,7 +188,6 @@ public abstract class Items {
public static final ItemAmmo bolt = get("bolt"); public static final ItemAmmo bolt = get("bolt");
public static final ItemBoltgun boltgun = get("boltgun"); public static final ItemBoltgun boltgun = get("boltgun");
public static final Item bone = get("bone"); public static final Item bone = get("bone");
public static final ItemDye bonemeal = get("bonemeal");
public static final ItemBook book = get("book"); public static final ItemBook book = get("book");
public static final Item bookshelf = get("bookshelf"); public static final Item bookshelf = get("bookshelf");
public static final ItemBow bow = get("bow"); public static final ItemBow bow = get("bow");
@ -266,7 +266,6 @@ public abstract class Items {
public static final Item cobblestone_slab = get("cobblestone_slab"); public static final Item cobblestone_slab = get("cobblestone_slab");
public static final Item cobblestone_stairs = get("cobblestone_stairs"); public static final Item cobblestone_stairs = get("cobblestone_stairs");
public static final Item cobblestone_wall = get("cobblestone_wall"); public static final Item cobblestone_wall = get("cobblestone_wall");
public static final ItemDye cocoa_powder = get("cocoa_powder");
public static final Item construction_table = get("construction_table"); public static final Item construction_table = get("construction_table");
public static final ItemFood cooked_beef = get("cooked_beef"); public static final ItemFood cooked_beef = get("cooked_beef");
public static final ItemFood cooked_chicken = get("cooked_chicken"); public static final ItemFood cooked_chicken = get("cooked_chicken");
@ -406,7 +405,6 @@ public abstract class Items {
public static final ItemBucket hydrogen_bucket = get("hydrogen_bucket"); public static final ItemBucket hydrogen_bucket = get("hydrogen_bucket");
public static final Item ice = get("ice"); public static final Item ice = get("ice");
public static final ItemScanner scanner = get("scanner"); public static final ItemScanner scanner = get("scanner");
public static final ItemDye ink_sack = get("ink_sack");
public static final Item iodine_block = get("iodine_block"); public static final Item iodine_block = get("iodine_block");
public static final Item iodine_ore = get("iodine_ore"); public static final Item iodine_ore = get("iodine_ore");
public static final ItemMetal iodine_powder = get("iodine_powder"); public static final ItemMetal iodine_powder = get("iodine_powder");
@ -442,7 +440,6 @@ public abstract class Items {
public static final Item jungle_stairs = get("jungle_stairs"); public static final Item jungle_stairs = get("jungle_stairs");
public static final Item ladder = get("ladder"); public static final Item ladder = get("ladder");
public static final Item lapis_block = get("lapis_block"); public static final Item lapis_block = get("lapis_block");
public static final ItemDye lapis_lazuli = get("lapis_lazuli");
public static final Item lapis_ore = get("lapis_ore"); public static final Item lapis_ore = get("lapis_ore");
public static final Item large_fern = get("large_fern"); public static final Item large_fern = get("large_fern");
public static final Item large_tallgrass = get("large_tallgrass"); public static final Item large_tallgrass = get("large_tallgrass");
@ -1066,6 +1063,14 @@ public abstract class Items {
public static final Item violet_glass = get("violet_glass"); public static final Item violet_glass = get("violet_glass");
public static final Item violet_glass_pane = get("violet_glass_pane"); public static final Item violet_glass_pane = get("violet_glass_pane");
public static final Item violet_wool = get("violet_wool"); public static final Item violet_wool = get("violet_wool");
public static final ItemDye white_dye = get("white_dye");
public static final ItemDye brown_dye = get("brown_dye");
public static final ItemDye black_dye = get("black_dye");
public static final ItemDye blue_dye = get("blue_dye");
public static final ItemGrindedBones grinded_bones = get("grinded_bones");
public static final Item cocoa_powder = get("cocoa_powder");
public static final Item ink_sack = get("ink_sack");
public static final Item lapis_lazuli = get("lapis_lazuli");
private static <T extends Item> T get(String id) { private static <T extends Item> T get(String id) {
T item = (T)ItemRegistry.byName(id); T item = (T)ItemRegistry.byName(id);

View file

@ -1,6 +1,6 @@
package common.init; package common.init;
import common.util.TextColor; import common.util.Color;
public enum MetalType { public enum MetalType {
IRON("iron", 26, "Fe", "Eisen", 0, new ToolMaterial(2, 8.0f, 0.0f, 250, 6.0F, 2, 14, true, 15, 9, 2, 6, 5, 2).setMagnetic()), IRON("iron", 26, "Fe", "Eisen", 0, new ToolMaterial(2, 8.0f, 0.0f, 250, 6.0F, 2, 14, true, 15, 9, 2, 6, 5, 2).setMagnetic()),
@ -87,15 +87,15 @@ public enum MetalType {
} }
public String formatSymbol() { public String formatSymbol() {
return TextColor.YELLOW + "Element-Symbol: " + TextColor.ORANGE + this.order + " " + this.sign; return Color.YELLOW + "Element-Symbol: " + Color.ORANGE + this.order + " " + this.sign;
} }
public String formatRarity() { public String formatRarity() {
return TextColor.DARK_MAGENTA + "Seltenheit: " + TextColor.NEON + "" + (this.rarity + 1); return Color.DARK_MAGENTA + "Seltenheit: " + Color.NEON + "" + (this.rarity + 1);
} }
public String formatRadioactivity() { public String formatRadioactivity() {
return TextColor.RED + "Radioaktivität: " + TextColor.GREEN + String.format("%.1f RN", this.radioactivity * 100.0f); return Color.RED + "Radioaktivität: " + Color.GREEN + String.format("%.1f RN", this.radioactivity * 100.0f);
} }
public boolean isMagnetic() { public boolean isMagnetic() {

View file

@ -20,7 +20,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.World; import common.world.World;
@ -33,7 +33,7 @@ public class Item {
private Item containerItem; private Item containerItem;
private String display; private String display;
private CheatTab tab; private CheatTab tab;
private TextColor color = null; private Color color = null;
private int defColor = 0xffffffff; private int defColor = 0xffffffff;
private boolean magnetic = false; private boolean magnetic = false;
private boolean gleaming = false; private boolean gleaming = false;
@ -88,7 +88,7 @@ public class Item {
return this; return this;
} }
public final Item setColor(TextColor color) { public final Item setColor(Color color) {
this.color = color; this.color = color;
return this; return this;
} }
@ -136,8 +136,8 @@ public class Item {
return this.containerItem != null; return this.containerItem != null;
} }
public final TextColor getColor(ItemStack stack) { public final Color getColor(ItemStack stack) {
return this.color != null ? this.color : (stack.isItemEnchanted() ? TextColor.NEON : TextColor.WHITE); return this.color != null ? this.color : (stack.isItemEnchanted() ? Color.NEON : Color.WHITE);
} }
public final CheatTab getTab() { public final CheatTab getTab() {

View file

@ -17,7 +17,7 @@ import common.init.ItemRegistry;
import common.item.weapon.ItemBow; import common.item.weapon.ItemBow;
import common.rng.Random; import common.rng.Random;
import common.tags.TagObject; import common.tags.TagObject;
import common.util.TextColor; import common.util.Color;
public final class ItemStack { public final class ItemStack {
public static final int MAX_SIZE = 67108864; public static final int MAX_SIZE = 67108864;
@ -232,15 +232,15 @@ public final class ItemStack {
return this.getColor() + this.getDisplayName(); return this.getColor() + this.getDisplayName();
} }
public String getColoredName(TextColor reset) { public String getColoredName(Color reset) {
return TextColor.DARK_GRAY + "[" + this.getColor() + this.getDisplayName() + TextColor.DARK_GRAY + "]" + reset; return Color.DARK_GRAY + "[" + this.getColor() + this.getDisplayName() + Color.DARK_GRAY + "]" + reset;
} }
public boolean hasDisplayName() { public boolean hasDisplayName() {
return this.name != null; return this.name != null;
} }
public TextColor getColor() { public Color getColor() {
return this.item.getColor(this); return this.item.getColor(this);
} }

View file

@ -4,7 +4,7 @@ import common.effect.Effect;
import common.effect.StatusEffect; import common.effect.StatusEffect;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.TextColor; import common.util.Color;
import common.world.World; import common.world.World;
public class ItemAppleGold extends ItemFood public class ItemAppleGold extends ItemFood
@ -15,7 +15,7 @@ public class ItemAppleGold extends ItemFood
{ {
super(amount, false); super(amount, false);
this.powered = powered; this.powered = powered;
this.setColor(powered ? TextColor.MAGENTA : TextColor.NEON); this.setColor(powered ? Color.MAGENTA : Color.NEON);
if(this.powered) if(this.powered)
this.setGleaming(); this.setGleaming();
} }

View file

@ -22,7 +22,7 @@ import common.util.Clientside;
import common.util.Facing; import common.util.Facing;
import common.util.Pair; import common.util.Pair;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.World; import common.world.World;
@ -74,7 +74,7 @@ public class ItemPotion extends Item
this.effect = effect; this.effect = effect;
this.setMaxAmount(StackSize.XS); this.setMaxAmount(StackSize.XS);
this.setTab(CheatTab.POTIONS); this.setTab(CheatTab.POTIONS);
this.setColor(TextColor.ORK); this.setColor(Color.ORK);
this.setDisplay(getDisplay(this)); this.setDisplay(getDisplay(this));
if(this.effect != null) if(this.effect != null)
this.setGleaming(); this.setGleaming();
@ -212,18 +212,18 @@ public class ItemPotion extends Item
if (potion.isBadEffect()) if (potion.isBadEffect())
{ {
tooltip.add(TextColor.RED + s1); tooltip.add(Color.RED + s1);
} }
else else
{ {
tooltip.add(TextColor.LIGHT_GRAY + s1); tooltip.add(Color.LIGHT_GRAY + s1);
} }
String effectTip = this.effect.getPotion().getTooltip(this.effect.getAmplifier()); String effectTip = this.effect.getPotion().getTooltip(this.effect.getAmplifier());
if(effectTip != null) if(effectTip != null)
tooltip.add(effectTip); tooltip.add(effectTip);
} }
else if(this.type != null) { else if(this.type != null) {
tooltip.add(TextColor.LIGHT_GRAY + "Wirkungslos"); tooltip.add(Color.LIGHT_GRAY + "Wirkungslos");
} }
} }

View file

@ -2,7 +2,6 @@ package common.item.material;
import common.block.Block; import common.block.Block;
import common.block.artificial.BlockBed; import common.block.artificial.BlockBed;
import common.block.foliage.IGrowable;
import common.entity.animal.EntitySheep; import common.entity.animal.EntitySheep;
import common.entity.npc.EntityNPC; import common.entity.npc.EntityNPC;
import common.entity.types.EntityLiving; import common.entity.types.EntityLiving;
@ -12,43 +11,34 @@ import common.item.CheatTab;
import common.item.Item; import common.item.Item;
import common.item.ItemStack; import common.item.ItemStack;
import common.item.StackSize; import common.item.StackSize;
import common.tileentity.TileEntity;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Clientside;
import common.util.Facing; import common.util.Facing;
import common.util.ParticleType; import common.util.Color;
import common.util.Serverside;
import common.util.TextColor;
import common.util.Vec3;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
import common.world.AWorldServer;
public class ItemDye extends Item { public class ItemDye extends Item {
private static final ItemDye[] DIES = new ItemDye[TextColor.values().length]; private static final ItemDye[] DIES = new ItemDye[Color.values().length];
private final TextColor color; private final Color color;
public static ItemDye getByColor(TextColor color) { public static ItemDye getByColor(Color color) {
return DIES[color.ordinal()]; return DIES[color.ordinal()];
} }
public ItemDye(TextColor color) public ItemDye(Color color)
{ {
this.color = color; this.color = color;
this.setTab(color == TextColor.BLUE ? CheatTab.METALS : CheatTab.MATERIALS); this.setTab(CheatTab.MATERIALS);
this.setDisplay(color.getDyeName()); this.setDisplay(color.getSubject(1) + " Farbstoff");
this.setMaxAmount(StackSize.XXL); this.setMaxAmount(StackSize.XXL);
DIES[this.color.ordinal()] = this; DIES[this.color.ordinal()] = this;
} }
public TextColor getColor() { public Color getColor() {
return this.color; return this.color;
} }
/**
* Called when a Block is right-clicked with this Item
*/
public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ)
{ {
if (!playerIn.canPlayerEdit(pos.offset(side), side, stack)) if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))
@ -57,18 +47,6 @@ public class ItemDye extends Item {
} }
else else
{ {
if (this.color == TextColor.WHITE)
{
if (applyBonemeal(stack, worldIn, pos))
{
if (!worldIn.client)
{
worldIn.playEffect(2005, pos, 0);
}
return true;
}
}
State iblockstate = worldIn.getState(pos); State iblockstate = worldIn.getState(pos);
if(iblockstate.getBlock() instanceof BlockBed) { if(iblockstate.getBlock() instanceof BlockBed) {
Block bedBlock = BlockRegistry.byName(this.color.getName() + "_bed"); Block bedBlock = BlockRegistry.byName(this.color.getName() + "_bed");
@ -104,57 +82,6 @@ public class ItemDye extends Item {
} }
} }
public static boolean applyBonemeal(ItemStack stack, World worldIn, BlockPos target)
{
State iblockstate = worldIn.getState(target);
if (iblockstate.getBlock() instanceof IGrowable)
{
IGrowable igrowable = (IGrowable)iblockstate.getBlock();
if (igrowable.canGrow(worldIn, target, iblockstate, worldIn.client))
{
if (!worldIn.client)
{
if (igrowable.canUseBonemeal(worldIn, worldIn.rand, target, iblockstate))
{
igrowable.grow((AWorldServer)worldIn, worldIn.rand, target, iblockstate);
}
stack.decrSize();
}
return true;
}
}
return false;
}
@Clientside
public static void spawnBonemealParticles(World worldIn, BlockPos pos, int amount)
{
if (amount == 0)
{
amount = 15;
}
Block block = worldIn.getState(pos).getBlock();
if (block != Blocks.air)
{
block.setBlockBounds(worldIn, pos);
for (int i = 0; i < amount; ++i)
{
worldIn.clientParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv()));
}
}
}
/**
* Returns true if the item can be used on the given entity, e.g. shears on sheep.
*/
public boolean itemInteractionForEntity(ItemStack stack, EntityNPC playerIn, EntityLiving target) public boolean itemInteractionForEntity(ItemStack stack, EntityNPC playerIn, EntityLiving target)
{ {
if (target instanceof EntitySheep) if (target instanceof EntitySheep)
@ -174,31 +101,4 @@ public class ItemDye extends Item {
return false; return false;
} }
} }
@Serverside
public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
if(this.color != TextColor.WHITE)
return super.dispenseStack(world, source, position, blockpos, facing, stack);
BlockPos pos = blockpos = blockpos.offset(facing);
if (applyBonemeal(stack, world, pos))
{
if (!world.client)
{
world.playEffect(2005, pos, 0);
}
world.playEffect(1000, blockpos, 0);
}
else
{
world.playEffect(1001, blockpos, 0);
}
return stack;
}
@Serverside
public int getDispenseSoundId() {
return this.color == TextColor.WHITE ? 0 : super.getDispenseSoundId();
}
} }

View file

@ -14,7 +14,7 @@ import common.item.ItemStack;
import common.item.RngLoot; import common.item.RngLoot;
import common.rng.Random; import common.rng.Random;
import common.util.Clientside; import common.util.Clientside;
import common.util.TextColor; import common.util.Color;
public class ItemEnchantedBook extends Item public class ItemEnchantedBook extends Item
{ {
@ -25,7 +25,7 @@ public class ItemEnchantedBook extends Item
private final int level; private final int level;
public ItemEnchantedBook(Enchantment enchantment, int level) { public ItemEnchantedBook(Enchantment enchantment, int level) {
this.setColor(TextColor.YELLOW); this.setColor(Color.YELLOW);
this.setGleaming(); this.setGleaming();
this.enchantment = enchantment; this.enchantment = enchantment;
this.level = level; this.level = level;

View file

@ -0,0 +1,115 @@
package common.item.material;
import common.block.Block;
import common.block.foliage.IGrowable;
import common.entity.npc.EntityNPC;
import common.init.Blocks;
import common.item.Item;
import common.item.ItemStack;
import common.tileentity.TileEntity;
import common.util.BlockPos;
import common.util.Clientside;
import common.util.Facing;
import common.util.ParticleType;
import common.util.Serverside;
import common.util.Vec3;
import common.world.State;
import common.world.World;
import common.world.AWorldServer;
public class ItemGrindedBones extends Item {
public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ)
{
if (!playerIn.canPlayerEdit(pos.offset(side), side, stack))
{
return false;
}
else
{
if (applyBonemeal(stack, worldIn, pos))
{
if (!worldIn.client)
{
worldIn.playEffect(2005, pos, 0);
}
return true;
}
return false;
}
}
public static boolean applyBonemeal(ItemStack stack, World worldIn, BlockPos target)
{
State iblockstate = worldIn.getState(target);
if (iblockstate.getBlock() instanceof IGrowable)
{
IGrowable igrowable = (IGrowable)iblockstate.getBlock();
if (igrowable.canGrow(worldIn, target, iblockstate, worldIn.client))
{
if (!worldIn.client)
{
if (igrowable.canUseBonemeal(worldIn, worldIn.rand, target, iblockstate))
{
igrowable.grow((AWorldServer)worldIn, worldIn.rand, target, iblockstate);
}
stack.decrSize();
}
return true;
}
}
return false;
}
@Clientside
public static void spawnParticles(World worldIn, BlockPos pos, int amount)
{
if (amount == 0)
{
amount = 15;
}
Block block = worldIn.getState(pos).getBlock();
if (block != Blocks.air)
{
block.setBlockBounds(worldIn, pos);
for (int i = 0; i < amount; ++i)
{
worldIn.clientParticle(ParticleType.GROW, (double)((float)pos.getX() + worldIn.rand.floatv()), (double)pos.getY() + (double)worldIn.rand.floatv() * block.getBlockBoundsMaxY(), (double)((float)pos.getZ() + worldIn.rand.floatv()));
}
}
}
@Serverside
public ItemStack dispenseStack(AWorldServer world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
BlockPos pos = blockpos = blockpos.offset(facing);
if (applyBonemeal(stack, world, pos))
{
if (!world.client)
{
world.playEffect(2005, pos, 0);
}
world.playEffect(1000, blockpos, 0);
}
else
{
world.playEffect(1001, blockpos, 0);
}
return stack;
}
@Serverside
public int getDispenseSoundId() {
return 0;
}
}

View file

@ -9,7 +9,7 @@ import common.init.MetalType;
import common.item.Item; import common.item.Item;
import common.item.ItemStack; import common.item.ItemStack;
import common.util.Clientside; import common.util.Clientside;
import common.util.TextColor; import common.util.Color;
public class ItemMetal extends Item { public class ItemMetal extends Item {
private final MetalType metal; private final MetalType metal;
@ -17,7 +17,7 @@ public class ItemMetal extends Item {
public ItemMetal(MetalType metal) { public ItemMetal(MetalType metal) {
this.metal = metal; this.metal = metal;
if(this.metal.radioactivity > 0.0f) if(this.metal.radioactivity > 0.0f)
this.setColor(TextColor.GREEN); this.setColor(Color.GREEN);
if(this.metal.isMagnetic()) if(this.metal.isMagnetic())
this.setMagnetic(); this.setMagnetic();
} }

View file

@ -12,7 +12,7 @@ import common.item.ItemStack;
import common.util.BlockPos; import common.util.BlockPos;
import common.util.Facing; import common.util.Facing;
import common.util.ParticleType; import common.util.ParticleType;
import common.util.TextColor; import common.util.Color;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -22,7 +22,7 @@ public class ItemChargedOrb extends Item
{ {
this.setTab(CheatTab.MAGIC); this.setTab(CheatTab.MAGIC);
this.setMaxDamage(16); this.setMaxDamage(16);
this.setColor(TextColor.DARK_MAGENTA); this.setColor(Color.DARK_MAGENTA);
this.setFragile(); this.setFragile();
} }

View file

@ -19,25 +19,25 @@ import common.util.Clientside;
import common.util.Facing; import common.util.Facing;
import common.util.Pair; import common.util.Pair;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.util.Vec3; import common.util.Vec3;
import common.world.AWorldServer; import common.world.AWorldServer;
import common.world.World; import common.world.World;
public class ItemDie extends Item public class ItemDie extends Item
{ {
public static final Pair<Integer, TextColor>[] DIE_SIDES = new Pair[] { public static final Pair<Integer, Color>[] DIE_SIDES = new Pair[] {
new Pair(4, TextColor.DARK_GREEN), new Pair(4, Color.DARK_GREEN),
new Pair(6, TextColor.NEON), new Pair(6, Color.NEON),
new Pair(8, TextColor.DARK_MAGENTA), new Pair(8, Color.DARK_MAGENTA),
new Pair(10, TextColor.MAGENTA), new Pair(10, Color.MAGENTA),
new Pair(12, TextColor.DARK_RED), new Pair(12, Color.DARK_RED),
new Pair(20, TextColor.ORANGE) new Pair(20, Color.ORANGE)
}; };
public static final Map<Integer, ItemDie> DICE = Maps.newTreeMap(); public static final Map<Integer, ItemDie> DICE = Maps.newTreeMap();
private final int sides; private final int sides;
private final TextColor color; private final Color color;
public static final ItemDie getBySides(int sides) { public static final ItemDie getBySides(int sides) {
ItemDie die = DICE.get(sides); ItemDie die = DICE.get(sides);
@ -48,7 +48,7 @@ public class ItemDie extends Item
return DICE.values(); return DICE.values();
} }
public ItemDie(int sides, TextColor color) public ItemDie(int sides, Color color)
{ {
this.sides = sides; this.sides = sides;
this.color = color; this.color = color;
@ -61,7 +61,7 @@ public class ItemDie extends Item
return this.sides; return this.sides;
} }
public TextColor getDieColor() { public Color getDieColor() {
return this.color; return this.color;
} }

View file

@ -23,7 +23,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -67,7 +67,7 @@ public class ItemCharTemplate extends Item
@Clientside @Clientside
public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) { public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) {
Dimension dim = this.spawned.species.origin == null ? null : DimensionRegistry.getDimension(this.spawned.species.origin); Dimension dim = this.spawned.species.origin == null ? null : DimensionRegistry.getDimension(this.spawned.species.origin);
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay())); tooltip.add(Color.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay()));
} }
public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ) public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ)

View file

@ -21,7 +21,7 @@ import common.util.ExtMath;
import common.util.Facing; import common.util.Facing;
import common.util.HitPosition; import common.util.HitPosition;
import common.util.Serverside; import common.util.Serverside;
import common.util.TextColor; import common.util.Color;
import common.world.State; import common.world.State;
import common.world.World; import common.world.World;
@ -59,7 +59,7 @@ public class ItemMobTemplate extends Item
EntityInfo egg = EntityRegistry.DNA.get(this.entityId); EntityInfo egg = EntityRegistry.DNA.get(this.entityId);
if(egg != null) { if(egg != null) {
Dimension dim = egg.origin() == null ? null : DimensionRegistry.getDimension(egg.origin()); Dimension dim = egg.origin() == null ? null : DimensionRegistry.getDimension(egg.origin());
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay())); tooltip.add(Color.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay()));
} }
} }

Some files were not shown because too many files have changed in this diff Show more