[PR #760] [MERGED] Clients of a server show its boats, minecarts, armor stands, frames and paintings #2786

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

📋 Pull Request Information

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

Base: main ← Head: fix/server-objects-on-clients


📝 Commits (1)

  • 583502f Clients of a server show its boats, minecarts, armor stands, frames and paintings

📊 Changes

5 files changed (+357 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/control.rs (+2 -0)
📝 crates/horizon-client/src/game/remote.rs (+26 -3)
➕ crates/horizon-client/src/game/remote_objects.rs (+270 -0)
📝 tools/lan_e2e.py (+58 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Stacked on #759 (the server side). Retarget to main once it merges.

What

ClientPacketListener.handleAddEntity, handleSetEntityData and handleSetEquipment for the objects a server tracks. A Horizon client of a server (LAN, dedicated, or single player's server thread) now places and draws the boats, minecarts, armor stands, item frames and paintings it is sent:

  • Spawn:
    • minecarts by kind;
    • boats and rafts by wood, with or without a chest;
    • armor stands;
    • frames and paintings at their block, facing the way the spawn data says.
  • Entity data:
    • frame item and rotation;
    • painting variant (a registry holder, resolved through the server's painting_variant registry);
    • armor stand flags (small, arms, no base plate, marker), invisibility and health;
    • boat paddles;
    • vehicle hurt and damage.
  • Equipment: what an armor stand wears and holds.
  • Moves interpolate like mobs' (three steps). Rotation and ground state follow the move packets.
  • They are cleared on a new connection, a respawn or a dimension change, and removed with RemoveEntities.

status gains objects, listing each one's kind, place, rotation and what it holds, wears or shows.

Why

With the server thread on by default (#731), single player is a client of its own server. Without this, every minecart, boat, armor stand, frame and painting would vanish from the window. LAN guests have the same gap today.

How tested

  • New tools/lan_e2e.py --check objects (Mac mini, offscreen):
    • The host summons a stone wall, four minecarts, an oak boat turned 45°, a birch chest boat, a raft, two armor stands (one small with arms, no base plate and a diamond helmet), an item frame holding a diamond turned 3, a glow item frame and the kebab and courbet paintings.
    • The guest's status must list the same 13 objects as the host's, by kind, place, rotation (in 256ths of a turn), equipment, frame item and rotation, painting facing and variant.
    • Result: objects: PASS 13 objects identical. The guest's screenshot shows the stands, helmet, frames, diamond and both paintings.
cargo fmt --all --check                                         ok
cargo clippy -p horizon-client --all-targets -- -D warnings     ok
tools/lan_e2e.py --check objects                                PASS (13 objects identical)
tools/parity.py --changed origin/main                           running; results follow in a comment

Needs Ludovic

Nothing.

🤖 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/760 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-objects-on-clients` --- ### 📝 Commits (1) - [`583502f`](https://github.com/horizon-rust/horizon/commit/583502f0f4022c7ff18c5a594457b4c7d749d5e4) Clients of a server show its boats, minecarts, armor stands, frames and paintings ### 📊 Changes **5 files changed** (+357 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/control.rs` (+2 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+26 -3) ➕ `crates/horizon-client/src/game/remote_objects.rs` (+270 -0) 📝 `tools/lan_e2e.py` (+58 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Stacked on #759 (the server side). Retarget to `main` once it merges. ## What `ClientPacketListener.handleAddEntity`, `handleSetEntityData` and `handleSetEquipment` for the objects a server tracks. A Horizon client of a server (LAN, dedicated, or single player's server thread) now places and draws the boats, minecarts, armor stands, item frames and paintings it is sent: - **Spawn:** - minecarts by kind; - boats and rafts by wood, with or without a chest; - armor stands; - frames and paintings at their block, facing the way the spawn data says. - **Entity data:** - frame item and rotation; - painting variant (a registry holder, resolved through the server's `painting_variant` registry); - armor stand flags (small, arms, no base plate, marker), invisibility and health; - boat paddles; - vehicle hurt and damage. - **Equipment:** what an armor stand wears and holds. - Moves interpolate like mobs' (three steps). Rotation and ground state follow the move packets. - They are cleared on a new connection, a respawn or a dimension change, and removed with `RemoveEntities`. `status` gains `objects`, listing each one's kind, place, rotation and what it holds, wears or shows. ## Why With the server thread on by default (#731), single player is a client of its own server. Without this, every minecart, boat, armor stand, frame and painting would vanish from the window. LAN guests have the same gap today. ## How tested - New `tools/lan_e2e.py --check objects` (Mac mini, offscreen): - The host summons a stone wall, four minecarts, an oak boat turned 45°, a birch chest boat, a raft, two armor stands (one small with arms, no base plate and a diamond helmet), an item frame holding a diamond turned 3, a glow item frame and the kebab and courbet paintings. - The guest's `status` must list the same 13 objects as the host's, by kind, place, rotation (in 256ths of a turn), equipment, frame item and rotation, painting facing and variant. - **Result: `objects: PASS 13 objects identical`.** The guest's screenshot shows the stands, helmet, frames, diamond and both paintings. ``` cargo fmt --all --check ok cargo clippy -p horizon-client --all-targets -- -D warnings ok tools/lan_e2e.py --check objects PASS (13 objects identical) tools/parity.py --changed origin/main running; results follow in a comment ``` ## Needs Ludovic Nothing. 🤖 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:59:03 +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#2786
No description provided.