Commit Graph

71 Commits (6df01dd13727841ef782dbcfe1aa92efb4663ddd)

Author SHA1 Message Date
trivernis 6df01dd137 Add progress report to tasks generating to the worldborder
- Closes #90
4 years ago
trivernis 3cfc49baa8 Fix player count togglable pausing
- Fixes #89
4 years ago
trivernis 9b618eccc2 Fix dynmap version being null when dynmap doesn't support the minecraft versio
- Fixes #69
4 years ago
trivernis 65e3e090bb Fix insertion of pending chunks using too many parameters
- Fixes #91
4 years ago
trivernis f0ea063026 Fix setCenter command throwing an error when only one argument is provided
- Fixes #94
4 years ago
trivernis 733996e6a9 Remove empty body of PausedTaskEntry 4 years ago
trivernis 3417ffe339 Merge branch 'master' into develop 4 years ago
Trivernis 441b13ec69
Fix/merge conflict (#87)
* Version 1.3.0 (#85)

* 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

* Add total chunk count to list command (closes #79) (#82)

* Fix shape beign stuck (#83)

* Add autostart config parameter (closes #78) (#84)

* Add circleci badge to readme

* Add codefactor badge

* Update Translation to 1.3.0 (#86)

* Update Translation to 1.3.0

* Tweak SQL_ERROR word order

Co-authored-by: NPBeta <shanhang007@gmail.com>
4 years ago
trivernis aaa614f651 Cleanup 4 years ago
Trivernis 4d4107aaf3
Version 1.3.0 (#85)
* 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

* Add total chunk count to list command (closes #79) (#82)

* Fix shape beign stuck (#83)

* Add autostart config parameter (closes #78) (#84)

* Add circleci badge to readme

* Add codefactor badge
4 years ago
Trivernis ac6a80ed86
Add autostart config parameter (closes #78) (#84) 4 years ago
Trivernis af875aaca0
Fix shape beign stuck (#83) 4 years ago
Trivernis 1f167285b0
Add total chunk count to list command (closes #79) (#82) 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 94f70c39b0 Fix #66, #70 Task progress being discarded on resume 4 years ago
trivernis 3dec787d0e Fix commands for worlds with numeral names 4 years ago
trivernis 615280a2ed Add stats command to print chunkmaster stats
- Server information
- Worlds chunk information
4 years ago
trivernis 928dfbf264 Fix #61 incorrect progress percentage 4 years ago
trivernis 3f28c89f8d Make chunk coordinates for setCenter optional
- use the player location if no coordinates have been provided (closes #41)
4 years ago
trivernis 0bc38384b4 Change pause on join to have a configurable player count
Closes #31
4 years ago
trivernis 29d0f8991e Add option to pass the world name for cancel
- Add the option to pass the world name to chm cancel to cancel
generation tasks
- Fix #46 by adding additional error handling
4 years ago
trivernis 03eaf52dc3 Add more comments 4 years ago
trivernis c090977021 Revert optimizations on spigot
Revert the optimizations which check if the chunk is already generated because
the function doesn't report the right value.
https://hub.spigotmc.org/jira/browse/SPIGOT-5541?attachmentOrder=desc
4 years ago
trivernis be130adc6f Improve spigot chunk generation
Add skipping of already generated chunks.
An issue remaining is that some chunks are still
not generated and the shape doesn't always match.
4 years ago
trivernis 2b121b67fd Fix generation stopping one chunk too early 4 years ago
trivernis 0347730580 Improve performance of periodical chunk progress saving task 4 years ago
trivernis 572369192a Add circlular generation tasks 4 years ago
trivernis 2eeff350f8 Add circular shape class 4 years ago
trivernis 53aec18a06 Change group for Chunkmaster dynmap markers
- Change the group to "Chunkmaster" to be able to disable all of those markers.
- Add a marker that displays the last chunk that has been generated and refreshes
every 30 seconds.
4 years ago
trivernis d967dfd06d Change sqlite-jdbc to be a compileOnly dependency 4 years ago
trivernis 8953b63c2b Add integration for dynmap
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.
4 years ago
Trivernis 832b1c4b55 Add command to set and get the center
- Add getCenter command to get the center of the world used for generation
- Add setCenter to set the world center for generation tasks. If there is already a task running for the world the center for that task will not be  affected.
- Fix SQL problem with multiple queries at the same time creating new connections
- Add translations for new commands
- Add Examples to Readme
- Add new table to safe world centers
- Add query to Generation manager to get the center of the world for new generation tasks
4 years ago
Trivernis bdac496ce2 Fix unique world sql error
Fix error thrown by unique constrain for the world name in the sql table. The error occurs because the data from the database is loaded lazily after several seconds. If a task was started before that it wouldn't be checked against the existing tasks since they haven't been loaded yet. Fixed by loading the tasks if none exists when the generate command is invoked.
4 years ago
trivernis ecc3165f1f Add delay to starting of generation tasks
Add a delay to the starts of the tasks so that they don't all start on the same tick. To completely avoid two tasks being executed on the same tick, the "period" config option should be set to the expected number of tasks or higher.
4 years ago
trivernis 6cb39ce843 Remove logging of eta in seconds 4 years ago
trivernis 109699f639 Remove unused dependencies 4 years ago
trivernis e5f812e3bc Fix unicode loading of i18n files 4 years ago
trivernis 1c94ced875 [wip] Try to load i18n file with utf-8 encoding 4 years ago
Trivernis a4115ebdf7 Add ETA to periodic reports
Closes #17
4 years ago
Trivernis 965598de2b Add i18n to every output
Closes #16
4 years ago
trivernis bd731c85f0 Add i18n to generation manager 4 years ago
trivernis 900600714e Add i18n structure 4 years ago
trivernis f88100be5f Fix chunk center coordinate being calculated the wrong way
Fixes #19
4 years ago
trivernis f89262e538 Add ignore-worldborder config option
- [Convert to unix linebreaks]
- Add ignore-worldborder config option to generate past the vanilla world border
4 years ago
Trivernis ce826419f1 Added config parameter
- made database filename configurable
5 years ago
Trivernis 3a0012ef3f Added connection close safety
- moved connection close outside of try catch to finally to ensure that the connection is closed even on error (SqliteManager)
5 years ago
Trivernis 8b63643f7a Changes to sql structure
- changed SqliteUpdateManager to SqliteManager
- added methods to execute sql with values and callback to the SqliteManager
- added auto close of statements
- switched to establishing a connection only when sql should be executed
5 years ago
Trivernis b09b96d95c Fixes and version change
- increased version number
- fixed stacktrace print for sql update manager
- closed table info in the update manager
5 years ago
Trivernis d7052e1ac9 enabled error reports for sql update manager 5 years ago
Trivernis 160ee13ac8 Removed Chunk unloading on save event 5 years ago