Skip to content

Fix DecimalFormat locale, add BiomeUpdateTask cancellation, fix WebManager compile error#165

Merged
tastybento merged 2 commits intodevelopfrom
copilot/sub-pr-164
Apr 27, 2026
Merged

Fix DecimalFormat locale, add BiomeUpdateTask cancellation, fix WebManager compile error#165
tastybento merged 2 commits intodevelopfrom
copilot/sub-pr-164

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

Three unresolved review issues from the PR thread: locale-sensitive decimal formatting, cancellation not actually stopping in-progress biome updates, and a compilation error from an inapplicable IllegalAccessException catch.

Changes

  • Utils.java — Pin DecimalFormat to Locale.ROOT via DecimalFormatSymbols.getInstance(Locale.ROOT). Without this, servers with e.g. a German JVM locale would format 0.5 as 0,5.

    ThreadLocal.withInitial(() -> new DecimalFormat("0.###", DecimalFormatSymbols.getInstance(Locale.ROOT)));
  • BiomeUpdateTask.java — Add AtomicBoolean cancelled + cancel(). Both processBiomeChange (between chunks) and runBiomeChange (before block iteration) check the flag and abort with Result.FAILED. Previously, calling cancelBiomeUpdates completed the future but left the task actively mutating biomes.

  • UpdateQueue.javacancelBiomeUpdates now calls task.cancel() on each matched task before completing its future, making cancellation effective for in-progress tasks.

  • WebManager.java — Revert the catch (IllegalAccessException e) block added in a previous commit. The BentoBox GitHub API methods don't declare that checked exception, causing a compilation failure.

…roneous IllegalAccessException catch

Agent-Logs-Url: https://github.com/BentoBoxWorld/Biomes/sessions/4da75578-b144-444b-ae12-5baf3478b0d1

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Update for new release Fix DecimalFormat locale, add BiomeUpdateTask cancellation, fix WebManager compile error Apr 26, 2026
Copilot AI requested a review from tastybento April 26, 2026 22:48
@tastybento tastybento marked this pull request as ready for review April 27, 2026 00:05
@tastybento tastybento merged commit 2fe5a66 into develop Apr 27, 2026
@tastybento tastybento deleted the copilot/sub-pr-164 branch April 27, 2026 00:17
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