Experimental Data-Driven Biome Classifier Rewrite#178
Draft
JonaldJohnston wants to merge 5 commits into
Draft
Conversation
…e switcher yet, also needs some debug as it seems to really like forest_sparse.
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.
When I initially found this project, I had the thought of what it would take to add a ton of biomes from different biome mods, such as Oh The Biomes We've Gone. Turns out, working dozens of biomes into the existing
iftree is not fun at all. I then began to think about what a better approach might be, and that's what this PR aims to address.How this works, currently, is each biome that you want to add gets a call to
addBiome, which looks likeThere's more examples starting at line 168 in BiomeClassifier.
Each array in the parameters describe the conditions at which the biome can appear, multiple conditions present in a single array are treated as an OR condition, for example,
{temperature.TEMPERATE, temperature.WARM}would signal that this biome appears in temperate or warm regions. Passing innullis treated as a "dont care".in the background,
addBiomelooks at every possible combination of the given conditions and adds them to a hashmap (builderin the args), with the condition flags used as the key.classifythen calculates the flags at whatever position it's processing and looks up the corresponding biome(s) in the hashmap. If multiple biomes correspond to a particular condition, cell/voronoi noise is used to randomize the output into discrete regions.Ultimately, my goal is to have this input as a config file that the user can toy around with easily.
Current considerations: