mojira.dev
MC-8262

Airborne minecarts rapidly lose horizontal velocity

What happens:
A minecart that runs out of track and has no ground directly under it will slow down at a fast rate.

What I think should happen:
A minecart that runs out of track and has no ground directly under it should not lose any (or much) of its horizontal speed. An airborn minecart should only slow down quickly if it enters water or lava while falling.

How to observe:
Build straight line of blocks floating high up in the air and place powered rails on top. Use either a redstone torch, redstone block, or a lever to give the rails constant power. Then, put a minecart on the track and push it so that it starts moving. Once the minecart runs out of track on the floating blocks you created, it will start to fall down. At the same time, it will begin to quickly stop moving forward (as if the air was dense like water).


Code analysis by @unknown can be found in this comment

Linked issues

Attachments

Comments 15

This has always been the case, and probably isn't really considered a bug per se, but it would be nice to see it changed. Especially now that we have TNT minecarts. 😃

This may be related to the bug about players losing horizontal motion when shot out of a TNT cannon.

No response for over a year.

Confirmed for

  • 1.9.1-pre3

Please link to this comment in the description

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this happens is very likely that the method net.minecraft.entity.item.EntityMinecart.moveDerailedMinecart() clamps the motion for all three axes to the "maximum speed" (0.4d). This means that it rapidly drops from about 1.1d on the power rail to 0.4d.The problem is that clamping the value between two fixed values makes little sense because the slowing down looks pretty strange then. Additionally the factor used to slow down the minecart could be changed from 0.949999988079071D to a higher value or could be made dependent from the current motion in relation to the maximum speed.

Note: Changes to this method will break existing minecart tracks.

5 more comments

Affects 1.16.2 Pre-release 1

Can I request ownership?

Can confirm in 21w05b.

iPyronic

Marty McFly

(Unassigned)

Confirmed

Minecart

air, horizontal, minecart, motion, velocity

Snapshot 13w04a, Snapshot 13w09b, Snapshot 13w09c, Minecraft 1.5, Snapshot 13w11a, ..., 21w07a, 21w08a, 21w08b, 21w10a, 21w11a

Retrieved