Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Server-change mechanics update
Dieser Commit ist enthalten in:
Ursprung
197bc4f288
Commit
38487c5bba
@ -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);
|
||||||
int tempDim = joinGame.getDimension() == 0 ? -1 : 0;
|
if (player.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_16) < 0) {
|
||||||
player.getMinecraftConnection().delayedWrite(
|
int tempDim = joinGame.getDimension() == 0 ? -1 : 0;
|
||||||
new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(),
|
player.getMinecraftConnection().delayedWrite(
|
||||||
joinGame.getGamemode(), joinGame.getLevelType(), joinGame.getShouldKeepPlayerData(),
|
new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(),
|
||||||
joinGame.getIsDebug(), joinGame.getIsFlat(),
|
joinGame.getGamemode(), joinGame.getLevelType(),
|
||||||
joinGame.getDimensionRegistryName()));
|
joinGame.getShouldKeepPlayerData(),
|
||||||
|
joinGame.getIsDebug(), joinGame.getIsFlat(),
|
||||||
|
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(),
|
||||||
|
@ -86,7 +86,7 @@ public class Chat implements MinecraftPacket {
|
|||||||
ProtocolUtils.writeString(buf, message);
|
ProtocolUtils.writeString(buf, message);
|
||||||
if (direction == ProtocolUtils.Direction.CLIENTBOUND) {
|
if (direction == ProtocolUtils.Direction.CLIENTBOUND) {
|
||||||
buf.writeByte(type);
|
buf.writeByte(type);
|
||||||
if(version.compareTo(ProtocolVersion.MINECRAFT_1_16) >= 0) {
|
if (version.compareTo(ProtocolVersion.MINECRAFT_1_16) >= 0) {
|
||||||
ProtocolUtils.writeUuid(buf, sender == null ? EMPTY_SENDER : sender);
|
ProtocolUtils.writeUuid(buf, sender == null ? EMPTY_SENDER : sender);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren