
ChestShare
Per-player loot in every world-generated chest, 100% server-side. Can even restore chests that were looted before you installed it.
Оцените первым
120
1
Список изменений
Fixed
- Import chunks are held non-ticking (border level 33), not ticking (level 32) - The async import pinned each in-flight chunk at the block-ticking level, so over a large import (tens of thousands of chunks) ticking chunks accumulated faster than they unloaded: server tick cost inflated until a watchdog crash in the vanilla spawn loop (
SpawnHelperviatickChunks), and entities in those far-away ticking chunks ticked with no player nearby (mass NPC/trainer despawn). Chunks are now held at the border level (33), which gives full block-entity access — enough to read and convert containers — with none of the ticking:shouldTickBlocks(33)andshouldTickEntities(33)are both false. No more tick-cost accumulation or watchdog at scale, and no more far-away entity ticking during imports. - Import pauses chunk admission under memory pressure (heap gate) and orders the chunk queue spatially - Import-loaded chunks stay resident in memory until vanilla's throttled unloading drains them (vanilla only unloads a quota per tick). On a large import, generation outran unloading, so resident chunks grew without bound until the heap was exhausted — an
OutOfMemoryErrorat scale (bench: OOM after ~7 min at parallelism 8 on a 6 GiB heap; production showed the same slope, 17 GiB after 2h45 even at parallelism 1). The import captures a per-world baseline of the loaded-chunk count at start (ServerChunkManager.getLoadedChunkCount(), the current holder-map size) and stops enqueuing new chunks for a world whenever its loaded count sits more than 384 chunks above that baseline. But that counter is blind to the proto-chunk neighborhood the generation pipeline holds: each target chunk (border level 33) forces generation of a neighborhood of lower-status proto-chunks (up to ~17×17 per target) that never appear in the full-chunk holder map — a second bench (78,915 positions, parallelism 8, 6 GiB heap, c2me) OOM'd with 9,416 chunks still pending and zero hits on the count gate. Two additions close that gap: (1) a heap gate that also pauses admission whenever free heap drops below 20 % of max heap — measuring the actual constraint (the heap) rather than a blind proxy; and (2) spatial ordering of the chunk queue per dimension by locality (region-major then position,(chunkX >> 5, chunkZ >> 5, chunkX, chunkZ); plain row-major within a region, no Hilbert curve needed) so consecutive targets share generation neighborhoods — scattered admissions each pay a full ~17×17 proto-chunk neighborhood, whereas sorted admissions reuse neighbors, cutting both peak memory and total generation work. The pause log line now names which gate fired (heap vs chunks); everything else keeps running (in-flight ticket refresh, polling, processing, timeouts) — this throttles admission only. An INFO line is logged at most once per 30 s while admission is paused.
Changed
- Already-registered positions are pre-skipped without loading their chunk - At import start, every position already present in the shared-container state is counted as "already shared" up front and its chunk is never queued. Re-running an import after an interrupted run now only loads the chunks of the remaining tail instead of every chunk in the export — near-instant resumes. The "Import started" line reports the pre-skipped count.
Файлы
chestshare-0.2.3.jar(51.89 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
0.2.3
Загрузчики
Fabric
Версии игры
1.21.1
Загрузок
96
Дата публикации
10.07.2026
