mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-13 04:33:52 +00:00
fill in old stubs regaridng chunk stuff & another inv fix
This commit is contained in:
parent
d26c79a11e
commit
08f3aeff5f
10 changed files with 158 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue