You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: