Fix dimension for 1.19

This commit is contained in:
BoomEaro 2022-06-09 19:12:53 +03:00
parent 226fd32c6d
commit 32ea23591f
3 changed files with 10 additions and 3 deletions

View File

@ -87,6 +87,12 @@ public final class LimboConfig {
maxPlayers = conf.node("maxPlayers").getInt();
pingData = conf.node("ping").get(PingData.class);
dimensionType = conf.node("dimension").getString();
if (dimensionType.equalsIgnoreCase("nether")) {
dimensionType = "the_nether";
}
if (dimensionType.equalsIgnoreCase("end")) {
dimensionType = "the_end";
}
spawnPosition = conf.node("spawnPosition").get(Location.class);
gameMode = conf.node("gameMode").getInt();
useBrandName = conf.node("brandName", "enable").getBoolean();

View File

@ -74,8 +74,9 @@ public final class PacketSnapshots {
joinGame.setReducedDebugInfo(true);
joinGame.setDebug(false);
joinGame.setViewDistance(0);
joinGame.setWorldName("minecraft:overworld");
joinGame.setWorldNames("minecraft:overworld");
String worldName = "minecraft:" + server.getConfig().getDimensionType().toLowerCase();
joinGame.setWorldName(worldName);
joinGame.setWorldNames(worldName);
joinGame.setHashedSeed(0);
joinGame.setDimensionRegistry(server.getDimensionRegistry());

View File

@ -88,7 +88,7 @@ public final class DimensionRegistry {
switch (def.toLowerCase()) {
case "overworld":
return new Dimension(0, "minecraft:overworld", overWorld);
case "nether":
case "the_nether":
return new Dimension(-1, "minecraft:nether", nether);
case "the_end":
return new Dimension(1, "minecraft:the_end", theEnd);