Skip to content

Release 1.23.0#114

Merged
tastybento merged 6 commits into
masterfrom
develop
Jul 7, 2026
Merged

Release 1.23.0#114
tastybento merged 6 commits into
masterfrom
develop

Conversation

@tastybento

Copy link
Copy Markdown
Member

No description provided.

tastybento and others added 4 commits July 6, 2026 13:07
The overworld delegates to vanilla generation, which can produce structures
such as Ancient Cities, Trial Chambers and Strongholds. Large ones can fill or
unbalance a cave world (issue #112). The ChunkGenerator flag is all-or-nothing,
so this adds per-structure control:

- Settings: new world.structures map (Map<String, Boolean>) of structure key to
  whether it may generate. Structures not listed generate normally. Defaults
  disable ancient_city, trial_chambers and mansion; mineshaft and stronghold
  stay on.
- StructureGenerationListener: cancels AsyncStructureSpawnEvent for any disabled
  structure in the CaveBlock overworld. Key matching tolerates hyphens/case.
- config.yml: documents the new section.
- pom.xml: bump build.version to 1.23.0.

Adds StructureGenerationListenerTest. All 67 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KxBgEZz7yHf4eLVzJTw1V5
…tures

Configurable structure toggles for overworld cave generation (#112)
The overworld delegates to vanilla generation, whose 1.18+ noise caves can
make a cave world "nothing but passageways" (issue #111). Vanilla exposes no
density knob for noise caves, so add a post-generation fill pass plus a coarse
carver toggle:

- Settings: new world.overworld-cave-fill (0.0-1.0, default 0.0) and
  world.overworld-carvers (boolean, default true). getOverworldCaveFill()
  clamps to [0,1].
- NoiseCaveGenerator: new fillField() - a low-frequency, seed-deterministic
  [0,1] field so caves close in broad connected patches, not a random speckle.
- ChunkGeneratorWorld: after capColumn seals the sky, fillCaves() re-solidifies
  AIR and CAVE_AIR below the cap where the field falls under the ratio. Both air
  types matter: noise caves are placed as AIR, carvers as CAVE_AIR - matching
  only CAVE_AIR (the first attempt) missed the noise caves entirely. The carver
  toggle gates shouldGenerateCaves(). Underground biomes, ores, decorations and
  structures are preserved at any fill value.
- config.yml: documents both keys.

Adds fill-field and generateSurface fill tests. All 74 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KwMG7jJxLPXGqNfb95nP1W
…tures

Add overworld cave-density controls (issue #111)

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.

Pull request overview

Release 1.23.0 introduces new overworld worldgen controls for CaveBlock: per-structure allow/deny configuration, optional cave “re-solidification” to thin dense vanilla cave networks, and a toggle to disable vanilla overworld carver caves.

Changes:

  • Add world.structures config and an async listener that cancels configured vanilla structure spawns in the CaveBlock overworld.
  • Add world.overworld-cave-fill (noise-based thinning of vanilla caves) and world.overworld-carvers (disable vanilla carver caves) and wire both into the chunk generator.
  • Add/extend unit tests covering structure cancellation behavior and overworld cave-fill behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/java/world/bentobox/caveblock/listeners/StructureGenerationListenerTest.java New tests for per-structure cancellation behavior.
src/test/java/world/bentobox/caveblock/generators/NoiseCaveGeneratorTest.java Adds tests for the new fill-field helper and determinism.
src/test/java/world/bentobox/caveblock/generators/ChunkGeneratorWorldTest.java Adds tests for overworld cave-fill behavior and carver toggle.
src/main/resources/config.yml Documents and adds new structures, overworld-cave-fill, and overworld-carvers settings.
src/main/java/world/bentobox/caveblock/Settings.java Adds settings fields/getters/setters and defaults for structures + overworld cave controls.
src/main/java/world/bentobox/caveblock/listeners/StructureGenerationListener.java New async listener implementing per-structure generation control.
src/main/java/world/bentobox/caveblock/generators/NoiseCaveGenerator.java Adds fillField() noise helper for cave thinning.
src/main/java/world/bentobox/caveblock/generators/ChunkGeneratorWorld.java Implements overworld cave thinning and carver disable toggle.
src/main/java/world/bentobox/caveblock/CaveBlock.java Registers the new structure-generation listener.
pom.xml Bumps build version to 1.23.0.

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

Comment thread src/main/java/world/bentobox/caveblock/listeners/StructureGenerationListener.java Outdated
tastybento and others added 2 commits July 6, 2026 19:30
- StructureGenerationListener: correct class Javadoc to describe the
  async safety accurately (reads world environment/ownership but does no
  world or block mutation) instead of claiming no Bukkit world access.
- StructureGenerationListener.isDisabled: normalize the incoming
  structureKey too, so hyphen/underscore/casing differences match on
  both sides as the comment promises.
- NoiseCaveGeneratorTest: fix the test Javadoc to match the actual
  fill semantics (fillField clamped to [0,1], block fills when
  fillField < ratio, so ratio 1.0 fills nearly all, not all).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KwMG7jJxLPXGqNfb95nP1W
The Surefire plugin hardcoded its own <argLine> (the --add-opens
directives), which overwrote the argLine property that JaCoCo's
prepare-agent goal sets. The JaCoCo java agent was therefore never
attached to the test JVM, no jacoco.exec was produced, and SonarCloud
reported 0% coverage.

Prepend Surefire's late-evaluated @{argLine} token so JaCoCo's
-javaagent flag is included alongside the --add-opens directives,
matching the convention used in sibling addons (e.g. OneBlock).
jacoco.exec is now generated and coverage is reported.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KwMG7jJxLPXGqNfb95nP1W
@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@tastybento tastybento merged commit f1c8ed6 into master Jul 7, 2026
5 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.

2 participants