summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-01-27 22:04:24 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-01-27 22:04:24 +0100
commit807a4dba989ad397c5f624f0a245df55103ee117 (patch)
treefe990f4649d3863859a6b1c979364dd2b5489d09
parentThe world can now be configured wether farmers should be able to harvest crops. (diff)
downloadcuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar.gz
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar.bz2
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar.lz
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar.xz
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.tar.zst
cuberite-807a4dba989ad397c5f624f0a245df55103ee117.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Villager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 74a2a6d99..4a3cce26e 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -97,6 +97,11 @@ void cVillager::Tick(float a_Dt, cChunk & a_Chunk)
// Farmer functions.
void cVillager::HandleFarmerAttemptSpecialAction()
{
+ if (!m_World->VillagersShouldHarvestCrops())
+ {
+ return;
+ }
+
cBlockArea Surrounding;
/// Read a 11x7x11 area.
Surrounding.Read(