mojira.dev
MC-92165

Minecarts with high motion won't pick up entities

The bug

Minecart with high motion values are not able to pick up entities. Instead they just collide with them and stop.

Note: Armor stands are a special case which is described in MC-90923.

How to reproduce

  1. Place multiple powered rails behind each other and power them

  2. Spawn for example a pig somewhere on the track

  3. Place a minecart at least two blocks away from the pig on the track and push it towards the pig

Code analysis

Partwise by @unknown

Based on 1.12 decompiled using MCP 9.40 PRE 1

The problem is that the picking up of entities happens in the method net.minecraft.entity.item.EntityMinecart.onUpdate() while the minecart is moved and stopped in the method net.minecraft.entity.Entity.moveEntity(MoverType, double, double, double). The onUpdate() method already uses an extended bounding box to pick up entities but if it has a high motion this extending is not enough. Increasing it even further might cause other problems.

Maybe the method Entity.moveEntity could call some methods for handling collision with entities.

Linked issues

MC-93173 Mobs can't enter minecarts Resolved MC-94059 Minecarts don't pick up mobs as easily as in the past Resolved MC-94238 Villager won't enter minecart Resolved MC-97556 Villagers will not ride minecart Resolved MC-98805 Getting mobs in Minecarts is close to Impossible. Resolved

Attachments

Comments 94

Came here to report the same; tested using various entities, results are the same. Worked in 15w44b, doesn't work in 15w45a.

Tested in Minecraft 15w45a on Windows 8.1 using Java 1.8.0_25 64 bit.

EarlyReflections

Still in 15w46a.

stopped working correctly in 15w45a I believe.. Still the same behavior in the latest snapshot 46a.
The Minecarts don't pick up villagers now at all but in 15w44a they still would pick up.

Vincenzo Cilino

It is possible to pick up some entities but very difficult. You have to place the mob directly on the rail and place the minecart on that same rail. There are many other bugs with mincarts such as when riding minecarts they stop and crash the server shortly after. Anyways this is a frustrating bug I hope they fix it soon.

EarlyReflections

@Vincenzo Cilino Don't worry it'll get fixed! I can't imagine them going into the release in their current state. Minecarts are totally useless currently, as we can't use them to transport entities, and we can't use them to travel either (chunks don't load and we get stuck in them, forcing a relog or crashing).

Of course it's annoying but we have to be more patient with showstopper bugs like this. Cosmetic bugs get fixed quickly because they're easier to isolate, are more obvious, thus easier to fix.

But I agree minecarts should receive some sort of priority because they are REALLY broken. This one, MC-89915 & MC-64836 are the most important ones.

84 more comments

Confirmed in 1.16-rc1.

Affects 1.20.1.

You could use a hotbox accounting for the delta motion of the minecart.

it's also in 24w06a and 1.20.4

Fixed with the 24w34a minecart experiment:

[media]

Early Reflections

Meri Diana

(Unassigned)

Confirmed

Platform

Low

Minecart

entity, experimental_minecart_fixed, minecart, motion, pickup

Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47c, Minecraft 15w50a, ..., 20w46a, 1.17, 1.20.1, 1.20.4, 24w06a

Minecraft 16w21a

Retrieved