Created
November 1, 2020 17:01
-
-
Save mdashlw/d27c0da375084f384732034c93926a84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sending keep alive | |
if (this.networkTickCount - this.lastSentPingPacket > 40L) | |
{ | |
this.lastSentPingPacket = (long)this.networkTickCount; | |
this.lastPingTime = this.currentTimeMillis(); | |
this.field_147378_h = (int)this.lastPingTime; | |
this.sendPacket(new S00PacketKeepAlive(this.field_147378_h)); | |
} | |
// processing keep alive | |
int i = (int)(this.currentTimeMillis() - this.lastPingTime); | |
this.playerEntity.ping = (this.playerEntity.ping * 3 + i) / 4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment