Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-19 14:30:16 +01:00
Fix idle ticking in proxies (#2631)
Dieser Commit ist enthalten in:
Ursprung
d7966567e7
Commit
d14db9396b
@ -39,13 +39,14 @@ public class BungeeMovementTransmitter extends MovementTransmitterProvider {
|
|||||||
public void sendPlayer(UserConnection userConnection) {
|
public void sendPlayer(UserConnection userConnection) {
|
||||||
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
|
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
|
||||||
PacketWrapper wrapper = PacketWrapper.create(0x03, null, userConnection);
|
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 {
|
try {
|
||||||
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
|
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// PlayerPackets will increment idle
|
tracker.incrementIdlePacket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,13 +39,14 @@ public class VelocityMovementTransmitter extends MovementTransmitterProvider {
|
|||||||
public void sendPlayer(UserConnection userConnection) {
|
public void sendPlayer(UserConnection userConnection) {
|
||||||
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
|
if (userConnection.getProtocolInfo().getState() == State.PLAY) {
|
||||||
PacketWrapper wrapper = PacketWrapper.create(0x03, null, userConnection);
|
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 {
|
try {
|
||||||
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
|
wrapper.scheduleSendToServer(Protocol1_9To1_8.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// PlayerPackets will increment idle
|
tracker.incrementIdlePacket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren