chunky-dev / chunky-dev/chunky
World format api
- Dominant language
- Java
- Stars
- 738
- Forks
- 78
- Avg merge
- 10h 5m
- Merged PRs (30d)
- 3
Description
Extract the current `World`, `MCRegion` `Chunk`, and `CubicWorld`, `ImposterCubicRegion`, and `ImposterCubicChunk` into a generic api to allow for plugins to register their own world formats
The following is my first thoughts on how to implement this, and I'm open to discussion if anyone has input
I think one clean ish way to go about this is have some `World` object, containing several `Dimension` objects to allow for a single world to contain multiple world formats (as is possible in CubicChunks, but unsupported by chunky currently).
- the `World` object would contain only information about the world as a whole, no region files.
- the `Dimension` object would contain similar information to what is in the existing World class, would implement loading chunks, map tiles, etc.
Both of these could be implemented by plugins; `Dimension` for a simple additional world format (such as CubicChunks), and `World` for implementations which change how dimensions are stored (such as all dimensions contained within one db, though I don't know of an existing example)
Due to vanilla mc not providing any system for different world types: for the standard `World` impl I think the only approach is for each dimension directory, allow each registered world format to decide if the directory is valid for that format. This may produce situations where multiple formats say it's valid, and there would need to be some gui to force load as a specific format
Contributor guide
Research direction
Start by reviewing the existing World, MCRegion Chunk, CubicWorld, ImposterCubicRegion, and ImposterCubicChunk implementations. Map which responsibilities belong to a world versus a dimension, then examine how plugins could register formats and validate dimension directories. Done would include a generic API supporting custom world formats and the format-selection ambiguity described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100