Fix idle ticking in proxies (#2631)

This commit is contained in:
creeper123123321 2021-07-20 13:57:53 -03:00 committed by GitHub
parent d7966567e7
commit d14db9396b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -39,13 +39,14 @@ public class BungeeMovementTransmitter extends MovementTransmitterProvider {
public void sendPlayer(UserConnection userConnection) {
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
PacketWrapper wrapper = PacketWrapper.create(0x03, null, userConnection);
wrapper.write(Type.BOOLEAN, userConnection.get(MovementTracker.class).isGround());
MovementTracker tracker = userConnection.get(MovementTracker.class);
wrapper.write(Type.BOOLEAN, tracker.isGround());
try {
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
} catch (Exception e) {
e.printStackTrace();
}
// PlayerPackets will increment idle
tracker.incrementIdlePacket();
}
}
}

View File

@ -39,13 +39,14 @@ public class VelocityMovementTransmitter extends MovementTransmitterProvider {
public void sendPlayer(UserConnection userConnection) {
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
PacketWrapper wrapper = PacketWrapper.create(0x03, null, userConnection);
wrapper.write(Type.BOOLEAN, userConnection.get(MovementTracker.class).isGround());
MovementTracker tracker = userConnection.get(MovementTracker.class);
wrapper.write(Type.BOOLEAN, tracker.isGround());
try {
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
} catch (Exception e) {
e.printStackTrace();
}
// PlayerPackets will increment idle
tracker.incrementIdlePacket();
}
}
}