Repository navigation
Conversation
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🔵 Needs a closer look
This change impacts region allow/deny enforcement and world-vs-chunk coordinate handling, but lacks automated integration coverage, so it should be deferred until in-game validation with WorldGuard polygon regions (including negative coordinates and Y-range edge cases) is completed.
No open issues 🎉
What changed in this PR
This pull request fixes FAWE operations failing when a chunk overlaps a disallowed (e.g., WorldGuard polygon) region by removing an overly coarse chunk-level rejection and ensuring blacklist containment checks are performed in world coordinates so only blocks actually inside protected polygons are excluded.
Changes:
- Adjust
MultiRegionExtent#processGetto avoid rejecting entire chunks solely due to disallowed-region chunk overlap; rely on block-level filtering instead. - Fix blacklist processing in
Regionto evaluatecontains(...)using correct world-space block coordinates (including chunk/section offsets), not local 0..15 coordinates. - Minor: align
Region.javaimport ordering with existing package conventions.
This pull request is ready to be approved.
| File | Summary |
|---|---|
worldedit-core/src/main/java/com/sk89q/worldedit/regions/Region.java |
Corrects blacklist per-block containment checks to use world coordinates; minor import-ordering consistency nit noted. |
worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/MultiRegionExtent.java |
Removes coarse disallowed-region chunk-overlap short-circuit so edits outside protected polygons within the same chunk can proceed. |
Review effort: Balanced
Overview
Fixes #3699
Description
processGetno longer rejects a whole chunk just because it overlaps a disallowed region. That overlap is only a coarse chunk-boundary check; rejecting it prevented edits in the same chunk but outside the polygon. The allowed-region check remains.In Region.java, blacklist processing now checks each block at its world coordinates, including the chunk and section offsets. Previously it compared local coordinates (0..15) to regions defined in world coordinates, so polygon boundaries could be applied incorrectly.
Submitter Checklist
@since TODO.