[PR #2734] [CLOSED] Show the player's own body while sleeping #4575

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2734
Author: @Web-mc1
Created: 10/27/2026
Status: ❌ Closed

Base: main ← Head: fix-sleeping-body


📝 Commits (1)

  • 8136be3 Show the player's own body while sleeping

📊 Changes

2 files changed (+27 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -2)
📝 crates/horizon-client/src/game/perspective.rs (+22 -2)

📄 Description

Written by (FryedCheese) @Web-mc1.

What and why

When the player is asleep, their own body is not drawn, in first or third person. Vanilla hides the
camera entity in first person unless it is sleeping, so the body should show while in bed. Also, the
local model was never given its bed facing, so it would not have lain down even if drawn.

  • player_model_shown() no longer hides the model while sleeping. The first-person rule is now
    own_body_in_view(first_person, sleeping).
  • tick_player_model() sets the model's bed facing (ints[1], as other players and LAN guests use),
    so it lies in the bed.
  • The shader-pack mark_player flag gets the same sleeping exception.

Vanilla reference

LevelRenderer's skip of the camera entity (not detached and not isSleeping()), LivingEntity
SLEEPING_POS, and LivingEntityRenderer.setupRotations for Pose.SLEEPING. Written from memory of
vanilla, not yet checked with tools/rea_vanilla.py. Harness: none yet; this adds a unit test,
own_body_shows_in_first_person_only_while_sleeping.

Self-check

Not run yet: I don't have the vanilla game files set up. CI will run rustfmt, clippy and the tests.
Happy to fix anything it flags.

Screenshots

Screenshot_20261027_231637 Screenshot_20261027_231941

🔄 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/2734 **Author:** [@Web-mc1](https://github.com/Web-mc1) **Created:** 10/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-sleeping-body` --- ### 📝 Commits (1) - [`8136be3`](https://github.com/horizon-rust/horizon/commit/8136be38fd56d88c6c2b094d6a05e10f82a15f15) Show the player's own body while sleeping ### 📊 Changes **2 files changed** (+27 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -2) 📝 `crates/horizon-client/src/game/perspective.rs` (+22 -2) </details> ### 📄 Description > Written by (FryedCheese) @Web-mc1. ## What and why When the player is asleep, their own body is not drawn, in first or third person. Vanilla hides the camera entity in first person unless it is sleeping, so the body should show while in bed. Also, the local model was never given its bed facing, so it would not have lain down even if drawn. - `player_model_shown()` no longer hides the model while sleeping. The first-person rule is now `own_body_in_view(first_person, sleeping)`. - `tick_player_model()` sets the model's bed facing (`ints[1]`, as other players and LAN guests use), so it lies in the bed. - The shader-pack `mark_player` flag gets the same sleeping exception. ## Vanilla reference LevelRenderer's skip of the camera entity (not detached and not `isSleeping()`), `LivingEntity` SLEEPING_POS, and `LivingEntityRenderer.setupRotations` for `Pose.SLEEPING`. Written from memory of vanilla, not yet checked with `tools/rea_vanilla.py`. Harness: none yet; this adds a unit test, `own_body_shows_in_first_person_only_while_sleeping`. ## Self-check Not run yet: I don't have the vanilla game files set up. CI will run rustfmt, clippy and the tests. Happy to fix anything it flags. ## Screenshots <img width="1343" height="864" alt="Screenshot_20261027_231637" src="https://github.com/user-attachments/assets/db583660-6d7b-4a3f-967d-e0edae69a7fd" /> <img width="220" height="158" alt="Screenshot_20261027_231941" src="https://github.com/user-attachments/assets/8564d95f-5592-4e49-a2e7-f6f125abe80a" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:18:11 +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#4575
No description provided.