summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChunkMap.h')
-rw-r--r--src/ChunkMap.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ChunkMap.h b/src/ChunkMap.h
index 9d973f2a9..7e85bb6f1 100644
--- a/src/ChunkMap.h
+++ b/src/ChunkMap.h
@@ -5,7 +5,8 @@
#pragma once
-#include "ChunkDef.h"
+
+#include "ChunkDataCallback.h"
@@ -152,7 +153,7 @@ public:
NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ);
NIBBLETYPE GetBlockBlockLight(int a_BlockX, int a_BlockY, int a_BlockZ);
void SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockMeta);
- void SetBlock (cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta);
+ void SetBlock (cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, bool a_SendToClients = true);
void QueueSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, BLOCKTYPE a_BlockMeta, Int64 a_Tick, BLOCKTYPE a_PreviousBlockType = E_BLOCK_AIR);
bool GetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta);
bool GetBlockInfo (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_Meta, NIBBLETYPE & a_SkyLight, NIBBLETYPE & a_BlockLight);
@@ -198,6 +199,10 @@ public:
/** Adds the entity to its appropriate chunk, takes ownership of the entity pointer */
void AddEntity(cEntity * a_Entity);
+ /** Adds the entity to its appropriate chunk, if the entity is not already added.
+ Takes ownership of the entity pointer */
+ void AddEntityIfNotPresent(cEntity * a_Entity);
+
/** Returns true if the entity with specified ID is present in the chunks */
bool HasEntity(int a_EntityID);