diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-14 18:03:47 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-14 18:03:47 +0200 |
commit | 318d5522486f3aedc2e808f955eff97957bd968e (patch) | |
tree | 7d9a3c5ad98585fb298691110dd4296de86a9317 /source/ChunkMap.h | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
parent | Merge branch 'master' into MobSpawning (diff) | |
download | cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar.gz cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar.bz2 cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar.lz cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar.xz cuberite-318d5522486f3aedc2e808f955eff97957bd968e.tar.zst cuberite-318d5522486f3aedc2e808f955eff97957bd968e.zip |
Diffstat (limited to 'source/ChunkMap.h')
-rw-r--r-- | source/ChunkMap.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/ChunkMap.h b/source/ChunkMap.h index fcb164f7b..f68cb6472 100644 --- a/source/ChunkMap.h +++ b/source/ChunkMap.h @@ -26,6 +26,8 @@ class cPawn; class cPickup; class cChunkDataSerializer; class cBlockArea; +class cMobCensus; +class cMobSpawner; typedef std::list<cClientHandle *> cClientHandleList; typedef cChunk * cChunkPtr; @@ -263,9 +265,15 @@ public: /// Grows a cactus present at the block specified by the amount of blocks specified, up to the max height specified in the config void GrowCactus(int a_BlockX, int a_BlockY, int a_BlockZ, int a_NumBlocksToGrow); - /// Sets the blockticking to start at the specified block. Only one blocktick per chunk may be set, second call overwrites the first call + /// Sets the blockticking to start at the specified block. Only one blocktick per chunk may be set, second call overwrites the first call void SetNextBlockTick(int a_BlockX, int a_BlockY, int a_BlockZ); + /// Make a Mob census, of all mobs, their family, their chunk and theyr distance to closest player + void CollectMobCensus(cMobCensus& a_ToFill); + + /// Try to Spawn Monsters inside all Chunks + void SpawnMobs(cMobSpawner& a_MobSpawner); + void Tick(float a_Dt); void UnloadUnusedChunks(void); @@ -309,6 +317,11 @@ private: void Save(void); void UnloadUnusedChunks(void); + /// Collect a mob census, of all mobs, their megatype, their chunk and their distance o closest player + void CollectMobCensus(cMobCensus& a_ToFill); + /// Try to Spawn Monsters inside all Chunks + void SpawnMobs(cMobSpawner& a_MobSpawner); + void Tick(float a_Dt); void RemoveClient(cClientHandle * a_Client); |