summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-10-11 11:02:53 +0200
committerMattes D <github@xoft.cz>2019-10-28 10:45:43 +0100
commit61904af626b036b6e4e045ca219b2a361aa45a6e (patch)
tree60b99ab37c9ec87ca96d403b3254a4da023cf6ac /src/MobSpawner.h
parentUpdate README.md (#4423) (diff)
downloadcuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.gz
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.bz2
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.lz
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.xz
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.tar.zst
cuberite-61904af626b036b6e4e045ca219b2a361aa45a6e.zip
Diffstat (limited to 'src/MobSpawner.h')
-rw-r--r--src/MobSpawner.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/MobSpawner.h b/src/MobSpawner.h
index 695467692..7d5ce5274 100644
--- a/src/MobSpawner.h
+++ b/src/MobSpawner.h
@@ -27,8 +27,8 @@ public :
/** Try to create a monster here
If this is the first of a Pack, determine the type of monster
a_Biome, BlockType & BlockMeta are used to decide what kind of Mob can Spawn here
- a_MaxPackSize is set to the maximal size for a pack this type of mob */
- cMonster * TryToSpawnHere(cChunk * a_Chunk, int A_RelX, int a_RelY, int a_RelZ, EMCSBiome a_Biome, int & a_MaxPackSize);
+ a_MaxPackSize is set to the maximum size for a pack this type of mob */
+ cMonster * TryToSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, EMCSBiome a_Biome, int & a_MaxPackSize);
/** Mark the beginning of a new Pack.
All mobs of the same Pack are the same type */
@@ -43,12 +43,14 @@ public :
}
/** Returns true if specified type of mob can spawn on specified block */
- static bool CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, eMonsterType a_MobType, EMCSBiome a_Biome);
+ static bool CanSpawnHere(cChunk * a_Chunk, Vector3i a_RelPos, eMonsterType a_MobType, EMCSBiome a_Biome);
/** Returns all mob types that can spawn that biome */
static std::set<eMonsterType> GetAllowedMobTypes(EMCSBiome a_Biome);
+
protected :
+
/** Returns a random type that can spawn in the specified biome.
Returns mtInvalidType if none is possible. */
eMonsterType ChooseMobType(EMCSBiome a_Biome);