summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Rabbit.cpp
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.cpp
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.cpp')
-rw-r--r--src/Mobs/Rabbit.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Mobs/Rabbit.cpp b/src/Mobs/Rabbit.cpp
index f4de0ba0c..070396ded 100644
--- a/src/Mobs/Rabbit.cpp
+++ b/src/Mobs/Rabbit.cpp
@@ -14,6 +14,11 @@ cRabbit::cRabbit(void) :
static_cast<UInt8>(eRabbitType::SaltAndPepper) // Max possible Rabbit-Type
)), 0)
{
+ m_EMPersonality = PASSIVE;
+ m_BehaviorBreeder.AttachToMonster(*this);
+ m_BehaviorCoward.AttachToMonster(*this);
+ m_BehaviorItemFollower.AttachToMonster(*this);
+ m_BehaviorWanderer.AttachToMonster(*this);
}
@@ -45,3 +50,20 @@ void cRabbit::GetDrops(cItems & a_Drops, cEntity * a_Killer)
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
}
+
+
+
+
+cBehaviorBreeder * cRabbit::GetBehaviorBreeder()
+{
+ return &m_BehaviorBreeder;
+}
+
+
+
+
+
+const cBehaviorBreeder * cRabbit::GetBehaviorBreeder() const
+{
+ return static_cast<const cBehaviorBreeder *>(&m_BehaviorBreeder);
+}