diff options
author | Howaner <franzi.moos@googlemail.com> | 2015-01-25 00:34:19 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2015-01-25 00:34:19 +0100 |
commit | 1eedccc56a1a80b42adbea8dbbe968d42c7fe712 (patch) | |
tree | a5fe3fb72a3c3918b2c4ba413c686f718f5d403c /src/MobSpawner.cpp | |
parent | C++11 and function rename. (diff) | |
parent | Gamosocm support (diff) | |
download | cuberite-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.cpp | 8 |
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 ( |