Paper icon indicating copy to clipboard operation
Paper copied to clipboard

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

Open TDWilkinson99 opened this issue 4 years ago • 3 comments

Expected behavior

Rideable entities, such as:

  • Minecarts (minecart_one_cm)

  • Striders (strider_one_cm)

  • Pigs (pig_one_cm)

  • Boats (boat_one_cm)

  • Horses (horse_one_cm) each have a statistic for tracking how far a player moves while riding them. Most of these don't track this statistic correctly.

  • Minecarts function correctly.

  • Striders should accurately track how far a player moves while riding them regardless of velocity or if the strider is being controlled with a fungus on a stick.

  • Pigs should also accurately track this, regardless of velocity or if the pig is being controlled with a carrot on a stick.

  • Boats should correctly track this statistic based on if the player is or isn't moving the boat, as well as how fast that player is going.

  • Horses should also take into account if the player is moving at all, and how fast/slow that player may be moving.

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:

  • If the entity you're riding isn't moving, your stat does not increase, AND
  • If the entity you're riding IS moving, your stat does increase, AND
  • Your statistic increases dependent on how far/fast the entity your riding moves

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:

  • Spigot 1.18
  • Paper 1.17 build 391
  • Paper 1.18 build 32
  • Paper 1.18 build 36

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

TDWilkinson99 avatar Dec 04 '21 22:12 TDWilkinson99

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

Machine-Maker avatar Mar 02 '22 17:03 Machine-Maker

Can confirm the horse stats are still broken in Paper 1.19

Is there any way to get this issue escalated?

MODNMETL avatar Jul 13 '22 10:07 MODNMETL

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

Lulu13022002 avatar Dec 18 '22 20:12 Lulu13022002