Skip to content

Feat/position extension - #429

Merged
twisti-dev merged 4 commits into
version/26.2from
feat/position-extension
Sep 20, 2026
Merged

twisti-dev merged 4 commits into
version/26.2from
feat/position-extension

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

No description provided.

…tions

- implement distanceSquared, distance, horizontalDistance, verticalDistance, and related methods
- provide functionality for both Position and BlockPosition types
- enhance position comparison capabilities with isWithinDistance and isSameBlock methods
Copilot AI lite review requested due to automatic review settings September 20, 2026 09:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T09:49:27.007121Z 8c0770d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new isWithinCube/isWithinSquare implementations contain confirmed Long/Int type mismatches that should fail compilation (and must be corrected before merging).

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Adds a new set of Kotlin extension utilities for Paper’s io.papermc.paper.math.Position / BlockPosition types, expanding the Paper-facing API surface with common distance/containment helpers and packed-coordinate conversions. This fits the codebase’s general pattern of providing convenience APIs via Kotlin extensions in platform modules.

Changes:

  • Introduces Position/BlockPosition helper extensions for distance calculations, comparisons, bounds checks, and string formatting.
  • Adds pack/unpack helpers for BlockPosition ↔ packed Long representation.
  • Bumps project version to 3.44.0 and updates the Paper API dump accordingly.
File Description
surf-api-paper/​surf-api-paper/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​util/​position-util.kt New position/block-position extension utilities and packed-coordinate helpers.
surf-api-paper/​surf-api-paper/​api/​surf-api-paper.api API dump updated to include the newly exported extensions.
gradle.properties Version bump to 3.44.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

- implement horizontalDistanceSquared function to calculate squared distance
- only X and Z coordinates are considered for the calculation
@twisti-dev
twisti-dev merged commit 38886bc into version/26.2 Sep 20, 2026
4 of 7 checks passed
@twisti-dev
twisti-dev deleted the feat/position-extension branch September 20, 2026 09:53
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.

2 participants