mojira.dev
MC-264148

TNT Minecart has absurd ballistics

TnT cannons are a well established feature of the game where if an entity is exposed to an explosion, the entity will be propelled away from the origin of the blast. This enables all kinds of cannons firing various projectiles to be made.

You would expect TnT minecarts to be a fairly typical payload for such cannons as they can offer a more powerful blast depending on the power of the cannon and explode immediately on impact, but at the expense of costing iron to craft, being unstackable and highly volatile to handle.

However it is currently impossible to use TnT minecarts as a payload for a cannon because their ballistics are completely broken. If you try to launch a TnT minecart its horizontal motion will max out at 0.38 blocks per tick, combined with the increased drag experienced by minecarts and this means the theoretical maximum distance a TnT minecart with a 4s fuse time can move is only 7.4745 blocks, which places the cannon within the blast radius of the payload.

To emphasize the issue I have included a test world with a setup to test the effect of 10 TnT propelling TnT compared to a TnT minecart:

  1. Join the world TnT Cart Test

  2. Press the button in the centre of the command blocks to summon 10 TnT surrounded by a single TnT one block to the left and a TnT minecart one block to the right.

  3. ✔ Observe the TnT move horizontally roughly 29 blocks to the left

  4. ❌ Observe the TnT Minecart is shot into the air and traverses only 2 blocks horizontally to the left.

The vertical motion of the cart can be explained by the knockback formula using the eye height of the entity to compute the direction of the applied knockback, however if we work through the knockback and drag formula for the respective positions taking into account the eye height of the minecart entity we can determine that the minecart should travel about 150 blocks to the right. However because the horizontal component is capped at 0.38 blocks per tick it instead only exhibits the vertical component of motion and settles only 2 blocks away from its starting point.

Attachments

Comments 1

I cannot reproduce what's described in the expected vs. observed behavior section. Using the provided world, the TNT minecart is actually launched 8 blocks away, and the TNT on the left is not launched at all, but rather just explodes when summoned:

[media]

If you can still reproduce the issue, could you please provide some clarification, and more context to the issue? Or at least update the world.

cubicmetre

(Unassigned)

Unconfirmed

Minecart

1.20.1

Retrieved