[PR #3644] [MERGED] invisibility: the player's own body is hidden in third person and the inventory, its armour still drawn #5118

Closed
opened 2026-11-03 05:10:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3644
Author: @iLostName
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: invisible-player-third-person


📝 Commits (2)

  • 2677a39 invisibility: the player's own body is hidden in third person and the inventory, its armour still drawn
  • cb3f438 Merge main into the invisibility branch: render_layers beside main's cape, and no cape while invisible

📊 Changes

3 files changed (+156 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/game/perspective.rs (+130 -13)
📝 crates/horizon-client/src/game/remote.rs (+3 -2)
📝 crates/horizon-client/src/mobs/render.rs (+23 -3)

📄 Description

What and why

After drinking an invisibility potion, the player's own body stayed visible in third person and in the inventory: the check looked up minecraft:invisibility, but the player's effects are kept without the namespace. The body is now hidden unless the player's team sees friendly invisibles, while armour, elytra and held items still draw, and a glowing invisible player keeps its outline. Fixes #3615.

Vanilla reference

LivingEntityRenderer.submit skips the model when isBodyVisible is false and the entity isInvisibleTo the viewer, but still submits its layers (HumanoidArmorLayer, WingsLayer, ItemInHandLayer); InventoryScreen.extractRenderState uses the same render state.

Self-check

pr_ready (tools/pr_ready.py --quick on PC-Lost, against origin/main at 64990cd32, 2 min 13 s)

Check Result
Scope ✅ 3 files, +149 −16
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 1 s)
rustfmt ✅ (10 s)
clippy ✅ (15 s)
tests: horizon-client ✅ 799 passed (36 s)
doc tests ✅ 0 passed (8 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)

The one failure under Python tests is test_port_publish.PublishTests.test_body_has_names_and_signatures_only, a ~/ against ~\ path check that fails on Windows on main too. Parity is left to CI.


🔄 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/3644 **Author:** [@iLostName](https://github.com/iLostName) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `invisible-player-third-person` --- ### 📝 Commits (2) - [`2677a39`](https://github.com/horizon-rust/horizon/commit/2677a397e57604801944d793f1a6129d0193f090) invisibility: the player's own body is hidden in third person and the inventory, its armour still drawn - [`cb3f438`](https://github.com/horizon-rust/horizon/commit/cb3f4387db280d17a481084d038d13f43b1178ff) Merge main into the invisibility branch: render_layers beside main's cape, and no cape while invisible ### 📊 Changes **3 files changed** (+156 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/perspective.rs` (+130 -13) 📝 `crates/horizon-client/src/game/remote.rs` (+3 -2) 📝 `crates/horizon-client/src/mobs/render.rs` (+23 -3) </details> ### 📄 Description ## What and why After drinking an invisibility potion, the player's own body stayed visible in third person and in the inventory: the check looked up `minecraft:invisibility`, but the player's effects are kept without the namespace. The body is now hidden unless the player's team sees friendly invisibles, while armour, elytra and held items still draw, and a glowing invisible player keeps its outline. Fixes #3615. ## Vanilla reference `LivingEntityRenderer.submit` skips the model when `isBodyVisible` is false and the entity `isInvisibleTo` the viewer, but still submits its layers (`HumanoidArmorLayer`, `WingsLayer`, `ItemInHandLayer`); `InventoryScreen.extractRenderState` uses the same render state. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on PC-Lost, against origin/main at 64990cd32, 2 min 13 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +149 −16 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 408 run, FAILED (failures=1, skipped=12) (1 min 1 s) | | rustfmt | ✅ (10 s) | | clippy | ✅ (15 s) | | tests: horizon-client | ✅ 799 passed (36 s) | | doc tests | ✅ 0 passed (8 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) | The one failure under Python tests is `test_port_publish.PublishTests.test_body_has_names_and_signatures_only`, a `~/` against `~\` path check that fails on Windows on main too. Parity is left to CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:21 +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#5118
No description provided.