1
0
Fork 0

make dimension registry server side

This commit is contained in:
Sen 2025-07-24 15:54:34 +02:00
parent b9d62c2253
commit 4de4f41a5d
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
98 changed files with 1008 additions and 608 deletions

View file

@ -51,6 +51,7 @@ import client.gui.container.GuiInventory;
import client.gui.element.Area;
import client.gui.ingame.GuiGameOver;
import client.gui.ingame.GuiRename;
import client.init.DimensionMapping;
import client.network.ClientLoginHandler;
import client.network.ClientPlayer;
import client.network.DummyConnection;
@ -125,7 +126,6 @@ import common.init.ItemRegistry;
import common.init.Items;
import common.init.Registry;
import common.init.SoundEvent;
import common.init.UniverseRegistry;
import common.inventory.InventoryPlayer;
import common.item.Item;
import common.item.ItemControl;
@ -706,6 +706,8 @@ public class Client implements IThreadListener {
ClientPlayer player = new ClientPlayer(this, new DummyConnection());
this.debugWorld = true;
this.charEditor = false;
this.dimensionName = "debug";
Space.INSTANCE.setDisplay("Debug-Welt");
this.controller = new PlayerController(this, player);
this.loadWorld(Space.INSTANCE, EntityRegistry.getEntityID(EntityCpu.class));
this.player.setId(0);
@ -720,6 +722,10 @@ public class Client implements IThreadListener {
ClientPlayer netHandler = this.getNetHandler();
if(netHandler != null)
netHandler.cleanup();
EntityTexManager.clearTextures();
DimensionMapping.clear();
this.dimensionName = null;
Space.INSTANCE.setDisplay(null);
this.debugWorld = false;
this.charEditor = false;
this.viewEntity = null;
@ -1853,7 +1859,7 @@ public class Client implements IThreadListener {
ExtMath.wrapf(this.viewEntity.rotYaw), ExtMath.wrapf(this.viewEntity.rotPitch)) + "\n" +
String.format("Biom: %.2f K, N: %.2f K, D: %s (%s)", chunk.getTemperature(pos), chunk.getOffset(pos),
TextColor.stripCodes(this.world.dimension.getDisplay()),
this.dimensionName == null ? UniverseRegistry.getName(this.world.dimension) : this.dimensionName) + "\n" +
this.dimensionName) + "\n" +
"Licht: " + chunk.getLightSub(pos, 0) + " (" + chunk.getLight(LightType.SKY, pos) + " Himmel, "
+ chunk.getLight(LightType.BLOCK, pos) + " Blöcke, " + String.format(
"%.1f", this.entityRenderer.getSunBrightness(1.0f) * 15.0f) + " Welt), A: "