Accurate Ping Measurement in Minecraft PE
The standard method for calculating ping and latency within the game has often been perceived as exceedingly inaccurate and slow to respond.
Key Information
Server-side latency values are typically transmitted to players only once every 30 seconds, leading to potential discrepancies:
public void tick() {
if (++this.sendAllPlayerInfoIn > 600) {
this.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.UPDATE_LATENCY, this.players));
this.sendAllPlayerInfoIn = 0;
}
}
The “calculation” process works like this:
int i = (int)(Util.getMillis() - this.keepAliveTime);
this.player.latency = (this.player.latency * 3 + i) / 4;
The Proper Ping mod bypasses the vanilla limitation by utilizing a custom packet to effectively measure the latency, collecting an accurate average based on the last 5 round-trip time (RTT) readings. Additionally, it features a customizable HUD element that allows you to monitor your ping continuously with options like:
- Complete concealment of the HUD
- Flexible positioning anywhere on your screen
- Display of the last 5 latency readings within the same HUD
- Numerical representation of latency for other players instead of generic bars (with server-side config options to adjust the frequency at which these values are shared)
Sample Configuration with Default Settings
["Ping HUD"]
#Enable ping HUD
pingHudEnabled = true
#Show last 5 ping records
showPingQueue = false
#Text appearance with shadow
drawTextWithShadow = true
#Choose left (true) or right (false) for text positioning
leftOrRight = true
#Horizontal padding from screen edge in scaled GUI pixels
#Range: > 0
horizontalPadding = 4
#Line number from the top to begin text drawing
#Range: > 0
lineFromTop = 1
#Vertical padding from top edge in scaled GUI pixels
#Range: > 0
verticalPadding = 4
[Other]
#Display numbers in milliseconds within player list
playerListNumbers = true
Visual Example of Full Display Configuration
This example shows the display with the last 5 measurements activated, numerical values for players, and positioned on the right side of the screen:
Frequently Asked Questions
Q: Is this compatible with Forge?
A: Yes, it is compatible with Forge.
Q: Can I feature your mod in my video?
A: Certainly! Just be sure to include a link to the mod or modpack if applicable.
Q: May I add your mod to my modpack?
A: Mods placed on CurseForge or Modrinth are welcomed in modpacks.
