mojira.dev
MC-173020

Minecarts can't pickup entities at some heights

While testing on how to pickup ghasts with minecarts, I found that some heights are "cursed" as a minecart cannot pickup a ghast where it will at others heights. That happen on versions 1.12.2, 1.15.2 and 1.16.1.

The bug

If a minecart is more than 2 blocks up from a vertical sub-chunk border, it will never pick entities located in the vertical sub-chunk below the border.

How to reproduce

  1. Place a soul sand block at Y=15

  2. At Y=18, make a 3 by 3 blocks square rail line floating around the soul sand

  3. Spawn a wither-skeleton on the soul sand

  4. Launch a empty minecart on the rail circle
    → ❌ The minecart will not pickup the wither-skeleton, but it will if the setup is make one block offset vertically

Code analysis

From analysis on Minecraft java 1.15.1:

The bug comes from the getEntities functions in net.minecraft.world.level.chunk.LevelChunk. These functions will look at sub-chunks only 2 blocks down and up from a given collision box; so it can miss entities taller than 2 blocks.

Attachments

Comments 13

Affects 1.16 Release Candidate 1

Affects 1.16.2 Pre-release 1

3 more comments

I can no longer reproduce this issue with the given instructions in 1.19

This bug is out of the game in 1.19 as the way the game search for entities has changed.

Cannot Reproduce in Latest Snapshot (24w46a)

[media]

Onk2

(Unassigned)

Confirmed

Entities, Minecart

1.15.2, 20w08a, 1.16 Release Candidate 1, 1.16, 1.16.1, ..., 21w16a, 1.17 Pre-release 1, 1.17.1, 21w37a, 22w13a

22w16a

Retrieved