fill in old stubs regaridng chunk stuff & another inv fix

This commit is contained in:
sylvessa 2026-04-13 20:55:02 -05:00
parent d26c79a11e
commit 08f3aeff5f
10 changed files with 158 additions and 9 deletions

View file

@ -388,6 +388,38 @@ void ServerChunkCache::overwriteHellLevelChunkFromSource(int x, int z, int minVa
#endif
#ifdef MINECRAFT_SERVER_BUILD
void ServerChunkCache::regenerateChunk(int x, int z)
{
if (!source)
return;
LevelChunk *freshChunk = source->getChunk(x, z);
if (!freshChunk)
return;
LevelChunk *cachedChunk = nullptr;
if (hasChunk(x, z))
cachedChunk = getChunk(x, z);
if (cachedChunk && cachedChunk != emptyChunk)
{
for (int lx = 0; lx < 16; lx++)
for (int ly = 0; ly < 128; ly++)
for (int lz = 0; lz < 16; lz++)
cachedChunk->setTileAndData(lx, ly, lz, freshChunk->getTile(lx, ly, lz), freshChunk->getData(lx, ly, lz));
save(cachedChunk);
}
else
{
save(freshChunk);
}
freshChunk->unload(false);
delete freshChunk;
}
#endif
// 4J Added //
#ifdef _LARGE_WORLDS
void ServerChunkCache::dontDrop(int x, int z)