* Change generation to be asynchronous
At this stage it will most likely crash the server at a certain point.
Pausing and resuming isn't stable. Saving the progress isn't stable as well.
Chunks are being unloaded in the main thread by an unloader class.
* Switch to native threads
- Use thread instead of async tasks
- Store pending paper chunks in the database
- Interrupt the thread when it should be stopped
* Fix insertion of pending chunks
Fix an error that is thrown when the sql for inserting pending chunks doesn't have any chunks to insert.
* Add task states
Add states to differentiate between generating and validating tasks
as well as a field in the database to store this information.
A task will first generate a world until the required radius or the
worldborder is reached. Then it validates that each chunk has been generated.
* Add object representation of world_properties table
* Add DAO for pending_chunks table
* Add DAO for generation_tasks table
* Add state updating to periodic save
* Fix loading of world properties
* Add states to tasks and fix completion handling
* Fix progress report and spiral shape
* Modify the paper generation task so it works with spigot
This change is being made because normal chunk generation doesn't allow
chunks to be requested from a different thread. With PaperLib this issue
can be solved.
* Add workarounds for spigot problems
* Fix some blocking issues and update README
* Add locking to ChunkUnloader class
By integrating with dynmap the plugin can show the area of the generation task for each world via an area marker and
triggers the rendering of tiles for generated chunks.
- added config parameter to define the number of chunks that should be generated per step
- probably fixed#3 by processing or canceling pending chunks before the world is saved
- Added interface GenerationTask
- added method to GenerationManager that creates a task depending on the server type
- added generation task for paper and spigot (to profit from async chunk loading)