Region logic
SilkMC inherits its regional threading model directly from Folia. This page summarizes the model and points to the SilkMC-specific behavior layered on top.
What a region is
A region is a contiguous group of loaded chunks that ticks together on a single scheduler-managed worker. The Folia scheduler grows and shrinks regions as players and entities move, splitting and merging them so that adjacent activity stays on the same worker.
- Entities, blocks, and chunks inside a region are owned by that region's worker thread for the tick.
- Cross-region work must bridge through an explicit scheduler — the entity scheduler, the region scheduler, or the global region scheduler.
- There is no single "main thread" — code that assumes one must be refactored or routed through SilkMC's bridging.
Schedulers
| Scheduler | Use it when |
|---|---|
RegionScheduler | You have a location and want to mutate the region that owns it. |
EntityScheduler | You have an entity and want to mutate it on its owning region. |
AsyncScheduler | You want to do off-region work that does not touch world state. |
GlobalRegionScheduler | You need global tick work — weather, time, server-wide tasks. |
SilkMC-specific behavior
SilkMC does not change the region model itself. It adds a small compatibility layer so that plugins which still
call BukkitScheduler or sync teleport are bridged where it is safe.
- Scheduler bridge — legacy sync calls route to the Global Region Scheduler.
- Teleport bridge — sync teleports on the owning region route to
teleportAsync. Cross-region sync teleports warn and return optimistically. - Lifecycle wrapping — plugin enable/disable runs inside a phase-tagged context for clearer failure logs.
see also
For the upstream implementation details and attribution, see the
Upstream page. For the safe-by-default patterns to write against the region model, see
Plugin developers.