diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-16 23:22:42 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2015-07-16 23:22:42 +0200 |
commit | 4b99a5bd49f2756f927e173f9c41c48cb4cb553a (patch) | |
tree | 7e9ce8ee6bf8f6eca7f2f4aec2c3abc0dc906a5e /src/World.cpp | |
parent | Merge pull request #2360 from bibo38/waterfix (diff) | |
parent | Spawn baby mobs (diff) | |
download | cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.gz cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.bz2 cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.lz cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.xz cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.tar.zst cuberite-4b99a5bd49f2756f927e173f9c41c48cb4cb553a.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 7 |
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); } |