1
0
Fork 0

Added a (disabled) debugging code for anvil underground overviewing, useful for exploring MC cave generation style

git-svn-id: http://mc-server.googlecode.com/svn/trunk@690 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-07-21 17:07:46 +00:00
parent 02edaa4c81
commit 0e99d44f03
1 changed files with 15 additions and 4 deletions

View File

@ -480,16 +480,27 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT
int Index = cChunkDef::MakeIndexNoCheck(x, y, z);
if (ShouldInvert[x + cChunkDef::Width * z])
{
ChunkData[Index] = (ChunkData[Index] == E_BLOCK_AIR) ? E_BLOCK_STONE : E_BLOCK_AIR;
BlockTypes[Index] = (BlockTypes[Index] == E_BLOCK_AIR) ? E_BLOCK_STONE : E_BLOCK_AIR;
}
else
{
ShouldInvert[x + cChunkDef::Width * z] = (ChunkData[Index] != E_BLOCK_AIR);
switch (BlockTypes[Index])
{
case E_BLOCK_AIR:
case E_BLOCK_LEAVES:
{
// nothing needed
break;
}
default:
{
ShouldInvert[x + cChunkDef::Width * z] = true;
}
}
BlockTypes[Index] = E_BLOCK_AIR;
}
}
} // for y
// Set everything alight, so that we can see:
memset(ChunkData + cChunkDef::SkyLightOffset, 0xff, cChunkDef::NumBlocks / 2);
//*/
m_World->SetChunkData(