MC's processUseEntity uses player.getDistanceSqToEntity(dome) for reach
validation, which computes center-to-center distance. For domes with
radius > 5, this always exceeds the 36-block threshold, making melee
impossible regardless of how close the player is to the surface.
Fix: server-side processMeleeHits() in onUpdate detects swinging players
near the dome surface via ray-sphere intersection, then calls
attackTargetEntityWithCurrentItem directly — bypassing MC's broken reach
check while preserving full damage calculation (enchantments, crits, etc).
Also adds adjustMeleeBoundingBox for client-side entity picking (places a
small 2x2x2 BB at the nearest sphere surface point toward the player),
and allows melee targeting from both inside and outside the dome.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite solid system to use reactive crossing detection (prevPos comparison)
instead of prediction-based teleportation that caused client rubber-banding
- Reduce knockback force (0.06 multiplier) so it pushes without fully blocking
- Add client-side solid prediction for smooth movement blocking (local player only)
- Fix dome melee from inside: canBeCollidedWith returns false when player is inside
- Fix dome melee from outside: getCollisionBorderSize set to 0 to prevent raycast
from returning far exit point beyond reach distance
- Clean up dome bounding box: use setPosition/updateBoundingBox instead of custom setSize
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>