summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorcedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-15 01:25:26 +0200
committercedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-15 01:25:26 +0200
commit6327d63e25aadf391cdd166d3dc22d692cafdb63 (patch)
treee98e8a1567e1e803a8f2d762e52d6884f906eaad /source
parentFixed snow again, this time for real. (diff)
downloadcuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar.gz
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar.bz2
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar.lz
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar.xz
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.tar.zst
cuberite-6327d63e25aadf391cdd166d3dc22d692cafdb63.zip
Diffstat (limited to 'source')
-rw-r--r--source/cWorld.cpp46
1 files changed, 26 insertions, 20 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp
index 48fb3a3ad..82243a8a9 100644
--- a/source/cWorld.cpp
+++ b/source/cWorld.cpp
@@ -747,26 +747,32 @@ void cWorld::TickSpawnMobs(float a_Dt)
if (m_WorldTime >= 12000 + 1000)
{
- if (nightRand == 0) //random percent to spawn for night
- Monster = new cSpider();
- else if (nightRand == 1)
- Monster = new cZombie();
- else if (nightRand == 2)
- Monster = new cEnderman();
- else if (nightRand == 3)
- Monster = new cCreeper();
- else if (nightRand == 4)
- Monster = new cCavespider();
- else if (nightRand == 5)
- Monster = new cGhast();
- else if (nightRand == 6)
- Monster = new cZombiepigman();
- else if (nightRand == 7)
- Monster = new cSlime();
- else if (nightRand == 8)
- Monster = new cSilverfish();
- else if (nightRand == 9)
- Monster = new cSkeleton();
+ if (GetBiomeAt(SpawnPos.x, SpawnPos.z) == biHell) // Spawn nether mobs
+ {
+ if (nightRand == 1 && GetBiomeAt(SpawnPos.x, SpawnPos.z) == biHell)
+ Monster = new cZombie();
+ else if (nightRand == 5)
+ Monster = new cGhast();
+ else if (nightRand == 6)
+ Monster = new cZombiepigman();
+ }
+ else
+ {
+ if (nightRand == 0) //random percent to spawn for night
+ Monster = new cSpider();
+ else if (nightRand == 2)
+ Monster = new cEnderman();
+ else if (nightRand == 3)
+ Monster = new cCreeper();
+ else if (nightRand == 4)
+ Monster = new cCavespider();
+ else if (nightRand == 7)
+ Monster = new cSlime();
+ else if (nightRand == 8)
+ Monster = new cSilverfish();
+ else if (nightRand == 9)
+ Monster = new cSkeleton();
+ }
//end random percent to spawn for night
}
else