summaryrefslogtreecommitdiffstats
path: root/source/MobSpawner.h
diff options
context:
space:
mode:
authormgueydan <gueydan.mathieuÃ@gmail.com>2013-09-08 00:11:38 +0200
committermgueydan <gueydan.mathieuÃ@gmail.com>2013-09-08 00:11:38 +0200
commitbf1fb0aa3dbd5b6b793d920c4e301e4782fe0f0f (patch)
tree9c47274f2e308991d15422dcf515710c28fc5ab7 /source/MobSpawner.h
parentAdding mob census (sorry this is a big commit as work was done before git integration i couldn't split it more) (diff)
downloadcuberite-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 'source/MobSpawner.h')
-rw-r--r--source/MobSpawner.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/MobSpawner.h b/source/MobSpawner.h
new file mode 100644
index 000000000..7498c567d
--- /dev/null
+++ b/source/MobSpawner.h
@@ -0,0 +1,28 @@
+
+#pragma once
+
+#include <set>
+#include "BlockID.h"
+#include "ChunkDef.h"
+#include "FastRandom.h"
+#include "Mobs/Monster.h" //this is a side-effect of keeping Mobfamily inside Monster class. I'd prefer to keep both (Mobfamily and Monster) inside a "Monster" namespace MG TODO : do it
+
+class cChunk;
+class cEntity;
+
+
+// This class is used to determine wich monster can be spawned on wich place
+// it is essentially static (f.i. Squids spawn in water, Zombie spawn in dark places)
+// but it also has dynamic part depending on the world.ini
+class cMobSpawner
+{
+public :
+ // constructor
+ // a_MobFamily is the mega type of mobs that this spawner will spawn
+ // a_AllowedTypes is the set of types allowed for mobs it will spawn. Empty set
+ // would result in no spawn at all
+ // Allowed mobs thah are not of the right Megatype will not be include (no warning)
+ cMobSpawner(cMonster::eFamily MobFamily, const std::set<cMonster::eType>& a_AllowedTypes);
+
+
+};