[PR #2119] [MERGED] End crystal explosion shows its particles on the server thread #4022

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

📋 Pull Request Information

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

Base: main ← Head: fix/1893-crystal-explosion


📝 Commits (2)

  • 0907894 Send a guest's explosion to the players once their turn ends
  • 82055fb Merge main into fix/1893-crystal-explosion

📊 Changes

3 files changed (+25 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+4 -0)
📝 crates/horizon-client/src/game/lan.rs (+2 -1)
📝 crates/horizon-client/src/game/lan_particles.rs (+19 -1)

📄 Description

What and why

On the server thread, hitting an end crystal blew it up with the sound and the damage, but without the explosion cloud and smoke. TNT looked right.

The local player is a guest of the in-process server. A guest's attack runs inside their turn (as_guest), while the host holds the hub outside self.lan. server_explode ends in lan_explode, which needs self.lan to send ClientboundExplodePacket, so it found nothing and dropped the packet. TNT explodes in the server tick, where the hub is in place, which is why it worked. The same happened for any blast started in a guest's turn (a minecart hit by a guest, a guest's arrow on a crystal).

lan_explode now queues the blast when it runs in a guest's turn without the hub (the same way wind_burst already does), and flush_lan_explosions sends the packets once the turn is over (at the end of tick_lan and after guest projectile hits).

How I saw the bug: with the test build, creative world, obsidian floor, summon minecraft:end_crystal in front of the player, then mouse left click on it. The crystal disappeared and no explosion particles were drawn. I could not capture the particles of the fixed code in game, since the fix is only checked by building.

Vanilla reference

ServerLevel.explode sends ClientboundExplodePacket to every player near the blast, no matter who caused it. EndCrystal.hurtServer creates the explosion through Level.explode.

Self-check

cargo check -p horizon-client passes.

Fixes #1893.


🔄 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/2119 **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/1893-crystal-explosion` --- ### 📝 Commits (2) - [`0907894`](https://github.com/horizon-rust/horizon/commit/09078949d784d48ae928c59038cb79674a86a538) Send a guest's explosion to the players once their turn ends - [`82055fb`](https://github.com/horizon-rust/horizon/commit/82055fb57dc278c9bcd589a3e8a920b1bee69737) Merge main into fix/1893-crystal-explosion ### 📊 Changes **3 files changed** (+25 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+4 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+2 -1) 📝 `crates/horizon-client/src/game/lan_particles.rs` (+19 -1) </details> ### 📄 Description ## What and why On the server thread, hitting an end crystal blew it up with the sound and the damage, but without the explosion cloud and smoke. TNT looked right. The local player is a guest of the in-process server. A guest's attack runs inside their turn (`as_guest`), while the host holds the hub outside `self.lan`. `server_explode` ends in `lan_explode`, which needs `self.lan` to send `ClientboundExplodePacket`, so it found nothing and dropped the packet. TNT explodes in the server tick, where the hub is in place, which is why it worked. The same happened for any blast started in a guest's turn (a minecart hit by a guest, a guest's arrow on a crystal). `lan_explode` now queues the blast when it runs in a guest's turn without the hub (the same way `wind_burst` already does), and `flush_lan_explosions` sends the packets once the turn is over (at the end of `tick_lan` and after guest projectile hits). How I saw the bug: with the test build, creative world, obsidian floor, `summon minecraft:end_crystal` in front of the player, then `mouse left click` on it. The crystal disappeared and no explosion particles were drawn. I could not capture the particles of the fixed code in game, since the fix is only checked by building. ## Vanilla reference `ServerLevel.explode` sends `ClientboundExplodePacket` to every player near the blast, no matter who caused it. `EndCrystal.hurtServer` creates the explosion through `Level.explode`. ## Self-check `cargo check -p horizon-client` passes. Fixes #1893. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:05 +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#4022
No description provided.