summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Rabbit.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/Rabbit.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/Rabbit.h')
-rw-r--r--src/Mobs/Rabbit.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/Mobs/Rabbit.h b/src/Mobs/Rabbit.h
index 289ff0282..89760cd7c 100644
--- a/src/Mobs/Rabbit.h
+++ b/src/Mobs/Rabbit.h
@@ -1,8 +1,11 @@
#pragma once
-#include "PassiveMonster.h"
-
+#include "Behaviors/BehaviorBreeder.h"
+#include "Behaviors/BehaviorItemFollower.h"
+#include "Behaviors/BehaviorCoward.h"
+#include "Behaviors/BehaviorWanderer.h"
+#include "Monster.h"
@@ -23,9 +26,9 @@ enum class eRabbitType : UInt8
class cRabbit :
- public cPassiveMonster
+ public cMonster
{
- typedef cPassiveMonster super;
+ typedef cMonster super;
public:
cRabbit();
@@ -44,7 +47,14 @@ public:
eRabbitType GetRabbitType() const { return m_Type; }
int GetMoreCarrotTicks() const { return m_MoreCarrotTicks; }
+ virtual cBehaviorBreeder * GetBehaviorBreeder() override;
+ virtual const cBehaviorBreeder * GetBehaviorBreeder() const override;
private:
+ // Tick controlling behaviors
+ cBehaviorBreeder m_BehaviorBreeder;
+ cBehaviorItemFollower m_BehaviorItemFollower;
+ cBehaviorCoward m_BehaviorCoward;
+ cBehaviorWanderer m_BehaviorWanderer;
eRabbitType m_Type;
int m_MoreCarrotTicks; // Ticks until the Rabbit eat planted Carrots