mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 07:02:32 +01:00
Fix player dimension packages (#1630)
This commit is contained in:
parent
eb06ba8664
commit
91a344aa92
@ -251,7 +251,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
"minecraft:dimension_type", MinecraftServer.getDimensionTypeManager().toNBT(),
|
||||
"minecraft:worldgen/biome", MinecraftServer.getBiomeManager().toNBT()));
|
||||
final JoinGamePacket joinGamePacket = new JoinGamePacket(getEntityId(), false, gameMode, null,
|
||||
List.of("minestom:world"), nbt, dimensionType.toString(), "minestom:world",
|
||||
List.of(dimensionType.getName().asString()), nbt, dimensionType.toString(), dimensionType.getName().asString(),
|
||||
0, 0, MinecraftServer.getChunkViewDistance(), MinecraftServer.getChunkViewDistance(),
|
||||
false, true, false, levelFlat);
|
||||
sendPacket(joinGamePacket);
|
||||
@ -964,7 +964,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
final PlayerInfoPacket removePlayerPacket = getRemovePlayerToList();
|
||||
final PlayerInfoPacket addPlayerPacket = getAddPlayerToList();
|
||||
|
||||
RespawnPacket respawnPacket = new RespawnPacket(getDimensionType().toString(), "minestom:world",
|
||||
RespawnPacket respawnPacket = new RespawnPacket(getDimensionType().toString(), getDimensionType().getName().asString(),
|
||||
0, gameMode, gameMode, false, levelFlat, true);
|
||||
|
||||
sendPacket(removePlayerPacket);
|
||||
@ -1337,7 +1337,7 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
|
||||
Check.argCondition(dimensionType.equals(getDimensionType()),
|
||||
"The dimension needs to be different than the current one!");
|
||||
this.dimensionType = dimensionType;
|
||||
sendPacket(new RespawnPacket(dimensionType.toString(), "minestom:world",
|
||||
sendPacket(new RespawnPacket(dimensionType.toString(), getDimensionType().getName().asString(),
|
||||
0, gameMode, gameMode, false, levelFlat, true));
|
||||
refreshClientStateAfterRespawn();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user