color changes
|
@ -104,7 +104,6 @@ import common.block.Block;
|
|||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.collect.Sets;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Space;
|
||||
import common.effect.Effect;
|
||||
|
@ -169,6 +168,7 @@ import common.util.HitPosition;
|
|||
import common.util.IntHashMap;
|
||||
import common.util.LongHashMap;
|
||||
import common.util.ParticleType;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
import common.util.Var;
|
||||
import common.util.HitPosition.ObjectType;
|
||||
|
@ -1153,7 +1153,7 @@ public class Client implements IThreadListener {
|
|||
int energy = entity.getEnergy(type);
|
||||
if(energy > 0) {
|
||||
int emax = entity.getEnergyCap(type);
|
||||
y = this.drawStat(x, y, TextColor.LGRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
|
||||
y = this.drawStat(x, y, TextColor.LIGHT_GRAY + type.display, energy, emax, entity.hasEnergyEffect(type) ? type.effect : type.color);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1241,7 +1241,7 @@ public class Client implements IThreadListener {
|
|||
else {
|
||||
Drawing.drawText(String.format("%s%.2f" + TextColor.RESET + " %s [%s" + TextColor.RESET + "], %.3f ms, W %d x %d%s",
|
||||
this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS",
|
||||
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
||||
this.vsync ? TextColor.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
||||
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
|
||||
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : ""),
|
||||
0, 0, 0xffffffff);
|
||||
|
@ -1271,7 +1271,7 @@ public class Client implements IThreadListener {
|
|||
GL11.glGetString(GL11.GL_VERSION),
|
||||
GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VENDOR),
|
||||
this.framecode(), this.framerate < 1.0f ? 1.0f / this.framerate : this.framerate, this.framerate < 1.0f ? "SPF" : "FPS",
|
||||
this.vsync ? TextColor.DGRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
||||
this.vsync ? TextColor.DARK_GRAY + "VSYNC" : (this.syncLimited ? TextColor.GREEN + "" + this.syncLimit : TextColor.RED + "UNL"),
|
||||
(float)PerfSection.getTotal(false) / 1000.0f, this.fbRawX, this.fbRawY,
|
||||
this.fullscreen ? " @ " + (this.vidMode == null ? "?" : this.vidMode.refresh()) + " Hz" : "",
|
||||
this.tpscode(), this.tickrate < 1.0f ? 1.0f / this.tickrate : this.tickrate,
|
||||
|
@ -1905,7 +1905,7 @@ public class Client implements IThreadListener {
|
|||
String.format("Position: %d %d %d", pos.getX(), pos.getY(), pos.getZ())
|
||||
);
|
||||
for(Entry<Property, Comparable> entry : block.getProperties().entrySet()) {
|
||||
str.append("\n" + (block.getBlock().getSavedProperties().contains(entry.getKey()) ? TextColor.NEON : TextColor.LGRAY) + entry.getKey().getName() + TextColor.RESET + ": " + (entry.getValue() instanceof Boolean bool ? (bool ? TextColor.GREEN : TextColor.RED) + "" + entry.getValue() + TextColor.RESET : entry.getValue()));
|
||||
str.append("\n" + (block.getBlock().getSavedProperties().contains(entry.getKey()) ? TextColor.NEON : TextColor.LIGHT_GRAY) + entry.getKey().getName() + TextColor.RESET + ": " + (entry.getValue() instanceof Boolean bool ? (bool ? TextColor.GREEN : TextColor.RED) + "" + entry.getValue() + TextColor.RESET : entry.getValue()));
|
||||
}
|
||||
|
||||
return str.toString();
|
||||
|
@ -2490,7 +2490,7 @@ public class Client implements IThreadListener {
|
|||
this.registerDebug(Keysym.H, "Hilfe zu Tastenkombinationen anzeigen", new DebugRunner() {
|
||||
public void execute(Keysym key) {
|
||||
String bind = Bind.CHEAT.getInput() == null ? "n/a" : Bind.CHEAT.getInput().getDisplay();
|
||||
Client.this.show(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DGREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
|
||||
Client.this.show(new GuiInfo("Hilfe zu Tastenkombinationen", TextColor.DARK_GREEN + "" + Client.this.debug.size() + " Tastenkombinationen stehen zur Verfügung:\n" +
|
||||
Util.buildLines(new Function<DebugFunction, String>() {
|
||||
public String apply(DebugFunction func) {
|
||||
return TextColor.CYAN + bind + TextColor.RED + "+" + TextColor.GREEN + func.key.getDisplay() + TextColor.GRAY + " - " + TextColor.YELLOW + func.help;
|
||||
|
@ -2862,9 +2862,9 @@ public class Client implements IThreadListener {
|
|||
|
||||
private void printVar(CVar cv) {
|
||||
String values = cv.getValues();
|
||||
this.logConsole("%s " + TextColor.NEON + "%s " + TextColor.DGRAY + "[%s" + TextColor.DGRAY + "]" + TextColor.GRAY + " = " + TextColor.WHITE + "%s " + TextColor.DGRAY +
|
||||
"[" + TextColor.GRAY + "D " + TextColor.CRIMSON + "%s" + TextColor.DGRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
|
||||
values != null ? " [" + TextColor.LGRAY + values + TextColor.DGRAY + "]" : "");
|
||||
this.logConsole("%s " + TextColor.NEON + "%s " + TextColor.DARK_GRAY + "[%s" + TextColor.DARK_GRAY + "]" + TextColor.GRAY + " = " + TextColor.WHITE + "%s " + TextColor.DARK_GRAY +
|
||||
"[" + TextColor.GRAY + "D " + TextColor.CRIMSON + "%s" + TextColor.DARK_GRAY + "]%s", cv.getType(), cv.getCVarName(), cv.getCategory(), cv.format(), cv.getDefault(),
|
||||
values != null ? " [" + TextColor.LIGHT_GRAY + values + TextColor.DARK_GRAY + "]" : "");
|
||||
}
|
||||
|
||||
public void exec(String line) {
|
||||
|
@ -3018,7 +3018,7 @@ public class Client implements IThreadListener {
|
|||
TextColor color;
|
||||
if(ping < 0 || ping >= 20000) {
|
||||
bars = 0;
|
||||
color = ping < 0 ? TextColor.GRAY : TextColor.DRED;
|
||||
color = ping < 0 ? TextColor.GRAY : TextColor.DARK_RED;
|
||||
}
|
||||
else if(ping < 80) {
|
||||
bars = ping < 50 ? 8 : 7;
|
||||
|
@ -3026,7 +3026,7 @@ public class Client implements IThreadListener {
|
|||
}
|
||||
else if(ping < 160) {
|
||||
bars = ping < 120 ? 6 : 5;
|
||||
color = TextColor.DGREEN;
|
||||
color = TextColor.DARK_GREEN;
|
||||
}
|
||||
else if(ping < 350) {
|
||||
bars = ping < 220 ? 4 : 3;
|
||||
|
@ -3038,7 +3038,7 @@ public class Client implements IThreadListener {
|
|||
}
|
||||
else {
|
||||
bars = 1;
|
||||
color = TextColor.DRED;
|
||||
color = TextColor.DARK_RED;
|
||||
}
|
||||
Drawing.drawTextRight(color + (ping < 10000 ? String.format("%d", ping) + "ms" : String.format("%.1f", ((float)ping) / 1000.0f) + "s"), x - 18, y, 0xffffffff);
|
||||
for(int z = 0; z < bars; z++) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import client.gui.element.Slider;
|
|||
import client.gui.element.SliderCallback;
|
||||
import client.vars.CVar;
|
||||
import client.vars.CVarCategory;
|
||||
import common.color.TextColor;
|
||||
import common.sound.EventType;
|
||||
import common.util.TextColor;
|
||||
|
||||
public enum Volume implements CVar {
|
||||
MASTER("master", "Gesamt"),
|
||||
|
@ -52,7 +52,7 @@ public enum Volume implements CVar {
|
|||
}
|
||||
|
||||
public String getType() {
|
||||
return TextColor.DGREEN + "volume";
|
||||
return TextColor.DARK_GREEN + "volume";
|
||||
}
|
||||
|
||||
public CVarCategory getCategory() {
|
||||
|
|
|
@ -16,11 +16,11 @@ import client.gui.element.NavButton;
|
|||
import client.gui.element.PressType;
|
||||
import client.renderer.Drawing;
|
||||
import client.util.FileUtils;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.network.IPlayer;
|
||||
import common.util.EncryptUtil;
|
||||
import common.util.Pair;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class GuiConnect extends GuiList<GuiConnect.ServerInfo> implements ButtonCallback {
|
||||
|
|
|
@ -17,12 +17,12 @@ import client.vars.BoolVar;
|
|||
import client.vars.CVar;
|
||||
import client.window.Keysym;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.network.IPlayer;
|
||||
import common.packet.CPacketComplete;
|
||||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
import common.util.HitPosition;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiConsole extends Gui implements FieldCallback {
|
||||
private class ConsoleArea extends Area {
|
||||
|
@ -42,7 +42,7 @@ public class GuiConsole extends Gui implements FieldCallback {
|
|||
if(this.sel_start >= 0 && this.sel_end == this.sel_start) {
|
||||
for(int z = this.sel_start; z >= 0; z--) {
|
||||
char c = this.text.charAt(z);
|
||||
if(c == TextColor.COMMAND.code) {
|
||||
if(c == TextColor.COMMAND) {
|
||||
for(int n = z + 1; n < this.text.length(); n++) {
|
||||
c = this.text.charAt(n);
|
||||
if(c < 0x20) {
|
||||
|
|
|
@ -4,17 +4,16 @@ import client.Client;
|
|||
import client.gui.element.MultiLabel;
|
||||
import client.gui.element.NavButton;
|
||||
import common.Version;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class GuiInfo extends Gui {
|
||||
private static final String VER =
|
||||
TextColor.GREEN + "" + Util.repeatString(TextColor.BUG, Version.RELEASE.getId()) + TextColor.DVIOLET + "|-| " + TextColor.VIOLET + Client.VERSION + TextColor.DVIOLET + " |-|" +
|
||||
TextColor.GREEN + Util.repeatString(TextColor.BUG, Version.RELEASE.getId());
|
||||
TextColor.GREEN + "" + Util.repeatString("\u009a", Version.RELEASE.getId()) + TextColor.DARK_VIOLET + "|-| " + TextColor.VIOLET + Client.VERSION + TextColor.DARK_VIOLET + " |-|" +
|
||||
TextColor.GREEN + Util.repeatString("\u009a", Version.RELEASE.getId());
|
||||
|
||||
private static final String INFO = "Ein Spiel zur Simulation, zum Testen, für Rollenspiele, Mehrspieler und vieles mehr." + "\n" +
|
||||
"Optimiert für Geschwindigkeit, Stabilität und" + TextColor.UNKNOWN + "" + TextColor.UNKNOWN + " [Speicherzugriffsfehler]";
|
||||
"Optimiert für Geschwindigkeit, Stabilität und\u007f\u007f [Speicherzugriffsfehler]";
|
||||
private static final String HACKED = "Ein weiterer Release von WAAAAAAAAAAAAGHDRIVE!!!1!!!ONEoneOnetyone!1!!!" + "\n" +
|
||||
"Update 0.2 - Läuft jetzt auch mit nur 512KB Fast-RAM!";
|
||||
|
||||
|
@ -53,12 +52,12 @@ public class GuiInfo extends Gui {
|
|||
for(int z = 0; z < authors.length; z++) {
|
||||
if(z > 0)
|
||||
sb.append((hax ? TextColor.VIOLET : TextColor.GRAY) + ", ");
|
||||
sb.append((hax ? TextColor.DVIOLET : TextColor.WHITE) + authors[z]);
|
||||
sb.append((hax ? TextColor.DARK_VIOLET : TextColor.WHITE) + authors[z]);
|
||||
}
|
||||
}
|
||||
|
||||
private static String getInfo(boolean hax) {
|
||||
return getHeader(hax, VER, VER) + "\n" + (hax ? (TextColor.VIOLET + HACKED) : (TextColor.LGRAY + INFO));
|
||||
return getHeader(hax, VER, VER) + "\n" + (hax ? (TextColor.VIOLET + HACKED) : (TextColor.LIGHT_GRAY + INFO));
|
||||
}
|
||||
|
||||
private static String getLibraries(boolean hax) {
|
||||
|
@ -78,15 +77,13 @@ public class GuiInfo extends Gui {
|
|||
}
|
||||
|
||||
private static String getColors() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
StringBuilder sb = new StringBuilder(TextColor.RESET + "#D ");
|
||||
int num = 0;
|
||||
for(TextColor color : TextColor.values()) {
|
||||
if(num == 14)
|
||||
sb.append('\n');
|
||||
if((color.code >= Log.CHR_COLORS1 && color.code <= Log.CHR_COLORE1) || (color.code >= Log.CHR_COLORS2 && color.code <= Log.CHR_COLORE2)) {
|
||||
sb.append(color + "#" + color.colorId + ' ');
|
||||
num++;
|
||||
}
|
||||
if(num == TextColor.values().length / 2)
|
||||
sb.append("\n" + TextColor.COMMAND + "#d ");
|
||||
sb.append(color + "#" + color.colorId + ' ');
|
||||
num++;
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -95,8 +92,8 @@ public class GuiInfo extends Gui {
|
|||
StringBuilder sb = new StringBuilder(getHeader(hax, "Mitwirkende dieses Programms", "Das Team -- TCQ"));
|
||||
|
||||
addLines(sb, hax, "Die dunklen Herrscher", "Quellcode, Design, Grafiken, Refactoring und Code-Cleanup",
|
||||
TextColor.CYAN + "Sen der \"kleine\" Dämon " + TextColor.CRIMSON + TextColor.DEMON + TextColor.BLACK + TextColor.BLKHEART,
|
||||
TextColor.RED + "Shen, Herrscher des Schattenlandes " + TextColor.CRIMSON + TextColor.IMP);
|
||||
TextColor.CYAN + "Sen der \"kleine\" Dämon",
|
||||
TextColor.RED + "Shen, Herrscher des Schattenlandes");
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@ import client.gui.element.PressType;
|
|||
import client.gui.options.GuiOptions;
|
||||
import client.renderer.Drawing;
|
||||
import client.window.Keysym;
|
||||
import common.color.TextColor;
|
||||
import common.rng.Random;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiMenu extends Gui {
|
||||
public static final GuiMenu INSTANCE = new GuiMenu();
|
||||
|
@ -186,7 +186,7 @@ public class GuiMenu extends Gui {
|
|||
this.animGrow[this.rand.zrange(this.animWidth)] += 1;
|
||||
}
|
||||
sb = new StringBuilder(this.animWidth + 2);
|
||||
sb.append(TextColor.DGREEN);
|
||||
sb.append(TextColor.DARK_GREEN);
|
||||
for(int z = 0; z < this.animWidth; z++) {
|
||||
switch(this.animGrow[z] / 5) {
|
||||
case 0:
|
||||
|
@ -197,7 +197,7 @@ public class GuiMenu extends Gui {
|
|||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sb.append(TextColor.LGRAY);
|
||||
sb.append(TextColor.LIGHT_GRAY);
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
|
@ -215,7 +215,7 @@ public class GuiMenu extends Gui {
|
|||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
sb.append(TextColor.DVIOLET);
|
||||
sb.append(TextColor.DARK_VIOLET);
|
||||
break;
|
||||
default:
|
||||
sb.append(TextColor.VIOLET);
|
||||
|
|
|
@ -17,9 +17,9 @@ import client.gui.element.FieldCallback;
|
|||
import client.vars.CVarCategory;
|
||||
import client.vars.Variable;
|
||||
import client.window.Window;
|
||||
import common.color.TextColor;
|
||||
import common.network.IPlayer;
|
||||
import common.util.EncryptUtil;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiServer extends Gui implements FieldCallback {
|
||||
public static final GuiServer INSTANCE = new GuiServer(null);
|
||||
|
|
|
@ -11,11 +11,11 @@ import client.gui.element.ListEntry;
|
|||
import client.gui.element.NavButton;
|
||||
import client.gui.element.PressType;
|
||||
import client.renderer.Drawing;
|
||||
import common.color.TextColor;
|
||||
import common.entity.npc.PlayerCharacter;
|
||||
import common.packet.CPacketAction;
|
||||
import common.packet.CPacketAction.Action;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> implements ButtonCallback
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
|
|||
if(this.initial)
|
||||
Drawing.drawRect(x, y, 1, 36, 0xffaf0000);
|
||||
String str = this.character == null ? TextColor.BLUE + "[" + TextColor.CYAN + "+" + TextColor.BLUE + "]" :
|
||||
String.format(TextColor.GREEN + "Level " + TextColor.DGREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.VIOLET + "%s",
|
||||
String.format(TextColor.GREEN + "Level " + TextColor.DARK_GREEN + "%d " + TextColor.YELLOW + "%s " + TextColor.VIOLET + "%s",
|
||||
character.level(), character.type(), character.name());
|
||||
String pos = this.character == null ? TextColor.BROWN + "Neuen Charakter erstellen" :
|
||||
String.format(TextColor.NEON + "%s " + TextColor.GRAY + "bei " + TextColor.ACID + "%d" + TextColor.GRAY + ", " + TextColor.ACID + "%d" + TextColor.GRAY + ", " + TextColor.ACID + "%d",
|
||||
|
@ -63,7 +63,7 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
|
|||
|
||||
private void updateButtons() {
|
||||
CharacterEntry entry = this.getSelected();
|
||||
this.descField.setText(entry == null ? "" : (entry.character == null ? "*neuer Charakter*" : String.format(TextColor.GRAY + "[%s%s" + TextColor.GRAY + "]\n" + TextColor.LYELLOW + "Herkunft" + TextColor.LGRAY + ": " + TextColor.LBROWN + "%s\n" + TextColor.RESET + "%s", entry.character.align().color, entry.character.align().display, entry.character.origin() == null ? TextColor.DGRAY + "*unbekannt*" : entry.character.origin(), entry.character.info() == null ? "*keine Beschreibung vorhanden*" : this.getSelected().character.info())));
|
||||
this.descField.setText(entry == null ? "" : (entry.character == null ? "*neuer Charakter*" : String.format(TextColor.GRAY + "[%s%s" + TextColor.GRAY + "]\n" + TextColor.LIGHT_YELLOW + "Herkunft" + TextColor.LIGHT_GRAY + ": " + TextColor.LIGHT_BROWN + "%s\n" + TextColor.RESET + "%s", entry.character.align().color, entry.character.align().display, entry.character.origin() == null ? TextColor.DARK_GRAY + "*unbekannt*" : entry.character.origin(), entry.character.info() == null ? "*keine Beschreibung vorhanden*" : this.getSelected().character.info())));
|
||||
this.actionButtom.setText(entry != null && entry.character == null ? "Charakter erstellen" : "Charakter spielen");
|
||||
this.actionButtom.enabled = entry != null && !entry.initial;
|
||||
this.deleteButtom.enabled = !this.gm.charEditor && entry != null && entry.character != null && !entry.initial;
|
||||
|
|
|
@ -29,7 +29,6 @@ import client.window.Button;
|
|||
import common.attributes.Attribute;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Sets;
|
||||
import common.color.TextColor;
|
||||
import common.enchantment.Enchantment;
|
||||
import common.enchantment.EnchantmentHelper;
|
||||
import common.init.ItemRegistry;
|
||||
|
@ -41,6 +40,7 @@ import common.item.ItemStack;
|
|||
import common.packet.CPacketAction;
|
||||
import common.packet.CPacketCheat;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public abstract class GuiContainer extends Gui
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ public abstract class GuiContainer extends Gui
|
|||
if(stack.getItem().isAdminItem())
|
||||
list.add(TextColor.RED + "Admin-Gegenstand");
|
||||
if(stack.getItem().isMagnetic())
|
||||
list.add(TextColor.LGRAY + "Magnetisch");
|
||||
list.add(TextColor.LIGHT_GRAY + "Magnetisch");
|
||||
if(stack.getItem().canBeDyed())
|
||||
list.add("Farbe: #" + Integer.toHexString(stack.getDyeColor()).toUpperCase());
|
||||
|
||||
|
@ -424,7 +424,7 @@ public abstract class GuiContainer extends Gui
|
|||
}
|
||||
}
|
||||
else if(stack == this.cheatStack) {
|
||||
s = TextColor.DGREEN + "+" + TextColor.GREEN + formatAmount(stack.getSize());
|
||||
s = TextColor.DARK_GREEN + "+" + TextColor.GREEN + formatAmount(stack.getSize());
|
||||
}
|
||||
|
||||
this.drawItemStack(stack, mouseX - j2, mouseY - k2, s);
|
||||
|
@ -472,7 +472,7 @@ public abstract class GuiContainer extends Gui
|
|||
StringBuilder sb = new StringBuilder();
|
||||
for(int i = 0; i < list.size(); ++i) {
|
||||
if(i != 0)
|
||||
sb.append("\n" + TextColor.LGRAY + (String)list.get(i));
|
||||
sb.append("\n" + TextColor.LIGHT_GRAY + (String)list.get(i));
|
||||
else
|
||||
sb.append((String)list.get(i));
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@ import client.gui.element.ActButton;
|
|||
import client.gui.element.ButtonCallback;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.PressType;
|
||||
import common.color.TextColor;
|
||||
import common.enchantment.Enchantment;
|
||||
import common.init.Blocks;
|
||||
import common.inventory.ContainerEnchantment;
|
||||
import common.inventory.InventoryPlayer;
|
||||
import common.rng.Random;
|
||||
import common.util.Pair;
|
||||
import common.util.TextColor;
|
||||
import common.world.World;
|
||||
|
||||
public class GuiEnchant extends GuiContainer implements ButtonCallback {
|
||||
|
@ -46,13 +46,13 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
|
|||
else {
|
||||
if(this.gm.player.getManaPoints() < mana) {
|
||||
this.buttons[l].enabled = false;
|
||||
this.labels[l].setText(TextColor.DGRAY + name);
|
||||
this.mana[l].setText(TextColor.DRED + "Mana-Level " + mana);
|
||||
this.labels[l].setText(TextColor.DARK_GRAY + name);
|
||||
this.mana[l].setText(TextColor.DARK_RED + "Mana-Level " + mana);
|
||||
}
|
||||
else {
|
||||
this.buttons[l].enabled = true;
|
||||
this.labels[l].setText(TextColor.GREEN + name);
|
||||
this.mana[l].setText(TextColor.DGREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana");
|
||||
this.mana[l].setText(TextColor.DARK_GREEN + "Mana-Level " + mana + TextColor.GRAY + ", " + TextColor.YELLOW + "-" + (l + 1) + " Mana");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class GuiEnchant extends GuiContainer implements ButtonCallback {
|
|||
s1 = String.format("%d Manapunkte", i1);
|
||||
}
|
||||
|
||||
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.LGRAY.toString() + "" + s1);
|
||||
sb.append((sb.length() != 0 ? "\n" : "") + TextColor.LIGHT_GRAY.toString() + "" + s1);
|
||||
}
|
||||
|
||||
this.hover(sb.toString(), mouseX, mouseY);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package client.gui.container;
|
||||
|
||||
import client.gui.element.Label;
|
||||
import common.color.TextColor;
|
||||
import common.inventory.ContainerRepair;
|
||||
import common.inventory.InventoryPlayer;
|
||||
import common.util.TextColor;
|
||||
import common.world.World;
|
||||
|
||||
public class GuiRepair extends GuiContainer {
|
||||
|
@ -20,7 +20,7 @@ public class GuiRepair extends GuiContainer {
|
|||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
if(this.anvil.maximumCost >= 40)
|
||||
this.info.setText(TextColor.DRED + "Zu teuer!");
|
||||
this.info.setText(TextColor.DARK_RED + "Zu teuer!");
|
||||
else if(this.anvil.maximumCost <= 0 || !this.anvil.getSlot(2).getHasStack())
|
||||
this.info.setText("");
|
||||
else if(!this.anvil.getSlot(2).canTakeStack(this.playerInv.player))
|
||||
|
|
|
@ -16,9 +16,9 @@ import client.gui.element.FieldCallback;
|
|||
import client.gui.element.Toggle;
|
||||
import client.gui.element.ToggleCallback;
|
||||
import client.network.ClientPlayer;
|
||||
import common.color.TextColor;
|
||||
import common.packet.CPacketForm;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import common.util.Triplet;
|
||||
|
||||
public class GuiForm extends Gui implements ButtonCallback {
|
||||
|
|
|
@ -3,8 +3,8 @@ package client.gui.ingame;
|
|||
import client.gui.Gui;
|
||||
import client.gui.element.ActButton;
|
||||
import client.gui.element.ButtonCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import client.gui.element.Label;
|
||||
import client.gui.element.MultiLabel;
|
||||
import client.gui.element.PressType;
|
||||
|
@ -20,7 +20,7 @@ public class GuiGameOver extends Gui {
|
|||
|
||||
public void init(int width, int height) {
|
||||
this.timer = 0;
|
||||
this.add(new Label(0, 0, 400, 0, TextColor.DRED + "Du bist gestorben!"));
|
||||
this.add(new Label(0, 0, 400, 0, TextColor.DARK_RED + "Du bist gestorben!"));
|
||||
this.add(new MultiLabel(0, 32, 400, 42, String.format(TextColor.GREEN + "Letzte Position" + TextColor.GRAY + ":\n" + TextColor.YELLOW + "%d, %d, %d\n" + TextColor.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getDisplay())));
|
||||
this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
|
||||
public void use(ActButton elem, PressType action) {
|
||||
|
|
|
@ -10,9 +10,9 @@ import client.gui.element.ButtonCallback;
|
|||
import client.gui.element.Field;
|
||||
import client.gui.element.FieldCallback;
|
||||
import client.network.ClientPlayer;
|
||||
import common.color.TextColor;
|
||||
import common.item.ItemStack;
|
||||
import common.packet.CPacketMessage;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiRename extends Gui implements FieldCallback, ButtonCallback {
|
||||
private final String itemName;
|
||||
|
|
|
@ -6,7 +6,7 @@ import client.gui.element.ButtonCallback;
|
|||
import client.gui.element.Label;
|
||||
import client.gui.element.PressType;
|
||||
import client.window.Bind;
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiBinds extends GuiOptions {
|
||||
protected GuiBinds() {
|
||||
|
|
|
@ -17,8 +17,8 @@ import client.window.Button;
|
|||
import client.window.DisplayMode;
|
||||
import client.window.Window;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class GuiDisplay extends GuiOptions {
|
||||
private static final String[] DISTANCES = new String[] {"Gruselig", "Winzig", "Gering", "Normal", "Weit"};
|
||||
|
|
|
@ -5,8 +5,8 @@ import org.lwjgl.opengl.GL11;
|
|||
import client.Client;
|
||||
import client.gui.Font;
|
||||
import client.gui.FontChar;
|
||||
import common.color.TextColor;
|
||||
import common.log.Log;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public abstract class Drawing {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package client.renderer.entity;
|
||||
|
||||
import client.renderer.model.ModelBase;
|
||||
import common.color.TextColor;
|
||||
import common.entity.animal.EntityRabbit;
|
||||
import common.util.TextColor;
|
||||
|
||||
|
||||
public class RenderRabbit extends RenderLiving<EntityRabbit> {
|
||||
|
|
|
@ -17,13 +17,13 @@ import client.renderer.layers.LayerRenderer;
|
|||
import client.renderer.model.ModelBase;
|
||||
import client.renderer.texture.DynamicTexture;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.entity.Entity;
|
||||
import common.entity.item.EntityCrystal;
|
||||
import common.entity.types.EntityAnimal;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.log.Log;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public abstract class RendererLivingEntity<T extends EntityLiving> extends Render<T>
|
||||
{
|
||||
|
|
|
@ -38,8 +38,7 @@ public class LayerSheepWool implements LayerRenderer<EntitySheep>
|
|||
}
|
||||
else
|
||||
{
|
||||
float[] afloat = EntitySheep.getDyeRgb(entitylivingbaseIn.getFleeceColor());
|
||||
GlState.color(afloat[0], afloat[1], afloat[2], 1.0F);
|
||||
GlState.color(entitylivingbaseIn.getFleeceColor().getColor() | 0xff000000);
|
||||
}
|
||||
|
||||
this.sheepModel.setModelAttributes(this.sheepRenderer.getMainModel());
|
||||
|
|
|
@ -2,8 +2,6 @@ package client.renderer.layers;
|
|||
|
||||
import client.renderer.GlState;
|
||||
import client.renderer.entity.RenderWolf;
|
||||
import common.color.DyeColor;
|
||||
import common.entity.animal.EntitySheep;
|
||||
import common.entity.animal.EntityWolf;
|
||||
|
||||
|
||||
|
@ -22,9 +20,7 @@ public class LayerWolfCollar implements LayerRenderer<EntityWolf>
|
|||
if (entitylivingbaseIn.isTamed()) // && !entitylivingbaseIn.isInvisible())
|
||||
{
|
||||
this.wolfRenderer.bindTexture(WOLF_COLLAR);
|
||||
DyeColor enumdyecolor = entitylivingbaseIn.getCollarColor();
|
||||
float[] afloat = EntitySheep.getDyeRgb(enumdyecolor);
|
||||
GlState.color(afloat[0], afloat[1], afloat[2], 1.0F);
|
||||
GlState.color(entitylivingbaseIn.getCollarColor().getColor() | 0xff000000);
|
||||
this.wolfRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,100 +0,0 @@
|
|||
package client.renderer.texture;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import client.util.FileUtils;
|
||||
import common.color.DyeColor;
|
||||
import common.log.Log;
|
||||
|
||||
public class LayeredColorMaskTexture extends Texture
|
||||
{
|
||||
private final String texture;
|
||||
private final List<String> layers;
|
||||
private final List<DyeColor> colors;
|
||||
|
||||
private static int applyTint(int color, int tint) {
|
||||
int i = (color & 16711680) >> 16;
|
||||
int j = (tint & 16711680) >> 16;
|
||||
int k = (color & 65280) >> 8;
|
||||
int l = (tint & 65280) >> 8;
|
||||
int i1 = (color & 255) >> 0;
|
||||
int j1 = (tint & 255) >> 0;
|
||||
int k1 = (int)((float)i * (float)j / 255.0F);
|
||||
int l1 = (int)((float)k * (float)l / 255.0F);
|
||||
int i2 = (int)((float)i1 * (float)j1 / 255.0F);
|
||||
return color & -16777216 | k1 << 16 | l1 << 8 | i2;
|
||||
}
|
||||
|
||||
public LayeredColorMaskTexture(String texture, List<String> layers, List<DyeColor> colors)
|
||||
{
|
||||
this.texture = texture;
|
||||
this.layers = layers;
|
||||
this.colors = colors;
|
||||
}
|
||||
|
||||
public void loadTexture() throws IOException
|
||||
{
|
||||
this.deleteGlTexture();
|
||||
BufferedImage bufferedimage;
|
||||
|
||||
try
|
||||
{
|
||||
BufferedImage bufferedimage1 = TextureUtil.readImage(FileUtils.getResource(this.texture));
|
||||
int i = bufferedimage1.getType();
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
i = 6;
|
||||
}
|
||||
|
||||
bufferedimage = new BufferedImage(bufferedimage1.getWidth(), bufferedimage1.getHeight(), i);
|
||||
Graphics graphics = bufferedimage.getGraphics();
|
||||
graphics.drawImage(bufferedimage1, 0, 0, (ImageObserver)null);
|
||||
|
||||
for (int j = 0; j < 17 && j < this.layers.size() && j < this.colors.size(); ++j)
|
||||
{
|
||||
String s = this.layers.get(j);
|
||||
int color = this.colors.get(j).getColor();
|
||||
|
||||
if (s != null)
|
||||
{
|
||||
InputStream inputstream = FileUtils.getResource(s);
|
||||
BufferedImage bufferedimage2 = TextureUtil.readImage(inputstream);
|
||||
|
||||
if (bufferedimage2.getWidth() == bufferedimage.getWidth() && bufferedimage2.getHeight() == bufferedimage.getHeight() && bufferedimage2.getType() == 6)
|
||||
{
|
||||
for (int k = 0; k < bufferedimage2.getHeight(); ++k)
|
||||
{
|
||||
for (int l = 0; l < bufferedimage2.getWidth(); ++l)
|
||||
{
|
||||
int i1 = bufferedimage2.getRGB(l, k);
|
||||
|
||||
if ((i1 & -16777216) != 0)
|
||||
{
|
||||
int j1 = (i1 & 16711680) << 8 & -16777216;
|
||||
int k1 = bufferedimage1.getRGB(l, k);
|
||||
int l1 = applyTint(k1, color) & 16777215;
|
||||
bufferedimage2.setRGB(l, k, j1 | l1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bufferedimage.getGraphics().drawImage(bufferedimage2, 0, 0, (ImageObserver)null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
{
|
||||
Log.IO.error((Throwable)ioexception, (String)"Konnte Bild mit mehreren Schichten nicht laden");
|
||||
return;
|
||||
}
|
||||
|
||||
TextureUtil.uploadImage(this.getGlTextureId(), bufferedimage);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Toggle;
|
||||
import client.gui.element.ToggleCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class BoolVar extends BaseVar {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package client.vars;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public enum CVarCategory {
|
||||
SYSTEM(TextColor.RED + "system"),
|
||||
|
|
|
@ -7,7 +7,7 @@ import client.gui.element.FieldCallback;
|
|||
import client.gui.element.Label;
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.FieldAction;
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class ColorVar extends IntVar {
|
||||
|
@ -19,7 +19,7 @@ public class ColorVar extends IntVar {
|
|||
}
|
||||
|
||||
public String getType() {
|
||||
return this.alpha ? (TextColor.GRAY + "color32") : (TextColor.LGRAY + "color");
|
||||
return this.alpha ? (TextColor.GRAY + "color32") : (TextColor.LIGHT_GRAY + "color");
|
||||
}
|
||||
|
||||
protected Integer parseValue(String str) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import client.gui.element.DropdownCallback;
|
|||
import client.gui.element.Element;
|
||||
import client.gui.element.Switch;
|
||||
import client.gui.element.SwitchCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.Identifyable;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class EnumVar<T extends Enum> extends BaseVar {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.SliderFloatCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class FloatVar extends BaseVar {
|
||||
public static interface FloatFunction extends VarFunction {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.Slider;
|
||||
import client.gui.element.SliderCallback;
|
||||
import common.color.TextColor;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public class IntVar extends BaseVar {
|
||||
|
|
|
@ -4,8 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import client.gui.element.FieldCallback;
|
||||
import client.gui.element.FieldAction;
|
||||
import common.color.TextColor;
|
||||
import common.util.CharValidator;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class StringVar extends BaseVar {
|
||||
public static interface StringFunction extends VarFunction {
|
||||
|
|
|
@ -4,8 +4,8 @@ import client.Client;
|
|||
import client.gui.element.Element;
|
||||
import client.vars.CVar;
|
||||
import client.vars.CVarCategory;
|
||||
import common.color.TextColor;
|
||||
import common.util.Identifyable;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
|
||||
public enum Bind implements Identifyable, CVar {
|
||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
client/src/main/resources/textures/blocks/dark_green_wool.png
Executable file
After Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 489 B After Width: | Height: | Size: 489 B |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 491 B |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 513 B |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
@ -24,7 +24,6 @@ import common.collect.Lists;
|
|||
import common.collect.Maps;
|
||||
import common.collect.Sets;
|
||||
import common.collect.UnmodifiableIterator;
|
||||
import common.color.TextColor;
|
||||
import common.enchantment.EnchantmentHelper;
|
||||
import common.entity.Entity;
|
||||
import common.entity.item.EntityItem;
|
||||
|
@ -52,6 +51,7 @@ import common.util.Vec3;
|
|||
import common.util.HitPosition.ObjectType;
|
||||
import common.util.Pair;
|
||||
import common.util.Serverside;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
import common.world.Explosion;
|
||||
import common.world.IBlockAccess;
|
||||
|
|
|
@ -3,8 +3,6 @@ package common.block.artificial;
|
|||
import common.block.Block;
|
||||
import common.block.Rotatable;
|
||||
import common.block.Material;
|
||||
import common.color.DyeColor;
|
||||
import common.color.TextColor;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
|
@ -21,6 +19,7 @@ import common.util.Clientside;
|
|||
import common.util.ExtMath;
|
||||
import common.util.Facing;
|
||||
import common.util.Identifyable;
|
||||
import common.util.TextColor;
|
||||
import common.util.WorldPos;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.IWorldAccess;
|
||||
|
@ -48,12 +47,11 @@ public class BlockBed extends Block implements Rotatable {
|
|||
|
||||
public static final PropertyEnum<BlockBed.EnumPartType> PART =
|
||||
PropertyEnum.<BlockBed.EnumPartType>create("part", BlockBed.EnumPartType.class);
|
||||
public static final DyeColor[] COLORS = new DyeColor[]
|
||||
{DyeColor.RED, DyeColor.WHITE, DyeColor.BLACK, DyeColor.PURPLE};
|
||||
public static final TextColor[] COLORS = new TextColor[] {TextColor.RED, TextColor.WHITE, TextColor.BLACK, TextColor.VIOLET};
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public BlockBed(DyeColor color) {
|
||||
public BlockBed(TextColor color) {
|
||||
super(Material.BURNABLE);
|
||||
this.color = color;
|
||||
this.setDefaultState(this.getBaseState().withProperty(PART, BlockBed.EnumPartType.FOOT));
|
||||
|
@ -75,7 +73,7 @@ public class BlockBed extends Block implements Rotatable {
|
|||
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) {
|
||||
player.setSpawnPoint(new WorldPos(pos, player.worldObj));
|
||||
player.connection.addHotbar(TextColor.DGREEN + "Dein Einstiegspunkt wurde auf %s bei [%s, %s, %s] gesetzt",
|
||||
player.connection.addHotbar(TextColor.DARK_GREEN + "Dein Einstiegspunkt wurde auf %s bei [%s, %s, %s] gesetzt",
|
||||
player.worldObj.dimension.getDisplay(), player.getSpawnPoint().getX(),
|
||||
player.getSpawnPoint().getY(), player.getSpawnPoint().getZ());
|
||||
}
|
||||
|
@ -188,15 +186,15 @@ public class BlockBed extends Block implements Rotatable {
|
|||
@Clientside
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(PART) == EnumPartType.HEAD)
|
||||
return provider.getModel(this.color + "_bed_head_top").add(0, 0, 0, 16, 9, 16)
|
||||
.u().rot(90).noCull().s(this.color + "_bed_head_end").noCull()
|
||||
.w(this.color + "_bed_head_side").uv(0, 7, 16, 16).noCull().e(this.color + "_bed_head_side").uv(16, 7, 0, 16).noCull()
|
||||
return provider.getModel(this.color.getName() + "_bed_head_top").add(0, 0, 0, 16, 9, 16)
|
||||
.u().rot(90).noCull().s(this.color.getName() + "_bed_head_end").noCull()
|
||||
.w(this.color.getName() + "_bed_head_side").uv(0, 7, 16, 16).noCull().e(this.color.getName() + "_bed_head_side").uv(16, 7, 0, 16).noCull()
|
||||
.add(0, 3, 0, 16, 3, 16)
|
||||
.d("oak_planks").noCull().rotate(ModelRotation.getNorthRot(state.getValue(FACING).getOpposite()));
|
||||
else
|
||||
return provider.getModel(this.color + "_bed_foot_top").add(0, 0, 0, 16, 9, 16)
|
||||
.u().rot(90).noCull().n(this.color + "_bed_foot_end").noCull()
|
||||
.w(this.color + "_bed_foot_side").uv(0, 7, 16, 16).noCull().e(this.color + "_bed_foot_side").uv(16, 7, 0, 16).noCull()
|
||||
return provider.getModel(this.color.getName() + "_bed_foot_top").add(0, 0, 0, 16, 9, 16)
|
||||
.u().rot(90).noCull().n(this.color.getName() + "_bed_foot_end").noCull()
|
||||
.w(this.color.getName() + "_bed_foot_side").uv(0, 7, 16, 16).noCull().e(this.color.getName() + "_bed_foot_side").uv(16, 7, 0, 16).noCull()
|
||||
.add(0, 3, 0, 16, 3, 16)
|
||||
.d("oak_planks").noCull().rotate(ModelRotation.getNorthRot(state.getValue(FACING).getOpposite()));
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@ package common.block.artificial;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.DyeColor;
|
||||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.Model.ModelProvider;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.util.TextColor;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.State;
|
||||
|
@ -15,15 +15,15 @@ import common.world.World;
|
|||
|
||||
public class BlockCarpet extends Block
|
||||
{
|
||||
public static final BlockCarpet[] CARPETS = new BlockCarpet[DyeColor.values().length];
|
||||
public static final BlockCarpet[] CARPETS = new BlockCarpet[TextColor.values().length];
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public static BlockCarpet getByColor(DyeColor color) {
|
||||
public static BlockCarpet getByColor(TextColor color) {
|
||||
return CARPETS[color.ordinal()];
|
||||
}
|
||||
|
||||
public BlockCarpet(DyeColor color)
|
||||
public BlockCarpet(TextColor color)
|
||||
{
|
||||
super(Material.FLEECE);
|
||||
this.color = color;
|
||||
|
@ -34,7 +34,7 @@ public class BlockCarpet extends Block
|
|||
CARPETS[color.ordinal()] = this;
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
public TextColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
package common.block.artificial;
|
||||
|
||||
import common.color.DyeColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class BlockStainedGlass extends BlockGlass {
|
||||
public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[DyeColor.values().length];
|
||||
public static final BlockStainedGlass[] GLASS = new BlockStainedGlass[TextColor.values().length];
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public static BlockStainedGlass getByColor(DyeColor color) {
|
||||
public static BlockStainedGlass getByColor(TextColor color) {
|
||||
return GLASS[color.ordinal()];
|
||||
}
|
||||
|
||||
public BlockStainedGlass(DyeColor color) {
|
||||
public BlockStainedGlass(TextColor color) {
|
||||
this.color = color;
|
||||
GLASS[color.ordinal()] = this;
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
public TextColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
package common.block.artificial;
|
||||
|
||||
import common.block.Material;
|
||||
import common.color.DyeColor;
|
||||
import common.item.CheatTab;
|
||||
import common.properties.Property;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class BlockStainedGlassPane extends BlockPane
|
||||
{
|
||||
public static final BlockStainedGlassPane[] PANES = new BlockStainedGlassPane[DyeColor.values().length];
|
||||
public static final BlockStainedGlassPane[] PANES = new BlockStainedGlassPane[TextColor.values().length];
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public static BlockStainedGlassPane getByColor(DyeColor color) {
|
||||
public static BlockStainedGlassPane getByColor(TextColor color) {
|
||||
return PANES[color.ordinal()];
|
||||
}
|
||||
|
||||
public BlockStainedGlassPane(DyeColor color)
|
||||
public BlockStainedGlassPane(TextColor color)
|
||||
{
|
||||
super(Material.TRANSLUCENT);
|
||||
this.color = color;
|
||||
|
@ -24,7 +24,7 @@ public class BlockStainedGlassPane extends BlockPane
|
|||
PANES[color.ordinal()] = this;
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
public TextColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,22 +2,22 @@ package common.block.artificial;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.DyeColor;
|
||||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.Model.ModelProvider;
|
||||
import common.util.TextColor;
|
||||
import common.world.State;
|
||||
|
||||
public class BlockWool extends Block {
|
||||
public static final BlockWool[] WOOLS = new BlockWool[DyeColor.values().length];
|
||||
public static final BlockWool[] WOOLS = new BlockWool[TextColor.values().length];
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public static BlockWool getByColor(DyeColor color) {
|
||||
public static BlockWool getByColor(TextColor color) {
|
||||
return WOOLS[color.ordinal()];
|
||||
}
|
||||
|
||||
public BlockWool(DyeColor color) {
|
||||
public BlockWool(TextColor color) {
|
||||
super(Material.BURNABLE);
|
||||
this.color = color;
|
||||
this.setTab(CheatTab.BLOCKS);
|
||||
|
@ -25,7 +25,7 @@ public class BlockWool extends Block {
|
|||
WOOLS[color.ordinal()] = this;
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
public TextColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,29 +2,29 @@ package common.block.natural;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.DyeColor;
|
||||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.Model.ModelProvider;
|
||||
import common.util.TextColor;
|
||||
import common.world.State;
|
||||
|
||||
public class BlockColoredClay extends Block {
|
||||
public static final BlockColoredClay[] CLAY = new BlockColoredClay[DyeColor.values().length];
|
||||
public static final BlockColoredClay[] CLAY = new BlockColoredClay[TextColor.values().length];
|
||||
|
||||
private final DyeColor color;
|
||||
private final TextColor color;
|
||||
|
||||
public static BlockColoredClay getByColor(DyeColor color) {
|
||||
public static BlockColoredClay getByColor(TextColor color) {
|
||||
return CLAY[color.ordinal()];
|
||||
}
|
||||
|
||||
public BlockColoredClay(DyeColor color) {
|
||||
public BlockColoredClay(TextColor color) {
|
||||
super(Material.SOLID);
|
||||
this.color = color;
|
||||
this.setTab(CheatTab.ROCK);
|
||||
CLAY[color.ordinal()] = this;
|
||||
}
|
||||
|
||||
public DyeColor getColor() {
|
||||
public TextColor getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ import common.block.Rotatable;
|
|||
import common.block.SoundType;
|
||||
import common.collect.Maps;
|
||||
import common.block.Material;
|
||||
import common.color.TextColor;
|
||||
import common.entity.Entity;
|
||||
import common.entity.animal.EntityCat;
|
||||
import common.entity.npc.EntityNPC;
|
||||
|
@ -30,6 +29,7 @@ import common.tileentity.TileEntityChest;
|
|||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.util.Facing;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
|
|
@ -2,7 +2,6 @@ package common.block.tech;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.TextColor;
|
||||
import common.entity.item.EntityNuke;
|
||||
import common.init.Blocks;
|
||||
import common.init.SoundEvent;
|
||||
|
@ -10,6 +9,7 @@ import common.item.CheatTab;
|
|||
import common.model.Model;
|
||||
import common.model.Model.ModelProvider;
|
||||
import common.util.BlockPos;
|
||||
import common.util.TextColor;
|
||||
import common.world.Explosion;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
|
|
@ -2,7 +2,6 @@ package common.block.tech;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.TextColor;
|
||||
import common.entity.Entity;
|
||||
import common.entity.item.EntityTnt;
|
||||
import common.entity.npc.EntityNPC;
|
||||
|
@ -21,6 +20,7 @@ import common.tileentity.TileEntity;
|
|||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
import common.util.Facing;
|
||||
import common.util.TextColor;
|
||||
import common.util.Vec3;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.Explosion;
|
||||
|
|
|
@ -1,97 +0,0 @@
|
|||
package common.color;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import common.collect.Maps;
|
||||
import common.util.Displayable;
|
||||
import common.util.Identifyable;
|
||||
|
||||
public enum DyeColor implements Identifyable, Displayable {
|
||||
WHITE("white", "Weiß", "Weißes", "Weißer", "Weiße", "bonemeal", "Knochenmehl", 16777215, TextColor.WHITE),
|
||||
ORANGE("orange", "Orange", "Oranges", "Oranger", "Orange", null, "Oranger Farbstoff", 14188339, TextColor.ORANGE),
|
||||
MAGENTA("magenta", "Magenta", "Magenta", "Magenta", "Magenta", null, "Magenta Farbstoff", 11685080, TextColor.VIOLET),
|
||||
LIGHT_BLUE("light_blue", "Hellblau", "Hellblaues", "Hellblauer", "Hellblaue", null, "Hellblauer Farbstoff", 6724056, TextColor.BLUE),
|
||||
YELLOW("yellow", "Gelb", "Gelbes", "Gelber", "Gelbe", null, "Gelber Farbstoff", 15066419, TextColor.YELLOW),
|
||||
LIME("lime", "Hellgrün", "Hellgrünes", "Hellgrüner", "Hellgrüne", null, "Hellgrüner Farbstoff", 8375321, TextColor.GREEN),
|
||||
PINK("pink", "Rosa", "Rosa", "Rosa", "Rosa", null, "Rosa Farbstoff", 15892389, TextColor.MAGENTA),
|
||||
GRAY("gray", "Grau", "Graues", "Grauer", "Graue", null, "Grauer Farbstoff", 5000268, TextColor.GRAY),
|
||||
SILVER("silver", "Hellgrau", "Hellgraues", "Hellgrauer", "Hellgraue", null, "Hellgrauer Farbstoff", 10066329, TextColor.LGRAY),
|
||||
CYAN("cyan", "Türkis", "Türkises", "Türkiser", "Türkise", null, "Türkiser Farbstoff", 5013401, TextColor.CYAN),
|
||||
PURPLE("purple", "Violett", "Violettes", "Violetter", "Violette", null, "Violetter Farbstoff", 8339378, TextColor.DMAGENTA),
|
||||
BLUE("blue", "Blau", "Blaues", "Blauer", "Blaue", "lapis_lazuli", "Lapislazuli", 3361970, TextColor.MIDNIGHT),
|
||||
BROWN("brown", "Braun", "Braunes", "Brauner", "Braune", "cocoa_powder", "Gemahlene Kakaobohnen", 6704179, TextColor.BROWN),
|
||||
GREEN("green", "Grün", "Grünes", "Grüner", "Grüne", null, "Kaktusgrün", 6717235, TextColor.DGREEN),
|
||||
RED("red", "Rot", "Rotes", "Roter", "Rote", null, "Roter Farbstoff", 10040115, TextColor.DRED),
|
||||
BLACK("black", "Schwarz", "Schwarzes", "Schwarzer", "Schwarze", "ink_sack", "Tintenbeutel", 1644825, TextColor.BLACK);
|
||||
|
||||
private static final Map<String, DyeColor> LOOKUP = Maps.newHashMap();
|
||||
|
||||
private final String name;
|
||||
private final String display;
|
||||
private final String subject;
|
||||
private final String msubject;
|
||||
private final String fsubject;
|
||||
private final String dye;
|
||||
private final String dyeName;
|
||||
private final int color;
|
||||
private final TextColor textColor;
|
||||
|
||||
static {
|
||||
for(DyeColor color : values()) {
|
||||
LOOKUP.put(color.name, color);
|
||||
}
|
||||
}
|
||||
|
||||
public static DyeColor byName(String name) {
|
||||
DyeColor type = LOOKUP.get(name.toLowerCase());
|
||||
return type == null ? WHITE : type;
|
||||
}
|
||||
|
||||
public static DyeColor getExact(String name) {
|
||||
return LOOKUP.get(name.toLowerCase());
|
||||
}
|
||||
|
||||
private DyeColor(String name, String display, String subject, String msubject, String fsubject, String dye, String dyeName, int color, TextColor textColor) {
|
||||
this.name = name;
|
||||
this.display = display;
|
||||
this.subject = subject;
|
||||
this.msubject = msubject;
|
||||
this.fsubject = fsubject;
|
||||
this.dye = dye == null ? name + "_dye" : dye;
|
||||
this.dyeName = dyeName;
|
||||
this.color = color;
|
||||
this.textColor = textColor;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public String getSubject(Integer type) {
|
||||
return type == null ? this.display : (type < 0 ? this.fsubject : (type > 0 ? this.msubject : this.subject));
|
||||
}
|
||||
|
||||
public String getDye() {
|
||||
return this.dye;
|
||||
}
|
||||
|
||||
public String getDyeName() {
|
||||
return this.dyeName;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
public TextColor getTextColor() {
|
||||
return this.textColor;
|
||||
}
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
package common.color;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import common.util.Util;
|
||||
|
||||
public enum TextColor {
|
||||
NULL(0x00, "null"),
|
||||
RESET(0x01, 0, "reset", 'D'),
|
||||
CRIMSON(0x02, 0x601010, "crimson", 'C'),
|
||||
DRED(0x03, 0x7f0000, "dark_red", 'r'),
|
||||
RED(0x04, 0xcf0000, "red", 'R'),
|
||||
DBROWN(0x05, 0x56250b, "dark_brown", 'w'),
|
||||
ORANGE(0x06, 0xff7000, "orange", 'o'),
|
||||
BROWN(0x07, 0x8c5606, "brown", 'W'),
|
||||
LBROWN(0x08, 0x9c7636, "light_brown", 'l'),
|
||||
BEIGE(0x09, 0xcfcfaf, "beige", 'L'),
|
||||
NEWLINE(0x0a, "newline"),
|
||||
YELLOW(0x0b, 0xbfbf00, "yellow", 'y'),
|
||||
LYELLOW(0x0c, 0xffff7f, "light_yellow", 'Y'),
|
||||
ORK(0x0d, 0x487c00, "ork_green", 'O'),
|
||||
ACID(0x0e, 0x80ff00, "acid_green", 'a'),
|
||||
DGREEN(0x0f, 0x007f00, "dark_green", 'g'),
|
||||
GREEN(0x10, 0x00cf00, "green", 'G'),
|
||||
COMMAND(0x11, 0x00ff80, "command_green", 'd'),
|
||||
CYAN(0x12, 0x00bfbf, "cyan", 'c'),
|
||||
NEON(0x13, 0x80c0f0, "neon", 'n'),
|
||||
MIDNIGHT(0x14, 0x000080, "midnight", 'm'),
|
||||
BLUE(0x15, 0x0000cf, "blue", 'b'),
|
||||
LBLUE(0x16, 0x5f5fff, "light_blue", 'B'),
|
||||
VIOLET(0x17, 0x6000ff, "violet", 'V'),
|
||||
DVIOLET(0x18, 0x5400be, "dark_violet", 'v'),
|
||||
DMAGENTA(0x19, 0x6f006f, "dark_magenta", 'm'),
|
||||
MAGENTA(0x1a, 0xbf00bf, "magenta", 'M'),
|
||||
WHITE(0x1b, 0xffffff, "white", '4'),
|
||||
LGRAY(0x1c, 0xc0c0c0, "light_gray", '3'),
|
||||
GRAY(0x1d, 0x808080, "gray", '2'),
|
||||
DGRAY(0x1e, 0x585858, "dark_gray", '1'),
|
||||
BLACK(0x1f, 0x000000, "black", '0'),
|
||||
SPACE(0x20, "space"),
|
||||
UNKNOWN(0x7f, "unknown"),
|
||||
SGA_A(0x80, "dc_a"),
|
||||
SGA_Z(0x99, "dc_z"),
|
||||
BUG(0x9a, "bug"),
|
||||
INVALID(0x9b, "invalid"),
|
||||
DEMON(0x9c, "demon"),
|
||||
IMP(0x9d, "imp"),
|
||||
HORNS(0x9e, "horns"),
|
||||
BLKHEART(0x9f, "heart");
|
||||
|
||||
private static final Pattern STRIP_PATTERN = Pattern.compile("[\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u0009\u000b\u000c\r\u000e\u000f"
|
||||
+ "\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f]");
|
||||
|
||||
private static final int[] COLORS = new int[32];
|
||||
private static final int[] SHADOW = new int[32];
|
||||
|
||||
private final String format;
|
||||
public final char code;
|
||||
public final String id;
|
||||
public final char colorId;
|
||||
public final int color;
|
||||
public final int shadow;
|
||||
|
||||
public static String stripCodes(String text) {
|
||||
return text == null ? null : STRIP_PATTERN.matcher(text).replaceAll("");
|
||||
}
|
||||
|
||||
public static int getColor(char code) {
|
||||
return code < COLORS.length ? COLORS[code] : 0x000000;
|
||||
}
|
||||
|
||||
public static int getShadow(char code) {
|
||||
return code < SHADOW.length ? SHADOW[code] : 0x000000;
|
||||
}
|
||||
|
||||
private TextColor(int code, String id) {
|
||||
this(code, 0, id, (char)0);
|
||||
}
|
||||
|
||||
private TextColor(int code, int color, String id, char colorId) {
|
||||
this.format = Character.toString(this.code = (char)code);
|
||||
this.color = color;
|
||||
this.shadow = Util.mixColor(Util.mixColor(this.color, 0x000000), 0x000000);
|
||||
this.id = id;
|
||||
this.colorId = colorId;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.format;
|
||||
}
|
||||
|
||||
static {
|
||||
for(TextColor color : values()) {
|
||||
if(color.code < COLORS.length) {
|
||||
COLORS[color.code] = color.color;
|
||||
SHADOW[color.code] = color.shadow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,12 +2,12 @@ package common.effect;
|
|||
|
||||
import java.util.Map;
|
||||
import common.collect.Maps;
|
||||
import common.color.TextColor;
|
||||
import common.entity.DamageSource;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.projectile.EntityPotion;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.item.ItemStack;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
|
||||
public enum Effect {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package common.entity;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.entity.projectile.EntityProjectile;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.util.TextColor;
|
||||
import common.world.Explosion;
|
||||
|
||||
public class DamageSource
|
||||
|
@ -24,13 +24,13 @@ public class DamageSource
|
|||
public static final DamageSource fall =
|
||||
(new DamageSource(TextColor.NEON, "%s fiel der Schwerkraft zum Opfer")).setDamageBypassesArmor();
|
||||
public static final DamageSource outOfWorld =
|
||||
(new DamageSource(TextColor.DGRAY, "%s fiel aus der Welt")).setDamageBypassesArmor();
|
||||
(new DamageSource(TextColor.DARK_GRAY, "%s fiel aus der Welt")).setDamageBypassesArmor();
|
||||
public static final DamageSource generic =
|
||||
(new DamageSource(TextColor.LGRAY, "%s starb")).setDamageBypassesArmor();
|
||||
(new DamageSource(TextColor.LIGHT_GRAY, "%s starb")).setDamageBypassesArmor();
|
||||
public static final DamageSource magic =
|
||||
(new DamageSource(TextColor.DMAGENTA, "%s wurde durch Magie getötet")).setDamageBypassesArmor().setMagicDamage();
|
||||
(new DamageSource(TextColor.DARK_MAGENTA, "%s wurde durch Magie getötet")).setDamageBypassesArmor().setMagicDamage();
|
||||
public static final DamageSource anvil =
|
||||
new DamageSource(TextColor.DRED, "%s wurde von einem fallenden Amboss zerquetscht");
|
||||
new DamageSource(TextColor.DARK_RED, "%s wurde von einem fallenden Amboss zerquetscht");
|
||||
public static final DamageSource fallingBlock =
|
||||
new DamageSource(TextColor.GRAY, "%s wurde von einem fallenden Block zerquetscht");
|
||||
public static final DamageSource radiation =
|
||||
|
@ -62,8 +62,8 @@ public class DamageSource
|
|||
|
||||
public static DamageSource causeExterminatusDamage(EntityLiving mob)
|
||||
{
|
||||
return mob == null ? new DamageSource(TextColor.DRED, "%s wurde vernichtet") :
|
||||
new EntityDamageSource(TextColor.DRED, "%s wurde von %s vernichtet", "%s wurde von %s mit %s vernichtet",
|
||||
return mob == null ? new DamageSource(TextColor.DARK_RED, "%s wurde vernichtet") :
|
||||
new EntityDamageSource(TextColor.DARK_RED, "%s wurde von %s vernichtet", "%s wurde von %s mit %s vernichtet",
|
||||
"%s vernichtet", "%s mit %s vernichtet", mob);
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ public class DamageSource
|
|||
|
||||
public static DamageSource causeThrownDamage(Entity source, Entity thrower)
|
||||
{
|
||||
return (new EntityDamageSourceIndirect(TextColor.DGREEN, "%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(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();
|
||||
}
|
||||
|
||||
public static DamageSource causeTeleFragDamage(Entity source, Entity replacer)
|
||||
|
@ -89,7 +89,7 @@ public class DamageSource
|
|||
|
||||
public static DamageSource causeIndirectMagicDamage(Entity source, Entity mage)
|
||||
{
|
||||
return (new EntityDamageSourceIndirect(TextColor.DMAGENTA, "%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(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();
|
||||
}
|
||||
|
||||
public static DamageSource causeThornsDamage(Entity source)
|
||||
|
|
|
@ -9,7 +9,6 @@ import common.block.artificial.BlockFence;
|
|||
import common.block.artificial.BlockFenceGate;
|
||||
import common.block.artificial.BlockWall;
|
||||
import common.block.liquid.BlockLiquid;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Space;
|
||||
import common.enchantment.Enchantment;
|
||||
|
@ -38,6 +37,7 @@ import common.util.ParticleType;
|
|||
import common.util.PortalType;
|
||||
import common.util.Position;
|
||||
import common.util.Serverside;
|
||||
import common.util.TextColor;
|
||||
import common.util.Vec3;
|
||||
import common.vars.Vars;
|
||||
import common.world.Explosion;
|
||||
|
@ -2415,7 +2415,7 @@ public abstract class Entity
|
|||
|
||||
public final String getColoredName(TextColor reset)
|
||||
{
|
||||
return TextColor.DGRAY + "[" + this.getName() + TextColor.DGRAY + "]" + reset;
|
||||
return TextColor.DARK_GRAY + "[" + this.getName() + TextColor.DARK_GRAY + "]" + reset;
|
||||
}
|
||||
|
||||
// public Text formatComponent(Text comp) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package common.entity;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.item.ItemStack;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class EntityDamageSource extends DamageSource
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package common.entity;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.item.ItemStack;
|
||||
import common.util.TextColor;
|
||||
|
||||
public class EntityDamageSourceIndirect extends EntityDamageSource
|
||||
{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package common.entity.animal;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import common.ai.EntityAIEatGrass;
|
||||
import common.ai.EntityAIFollowParent;
|
||||
import common.ai.EntityAILookIdle;
|
||||
|
@ -12,8 +10,6 @@ import common.ai.EntityAITempt;
|
|||
import common.ai.EntityAIWander;
|
||||
import common.ai.EntityAIWatchClosest;
|
||||
import common.block.artificial.BlockWool;
|
||||
import common.collect.Maps;
|
||||
import common.color.DyeColor;
|
||||
import common.entity.item.EntityItem;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityAnimal;
|
||||
|
@ -33,6 +29,7 @@ import common.rng.Random;
|
|||
import common.tags.TagObject;
|
||||
import common.util.Clientside;
|
||||
import common.util.ExtMath;
|
||||
import common.util.TextColor;
|
||||
import common.world.World;
|
||||
|
||||
public class EntitySheep extends EntityAnimal
|
||||
|
@ -48,7 +45,6 @@ public class EntitySheep extends EntityAnimal
|
|||
return false;
|
||||
}
|
||||
}, 2, 1);
|
||||
private static final Map<DyeColor, float[]> DYE_TO_RGB = Maps.newEnumMap(DyeColor.class);
|
||||
|
||||
/**
|
||||
* Used to control movement as well as wool regrowth. Set to 40 on handleHealthUpdate and counts down with each
|
||||
|
@ -57,11 +53,6 @@ public class EntitySheep extends EntityAnimal
|
|||
private int sheepTimer;
|
||||
private EntityAIEatGrass entityAIEatGrass = new EntityAIEatGrass(this);
|
||||
|
||||
public static float[] getDyeRgb(DyeColor dyeColor)
|
||||
{
|
||||
return (float[])DYE_TO_RGB.get(dyeColor);
|
||||
}
|
||||
|
||||
public EntitySheep(World worldIn)
|
||||
{
|
||||
super(worldIn);
|
||||
|
@ -109,7 +100,7 @@ public class EntitySheep extends EntityAnimal
|
|||
{
|
||||
super.entityInit();
|
||||
this.dataWatcher.addObject(16, (byte)0);
|
||||
this.dataWatcher.addObject(17, (byte)(DyeColor.WHITE.ordinal() & 255));
|
||||
this.dataWatcher.addObject(17, (byte)(TextColor.WHITE.ordinal() & 255));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +209,7 @@ public class EntitySheep extends EntityAnimal
|
|||
{
|
||||
super.readEntity(tagCompund);
|
||||
this.setSheared(tagCompund.getBool("Sheared"));
|
||||
this.setFleeceColor(DyeColor.byName(tagCompund.getString("Color")));
|
||||
this.setFleeceColor(TextColor.byName(tagCompund.getString("Color")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -253,15 +244,15 @@ public class EntitySheep extends EntityAnimal
|
|||
/**
|
||||
* Gets the wool color of this sheep.
|
||||
*/
|
||||
public DyeColor getFleeceColor()
|
||||
public TextColor getFleeceColor()
|
||||
{
|
||||
return DyeColor.values()[(this.dataWatcher.getWatchableObjectByte(17) & 255) % DyeColor.values().length];
|
||||
return TextColor.values()[(this.dataWatcher.getWatchableObjectByte(17) & 255) % TextColor.values().length];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the wool color of this sheep
|
||||
*/
|
||||
public void setFleeceColor(DyeColor color)
|
||||
public void setFleeceColor(TextColor color)
|
||||
{
|
||||
this.dataWatcher.updateObject(17, (byte)(color.ordinal() & 255));
|
||||
}
|
||||
|
@ -282,23 +273,23 @@ public class EntitySheep extends EntityAnimal
|
|||
this.dataWatcher.updateObject(16, (byte)(sheared ? 1 : 0));
|
||||
}
|
||||
|
||||
private static final DyeColor[] RARE_COLORS = {
|
||||
DyeColor.BLUE, DyeColor.CYAN, DyeColor.GREEN, DyeColor.LIGHT_BLUE, DyeColor.LIME,
|
||||
DyeColor.MAGENTA, DyeColor.ORANGE, DyeColor.PINK, DyeColor.PURPLE, DyeColor.RED
|
||||
private static final TextColor[] RARE_COLORS = {
|
||||
TextColor.BLUE, TextColor.CYAN, TextColor.DARK_GREEN, TextColor.LIGHT_BLUE, TextColor.GREEN,
|
||||
TextColor.MAGENTA, TextColor.ORANGE, TextColor.DARK_VIOLET, TextColor.VIOLET, TextColor.RED
|
||||
};
|
||||
|
||||
public static DyeColor getRandomSheepColor(Random random, float temp)
|
||||
public static TextColor getRandomSheepColor(Random random, float temp)
|
||||
{
|
||||
if(temp <= 0.0f)
|
||||
return DyeColor.WHITE;
|
||||
return TextColor.WHITE;
|
||||
int i = random.zrange(140);
|
||||
return i < 20 ? DyeColor.BLACK :
|
||||
(i < 30 ? DyeColor.GRAY :
|
||||
(i < 40 ? DyeColor.SILVER :
|
||||
(i < 70 ? DyeColor.BROWN :
|
||||
(i < 120 ? DyeColor.WHITE :
|
||||
(i < 130 ? (random.chance(10) ? RARE_COLORS[i - 120] : DyeColor.WHITE) :
|
||||
(random.chance(500) ? DyeColor.YELLOW : DyeColor.WHITE)
|
||||
return i < 20 ? TextColor.BLACK :
|
||||
(i < 30 ? TextColor.GRAY :
|
||||
(i < 40 ? TextColor.LIGHT_GRAY :
|
||||
(i < 70 ? TextColor.BROWN :
|
||||
(i < 120 ? TextColor.WHITE :
|
||||
(i < 130 ? (random.chance(10) ? RARE_COLORS[i - 120] : TextColor.WHITE) :
|
||||
(random.chance(500) ? TextColor.YELLOW : TextColor.WHITE)
|
||||
)))));
|
||||
}
|
||||
|
||||
|
@ -331,14 +322,14 @@ public class EntitySheep extends EntityAnimal
|
|||
return livingdata;
|
||||
}
|
||||
|
||||
private DyeColor getDyeColorMixFromParents(EntityAnimal father, EntityAnimal mother)
|
||||
private TextColor getDyeColorMixFromParents(EntityAnimal father, EntityAnimal mother)
|
||||
{
|
||||
DyeColor i = ((EntitySheep)father).getFleeceColor();
|
||||
DyeColor j = ((EntitySheep)mother).getFleeceColor();
|
||||
TextColor i = ((EntitySheep)father).getFleeceColor();
|
||||
TextColor j = ((EntitySheep)mother).getFleeceColor();
|
||||
this.inventoryCrafting.setInventorySlotContents(0, new ItemStack(ItemDye.getByColor(i)));
|
||||
this.inventoryCrafting.setInventorySlotContents(1, new ItemStack(ItemDye.getByColor(j)));
|
||||
ItemStack itemstack = CraftingRegistry.getMatching(this.inventoryCrafting);
|
||||
DyeColor k;
|
||||
TextColor k;
|
||||
|
||||
if (itemstack != null && itemstack.getItem() instanceof ItemDye dye)
|
||||
{
|
||||
|
@ -360,24 +351,4 @@ public class EntitySheep extends EntityAnimal
|
|||
public int getColor() {
|
||||
return 0xd9d9d9;
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
DYE_TO_RGB.put(DyeColor.WHITE, new float[] {1.0F, 1.0F, 1.0F});
|
||||
DYE_TO_RGB.put(DyeColor.ORANGE, new float[] {0.85F, 0.5F, 0.2F});
|
||||
DYE_TO_RGB.put(DyeColor.MAGENTA, new float[] {0.7F, 0.3F, 0.85F});
|
||||
DYE_TO_RGB.put(DyeColor.LIGHT_BLUE, new float[] {0.4F, 0.6F, 0.85F});
|
||||
DYE_TO_RGB.put(DyeColor.YELLOW, new float[] {0.9F, 0.9F, 0.2F});
|
||||
DYE_TO_RGB.put(DyeColor.LIME, new float[] {0.5F, 0.8F, 0.1F});
|
||||
DYE_TO_RGB.put(DyeColor.PINK, new float[] {0.95F, 0.5F, 0.65F});
|
||||
DYE_TO_RGB.put(DyeColor.GRAY, new float[] {0.3F, 0.3F, 0.3F});
|
||||
DYE_TO_RGB.put(DyeColor.SILVER, new float[] {0.6F, 0.6F, 0.6F});
|
||||
DYE_TO_RGB.put(DyeColor.CYAN, new float[] {0.3F, 0.5F, 0.6F});
|
||||
DYE_TO_RGB.put(DyeColor.PURPLE, new float[] {0.5F, 0.25F, 0.7F});
|
||||
DYE_TO_RGB.put(DyeColor.BLUE, new float[] {0.2F, 0.3F, 0.7F});
|
||||
DYE_TO_RGB.put(DyeColor.BROWN, new float[] {0.4F, 0.3F, 0.2F});
|
||||
DYE_TO_RGB.put(DyeColor.GREEN, new float[] {0.4F, 0.5F, 0.2F});
|
||||
DYE_TO_RGB.put(DyeColor.RED, new float[] {0.6F, 0.2F, 0.2F});
|
||||
DYE_TO_RGB.put(DyeColor.BLACK, new float[] {0.1F, 0.1F, 0.1F});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import common.ai.EntityAISwimming;
|
|||
import common.ai.EntityAITargetNonTamed;
|
||||
import common.ai.EntityAIWander;
|
||||
import common.ai.EntityAIWatchClosest;
|
||||
import common.color.DyeColor;
|
||||
import common.entity.DamageSource;
|
||||
import common.entity.Entity;
|
||||
import common.entity.npc.Alignment;
|
||||
|
@ -34,6 +33,7 @@ import common.tags.TagObject;
|
|||
import common.util.Clientside;
|
||||
import common.util.ExtMath;
|
||||
import common.util.ParticleType;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
import common.world.World;
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class EntityWolf extends EntityTameable
|
|||
super.entityInit();
|
||||
this.dataWatcher.addObject(18, this.getHealth());
|
||||
this.dataWatcher.addObject(19, (byte)0);
|
||||
this.dataWatcher.addObject(20, (byte)(DyeColor.RED.ordinal() & 255));
|
||||
this.dataWatcher.addObject(20, (byte)(TextColor.RED.ordinal() & 255));
|
||||
}
|
||||
|
||||
// protected void playStepSound(BlockPos pos, Block blockIn)
|
||||
|
@ -137,7 +137,7 @@ public class EntityWolf extends EntityTameable
|
|||
{
|
||||
super.readEntity(tagCompund);
|
||||
this.setAngry(tagCompund.getBool("Angry"));
|
||||
this.setCollarColor(DyeColor.byName(tagCompund.getString("CollarColor")));
|
||||
this.setCollarColor(TextColor.byName(tagCompund.getString("CollarColor")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -373,7 +373,7 @@ public class EntityWolf extends EntityTameable
|
|||
}
|
||||
else if (itemstack.getItem() instanceof ItemDye dye)
|
||||
{
|
||||
DyeColor enumdyecolor = dye.getColor();
|
||||
TextColor enumdyecolor = dye.getColor();
|
||||
|
||||
if (enumdyecolor != this.getCollarColor())
|
||||
{
|
||||
|
@ -492,12 +492,12 @@ public class EntityWolf extends EntityTameable
|
|||
}
|
||||
}
|
||||
|
||||
public DyeColor getCollarColor()
|
||||
public TextColor getCollarColor()
|
||||
{
|
||||
return DyeColor.values()[(this.dataWatcher.getWatchableObjectByte(20) & 255) % DyeColor.values().length];
|
||||
return TextColor.values()[(this.dataWatcher.getWatchableObjectByte(20) & 255) % TextColor.values().length];
|
||||
}
|
||||
|
||||
public void setCollarColor(DyeColor collarcolor)
|
||||
public void setCollarColor(TextColor collarcolor)
|
||||
{
|
||||
this.dataWatcher.updateObject(20, (byte)(collarcolor.ordinal() & 255));
|
||||
}
|
||||
|
@ -593,12 +593,7 @@ public class EntityWolf extends EntityTameable
|
|||
}
|
||||
|
||||
public int getLeashColor() {
|
||||
if(this.isTamed()) {
|
||||
DyeColor color = this.getCollarColor();
|
||||
float[] rgb = EntitySheep.getDyeRgb(color);
|
||||
return (((int)(rgb[0] * 255.0f)) << 16) | (((int)(rgb[1] * 255.0f)) << 8) | ((int)(rgb[2] * 255.0f));
|
||||
}
|
||||
return super.getLeashColor();
|
||||
return this.isTamed() ? this.getCollarColor().getColor() : super.getLeashColor();
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package common.entity.item;
|
||||
|
||||
import common.block.Material;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Dimension;
|
||||
import common.entity.DamageSource;
|
||||
import common.entity.Entity;
|
||||
|
@ -19,6 +18,7 @@ import common.util.BlockPos;
|
|||
import common.util.ExtMath;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
import common.world.World;
|
||||
import common.world.AWorldServer;
|
||||
|
@ -599,7 +599,7 @@ public class EntityItem extends Entity
|
|||
ItemStack stack = this.getEntityItem();
|
||||
if(!stack.isStacked())
|
||||
return null;
|
||||
return TextColor.DGREEN + "" + stack.getSize();
|
||||
return TextColor.DARK_GREEN + "" + stack.getSize();
|
||||
}
|
||||
|
||||
public EntityType getType() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package common.entity.item;
|
||||
|
||||
import common.block.Material;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Dimension;
|
||||
import common.entity.DamageSource;
|
||||
import common.entity.Entity;
|
||||
|
@ -15,6 +14,7 @@ import common.util.Clientside;
|
|||
import common.util.ExtMath;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.util.TextColor;
|
||||
import common.vars.Vars;
|
||||
import common.world.World;
|
||||
|
||||
|
|
|
@ -3,18 +3,18 @@ package common.entity.npc;
|
|||
import java.util.Map;
|
||||
|
||||
import common.collect.Maps;
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
public enum Alignment {
|
||||
LAWFUL_GOOD("lgood", "Rechtsch. gut", 1, 1, TextColor.NEON),
|
||||
GOOD("good", "Gut", 0, 1, TextColor.BLUE),
|
||||
CHAOTIC_GOOD("cgood", "Chaotisch gut", -1, 1, TextColor.CYAN),
|
||||
LAWFUL("lawful", "Rechtschaffen", 1, 0, TextColor.WHITE),
|
||||
NEUTRAL("neutral", "Neutral", 0, 0, TextColor.LGRAY),
|
||||
NEUTRAL("neutral", "Neutral", 0, 0, TextColor.LIGHT_GRAY),
|
||||
CHAOTIC("chaotic", "Chaotisch", -1, 0, TextColor.GRAY),
|
||||
LAWFUL_EVIL("levil", "Rechtsch. böse", 1, -1, TextColor.ORANGE),
|
||||
EVIL("evil", "Böse", 0, -1, TextColor.RED),
|
||||
CHAOTIC_EVIL("cevil", "Chaotisch böse", -1, -1, TextColor.DRED);
|
||||
CHAOTIC_EVIL("cevil", "Chaotisch böse", -1, -1, TextColor.DARK_RED);
|
||||
|
||||
private static final Map<String, Alignment> LOOKUP = Maps.newHashMap();
|
||||
|
||||
|
@ -35,9 +35,9 @@ public enum Alignment {
|
|||
this.color = color;
|
||||
this.name = name;
|
||||
this.display = display;
|
||||
this.prefix = TextColor.GRAY + "[" + (temper == 0 && morale == 0 ? TextColor.LGRAY + "~" : "") +
|
||||
this.prefix = TextColor.GRAY + "[" + (temper == 0 && morale == 0 ? TextColor.LIGHT_GRAY + "~" : "") +
|
||||
(this.good ? TextColor.BLUE + "*" : (this.evil ? TextColor.RED + "!" : "")) +
|
||||
(this.lawful ? TextColor.GREEN + "+" : (this.chaotic ? TextColor.DMAGENTA + "-" : "")) +
|
||||
(this.lawful ? TextColor.GREEN + "+" : (this.chaotic ? TextColor.DARK_MAGENTA + "-" : "")) +
|
||||
TextColor.GRAY + "]";
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import common.attributes.UsageSlot;
|
|||
import common.block.Block;
|
||||
import common.block.artificial.BlockBed;
|
||||
import common.collect.Lists;
|
||||
import common.color.TextColor;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Space;
|
||||
import common.effect.Effect;
|
||||
|
@ -93,6 +92,7 @@ import common.util.ExtMath;
|
|||
import common.util.Facing;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.util.TextColor;
|
||||
import common.util.Vec3;
|
||||
import common.util.WorldPos;
|
||||
import common.vars.Vars;
|
||||
|
|
|
@ -19,7 +19,6 @@ import common.block.Block;
|
|||
import common.block.SoundType;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.color.TextColor;
|
||||
import common.effect.Effect;
|
||||
import common.effect.StatusEffect;
|
||||
import common.enchantment.EnchantmentHelper;
|
||||
|
@ -58,6 +57,7 @@ import common.util.Clientside;
|
|||
import common.util.ExtMath;
|
||||
import common.util.ParticleType;
|
||||
import common.util.Serverside;
|
||||
import common.util.TextColor;
|
||||
import common.util.Vec3;
|
||||
import common.vars.Vars;
|
||||
import common.world.State;
|
||||
|
@ -2245,13 +2245,13 @@ public abstract class EntityLiving extends Entity
|
|||
|
||||
public static TextColor getHealthColor(int health, int max) {
|
||||
float perc = (float)health / (float)max;
|
||||
return /* health <= 1.0f ? ChatFormat.DARK_RED : ( */ perc >= 1.0f ? TextColor.DGREEN : (perc >= 0.75f ? TextColor.GREEN :
|
||||
(perc >= 0.5f ? TextColor.YELLOW : (perc >= 0.25f ? TextColor.ORANGE : (perc >= 0.1f ? TextColor.RED : TextColor.DRED))));
|
||||
return /* health <= 1.0f ? ChatFormat.DARK_RED : ( */ perc >= 1.0f ? TextColor.DARK_GREEN : (perc >= 0.75f ? TextColor.GREEN :
|
||||
(perc >= 0.5f ? TextColor.YELLOW : (perc >= 0.25f ? TextColor.ORANGE : (perc >= 0.1f ? TextColor.RED : TextColor.DARK_RED))));
|
||||
}
|
||||
|
||||
public static TextColor getMaxHpColor(int max) {
|
||||
return max >= 2000 ? TextColor.BLACK : (max >= 500 ? TextColor.DMAGENTA : (max >= 120 ? TextColor.MAGENTA :
|
||||
(max >= 40 ? TextColor.CYAN : (max >= 15 ? TextColor.NEON : (max >= 5 ? TextColor.BLUE : TextColor.LGRAY)))));
|
||||
return max >= 2000 ? TextColor.BLACK : (max >= 500 ? TextColor.DARK_MAGENTA : (max >= 120 ? TextColor.MAGENTA :
|
||||
(max >= 40 ? TextColor.CYAN : (max >= 15 ? TextColor.NEON : (max >= 5 ? TextColor.BLUE : TextColor.LIGHT_GRAY)))));
|
||||
}
|
||||
|
||||
public int getEnergy(Energy type) {
|
||||
|
@ -2327,7 +2327,7 @@ public abstract class EntityLiving extends Entity
|
|||
String kill;
|
||||
IPlayer receiver = null;
|
||||
if(this.combat.size() == 0) {
|
||||
msg = kill = natural ? String.format("%s starb", this.getColoredName(TextColor.LGRAY)) : null;
|
||||
msg = kill = natural ? String.format("%s starb", this.getColoredName(TextColor.LIGHT_GRAY)) : null;
|
||||
}
|
||||
else {
|
||||
CombatEntry strong = null;
|
||||
|
|
|
@ -129,12 +129,12 @@ import common.collect.BiMap;
|
|||
import common.collect.HashBiMap;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.color.DyeColor;
|
||||
import common.item.CheatTab;
|
||||
import common.log.Log;
|
||||
import common.model.TextureAnimation;
|
||||
import common.properties.Property;
|
||||
import common.util.PortalType;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
import common.world.State;
|
||||
|
||||
|
@ -265,7 +265,7 @@ public abstract class BlockRegistry {
|
|||
.setDisplay("Obsidian").setMiningLevel(3));
|
||||
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"));
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
register(color.getName() + "_clay", (new BlockColoredClay(color)).setHardness(1.25F).setResistance(7.0F)
|
||||
.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));
|
||||
|
||||
register("glass", (new BlockGlass()).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay("Glas"));
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
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"));
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
register(color.getName() + "_glass_pane", (new BlockStainedGlassPane(color)).setHardness(0.3F).setSound(SoundType.GLASS).setDisplay(color.getDisplay() + " gefärbte Glasscheibe"));
|
||||
}
|
||||
|
||||
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
register(color.getName() + "_wool", (new BlockWool(color)).setHardness(0.8F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(-1) + " Wolle")
|
||||
.setShearsEfficiency(1));
|
||||
}
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
register(color.getName() + "_carpet", (new BlockCarpet(color)).setHardness(0.1F).setSound(SoundType.CLOTH).setDisplay(color.getSubject(1) + " Teppich").setOpacity(0));
|
||||
}
|
||||
for(DyeColor color : BlockBed.COLORS) {
|
||||
for(TextColor color : BlockBed.COLORS) {
|
||||
register(color.getName() + "_bed", (new BlockBed(color)).setSound(SoundType.WOOD).setHardness(0.2F).setDisplay(color.getSubject(0) + " Bett"));
|
||||
}
|
||||
|
||||
|
|
|
@ -297,11 +297,6 @@ public abstract class Blocks {
|
|||
public static final BlockStainedGlassPane light_blue_glass_pane = get("light_blue_glass_pane");
|
||||
public static final BlockWool light_blue_wool = get("light_blue_wool");
|
||||
public static final BlockPressurePlateWeighted light_weighted_pressure_plate = get("light_weighted_pressure_plate");
|
||||
public static final BlockCarpet lime_carpet = get("lime_carpet");
|
||||
public static final BlockColoredClay lime_clay = get("lime_clay");
|
||||
public static final BlockStainedGlass lime_glass = get("lime_glass");
|
||||
public static final BlockStainedGlassPane lime_glass_pane = get("lime_glass_pane");
|
||||
public static final BlockWool lime_wool = get("lime_wool");
|
||||
public static final BlockFurnace lit_furnace = get("lit_furnace");
|
||||
public static final BlockMetalBlock lithium_block = get("lithium_block");
|
||||
public static final BlockMetalOre lithium_ore = get("lithium_ore");
|
||||
|
@ -375,12 +370,7 @@ public abstract class Blocks {
|
|||
public static final Block pentagram = get("pentagram");
|
||||
public static final BlockMetalBlock phosphor_block = get("phosphor_block");
|
||||
public static final BlockMetalOre phosphor_ore = get("phosphor_ore");
|
||||
public static final BlockCarpet pink_carpet = get("pink_carpet");
|
||||
public static final BlockColoredClay pink_clay = get("pink_clay");
|
||||
public static final BlockStainedGlass pink_glass = get("pink_glass");
|
||||
public static final BlockStainedGlassPane pink_glass_pane = get("pink_glass_pane");
|
||||
public static final BlockFlower pink_tulip = get("pink_tulip");
|
||||
public static final BlockWool pink_wool = get("pink_wool");
|
||||
public static final BlockPistonBase piston = get("piston");
|
||||
public static final BlockPistonHead piston_head = get("piston_head");
|
||||
public static final BlockPistonHead sticky_piston_head = get("sticky_piston_head");
|
||||
|
@ -398,12 +388,6 @@ public abstract class Blocks {
|
|||
public static final BlockMetalOre praseodymium_ore = get("praseodymium_ore");
|
||||
public static final BlockPumpkin pumpkin = get("pumpkin");
|
||||
public static final BlockStem pumpkin_stem = get("pumpkin_stem");
|
||||
public static final BlockBed purple_bed = get("purple_bed");
|
||||
public static final BlockCarpet purple_carpet = get("purple_carpet");
|
||||
public static final BlockColoredClay purple_clay = get("purple_clay");
|
||||
public static final BlockStainedGlass purple_glass = get("purple_glass");
|
||||
public static final BlockStainedGlassPane purple_glass_pane = get("purple_glass_pane");
|
||||
public static final BlockWool purple_wool = get("purple_wool");
|
||||
public static final BlockQuartz quartz_block = get("quartz_block");
|
||||
public static final BlockOre quartz_ore = get("quartz_ore");
|
||||
public static final BlockQuartz quartz_ornaments = get("quartz_ornaments");
|
||||
|
@ -442,12 +426,7 @@ public abstract class Blocks {
|
|||
public static final BlockMetalBlock silicon_block = get("silicon_block");
|
||||
public static final BlockMetalOre silicon_ore = get("silicon_ore");
|
||||
public static final BlockMetalBlock silver_block = get("silver_block");
|
||||
public static final BlockCarpet silver_carpet = get("silver_carpet");
|
||||
public static final BlockColoredClay silver_clay = get("silver_clay");
|
||||
public static final BlockStainedGlass silver_glass = get("silver_glass");
|
||||
public static final BlockStainedGlassPane silver_glass_pane = get("silver_glass_pane");
|
||||
public static final BlockMetalOre silver_ore = get("silver_ore");
|
||||
public static final BlockWool silver_wool = get("silver_wool");
|
||||
public static final BlockSkull skull = get("skull");
|
||||
public static final BlockStaticLiquid slime = get("slime");
|
||||
public static final BlockSlime slime_block = get("slime_block");
|
||||
|
@ -617,6 +596,87 @@ public abstract class Blocks {
|
|||
public static final BlockPortal shining_portal = get("shining_portal");
|
||||
public static final BlockStaticLiquid milk = get("milk");
|
||||
public static final BlockDynamicLiquid flowing_milk = get("flowing_milk");
|
||||
public static final BlockCarpet acid_green_carpet = get("acid_green_carpet");
|
||||
public static final BlockColoredClay acid_green_clay = get("acid_green_clay");
|
||||
public static final BlockStainedGlass acid_green_glass = get("acid_green_glass");
|
||||
public static final BlockStainedGlassPane acid_green_glass_pane = get("acid_green_glass_pane");
|
||||
public static final BlockWool acid_green_wool = get("acid_green_wool");
|
||||
public static final BlockCarpet beige_carpet = get("beige_carpet");
|
||||
public static final BlockColoredClay beige_clay = get("beige_clay");
|
||||
public static final BlockStainedGlass beige_glass = get("beige_glass");
|
||||
public static final BlockStainedGlassPane beige_glass_pane = get("beige_glass_pane");
|
||||
public static final BlockWool beige_wool = get("beige_wool");
|
||||
public static final BlockCarpet crimson_carpet = get("crimson_carpet");
|
||||
public static final BlockColoredClay crimson_clay = get("crimson_clay");
|
||||
public static final BlockStainedGlass crimson_glass = get("crimson_glass");
|
||||
public static final BlockStainedGlassPane crimson_glass_pane = get("crimson_glass_pane");
|
||||
public static final BlockWool crimson_wool = get("crimson_wool");
|
||||
public static final BlockCarpet dark_brown_carpet = get("dark_brown_carpet");
|
||||
public static final BlockColoredClay dark_brown_clay = get("dark_brown_clay");
|
||||
public static final BlockStainedGlass dark_brown_glass = get("dark_brown_glass");
|
||||
public static final BlockStainedGlassPane dark_brown_glass_pane = get("dark_brown_glass_pane");
|
||||
public static final BlockWool dark_brown_wool = get("dark_brown_wool");
|
||||
public static final BlockCarpet dark_gray_carpet = get("dark_gray_carpet");
|
||||
public static final BlockColoredClay dark_gray_clay = get("dark_gray_clay");
|
||||
public static final BlockStainedGlass dark_gray_glass = get("dark_gray_glass");
|
||||
public static final BlockStainedGlassPane dark_gray_glass_pane = get("dark_gray_glass_pane");
|
||||
public static final BlockWool dark_gray_wool = get("dark_gray_wool");
|
||||
public static final BlockCarpet dark_green_carpet = get("dark_green_carpet");
|
||||
public static final BlockColoredClay dark_green_clay = get("dark_green_clay");
|
||||
public static final BlockStainedGlass dark_green_glass = get("dark_green_glass");
|
||||
public static final BlockStainedGlassPane dark_green_glass_pane = get("dark_green_glass_pane");
|
||||
public static final BlockWool dark_green_wool = get("dark_green_wool");
|
||||
public static final BlockCarpet dark_magenta_carpet = get("dark_magenta_carpet");
|
||||
public static final BlockColoredClay dark_magenta_clay = get("dark_magenta_clay");
|
||||
public static final BlockStainedGlass dark_magenta_glass = get("dark_magenta_glass");
|
||||
public static final BlockStainedGlassPane dark_magenta_glass_pane = get("dark_magenta_glass_pane");
|
||||
public static final BlockWool dark_magenta_wool = get("dark_magenta_wool");
|
||||
public static final BlockCarpet dark_red_carpet = get("dark_red_carpet");
|
||||
public static final BlockColoredClay dark_red_clay = get("dark_red_clay");
|
||||
public static final BlockStainedGlass dark_red_glass = get("dark_red_glass");
|
||||
public static final BlockStainedGlassPane dark_red_glass_pane = get("dark_red_glass_pane");
|
||||
public static final BlockWool dark_red_wool = get("dark_red_wool");
|
||||
public static final BlockCarpet dark_violet_carpet = get("dark_violet_carpet");
|
||||
public static final BlockColoredClay dark_violet_clay = get("dark_violet_clay");
|
||||
public static final BlockStainedGlass dark_violet_glass = get("dark_violet_glass");
|
||||
public static final BlockStainedGlassPane dark_violet_glass_pane = get("dark_violet_glass_pane");
|
||||
public static final BlockWool dark_violet_wool = get("dark_violet_wool");
|
||||
public static final BlockCarpet light_brown_carpet = get("light_brown_carpet");
|
||||
public static final BlockColoredClay light_brown_clay = get("light_brown_clay");
|
||||
public static final BlockStainedGlass light_brown_glass = get("light_brown_glass");
|
||||
public static final BlockStainedGlassPane light_brown_glass_pane = get("light_brown_glass_pane");
|
||||
public static final BlockWool light_brown_wool = get("light_brown_wool");
|
||||
public static final BlockCarpet light_gray_carpet = get("light_gray_carpet");
|
||||
public static final BlockColoredClay light_gray_clay = get("light_gray_clay");
|
||||
public static final BlockStainedGlass light_gray_glass = get("light_gray_glass");
|
||||
public static final BlockStainedGlassPane light_gray_glass_pane = get("light_gray_glass_pane");
|
||||
public static final BlockWool light_gray_wool = get("light_gray_wool");
|
||||
public static final BlockCarpet light_yellow_carpet = get("light_yellow_carpet");
|
||||
public static final BlockColoredClay light_yellow_clay = get("light_yellow_clay");
|
||||
public static final BlockStainedGlass light_yellow_glass = get("light_yellow_glass");
|
||||
public static final BlockStainedGlassPane light_yellow_glass_pane = get("light_yellow_glass_pane");
|
||||
public static final BlockWool light_yellow_wool = get("light_yellow_wool");
|
||||
public static final BlockCarpet midnight_carpet = get("midnight_carpet");
|
||||
public static final BlockColoredClay midnight_clay = get("midnight_clay");
|
||||
public static final BlockStainedGlass midnight_glass = get("midnight_glass");
|
||||
public static final BlockStainedGlassPane midnight_glass_pane = get("midnight_glass_pane");
|
||||
public static final BlockWool midnight_wool = get("midnight_wool");
|
||||
public static final BlockCarpet neon_carpet = get("neon_carpet");
|
||||
public static final BlockColoredClay neon_clay = get("neon_clay");
|
||||
public static final BlockStainedGlass neon_glass = get("neon_glass");
|
||||
public static final BlockStainedGlassPane neon_glass_pane = get("neon_glass_pane");
|
||||
public static final BlockWool neon_wool = get("neon_wool");
|
||||
public static final BlockCarpet ork_green_carpet = get("ork_green_carpet");
|
||||
public static final BlockColoredClay ork_green_clay = get("ork_green_clay");
|
||||
public static final BlockStainedGlass ork_green_glass = get("ork_green_glass");
|
||||
public static final BlockStainedGlassPane ork_green_glass_pane = get("ork_green_glass_pane");
|
||||
public static final BlockWool ork_green_wool = get("ork_green_wool");
|
||||
public static final BlockBed violet_bed = get("violet_bed");
|
||||
public static final BlockCarpet violet_carpet = get("violet_carpet");
|
||||
public static final BlockColoredClay violet_clay = get("violet_clay");
|
||||
public static final BlockStainedGlass violet_glass = get("violet_glass");
|
||||
public static final BlockStainedGlassPane violet_glass_pane = get("violet_glass_pane");
|
||||
public static final BlockWool violet_wool = get("violet_wool");
|
||||
|
||||
private static <T extends Block> T get(String id) {
|
||||
T block = (T)BlockRegistry.byNameExact(id);
|
||||
|
|
|
@ -14,12 +14,11 @@ import common.block.artificial.BlockWool;
|
|||
import common.block.natural.BlockColoredClay;
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.color.DyeColor;
|
||||
import common.entity.animal.EntitySheep;
|
||||
import common.inventory.InventoryCrafting;
|
||||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.material.ItemDye;
|
||||
import common.util.TextColor;
|
||||
|
||||
public abstract class CraftingRegistry
|
||||
{
|
||||
|
@ -157,47 +156,47 @@ public abstract class CraftingRegistry
|
|||
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);
|
||||
|
||||
for (DyeColor color : DyeColor.values())
|
||||
for (TextColor color : TextColor.values())
|
||||
{
|
||||
ItemDye dye = ItemDye.getByColor(color);
|
||||
if(color != DyeColor.WHITE)
|
||||
if(color != TextColor.WHITE)
|
||||
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(BlockStainedGlass.getByColor(color).getItem(), 8), "###", "#X#", "###", '#', Items.glass, 'X', dye);
|
||||
add(new ItemStack(BlockStainedGlassPane.getByColor(color).getItem(), 16), "###", "###", '#', BlockStainedGlass.getByColor(color).getItem());
|
||||
}
|
||||
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.YELLOW)), Items.dandelion);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.RED)), Items.rose);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.RED)), Items.poppy);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.WHITE), 3), Items.bone);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.PINK), 2), new ItemStack(ItemDye.getByColor(DyeColor.RED)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.ORANGE), 2), new ItemStack(ItemDye.getByColor(DyeColor.RED)), new ItemStack(ItemDye.getByColor(DyeColor.YELLOW)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.LIME), 2), new ItemStack(ItemDye.getByColor(DyeColor.GREEN)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.GRAY), 2), new ItemStack(ItemDye.getByColor(DyeColor.BLACK)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.SILVER), 2), new ItemStack(ItemDye.getByColor(DyeColor.GRAY)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.SILVER), 3), new ItemStack(ItemDye.getByColor(DyeColor.BLACK)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.LIGHT_BLUE), 2), new ItemStack(ItemDye.getByColor(DyeColor.BLUE)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.CYAN), 2), new ItemStack(ItemDye.getByColor(DyeColor.BLUE)), new ItemStack(ItemDye.getByColor(DyeColor.GREEN)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.PURPLE), 2), new ItemStack(ItemDye.getByColor(DyeColor.BLUE)), new ItemStack(ItemDye.getByColor(DyeColor.RED)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.MAGENTA), 2), new ItemStack(ItemDye.getByColor(DyeColor.PURPLE)), new ItemStack(ItemDye.getByColor(DyeColor.PINK)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.MAGENTA), 3), new ItemStack(ItemDye.getByColor(DyeColor.BLUE)), new ItemStack(ItemDye.getByColor(DyeColor.RED)), new ItemStack(ItemDye.getByColor(DyeColor.PINK)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.MAGENTA), 4), new ItemStack(ItemDye.getByColor(DyeColor.BLUE)), new ItemStack(ItemDye.getByColor(DyeColor.RED)), new ItemStack(ItemDye.getByColor(DyeColor.RED)), new ItemStack(ItemDye.getByColor(DyeColor.WHITE)));
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.LIGHT_BLUE)), Items.blue_orchid);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.MAGENTA)), Items.allium);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.SILVER)), Items.houstonia);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.RED)), Items.red_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.ORANGE)), Items.orange_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.SILVER)), Items.white_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.PINK)), Items.pink_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.SILVER)), Items.daisy);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.YELLOW), 2), Items.sunflower);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.MAGENTA), 2), Items.syringa);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.RED), 2), Items.rose_bush);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.PINK), 2), Items.paeonia);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(DyeColor.GREEN)), Items.cactus);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.YELLOW)), Items.dandelion);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.rose);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.poppy);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.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(TextColor.ORANGE), 2), new ItemStack(ItemDye.getByColor(TextColor.RED)), new ItemStack(ItemDye.getByColor(TextColor.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(TextColor.GRAY), 2), new ItemStack(ItemDye.getByColor(TextColor.BLACK)), new ItemStack(ItemDye.getByColor(TextColor.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(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(TextColor.LIGHT_BLUE), 2), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.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(TextColor.VIOLET), 2), new ItemStack(ItemDye.getByColor(TextColor.BLUE)), new ItemStack(ItemDye.getByColor(TextColor.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(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(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(TextColor.LIGHT_BLUE)), Items.blue_orchid);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA)), Items.allium);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.houstonia);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED)), Items.red_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.ORANGE)), Items.orange_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.white_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA)), Items.pink_tulip);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.LIGHT_GRAY)), Items.daisy);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.YELLOW), 2), Items.sunflower);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 2), Items.syringa);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.RED), 2), Items.rose_bush);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.MAGENTA), 2), Items.paeonia);
|
||||
addShapeless(new ItemStack(ItemDye.getByColor(TextColor.DARK_GREEN)), Items.cactus);
|
||||
|
||||
for (DyeColor color : DyeColor.values())
|
||||
for (TextColor color : TextColor.values())
|
||||
{
|
||||
add(new ItemStack(BlockCarpet.getByColor(color).getItem(), 3), "##", '#', BlockWool.getByColor(color).getItem());
|
||||
}
|
||||
|
@ -231,7 +230,7 @@ public abstract class CraftingRegistry
|
|||
add(new ItemStack(Items.wooden_button, 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);
|
||||
for(DyeColor color : BlockBed.COLORS) {
|
||||
for(TextColor color : BlockBed.COLORS) {
|
||||
add(new ItemStack(ItemRegistry.byName(color.getName() + "_bed"), 1), "###", "XXX", '#', BlockWool.getByColor(color).getItem(), 'X', planks);
|
||||
}
|
||||
}
|
||||
|
@ -685,10 +684,10 @@ public abstract class CraftingRegistry
|
|||
return null;
|
||||
}
|
||||
|
||||
float[] afloat = EntitySheep.getDyeRgb(dye.getColor());
|
||||
int l1 = (int)(afloat[0] * 255.0F);
|
||||
int i2 = (int)(afloat[1] * 255.0F);
|
||||
int j2 = (int)(afloat[2] * 255.0F);
|
||||
int afloat = dye.getColor().getColor();
|
||||
int l1 = (afloat >> 16) & 0xff;
|
||||
int i2 = (afloat >> 8) & 0xff;
|
||||
int j2 = afloat & 0xff;
|
||||
i += Math.max(l1, Math.max(i2, j2));
|
||||
aint[0] += l1;
|
||||
aint[1] += i2;
|
||||
|
|
|
@ -15,8 +15,6 @@ import common.block.natural.BlockOre;
|
|||
import common.collect.BiMap;
|
||||
import common.collect.HashBiMap;
|
||||
import common.collect.Lists;
|
||||
import common.color.DyeColor;
|
||||
import common.color.TextColor;
|
||||
import common.effect.Effect;
|
||||
import common.effect.StatusEffect;
|
||||
import common.enchantment.Enchantment;
|
||||
|
@ -81,6 +79,7 @@ import common.item.weapon.ItemSword;
|
|||
import common.item.weapon.ItemTrident;
|
||||
import common.log.Log;
|
||||
import common.util.Pair;
|
||||
import common.util.TextColor;
|
||||
import common.util.Util;
|
||||
import common.world.Weather;
|
||||
|
||||
|
@ -260,9 +259,9 @@ public abstract class ItemRegistry {
|
|||
register("cooked_" + type.getName(), (new ItemFishFood(true, type)));
|
||||
}
|
||||
Item lapis = null;
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
for(TextColor color : TextColor.values()) {
|
||||
Item dye = new ItemDye(color);
|
||||
if(color == DyeColor.BLUE)
|
||||
if(color == TextColor.BLUE)
|
||||
lapis = dye;
|
||||
register(color.getDye(), dye);
|
||||
}
|
||||
|
@ -306,7 +305,7 @@ public abstract class ItemRegistry {
|
|||
register("melon_seed", new ItemSeeds(Blocks.melon_stem, Blocks.farmland).setDisplay("Melonenkerne").setMaxAmount(StackSize.XL));
|
||||
|
||||
register("whip", (new ItemWhip()).setDisplay("Peitsche"));
|
||||
register("charge_crystal", (new Item()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(TextColor.DMAGENTA).setGleaming());
|
||||
register("charge_crystal", (new Item()).setDisplay("Energiekristall").setTab(CheatTab.MISC).setColor(TextColor.DARK_MAGENTA).setGleaming());
|
||||
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));
|
||||
int max = ench.getMaxLevel();
|
||||
|
|
|
@ -465,12 +465,6 @@ public abstract class Items {
|
|||
public static final Item light_blue_wool = get("light_blue_wool");
|
||||
public static final Item light_weighted_pressure_plate = get("light_weighted_pressure_plate");
|
||||
public static final ItemTrident trident = get("trident");
|
||||
public static final Item lime_carpet = get("lime_carpet");
|
||||
public static final Item lime_clay = get("lime_clay");
|
||||
public static final ItemDye lime_dye = get("lime_dye");
|
||||
public static final Item lime_glass = get("lime_glass");
|
||||
public static final Item lime_glass_pane = get("lime_glass_pane");
|
||||
public static final Item lime_wool = get("lime_wool");
|
||||
public static final Item lithium_block = get("lithium_block");
|
||||
public static final ItemMetal lithium_ingot = get("lithium_ingot");
|
||||
public static final Item lithium_ore = get("lithium_ore");
|
||||
|
@ -571,13 +565,7 @@ public abstract class Items {
|
|||
public static final Item phosphor_block = get("phosphor_block");
|
||||
public static final Item phosphor_ore = get("phosphor_ore");
|
||||
public static final ItemMetal phosphor_powder = get("phosphor_powder");
|
||||
public static final Item pink_carpet = get("pink_carpet");
|
||||
public static final Item pink_clay = get("pink_clay");
|
||||
public static final ItemDye pink_dye = get("pink_dye");
|
||||
public static final Item pink_glass = get("pink_glass");
|
||||
public static final Item pink_glass_pane = get("pink_glass_pane");
|
||||
public static final Item pink_tulip = get("pink_tulip");
|
||||
public static final Item pink_wool = get("pink_wool");
|
||||
public static final Item piston = get("piston");
|
||||
public static final Item platinum_block = get("platinum_block");
|
||||
public static final ItemMetal platinum_ingot = get("platinum_ingot");
|
||||
|
@ -598,13 +586,6 @@ public abstract class Items {
|
|||
public static final Item praseodymium_ore = get("praseodymium_ore");
|
||||
public static final Item pumpkin = get("pumpkin");
|
||||
public static final ItemSeeds pumpkin_seed = get("pumpkin_seed");
|
||||
public static final Item purple_bed = get("purple_bed");
|
||||
public static final Item purple_carpet = get("purple_carpet");
|
||||
public static final Item purple_clay = get("purple_clay");
|
||||
public static final ItemDye purple_dye = get("purple_dye");
|
||||
public static final Item purple_glass = get("purple_glass");
|
||||
public static final Item purple_glass_pane = get("purple_glass_pane");
|
||||
public static final Item purple_wool = get("purple_wool");
|
||||
public static final Item quartz = get("quartz");
|
||||
public static final Item quartz_block = get("quartz_block");
|
||||
public static final Item quartz_ore = get("quartz_ore");
|
||||
|
@ -675,14 +656,8 @@ public abstract class Items {
|
|||
public static final ItemMetal silicon_ingot = get("silicon_ingot");
|
||||
public static final Item silicon_ore = get("silicon_ore");
|
||||
public static final Item silver_block = get("silver_block");
|
||||
public static final Item silver_carpet = get("silver_carpet");
|
||||
public static final Item silver_clay = get("silver_clay");
|
||||
public static final ItemDye silver_dye = get("silver_dye");
|
||||
public static final Item silver_glass = get("silver_glass");
|
||||
public static final Item silver_glass_pane = get("silver_glass_pane");
|
||||
public static final ItemMetal silver_ingot = get("silver_ingot");
|
||||
public static final Item silver_ore = get("silver_ore");
|
||||
public static final Item silver_wool = get("silver_wool");
|
||||
public static final Item skull = get("skull");
|
||||
public static final Item slime_blob = get("slime_blob");
|
||||
public static final Item slime_block = get("slime_block");
|
||||
|
@ -994,6 +969,103 @@ public abstract class Items {
|
|||
public static final Item swamp = get("swamp");
|
||||
public static final ItemBucket milk_bucket = get("milk_bucket");
|
||||
public static final ItemBucket recursive_milk_bucket = get("recursive_milk_bucket");
|
||||
public static final Item acid_green_carpet = get("acid_green_carpet");
|
||||
public static final Item acid_green_clay = get("acid_green_clay");
|
||||
public static final ItemDye acid_green_dye = get("acid_green_dye");
|
||||
public static final Item acid_green_glass = get("acid_green_glass");
|
||||
public static final Item acid_green_glass_pane = get("acid_green_glass_pane");
|
||||
public static final Item acid_green_wool = get("acid_green_wool");
|
||||
public static final Item beige_carpet = get("beige_carpet");
|
||||
public static final Item beige_clay = get("beige_clay");
|
||||
public static final ItemDye beige_dye = get("beige_dye");
|
||||
public static final Item beige_glass = get("beige_glass");
|
||||
public static final Item beige_glass_pane = get("beige_glass_pane");
|
||||
public static final Item beige_wool = get("beige_wool");
|
||||
public static final Item crimson_carpet = get("crimson_carpet");
|
||||
public static final Item crimson_clay = get("crimson_clay");
|
||||
public static final ItemDye crimson_dye = get("crimson_dye");
|
||||
public static final Item crimson_glass = get("crimson_glass");
|
||||
public static final Item crimson_glass_pane = get("crimson_glass_pane");
|
||||
public static final Item crimson_wool = get("crimson_wool");
|
||||
public static final Item dark_brown_carpet = get("dark_brown_carpet");
|
||||
public static final Item dark_brown_clay = get("dark_brown_clay");
|
||||
public static final ItemDye dark_brown_dye = get("dark_brown_dye");
|
||||
public static final Item dark_brown_glass = get("dark_brown_glass");
|
||||
public static final Item dark_brown_glass_pane = get("dark_brown_glass_pane");
|
||||
public static final Item dark_brown_wool = get("dark_brown_wool");
|
||||
public static final Item dark_gray_carpet = get("dark_gray_carpet");
|
||||
public static final Item dark_gray_clay = get("dark_gray_clay");
|
||||
public static final ItemDye dark_gray_dye = get("dark_gray_dye");
|
||||
public static final Item dark_gray_glass = get("dark_gray_glass");
|
||||
public static final Item dark_gray_glass_pane = get("dark_gray_glass_pane");
|
||||
public static final Item dark_gray_wool = get("dark_gray_wool");
|
||||
public static final Item dark_green_carpet = get("dark_green_carpet");
|
||||
public static final Item dark_green_clay = get("dark_green_clay");
|
||||
public static final ItemDye dark_green_dye = get("dark_green_dye");
|
||||
public static final Item dark_green_glass = get("dark_green_glass");
|
||||
public static final Item dark_green_glass_pane = get("dark_green_glass_pane");
|
||||
public static final Item dark_green_wool = get("dark_green_wool");
|
||||
public static final Item dark_magenta_carpet = get("dark_magenta_carpet");
|
||||
public static final Item dark_magenta_clay = get("dark_magenta_clay");
|
||||
public static final ItemDye dark_magenta_dye = get("dark_magenta_dye");
|
||||
public static final Item dark_magenta_glass = get("dark_magenta_glass");
|
||||
public static final Item dark_magenta_glass_pane = get("dark_magenta_glass_pane");
|
||||
public static final Item dark_magenta_wool = get("dark_magenta_wool");
|
||||
public static final Item dark_red_carpet = get("dark_red_carpet");
|
||||
public static final Item dark_red_clay = get("dark_red_clay");
|
||||
public static final ItemDye dark_red_dye = get("dark_red_dye");
|
||||
public static final Item dark_red_glass = get("dark_red_glass");
|
||||
public static final Item dark_red_glass_pane = get("dark_red_glass_pane");
|
||||
public static final Item dark_red_wool = get("dark_red_wool");
|
||||
public static final Item dark_violet_carpet = get("dark_violet_carpet");
|
||||
public static final Item dark_violet_clay = get("dark_violet_clay");
|
||||
public static final ItemDye dark_violet_dye = get("dark_violet_dye");
|
||||
public static final Item dark_violet_glass = get("dark_violet_glass");
|
||||
public static final Item dark_violet_glass_pane = get("dark_violet_glass_pane");
|
||||
public static final Item dark_violet_wool = get("dark_violet_wool");
|
||||
public static final Item light_brown_carpet = get("light_brown_carpet");
|
||||
public static final Item light_brown_clay = get("light_brown_clay");
|
||||
public static final ItemDye light_brown_dye = get("light_brown_dye");
|
||||
public static final Item light_brown_glass = get("light_brown_glass");
|
||||
public static final Item light_brown_glass_pane = get("light_brown_glass_pane");
|
||||
public static final Item light_brown_wool = get("light_brown_wool");
|
||||
public static final Item light_gray_carpet = get("light_gray_carpet");
|
||||
public static final Item light_gray_clay = get("light_gray_clay");
|
||||
public static final ItemDye light_gray_dye = get("light_gray_dye");
|
||||
public static final Item light_gray_glass = get("light_gray_glass");
|
||||
public static final Item light_gray_glass_pane = get("light_gray_glass_pane");
|
||||
public static final Item light_gray_wool = get("light_gray_wool");
|
||||
public static final Item light_yellow_carpet = get("light_yellow_carpet");
|
||||
public static final Item light_yellow_clay = get("light_yellow_clay");
|
||||
public static final ItemDye light_yellow_dye = get("light_yellow_dye");
|
||||
public static final Item light_yellow_glass = get("light_yellow_glass");
|
||||
public static final Item light_yellow_glass_pane = get("light_yellow_glass_pane");
|
||||
public static final Item light_yellow_wool = get("light_yellow_wool");
|
||||
public static final Item midnight_carpet = get("midnight_carpet");
|
||||
public static final Item midnight_clay = get("midnight_clay");
|
||||
public static final ItemDye midnight_dye = get("midnight_dye");
|
||||
public static final Item midnight_glass = get("midnight_glass");
|
||||
public static final Item midnight_glass_pane = get("midnight_glass_pane");
|
||||
public static final Item midnight_wool = get("midnight_wool");
|
||||
public static final Item neon_carpet = get("neon_carpet");
|
||||
public static final Item neon_clay = get("neon_clay");
|
||||
public static final ItemDye neon_dye = get("neon_dye");
|
||||
public static final Item neon_glass = get("neon_glass");
|
||||
public static final Item neon_glass_pane = get("neon_glass_pane");
|
||||
public static final Item neon_wool = get("neon_wool");
|
||||
public static final Item ork_green_carpet = get("ork_green_carpet");
|
||||
public static final Item ork_green_clay = get("ork_green_clay");
|
||||
public static final ItemDye ork_green_dye = get("ork_green_dye");
|
||||
public static final Item ork_green_glass = get("ork_green_glass");
|
||||
public static final Item ork_green_glass_pane = get("ork_green_glass_pane");
|
||||
public static final Item ork_green_wool = get("ork_green_wool");
|
||||
public static final Item violet_bed = get("violet_bed");
|
||||
public static final Item violet_carpet = get("violet_carpet");
|
||||
public static final Item violet_clay = get("violet_clay");
|
||||
public static final ItemDye violet_dye = get("violet_dye");
|
||||
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_wool = get("violet_wool");
|
||||
|
||||
private static <T extends Item> T get(String id) {
|
||||
T item = (T)ItemRegistry.byName(id);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package common.init;
|
||||
|
||||
import common.color.TextColor;
|
||||
import common.util.TextColor;
|
||||
|
||||
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()),
|
||||
|
@ -91,7 +91,7 @@ public enum MetalType {
|
|||
}
|
||||
|
||||
public String formatRarity() {
|
||||
return TextColor.DMAGENTA + "Seltenheit: " + TextColor.NEON + "" + (this.rarity + 1);
|
||||
return TextColor.DARK_MAGENTA + "Seltenheit: " + TextColor.NEON + "" + (this.rarity + 1);
|
||||
}
|
||||
|
||||
public String formatRadioactivity() {
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class TradeRegistry {
|
|||
new ItemForGem(Items.black_wool, new PriceInfo(1, 2)),
|
||||
new ItemForGem(Items.brown_wool, new PriceInfo(1, 2)),
|
||||
new ItemForGem(Items.gray_wool, new PriceInfo(1, 2)),
|
||||
new ItemForGem(Items.silver_wool, new PriceInfo(1, 2)),
|
||||
new ItemForGem(Items.light_gray_wool, new PriceInfo(1, 2)),
|
||||
new GemForItem(Items.string, new PriceInfo(15, 20)),
|
||||
new ItemForGem(Items.arrow, new PriceInfo(-12, -8)),
|
||||
new ItemForGem(Items.bow, new PriceInfo(2, 3)),
|
||||
|
|
|
@ -6,7 +6,6 @@ import common.attributes.Attribute;
|
|||
import common.attributes.UsageSlot;
|
||||
import common.block.Block;
|
||||
import common.block.tech.BlockDispenser;
|
||||
import common.color.TextColor;
|
||||
import common.entity.Entity;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
|
@ -21,6 +20,7 @@ import common.util.ExtMath;
|
|||
import common.util.Facing;
|
||||
import common.util.HitPosition;
|
||||
import common.util.Serverside;
|
||||
import common.util.TextColor;
|
||||
import common.util.Vec3;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.World;
|
||||
|
|