New:
- Can now run multiple generation tasks at the same time, all with their own settings.
- New print to tell you how long tasks took to complete.
- Added
settings.yml
that includes more in-depth settings as well as the option to run tasks automatically when there are no players on the server. Tasks are terminated when any players connect.
# Configuration
# auto_run: Set to true if you want pre-generation to start automatically when no players are on the server.
# Acceptable values: true or false
# task_queue_timer: Determines how fast chunks are queued up. A value between 50-70 is recommended for modern AMD 5000 series and Intel 13th Gen CPUs in the Overworld,
# Adjust based on performance needs.
# parallel_tasks_multiplier: Sets the number of async tasks running concurrently. 'auto' will distribute the tasks based on your thread count.
# You can also set a specific integer value (e.g., 2, 4). It's recommended to stay below your total thread count.
# Example with 'auto' and 12 threads:
# world:
# parallel_tasks_multiplier: 4
# world_nether:
# parallel_tasks_multiplier: 4
# world_the_end:
# parallel_tasks_multiplier: 4
# print_update_delay: How often to print information (s-Seconds, m-Minutes, h-Hours). Default is 5s (5 seconds).
# radius: Defines how far the pre-generator should run (b-Blocks, c-Chunks, r-Regions) or 'default' to pre-generate until the world border.
# Settings
world:
auto_run: false # Acceptable values: true or false
task_queue_timer: 60 # Acceptable range: positive integer
parallel_tasks_multiplier: auto # 'auto' or a positive integer value
print_update_delay: 5s # Format: [value][s|m|h]. Example: 5s, 2h, 1d
radius: default # Format: [value][b|c|r]. Example: 100b, 1c, 10r, or 'default'
world_nether:
auto_run: false
task_queue_timer: 60
parallel_tasks_multiplier: auto
print_update_delay: 5s
radius: default
world_the_end:
auto_run: false
task_queue_timer: 60
parallel_tasks_multiplier: auto
print_update_delay: 5s
radius: default
Changes:
/pregenoff
has been updated to allow you to shut off specific generation tasks per world by using/pregenoff [world]
. The default behavior for/pregenoff
with no arguments will shut down all pre-generation tasks.- Parallel task multiplier increases load more linearly, allowing for better control of the load each task puts on the server. This means you won't have to push the parallel task multiplier past your thread count anymore.
- Moved away from using PaperLib implementation and are instead using Paper's methods directly. This improved performance slightly for Paper server forks.
- Improved printing for Bukkit/Spigot as well as performance. Default Bukkit/Spigot behavior with PaperLib was quite slow, only loading about 20 chunks per second. The new custom implementation for pre-generating chunks with Bukkit/Spigot is about 2-3x faster.
Fixes:
- Reworked printing to make it more accurate and removed unnecessary/redundant prints that serve no use.
Old Approach:
- Utilizes the BukkitScheduler to run chunk unload tasks.
- Tasks are scheduled within the game loop, which introduces some overhead and can limit concurrency.
- Uses a scheduler to repeatedly check and unload chunks.
New Approach:
- Uses virtual threads to handle chunk unload tasks.
- Virtual threads are lightweight, allowing for many more concurrent tasks without significant performance penalties.
- Runs tasks asynchronously, removing the dependency on the game loop scheduler.
Why the New Approach is Better:
- The new approach using virtual threads offers lightweight concurrency and reduced overhead compared to the old scheduler-based method, simplifying the code and improving scalability for handling chunk unloading in Minecraft.