[PR #3457] [CLOSED] Target details extra: what the crosshair is over, above the hotbar #4996

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3457
Author: @JustKarkat
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: extra-target-details


📝 Commits (10+)

  • f49659c Merge pull request #3586 from d3grando/fix-3246
  • 7f870d7 Merge pull request #3563 from d3grando/fix-3322
  • 3c63c59 run-parity: a push cancels the old head's run, other labels cancel nothing; cancel-on-close takes every head (#3651)
  • 58a4fd8 Merge pull request #3571 from d3grando/fix-3501
  • 215d8e7 Merge pull request #3411 from spidercraft/cape-rendering
  • c10553e Merge pull request #3439 from spidercraft/taa
  • 5e391eb Merge pull request #3500 from spidercraft/fix/firework-gaps
  • 9c5377a Mods: structures, sets, pools and templates from content mods reach command suggestions
  • 7443236 Merge pull request #3445 from d3grando/fix-3414
  • cf586e4 Merge pull request #3442 from d3grando/fix-copper-chest-double

📊 Changes

510 files changed (+45568 additions, -3665 deletions)

View changed files

➕ .claude/skills/vanilla-parity/SKILL.md (+76 -0)
📝 .github/pull_request_template.md (+2 -0)
📝 .github/workflows/cancel-on-close.yml (+6 -4)
📝 .github/workflows/game-build.yml (+5 -4)
📝 .github/workflows/run-parity.yml (+6 -2)
📝 AGENTS.md (+11 -6)
📝 README.md (+11 -6)
📝 ROADMAP.md (+111 -30)
📝 crates/horizon-client-core/src/component.rs (+102 -51)
📝 crates/horizon-client-core/src/lang.rs (+38 -1)
📝 crates/horizon-client-core/src/potions.rs (+2 -1)
📝 crates/horizon-client-core/src/registries.rs (+6 -0)
📝 crates/horizon-client-core/src/scoreboard.rs (+16 -4)
📝 crates/horizon-client-core/src/text.rs (+30 -25)
📝 crates/horizon-client-input/src/clipboard.rs (+29 -0)
📝 crates/horizon-client-input/src/keybinds.rs (+48 -13)
➕ crates/horizon-client-render/examples/compositor.rs (+151 -0)
📝 crates/horizon-client-render/src/assets.rs (+2 -1)
📝 crates/horizon-client-render/src/atlas_sources.rs (+8 -1)
📝 crates/horizon-client-render/src/biome.rs (+4 -0)

...and 80 more files

📄 Description

🤖 Opened by Joshua's AI agent (ZCode running GLM), not by Joshua himself.

What

A new Extras switch, targetDetails (off by default, with a targetCoordinates sub-switch): a small readout centered above the hotbar showing what the crosshair is over — the looked-at block's name, or the looked-at mob's name with its health under it, colored green toward red by the health's fraction. The sub-switch adds the block or mob's coordinates as a second line.

Relation to existing registry mods: blockscope and lookat cover block info (name, id, distance); this one adds mob health and coordinates and draws above the hotbar rather than beside the crosshair. Happy to drop it if the maintainer prefers the mods cover this area.

How it follows vanilla

It draws only what the game already picks every frame for the block outline and attacks (pick, mob_hit), names through the client's existing translation tables (display_item, entity.minecraft.*), so it costs nothing while off and reads no new state. No other mod's source was read; the idea is ported from a behavior description, as docs/extras.md prescribes for extras.

Implementation

  • crates/horizon-client/src/target_info.rs (new): the pure layout — a translucent box, LINE-spaced text lines, centered above the hotbar by bar_height, measured through the same width callback hud_layout::experience takes.
  • game/extras.rs: target_details_draws() — a mob before a block, as the pick order does.
  • extras.rs: the two switches and the Extras page rows ("Target" section).
  • docs/extras.md: the section.

Tests

Layout: centering above the hotbar, the coordinates line's placement, nothing drawn without a target, and the health color's green→red interpolation.

🤖 Generated with ZCode (GLM)


🔄 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/3457 **Author:** [@JustKarkat](https://github.com/JustKarkat) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `extra-target-details` --- ### 📝 Commits (10+) - [`f49659c`](https://github.com/horizon-rust/horizon/commit/f49659c78b9d388f574c1d093037f7d5f86bf049) Merge pull request #3586 from d3grando/fix-3246 - [`7f870d7`](https://github.com/horizon-rust/horizon/commit/7f870d7447c252f1da567eea0beda614bc0f2c3a) Merge pull request #3563 from d3grando/fix-3322 - [`3c63c59`](https://github.com/horizon-rust/horizon/commit/3c63c5913e398722019c8db8c99976f932eaa688) run-parity: a push cancels the old head's run, other labels cancel nothing; cancel-on-close takes every head (#3651) - [`58a4fd8`](https://github.com/horizon-rust/horizon/commit/58a4fd8263a521dffe1076e9b85123fb246ec2fb) Merge pull request #3571 from d3grando/fix-3501 - [`215d8e7`](https://github.com/horizon-rust/horizon/commit/215d8e779a774670ddb001c66c567828febfff4d) Merge pull request #3411 from spidercraft/cape-rendering - [`c10553e`](https://github.com/horizon-rust/horizon/commit/c10553eebf4c6527ebe5448daf1b915b9e83d25a) Merge pull request #3439 from spidercraft/taa - [`5e391eb`](https://github.com/horizon-rust/horizon/commit/5e391eb67392941734df7ddd648728c4ed5302f6) Merge pull request #3500 from spidercraft/fix/firework-gaps - [`9c5377a`](https://github.com/horizon-rust/horizon/commit/9c5377a57159a5e92a4a30f3d6b10a7ebcb5e660) Mods: structures, sets, pools and templates from content mods reach command suggestions - [`7443236`](https://github.com/horizon-rust/horizon/commit/74432368506bd4cde3edfb20eb7cc6afc1ea2bdf) Merge pull request #3445 from d3grando/fix-3414 - [`cf586e4`](https://github.com/horizon-rust/horizon/commit/cf586e4159583e7f4cf70a3c108846f158f36b4f) Merge pull request #3442 from d3grando/fix-copper-chest-double ### 📊 Changes **510 files changed** (+45568 additions, -3665 deletions) <details> <summary>View changed files</summary> ➕ `.claude/skills/vanilla-parity/SKILL.md` (+76 -0) 📝 `.github/pull_request_template.md` (+2 -0) 📝 `.github/workflows/cancel-on-close.yml` (+6 -4) 📝 `.github/workflows/game-build.yml` (+5 -4) 📝 `.github/workflows/run-parity.yml` (+6 -2) 📝 `AGENTS.md` (+11 -6) 📝 `README.md` (+11 -6) 📝 `ROADMAP.md` (+111 -30) 📝 `crates/horizon-client-core/src/component.rs` (+102 -51) 📝 `crates/horizon-client-core/src/lang.rs` (+38 -1) 📝 `crates/horizon-client-core/src/potions.rs` (+2 -1) 📝 `crates/horizon-client-core/src/registries.rs` (+6 -0) 📝 `crates/horizon-client-core/src/scoreboard.rs` (+16 -4) 📝 `crates/horizon-client-core/src/text.rs` (+30 -25) 📝 `crates/horizon-client-input/src/clipboard.rs` (+29 -0) 📝 `crates/horizon-client-input/src/keybinds.rs` (+48 -13) ➕ `crates/horizon-client-render/examples/compositor.rs` (+151 -0) 📝 `crates/horizon-client-render/src/assets.rs` (+2 -1) 📝 `crates/horizon-client-render/src/atlas_sources.rs` (+8 -1) 📝 `crates/horizon-client-render/src/biome.rs` (+4 -0) _...and 80 more files_ </details> ### 📄 Description > 🤖 Opened by Joshua's AI agent (ZCode running GLM), not by Joshua himself. ## What A new **Extras** switch, `targetDetails` (off by default, with a `targetCoordinates` sub-switch): a small readout centered above the hotbar showing what the crosshair is over — the looked-at block's name, or the looked-at mob's name with its health under it, colored green toward red by the health's fraction. The sub-switch adds the block or mob's coordinates as a second line. Relation to existing registry mods: `blockscope` and `lookat` cover block info (name, id, distance); this one adds mob health and coordinates and draws above the hotbar rather than beside the crosshair. Happy to drop it if the maintainer prefers the mods cover this area. ## How it follows vanilla It draws only what the game already picks every frame for the block outline and attacks (`pick`, `mob_hit`), names through the client's existing translation tables (`display_item`, `entity.minecraft.*`), so it costs nothing while off and reads no new state. No other mod's source was read; the idea is ported from a behavior description, as `docs/extras.md` prescribes for extras. ## Implementation - `crates/horizon-client/src/target_info.rs` (new): the pure layout — a translucent box, `LINE`-spaced text lines, centered above the hotbar by `bar_height`, measured through the same width callback `hud_layout::experience` takes. - `game/extras.rs`: `target_details_draws()` — a mob before a block, as the pick order does. - `extras.rs`: the two switches and the Extras page rows ("Target" section). - `docs/extras.md`: the section. ## Tests Layout: centering above the hotbar, the coordinates line's placement, nothing drawn without a target, and the health color's green→red interpolation. 🤖 Generated with [ZCode](https://zcode.ai) (GLM) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:28 +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#4996
No description provided.