[GH-ISSUE #4917] TNT Minecarts Don't Explode #1493

Closed
opened 2026-11-02 15:47:23 +07:00 by bsakaguchi · 7 comments
Owner

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4917

Version: Nightly 2026-10-30 · 1da354b · OS: Garuda Linux, i5-10500h, GTX 1650 (copied from the report)

What I did: Placed what is shown in the image, the tnt minecarts were originally on the rail, i powered the lever moving the tnt minecarts towards the block.
What happened: Tnt Minecarts didnt explode.
What I expected: Tnt Minecarts shouldve exploded after hitting the block.
Does it happen every time?
Horizon version: as the game shows it (Nightly 2026-10-30 · 1da354b)
OS, CPU, GPU: Garuda Linux, i5-10500h, GTX 1650

Reported on Discord by karam in #horizon-bugs · Discord thread
Tags: gameplay

Attachments (Discord links expire after a while; the thread keeps them)

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4917 **Version:** Nightly 2026-10-30 · 1da354b · **OS:** Garuda Linux, i5-10500h, GTX 1650 <sub>(copied from the report)</sub> > What I did: Placed what is shown in the image, the tnt minecarts were originally on the rail, i powered the lever moving the tnt minecarts towards the block. > What happened: Tnt Minecarts didnt explode. > What I expected: Tnt Minecarts shouldve exploded after hitting the block. > Does it happen every time? > Horizon version: as the game shows it (Nightly 2026-10-30 · 1da354b) > OS, CPU, GPU: Garuda Linux, i5-10500h, GTX 1650 Reported on Discord by **karam** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1565920474297405500) Tags: gameplay **Attachments** (Discord links expire after a while; the thread keeps them) - [image.png](https://cdn.discordapp.com/attachments/1565920474297405500/1565920474737676439/image.png?ex=6ae6a896&is=6ae55716&hm=f8e5e83b1d5f48a2e4d6242bd573b2d3a6de118a4ff494d1365cf0612478f4a4&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:47:23 +07:00
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 31, 2026):

karam added on Discord:

lmao wym vanilla

same bug happens with no mods

<!-- gh-comment-id:6539667057 --> @kira-horizon[bot] commented on GitHub (Oct 31, 2026): **karam** added on Discord: > lmao wym vanilla > same bug happens with no mods <!-- kira -->
Author
Owner

@apeirs commented on GitHub (Oct 31, 2026):

🤖 Agent: comment by apeirs's AI agent (Claude Code, Claude Opus 5.5), not by apeirs personally.

I think this one is vanilla behaviour. In 26.3, MinecartTNT.tick explodes on horizontalCollision only if the cart's horizontal speed is still at least 0.1 (horizontalDistanceSqr() >= 0.01). Entity.move zeroes the velocity on the axis that hit, before that check, so a cart that rolls along its track into a block doesn't go off. It explodes when an activator rail primes it, after a fall of 3 blocks or more, or from fire, an explosion or a projectile.

I ran two setups through tools/test_command_exec_parity.py (vanilla 26.3 server oracle against Horizon 9d979caa4):

  • A TNT cart on plain rails running into a stone block (summoned with Motion:[0.6d,0,0]).
  • The setup from this report: powered rails on redstone blocks into a stone block.

In both games the cart is still there after 60 ticks and the stone is untouched; on the powered rails it bounces back off the stone and rolls away. Horizon matches vanilla here.

(While checking this I found a separate, tiny difference in minecart drag, which I'm fixing in its own PR. The rail-protection rule from #4992 is in #5039.)

<!-- gh-comment-id:6541667302 --> @apeirs commented on GitHub (Oct 31, 2026): 🤖 Agent: comment by apeirs's AI agent (Claude Code, Claude Opus 5.5), not by apeirs personally. I think this one is vanilla behaviour. In 26.3, `MinecartTNT.tick` explodes on `horizontalCollision` only if the cart's horizontal speed is still at least 0.1 (`horizontalDistanceSqr() >= 0.01`). `Entity.move` zeroes the velocity on the axis that hit, before that check, so a cart that rolls along its track into a block doesn't go off. It explodes when an activator rail primes it, after a fall of 3 blocks or more, or from fire, an explosion or a projectile. I ran two setups through `tools/test_command_exec_parity.py` (vanilla 26.3 server oracle against Horizon `9d979caa4`): - A TNT cart on plain rails running into a stone block (summoned with `Motion:[0.6d,0,0]`). - The setup from this report: powered rails on redstone blocks into a stone block. In both games the cart is still there after 60 ticks and the stone is untouched; on the powered rails it bounces back off the stone and rolls away. Horizon matches vanilla here. (While checking this I found a separate, tiny difference in minecart drag, which I'm fixing in its own PR. The rail-protection rule from #4992 is in #5039.)
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 31, 2026):

karam added on Discord:

have u tried it in java minecraft?

cause this is literally how tnt minecart railguns work

<!-- gh-comment-id:6544689066 --> @kira-horizon[bot] commented on GitHub (Oct 31, 2026): **karam** added on Discord: > have u tried it in java minecraft? > cause this is literally how tnt minecart railguns work <!-- kira -->
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 31, 2026):

karam added on Discord:

oh wait i dont think u realise that i said tnt minecarts because thats multiple tnt minecarts

not just 1

<!-- gh-comment-id:6544808565 --> @kira-horizon[bot] commented on GitHub (Oct 31, 2026): **karam** added on Discord: > oh wait i dont think u realise that i said tnt minecarts because thats multiple tnt minecarts > not just 1 <!-- kira -->
Author
Owner

@apeirs commented on GitHub (Oct 31, 2026):

🤖 Agent: comment by apeirs's AI agent (Cursor, Grok 4.7), not by apeirs personally.

Yes. Both runs were a real 26.3 server (the command oracle), the same track as the report: powered rails on redstone blocks, stone at the end, a TNT minecart summoned with Motion:[0.6d,0,0], checked after 60 ticks.

A world created the way a new world is created (vanilla only) does not explode. The cart is still there, the stone is intact, and it has bounced (Motion x about -0.12). Entity.move clears the axis it hit, then MinecartTNT.tick requires the horizontal speed to still be at least 0.1. That is the result from the earlier comment.

The railgun is the Minecart Improvements experiment. I created the world with the minecart_improvements datapack enabled and ran the same track. After 60 ticks the cart is gone and the stone is gone. A plain-rail cart summoned at Motion:[2d,0,0] into a stone block does the same. NewMinecartBehavior.stepAlongTrack calls move() (that sets horizontalCollision and zeroes the axis) and then, if the cart actually moved, writes the pre-collision velocity back with setDeltaMovement(movement). MinecartTNT.tick runs after that and still sees speed ≥ 0.1, so it explodes. The old behaviour never writes that speed back.

Horizon saves that pack as disabled on a new world, and the cart tick is the old behaviour only, so this explosion does not happen here. /datapack list enabled on the Java world shows whether minecart_improvements is on.

<!-- gh-comment-id:6544873098 --> @apeirs commented on GitHub (Oct 31, 2026): 🤖 Agent: comment by apeirs's AI agent (Cursor, Grok 4.7), not by apeirs personally. Yes. Both runs were a real 26.3 server (the command oracle), the same track as the report: powered rails on redstone blocks, stone at the end, a TNT minecart summoned with `Motion:[0.6d,0,0]`, checked after 60 ticks. A world created the way a new world is created (`vanilla` only) does not explode. The cart is still there, the stone is intact, and it has bounced (`Motion` x about `-0.12`). `Entity.move` clears the axis it hit, then `MinecartTNT.tick` requires the horizontal speed to still be at least 0.1. That is the result from the earlier comment. The railgun is the Minecart Improvements experiment. I created the world with the `minecart_improvements` datapack enabled and ran the same track. After 60 ticks the cart is gone and the stone is gone. A plain-rail cart summoned at `Motion:[2d,0,0]` into a stone block does the same. `NewMinecartBehavior.stepAlongTrack` calls `move()` (that sets `horizontalCollision` and zeroes the axis) and then, if the cart actually moved, writes the pre-collision velocity back with `setDeltaMovement(movement)`. `MinecartTNT.tick` runs after that and still sees speed ≥ 0.1, so it explodes. The old behaviour never writes that speed back. Horizon saves that pack as disabled on a new world, and the cart tick is the old behaviour only, so this explosion does not happen here. `/datapack list enabled` on the Java world shows whether `minecart_improvements` is on.
Author
Owner

@rdbtCVS commented on GitHub (Oct 31, 2026):

🤖 Agent: This matches vanilla 26.3. Runs of the real 26.3 server show a TNT minecart railgun does not explode in a default world either: Entity.move zeroes the speed on the axis that hit, before MinecartTNT's ≥0.1 speed check. The railgun only works with the minecart_improvements experiment (NewMinecartBehavior), which Horizon does not implement yet. That would be its own feature request.

<!-- gh-comment-id:6550611650 --> @rdbtCVS commented on GitHub (Oct 31, 2026): 🤖 Agent: This matches vanilla 26.3. Runs of the real 26.3 server show a TNT minecart railgun does not explode in a default world either: `Entity.move` zeroes the speed on the axis that hit, before `MinecartTNT`'s ≥0.1 speed check. The railgun only works with the `minecart_improvements` experiment (`NewMinecartBehavior`), which Horizon does not implement yet. That would be its own feature request.
Author
Owner

@kira-horizon[bot] commented on GitHub (Nov 1, 2026):

karam added on Discord:

LOL its wrong

put 5 tnt minecarts and recreate the setup

on minecraft

<!-- gh-comment-id:6552349736 --> @kira-horizon[bot] commented on GitHub (Nov 1, 2026): **karam** added on Discord: > LOL its wrong > put 5 tnt minecarts and recreate the setup > on minecraft <!-- kira -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1493
No description provided.