PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
10.04k stars 2.34k forks source link

Most rideable entity statistic trackers (xxxx_one_cm) do not track movement correctly #7021

Open TDWilkinson99 opened 2 years ago

TDWilkinson99 commented 2 years ago

Expected behavior

Rideable entities, such as:

Observed/Actual behavior

While Minecarts work as expected and in parity with Vanilla Minecraft, the rest of the rideable entities do not.

"Works as intended" in all cases means that:

Minecart: Vanilla: Works as intended Paper: Works as intended

Strider: Vanilla: Works as intended Paper: Broken. If you get on the strider while not holding a "fungus on a stick", it will seemingly calculate the correct distance that the strider moves while you're riding it. If you pull out a fungus stick however, the stat will increase by a constant amount, even if that strider changes speed or is not moving because it's stuck.

Pig: Vanilla: Works as intended Paper: Broken. If you get on the pig while not holding a "carrot on a stick", it will seemingly calculate the correct distance that the pig moves while you're riding it. If you pull out a carrot stick however, the stat will increase by a constant amount, even if that pig changes speed or is not moving because it's stuck.

Boat: Vanilla: Works as intended Paper: Broken. The stat increases by a consistent amount (45 p/ tick) no matter what you're doing with the boat, even if you're not moving. The stat does not change based on motion whatsoever, it just constantly increases by 45 every tick.

Horse: Vanilla: Works as intended Paper: Broken. The stat increases by a constant amount (85 p/ tick) even if you're not moving. If you jump with the horse, your stat briefly increases up to 122 p/ tick, before falling back down to 85.

Steps/models to reproduce

I've done my best to explain the issue and what to observe in detail in this video, hope it helps: https://www.youtube.com/watch?v=ZqKOwTL9DbE

This issue requires no prior setup and should be immediately visible once you're viewing the relevant affected statistic.

Plugin and Datapack List

pl [20:13:21 INFO]: Plugins (0):

datapack list [20:13:31 INFO]: There are 2 data packs enabled: [vanilla (built-in)], [file/bukkit (world)] [20:13:31 INFO]: There are no more data packs available

Paper version

version [20:12:51 INFO]: This server is running Paper version git-Paper-36 (MC: 1.18) (Implementing API version 1.18-R0.1-SNAPSHOT) (Git: 76ee105) You are running the latest version Previous version: git-Paper-32 (MC: 1.18)

Other

I found a Spigot ticket that discusses this issue from 6 months ago and it looks like it's abandoned. https://hub.spigotmc.org/jira/browse/SPIGOT-6475 One comment says they made a PR for it but the ticket is still open as unresolved and this issue still obviously persists.

According to md_5 in the same ticket, this issue goes back to at least Minecraft 1.13.2, I've been able to reproduce it on:

This is not reproduceable in Vanilla Minecraft 1.18.

Here's the scoreboard commands so you don't need to type them out smile :^)

Minecart:
/scoreboard objectives add minecart_one_cm minecraft.custom:minecraft.minecart_one_cm
/scoreboard objectives setdisplay sidebar minecart_one_cm

Strider:
/scoreboard objectives add strider_one_cm minecraft.custom:minecraft.strider_one_cm
/scoreboard objectives setdisplay sidebar strider_one_cm

Pig:
/scoreboard objectives add pig_one_cm minecraft.custom:minecraft.pig_one_cm
/scoreboard objectives setdisplay sidebar pig_one_cm

Boat:
/scoreboard objectives add boat_one_cm minecraft.custom:minecraft.boat_one_cm
/scoreboard objectives setdisplay sidebar boat_one_cm

Horse:
/scoreboard objectives add horse_one_cm minecraft.custom:minecraft.horse_one_cm
/scoreboard objectives setdisplay sidebar horse_one_cm
Machine-Maker commented 2 years ago

@Spottedleaf raised some potential issues with how this was resolved, so the fix was removed in 1.18.2

MODNMETL commented 2 years ago

Can confirm the horse stats are still broken in Paper 1.19

Is there any way to get this issue escalated?

Lulu13022002 commented 1 year ago

This seems to be resolved with https://github.com/PaperMC/Paper/pull/8274