universe cleanup

This commit is contained in:
Sen 2025-07-17 03:11:29 +02:00
parent cf37d48292
commit 9b5eab4f57
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
68 changed files with 553 additions and 369 deletions

View file

@ -307,7 +307,7 @@ public final class Server implements IThreadListener, Executor {
TagObject data = new TagObject();
data.setString("Type", dim.getType().getName());
data.setString("Name", UniverseRegistry.getName(dim));
data.setString("CustomName", dim.getCustomName());
data.setString("CustomName", dim.getDisplay());
switch(dim.getType()) {
case AREA:
data.setString("Domain", UniverseRegistry.getDomain((Area)dim).id);
@ -330,7 +330,7 @@ public final class Server implements IThreadListener, Executor {
TagObject data = new TagObject();
data.setString("Type", "sector");
data.setString("Name", sector.id);
data.setString("CustomName", sector.getCustomName());
data.setString("CustomName", sector.getDisplay());
data.setString("Galaxy", UniverseRegistry.getGalaxy(sector).id);
list.add(data);
}
@ -340,7 +340,7 @@ public final class Server implements IThreadListener, Executor {
TagObject data = new TagObject();
data.setString("Type", "galaxy");
data.setString("Name", galaxy.id);
data.setString("CustomName", galaxy.getCustomName());
data.setString("CustomName", galaxy.getDisplay());
list.add(data);
}
}
@ -349,7 +349,7 @@ public final class Server implements IThreadListener, Executor {
TagObject data = new TagObject();
data.setString("Type", "domain");
data.setString("Name", domain.id);
data.setString("CustomName", domain.getCustomName());
data.setString("CustomName", domain.getDisplay());
list.add(data);
}
}
@ -440,7 +440,7 @@ public final class Server implements IThreadListener, Executor {
}
dim.readData(tag == null ? new TagObject() : tag);
if(tag == null || !tag.hasLong("Seed"))
Log.TICK.info("Startwert für %s: %d" + (Vars.seed.isEmpty() ? "" : " von Basiswert '%s'"), dim.getNameString(), dim.getSeed(), Vars.seed);
Log.TICK.info("Startwert für %s: %d" + (Vars.seed.isEmpty() ? "" : " von Basiswert '%s'"), dim.getDisplay(), dim.getSeed(), Vars.seed);
}
private void saveDimension(Dimension dim) {
@ -1081,7 +1081,7 @@ public final class Server implements IThreadListener, Executor {
if(message != null)
conn.addHotbar(TextColor.DRED + message);
conn.addFeed(TextColor.RED + "* Bei %d, %d, %d in Dimension %s gestorben", pos.getX(), pos.getY(), pos.getZ(),
old.worldObj.dimension.getNameString());
old.worldObj.dimension.getDisplay());
}
public TagObject swapPlayer(Player conn, TagObject tag, Class<? extends EntityNPC> clazz) {

View file

@ -20,7 +20,7 @@ public class WorldParser extends DimensionParser {
Dimension dim = (Dimension)super.parse(env, input);
WorldServer world = this.loadedOnly ? env.getServer().getWorldNoLoad(dim) : env.getServer().getWorld(dim);
if(world == null)
throw new RunException("Dimension '%s' ist nicht geladen", dim.getNameString());
throw new RunException("Dimension '%s' ist nicht geladen", dim.getDisplay());
return world;
}

View file

@ -59,7 +59,7 @@ public class CommandBlock extends Command {
}
}
if(success)
exec.log("%s bei %d, %d, %d in %s gesetzt", state.getBlock().getDisplay(), position.getX(), position.getY(), position.getZ(), world.dimension.getNameString());
exec.log("%s bei %d, %d, %d in %s gesetzt", state.getBlock().getDisplay(), position.getX(), position.getY(), position.getZ(), world.dimension.getDisplay());
else
exec.log("Block wurde nicht verändert");
return success;

View file

@ -27,7 +27,7 @@ public class CommandDeathspot extends Command {
throw new RunException("%s hat keinen letzten Todespunkt", player.getCommandName());
for(Entity entity : entities) {
entity.teleport(pos);
exec.log("%s zum Todespunkt von %s (%d, %d, %d in %s) teleportiert", entity.getCommandName(), player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s zum Todespunkt von %s (%d, %d, %d in %s) teleportiert", entity.getCommandName(), player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
}
return entities.size();
}

View file

@ -20,6 +20,6 @@ public class CommandDelwarp extends Command {
throw new RunException("Warp '%s' existiert nicht", warp);
Position pos = env.getServer().getWarps().remove(warp);
Dimension wdim = pos.getDimension();
exec.log("Warp %s bei %d, %d, %d in %s entfernt", warp, ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), wdim == null ? "<?>" : wdim.getNameString());
exec.log("Warp %s bei %d, %d, %d in %s entfernt", warp, ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), wdim == null ? "<?>" : wdim.getDisplay());
}
}

View file

@ -28,13 +28,13 @@ public class CommandEntity extends Command {
entity.writeTags(etag);
if(tag == null) {
exec.log("************************************************************");
exec.log("Daten von %s bei %d, %d, %d in %s:", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getNameString());
exec.log("Daten von %s bei %d, %d, %d in %s:", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay());
exec.log(etag.format(4));
}
else {
etag.merge(tag);
entity.readTags(etag);
exec.log("Daten von %s bei %d, %d, %d in %s geändert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getNameString());
exec.log("Daten von %s bei %d, %d, %d in %s geändert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay());
}
done++;
}

View file

@ -19,9 +19,9 @@ public class CommandExterminatus extends Command {
if(world.dimension == Space.INSTANCE)
throw new RunException("Der Weltraum kann nicht zerstört werden (lol?)");
else if(world.isExterminated())
throw new RunException("Dimension %s ist bereits zerstört", world.dimension.getNameString());
exec.log(TextColor.YELLOW + "Dimension %s wird zerstört ...", world.dimension.getNameString());
throw new RunException("Dimension %s ist bereits zerstört", world.dimension.getDisplay());
exec.log(TextColor.YELLOW + "Dimension %s wird zerstört ...", world.dimension.getDisplay());
world.exterminate();
exec.log(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getNameString());
exec.log(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getDisplay());
}
}

View file

@ -22,7 +22,7 @@ public class CommandFind extends Command {
for(Entity entity : entities) {
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.getNameString(),
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()));
done++;
}

View file

@ -12,7 +12,6 @@ import common.dimension.DimType;
import common.dimension.Dimension;
import common.dimension.Planet;
import common.dimension.Star;
import common.init.Blocks;
import common.init.NameRegistry;
import common.init.UniverseRegistry;
import common.rng.Random;
@ -36,7 +35,6 @@ public class CommandLoad extends Command {
if(!UniverseRegistry.isType(star, DimType.STAR) || UniverseRegistry.isRegistered(name))
return null;
Planet dim = new Planet(sky, fog, clouds, 17000000, orbit, rotation, offset, gravity, temperature, brightness);
dim.setTimeQualifier(3);
return UniverseRegistry.registerCustomPlanet(name, custom, dim, star);
}
@ -59,13 +57,12 @@ public class CommandLoad extends Command {
do {
sname = NameRegistry.FANTASY.generate(rand, rand.range(2, 5));
} while(UniverseRegistry.isRegistered(sname.toLowerCase()));
Star star = new Star(0xff0000 | (rand.range(0x60, 0xa0) << 8), rand.range(300000000, 1200000000),
rand.frange(200.0f, 400.0f), rand.frange(5000.0f, 7000.0f),
rand.pick(Blocks.lava.getState(), Blocks.magma.getState()), rand.range(64, 212));
UniverseRegistry.registerCustomGalaxy(galaxy.toLowerCase(), galaxy);
UniverseRegistry.registerCustomSector(sector.toLowerCase(), sector, galaxy.toLowerCase());
Star star = new Star(rand.range(300000000, 1200000000),
rand.frange(200.0f, 400.0f), rand.frange(5000.0f, 7000.0f));
UniverseRegistry.registerCustomGalaxy(galaxy.toLowerCase(), "Galaxie " + galaxy);
UniverseRegistry.registerCustomSector(sector.toLowerCase(), "Sektor " + sector, galaxy.toLowerCase());
UniverseRegistry.registerCustomStar(sname.toLowerCase(), sname, star, galaxy.toLowerCase());
UniverseRegistry.registerCustomPlanet(pname.toLowerCase(), pname, (Planet)preset, sname.toLowerCase());
UniverseRegistry.registerCustomPlanet(pname.toLowerCase(), "Planet " + pname, (Planet)preset, sname.toLowerCase());
}
else if(preset.getType() == DimType.AREA) {
String domain;
@ -95,7 +92,7 @@ public class CommandLoad extends Command {
this.addColor("sky", 's', 0xffffffff);
this.addColor("fog", 'f', 0xc0d8ff);
this.addColor("clouds", 'w', 0xffffff);
this.addLong("orbit", 'o', 1L, 1000000000000L, World.EARTH_YEAR);
this.addLong("orbit", 'o', 1L, 1000000000000L, 8000000L);
this.addLong("rotation", 'r', 1L, 1000000000000L, 24000L);
this.addDouble("offset", 'm', 0.0, 100000.0, 0.0);
this.addDouble("gravity", 'g', 0.0, 100000.0, 9.81);

View file

@ -33,7 +33,7 @@ public class CommandOfflinetp extends Command {
throw new RunException("Spieler '%s' konnte nicht gefunden werden", user);
for(Entity entity : entities) {
entity.teleport(pos);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
}
return entities.size();
}

View file

@ -27,7 +27,7 @@ public class CommandPlayers extends Command {
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.getNameString(), 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.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));
}
}
}

View file

@ -13,8 +13,8 @@ public class CommandReset extends Command {
}
public void exec(CommandEnvironment env, Executor exec, WorldServer world) {
exec.log("Dimension %s wird zurückgesetzt ...", world.dimension.getNameString());
exec.log("Dimension %s wird zurückgesetzt ...", world.dimension.getDisplay());
world.reset();
exec.log("Dimension %s zurückgesetzt", world.dimension.getNameString());
exec.log("Dimension %s zurückgesetzt", world.dimension.getDisplay());
}
}

View file

@ -23,7 +23,7 @@ public class CommandReturn extends Command {
Position pos = ((Player)player.connection).getLastTeleport();
if(pos != null) {
player.teleport(pos);
exec.log("%s zum letzten Punkt (%d, %d, %d in %s) teleportiert", player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s zum letzten Punkt (%d, %d, %d in %s) teleportiert", player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
done++;
}
}

View file

@ -18,7 +18,7 @@ public class CommandSeed extends Command {
public Object exec(CommandEnvironment env, Executor exec, WorldServer world, boolean dump) {
if(dump)
exec.log("Daten: %s", world.dimension.dumpTags().format(4));
exec.log("Startwert von %s: %d", world.dimension.getNameString(), world.dimension.getSeed());
exec.log("Startwert von %s: %d", world.dimension.getDisplay(), world.dimension.getSeed());
return world.dimension.getSeed();
}
}

View file

@ -28,13 +28,13 @@ public class CommandSetwarp extends Command {
Position pos = env.getServer().getWarps().get(warp);
Dimension wdim = pos.getDimension();
if(wdim != null)
exec.log("Alte Position %d, %d, %d in %s entfernt", ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), dim.getNameString());
exec.log("Alte Position %d, %d, %d in %s entfernt", ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), dim.getDisplay());
}
else {
throw new RunException("Warp '%s' existiert bereits", warp);
}
}
env.getServer().getWarps().put(warp, new Position(position.xCoord, position.yCoord, position.zCoord, yaw == null ? 0.0f : yaw.floatValue(), pitch == null ? 0.0f : pitch.floatValue(), dim));
exec.log("Warp '%s' auf %d, %d, %d in %s gesetzt", warp, ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getNameString());
exec.log("Warp '%s' auf %d, %d, %d in %s gesetzt", warp, ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getDisplay());
}
}

View file

@ -19,6 +19,6 @@ public class CommandShowwarp extends Command {
throw new RunException("Warp '%s' existiert nicht", warp);
Position pos = env.getServer().getWarps().get(warp);
Dimension wdim = pos.getDimension();
exec.log("Warp %s ist bei %.2f, %.2f, %.2f [%.1f, %.1f] in %s", warp, pos.xCoord, pos.yCoord, pos.zCoord, pos.yaw(), pos.pitch(), wdim == null ? "<?>" : wdim.getNameString());
exec.log("Warp %s ist bei %.2f, %.2f, %.2f [%.1f, %.1f] in %s", warp, pos.xCoord, pos.yCoord, pos.zCoord, pos.yaw(), pos.pitch(), wdim == null ? "<?>" : wdim.getDisplay());
}
}

View file

@ -56,7 +56,7 @@ public class CommandSpawn extends Command {
tag != null && tag.hasInt("damage") ? tag.getInt("damage") : 0, tag != null && tag.hasBool("fire") && tag.getBool("fire"),
exec.isPlayer() && tag != null && tag.hasBool("summoned") && tag.getBool("summoned") ? ((Player)exec).getPresentEntity() : null);
}
exec.log("%sBlitz bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getNameString());
exec.log("%sBlitz bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getDisplay());
return null;
}
else {
@ -83,7 +83,7 @@ public class CommandSpawn extends Command {
}
spawned.add("#" + entity.getId());
}
exec.log("%s%s bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), EntityRegistry.getEntityName(type), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getNameString());
exec.log("%s%s bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), EntityRegistry.getEntityName(type), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getDisplay());
return Util.buildLines(",", spawned);
}
}

View file

@ -28,7 +28,7 @@ public class CommandTele extends Command {
public Object exec(CommandEnvironment env, Executor exec, Vec3 position, Dimension dim, Double yaw, Double pitch, List<Entity> entities) {
for(Entity entity : entities) {
entity.teleport(position.xCoord, position.yCoord, position.zCoord, yaw == null ? entity.rotYaw : yaw.floatValue(), pitch == null ? entity.rotPitch : pitch.floatValue(), dim);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getDisplay());
}
return entities.size();
}

View file

@ -6,6 +6,7 @@ import server.command.Command;
import server.command.CommandEnvironment;
import server.command.Executor;
import server.command.RunException;
import server.network.Player;
import server.world.WorldServer;
public class CommandTime extends Command {
@ -89,7 +90,7 @@ public class CommandTime extends Command {
dim.setDayTime(time);
dim.resetWeather();
}
exec.log("Zeit auf %s gesetzt", world.formatImperialTime(false));
exec.log("Zeit auf %s gesetzt", world.formatImperialTime(exec.isPlayer() ? ((Player)exec).getPresentEntity() : null, false));
return time;
}
}

View file

@ -22,7 +22,7 @@ public class CommandTp extends Command {
Position pos = target.getPos();
for(Entity entity : entities) {
entity.teleport(pos);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
}
return entities.size();
}

View file

@ -23,7 +23,7 @@ public class CommandTphere extends Command {
throw new RunException("Keine Position zum Teleportieren vorhanden");
for(Entity entity : entities) {
entity.teleport(pos);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
}
return entities.size();
}

View file

@ -45,7 +45,7 @@ public class CommandWarp extends Command {
// }
for(Entity entity : entities) {
entity.teleport(pos);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
}
return entities.size();
}

View file

@ -32,15 +32,15 @@ public class CommandWarps extends Command {
n++;
}
if(dim != null && n == 0) {
exec.log(TextColor.DGRAY + "Es sind keine Warps in %s vorhanden", dim.getNameString());
exec.log(TextColor.DGRAY + "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.getNameString());
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());
for(Entry<String, Position> warp : warps.entrySet()) {
Position pos = warp.getValue();
Dimension wdim = pos.getDimension();
if(wdim != null && (dim == null || wdim == dim))
exec.log(TextColor.NEON + "%s" + TextColor.GRAY + ": " + TextColor.ORANGE + "%s" + (dim == null ? " @ " : "") + "%d, %d, %d", warp.getKey(), dim != null ? "" : wdim.getNameString(), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord));
exec.log(TextColor.NEON + "%s" + TextColor.GRAY + ": " + TextColor.ORANGE + "%s" + (dim == null ? " @ " : "") + "%d, %d, %d", warp.getKey(), dim != null ? "" : wdim.getDisplay(), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord));
}
}
}

View file

@ -20,12 +20,12 @@ public class CommandWeather extends Command {
public void exec(CommandEnvironment env, Executor exec, Weather weather, WorldServer world, boolean transition) {
if(!world.dimension.getType().weather)
throw new RunException("Welt %s hat kein Wetter", world.dimension.getNameString());
throw new RunException("Welt %s hat kein Wetter", world.dimension.getDisplay());
else if(world.isExterminated())
throw new RunException("Welt %s ist zerstört", world.dimension.getNameString());
throw new RunException("Welt %s ist zerstört", world.dimension.getDisplay());
world.setWeather(weather);
if(!transition)
world.resetWeather();
exec.log("Wetter in %s zu %s geändert", world.dimension.getNameString(), weather.getDisplay());
exec.log("Wetter in %s zu %s geändert", world.dimension.getDisplay(), weather.getDisplay());
}
}

View file

@ -23,7 +23,7 @@ public class CommandWorld extends Command {
for(Entity entity : entities) {
BlockPos pos = adjust(world, entity.getPosition());
entity.teleport(pos, world);
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), world.dimension.getNameString());
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), world.dimension.getDisplay());
}
return entities.size();
}

View file

@ -1346,7 +1346,7 @@ public class Player extends User implements Executor, IPlayer
if(this.edit == EditAction.SELECT && this.selectionDim != Integer.MIN_VALUE && (this.selPos1 != null || this.selPos2 != null)) {
Dimension dim = UniverseRegistry.getDimension(this.selectionDim);
if(dim != null) {
msg += "; Bereich " + dim.getNameString() + ": ";
msg += "; Bereich " + dim.getDisplay() + ": ";
msg += (this.selPos1 != null ? this.selPos1 : "*") + " -> " + (this.selPos2 != null ? this.selPos2 : "*");
if(this.selPos1 != null && this.selPos2 != null) {
msg += " = " + (1 + Math.max(this.selPos1.getX(), this.selPos2.getX()) - Math.min(this.selPos1.getX(), this.selPos2.getX())) +
@ -1556,11 +1556,12 @@ public class Player extends User implements Executor, IPlayer
info = null;
Alignment align = Alignment.getByName(tag.getString("Align"));
Dimension dimension = UniverseRegistry.getDimension(tag.getString("Dimension"));
String dim = dimension == null ? "???" : dimension.getNameString();
String dim = dimension == null ? "???" : dimension.getDisplay();
BlockPos pos = new BlockPos(tag.getDouble("PosX"), tag.getDouble("PosY"), tag.getDouble("PosZ"));
String type = EntityRegistry.getEntityName(tag.getString("id"));
int level = tag.getInt("XpLevel");
return new PlayerCharacter(name, info, align, dim, pos, type, level);
Dimension origin = UniverseRegistry.getDimension(tag.getString("OriginDim"));
return new PlayerCharacter(name, info, align, dim, pos, type, level, origin == null ? null : UniverseRegistry.getName(origin));
}
public void onConnect() {
@ -2428,7 +2429,7 @@ public class Player extends User implements Executor, IPlayer
Position pos = this.server.getRandomSpawnPosition(origin);
this.entity.teleport(pos);
this.teleportPos = this.deathPos = null;
this.sendPacket(new SPacketCharacterList(this.selected, this.selected, new PlayerCharacter(this.entity.getCustomNameTag(), this.entity.getDescription(), this.entity.getAlignment(), this.entity.worldObj.dimension.getNameString(), this.entity.getPosition(), EntityRegistry.getEntityName(EntityRegistry.getEntityString(this.entity)), this.entity.experienceLevel)));
this.sendPacket(new SPacketCharacterList(this.selected, this.selected, new PlayerCharacter(this.entity.getCustomNameTag(), this.entity.getDescription(), this.entity.getAlignment(), this.entity.worldObj.dimension.getDisplay(), this.entity.getPosition(), EntityRegistry.getEntityName(EntityRegistry.getEntityString(this.entity)), this.entity.experienceLevel, UniverseRegistry.getName(world.dimension))));
// if(this.local)
// this.server.setDone();
break;