/** * Updates a players' ping statistics */ public void processKeepAlive(CPacketKeepAlive packetIn) { if (packetIn.getKey() == this.keepAliveId) { int i = (int)(this.currentTimeMillis() - this.lastPingTime); this.playerEntity.ping = (this.playerEntity.ping * 3 + i) / 4; } }
/** * Called from the main game loop to update the screen. */ public void updateScreen() { ++this.progress; if (this.progress % 20 == 0) { this.connection.sendPacket(new CPacketKeepAlive()); } }
public void handleKeepAlive(SPacketKeepAlive packetIn) { this.sendPacket(new CPacketKeepAlive(packetIn.getId())); }
@Override public void processKeepAlive(CPacketKeepAlive p_147353_1_) { }
@Override public void processKeepAlive(@Nonnull CPacketKeepAlive p_147353_1_) { }
@Override public void processKeepAlive(CPacketKeepAlive packetIn) { }
/** * Updates a players' ping statistics */ void processKeepAlive(CPacketKeepAlive packetIn);