mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-05-28 03:35:26 +00:00
Fix chunk unloading regression from upstream merge
Commit a24318ee changed drop() to immediately remove chunks from cache,
bypassing the deferred m_toDrop save/unload pipeline. This caused missing
chunks on dedicated servers, iterator invalidation in dropAll() and
ServerLevel::save(), and entity duplication (item frames) from chunks
being reloaded without their entities first being removed from the level.
- ServerChunkCache::drop(): restore m_toDrop queue instead of immediate
cache removal, so tick() can save/unload/move to unloadedCache safely
- MultiPlayerChunkCache::drop(): restore soft-unload (keep chunk in cache
with loaded=true) instead of nulling cache and hasData
- PlayerChunkMap::setRadius(): remove dropAll() call when reducing radius,
the per-chunk removal loop already handles out-of-range chunks
This commit is contained in:
@@ -824,11 +824,6 @@ void PlayerChunkMap::setRadius(int newRadius)
|
||||
}
|
||||
}
|
||||
|
||||
if (newRadius < radius)
|
||||
{
|
||||
level->cache->dropAll();
|
||||
}
|
||||
|
||||
assert(radius <= MAX_VIEW_DISTANCE);
|
||||
assert(radius >= MIN_VIEW_DISTANCE);
|
||||
this->radius = newRadius;
|
||||
|
||||
Reference in New Issue
Block a user