summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Sheep.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-08-29 19:32:25 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2017-08-29 19:32:25 +0200
commitd0a2f22bc40b9a1c961d57962056501591d5b49f (patch)
tree69af4bab3021203536aab57bad1308f17636fd4c /src/Mobs/Sheep.h
parentImplemented chickens (diff)
downloadcuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar.gz
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar.bz2
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar.lz
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar.xz
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.tar.zst
cuberite-d0a2f22bc40b9a1c961d57962056501591d5b49f.zip
Diffstat (limited to 'src/Mobs/Sheep.h')
-rw-r--r--src/Mobs/Sheep.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/Mobs/Sheep.h b/src/Mobs/Sheep.h
index 01f90c968..8ed91915e 100644
--- a/src/Mobs/Sheep.h
+++ b/src/Mobs/Sheep.h
@@ -1,16 +1,18 @@
#pragma once
-#include "PassiveMonster.h"
-
-
+#include "Behaviors/BehaviorBreeder.h"
+#include "Behaviors/BehaviorItemFollower.h"
+#include "Behaviors/BehaviorCoward.h"
+#include "Behaviors/BehaviorWanderer.h"
+#include "Monster.h"
class cSheep :
- public cPassiveMonster
+ public cMonster
{
- typedef cPassiveMonster super;
+ typedef cMonster super;
public:
@@ -41,12 +43,23 @@ public:
int GetFurColor(void) const { return m_WoolColor; }
void SetFurColor(int a_WoolColor) { m_WoolColor = a_WoolColor; }
-
+ virtual cBehaviorBreeder * GetBehaviorBreeder() override;
+ virtual const cBehaviorBreeder * GetBehaviorBreeder() const override;
private:
- bool m_IsSheared;
- int m_WoolColor;
+
+ // Tick controlling behaviors
+ cBehaviorBreeder m_BehaviorBreeder;
+ cBehaviorItemFollower m_BehaviorItemFollower;
+ cBehaviorCoward m_BehaviorCoward;
+ cBehaviorWanderer m_BehaviorWanderer;
+
+ // mobTodo transfer this to a behavior
int m_TimeToStopEating;
+ // Behavior note: These are ship-specific things not transferrable to other mobs.
+ // Therefore they do not need a Behavior and can stay hardcoded in the sheep.
+ bool m_IsSheared;
+ int m_WoolColor;
} ;