[PR #7366] [MERGED] port map: updateInvisibilityStatus is guest_body's invisible flag #7554

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

📋 Pull Request Information

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

Base: main ← Head: chore/mapgap-game-002


📝 Commits (1)

  • efa9d63 port map: updateInvisibilityStatus is guest_body's invisible flag

📊 Changes

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

View changed files

📝 tools/port_map/game-002.tsv (+1 -1)

📄 Description

tools/port_map/game-002.tsv row 133 cited crates/horizon-client/src/game/lan.rs::Game::lan_host_state, which crates/horizon-client/src/game/lan.rs does not define — gaps --kind map reports no fn ...lan.rs::Game::lan_host_state. The fn that answers the method is in the LAN host's entity path.

row was now
133 ServerPlayer.updateInvisibilityStatus (inline) crates/horizon-client/src/game/lan.rs::Game::lan_host_state crates/horizon-client/src/lan/hub.rs::guest_body
  • Vanilla's ServerPlayer.updateInvisibilityStatus is the spectator test over the inherited one: its callees are Player.isSpectator, Entity.setInvisible, LivingEntity.updateInvisibilityStatus (which sets invisible from the effect) and removeEffectParticles. A spectator is invisible whatever effects it has; otherwise the invisibility effect decides.
  • lan/hub.rs::guest_body is that decision for the player the host serves: invisible: g.effects.get("invisibility").is_some() || g.spectator(), with the line above it naming ServerPlayer.updateInvisibilityStatus. shared_flags folds the flag into the shared entity-data byte (0x20, invisible) that ServerEntity.sendDirtyEntityData sends to clients — hub.rs:2816 does that every tick a guest's flags change.
  • The row's note now says so, in place of an empty cell.

Map-check:

$ PORT_LEDGER_OUT=/tmp/led-mapgap python3 tools/port_ledger.py map-check tools/port_map/game-002.tsv
146 rows, no problems.

Proven: guest_body (hub.rs:4113) sets invisible from the effect or g.spectator() and names the vanilla method in its comment; shared_flags (hub.rs:4129) turns that into bit 0x20; the per-tick send is at hub.rs:2816; and the vanilla shape is the bytecode's callee list, quoted above.

Not proven: that the flag reaches a client on exactly the tick vanilla's would — it is sent when it changes, not every tick. The LivingEntity half of the method (the effect test, and removeEffectParticles) is not claimed by this row; only the ServerPlayer override is.


🔄 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/7366 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/mapgap-game-002` --- ### 📝 Commits (1) - [`efa9d63`](https://github.com/horizon-rust/horizon/commit/efa9d6316920280d54c34e452e28af504581638c) port map: updateInvisibilityStatus is guest_body's invisible flag ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game-002.tsv` (+1 -1) </details> ### 📄 Description `tools/port_map/game-002.tsv` row 133 cited `crates/horizon-client/src/game/lan.rs::Game::lan_host_state`, which `crates/horizon-client/src/game/lan.rs` does not define — `gaps --kind map` reports `no fn ...lan.rs::Game::lan_host_state`. The fn that answers the method is in the LAN host's entity path. | row | was | now | | --- | --- | --- | | 133 `ServerPlayer.updateInvisibilityStatus` (inline) | `crates/horizon-client/src/game/lan.rs::Game::lan_host_state` | `crates/horizon-client/src/lan/hub.rs::guest_body` | - Vanilla's `ServerPlayer.updateInvisibilityStatus` is the spectator test over the inherited one: its callees are `Player.isSpectator`, `Entity.setInvisible`, `LivingEntity.updateInvisibilityStatus` (which sets invisible from the effect) and `removeEffectParticles`. A spectator is invisible whatever effects it has; otherwise the invisibility effect decides. - `lan/hub.rs::guest_body` is that decision for the player the host serves: `invisible: g.effects.get("invisibility").is_some() || g.spectator()`, with the line above it naming `ServerPlayer.updateInvisibilityStatus`. `shared_flags` folds the flag into the shared entity-data byte (`0x20`, invisible) that `ServerEntity.sendDirtyEntityData` sends to clients — `hub.rs:2816` does that every tick a guest's flags change. - The row's note now says so, in place of an empty cell. Map-check: ``` $ PORT_LEDGER_OUT=/tmp/led-mapgap python3 tools/port_ledger.py map-check tools/port_map/game-002.tsv 146 rows, no problems. ``` **Proven:** `guest_body` (hub.rs:4113) sets `invisible` from the effect or `g.spectator()` and names the vanilla method in its comment; `shared_flags` (hub.rs:4129) turns that into bit `0x20`; the per-tick send is at hub.rs:2816; and the vanilla shape is the bytecode's callee list, quoted above. **Not proven:** that the flag reaches a client on exactly the tick vanilla's would — it is sent when it changes, not every tick. The `LivingEntity` half of the method (the effect test, and `removeEffectParticles`) is not claimed by this row; only the `ServerPlayer` override is. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:39 +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#7554
No description provided.