[PR #6078] [MERGED] fix(mods): count the host's own player and golems as container viewers #6642

Closed
opened 2026-11-03 06:24:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6078
Author: @Xmilon
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: container-viewers-openers


📝 Commits (1)

  • 74a8a86 fix(mods): count the host's own player and golems as container viewers

📊 Changes

4 files changed (+70 additions, -52 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+1 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+0 -51)
📝 crates/horizon-client/src/game/native_hooks.rs (+68 -0)
📝 tests/test_mod_container_viewers.py (+1 -1)

📄 Description

🤖 Opened by Xmilon's AI agent (Claude Code, Sonnet 5.5), not by Xmilon personally.

What and why

Fixes #6077; follows #6049. native_mod_container_viewers was counted in tick_guests, which never counted the host's own player and does not run in-frame without LAN. The count now runs every tick from tick_world (after recheck_golem_openers) and adds the host's open container (Game::container, not a spectator) and the copper golems' chest_openers, as vanilla's ContainerOpenersCounter counts any ContainerUser. Guests are counted as before, minus spectators.

Kind

  • feature: something new for players

Vanilla reference

ContainerOpenersCounter (openerCountChanged, recheckOpeners), BarrelBlockEntity.startOpen.

Other projects' code

None.

Self-check

Client clippy -D warnings passes. tests/test_mod_container_viewers.py (the real viewer_changes, now in native_hooks.rs) passes; the new openers are not covered by a test. No game launch. CI pending.

🤖 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/6078 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `container-viewers-openers` --- ### 📝 Commits (1) - [`74a8a86`](https://github.com/horizon-rust/horizon/commit/74a8a866f89f1a2257cfed6b3910fba03ace34e3) fix(mods): count the host's own player and golems as container viewers ### 📊 Changes **4 files changed** (+70 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+1 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+0 -51) 📝 `crates/horizon-client/src/game/native_hooks.rs` (+68 -0) 📝 `tests/test_mod_container_viewers.py` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Xmilon's AI agent (Claude Code, Sonnet 5.5), not by Xmilon personally. ## What and why Fixes #6077; follows #6049. `native_mod_container_viewers` was counted in `tick_guests`, which never counted the host's own player and does not run in-frame without LAN. The count now runs every tick from `tick_world` (after `recheck_golem_openers`) and adds the host's open container (`Game::container`, not a spectator) and the copper golems' `chest_openers`, as vanilla's `ContainerOpenersCounter` counts any `ContainerUser`. Guests are counted as before, minus spectators. ## Kind - [x] feature: something new for players ## Vanilla reference `ContainerOpenersCounter` (`openerCountChanged`, `recheckOpeners`), `BarrelBlockEntity.startOpen`. ## Other projects' code None. ## Self-check Client clippy `-D warnings` passes. `tests/test_mod_container_viewers.py` (the real `viewer_changes`, now in `native_hooks.rs`) passes; the new openers are not covered by a test. No game launch. CI pending. 🤖 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-03 06:24:16 +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#6642
No description provided.