diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-21 19:07:46 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-07-21 19:07:46 +0200 |
commit | 0e99d44f0339dd471254f6b53fd6f030686db770 (patch) | |
tree | 542b1c59da1ef0dbe92f5f095a633e972d9945d7 | |
parent | Grass blockticking fix (diff) | |
download | cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar.gz cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar.bz2 cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar.lz cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar.xz cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.tar.zst cuberite-0e99d44f0339dd471254f6b53fd6f030686db770.zip |
-rw-r--r-- | source/WSSAnvil.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/WSSAnvil.cpp b/source/WSSAnvil.cpp index 14cea81f0..ac755907a 100644 --- a/source/WSSAnvil.cpp +++ b/source/WSSAnvil.cpp @@ -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( |