fix dimension names
This commit is contained in:
parent
d09b9516a8
commit
cad8ff6adb
44 changed files with 147 additions and 140 deletions
|
@ -1718,7 +1718,7 @@ public class Client implements IThreadListener {
|
|||
ChunkClient chunk = this.world.getChunk(blockpos);
|
||||
biome = chunk.getBiome(blockpos);
|
||||
bline = "Biom: " + biome.display + " (" + biome.name + "), D: " +
|
||||
TextColor.stripCodes(this.world.dimension.getFormattedName(false)) +
|
||||
TextColor.stripCodes(this.world.dimension.getNameString()) +
|
||||
" (" + (this.dimensionName == null ? UniverseRegistry.getName(this.world.dimension) : this.dimensionName) + ")";
|
||||
lline = "Licht: " + chunk.getLightSub(blockpos, 0) + " (" + chunk.getLight(LightType.SKY, blockpos) + " Himmel, "
|
||||
+ chunk.getLight(LightType.BLOCK, blockpos) + " Blöcke, " + String.format(
|
||||
|
@ -1727,7 +1727,7 @@ public class Client implements IThreadListener {
|
|||
}
|
||||
else {
|
||||
bline = "Biom: <?>, D: " +
|
||||
TextColor.stripCodes(this.world.dimension.getFormattedName(false)) +
|
||||
TextColor.stripCodes(this.world.dimension.getNameString()) +
|
||||
" (" + (this.dimensionName == null ? UniverseRegistry.getName(this.world.dimension) : this.dimensionName) + ")";
|
||||
lline = "Licht: " + String.format(
|
||||
"%.1f", this.world.getSunBrightness(1.0f) * 15.0f) + " Welt, A: "
|
||||
|
|
|
@ -454,10 +454,8 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
|
||||
private void setDimButton() {
|
||||
Dimension dim = DIMENSIONS.get(this.dimension);
|
||||
this.dimButton.setText((dim.getType() == DimType.PLANET ? "Heimplanet" : "Heimdimension") + ": " + dim.getFormattedName(false));
|
||||
String name = dim.getFormattedName(true);
|
||||
int index = name.indexOf(" / ");
|
||||
this.descLines.setText(index >= 0 ? Util.buildLines(name.substring(index + " / ".length()).split(" / ")) : "");
|
||||
this.dimButton.setText((dim.getType() == DimType.PLANET ? "Heimplanet" : "Heimdimension") + ": " + dim.getNameString());
|
||||
this.descLines.setText(Util.buildLines(dim.getBaseNames()));
|
||||
}
|
||||
|
||||
public void onGuiClosed()
|
||||
|
|
|
@ -76,7 +76,7 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
|
|||
this.elements.clear();
|
||||
int selected = this.gm.selectedCharacter;
|
||||
for(PlayerCharacter character : this.gm.characterList) {
|
||||
this.elements.add(new CharacterEntry(selected == this.elements.size() ? new PlayerCharacter(character.name(), character.info(), character.align(), this.gm.player.worldObj.dimension.getFormattedName(false), this.gm.player.getPosition(), character.type(), this.gm.player.experienceLevel) : character, selected == this.elements.size()));
|
||||
this.elements.add(new CharacterEntry(selected == this.elements.size() ? new PlayerCharacter(character.name(), character.info(), character.align(), this.gm.player.worldObj.dimension.getNameString(), this.gm.player.getPosition(), character.type(), this.gm.player.experienceLevel) : character, selected == this.elements.size()));
|
||||
}
|
||||
if(!this.gm.charEditor)
|
||||
this.elements.add(new CharacterEntry(null, false));
|
||||
|
|
|
@ -21,7 +21,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 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.getFormattedName(false))));
|
||||
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.getNameString())));
|
||||
this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
|
||||
public void use(ActButton elem, PressType action) {
|
||||
GuiGameOver.this.gm.player.respawnPlayer();
|
||||
|
|
|
@ -18,7 +18,7 @@ public class GuiSign extends Gui implements FieldCallback {
|
|||
public void init(int width, int height) {
|
||||
this.add(new Label(0, -140, 300, 0, "Bearbeite Schild"));
|
||||
this.add(new Label(0, -80, 300, 0, String.format("%d, %d, %d", this.position.getX(), this.position.getY(), this.position.getZ())));
|
||||
this.add(new Label(0, -50, 300, 0, this.gm.world == null ? "<?>" : this.gm.world.dimension.getFormattedName(false)));
|
||||
this.add(new Label(0, -50, 300, 0, this.gm.world == null ? "<?>" : this.gm.world.dimension.getNameString()));
|
||||
for(int z = 0; z < this.lines.length; z++) {
|
||||
this.lines[z] = this.add(new Field(0, 40 * z, 300, 0, 50, this, this.tempLines[z] == null ? "" : this.tempLines[z]));
|
||||
}
|
||||
|
|
|
@ -1917,7 +1917,7 @@ public class ClientPlayer implements IClientPlayer
|
|||
NetHandler.checkThread(packet, this, this.gm, this.world);
|
||||
if(this.world.dimension.isCustom()) {
|
||||
this.world.dimension.setCustomName(packet.getCustomName());
|
||||
this.world.dimension.setDisplayName(packet.getFullName());
|
||||
this.world.dimension.setBaseNames(packet.getFullName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue