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

[Feature Request] Biome handling improvement #685

Open
gentlegiantJGC opened this issue May 17, 2022 · 0 comments
Open

[Feature Request] Biome handling improvement #685

gentlegiantJGC opened this issue May 17, 2022 · 0 comments
Labels

Comments

@gentlegiantJGC
Copy link
Member

Feature Request

The Problem

The current biome management code is a bit janky due to the nature of how biome storage has evolved.
Originally biomes were stored as one biome per vertical column giving a 16x16 array per chunk.
Java switched to a 4x4x4 array per sub-chunk allowing for variation in height
Bedrock switched to a 16x16x16 array per subchunk giving each block its own biome.
Bedrock also supports storing a single biome per sub-chunk if all the biomes are the same.

We somehow need a system that can store all of these systems.

Current implementation

The current behaviour is to have one format active at any given time and the code requests the data in a specific format for editing.
The issue with this is it can lead to data loss if it is requested in a lower resolution format.

A previous implementation I was working on would store the data in the highest resolution and convert getitem and setitem calls to the correct format but this had a lot of ambiguity.

Solution

I think the simplest solution is probably the best solution. Store the data in the format native to the world (this would require the chunk to be aware of the world it is associated with but for other reasons documented in Amulet-Team/Amulet-Core#255 this is probably a good idea) and have code modify it in that format.

We could potentially expose this data in other sizes but closer to the original format would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant