diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-28 16:26:44 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-01-28 16:26:44 +0100 |
commit | 8ca98e0c0e09706561ed54cf8be95a731157a59e (patch) | |
tree | 5194bbdaab9cab2b4dff427640aa3254a298292b /src/Mobs/Villager.h | |
parent | Villager: NoCountDown and Action function don't check VillagersShouldHarvestCrops anymore because it shoudn't even be activated anywhere. (diff) | |
download | cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar.gz cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar.bz2 cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar.lz cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar.xz cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.tar.zst cuberite-8ca98e0c0e09706561ed54cf8be95a731157a59e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Villager.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/Mobs/Villager.h b/src/Mobs/Villager.h index 979d2a3ac..b99ae876f 100644 --- a/src/Mobs/Villager.h +++ b/src/Mobs/Villager.h @@ -34,17 +34,24 @@ public: virtual void Tick (float a_Dt, cChunk & a_Chunk) override; // cVillager functions + /** return true if the given blocktype are: crops, potatoes or carrots.*/ bool IsBlockFarmable(BLOCKTYPE a_BlockType); + ////////////////////////////////////////////////////////////////// // Farmer functions - void HandleFarmerAttemptSpecialAction(); - void HandleFarmerAction(); - void HandleFarmerEndCountDown(); + /** It searches in a 11x7x11 area for crops. If it found some it will navigate to them.*/ + void HandleFarmerPrepareFarmCrops(); + + /** Looks if the farmer has reached it's destination, and if it's still crops and the destination is closer then 2 blocks it will harvest them.*/ + void HandleFarmerTryHarvestCrops(); + + /** Replaces the crops he harvested.*/ + void HandleFarmerPlaceCrops(); // Get and set functions. - int GetVilType(void) const { return m_Type; } - Vector3i GetCropsPos(void) const { return m_CropsPos; } - bool DoesHaveActionActivated(void) const { return m_VillagerAction; } + int GetVilType(void) const { return m_Type; } + Vector3i GetCropsPos(void) const { return m_CropsPos; } + bool DoesHaveActionActivated(void) const { return m_VillagerAction; } private: |