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

This commit is contained in:
RK_01 2023-06-18 14:51:37 +02:00 committed by GitHub
parent 20a4ae3e4b
commit 408392e796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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());

View File

@ -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

View File

@ -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());