Skip to content

Show health when looking at any part of a hitbox (3.7.1) - #76

Merged
zeshan321 merged 1 commit into
masterfrom
feat/model-look
Oct 3, 2026
Merged

zeshan321 merged 1 commit into
masterfrom
feat/model-look

Conversation

@zeshan321

Copy link
Copy Markdown
Owner

What changes

  • Show On Look checks the whole hitbox (1.13.2+). ActionHealth ray traces each nearby entity's hitbox. Large mobs and ModelEngine models now show health when the player looks at their body. Before, the check measured the view line against the entity's feet only. The old check still runs, so nothing that matched before stops matching.
  • Nearest entity first. Show On Look sorts targets by distance.
  • Fix: possible server freeze. getTarget returns at a distance of 0. BlockIterator treats 0 as no limit, so a player at an entity's exact position made the check walk the view line and load chunks. The new hitbox check made this case more likely, and the ModelEngine test found it.
  • README rewrite. Supported versions, features, install, commands, placeholders, optional plugins and building.
  • Version 3.7.1.

Why no ModelEngine code

I tested with the free Legacy Model Engine Demo (R3.1.11) on Spigot 1.20.4:

  • ModelEngine hides the real mob with packets. It adds no invisibility effect, so Invisible Potion does not affect models.
  • ModelEngine resizes the real mob's server-side hitbox to fit the model (checked with volume selectors). The Bukkit hitbox API sees the model's size.
  • Hits on the model's hitbox entity reach the real mob. 3.7.0 already showed health on hit.

ModelEngine R4 has no free version, so it was not tested.

Tests

  • New MODE=modelengine e2e check. It runs in integrations.sh when a ModelEngine-*.jar is in compat/.cache/plugins. 3.7.0 fails the two checks that look up at the body. 3.7.1 passes all 5.
  • Spigot matrix, 27 versions from 1.8 to 26.3: pass.
  • Paper 1.8.8, 1.20.6, 1.21.11, 26.3, WorldGuard 6.1, 6.2.2, 7.0.15, 7.0.19, PlaceholderAPI on 1.8.8 and 26.3: pass.
  • Linkage check, 68 spigot-api versions: pass.

Closes #44.

🤖 Generated with Claude Code

On 1.13.2+, Show On Look now ray traces the entity's hitbox. Large
mobs and ModelEngine models show their health when the player looks
at their body, not only near their feet. ModelEngine resizes the real
mob's hitbox to fit the model, so no ModelEngine code is needed.

Targets are sorted nearest first. getTarget now returns at a distance
of 0, because BlockIterator treats 0 as no limit and could freeze the
server when a player stood at an entity's position.

Add a ModelEngine e2e check (integrations.sh, needs a local
ModelEngine jar) and rewrite the README. Version 3.7.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zeshan321
zeshan321 merged commit 93c94ef into master Oct 3, 2026
2 checks passed
@zeshan321
zeshan321 deleted the feat/model-look branch October 3, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Compatibility with ModelEngline + MysticMobs mobs

1 participant