[PR #2443] [MERGED] Puff a poof where a dead mob's body goes #4320

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

📋 Pull Request Information

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

Base: main ← Head: fix/mob-death-poof


📝 Commits (1)

  • 303281e Puff a poof where a dead mob's body goes

📊 Changes

3 files changed (+46 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+29 -0)
📝 crates/horizon-client/src/game/lan.rs (+10 -0)
📝 crates/horizon-client/src/game/remote.rs (+7 -0)

📄 Description

What and why

When a dead mob's body vanishes, twenty poof particles puff out where it lay. Horizon removed dead mobs without any effect.

The world that runs the mobs now draws the poof when it removes the body and sends entity event 60 to its guests, and the client draws the poof when it receives event 60 (so single player on its server thread and LAN guests see it too). Entity events for a mob removed in that same tick now go out before the tracker drops the mob, as Level.broadcastEntityEvent precedes the discard; otherwise the client no longer has the mob when the event arrives. (Other open work, "Server players see villager hearts, taming hearts and smoke, spawn poofs and snowball crumbs", makes the same ordering change, with the same code.)

Vanilla reference

  • LivingEntity.tickDeath: at deathTime >= 20, on the server, broadcastEntityEvent(this, 60) then remove(KILLED).
  • LivingEntity.handleEntityEvent 60 and makePoofParticles: 20 POOF particles at getRandomX(1.0) - xa * 10, getRandomY() - ya * 10, getRandomZ(1.0) - za * 10 with velocity (xa, ya, za), each a gaussian times 0.02.

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/2443 **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/mob-death-poof` --- ### 📝 Commits (1) - [`303281e`](https://github.com/horizon-rust/horizon/commit/303281ed09e4236062459aca955c3416a1224dca) Puff a poof where a dead mob's body goes ### 📊 Changes **3 files changed** (+46 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+29 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+10 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+7 -0) </details> ### 📄 Description ## What and why When a dead mob's body vanishes, twenty poof particles puff out where it lay. Horizon removed dead mobs without any effect. The world that runs the mobs now draws the poof when it removes the body and sends entity event 60 to its guests, and the client draws the poof when it receives event 60 (so single player on its server thread and LAN guests see it too). Entity events for a mob removed in that same tick now go out before the tracker drops the mob, as `Level.broadcastEntityEvent` precedes the discard; otherwise the client no longer has the mob when the event arrives. (Other open work, "Server players see villager hearts, taming hearts and smoke, spawn poofs and snowball crumbs", makes the same ordering change, with the same code.) ## Vanilla reference - `LivingEntity.tickDeath`: at `deathTime >= 20`, on the server, `broadcastEntityEvent(this, 60)` then `remove(KILLED)`. - `LivingEntity.handleEntityEvent` 60 and `makePoofParticles`: 20 `POOF` particles at `getRandomX(1.0) - xa * 10`, `getRandomY() - ya * 10`, `getRandomZ(1.0) - za * 10` with velocity `(xa, ya, za)`, each a gaussian times 0.02. ## 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:16:20 +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#4320
No description provided.