summaryrefslogtreecommitdiffstats
path: root/source/Chunk.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-10-18 12:41:43 +0200
committerMattes D <github@xoft.cz>2013-10-18 12:41:43 +0200
commit8bba2b02a132d236703835d93ab18e09e0ea7230 (patch)
treee637945c6eb845e82c4f2790c07c6fd82a1f79ef /source/Chunk.h
parentAPIDump: Renamed output for helper stuff. (diff)
parentRemoved reading default values from settings.ini for worlds. (diff)
downloadcuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.gz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.bz2
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.lz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.xz
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.tar.zst
cuberite-8bba2b02a132d236703835d93ab18e09e0ea7230.zip
Diffstat (limited to 'source/Chunk.h')
-rw-r--r--source/Chunk.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/Chunk.h b/source/Chunk.h
index c979b7928..aca180d16 100644
--- a/source/Chunk.h
+++ b/source/Chunk.h
@@ -49,6 +49,8 @@ class cPickup;
class cChunkDataSerializer;
class cBlockArea;
class cFluidSimulatorData;
+class cMobCensus;
+class cMobSpawner;
typedef std::list<cClientHandle *> cClientHandleList;
typedef cItemCallback<cEntity> cEntityCallback;
@@ -124,6 +126,12 @@ public:
/// Sets or resets the internal flag that prevents chunk from being unloaded
void Stay(bool a_Stay = true);
+ /// 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; }
@@ -385,6 +393,10 @@ private:
cSandSimulatorChunkData m_SandSimulatorData;
+ // pick up a random block of this chunk
+ void getRandomBlockCoords(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);