summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Rabbit.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-07-17 17:12:27 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-07-17 17:12:27 +0200
commit9fba48533f3444b6d79d79324084e8abb356a392 (patch)
treec754094876237a8cf1f331071c8adc3e428140cf /src/Mobs/Rabbit.h
parentMerge pull request #2363 from scribblemaniac/improve-spider-ai (diff)
parent Added Rabbit Metadata values. (diff)
downloadcuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar.gz
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar.bz2
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar.lz
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar.xz
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.tar.zst
cuberite-9fba48533f3444b6d79d79324084e8abb356a392.zip
Diffstat (limited to 'src/Mobs/Rabbit.h')
-rw-r--r--src/Mobs/Rabbit.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/Mobs/Rabbit.h b/src/Mobs/Rabbit.h
index e86c85579..56181e3d0 100644
--- a/src/Mobs/Rabbit.h
+++ b/src/Mobs/Rabbit.h
@@ -7,6 +7,21 @@
+enum class eRabbitType : UInt8
+{
+ Brown = 0,
+ White = 1,
+ Black = 2,
+ BlackAndWhite = 3,
+ Gold = 4,
+ SaltAndPepper = 5,
+ TheKillerBunny = 99
+};
+
+
+
+
+
class cRabbit :
public cPassiveMonster
{
@@ -14,11 +29,19 @@ class cRabbit :
public:
cRabbit();
+ cRabbit(eRabbitType Type, int MoreCarrotTicks = 0);
CLASS_PROTODEF(cRabbit)
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
-
virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_CARROT); }
+ eRabbitType GetRabbitType() const { return m_Type; }
+ UInt8 GetRabbitTypeAsNumber() const { return static_cast<UInt8>(GetRabbitType()); }
+ int GetMoreCarrotTicks() const { return m_MoreCarrotTicks; }
+
+private:
+
+ eRabbitType m_Type;
+ int m_MoreCarrotTicks; // Ticks until the Rabbit eat planted Carrots
} ;