[PR #2266] [MERGED] Let a lit TNT minecart explode when it hits a wall #4159

Closed
opened 2026-11-03 04:15:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2266
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/tnt-minecart-collision


📝 Commits (2)

  • 7cc8def Let a lit TNT minecart explode when it hits a wall
  • 937dcba A TNT minecart's fuse blast uses its horizontal speed only

📊 Changes

1 file changed (+11 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/minecarts.rs (+11 -8)

📄 Description

What and why

A TNT minecart that was already lit never blew up when it ran into a wall at speed. The wall check sat in an else if after the fuse check, so it was skipped whenever the fuse was still counting down. It also used the cart's speed from before the move instead of after it.

The collision check is now separate from the fuse branch and uses the cart's horizontal speed after the move (speedSqr >= 0.01).

Vanilla reference

  • MinecartTNT.tick: the fuse > 0 / fuse == 0 branches, then a separate horizontalCollision check using getDeltaMovement().horizontalDistanceSqr() >= 0.01F.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2266 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/tnt-minecart-collision` --- ### 📝 Commits (2) - [`7cc8def`](https://github.com/horizon-rust/horizon/commit/7cc8def23f1d74efbd6b5dfa096b40e540a10c4c) Let a lit TNT minecart explode when it hits a wall - [`937dcba`](https://github.com/horizon-rust/horizon/commit/937dcba5b8d7cc71b3ebd37672b7499fc15c093d) A TNT minecart's fuse blast uses its horizontal speed only ### 📊 Changes **1 file changed** (+11 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/minecarts.rs` (+11 -8) </details> ### 📄 Description ## What and why A TNT minecart that was already lit never blew up when it ran into a wall at speed. The wall check sat in an `else if` after the fuse check, so it was skipped whenever the fuse was still counting down. It also used the cart's speed from before the move instead of after it. The collision check is now separate from the fuse branch and uses the cart's horizontal speed after the move (`speedSqr >= 0.01`). ## Vanilla reference - `MinecartTNT.tick`: the `fuse > 0` / `fuse == 0` branches, then a separate `horizontalCollision` check using `getDeltaMovement().horizontalDistanceSqr() >= 0.01F`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:06 +07:00
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#4159
No description provided.