登陆 注册 QQ登陆
快捷导航
查看: 5|回复: 0

[模组分享] Proper Ping (合适的延迟)-MOD模组

[复制链接]

4999

主题

60

回帖

1万

积分

龙❁妻

Rank: 8Rank: 8

经验
10280 EP
金粒
5181 粒
绿宝石
20 块
爱心
0 点
发表于 2025-8-10 18:57:22 | 显示全部楼层 |阅读模式
Proper Ping (合适的延迟)Github |相关wiki |源站链接支持: forgeMeasure and display ping properly

Vanilla ping/latency calculation always seemed _incredibly_ inaccurate and delayed to me.

Info
They only send the latency value to clients once every 30 seconds:
public void tick() {
   if (++this.sendAllPlayerInfoIn > 600) {
      this.broadcastAll(new ClientboundPlayerInfoPacket(ClientboundPlayerInfoPacket.Action.UPDATE_LATENCY, this.players));
      this.sendAllPlayerInfoIn = 0;
   }
}Copy已复制!
And this is how they \"calculate\" it:
int i = (int)(Util.getMillis() - this.keepAliveTime);
this.player.latency = (this.player.latency * 3 + i) / 4;Copy已复制!

This mod goes around Vanilla and measures latency with a similar custom packet, but takes a proper average of 5 last RTT (round-trip-time) results.

Besides that, it also adds a customizable hud element to always see your ping with options such as:

- Hide completely
- Position anywhere on the screen
- Show last 5 latency measurements in the same hud element
- Show numerical readings for other players on the server instead of abstract bars (there is a config option serverside to change the frequency of the server broadcasting these values to everyone)

Example config with default values
[\"Ping HUD\"]
        #Enable ping HUD
        pingHudEnabled = true
        #Additionally show 5 last ping values
        showPingQueue = false
        #Draw text with a shadow
        drawTextWithShadow = true
        #Draw ping either on the left side (true), or on the right (false)
        leftOrRight = true
        #How many scaled GUI pixels to start drawing from the edge of the screen
        #Range: > 0
        horizontalPadding = 4
        #On which line counting from the top to start drawing from
        #Range: > 0
        lineFromTop = 1
        #How many scaled GUI pixels to start drawing from the top of the screen
        #Range: > 0
        verticalPadding = 4

[Other]
        #Show numbers in milliseconds in player list
        playerListNumbers = trueCopy已复制!

Example of a full display with the last 5 measurements turned on, numerical player list values, positioned on the right side of the screen:



FAQ

*Q*: Forge?

*A*: Forge.

*Q*: Can I include your mod in a video?

*A*: As long as you include a link to the mod/modpack (if it happens to be in one), absolutely

*Q*: Can I add your mod to a modpack?

*A*: CurseForge/Modrinth modpacks are cool.

截图:

https://i.sodamc.com/modrinth/SyGZDAUssX.jpg?x-oss-process=style/forge2]https://i.sodamc.com/modrinth/ARMYFXtmsU.jpg?x-oss-process=style/forge2]https://i.sodamc.com/modrinth/d0RRtWxjUJ.jpg?x-oss-process=style/forge2]

来自Modrinth所有游戏版本1.20.11.19.2所有类型forge1.0.0proper_ping-1.20.1-1.0.0.jar下载1.0.0#Release- Updated to Minecraft 1.20.1- Removed some extraneous debug log calls展开版本: 1.0.0支持游戏: 1.20.1类型:ForgeRelease下载次数: 1,8051.0.1proper_ping-1.19.2-1.0.1.jar下载1.0.1#ReleaseRemoved some extraneous debug log calls展开版本: 1.0.1支持游戏: 1.19.2类型:ForgeRelease下载次数: 7381.0.0proper_ping-1.19.2-1.0.0.jar下载1.0.0#ReleaseFresh out of the oven展开版本: 1.0.0支持游戏: 1.19.2类型:ForgeRelease下载次数: 66全部版本

markdown_parsed

文章类型:收录

layui.use([\'form\'], function(){
var form = layui.form;
});

游客,如果您要查看本帖隐藏内容请回复
Proper Ping
楼主 2025-8-10 18:57:22 回复 收起回复
小僵尸论坛感谢有你~
回复 论坛版权

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 手机动态码快速登录

本版积分规则



官方

新浪微博 腾讯微博 微信公众号 投稿规则 版权声明 捐助我们

官方QQ①群: 291907844 (点击加群)
官方QQ②群: 421312192
官方QQ③群: 528726532

介绍

我的世界(Minecraft)小僵尸论坛
收录了来自各地的我的世界(MC)爱好者们的各种资源

须知: 切勿滥用举报,任何与举报相关的信息必须属实!

"Minecraft"以及"我的世界"为Mojang Synergies AB的商标 本站与Mojang以及微软公司没有从属关系

QQ|Archiver|手机版|小黑屋|Minecraft(我的世界)小僵尸论坛 |网站地图

GMT+8, 2025-8-29 01:15 , Processed in 0.203715 second(s), 48 queries .

快速回复 返回顶部 返回列表