Skip to content

fix: Operations in chunks containing Worldguard regions error - #3700

Open
mAxYoLo01 wants to merge 1 commit into
IntellectualSites:mainfrom
mAxYoLo01:fix/worldguard-region
Open

mAxYoLo01 wants to merge 1 commit into
IntellectualSites:mainfrom
mAxYoLo01:fix/worldguard-region

Conversation

@mAxYoLo01

Copy link
Copy Markdown

Overview

Fixes #3699

Description

processGet no 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.

image Compared to image in issue, it can be seen that setting glass now checks at a block-level and correctly excludes only the Worldguard region.

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@mAxYoLo01
mAxYoLo01 requested a review from a team as a code owner October 14, 2026 21:54
@MattBDev
MattBDev requested a balanced review from Copilot November 7, 2026 01:01

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.

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#processGet to avoid rejecting entire chunks solely due to disallowed-region chunk overlap; rely on block-level filtering instead.
  • Fix blacklist processing in Region to evaluate contains(...) using correct world-space block coordinates (including chunk/section offsets), not local 0..15 coordinates.
  • Minor: align Region.java import 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

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.

Operation in a chunk that contains a Polygonal Worldguard region erroring

2 participants