[GH-ISSUE #4858] Fake player NPCs (scaled lobby NPCs) can't be clicked #1475

Closed
opened 2026-11-02 15:47:14 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @socksprox on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4858

Originally assigned to: @socksprox on GitHub.

🤖 Agent: filed on behalf of socksprox.

On servers that use fake player entities for lobby NPCs (e.g. gommehd.net's giant SMP/BedWars/CityBuild figures), right-clicking the NPC does nothing — vanilla moves you to the game server.

Parity divergences found against the decompiled 26.3 sources:

  1. LivingEntity.getDimensions(pose) is getDefaultDimensions(pose).scale(getScale()) — the minecraft:scale attribute grows the hitbox with the model. Mob::awake_dims_in hardcoded avatar_pose.dimensions(1.0), so a giant NPC's clickbox stays 0.6×1.8 at its feet while its model fills the screen.
  2. EntitySelector.CAN_BE_PICKED is isPickable = !isRemoved() — no alive check. mob_hit skipped !m.alive(), so a health-0 fake player still renders but can't be clicked (or listed by the entities agent command).
  3. Pick reach was hardcoded to 3.0/5.0 rather than the entity_interaction_range/block_interaction_range attributes (Player.entityInteractionRange() in GameRenderer.pick).

Fix: apply model_scale to player/mannequin dims, use !removed for pickability, and refresh both reaches per tick from the attributes.

Originally created by @socksprox on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4858 Originally assigned to: @socksprox on GitHub. 🤖 Agent: filed on behalf of socksprox. On servers that use fake player entities for lobby NPCs (e.g. gommehd.net's giant SMP/BedWars/CityBuild figures), right-clicking the NPC does nothing — vanilla moves you to the game server. Parity divergences found against the decompiled 26.3 sources: 1. `LivingEntity.getDimensions(pose)` is `getDefaultDimensions(pose).scale(getScale())` — the `minecraft:scale` attribute grows the hitbox with the model. `Mob::awake_dims_in` hardcoded `avatar_pose.dimensions(1.0)`, so a giant NPC's clickbox stays 0.6×1.8 at its feet while its model fills the screen. 2. `EntitySelector.CAN_BE_PICKED` is `isPickable` = `!isRemoved()` — no alive check. `mob_hit` skipped `!m.alive()`, so a health-0 fake player still renders but can't be clicked (or listed by the `entities` agent command). 3. Pick reach was hardcoded to 3.0/5.0 rather than the `entity_interaction_range`/`block_interaction_range` attributes (`Player.entityInteractionRange()` in `GameRenderer.pick`). Fix: apply `model_scale` to player/mannequin dims, use `!removed` for pickability, and refresh both reaches per tick from the attributes.
Author
Owner

@socksprox commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6536856559 --> @socksprox commented on GitHub (Oct 31, 2026): /claim
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#1475
No description provided.