Skip to content

Release 1.22.0#169

Merged
tastybento merged 19 commits into
masterfrom
develop
Apr 15, 2026
Merged

Release 1.22.0#169
tastybento merged 19 commits into
masterfrom
develop

Conversation

@tastybento
Copy link
Copy Markdown
Member

No description provided.

tastybento and others added 19 commits April 13, 2026 21:23
JUnit 5 does not require public visibility on test, setup, or teardown
methods. Removes public from all void method declarations across 12 test
classes to address SonarCloud warnings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces bare method calls with assertDoesNotThrow() to make the
"should not throw" intent explicit and satisfy SonarCloud's
"add at least one assertion" rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Splits the single large method into makeBedrockLayers(), makeNetherrackLayers(),
makeGlowstoneLayer(), and placeGlowstoneBlob() to satisfy SonarCloud's
cognitive complexity limit. Also fixes a copy-paste bug in glowstone blob
case 3 where z - xx was used instead of z - zz.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extracts isAcidSusceptible() and addToBurnList() from findEntities() to
reduce cognitive complexity and improve readability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AcidEffect: extracts isExemptFromAcid(), handleRainExposure(), and
startAcidBurn() from onPlayerMove() to flatten nesting and separate concerns.

AcidIsland: extracts getWorldName() and configureSpawnRates() from getWorld()
to bring each method within SonarCloud's cognitive complexity limit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ItemFillWithAcidEvent, PlayerDrinkAcidEvent: add since+forRemoval.
AISettings.getDefaultIslandFlags/Settings: add missing @deprecated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…785)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace containsKey+put with putIfAbsent for the wet-players guard.
Replace Math.max(0,Math.min(100,...)) with Math.clamp in both damage
percent calculations (rain and acid).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…S6201, S1130)

AcidTask.applyDamage: replace instanceof+cast with pattern variables.
AISettingsTest.setUp: remove 'throws Exception' that can never be thrown.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ChunkGeneratorWorldTest: remove unused Mockito class import.
LavaCheckTest: remove eq() wrappers on concrete verify arguments and
the now-unused eq import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
player.getLocation() is @nullable per Sonar's analysis; store in a local
variable and guard before passing to the @NotNull playSound parameter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents JUnit 5 style rules (no public modifier, assertDoesNotThrow,
assertEquals, @disabled reason, no eq() on concrete values), Java 21
idioms flagged by Sonar (pattern instanceof, Math.clamp, putIfAbsent,
@deprecated with since/forRemoval), and the SonarCloud API query for
fetching open issues without a browser.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Acid water: glass bottles filled from ocean/acid cauldron become Potion
  of Poison (red lore); water buckets filled in the acid world get acid tag
- Purified water: obtained via dripstone cauldron, furnace smelting, or
  brewing with coal — becomes Potion of Healing (green lore)
- Cauldron purity tracked in-memory and persisted to cauldrons.yml across
  restarts; dripstone vs rain distinguished by block scan above cauldron
- Furnace recipe uses ExactChoice to prevent non-water potions cooking
- Ocean bottle fill uses post-hoc next-tick replacement (Paper fires the
  interact event as RIGHT_CLICK_AIR pre-cancelled for fluid blocks)
- BentoBox upgraded to 3.14.0-SNAPSHOT; lore via MiniMessage/locale system

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Purified bottles revert to PotionType.WATER so they work as brewing
  stand base ingredients; add PlayerItemConsumeEvent handler to apply
  configurable health boost (getPurifiedWaterHeal()) on drink
- onBucketFill now checks cauldron purity: purified cauldron yields a
  purified bucket, acid cauldron/ocean yields an acid bucket
- Add acid bucket lore (makeAcidBucket) for ocean bucket fills
- 7 new tests covering drink-heal, max-health cap, cancellable event,
  and cauldron-purity bucket routing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@tastybento tastybento linked an issue Apr 15, 2026 that may be closed by this pull request
2 tasks
@tastybento tastybento requested a review from Copilot April 15, 2026 05:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tastybento tastybento merged commit c06de7f into master Apr 15, 2026
9 checks passed
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.

Add purified water

2 participants