summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-24 16:28:22 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-26 18:55:45 +0100
commit60bc040a9c2ca6612128078c2178391f23e65a74 (patch)
tree4e8988667fc583a9abbf69a09733977a24ccac02 /src/Chunk.cpp
parentAvoid a gratuitous dirty when loading chunks with entities (diff)
downloadcuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar.gz
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar.bz2
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar.lz
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar.xz
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.tar.zst
cuberite-60bc040a9c2ca6612128078c2178391f23e65a74.zip
Diffstat (limited to '')
-rw-r--r--src/Chunk.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index fc128b31c..0d0b0896a 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -352,6 +352,11 @@ void cChunk::SetAllData(cSetChunkData & a_SetChunkData)
// Set the chunk data as valid. This may be needed for some simulators that perform actions upon block adding (Vaporize)
SetPresence(cpPresent);
+ if (a_SetChunkData.ShouldMarkDirty())
+ {
+ MarkDirty();
+ }
+
// Wake up all simulators for their respective blocks:
WakeUpSimulators();
@@ -371,9 +376,9 @@ void cChunk::SetLight(
// Postponing until we see how bad it is :)
m_ChunkData.SetBlockLight(a_BlockLight);
-
m_ChunkData.SetSkyLight(a_SkyLight);
+ MarkDirty();
m_IsLightValid = true;
}