summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorhallucino <d@t0t0.fr>2015-07-16 15:06:54 +0200
committerhallucino <d@t0t0.fr>2015-07-16 22:49:55 +0200
commit9c85ed5864d53057ebde6f756f89b400172e52b5 (patch)
tree2dda40bc792a22b420105e89c2f4d18a49c18fff /src/World.cpp
parentMerge pull request #2348 from bibo38/customname (diff)
downloadcuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar.gz
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar.bz2
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar.lz
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar.xz
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.tar.zst
cuberite-9c85ed5864d53057ebde6f756f89b400172e52b5.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index dec335253..b152d119a 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -3326,7 +3326,7 @@ bool cWorld::IsBlockDirectlyWatered(int a_BlockX, int a_BlockY, int a_BlockZ)
-UInt32 cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType)
+UInt32 cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType, bool a_Baby)
{
cMonster * Monster = nullptr;
@@ -3337,6 +3337,11 @@ UInt32 cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterTyp
}
Monster->SetPosition(a_PosX, a_PosY, a_PosZ);
+ if (a_Baby)
+ {
+ Monster->SetAge(-1);
+ }
+
return SpawnMobFinalize(Monster);
}