mojira.dev
MC-74885

stat.timeSinceDeath isn't server-side

When players are lagging, his/her stat.timeSinceDeath update slow/irregular(example below).

For example, I run a server on my computer. I connect using 127.0.0.1, and when someone else joins using the port forwarded IP, he/she has of course has server lag due to connection stability. The client apparaently sends the amount of ticks since last dead, which can be annoying for tracking players, or having a leaderboard for players that are alive the longest.

Solution would be that the server updates this stat, so it's reliable and doesn't get out of sync.

Thanks, this would save my map!


Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 5

Can you still reproduce this in 16w06a?

This is pretty strange because in the decompiled version of Minecraft 1.8 using MCP this stat is definitely only updated by the server.

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.

The reason why this could happen is because the player is updated every time the server receives a net.minecraft.network.play.client.C03PacketPlayer packet. And every time the player is updated his stat.timeSinceDeath (if he is not dead) and stat.playOneMinute stats are increased. This means if the client sends for whatever reason less or more net.minecraft.network.play.client.C03PacketPlayer packets, his score will increase slower or faster.

Please update the report accordingly as well, as the stat is handled by the server

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

The reason I described seems to be fixed in 1.11 but please re-check

s7%6maTt4wC$JQ8*

(Unassigned)

Unconfirmed

Minecraft 1.8, Minecraft 15w40b

Retrieved