color changes

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

View file

@ -26,7 +26,6 @@ import java.util.Queue;
import common.Version;
import common.collect.Lists;
import common.collect.Maps;
import common.color.TextColor;
import common.dimension.Area;
import common.dimension.DimType;
import common.dimension.Dimension;
@ -88,6 +87,7 @@ import common.util.ExtMath;
import common.util.Pair;
import common.util.PortalType;
import common.util.Position;
import common.util.TextColor;
import common.util.Triplet;
import common.util.Util;
import common.util.Var;
@ -1074,7 +1074,7 @@ public final class Server implements IThreadListener, Executor {
nplayer.setHealth(nplayer.getHealth());
conn.sendPlayerAbilities();
if(message != null)
conn.addHotbar(TextColor.DRED + message);
conn.addHotbar(TextColor.DARK_RED + message);
conn.addFeed(TextColor.RED + "* Bei %d, %d, %d in Dimension %s gestorben", pos.getX(), pos.getY(), pos.getZ(),
old.worldObj.dimension.getDisplay());
}

View file

@ -12,10 +12,10 @@ import common.block.artificial.BlockPortal;
import common.block.foliage.BlockDoublePlant;
import common.block.foliage.BlockFlower;
import common.block.tech.BlockAnvil;
import common.color.DyeColor;
import common.init.BlockRegistry;
import common.init.Blocks;
import common.init.WoodType;
import common.util.TextColor;
import common.util.Vec3i;
import common.world.State;
@ -48,7 +48,7 @@ public abstract class ReorderRegistry {
PLACE_LAST.add(BlockRegistry.byName(wood.getName() + "_sapling"));
}
// PLACE_LAST.add(Blocks.bed);
for(DyeColor color : BlockBed.COLORS) {
for(TextColor color : BlockBed.COLORS) {
PLACE_LAST.add(BlockRegistry.byName(color.getName() + "_bed"));
}
PLACE_LAST.add(Blocks.tallgrass);

View file

@ -1,6 +1,6 @@
package server.command;
import common.color.DyeColor;
import common.util.TextColor;
public class ColorParser extends IntParser {
public ColorParser(String name, Integer def, Object ... completions) {
@ -8,7 +8,7 @@ public class ColorParser extends IntParser {
}
public ColorParser(String name, Integer def) {
this(name, def, (Object[])DyeColor.values());
this(name, def, (Object[])TextColor.values());
}
public Integer parse(CommandEnvironment env, String input) {
@ -16,7 +16,7 @@ public class ColorParser extends IntParser {
input = input.substring(1);
}
else {
DyeColor color = DyeColor.getExact(input);
TextColor color = TextColor.getExact(input);
if(color != null)
return color.getColor();
}

View file

@ -7,9 +7,9 @@ import java.util.Map;
import common.collect.Lists;
import common.collect.Maps;
import common.color.TextColor;
import common.util.BlockPos;
import common.util.CharValidator;
import common.util.TextColor;
import common.util.Vec3;
import common.world.World;
import server.command.DoubleParser.DefType;
@ -24,7 +24,7 @@ public abstract class Command implements Executable {
private boolean parReq = true;
public static String asCommand(TextColor color, String command, Object ... args) {
return String.format(TextColor.DGRAY + "[" + TextColor.COMMAND + "%s" + TextColor.DGRAY + "]" + color, String.format(command, args));
return String.format(TextColor.DARK_GRAY + "[" + TextColor.COMMAND + "%s" + TextColor.DARK_GRAY + "]" + (color == null ? TextColor.RESET : color), String.format(command, args));
}
protected Command(String name) {

View file

@ -11,8 +11,8 @@ import java.util.regex.Pattern;
import common.collect.Lists;
import common.collect.Maps;
import common.collect.Sets;
import common.color.TextColor;
import common.log.Log;
import common.util.TextColor;
import server.Server;
import server.command.commands.*;

View file

@ -1,7 +1,7 @@
package server.command.commands;
import common.color.TextColor;
import common.dimension.Space;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;

View file

@ -2,7 +2,6 @@ package server.command.commands;
import java.util.List;
import common.color.TextColor;
import common.entity.Entity;
import common.util.BlockPos;
import server.command.Command;
@ -23,7 +22,7 @@ public class CommandFind extends Command {
if(entity.isEntityAlive()) {
BlockPos pos = entity.getPosition();
exec.log("%s bei %d, %d, %d in %s gefunden %s", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay(),
asCommand(TextColor.RESET, "tp #%d", entity.getId()));
asCommand(null, "tp #%d", entity.getId()));
done++;
}
}

View file

@ -2,9 +2,9 @@ package server.command.commands;
import java.util.List;
import common.color.TextColor;
import common.effect.Effect;
import common.entity.npc.EntityNPC;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;

View file

@ -5,7 +5,6 @@ import java.util.Arrays;
import common.collect.Iterables;
import common.collect.Lists;
import common.color.TextColor;
import common.dimension.Area;
import common.dimension.DimType;
import common.dimension.Dimension;
@ -15,6 +14,7 @@ import common.init.Blocks;
import common.init.NameRegistry;
import common.packet.SPacketDimensions;
import common.rng.Random;
import common.util.TextColor;
import server.Server;
import server.command.ArgumentParser;
import server.command.Command;

View file

@ -2,8 +2,8 @@ package server.command.commands;
import java.util.List;
import common.color.TextColor;
import common.entity.npc.EntityNPC;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;

View file

@ -2,9 +2,9 @@ package server.command.commands;
import java.security.MessageDigest;
import common.color.TextColor;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -50,7 +50,7 @@ public class CommandPasswd extends Command {
protected void accept() {
User plr = env.getServer().getUser(user.getUser());
if(!((Player)exec).isAdmin() || plr == null || (plr.isAdmin() && plr != exec) || (plr.getPasswordHash() == null && plr == exec) || (plr.getPubkey() != null && plr == exec)) {
exec.log(TextColor.DRED + "Ein Fehler ist aufgetreten");
exec.log(TextColor.DARK_RED + "Ein Fehler ist aufgetreten");
return;
}
if(this.checkField != null && !MessageDigest.isEqual(EncryptUtil.hashPassword(this.checkField.get(), plr.getPasswordHash().second()), plr.getPasswordHash().first())) {

View file

@ -2,9 +2,9 @@ package server.command.commands;
import java.util.List;
import common.color.TextColor;
import common.entity.npc.EntityNPC;
import common.util.ExtMath;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -21,13 +21,13 @@ public class CommandPlayers extends Command {
public void exec(CommandEnvironment env, Executor exec, boolean coords) {
List<Player> players = env.getServer().getPlayers();
if(players.isEmpty()) {
exec.log(TextColor.DGRAY + "Es sind keine Spieler online");
exec.log(TextColor.DARK_GRAY + "Es sind keine Spieler online");
return;
}
exec.log(TextColor.GREEN + "Es " + (players.size() == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Spieler online", players.size());
for(Player player : players) {
EntityNPC entity = player.getPresentEntity();
exec.log("%s%s" + TextColor.GRAY + ": '%s" + TextColor.GRAY + "'" + (coords && entity != null ? " [" + TextColor.ORANGE + "%s @ %d, %d, %d" + TextColor.GRAY + "]" : ""), player.isAdmin() ? TextColor.RED : TextColor.NEON, player.getUser(), entity == null ? TextColor.DGRAY + "<->" : TextColor.ACID + entity.getCommandName(), entity == null ? null : entity.worldObj.dimension.getDisplay(), entity == null ? null : ExtMath.floord(entity.posX), entity == null ? null : ExtMath.floord(entity.posY), entity == null ? null : ExtMath.floord(entity.posZ));
exec.log("%s%s" + TextColor.GRAY + ": '%s" + TextColor.GRAY + "'" + (coords && entity != null ? " [" + TextColor.ORANGE + "%s @ %d, %d, %d" + TextColor.GRAY + "]" : ""), player.isAdmin() ? TextColor.RED : TextColor.NEON, player.getUser(), entity == null ? TextColor.DARK_GRAY + "<->" : TextColor.ACID + entity.getCommandName(), entity == null ? null : entity.worldObj.dimension.getDisplay(), entity == null ? null : ExtMath.floord(entity.posX), entity == null ? null : ExtMath.floord(entity.posY), entity == null ? null : ExtMath.floord(entity.posZ));
}
}
}

View file

@ -3,10 +3,10 @@ package server.command.commands;
import java.security.MessageDigest;
import java.security.PublicKey;
import common.color.TextColor;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.Pair;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -48,7 +48,7 @@ public class CommandPubkey extends Command {
protected void accept() {
User plr = env.getServer().getUser(user.getUser());
if(!((Player)exec).isAdmin() || plr == null || (plr.isAdmin() && plr != exec)) {
exec.log(TextColor.DRED + "Ein Fehler ist aufgetreten");
exec.log(TextColor.DARK_RED + "Ein Fehler ist aufgetreten");
return;
}
if(this.checkField != null && plr.getPasswordHash() != null && !MessageDigest.isEqual(EncryptUtil.hashPassword(this.checkField.get(), plr.getPasswordHash().second()), plr.getPasswordHash().first())) {

View file

@ -1,8 +1,8 @@
package server.command.commands;
import common.color.TextColor;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -45,7 +45,7 @@ public class CommandRegister extends Command {
protected void accept() {
if(!((Player)exec).isAdmin() || env.getServer().getUser(username) != null || env.getServer().loadPlayerData(username) != null) {
exec.log(TextColor.DRED + "Ein Fehler ist aufgetreten");
exec.log(TextColor.DARK_RED + "Ein Fehler ist aufgetreten");
return;
}
if(!this.passwordField.get().equals(this.confirmField.get())) {

View file

@ -2,10 +2,10 @@ package server.command.commands;
import java.security.PublicKey;
import common.color.TextColor;
import common.network.IPlayer;
import common.util.EncryptUtil;
import common.util.Pair;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -48,7 +48,7 @@ public class CommandRegkey extends Command {
protected void accept() {
if(!((Player)exec).isAdmin() || env.getServer().getUser(username) != null || env.getServer().loadPlayerData(username) != null) {
exec.log(TextColor.DRED + "Ein Fehler ist aufgetreten");
exec.log(TextColor.DARK_RED + "Ein Fehler ist aufgetreten");
return;
}
Pair<PublicKey, String> key;

View file

@ -1,8 +1,8 @@
package server.command.commands;
import common.color.TextColor;
import common.packet.SPacketMessage;
import common.packet.SPacketMessage.Type;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -29,7 +29,7 @@ public class CommandSave extends Command {
exec.log(TextColor.ORANGE + "Beende E/A ...");
Region.finishWrite();
}
exec.log(TextColor.DGREEN + "Alle Serverdaten wurden gespeichert");
exec.log(TextColor.DARK_GREEN + "Alle Serverdaten wurden gespeichert");
if(message)
env.getServer().sendPacket(new SPacketMessage(TextColor.GREEN + "Die Serverdaten wurden gespeichert", Type.FEED));
}

View file

@ -4,8 +4,8 @@ import java.util.Collection;
import java.util.Map.Entry;
import common.collect.Lists;
import common.color.TextColor;
import common.packet.SPacketServerConfig;
import common.util.TextColor;
import server.command.ArgumentSplitter;
import server.command.Command;
import server.command.CommandEnvironment;
@ -43,7 +43,7 @@ public class CommandSv extends Command {
String value = sv.get();
StringBuilder sb = new StringBuilder(TextColor.YELLOW + name + TextColor.GRAY + " " + separator + " ");
if(sv.noDef && sv.def.equals(value))
sb.append(TextColor.DGRAY + "[ - ]");
sb.append(TextColor.DARK_GRAY + "[ - ]");
else if(censor && name.equals("password") && !value.isEmpty())
sb.append(TextColor.NEON + "'****'");
else if(sv.type == ValueType.STRING)
@ -51,7 +51,7 @@ public class CommandSv extends Command {
else
sb.append(((sv.type == ValueType.BOOLEAN ? (value.equals("true") ? TextColor.GREEN : TextColor.RED) : TextColor.BLUE)) + value);
if(!sv.def.equals(value))
sb.append(TextColor.GRAY + " (" + (sv.noDef ? TextColor.DGRAY + "[ - ]" : TextColor.BROWN + sv.def) + TextColor.GRAY + ")");
sb.append(TextColor.GRAY + " (" + (sv.noDef ? TextColor.DARK_GRAY + "[ - ]" : TextColor.BROWN + sv.def) + TextColor.GRAY + ")");
return sb.toString();
}
@ -82,7 +82,7 @@ public class CommandSv extends Command {
Integer.parseInt(value);
}
catch(NumberFormatException e) {
throw new RunException(TextColor.DRED + "'%s' ist keine gültige Zahl", value);
throw new RunException(TextColor.DARK_RED + "'%s' ist keine gültige Zahl", value);
}
}
else if(sv.type == ValueType.FLOAT) {
@ -90,7 +90,7 @@ public class CommandSv extends Command {
Float.parseFloat(value);
}
catch(NumberFormatException e) {
throw new RunException(TextColor.DRED + "'%s' ist keine gültige Zahl", value);
throw new RunException(TextColor.DARK_RED + "'%s' ist keine gültige Zahl", value);
}
}
sv.set(value, false, true);

View file

@ -1,7 +1,8 @@
package server.command.commands;
import java.util.Collection;
import common.color.TextColor;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -15,12 +16,12 @@ public class CommandUsers extends Command {
public void exec(CommandEnvironment env, Executor exec) {
Collection<User> users = env.getServer().getUsers();
if(users.isEmpty()) {
exec.log(TextColor.DGRAY + "Es sind keine Spieler registriert");
exec.log(TextColor.DARK_GRAY + "Es sind keine Spieler registriert");
return;
}
exec.log(TextColor.GREEN + "Es " + (users.size() == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Spieler registriert", users.size());
for(User user : users) {
exec.log("%s%s" + TextColor.GRAY + ": %s" + TextColor.GRAY + ", %s", user.isAdmin() ? TextColor.RED : TextColor.NEON, user.getUser(), user.isOnline() ? TextColor.DGREEN + "Online" : TextColor.DGRAY + "Offline", user.getPubkey() != null ? TextColor.YELLOW + "Pubkey" : (user.getPasswordHash() != null ? TextColor.MAGENTA + "Passwort" : TextColor.BLACK + "Kein Login"));
exec.log("%s%s" + TextColor.GRAY + ": %s" + TextColor.GRAY + ", %s", user.isAdmin() ? TextColor.RED : TextColor.NEON, user.getUser(), user.isOnline() ? TextColor.DARK_GREEN + "Online" : TextColor.DARK_GRAY + "Offline", user.getPubkey() != null ? TextColor.YELLOW + "Pubkey" : (user.getPasswordHash() != null ? TextColor.MAGENTA + "Passwort" : TextColor.BLACK + "Kein Login"));
}
}
}

View file

@ -3,10 +3,10 @@ package server.command.commands;
import java.util.Map;
import java.util.Map.Entry;
import common.color.TextColor;
import common.dimension.Dimension;
import common.util.ExtMath;
import common.util.Position;
import common.util.TextColor;
import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
@ -22,7 +22,7 @@ public class CommandWarps extends Command {
public void exec(CommandEnvironment env, Executor exec, Dimension dim) {
Map<String, Position> warps = env.getServer().getWarps();
if(warps.isEmpty()) {
exec.log(TextColor.DGRAY + "Es sind keine Warps definiert");
exec.log(TextColor.DARK_GRAY + "Es sind keine Warps definiert");
return;
}
int n = 0;
@ -32,7 +32,7 @@ public class CommandWarps extends Command {
n++;
}
if(dim != null && n == 0) {
exec.log(TextColor.DGRAY + "Es sind keine Warps in %s vorhanden", dim.getDisplay());
exec.log(TextColor.DARK_GRAY + "Es sind keine Warps in %s vorhanden", dim.getDisplay());
return;
}
exec.log(TextColor.GREEN + "Es " + (n == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Warp" + (n == 1 ? "" : "s") + " " + (dim == null ? "" : "in Dimension %s ") + "vorhanden", n, dim == null ? null : dim.getDisplay());

View file

@ -728,7 +728,7 @@ public abstract class UniverseRegistry extends DimensionRegistry {
.addSpawn(EntityMouse.class, 10, 8, 8));
});
registerDomain("Digital", () -> {
registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15, Blocks.green_clay.getState(), Blocks.air.getState(), 2).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction(),
registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15, Blocks.dark_green_clay.getState(), Blocks.air.getState(), 2).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction(),
new GeneratorData().setGenerator(new GeneratorFlat()));
});
registerDomain("hell", "Hölle", () -> {

View file

@ -4,7 +4,7 @@ import java.security.KeyPair;
import java.security.MessageDigest;
import java.security.PublicKey;
import java.security.SecureRandom;
import common.color.TextColor;
import common.log.Log;
import common.net.util.concurrent.Future;
import common.net.util.concurrent.GenericFutureListener;
@ -22,6 +22,7 @@ import common.packet.RPacketRequestEncrypt;
import common.packet.RPacketResponse;
import common.packet.RPacketServerConfig;
import common.util.EncryptUtil;
import common.util.TextColor;
import server.Server;
import server.vars.SVars;

View file

@ -13,7 +13,6 @@ import common.block.artificial.BlockFenceGate;
import common.block.artificial.BlockWall;
import common.block.tech.InteractionObject;
import common.collect.Lists;
import common.color.TextColor;
import common.dimension.Dimension;
import common.dimension.Space;
import common.effect.Effect;
@ -117,6 +116,7 @@ import common.util.Facing;
import common.util.IntHashMap;
import common.util.PortalType;
import common.util.Position;
import common.util.TextColor;
import common.util.Vec3i;
import common.util.WorldPos;
import common.vars.Vars;
@ -559,24 +559,24 @@ public class Player extends User implements Executor, IPlayer
public void sendPickupMessage(Entity entity, int amount) {
if(entity instanceof EntityItem)
if(amount == 1)
this.addFeed(TextColor.DGREEN + "* %s aufgelesen",
((EntityItem)entity).getEntityItem().getColoredName(TextColor.DGREEN));
this.addFeed(TextColor.DARK_GREEN + "* %s aufgelesen",
((EntityItem)entity).getEntityItem().getColoredName(TextColor.DARK_GREEN));
else
this.addFeed(TextColor.DGREEN + "* %d %s aufgelesen", amount,
((EntityItem)entity).getEntityItem().getColoredName(TextColor.DGREEN));
this.addFeed(TextColor.DARK_GREEN + "* %d %s aufgelesen", amount,
((EntityItem)entity).getEntityItem().getColoredName(TextColor.DARK_GREEN));
else if(entity instanceof EntityArrow)
this.addFeed(TextColor.DGREEN + "* Pfeil aufgelesen", amount);
this.addFeed(TextColor.DARK_GREEN + "* Pfeil aufgelesen", amount);
else if(entity instanceof EntityXp)
this.addFeed(TextColor.GREEN + "* %d Erfahrung gesammelt", amount);
}
public void sendThrowMessage(ItemStack stack) {
if(stack.getSize() == 1)
this.addFeed(TextColor.DRED + "* %s weg geworfen",
stack.getColoredName(TextColor.DRED));
this.addFeed(TextColor.DARK_RED + "* %s weg geworfen",
stack.getColoredName(TextColor.DARK_RED));
else
this.addFeed(TextColor.DRED + "* %d %s weg geworfen", stack.getSize(),
stack.getColoredName(TextColor.DRED));
this.addFeed(TextColor.DARK_RED + "* %d %s weg geworfen", stack.getSize(),
stack.getColoredName(TextColor.DARK_RED));
}
@ -1337,7 +1337,7 @@ public class Player extends User implements Executor, IPlayer
BlockPos point = pos == null ? this.entity.getPosition() : pos;
String msg = this.selectPoint(point, false);
if(msg != null)
this.addHotbar(TextColor.DRED + msg);
this.addHotbar(TextColor.DARK_RED + msg);
}
private void selectPos2(BlockPos pos) {
@ -1690,10 +1690,10 @@ public class Player extends User implements Executor, IPlayer
Player target = this.server.getPlayer(space < 0 ? line.substring(1) : line.substring(1, space));
if(target == null)
return false;
target.addChat(this.entity.getColoredName(TextColor.LGRAY) + " -> " + target.entity.getColoredName(TextColor.LGRAY) + " " +
target.addChat(this.entity.getColoredName(TextColor.LIGHT_GRAY) + " -> " + target.entity.getColoredName(TextColor.LIGHT_GRAY) + " " +
line);
if(target != this)
this.addChat(target.entity.getColoredName(TextColor.LGRAY) + " -> " + this.entity.getColoredName(TextColor.LGRAY) + " " +
this.addChat(target.entity.getColoredName(TextColor.LIGHT_GRAY) + " -> " + this.entity.getColoredName(TextColor.LIGHT_GRAY) + " " +
line);
return true;
}
@ -1704,7 +1704,7 @@ public class Player extends User implements Executor, IPlayer
String str = line.substring(1).trim();
if(str.isEmpty())
return false;
this.server.sendPacket(new SPacketMessage(String.format(TextColor.LGRAY + "* %s %s", this.entity.getColoredName(TextColor.LGRAY), str), Type.CHAT));
this.server.sendPacket(new SPacketMessage(String.format(TextColor.LIGHT_GRAY + "* %s %s", this.entity.getColoredName(TextColor.LIGHT_GRAY), str), Type.CHAT));
return true;
}
@ -1873,7 +1873,7 @@ public class Player extends User implements Executor, IPlayer
if(this.isAdmin())
this.server.getScriptEnvironment().execute(command, this);
else
this.addConsole(TextColor.DRED + "Nur Admins können Befehle ausführen");
this.addConsole(TextColor.DARK_RED + "Nur Admins können Befehle ausführen");
}
private List<String> completeCommand(String command) {
@ -1891,7 +1891,7 @@ public class Player extends User implements Executor, IPlayer
public void log(String msg) {
if(this.forcedExec != null)
this.forcedExec.log(TextColor.ACID + "Als " + TextColor.GREEN + "%s" + TextColor.DGRAY + ": " + TextColor.RESET + "%s", this.getUser(), msg);
this.forcedExec.log(TextColor.ACID + "Als " + TextColor.GREEN + "%s" + TextColor.DARK_GRAY + ": " + TextColor.RESET + "%s", this.getUser(), msg);
else
this.addConsole(msg);
}
@ -1934,7 +1934,7 @@ public class Player extends User implements Executor, IPlayer
case CHAT:
if(!this.sendPlayer(msg) && !this.sendEmote(msg))
this.server.sendPacket(new SPacketMessage(String.format("%s %s", this.entity.getColoredName(TextColor.LGRAY), msg), Type.CHAT));
this.server.sendPacket(new SPacketMessage(String.format("%s %s", this.entity.getColoredName(TextColor.LIGHT_GRAY), msg), Type.CHAT));
break;
case DISPLAY:
@ -2684,7 +2684,7 @@ public class Player extends User implements Executor, IPlayer
this.entity.setHealth(this.entity.getMaxHealth());
this.entity.setManaPoints(this.entity.getMaxMana());
this.entity.clearEffects(true);
this.addFeed(TextColor.DGREEN + "Du wurdest geheilt");
this.addFeed(TextColor.DARK_GREEN + "Du wurdest geheilt");
}
break;
@ -2745,7 +2745,7 @@ public class Player extends User implements Executor, IPlayer
mem = Runtime.getRuntime().freeMemory() - mem;
mem = mem < 0L ? 0L : mem;
// sender.addConsole("Server-JVM GC ausgeführt: ", );
this.addFeed(TextColor.DGREEN + "%s%s MB freigegeben, %s MB von %s MB verwendet (%s %%)", worlds > 0 ? worlds + " entladen, " : "", mem / 1024L / 1024L, (Runtime.getRuntime().totalMemory() -
this.addFeed(TextColor.DARK_GREEN + "%s%s MB freigegeben, %s MB von %s MB verwendet (%s %%)", worlds > 0 ? worlds + " entladen, " : "", mem / 1024L / 1024L, (Runtime.getRuntime().totalMemory() -
Runtime.getRuntime().freeMemory()) / 1024L / 1024L, Runtime.getRuntime().totalMemory() / 1024L / 1024L,
Runtime.getRuntime().freeMemory() * 100L / Runtime.getRuntime().maxMemory());
}
@ -2919,11 +2919,11 @@ public class Player extends User implements Executor, IPlayer
if(!slot.isItemValid(stack))
return;
if(old.getSize() == 1)
this.addFeed(TextColor.DRED + "* %s zerstört",
old.getColoredName(TextColor.DRED));
this.addFeed(TextColor.DARK_RED + "* %s zerstört",
old.getColoredName(TextColor.DARK_RED));
else
this.addFeed(TextColor.DRED + "* %d %s zerstört", old.getSize(),
old.getColoredName(TextColor.DRED));
this.addFeed(TextColor.DARK_RED + "* %d %s zerstört", old.getSize(),
old.getColoredName(TextColor.DARK_RED));
}
}
else if(!slot.isItemValid(stack))
@ -2933,11 +2933,11 @@ public class Player extends User implements Executor, IPlayer
this.entity.openContainer.detectAndSendChanges();
this.entity.worldObj.playSoundAtEntity(this.entity, SoundEvent.POP, 0.2F);
if(amount == 1)
this.addFeed(TextColor.DGREEN + "* %s geschummelt",
stack.getColoredName(TextColor.DGREEN));
this.addFeed(TextColor.DARK_GREEN + "* %s geschummelt",
stack.getColoredName(TextColor.DARK_GREEN));
else
this.addFeed(TextColor.DGREEN + "* %d %s geschummelt", amount,
stack.getColoredName(TextColor.DGREEN));
this.addFeed(TextColor.DARK_GREEN + "* %d %s geschummelt", amount,
stack.getColoredName(TextColor.DARK_GREEN));
}
public void processSign(CPacketSign packetIn)

View file

@ -79,7 +79,6 @@ import common.block.tech.BlockWallSign;
import common.block.tech.BlockWarpChest;
import common.collect.Lists;
import common.collect.Maps;
import common.color.DyeColor;
import common.entity.Entity;
import common.entity.animal.EntityBat;
import common.entity.animal.EntityChicken;
@ -109,6 +108,7 @@ import common.util.BlockPos;
import common.util.Facing;
import common.util.Facing.Axis;
import common.util.NibbleArray;
import common.util.TextColor;
import common.world.State;
public abstract class Converter {
@ -290,9 +290,9 @@ public abstract class Converter {
private static final Map<String, String> ENTITY_MAP = Maps.newHashMap();
private static final Map<String, Class<? extends TileEntity>> TILE_MAP = Maps.newHashMap();
private static final State[] BLOCK_MAP = new State[65536];
private static final DyeColor[] COLOR_LOOKUP = new DyeColor[] {
DyeColor.WHITE, DyeColor.ORANGE, DyeColor.MAGENTA, DyeColor.LIGHT_BLUE, DyeColor.YELLOW, DyeColor.LIME, DyeColor.PINK, DyeColor.GRAY,
DyeColor.SILVER, DyeColor.CYAN, DyeColor.PURPLE, DyeColor.BLUE, DyeColor.BROWN, DyeColor.GREEN, DyeColor.RED, DyeColor.BLACK
private static final TextColor[] COLOR_LOOKUP = new TextColor[] {
TextColor.WHITE, TextColor.ORANGE, TextColor.MAGENTA, TextColor.LIGHT_BLUE, TextColor.YELLOW, TextColor.GREEN, TextColor.MAGENTA, TextColor.GRAY,
TextColor.LIGHT_GRAY, TextColor.CYAN, TextColor.VIOLET, TextColor.BLUE, TextColor.BROWN, TextColor.DARK_GREEN, TextColor.RED, TextColor.BLACK
};
private static void mapEntity(Class<? extends Entity> clazz, String ... names) {
@ -799,7 +799,7 @@ public abstract class Converter {
mapBlock(Blocks.hellrock, 87);
mapBlock(Blocks.soul_sand, 88);
mapBlock(Blocks.glowstone, 89);
mapBlock(Blocks.purple_glass_pane, 90);
mapBlock(Blocks.violet_glass_pane, 90);
mapBlock(Blocks.lit_lamp, 91);
mapBlock(Blocks.cake, 92);
mapBlock(new BlockFunction() {

View file

@ -257,12 +257,12 @@ public class ReplacerMesa extends ReplacerBiome
if (j4 + k1 > 1 && random.chance())
{
this.layers[j4 + k1 - 1] = Blocks.silver_clay.getState();
this.layers[j4 + k1 - 1] = Blocks.light_gray_clay.getState();
}
if (j4 + k1 < 63 && random.chance())
{
this.layers[j4 + k1 + 1] = Blocks.silver_clay.getState();
this.layers[j4 + k1 + 1] = Blocks.light_gray_clay.getState();
}
}
}