[PR #5254] [MERGED] fix(mobs): a knocked sulfur cube syncs at once #6167

Closed
opened 2026-11-03 06:15:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/sulfur-cube-knockback-sync


📝 Commits (2)

📊 Changes

1 file changed (+27 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/mobs/sulfur_cube.rs (+27 -0)

📄 Description

What and why

SulfurCube.knockback sets needsSync, as LivingEntity.knockback does, so the server sends the cube's new motion on the next update
Horizon's cube knockback did not set needs_sync, so a guest could see a cube with a block pushed late, on the cube's next regular update
It now sets it
A unit test knocks a cube with a block and checks the push and needs_sync

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

SulfurCube.knockback sets this.needsSync = true before setDeltaMovement (world/entity/monster/cubemob/SulfurCube.java:865)
LivingEntity.knockback does the same (world/entity/LivingEntity.java:1662)

Other projects' code

none

Self-check

Check Result
Scope ✅ 1 files, +27 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (56 s)
rustfmt ✅ (8 s)
clippy ✅ (1 min 54 s)
tests: horizon-client ✅ 1342 passed (5 min 13 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root 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)

🔄 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/5254 **Author:** [@reservedbytes](https://github.com/reservedbytes) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sulfur-cube-knockback-sync` --- ### 📝 Commits (2) - [`a2a79d9`](https://github.com/horizon-rust/horizon/commit/a2a79d9cfccdff001bc802e057bb7779cddf6faa) fix(mobs): a knocked sulfur cube syncs at once - [`0784050`](https://github.com/horizon-rust/horizon/commit/0784050d6fe9fb898e7627f9e5d99a3bc95c7b64) Merge main into #5254 (main builds again after #5251) ### 📊 Changes **1 file changed** (+27 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/sulfur_cube.rs` (+27 -0) </details> ### 📄 Description ## What and why `SulfurCube.knockback` sets `needsSync`, as `LivingEntity.knockback` does, so the server sends the cube's new motion on the next update Horizon's cube knockback did not set `needs_sync`, so a guest could see a cube with a block pushed late, on the cube's next regular update It now sets it A unit test knocks a cube with a block and checks the push and `needs_sync` ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `SulfurCube.knockback` sets `this.needsSync = true` before `setDeltaMovement` (`world/entity/monster/cubemob/SulfurCube.java:865`) `LivingEntity.knockback` does the same (`world/entity/LivingEntity.java:1662`) ## Other projects' code none ## Self-check | Check | Result | | --- | --- | | Scope | ✅ 1 files, +27 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (56 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (1 min 54 s) | | tests: horizon-client | ✅ 1342 passed (5 min 13 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root 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) | --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:15:26 +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#6167
No description provided.