ChunkTicker
保持选中的区块永久加载并持续运行,这样即使没有人在线,农场也能继续运作。生物生成、红石电路激活以及村民工作都不会停止。
该插件独立运行,无需其他插件支持。生物生成通过 NMS 调用原版的 NaturalSpawner,并在失败时回退到基于 Bukkit 的生成器。
功能特性
- 区块保持在实体 ticking 级别(Level 31):生物 AI、村民 AI、红石、作物生长和漏斗都在持续运行
- 支持零玩家在线,使得铁傀儡、苦力怕和疣猪兽农场能够全天候运行
- 在已注册的区块中,在没有玩家附近的情况下进行自然生物生成,对所有除 MISC(杂项)以外的生成类别使用原版
NaturalSpawner
- 基于 Bukkit 的回退生成器,包含基于生物群系的生物列表、全局上限、单区块上限以及生成几率。它会跳过蘑菇岛用于敌对生物,并完全跳过深暗之城(Deep Dark)
- 支持主世界、下界、末地及自定义世界的多世界支持
- 半径选择功能,允许通过一条命令注册单个区块或整个 NxN 区域,最大半径为 20
- 三种票据模式:
plugin(插件)、forced(强制加载)或 both(两者)
- 区块列表存储在
config.yml 中,重启后保留
- 提供全局开关,可移除所有票据而不清空列表
- 每个子命令拥有独立的权限,兼容 LuckPerms
- 语言支持:en, de, ru, es, fr, ja, zh
配置
global-enabled: true
# plugin | forced | both (recommended)
ticket-mode: both
# en, de, ru, es, fr, ja, zh
language: en
force-spawning:
enabled: true
interval-ticks: 400
spawn-chance: 0.3
global-hostile-cap: 15
global-passive-cap: 12
max-hostile-per-chunk: 3
max-passive-per-chunk: 2
# Managed automatically, only edit while the server is stopped
chunks: []
首次启动时会在 plugins/ChunkTicker/ 目录下创建带有注释的完整配置文件。上限、生成几率和每区块限制仅适用于 Bukkit 回退生成器。对 force-spawning 部分的修改需要重启服务器,其他更改可通过 /ct reload 命令即时应用。
权限
| 权限节点 |
描述 |
默认值 |
chunksticker.admin |
授予以下所有权限 |
op |
chunksticker.set |
使用 /ct set |
op |
chunksticker.delete |
使用 /ct delete |
op |
chunksticker.list |
使用 /ct list |
op |
chunksticker.toggle |
使用 /ct on 和 /ct off |
op |
chunksticker.reload |
使用 /ct reload |
op |
chunksticker.status |
使用 /ct status |
op |
LuckPerms 示例:
/lp group admin permission set chunksticker.admin true
/lp user Steve permission set chunksticker.set true
命令
| 命令 |
描述 |
/ct set [radius] |
注册你当前所在的区块,加上指定的半径 |
/ct delete [radius] |
移除你当前所在的区块,加上指定的半径 |
/ct list |
列出所有已注册的区块(世界、X、Z) |
/ct on |
全局启用 ChunkTicker |
/ct off |
全局禁用 ChunkTicker,但保留区块列表 |
/ct status |
显示状态及每个世界中已注册的区块数量 |
/ct reload |
重新加载 config.yml 和语言文件,并重新应用所有票据 |
别名:/ct,完整命令:/chunksticker
要求
|
|
| 服务端 |
Paper 26.1 至 26.3 需配合 ChunkTicker_1.2_26.x.jar,Paper 1.21 至 1.21.x 需配合 ChunkTicker_1.2_1.21.x.jar(Purpur 和 Pufferfish 作为 Paper 的分叉版本应该可以正常工作) |
| Java |
Paper 26.x 需要 25+,Paper 1.21.x 需要 21+ |
不支持 Spigot 和 Folia。将与你服务器匹配的 JAR 文件复制到 plugins/ 文件夹并启动服务器即可。
工作原理
Paper 在实体 ticking 级别(Level 31)暴露了两个持久化区块票据 API:addPluginChunkTicket() 和 setChunkForceLoaded()。当设置为 ticket-mode: both 时,ChunkTicker 会对每个已注册的区块同时应用这两种方式。Level 31 是 Minecraft 用于玩家视距内区块的加载级别,因此实体会进行 ticking,红石电路会运行,村民也会工作,就像有玩家站在附近一样。
仅有加载的区块而没有玩家在场是不会生成生物的,因为原版的生成周期是从玩家开始的。每隔 interval-ticks 个刻,ChunkTicker 会通过 NMS 对每个已注册的区块调用 NaturalSpawner.spawnForChunk,并使用从已加载实体构建的生成状态。这是真正的原版生成器,包括生物群系生成列表、光照检查和结构规则(如远古城市)。
当 NMS 调用抛出异常时,插件会记录警告日志,并在剩余会话期间切换到 Bukkit 回退生成器。它会统计所有已注册区块中的敌对和被动生物数量,按区块滚动 spawn-chance,并在实际生成高度读取生物群系信息,以确保位于不同地表生物群系下方的远古城市仍被排除在外。
ChunkTicker
Keeps selected chunks permanently loaded and fully ticking, so farms keep running when nobody is online. Mobs spawn, Redstone fires and villagers work.
The plugin runs on its own and needs no other plugin. Mob spawning calls the vanilla NaturalSpawner through NMS and falls back to a Bukkit based spawner when that fails.
Features
- Chunks are held at entity ticking level (Level 31): mob AI, villager AI, Redstone, crop growth and hoppers keep running
- Works with zero players online, so iron golem, creeper and hoglin farms run around the clock
- Natural mob spawning in registered chunks without a player nearby, using the vanilla
NaturalSpawner for every spawn category except MISC
- Bukkit fallback spawner with biome based mob lists, a global cap, a per-chunk cap and a spawn chance. It skips Mushroom Fields for hostile mobs and Deep Dark completely
- Multi-world support for Overworld, Nether, End and custom worlds
- Radius selection to register one chunk or a whole NxN area in a single command, up to radius 20
- Three ticket modes:
plugin, forced or both
- Chunk list is stored in
config.yml and survives restarts
- Global toggle that removes all tickets without clearing the list
- Per-subcommand permissions, compatible with LuckPerms
- Languages: en, de, ru, es, fr, ja, zh
Configuration
global-enabled: true
# plugin | forced | both (recommended)
ticket-mode: both
# en, de, ru, es, fr, ja, zh
language: en
force-spawning:
enabled: true
interval-ticks: 400
spawn-chance: 0.3
global-hostile-cap: 15
global-passive-cap: 12
max-hostile-per-chunk: 3
max-passive-per-chunk: 2
# Managed automatically, only edit while the server is stopped
chunks: []
The full file with comments is created in plugins/ChunkTicker/ on the first start. Caps, spawn chance and per-chunk limits only apply to the Bukkit fallback spawner. Changes to the force-spawning section need a server restart, everything else is applied by /ct reload.
Permissions
| Permission |
Description |
Default |
chunksticker.admin |
Grants all permissions below |
op |
chunksticker.set |
Use /ct set |
op |
chunksticker.delete |
Use /ct delete |
op |
chunksticker.list |
Use /ct list |
op |
chunksticker.toggle |
Use /ct on and /ct off |
op |
chunksticker.reload |
Use /ct reload |
op |
chunksticker.status |
Use /ct status |
op |
LuckPerms examples:
/lp group admin permission set chunksticker.admin true
/lp user Steve permission set chunksticker.set true
Commands
| Command |
Description |
/ct set [radius] |
Register the chunk you are standing in, plus the given radius |
/ct delete [radius] |
Remove the chunk you are standing in, plus the given radius |
/ct list |
List all registered chunks (world, X, Z) |
/ct on |
Enable ChunkTicker globally |
/ct off |
Disable ChunkTicker globally, the chunk list is kept |
/ct status |
Show state and registered chunk count per world |
/ct reload |
Reload config.yml and the language file and re-apply all tickets |
Alias: /ct, full command: /chunksticker
Requirements
|
|
| Server |
Paper 26.1 to 26.3 with ChunkTicker_1.2_26.x.jar, Paper 1.21 to 1.21.x with ChunkTicker_1.2_1.21.x.jar (Purpur and Pufferfish should work as Paper forks) |
| Java |
25+ for Paper 26.x, 21+ for Paper 1.21.x |
Spigot and Folia are not supported. Copy the JAR that matches your server into the plugins/ folder and start the server.
How it works
Paper exposes two persistent chunk ticket APIs at entity ticking level (Level 31): addPluginChunkTicket() and setChunkForceLoaded(). With ticket-mode: both, ChunkTicker applies both to every registered chunk. Level 31 is the load level Minecraft uses for chunks inside a player's view distance, so entities tick, Redstone runs and villagers work as if a player were standing nearby.
Loaded chunks alone do not spawn mobs without a player, because the vanilla spawn cycle starts from players. Every interval-ticks ChunkTicker calls NaturalSpawner.spawnForChunk through NMS for each registered chunk, with a spawn state built from the loaded entities. This is the real vanilla spawner, including biome spawn lists, light checks and structure rules such as the Ancient City.
When the NMS call throws, the plugin logs a warning and switches to a Bukkit fallback spawner for the rest of the session. It counts hostile and passive mobs across all registered chunks, rolls spawn-chance per chunk, and reads the biome at the real spawn height so that Ancient Cities below a different surface biome are still excluded.
评论 0
登录后参与评分
还没有评论,来抢沙发吧