Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worldgen API v0 #66

Merged
merged 34 commits into from
Oct 13, 2023
Merged

Conversation

paulevsGitch
Copy link
Contributor

This is a prototype of worldgen API.

Implemented features:

  • Controllable biome distribution in Overworld and the Nether
  • Customizable colors for grass and leaves in biomes

Planned features:

  • Biome fog color
  • Surface builders
  • (Potentially) Terrain generator changes in biomes
  • (Potentially) Feature scatters in biomes
  • (Potentially) Biome builder

How biome distribution works:
Original in-game biomes uses temperature and wetness (humidity) for distribution, which makes adding custom biomes problematic. To solve that issue world was divided into Biome Regions, each region will generate only specific biomes. By default there is only one region in both Nether and End, you can add biomes directly into them or add a separate regions for modded biomes (which can have temperature/wetness distribution and will not break vanilla generation)

Example of vanilla biomes:

Vanilla biomes with two custom biomes (edge + central):

Several mod regions:

Several biomes added into Nether region

Biome colors (grass and leaves, separately) are done with BiomeColorProviders, you can use single color for biome foliage or define a custom function:

@paulevsGitch
Copy link
Contributor Author

There is an example of how it works in test mod: TestWorldgenListener

@paulevsGitch
Copy link
Contributor Author

Preview of surface rules, here is an example of slope surface rule, depth surface rule and filler

2023-09-29_00 37 12

station-worldgen-api-v0/src/main/resources/fabric.mod.json Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Tabs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original file have spaces, and Idea just keep file in the same format

@mineLdiver mineLdiver self-assigned this Oct 4, 2023
Copy link
Member

@mineLdiver mineLdiver left a comment

Choose a reason for hiding this comment

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

After these are resolved, if this pull request is feature-complete, I think I'll merge.

Copy link
Member

@mineLdiver mineLdiver left a comment

Choose a reason for hiding this comment

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

Some mistakes.

Also, this doesn't require any additional multiplayer code, right? Because everything is based on the world's seed. Or does it need extra work for multiplayer?

@paulevsGitch
Copy link
Contributor Author

Also, this doesn't require any additional multiplayer code, right? Because everything is based on the world's seed.

Yes, all computations are based on world seed and biomes are registered on both client and server

Copy link
Member

@mineLdiver mineLdiver left a comment

Choose a reason for hiding this comment

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

If these features are final, let's get this merged

@mineLdiver mineLdiver merged commit b4e08b5 into ModificationStation:master Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants