[PR #1727] [MERGED] Fix invisible shulker bullets on server clients #3722

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

📋 Pull Request Information

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

Base: main ← Head: t3/9148b77e


📝 Commits (3)

  • cc65eee Make shulker bullets visible on server clients
  • eed98be Merge main and retain both LAN regression checks
  • 80eafe8 Merge main into t3/9148b77e: keep both sides' appended checks

📊 Changes

3 files changed (+121 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+3 -1)
📝 crates/horizon-client/src/game/remote_projectiles.rs (+8 -0)
📝 tools/lan_e2e.py (+110 -1)

📄 Description

🤖 Opened by rdbt's AI agent (OpenCode, agentrouter/gpt-6.1-sol), not by rdbt himself.

What and why

Fixes #1494.

  • Give every mob-generated projectile a unique ID from the game's shared entity counter when handling MobEvent::Projectile.
  • Recognize minecraft:shulker_bullet on server clients and create a projectile for the existing sprite renderer and position interpolation. Its homing state stays server-side.
  • Add lan_e2e.py --check shulker_bullets: every shot must appear on both clients with distinct nonzero IDs, moving along matching paths, and disappear after block hits. An elevated, wall-supported shulker leaves enough room to observe its current server flight.

Vanilla reference

Read the pinned 26.3 bytecode with tools/rea_vanilla.py:

  • Entity.<init> obtains its ID from Level.getNextEntityId.
  • ClientPacketListener.handleAddEntity / createEntityFromPacket instantiate the packet's entity type, recreate its state, and add it to the client level.
  • ShulkerBullet.<init> and ShulkerBullet.tick: target selection and homing state are server-side.

Verification

  • Before the fix (947d65e6), the live server-thread regression recorded two shulker shots and no drawable bullet IDs.
  • In-frame host + LAN guest, rechecked after merging main: both shots appeared on both sides as IDs 188 and 198, with matching movement and removal.
  • Server-thread host + LAN guest, rechecked after merging main: both shots appeared on both sides as IDs 319 and 320, with matching movement and removal.
  • Main's new falling regression passes in both hosting modes after resolving the harness conflict. The existing projectiles check passed on the initial revision.
  • dedicated_server and server_entities parity passed before syncing main. The local mob_ai oracle exceeded its run budget; broader affected parity is listed for CI.

Both real-game runs used offscreen rendering and fresh scratch data/config homes.

Self-check

pr_ready (tools/pr_ready.py --quick on archlinux, against origin/main at f2f58aca9, 7 min 52 s)

Check Result
Scope ✅ 3 files, +121 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 252 passed (29 s)
rustfmt ✅ (7 s)
clippy ✅ (1 s)
tests: horizon-client ✅ 1201 passed (6 min 31 s)
doc tests ✅ 0 passed (8 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 95 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, dedicated_server, dispenser, locator_bar, mace, online_mode, replace_blobs, resource_pack and 83 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Screenshots

Before, using the original floor fixture (two shots, no drawable bullets):

Before: invisible shulker bullets

After, using the elevated regression fixture; the bullet is visible below the shulker:

Server-thread host LAN guest
Host sees the bullet Guest sees the bullet

🤖 Generated with OpenCode (agentrouter/gpt-6.1-sol).


🔄 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/1727 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `t3/9148b77e` --- ### 📝 Commits (3) - [`cc65eee`](https://github.com/horizon-rust/horizon/commit/cc65eeec822ab8a5840a422921c77c4920341437) Make shulker bullets visible on server clients - [`eed98be`](https://github.com/horizon-rust/horizon/commit/eed98be9cf47f254de58ef9a2a11d0749e303094) Merge main and retain both LAN regression checks - [`80eafe8`](https://github.com/horizon-rust/horizon/commit/80eafe84e93fd1765ab6f211c465f34fb7425704) Merge main into t3/9148b77e: keep both sides' appended checks ### 📊 Changes **3 files changed** (+121 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+3 -1) 📝 `crates/horizon-client/src/game/remote_projectiles.rs` (+8 -0) 📝 `tools/lan_e2e.py` (+110 -1) </details> ### 📄 Description > 🤖 Opened by rdbt's AI agent (OpenCode, agentrouter/gpt-6.1-sol), not by rdbt himself. ## What and why Fixes #1494. - Give every mob-generated projectile a unique ID from the game's shared entity counter when handling `MobEvent::Projectile`. - Recognize `minecraft:shulker_bullet` on server clients and create a projectile for the existing sprite renderer and position interpolation. Its homing state stays server-side. - Add `lan_e2e.py --check shulker_bullets`: every shot must appear on both clients with distinct nonzero IDs, moving along matching paths, and disappear after block hits. An elevated, wall-supported shulker leaves enough room to observe its current server flight. ## Vanilla reference Read the pinned 26.3 bytecode with `tools/rea_vanilla.py`: - `Entity.<init>` obtains its ID from `Level.getNextEntityId`. - `ClientPacketListener.handleAddEntity` / `createEntityFromPacket` instantiate the packet's entity type, recreate its state, and add it to the client level. - `ShulkerBullet.<init>` and `ShulkerBullet.tick`: target selection and homing state are server-side. ## Verification - Before the fix (947d65e6), the live server-thread regression recorded two shulker shots and no drawable bullet IDs. - In-frame host + LAN guest, rechecked after merging main: both shots appeared on both sides as IDs 188 and 198, with matching movement and removal. - Server-thread host + LAN guest, rechecked after merging main: both shots appeared on both sides as IDs 319 and 320, with matching movement and removal. - Main's new `falling` regression passes in both hosting modes after resolving the harness conflict. The existing `projectiles` check passed on the initial revision. - `dedicated_server` and `server_entities` parity passed before syncing main. The local `mob_ai` oracle exceeded its run budget; broader affected parity is listed for CI. Both real-game runs used offscreen rendering and fresh scratch data/config homes. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on archlinux, against origin/main at f2f58aca9, 7 min 52 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +121 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 252 passed (29 s) | | rustfmt | ✅ (7 s) | | clippy | ✅ (1 s) | | tests: horizon-client | ✅ 1201 passed (6 min 31 s) | | doc tests | ✅ 0 passed (8 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 95 affected, to run in CI (--quick): arrow, block_removal, command_exec, composter, crafter, dedicated_server, dispenser, locator_bar, mace, online_mode, replace_blobs, resource_pack and 83 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Screenshots Before, using the original floor fixture (two shots, no drawable bullets): ![Before: invisible shulker bullets](https://raw.githubusercontent.com/rdbtCVS/horizon/issue-1494-evidence/.github/pr-evidence/1494/before-host.png) After, using the elevated regression fixture; the bullet is visible below the shulker: | Server-thread host | LAN guest | | --- | --- | | ![Host sees the bullet](https://raw.githubusercontent.com/rdbtCVS/horizon/issue-1494-evidence/.github/pr-evidence/1494/after-host.png) | ![Guest sees the bullet](https://raw.githubusercontent.com/rdbtCVS/horizon/issue-1494-evidence/.github/pr-evidence/1494/after-guest.png) | 🤖 Generated with [OpenCode](https://opencode.ai) (agentrouter/gpt-6.1-sol). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:42 +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#3722
No description provided.