Server-change mechanics update

This commit is contained in:
Five (Xer)
2020-05-23 13:03:33 +02:00
parent 197bc4f288
commit 38487c5bba
2 changed files with 10 additions and 7 deletions

View File

@@ -334,12 +334,15 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
// to perform entity ID rewrites, eliminating potential issues from rewriting packets and // to perform entity ID rewrites, eliminating potential issues from rewriting packets and
// improving compatibility with mods. // improving compatibility with mods.
player.getMinecraftConnection().delayedWrite(joinGame); player.getMinecraftConnection().delayedWrite(joinGame);
if (player.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_16) < 0) {
int tempDim = joinGame.getDimension() == 0 ? -1 : 0; int tempDim = joinGame.getDimension() == 0 ? -1 : 0;
player.getMinecraftConnection().delayedWrite( player.getMinecraftConnection().delayedWrite(
new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(), new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(),
joinGame.getGamemode(), joinGame.getLevelType(), joinGame.getShouldKeepPlayerData(), joinGame.getGamemode(), joinGame.getLevelType(),
joinGame.getShouldKeepPlayerData(),
joinGame.getIsDebug(), joinGame.getIsFlat(), joinGame.getIsDebug(), joinGame.getIsFlat(),
joinGame.getDimensionRegistryName())); joinGame.getDimensionRegistryName()));
}
player.getMinecraftConnection().delayedWrite( player.getMinecraftConnection().delayedWrite(
new Respawn(joinGame.getDimension(), joinGame.getPartialHashedSeed(), new Respawn(joinGame.getDimension(), joinGame.getPartialHashedSeed(),
joinGame.getDifficulty(), joinGame.getGamemode(), joinGame.getLevelType(), joinGame.getDifficulty(), joinGame.getGamemode(), joinGame.getLevelType(),