[PR #4368] [MERGED] Explosive sulfur cubes light their fuse beside redstone power #5586

Closed
opened 2026-11-03 05:13:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4368
Author: @xFedeT
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/sulfur-cube-redstone


📝 Commits (1)

  • 1e14e33 Explosive sulfur cubes light their fuse beside redstone power

📊 Changes

5 files changed (+76 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+1 -0)
📝 crates/horizon-client/src/game/sulfur_cubes.rs (+29 -1)
📝 tools/lan_e2e.py (+44 -0)
📝 tools/port_map/game2-003.tsv (+1 -1)
📝 tools/port_map/game2-011.tsv (+1 -1)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally.

Refs #3517

What and why

In vanilla an explosive sulfur cube (one that swallowed TNT) lights its fuse as soon as it stands in or next to redstone power: SulfurCube.tick calls primeWhenOnPoweredPosition, which primes when getBestOwnOrNeighbourSignal(blockPosition) is not 0. Horizon only primed these cubes on fire or explosion damage, so a cube on a redstone block just sat there.

Now the game checks every explosive, alive, unprimed cube each tick (Game::sulfur_cube_power_priming, next to sulfur_cube_pickups): if best_neighbor_signal at its block is not 0 it primes (sulfur_cube::prime, so the usual TNT sound, invulnerability and fuse apply), and only when tnt_explodes is on, as primeTime requires. getOwnSignal is 0 for every block in 26.3 (nothing overrides ownSignal), so the neighbour signal is the whole check.

Not changed: cubes without an explosive body, cubes already primed, and tnt_explodes=false.

Proof

python3 tools/lan_e2e.py --server-thread --check sulfur_cube_power: an explosive cube (TNT inside) is summoned in a closed room on stone and stays calm for 40 ticks (guest's view); the floor is then replaced with redstone blocks. The cube primes (fuse 110, Invulnerable: 1b), and the cube is gone when the fuse runs out. The guest watches all of it.

Before the cube is powered (stone floor) After the floor is redstone blocks (this PR) Same check on current main
calm primed main

On main the check fails at the powered cube is not primed (no fuse after 8 ticks on redstone). With this PR it passes. Fuse and explosion are the existing ones; only the trigger is new. The flash during the fuse: flash

pr_ready --quick: fmt, clippy, 976 horizon-client tests, 480 python tests pass; parity harnesses left to CI (--quick). The port rows SulfurCube.primeWhenOnPoweredPosition and SignalGetter.getBestOwnOrNeighbourSignal are updated in this PR (code change, not bookkeeping only).

🤖 Generated with Claude Code


🔄 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/4368 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/sulfur-cube-redstone` --- ### 📝 Commits (1) - [`1e14e33`](https://github.com/horizon-rust/horizon/commit/1e14e337044c0f387fe2919bef7fb36c9f8bbf35) Explosive sulfur cubes light their fuse beside redstone power ### 📊 Changes **5 files changed** (+76 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -0) 📝 `crates/horizon-client/src/game/sulfur_cubes.rs` (+29 -1) 📝 `tools/lan_e2e.py` (+44 -0) 📝 `tools/port_map/game2-003.tsv` (+1 -1) 📝 `tools/port_map/game2-011.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally. Refs #3517 ## What and why In vanilla an explosive sulfur cube (one that swallowed TNT) lights its fuse as soon as it stands in or next to redstone power: `SulfurCube.tick` calls `primeWhenOnPoweredPosition`, which primes when `getBestOwnOrNeighbourSignal(blockPosition)` is not 0. Horizon only primed these cubes on fire or explosion damage, so a cube on a redstone block just sat there. Now the game checks every explosive, alive, unprimed cube each tick (`Game::sulfur_cube_power_priming`, next to `sulfur_cube_pickups`): if `best_neighbor_signal` at its block is not 0 it primes (`sulfur_cube::prime`, so the usual TNT sound, invulnerability and fuse apply), and only when `tnt_explodes` is on, as `primeTime` requires. `getOwnSignal` is 0 for every block in 26.3 (nothing overrides `ownSignal`), so the neighbour signal is the whole check. Not changed: cubes without an explosive body, cubes already primed, and `tnt_explodes=false`. ## Proof `python3 tools/lan_e2e.py --server-thread --check sulfur_cube_power`: an explosive cube (TNT inside) is summoned in a closed room on stone and stays calm for 40 ticks (guest's view); the floor is then replaced with redstone blocks. The cube primes (`fuse` 110, `Invulnerable: 1b`), and the cube is gone when the fuse runs out. The guest watches all of it. | Before the cube is powered (stone floor) | After the floor is redstone blocks (this PR) | Same check on current main | |---|---|---| | ![calm](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/sulfur-cube-power/calm.png) | ![primed](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/sulfur-cube-power/after-primed.png) | ![main](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/sulfur-cube-power/before-on-redstone.png) | On main the check fails at `the powered cube is not primed` (no fuse after 8 ticks on redstone). With this PR it passes. Fuse and explosion are the existing ones; only the trigger is new. The flash during the fuse: ![flash](https://raw.githubusercontent.com/xFedeT/horizon/pr-screenshots/sulfur-cube-power/after-flash.png) `pr_ready --quick`: fmt, clippy, 976 horizon-client tests, 480 python tests pass; parity harnesses left to CI (--quick). The port rows `SulfurCube.primeWhenOnPoweredPosition` and `SignalGetter.getBestOwnOrNeighbourSignal` are updated in this PR (code change, not bookkeeping only). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:35 +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#5586
No description provided.