mapsyncer-paper: server side of MapSyncer for Xaero's World Map, discovery-limited

Paper 26.2 plugin speaking the stock MapSyncer client mod's protocol.
Renders Xaero region zips from the world's region files, but only for chunks
players have actually been sent (PlayerChunkLoadEvent), seeded once from
InhabitedTime. Shared or per-player visibility, background render cycle,
per-player streaming with hash/timestamp skipping, Gitea Actions release
workflow.

Vendors the MCA parser and Xaero writer from upstream MapSyncer (GPL-3.0),
see NOTICE.md.

Claude-Session: https://claude.ai/code/session_011FePLXwBsCGLTzaSkk1Z6V
This commit is contained in:
janhouse committed 2026-09-07 00:04:43 +03:00
commit 7fb3a82482
67 files changed
+10934

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
# MapSyncer (Paper) — server half of the "MapSyncer for Xaero's World Map" mod.
#
# The server renders Xaero's World Map region files from the world on disk and
# streams them to players who run the MapSyncer client mod (Fabric/NeoForge,
# same Minecraft version as the server) alongside Xaero's World Map.
#
# Unlike the upstream mod, this plugin does NOT ship the whole generated world.
# It tracks which chunks were actually sent to players and renders only those,
# so pre-generated or never-visited terrain stays hidden until someone finds it.
# What a player receives.
# shared every player sees the union of everything anyone has discovered
# own each player sees only the chunks they discovered themselves
# (plus the seeded history below, which cannot be attributed)
visibility: shared
# On first start (or /mapsync seed) mark every chunk that players have
# already spent time in as discovered, using the chunk's InhabitedTime. Chunks
# that were merely pre-generated (Chunky, distant-terrain LOD generation, ...)
# have an InhabitedTime of 0 and stay hidden.
seed:
from-inhabited-time: true
# Minimum InhabitedTime (ticks) for a chunk to count. 1 = anything at all.
min-inhabited-ticks: 1
discovery:
# A chunk counts as discovered when the server sends it to a player, which is
# exactly what Xaero's client maps. -1 keeps that; a positive number caps the
# distance (in chunks) from the player at which a sent chunk still counts.
radius-chunks: -1
# How often the discovery bitmaps are flushed to disk (seconds).
save-interval-seconds: 60
render:
# How often dirty regions (changed world data or new discoveries) are
# re-rendered in the background (seconds).
interval-seconds: 300
# Worker threads for MCA -> Xaero conversion. Each region is a full parse of a
# ~10 MB region file; keep this small on a shared box.
threads: 2
# Flush the world to disk before a render cycle so freshly explored chunks are
# on disk. This is the same operation the autosave performs.
save-world-before-render: true
# A sync request whose regions are not rendered yet renders them inline, but
# stops after this many seconds and leaves the rest to the background cycle
# (the client re-polls). Keep well under the client's 10 minute session limit.
inline-budget-seconds: 420
sync:
# Largest sum of region bytes in one packet (client cap is 1,000,000).
max-packet-bytes: 262144
# Per-player send rate. 0 disables the limiter.
speed-limit-kbps: 1024
# Advertised to clients: how often (ticks) their mod re-polls for changes.
client-poll-interval-ticks: 6000
# Delay (ticks) between the client announcing the mod's channels and the
# server's hello. The client needs a few seconds after join to read its own
# cache, otherwise it forgets what it already has and re-syncs on every join.
hello-delay-ticks: 100
# Optional stable name sent to clients. The client mod uses it to recognise this
# server when it is reached under a different address. Leave empty to disable.
server-name: ""
# Per-world settings. Keys are Bukkit world names. Anything not listed uses
# "default". `layers` controls what is rendered:
# auto surface for worlds with a sky, cave layers for worlds with a ceiling
# surface top-down map only
# caves cave layers only (16 blocks each, like Xaero's own cave mode)
# both
worlds:
default:
enabled: true
layers: auto