summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-22 22:17:52 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-25 15:51:16 +0200
commit10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7 (patch)
treed633bd93120ef095055166eec38c4f109b56a559
parentFix the build. Merge conflict between two PRs (#4936) (diff)
downloadcuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar.gz
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar.bz2
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar.lz
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar.xz
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.tar.zst
cuberite-10bd15a11e8289b80c3ac2e6a0e68d7fa3e0cfb7.zip
-rw-r--r--src/Blocks/BlockGrass.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockGrass.h b/src/Blocks/BlockGrass.h
index 1292ebfc2..4999ee27b 100644
--- a/src/Blocks/BlockGrass.h
+++ b/src/Blocks/BlockGrass.h
@@ -52,7 +52,7 @@ private:
const Vector3i a_RelPos
) const override
{
- if (!a_Chunk.GetWorld()->IsChunkLighted(a_Chunk.GetPosX(), a_Chunk.GetPosZ()))
+ if (!a_Chunk.IsLightValid())
{
a_Chunk.GetWorld()->QueueLightChunk(a_Chunk.GetPosX(), a_Chunk.GetPosZ());
return;
@@ -133,7 +133,7 @@ private:
}
auto Chunk = a_Chunk.GetRelNeighborChunkAdjustCoords(a_RelPos);
- if (Chunk == nullptr)
+ if ((Chunk == nullptr) || !Chunk->IsValid())
{
// Unloaded chunk
return;