[PR #7445] [MERGED] Honor custom creeper Fuse values in timing and swelling #7606

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7445
Author: @TheMrZZ
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/creeper-custom-fuse


📝 Commits (2)

  • 637d236 Honor configured creeper fuse across timing, fall swelling, and rendering
  • 06de871 Merge main into #7445

📊 Changes

6 files changed (+107 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+59 -3)
📝 crates/horizon-client/src/mobs.rs (+3 -0)
📝 crates/horizon-client/src/mobs/hostile.rs (+4 -4)
📝 crates/horizon-client/src/mobs/living.rs (+1 -1)
📝 crates/horizon-client/src/mobs/render.rs (+22 -1)
📝 tools/command_exec_corpus.py (+18 -0)

📄 Description

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

What and why

A creeper with Fuse:1s now explodes on tick 1, while Fuse:40s waits until tick 40. Previously all creepers used 30 ticks, even though their raw NBT getters echoed the configured values.

Store the local maxSwell value, defaulting to 30, and load/save it through Fuse. Use it for the explosion threshold, client-side swelling cap, fall swell cap, and rendering divisor. No new synchronization is added: remote clients retain their constructor default unless local data sets another value. The separate generated-cloud selector gap is outside this change.

Fixes #7435.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

Official Java 26.3 Creeper constructor and readAdditionalSaveData: maxSwell defaults to 30 and loads from getShortOr("Fuse",30). tick floors swelling at zero, compares against maxSwell, clamps to it, and attempts the server-guarded explosion. causeFallDamage caps swelling at maxSwell-5 without a zero floor. getSwelling divides interpolation by maxSwell-2 without a divisor guard. The synced fields are direction, powered, and ignited; maxSwell is not one of them.

Other projects' code

None.

Self-check

Five focused creeper tests pass, including resource-independent regressions for custom/default explosion timing, runtime Fuse serialization, fall caps, and the rendering divisor's infinity/NaN behavior. The timing cases also cover zero and negative fuse values without adding validation absent from vanilla.

The command-execution corpus checks three separated, ignited, NoAI creepers with short/default/long fuses at ticks 1, 29, 30, 39, and 40. It checks actual entity existence as well as NBT. Full command runtime parity requires prepared game data and remains unrun locally.

pr_ready (tools/pr_ready.py --quick on a local runner, against origin/main at c1f5855e8, 3 min 4 s)

Check Result
Scope ✅ 6 files, +107 −9
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (42 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 45 s)
tests: horizon-client-lib ✅ 1465 passed (29 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Codex.


🔄 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/7445 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/creeper-custom-fuse` --- ### 📝 Commits (2) - [`637d236`](https://github.com/horizon-rust/horizon/commit/637d236297b4de77315e2024b5c865c895acc861) Honor configured creeper fuse across timing, fall swelling, and rendering - [`06de871`](https://github.com/horizon-rust/horizon/commit/06de8714b7a41b62969f95abbd482172481a62fb) Merge main into #7445 ### 📊 Changes **6 files changed** (+107 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+59 -3) 📝 `crates/horizon-client/src/mobs.rs` (+3 -0) 📝 `crates/horizon-client/src/mobs/hostile.rs` (+4 -4) 📝 `crates/horizon-client/src/mobs/living.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/render.rs` (+22 -1) 📝 `tools/command_exec_corpus.py` (+18 -0) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why A creeper with `Fuse:1s` now explodes on tick 1, while `Fuse:40s` waits until tick 40. Previously all creepers used 30 ticks, even though their raw NBT getters echoed the configured values. Store the local `maxSwell` value, defaulting to 30, and load/save it through `Fuse`. Use it for the explosion threshold, client-side swelling cap, fall swell cap, and rendering divisor. No new synchronization is added: remote clients retain their constructor default unless local data sets another value. The separate generated-cloud selector gap is outside this change. Fixes #7435. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference Official Java 26.3 `Creeper` constructor and `readAdditionalSaveData`: `maxSwell` defaults to 30 and loads from `getShortOr("Fuse",30)`. `tick` floors swelling at zero, compares against `maxSwell`, clamps to it, and attempts the server-guarded explosion. `causeFallDamage` caps swelling at `maxSwell-5` without a zero floor. `getSwelling` divides interpolation by `maxSwell-2` without a divisor guard. The synced fields are direction, powered, and ignited; `maxSwell` is not one of them. ## Other projects' code None. ## Self-check Five focused creeper tests pass, including resource-independent regressions for custom/default explosion timing, runtime Fuse serialization, fall caps, and the rendering divisor's infinity/NaN behavior. The timing cases also cover zero and negative fuse values without adding validation absent from vanilla. The command-execution corpus checks three separated, ignited, NoAI creepers with short/default/long fuses at ticks 1, 29, 30, 39, and 40. It checks actual entity existence as well as NBT. Full command runtime parity requires prepared game data and remains unrun locally. **pr_ready** (`tools/pr_ready.py --quick` on a local runner, against origin/main at c1f5855e8, 3 min 4 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +107 −9 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (42 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 45 s) | | tests: horizon-client-lib | ✅ 1465 passed (29 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:20:38 +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#7606
No description provided.