[PR #2517] [MERGED] Send the drowning entity event (67) and draw the bubbles on clients #4387

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

📋 Pull Request Information

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

Base: main ← Head: fix/drowning-bubbles


📝 Commits (2)

  • 57e8de0 Send the drowning entity event (67) and draw the bubbles on clients
  • ef0ea5d Merge main into fix/drowning-bubbles

📊 Changes

7 files changed (+78 additions, -19 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -18)
📝 crates/horizon-client/src/game/combat.rs (+42 -1)
📝 crates/horizon-client/src/game/creatures.rs (+9 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+9 -0)
📝 crates/horizon-client/src/game/remote.rs (+3 -0)
📝 crates/horizon-client/src/mobs.rs (+6 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+4 -0)

📄 Description

What and why

When an entity takes drowning damage, vanilla tells every client with entity event 67 and each client draws eight bubbles around it. Horizon only drew them in the window that simulates the player itself, so a client of a server (server thread, LAN guest) never saw its own drowning bubbles, other players' bubbles, or any mob's.

  • The host player and each guest now broadcast event 67 when the air runs out, and the host window also draws the bubbles for a guest.
  • Mobs that drown (not the water animals out of water) send the event too.
  • A client handles event 67 for its own player, other players and mobs by drawing the bubbles. The bubble code moved into one drown_particles function used by every path.

Vanilla reference

  • LivingEntity.baseTick: level.broadcastEntityEvent(this, (byte)67) right before the 2.0 drowning damage.
  • LivingEntity.handleEntityEvent(67) calls makeDrownParticles: eight BUBBLE at getX/Y/Z + triangle(0, 1), moving with the entity.
  • WaterAnimal.handleAirSupply hurts without the event, so out-of-water water animals stay as they were.

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/2517 **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/drowning-bubbles` --- ### 📝 Commits (2) - [`57e8de0`](https://github.com/horizon-rust/horizon/commit/57e8de0007d63eee598d96c3f9a305659f39327d) Send the drowning entity event (67) and draw the bubbles on clients - [`ef0ea5d`](https://github.com/horizon-rust/horizon/commit/ef0ea5daad19c6b79e58751de28341b7a761421b) Merge main into fix/drowning-bubbles ### 📊 Changes **7 files changed** (+78 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -18) 📝 `crates/horizon-client/src/game/combat.rs` (+42 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+9 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+9 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+3 -0) 📝 `crates/horizon-client/src/mobs.rs` (+6 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+4 -0) </details> ### 📄 Description ## What and why When an entity takes drowning damage, vanilla tells every client with entity event 67 and each client draws eight bubbles around it. Horizon only drew them in the window that simulates the player itself, so a client of a server (server thread, LAN guest) never saw its own drowning bubbles, other players' bubbles, or any mob's. - The host player and each guest now broadcast event 67 when the air runs out, and the host window also draws the bubbles for a guest. - Mobs that drown (not the water animals out of water) send the event too. - A client handles event 67 for its own player, other players and mobs by drawing the bubbles. The bubble code moved into one `drown_particles` function used by every path. ## Vanilla reference - `LivingEntity.baseTick`: `level.broadcastEntityEvent(this, (byte)67)` right before the 2.0 drowning damage. - `LivingEntity.handleEntityEvent(67)` calls `makeDrownParticles`: eight BUBBLE at `getX/Y/Z + triangle(0, 1)`, moving with the entity. - `WaterAnimal.handleAirSupply` hurts without the event, so out-of-water water animals stay as they were. ## 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:47 +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#4387
No description provided.