mojira.dev
MC-265604

Villagers are ejected through walls when the minecart they are riding is destroyed

The bug

I've found a problem with removing villagers (tested with cows, zombies and creepers) from mine carts, when they leave the cart they end up outside the area I wanted (1x1x2) and escape (it is repeating).

How to reproduce

  1. Dig a 2-block-deep 1x1 hole

  2. Dig an identical hole one block diagonally away from the first hole

  3. Stand in the first hole and run the following command:

    /summon minecart ~ ~ ~ {Passengers:[{id:villager}]}
  4. Destroy the minecart
    → ❌ The villager is ejected into the second hole

Expected result

The villager should remain in the first hole.

Linked issues

Attachments

Comments 2

Thanks for fixing this up a little (a lot actually), I've never done one 😅

cart dismounting always checks the 8 surrounding blocks first to avoid breaking cart contraptions. the same block it came from is intentionally the lowest priority.

HansonJ

(Unassigned)

Confirmed

Gameplay

Normal

Mob behaviour

1.20.2

Retrieved