mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 11:35:18 +01:00
Fixed some 1.9 -> 1.8 movement issues (#3353)
This commit is contained in:
parent
20a4ae3e4b
commit
408392e796
@ -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());
|
||||
|
@ -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
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user