All versions
0.2.3
Release
ChestShare 0.2.3last month 28
Compatibility
Minecraft: Java Edition
1.21.1
Platform
Fabric
Supported environments
Server-side
Singleplayer
Changes
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.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:6BCWQ9WC:ECUvym3r"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:6BCWQ9WC:ECUvym3r"
}

