1
0
Fork 0
cuberite-2a/src/Mobs/Sheep.h

49 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include "PassiveMonster.h"
class cSheep :
public cPassiveMonster
{
typedef cPassiveMonster super;
public:
2014-07-01 18:42:23 +00:00
/** The number is the color of the sheep.
0-15 are the normal colors, if you type -1 the server
automatically chooses the right color for the sheep when spawned. */
2014-06-28 10:59:09 +00:00
cSheep(int a_Color = -1);
CLASS_PROTODEF(cSheep);
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
virtual void OnRightClicked(cPlayer & a_Player) override;
2014-01-25 20:19:52 +00:00
virtual void Tick(float a_Dt, cChunk & a_Chunk) override;
virtual const cItem GetFollowedItem(void) const override { return cItem(E_ITEM_WHEAT); }
2014-07-01 18:42:23 +00:00
/** Generates a random color for the sheep, like Mojang it does. */
static NIBBLETYPE GenerateNaturalRandomColor(void);
bool IsSheared(void) const { return m_IsSheared; }
2014-06-28 11:19:32 +00:00
void SetSheared(bool a_IsSheared) { m_IsSheared = a_IsSheared; }
int GetFurColor(void) const { return m_WoolColor; }
void SetFurColor(int a_WoolColor) { m_WoolColor = a_WoolColor; }
private:
bool m_IsSheared;
int m_WoolColor;
2014-01-25 20:19:52 +00:00
int m_TimeToStopEating;
} ;