summaryrefslogtreecommitdiffstats
path: root/source/Chunk.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Chunk.h')
-rw-r--r--source/Chunk.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/Chunk.h b/source/Chunk.h
index 5f2bba3d8..69ecbfec4 100644
--- a/source/Chunk.h
+++ b/source/Chunk.h
@@ -50,6 +50,7 @@ class cChunkDataSerializer;
class cBlockArea;
class cFluidSimulatorData;
class cMobCensus;
+class cMobSpawner;
typedef std::list<cClientHandle *> cClientHandleList;
typedef cItemCallback<cEntity> cEntityCallback;
@@ -128,6 +129,9 @@ public:
/// Recence all mobs proximities to players in order to know what to do with them
void CollectMobCensus(cMobCensus& toFill);
+ /// Try to Spawn Monsters inside chunk
+ void SpawnMobs(cMobSpawner& a_MobSpawner);
+
void Tick(float a_Dt);
int GetPosX(void) const { return m_PosX; }
@@ -389,6 +393,10 @@ private:
cSandSimulatorChunkData m_SandSimulatorData;
+ // pick up a random block of this chunk
+ void getRandomBlock(int& a_X, int& a_Y, int& a_Z);
+ void getThreeRandomNumber(int& a_X, int& a_Y, int& a_Z,int a_MaxX, int a_MaxY, int a_MaxZ);
+
void RemoveBlockEntity(cBlockEntity * a_BlockEntity);
void AddBlockEntity (cBlockEntity * a_BlockEntity);