mojira.dev
MC-297378

Chunk loading cannot catch up minecart teleportation when a player is riding on it (affected 1.21.2 and any later versions)

About This Bug

  • Java Edition 1.21.6, 1.21.5, 1.21.4, 1.21.3, and 1.21.2 are found to have this issue.

  • 1.21.1 and earlier versions do not have this problem.

  • Though this is a chuck loader performance issue, we don’t think this is due to anything related to computer hardware, as it doesn’t occur before 1.21.2 at all.

  • This bug may break a datapack that some map makers may use to build high-speed railway tracks in the game.

  • We have tried to find if there are any issues with the datapack, but it turns out that the root cause is this Minecraft bug, which can be reproduced totally without any datapacks, so please ignore anything about how the datapack works and be focused on the following section for how to reproduce the bug.

  • We did NOT use the minecart improvements nor any other experimental features for reproducing this bug.

How to Reproduce

  1. Create a new map with creator mode and default terrains in Minecraft Java Edition Singleplayer (1.21.2 or any later versions.)

  2. Place two repeating command blocks within the spawn chunk, each of which should contain the following commands respectively:

    • Command block #1:
      execute as @e[type=minecart,tag=debug] at @s run tp @s ~ ~ ~2
      ↑ This one make tagged minecarts run southward at the speed of 40 m/s (given the default tick rate 20 tick/s.)

    • Command block #2:
      execute as @e[type=minecart,tag=debug] at @s run data merge entity @s {Motion:[0.0,0.0,1.0]}
      ↑ Also set on the NBT field Motion to ensure that the minecart sound effect is also heard while moving.

    • We run these two commands simultaneously, so we expect that the minecart speed is 48 m/s (which is made up of 40 m/s(from Command #1) + 8 m/s(from Command #2))

    • Only by running these two commands simultaneously can cause this bug. Only running one of them canNOT reproduce the issue.

  3. Set these two repeating command blocks to Always Active.

  4. Build a straight southward track without any slopes or curves with normal rail blocks, and extend it to a few thousands of blocks away.
    (The second attachment is an example map where the tracks are already done for the convenience of bug repro.)

  5. Get back to the spawn chunk & place a minecart onto the track and ride on it.

  6. Enter the following command on the chat to activate the minecart with the high-speed of 48 m/s:
    /tag @e[type=minecart,distance=..3,sort=nearest,limit=1] add debug

  7. The minecart is running at 48 m/s as expected, but we observed that chunk loading starts to slow down, and finally the minecart surpasses the border of loading chunks (please see on the attached video.)

  8. After it surpasses the border, the rotation/position of the player suddenly gets unexpected and becomes no longer controllable by the mouse.

What We Expected

Chunk loading should NOT get surpassed by the minecart under the scenario mentioned above.

Environment

Windows 11 24H2 26100.3775
CPU: 12th Gen Intel(R) Core(TM) i5-12400 2.50 GHz
GPU: Intel UHD Graphics 730
RAM: 16GB (allocated 1280MB)

Linked issues

Attachments

Comments 6

I have tried replacing the Command #2 from the description:
/execute as @e[type=minecart,tag=debug] at @s run data merge entity @s {Motion:[0.0,0.0,1.0]}
with any of the following equivalences:

  • /execute as @e[type=minecart,tag=debug] at @s run data modify entity @s Motion set value [0.0,0.0,1.0]

  • /execute as @e[type=minecart,tag=debug] at @s run data modify entity @s Motion[2] set value 1.0

But none of these alternatives help; I can still always reproduce the same issue.

So, I still guess it could be a chunk loader issue instead of anything to do with syntax changes across Minecraft versions.

Though I did not use the experimental minecart improvements to reproduce the bug, could it still be the culprit why the chunk loader does affect non-experimental gameplay? (since this experimental feature was also introduced in 1.21.2.)

Added the debug info using the /jfr command while reproducing this bug again today. It did happen in the same way.

[media]

Please note that the phenomena as mentioned in this bug report is different from another chunk loading bug that we found a few years ago: MC-190836

This bug (MC-297378) can happen only after 1.21.2 (inclusive), and we suspect this one to be a side-effect from the minecart improvement update (as said in my previous comment)

On the other hand, the MC-190836 one seems to also happen on some earlier versions after 1.14, and we consider it to be more likely to depend on hardware performance.

Therefore, please investigate the root cause of these two bugs separately. We do NOT consider these two bugs as duplicates. Thank you.

Hi there!

I'm currently reviewing older, unconfirmed reports to help keep the bug tracker up to date. I’ll temporarily resolve this as Awaiting Response for now.

Please let me know if this issue is still happening for you in Minecraft 1.21.6. If you reply, the ticket will automatically reopen and I’ll be happy to take another look.

It still happens on 1.21.6.

Please confirm if this is still an issue in the latest snapshot now spawn chunks no longer exist

FlashTeens

(Unassigned)

Unconfirmed

Chunk loading

1.21.5, 25w18a, 25w19a, 1.21.6

Retrieved