[PR #194] [MERGED] Creepers swell and flash for LAN guests; load ignited from NBT #2395

Closed
opened 2026-11-02 15:55:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/194
Author: @ludovic111
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: fix/creeper-swell-157


📝 Commits (1)

  • 087b252 Creepers swell for LAN guests and load ignited from NBT

📊 Changes

4 files changed (+44 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+4 -5)
📝 crates/horizon-client/src/game/lan.rs (+11 -3)
📝 crates/horizon-client/src/game/remote.rs (+16 -0)
📝 crates/horizon-client/src/mobs/hostile.rs (+13 -0)

📄 Description

Fixes #157

What was wrong. In single player the creeper already swells exactly like CreeperRenderer.scale (wobble 1 + Mth.sin(g*100)*g*0.01, g⁴ growth 0.4 wide / 0.1 tall) and, since #121, flashes white (getWhiteOverlayProgress). #121 shipped in v2026.10.14.2, after this issue was filed against v2026.10.14.1 (which had the swell but no flash, and the swell alone is subtle: it only grows with g⁴).

What was still missing: LAN guests (and any Horizon client on a server) never saw a creeper swell or flash. The host never sent Creeper.DATA_SWELL_DIR / DATA_IS_IGNITED, and the guest ignored creeper entity data, so its creeper's swell stayed 0.

Fix

  • Host (game/lan.rs): creepers carry entity data 16 (DATA_SWELL_DIR, always sent since only changed entries go out and it drops back to -1), 17 (DATA_IS_POWERED) and 18 (DATA_IS_IGNITED).
  • Guest (game/remote.rs): applies 16/17/18 to the creeper, and tick_remote_entities runs the client half of Creeper.tick (mobs::hostile::creeper_client_tick: oldSwell = swell, ignited forces dir 1, swell += dir clamped to 0..30; the server explodes it).
  • Creeper.readAdditionalSaveData: ignited now lights the fuse (and is saved), so /summon creeper ~ ~ ~ {ignited:1b} works as in vanilla.

Proof (vscreen, HORIZON_NO_AUDIO=1, scratch home)

  • Host world /published, a second client joined with --server 127.0.0.1:PORT --name Guest; the host summoned creeper {ignited:1b,NoAI:1b} in front of the guest. The guest's frames show it widening and flashing white until it blows (agent-state/wave5b-shots/157-lan-guest-creeper-swell.png on the desktop). Before this change the guest-side creeper never changed.
  • Single player on main (before this PR) for reference: 157-singleplayer-main.png (swell + flash already there).
  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings on the Mac mini: clean.

Left over (not in this PR): the host's creeper AI doesn't target LAN guests, a LAN creeper explosion didn't hurt the guest, and /publish true survival 25599 fails with "Expected integer" (plain /publish works).

🤖 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/194 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/creeper-swell-157` --- ### 📝 Commits (1) - [`087b252`](https://github.com/horizon-rust/horizon/commit/087b2526c66b87a80be52618e53812a146524fa0) Creepers swell for LAN guests and load ignited from NBT ### 📊 Changes **4 files changed** (+44 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+4 -5) 📝 `crates/horizon-client/src/game/lan.rs` (+11 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+16 -0) 📝 `crates/horizon-client/src/mobs/hostile.rs` (+13 -0) </details> ### 📄 Description Fixes #157 **What was wrong.** In single player the creeper already swells exactly like `CreeperRenderer.scale` (wobble `1 + Mth.sin(g*100)*g*0.01`, `g⁴` growth 0.4 wide / 0.1 tall) and, since #121, flashes white (`getWhiteOverlayProgress`). #121 shipped in v2026.10.14.2, after this issue was filed against v2026.10.14.1 (which had the swell but no flash, and the swell alone is subtle: it only grows with `g⁴`). What was still missing: **LAN guests (and any Horizon client on a server) never saw a creeper swell or flash.** The host never sent `Creeper.DATA_SWELL_DIR` / `DATA_IS_IGNITED`, and the guest ignored creeper entity data, so its creeper's `swell` stayed 0. **Fix** - Host (`game/lan.rs`): creepers carry entity data 16 (`DATA_SWELL_DIR`, always sent since only changed entries go out and it drops back to -1), 17 (`DATA_IS_POWERED`) and 18 (`DATA_IS_IGNITED`). - Guest (`game/remote.rs`): applies 16/17/18 to the creeper, and `tick_remote_entities` runs the client half of `Creeper.tick` (`mobs::hostile::creeper_client_tick`: `oldSwell = swell`, ignited forces dir 1, `swell += dir` clamped to 0..30; the server explodes it). - `Creeper.readAdditionalSaveData`: `ignited` now lights the fuse (and is saved), so `/summon creeper ~ ~ ~ {ignited:1b}` works as in vanilla. **Proof (vscreen, HORIZON_NO_AUDIO=1, scratch home)** - Host world `/publish`ed, a second client joined with `--server 127.0.0.1:PORT --name Guest`; the host summoned `creeper {ignited:1b,NoAI:1b}` in front of the guest. The guest's frames show it widening and flashing white until it blows (`agent-state/wave5b-shots/157-lan-guest-creeper-swell.png` on the desktop). Before this change the guest-side creeper never changed. - Single player on main (before this PR) for reference: `157-singleplayer-main.png` (swell + flash already there). - `cargo fmt --check`, `cargo clippy --workspace --all-targets -D warnings` on the Mac mini: clean. Left over (not in this PR): the host's creeper AI doesn't target LAN guests, a LAN creeper explosion didn't hurt the guest, and `/publish true survival 25599` fails with "Expected integer" (plain `/publish` works). 🤖 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-02 15:55:37 +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#2395
No description provided.