summaryrefslogtreecommitdiffstats
path: root/src/Chunk.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-05-10 16:19:06 +0200
committerTycho <work.tycho+git@gmail.com>2014-05-10 16:19:06 +0200
commitcb6200345cdfcf34ab4cd6b50cc268152324f9dd (patch)
tree04602fd3bd45e8dcd91dcd46263730659de7a27d /src/Chunk.h
parentquieted gcov 4 (diff)
downloadcuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar.gz
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar.bz2
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar.lz
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar.xz
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.tar.zst
cuberite-cb6200345cdfcf34ab4cd6b50cc268152324f9dd.zip
Diffstat (limited to 'src/Chunk.h')
-rw-r--r--src/Chunk.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Chunk.h b/src/Chunk.h
index d2328971f..26f1e9d10 100644
--- a/src/Chunk.h
+++ b/src/Chunk.h
@@ -328,7 +328,13 @@ public:
}
inline void SetMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_Meta)
{
- m_ChunkBuffer.SetMeta(a_RelX, a_RelY, a_RelZ, a_Meta);
+ if (!GetMeta(a_RelX, a_RelY, a_RelZ) == a_Meta)
+ {
+ MarkDirty();
+ m_ChunkBuffer.SetMeta(a_RelX, a_RelY, a_RelZ, a_Meta);
+
+ m_PendingSendBlocks.push_back(sSetBlock(m_PosX, m_PosZ, a_RelX, a_RelY, a_RelZ, GetBlock(a_RelX, a_RelY, a_RelZ), a_Meta));
+ }
}
inline NIBBLETYPE GetBlockLight(int a_RelX, int a_RelY, int a_RelZ) const {return m_ChunkBuffer.GetBlockLight(a_RelX, a_RelY, a_RelZ); }