summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Chicken.cpp
diff options
context:
space:
mode:
authorSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-23 15:31:35 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-12-23 15:31:35 +0100
commit7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447 (patch)
tree17bf61b027d78c1dcd0191da61236c57d318bc5c /src/Mobs/Chicken.cpp
parentFixed return value description in doxycomment. (diff)
parentChicken egg code early bailout (diff)
downloadcuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar.gz
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar.bz2
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar.lz
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar.xz
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.tar.zst
cuberite-7285a43cf67fa8a5e4a233e4ca1bfb98c56c1447.zip
Diffstat (limited to 'src/Mobs/Chicken.cpp')
-rw-r--r--src/Mobs/Chicken.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Chicken.cpp b/src/Mobs/Chicken.cpp
index c6042e420..5393a8a35 100644
--- a/src/Mobs/Chicken.cpp
+++ b/src/Mobs/Chicken.cpp
@@ -24,6 +24,11 @@ void cChicken::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
+ if (IsBaby())
+ {
+ return; // Babies don't lay eggs
+ }
+
if ((m_EggDropTimer == 6000) && (m_World->GetTickRandomNumber(1) == 0))
{
cItems Drops;