summaryrefslogtreecommitdiffstats
path: root/src/MobSpawner.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-01-25 00:34:19 +0100
committerHowaner <franzi.moos@googlemail.com>2015-01-25 00:34:19 +0100
commit1eedccc56a1a80b42adbea8dbbe968d42c7fe712 (patch)
treea5fe3fb72a3c3918b2c4ba413c686f718f5d403c /src/MobSpawner.cpp
parentC++11 and function rename. (diff)
parentGamosocm support (diff)
downloadcuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.gz
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.bz2
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.lz
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.xz
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.tar.zst
cuberite-1eedccc56a1a80b42adbea8dbbe968d42c7fe712.zip
Diffstat (limited to 'src/MobSpawner.cpp')
-rw-r--r--src/MobSpawner.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/MobSpawner.cpp b/src/MobSpawner.cpp
index ee9e569a7..0a32d17ef 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))
{
@@ -91,6 +92,7 @@ eMonsterType cMobSpawner::ChooseMobType(EMCSBiome a_Biome)
addIfAllowed(mtCow, allowedMobs);
addIfAllowed(mtChicken, allowedMobs);
addIfAllowed(mtEnderman, allowedMobs);
+ addIfAllowed(mtRabbit, allowedMobs);
addIfAllowed(mtSlime, allowedMobs); // MG TODO : much more complicated rule
if ((a_Biome == biForest) || (a_Biome == biForestHills) || (a_Biome == biTaiga) || (a_Biome == biTaigaHills))
@@ -144,6 +146,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);
@@ -158,6 +165,7 @@ bool cMobSpawner::CanSpawnHere(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_R
case mtCow:
case mtPig:
case mtHorse:
+ case mtRabbit:
case mtSheep:
{
return (