Release 1.23.0#114
Merged
Merged
Conversation
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)
Contributor
There was a problem hiding this comment.
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.structuresconfig 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) andworld.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.
- 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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.