Commit Graph

8 Commits (6df01dd13727841ef782dbcfe1aa92efb4663ddd)

Author SHA1 Message Date
trivernis 6df01dd137 Add progress report to tasks generating to the worldborder
- Closes #90
4 years ago
trivernis aaa614f651 Cleanup 4 years ago
Trivernis af875aaca0
Fix shape beign stuck (#83) 4 years ago
Trivernis acf302e8c1
Feature/async chunkmaster (#81)
* 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
4 years ago
trivernis 928dfbf264 Fix #61 incorrect progress percentage 4 years ago
trivernis 03eaf52dc3 Add more comments 4 years ago
trivernis 572369192a Add circlular generation tasks 4 years ago
trivernis 2eeff350f8 Add circular shape class 4 years ago