[GH-ISSUE #1533] [singleplayer] Explosion-destroyed End crystals incorrectly explode again #487

Closed
opened 2026-11-02 15:39:28 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @rdbtCVS on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1533

🤖 Filed by an AI assistant (Codex).

Tested 9dd9a836991e263b51d0cec0f690d40a0b09eecc, explicitly with --server-thread and --no-server-thread, render distance 4. Both modes are affected; Minecraft Java 26.3 is the reference.

Small reproduction in a disposable creative world:

  1. Prepare a flat bedrock floor at y=99. Put obsidian at 2 99 0 and 12 99 0, and hand-place an End crystal on each.
  2. Put TNT at 0 100 0, ignite it with flint and steel, and allow the explosion to finish (120+ ticks).

Expected: TNT destroys the nearby crystal at [2.5,100,0.5]. The crystal at [12.5,100,0.5] survives: a crystal destroyed by explosion damage disappears without producing another explosion.

Actual: Both crystals disappear. A three-crystal chain spaced ten blocks apart is also entirely destroyed after shooting the first crystal.

Evidence: final-crystals-b/tnt-chain-* records 2→0 crystals in both modes; native final-native-chains-b records 2→1 at the same positions. The larger TNT control also differs (Horizon old 3→0; native a 3→2). Traces/logs are under .local/singleplayer-audit/.

Hypothesis: explosion_hits_special calls destroy_crystal, which unconditionally creates a power-6 blast. Native EndCrystal.hurtServer skips that blast for IS_EXPLOSION damage; inspected bytecode corroborates the runtime control.

Acceptance: Explosion-destroyed crystals create no secondary blast; the distant crystal survives this reduction. Direct player/projectile damage still detonates its target normally.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1533 > 🤖 Filed by an AI assistant (Codex). Tested `9dd9a836991e263b51d0cec0f690d40a0b09eecc`, explicitly with `--server-thread` and `--no-server-thread`, render distance 4. Both modes are affected; Minecraft Java 26.3 is the reference. Small reproduction in a disposable creative world: 1. Prepare a flat bedrock floor at y=99. Put obsidian at `2 99 0` and `12 99 0`, and hand-place an End crystal on each. 2. Put TNT at `0 100 0`, ignite it with flint and steel, and allow the explosion to finish (120+ ticks). **Expected:** TNT destroys the nearby crystal at `[2.5,100,0.5]`. The crystal at `[12.5,100,0.5]` survives: a crystal destroyed by explosion damage disappears without producing another explosion. **Actual:** Both crystals disappear. A three-crystal chain spaced ten blocks apart is also entirely destroyed after shooting the first crystal. **Evidence:** `final-crystals-b/tnt-chain-*` records 2→0 crystals in both modes; native `final-native-chains-b` records 2→1 at the same positions. The larger TNT control also differs (Horizon old 3→0; native a 3→2). Traces/logs are under `.local/singleplayer-audit/`. **Hypothesis:** `explosion_hits_special` calls `destroy_crystal`, which unconditionally creates a power-6 blast. Native `EndCrystal.hurtServer` skips that blast for `IS_EXPLOSION` damage; inspected bytecode corroborates the runtime control. **Acceptance:** Explosion-destroyed crystals create no secondary blast; the distant crystal survives this reduction. Direct player/projectile damage still detonates its target normally.
Author
Owner

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

🤖 Agent: rdbt's OpenCode agent (GPT-6.1) is taking this fix. Kira's claim action is currently rate-limited; recording the claim here before starting implementation. I will match EndCrystal.hurtServer's explosion-damage handling, preserve fight cleanup, add regression coverage, and open a PR.

<!-- gh-comment-id:6391994446 --> @rdbtCVS commented on GitHub (Oct 25, 2026): 🤖 Agent: rdbt's OpenCode agent (GPT-6.1) is taking this fix. Kira's claim action is currently rate-limited; recording the claim here before starting implementation. I will match EndCrystal.hurtServer's explosion-damage handling, preserve fight cleanup, add regression coverage, and open a PR.
Author
Owner

@ludovic111 commented on GitHub (Oct 25, 2026):

Claimed by rdbt on Discord (GitHub: rdbtCVS), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #1533).

<!-- gh-comment-id:6392767751 --> @ludovic111 commented on GitHub (Oct 25, 2026): Claimed by `rdbt` on Discord (GitHub: `rdbtCVS`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #1533). <!-- kira:work -->
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#487
No description provided.