From d86facc2bf6ac61581a55b4895c70c90fedfad0e Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Sat, 12 Oct 2013 20:18:35 +0200 Subject: [PATCH 1/3] Mob spawning changes Added EnderDragon, Blaze and Horse spawning. --- source/World.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/source/World.cpp b/source/World.cpp index bbbe7d382..f2b96e75d 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -1,4 +1,3 @@ - #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "BlockID.h" @@ -772,16 +771,36 @@ void cWorld::TickSpawnMobs(float a_Dt) // Spawn nether mobs switch (nightRand) { - case 5: MobType = cMonster::mtGhast; break; + case 0: MobType = cMonster::mtGhast; break; + case 1: MobType = cMonster::mtBlaze; break; + case 2: MobType = cMonster::mtZombiePigman; break; + case 3: MobType = cMonster::mtZombiePigman; break; + case 4: MobType = cMonster::mtZombiePigman; break; + case 5: MobType = cMonster::mtZombiePigman; break; case 6: MobType = cMonster::mtZombiePigman; break; + case 7: MobType = cMonster::mtZombiePigman; break; + case 8: MobType = cMonster::mtZombiePigman; break; + case 9: MobType = cMonster::mtZombiePigman; break; } break; } case biEnd: { - // Only endermen spawn in the End - MobType = cMonster::mtEnderman; + // Spawn only The End mobs + switch (nightRand) + { + case 0: MobType = cMonster::mtEnderDragon; break; + case 1: MobType = cMonster::mtEnderman; break; + case 2: MobType = cMonster::mtEnderman; break; + case 3: MobType = cMonster::mtEnderman; break; + case 4: MobType = cMonster::mtEnderman; break; + case 5: MobType = cMonster::mtEnderman; break; + case 6: MobType = cMonster::mtEnderman; break; + case 7: MobType = cMonster::mtEnderman; break; + case 8: MobType = cMonster::mtEnderman; break; + case 9: MobType = cMonster::mtEnderman; break; + } break; } @@ -822,6 +841,7 @@ void cWorld::TickSpawnMobs(float a_Dt) case 3: MobType = cMonster::mtSheep; break; case 4: MobType = cMonster::mtSquid; break; case 5: MobType = cMonster::mtWolf; break; + case 6: MobType = cMonster::mtHorse; break; } } // else (night) } // case overworld biomes From c28d3d7771834bbc44fc264ce7258eeda642072f Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Sat, 12 Oct 2013 20:21:28 +0200 Subject: [PATCH 2/3] Added extra line --- source/World.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/World.cpp b/source/World.cpp index f2b96e75d..c9b3306f7 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -1,3 +1,4 @@ + #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules #include "BlockID.h" From bfbc381e1dce8276fa62ae38afc548d8f173202b Mon Sep 17 00:00:00 2001 From: tonibm19 Date: Sat, 12 Oct 2013 20:26:57 +0200 Subject: [PATCH 3/3] Added more ghast spawning probability --- source/World.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/World.cpp b/source/World.cpp index c9b3306f7..f4bde79bf 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -772,10 +772,10 @@ void cWorld::TickSpawnMobs(float a_Dt) // Spawn nether mobs switch (nightRand) { - case 0: MobType = cMonster::mtGhast; break; - case 1: MobType = cMonster::mtBlaze; break; - case 2: MobType = cMonster::mtZombiePigman; break; - case 3: MobType = cMonster::mtZombiePigman; break; + case 0: MobType = cMonster::mtBlaze; break; + case 1: MobType = cMonster::mtGhast; break; + case 2: MobType = cMonster::mtGhast; break; + case 3: MobType = cMonster::mtGhast; break; case 4: MobType = cMonster::mtZombiePigman; break; case 5: MobType = cMonster::mtZombiePigman; break; case 6: MobType = cMonster::mtZombiePigman; break;