ChunkLoader
适用于 Paper 1.21.x 的管理员控制圆形区块预生成插件
ChunkLoader 是什么?
ChunkLoader 允许服务器管理员在其位置周围以完美的圆形区域预生成区块——类似于 Chunky,但更简单且专注于纯粹的管理员控制。
不再因玩家探索新区域而出现卡顿峰值。在开启服务器之前预生成你的世界。
功能
- 圆形选择 — 仅处理精确欧几里得半径内的区块(而非方形)
- 批处理 — 区块以小批量配置加载,不会导致服务器冻结
- TPS/MSPT 节流 — 当服务器负载过高时自动减速
- Boss 栏进度 — 向所有在线玩家显示实时进度条
- 持久化任务 — 每批处理后保存进度;服务器重启后自动恢复
- 控制台 + 聊天反馈 — 实时显示百分比、预计剩余时间 (ETA)、速度、TPS
- 完整的命令集 — 开始、暂停、恢复、取消、状态、重载
命令
| 命令 |
描述 |
/chunkloader <radius> |
在你周围的圆形半径内开始生成 |
/chunkloader status |
显示当前任务进度 |
/chunkloader pause |
暂停任务(进度已保存) |
/chunkloader resume |
恢复已暂停的任务 |
/chunkloader cancel |
取消并丢弃任务 |
/chunkloader reload |
重载 config.yml |
别名: /cl, /cloader
权限
| 权限 |
描述 |
默认值 |
chunkloader.use |
使用所有 /chunkloader 子命令 |
OP |
chunkloader.admin |
包含 use + 配置重载 |
OP |
配置
chunks-per-batch: 10 # 每批区块数(正常情况)
batch-delay-ticks: 5 # 批次间的刻数间隔(正常)
tps-threshold: 18.0 # TPS 低于此值时切换为慢速模式
mspt-threshold: 45.0 # MSPT 高于此值时切换为慢速模式
slow-batch-size: 3 # 每批区块数(服务器高负载时)
slow-delay-ticks: 20 # 批次间的刻数间隔(服务器高负载时)
progress-interval-seconds: 5 # 打印进度的频率(0 = 禁用)
工作原理
- 站在你希望作为生成中心的位置
- 运行
/chunkloader <radius> — 例如 /chunkloader 100
- ChunkLoader 计算圆形半径内的每一个区块(而非方形)
- 使用 Paper 的异步区块 API 分批加载区块 —— 零主线程阻塞
- 进度显示在所有玩家可见的 Boss 栏上
- 如果服务器重启,任务将从断点处自动恢复
圆形形状
/chunkloader 3 大约处理以下区块:
█ █ █
█ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █
█ █ █
仅包含距中心的距离满足 √(dx² + dz²) ≤ radius 的区块。
要求
- Paper 1.21.x(推荐 1.21.4)
- Java 21+
不支持 Spigot / Bukkit —— 本插件使用了 Paper 特有的异步区块加载 API。
安装
- 下载
ChunkLoader-1.0.0.jar
- 将其放入服务器的
plugins/ 文件夹中
- 重启服务器
- 根据需要配置
plugins/ChunkLoader/config.yml
- 在游戏中运行
/chunkloader <radius>
ChunkLoader
Admin-controlled circular chunk pre-generation plugin for Paper 1.21.x
What is ChunkLoader?
ChunkLoader lets server admins pre-generate chunks in a perfect circular area around their position — similar to Chunky, but simpler and focused on pure admin control.
No more lag spikes when players explore new areas. Pre-generate your world before opening the server.
Features
- Circular selection — only chunks within exact Euclidean radius are processed (not a square)
- Batch processing — chunks load in small configurable batches, no server freezes
- TPS/MSPT throttling — automatically slows down when your server is under load
- Boss bar progress — live progress bar shown to all online players
- Persistent jobs — progress is saved after every batch; server restarts resume automatically
- Console + chat feedback — percentage, ETA, speed, TPS shown in real time
- Full command set — start, pause, resume, cancel, status, reload
Commands
| Command |
Description |
/chunkloader <radius> |
Start generation in a circular radius around you |
/chunkloader status |
Show current job progress |
/chunkloader pause |
Pause the job (progress saved) |
/chunkloader resume |
Resume a paused job |
/chunkloader cancel |
Cancel and discard the job |
/chunkloader reload |
Reload config.yml |
Aliases: /cl, /cloader
Permissions
| Permission |
Description |
Default |
chunkloader.use |
Use all /chunkloader subcommands |
OP |
chunkloader.admin |
Includes use + config reload |
OP |
Configuration
chunks-per-batch: 10 # Chunks per batch (normal conditions)
batch-delay-ticks: 5 # Ticks between batches (normal)
tps-threshold: 18.0 # Switch to slow mode below this TPS
mspt-threshold: 45.0 # Switch to slow mode above this MSPT
slow-batch-size: 3 # Chunks per batch (stressed server)
slow-delay-ticks: 20 # Ticks between batches (stressed server)
progress-interval-seconds: 5 # How often to print progress (0 = disable)
How It Works
- Stand where you want the center of generation to be
- Run
/chunkloader <radius> — e.g. /chunkloader 100
- ChunkLoader computes every chunk within the circular radius (not a square)
- Chunks are loaded in batches using Paper's async chunk API — zero main thread blocking
- Progress is displayed on a boss bar visible to all players
- If the server restarts, the job automatically resumes from where it left off
Circular Shape
/chunkloader 3 processes approximately:
█ █ █
█ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █ █ █
█ █ █ █ █
█ █ █
Only chunks whose distance from the center satisfies √(dx² + dz²) ≤ radius are included.
Requirements
- Paper 1.21.x (1.21.4 recommended)
- Java 21+
Spigot / Bukkit are not supported — this plugin uses Paper-specific async chunk loading APIs.
Installation
- Download
ChunkLoader-1.0.0.jar
- Place it in your server's
plugins/ folder
- Restart the server
- Configure
plugins/ChunkLoader/config.yml as needed
- Run
/chunkloader <radius> in-game
评论 0
登录后参与评分
还没有评论,来抢沙发吧