Skip to content

Use squared distance checks - #195

Open
Smorki wants to merge 1 commit into
GaleMC:mainfrom
Smorki:use-squared-distance-checks
Open

Use squared distance checks#195
Smorki wants to merge 1 commit into
GaleMC:mainfrom
Smorki:use-squared-distance-checks

Conversation

@Smorki

@Smorki Smorki commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

A few places were using distanceTo(...) only for simple threshold comparisons.

This switches those checks to distanceToSqr(...) with squared thresholds, which avoids the unnecessary square root while preserving the existing logic.

Affected areas:

  • bee pollination hover checks
  • FollowPlayerRiddenEntityGoal distance checks
  • minecart near-zero movement check

No functional changes intended.

@Smorki
Smorki force-pushed the use-squared-distance-checks branch from cd45948 to 55e7075 Compare August 10, 2026 19:16
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.

1 participant