summaryrefslogtreecommitdiffstats
path: root/source/ChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-18 22:44:22 +0200
committermadmaxoft <github@xoft.cz>2013-08-18 22:44:22 +0200
commit7b10068370e42def4e28785d2e49acba52bad1fd (patch)
tree7cd6f4a961981f934127f097798317611946285a /source/ChunkMap.cpp
parentRemoved SetServerBlock griefing. (diff)
downloadcuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar.gz
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar.bz2
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar.lz
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar.xz
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.tar.zst
cuberite-7b10068370e42def4e28785d2e49acba52bad1fd.zip
Diffstat (limited to 'source/ChunkMap.cpp')
-rw-r--r--source/ChunkMap.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp
index 5a16495e6..cd4955077 100644
--- a/source/ChunkMap.cpp
+++ b/source/ChunkMap.cpp
@@ -1171,6 +1171,23 @@ void cChunkMap::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_B
+void cChunkMap::QueueSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, Int64 a_Tick)
+{
+ int ChunkX, ChunkZ, X = a_BlockX, Y = a_BlockY, Z = a_BlockZ;
+ cChunkDef::AbsoluteToRelative(X, Y, Z, ChunkX, ChunkZ);
+
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunk(ChunkX, ZERO_CHUNK_Y, ChunkZ);
+ if ((Chunk != NULL) && Chunk->IsValid())
+ {
+ Chunk->QueueSetBlock(X, Y, Z, a_BlockType, a_BlockMeta, a_Tick);
+ }
+}
+
+
+
+
+
bool cChunkMap::GetBlockTypeMeta(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta)
{
int ChunkX, ChunkZ, X = a_BlockX, Y = a_BlockY, Z = a_BlockZ;