diff options
author | mgueydan <gueydan.mathieuÃ@gmail.com> | 2013-09-08 00:11:38 +0200 |
---|---|---|
committer | mgueydan <gueydan.mathieuÃ@gmail.com> | 2013-09-08 00:11:38 +0200 |
commit | bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f (patch) | |
tree | 9c47274f2e308991d15422dcf515710c28fc5ab7 /source/Chunk.h | |
parent | Adding mob census (sorry this is a big commit as work was done before git integration i couldn't split it more) (diff) | |
download | cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar.gz cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar.bz2 cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar.lz cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar.xz cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.tar.zst cuberite-bf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f.zip |
Diffstat (limited to '')
-rw-r--r-- | source/Chunk.h | 8 |
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); |