Merge dev and resolve formatting conflicts

This commit is contained in:
MatthewBeshay
2026-03-30 19:00:30 +11:00
463 changed files with 12624 additions and 11227 deletions

View File

@@ -45,7 +45,7 @@ ServerChunkCache::ServerChunkCache(ServerLevel* level, ChunkStorage* storage,
ServerChunkCache::~ServerChunkCache() {
storage->WaitForAll(); // MGH - added to fix crash bug 175183
delete emptyChunk;
delete[] cache; // 4jcraft changed to delete[]
delete[] cache; // 4jcraft changed to delete[]
delete source;
#if defined(_LARGE_WORLDS)
@@ -163,8 +163,8 @@ LevelChunk* ServerChunkCache::create(
(int64_t*)&cache[idx], (int64_t)chunk, (int64_t)lastChunk) ==
(int64_t)lastChunk)
#else
if (InterlockedCompareExchangeRelease((int32_t*)&cache[idx], (int32_t)chunk,
(int32_t)lastChunk) ==
if (InterlockedCompareExchangeRelease(
(int32_t*)&cache[idx], (int32_t)chunk, (int32_t)lastChunk) ==
(int32_t)lastChunk)
#endif
{
@@ -710,8 +710,8 @@ bool ServerChunkCache::save(bool force, ProgressListener* progressListener) {
}
}
} else {
// 4J Stu - We have multiple for threads for all saving as part of the
// storage, so use that rather than new threads here
// 4J Stu - We have multiple for threads for all saving as part of the
// storage, so use that rather than new threads here
// Created a roughly sorted list to match the order that the files were
// created in McRegionChunkStorage::McRegionChunkStorage. This is to
@@ -806,7 +806,7 @@ bool ServerChunkCache::tick() {
// loadedChunks.remove(cp);
// loadedChunkList.remove(chunk);
auto it = find(m_loadedChunkList.begin(),
m_loadedChunkList.end(), chunk);
m_loadedChunkList.end(), chunk);
if (it != m_loadedChunkList.end())
m_loadedChunkList.erase(it);