geforkt von Mirrors/Velocity
Rebase #310 on Velocity 1.1.0
Totally untested, proceed with caution.
Dieser Commit ist enthalten in:
Ursprung
ada35ff286
Commit
09f71dede9
@ -31,6 +31,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.function.UnaryOperator;
|
import java.util.function.UnaryOperator;
|
||||||
|
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
|
|
||||||
public class VelocityServerConnection implements MinecraftConnectionAssociation, ServerConnection {
|
public class VelocityServerConnection implements MinecraftConnectionAssociation, ServerConnection {
|
||||||
|
@ -302,7 +302,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
player.getConnection().delayedWrite(joinGame);
|
player.getConnection().delayedWrite(joinGame);
|
||||||
|
|
||||||
destination.setActiveDimensionRegistry(joinGame.getDimensionRegistry()); // 1.16
|
destination.setActiveDimensionRegistry(joinGame.getDimensionRegistry()); // 1.16
|
||||||
player.getMinecraftConnection().delayedWrite(joinGame);
|
player.getConnection().delayedWrite(joinGame);
|
||||||
// Required for Legacy Forge
|
// Required for Legacy Forge
|
||||||
player.getPhase().onFirstJoin(player);
|
player.getPhase().onFirstJoin(player);
|
||||||
} else {
|
} else {
|
||||||
@ -317,18 +317,18 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
// Most notably, by having the client accept the join game packet, we can work around the need
|
// Most notably, by having the client accept the join game packet, we can work around the need
|
||||||
// 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.getConnection().delayedWrite(joinGame);
|
||||||
// Since 1.16 this dynamic changed:
|
// Since 1.16 this dynamic changed:
|
||||||
// We don't need to send two dimension swiches anymore!
|
// We don't need to send two dimension swiches anymore!
|
||||||
if (player.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_16) < 0) {
|
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.getConnection().delayedWrite(
|
||||||
new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(),
|
new Respawn(tempDim, joinGame.getPartialHashedSeed(), joinGame.getDifficulty(),
|
||||||
joinGame.getGamemode(), joinGame.getLevelType(),
|
joinGame.getGamemode(), joinGame.getLevelType(),
|
||||||
false, joinGame.getDimensionInfo(), joinGame.getPreviousGamemode()));
|
false, joinGame.getDimensionInfo(), joinGame.getPreviousGamemode()));
|
||||||
}
|
}
|
||||||
|
|
||||||
player.getMinecraftConnection().delayedWrite(
|
player.getConnection().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(),
|
||||||
false, joinGame.getDimensionInfo(), joinGame.getPreviousGamemode()));
|
false, joinGame.getDimensionInfo(), joinGame.getPreviousGamemode()));
|
||||||
|
@ -7,6 +7,7 @@ import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_13;
|
|||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_14;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_15;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_15;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_16;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_16;
|
||||||
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_7_2;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_8;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9_4;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_9_4;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren