3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-10-02 00:10:06 +02:00

Fixed some 1.9 -> 1.8 movement issues (#3353)

Dieser Commit ist enthalten in:
RK_01 2023-06-18 14:51:37 +02:00 committet von GitHub
Ursprung 20a4ae3e4b
Commit 408392e796
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -38,7 +38,7 @@ public class BungeeMovementTransmitter extends MovementTransmitterProvider {
}
public void sendPlayer(UserConnection userConnection) {
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
if (userConnection.getProtocolInfo().getState() == State.PLAY && userConnection.getEntityTracker(Protocol1_9To1_8.class).clientEntityId() != -1) {
PacketWrapper wrapper = PacketWrapper.create(ServerboundPackets1_8.PLAYER_MOVEMENT, null, userConnection);
MovementTracker tracker = userConnection.get(MovementTracker.class);
wrapper.write(Type.BOOLEAN, tracker.isGround());

Datei anzeigen

@ -23,7 +23,7 @@ public class MovementTracker implements StorableObject {
private static final long IDLE_PACKET_DELAY = 50L; // Update every 50ms (20tps)
private static final long IDLE_PACKET_LIMIT = 20; // Max 20 ticks behind
private long nextIdlePacket = 0L;
private boolean ground = true;
private boolean ground = false;
public void incrementIdlePacket() {
// Notify of next update

Datei anzeigen

@ -38,7 +38,7 @@ public class VelocityMovementTransmitter extends MovementTransmitterProvider {
}
public void sendPlayer(UserConnection userConnection) {
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
if (userConnection.getProtocolInfo().getState() == State.PLAY && userConnection.getEntityTracker(Protocol1_9To1_8.class).clientEntityId() != -1) {
PacketWrapper wrapper = PacketWrapper.create(ServerboundPackets1_8.PLAYER_MOVEMENT, null, userConnection);
MovementTracker tracker = userConnection.get(MovementTracker.class);
wrapper.write(Type.BOOLEAN, tracker.isGround());