A TNT minecart's fuse blast uses its horizontal speed only

MinecartTNT.tick calls explode(getDeltaMovement().horizontalDistanceSqr())
when the fuse runs out; the vertical-speed branch has no vanilla source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-27 07:02:05 +01:00
parent 7cc8def23f
commit 937dcba5b8
+2 -5
View File
@@ -587,12 +587,9 @@ impl Game<'_> {
self.particles
.add(&ParticleOptions::simple(ParticleType::Smoke), at, [0.0; 3]);
} else if c.fuse == 0 {
// explode(horizontalDistanceSqr()): a rising cart's
// vertical speed adds nothing.
let speed = c.velocity.x * c.velocity.x + c.velocity.z * c.velocity.z;
let speed = if c.velocity.y > 0.0 {
c.velocity.y * c.velocity.y
} else {
speed
};
self.explode_cart(c, speed);
return false;
}