Skip to content

fix: keep plot biome writes inside the world height - #4948

Open
minoneer wants to merge 1 commit into
IntellectualSites:mainfrom
minoneer:fix/biome-y-range
Open

minoneer wants to merge 1 commit into
IntellectualSites:mainfrom
minoneer:fix/biome-y-range

Conversation

@minoneer

Copy link
Copy Markdown

Overview

Fixes #4937

Description

/plot setbiome and plot clears wrote biomes at y = 320, one block above a -64..319 world. WorldEdit's 26.x adapter no longer clamps that which made the issue visible by throwing an ArrayIndexOutOfBoundsException.

  • Plot#getRegions: the unmerged plot branch used the exclusive getMaxBuildHeight() as the inclusive region top. The merged plot branch already subtracts 1 (fix: account for exclusivity of max build height where requires #3935).
  • BukkitQueueCoordinator#enqueue: biome layers were read back without getMinSection(), unlike blocks, so queued biomes landed 64 blocks too high. Clears never reset biomes below y 0, and the top layers were written outside the world.

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.

/plot setbiome and plot clears wrote biomes at y = 320, one block above a -64..319 world. WorldEdit's 26.x adapter no longer clamps that which made the issue visible by throwing an ArrayIndexOutOfBoundsException.

- Plot#getRegions: the unmerged plot branch used the exclusive getMaxBuildHeight() as the inclusive region top. The merged plot branch already subtracts 1 (IntellectualSites#3935).
- BukkitQueueCoordinator#enqueue: biome layers were read back without getMinSection(), unlike blocks, so queued biomes landed 64 blocks too high. Clears never reset biomes below y 0, and the top layers were written outside the world.

Fixes IntellectualSites#4937
@minoneer
minoneer requested a review from a team as a code owner October 12, 2026 11:02
@NotMyFault
NotMyFault requested a balanced review from Copilot October 12, 2026 17:13

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.

🟢 Approval recommended

Both changes correctly restore documented height and section-offset semantics.

0 open findings

What changed in this PR

Fixes out-of-range biome writes in extended-height worlds.

Changes:

  • Uses an inclusive maximum Y for unmerged plot regions.
  • Restores the minimum-section offset when dequeuing biome writes.
File Description
Core/​.../​Plot.java Corrects the plot region’s upper Y bound.
Bukkit/​.../​BukkitQueueCoordinator.java Correctly reconstructs biome Y coordinates.

🧠 Review effort: Balanced


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

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.

Biome writes at y = world max (320) → ArrayIndexOutOfBoundsException on Paper 26.2 in /plot setbiome and plot clear

2 participants