summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-19 23:37:35 +0100
committerMattes D <github@xoft.cz>2014-12-19 23:37:35 +0100
commitffd8356fc1b7a0222b622f14ea527bf33d1d3b89 (patch)
tree9a70b99863a3ca039881c0e42d84d4b21a8b6e43 /src/MobSpawner.cpp
parentMerge pull request #1679 from SphinxC0re/master (diff)
parentFixed Guardians size and health (diff)
downloadcuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar.gz
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar.bz2
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar.lz
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar.xz
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.tar.zst
cuberite-ffd8356fc1b7a0222b622f14ea527bf33d1d3b89.zip
Diffstat (limited to '')
-rw-r--r--src/MobSpawner.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index ee9e569a7..bd34d8fcd 100644
--- a/src/MobSpawner.cpp
+++ b/src/MobSpawner.cpp
@@ -83,6 +83,7 @@ eMonsterType cMobSpawner::ChooseMobType(EMCSBiome a_Biome)
addIfAllowed(mtSkeleton, allowedMobs);
addIfAllowed(mtCreeper, allowedMobs);
addIfAllowed(mtSquid, allowedMobs);
+ addIfAllowed(mtGuardian, allowedMobs);
if ((a_Biome != biDesert) && (a_Biome != biBeach) && (a_Biome != biOcean))
{
@@ -144,6 +145,11 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R
switch (a_MobType)
{
+ case mtGuardian:
+ {
+ return IsBlockWater(TargetBlock) && (a_RelY >= 45) && (a_RelY <= 62);
+ }
+
case mtSquid:
{
return IsBlockWater(TargetBlock) && (a_RelY >= 45) && (a_RelY <= 62);