Unlock all osm.json5 configuration features - #51
Merged
Conversation
SmylerMC
force-pushed
the
feat/unlock-osm-json5
branch
2 times, most recently
from
November 15, 2025 17:02
d072214 to
761d608
Compare
SmylerMC
marked this pull request as ready for review
November 15, 2025 17:28
There was a problem hiding this comment.
Pull request overview
This PR extends Terra-- block state support in osm.json5 to preserve block properties during generation, and makes the Terra+- material replacement behavior optional by allowing config values to be omitted or set to null.
- Introduces
BlockMapperclass to handle material replacements from configuration while preserving block state properties from Terra-- - Refactors
RealWorldGeneratorto useBlockDatainstead ofMaterialfor better property support - Removes deprecated helper method and cleans up unused code
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/java/de/btegermany/terraplusminus/gen/BlockMapper.java | New class implementing a builder pattern to map Terra-- block states to Bukkit block data with optional material replacements from config |
| src/main/java/de/btegermany/terraplusminus/gen/RealWorldGenerator.java | Refactored to use BlockMapper and BlockData for preserving block state properties; added @OverRide annotations and cleaned up unused methods |
| src/main/java/de/btegermany/terraplusminus/utils/ConfigurationHelper.java | Removed getMaterial helper method that is no longer needed with the new BlockMapper approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as resolved.
This comment was marked as resolved.
SmylerMC
force-pushed
the
feat/unlock-osm-json5
branch
2 times, most recently
from
January 3, 2026 15:01
7479de8 to
adca0bc
Compare
Contributor
Author
Zoriot
requested changes
Jan 16, 2026
Did not work, and if they did, they would have caused issues due to confusions between surface and ground. Also cleanups RealWorldGenerator.
This commit removes the 'building_outlines_material', 'road_material' and 'path_material' options from the default configuration and warns server administrators that use them. That means any new installation of the plugin will now fully use osm.json5 and therefore have the same generation as Terra++ (bricks, gray concrete and grass paths for building outlines, roads, and paths respectively). Any older installation with an existing config file containing the deprecated options will keep generating the same and log warnings on server startups encouraging server admins to make modifications to osm.json5. If the config options still use the old default value, generation will use bricks, gray concrete powder and moss blocks. The surface_material config option is left untouched as it does not conflict with osm.json5, despite having its own problems.
SmylerMC
force-pushed
the
feat/unlock-osm-json5
branch
from
January 17, 2026 13:01
adca0bc to
197a98d
Compare
Zoriot
approved these changes
Jan 17, 2026
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.
Support block state properties in
osm.json5The world generator previously only kept the materials from the block states generated by Terra--, when it supports properties as well. This made it impossible, for example, to generate waterlogged stairs or persistent leaves.
This is now fixed and properties specified in
osm.json5are now kept for generation.This feature is not extended to the plugin's
config.ymlto encourage usage ofosm.json5for advanced use cases.Make Terra+- material replacement from Terra-- generation optional
Terra+- has the following configuration options :
surface_materialbuilding_outlines_materialroad_materialpath_materialThese options are used to replace blocks generated by Terra-- with what is configured in
config.yml, assuming the defaultosm.json5has not been modified. This means there are effectively two ways to configure the same thing, both of which can break the other.This PR deprecates the previously mentioned configuration options, removing them from the default
config.ymland logging warning on server start when they are being used.This switches the default generation for new Terra+- installation to the same style as Terra++, leaving existing installation untouched until the warning is addressed by the server operator.
Other changes
Light cleanup in
RealWorldGenerator.