summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Villager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Villager.h')
-rw-r--r--src/Mobs/Villager.h29
1 files changed, 3 insertions, 26 deletions
diff --git a/src/Mobs/Villager.h b/src/Mobs/Villager.h
index aa81f0790..349eb7195 100644
--- a/src/Mobs/Villager.h
+++ b/src/Mobs/Villager.h
@@ -1,16 +1,16 @@
#pragma once
-#include "PassiveMonster.h"
+#include "Monster.h"
class cVillager :
- public cPassiveMonster
+ public cMonster
{
- typedef cPassiveMonster super;
+ typedef cMonster super;
public:
@@ -29,35 +29,12 @@ public:
CLASS_PROTODEF(cVillager)
- // cEntity overrides
- virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
- 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
- /** 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; }
private:
- int m_ActionCountDown;
int m_Type;
- bool m_VillagerAction;
- Vector3i m_CropsPos;
} ;