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

55 lines
1.3 KiB
C
Raw Normal View History

#pragma once
#include "PassiveMonster.h"
class cSheep :
public cPassiveMonster
{
typedef cPassiveMonster super;
2016-02-05 21:45:45 +00:00
public:
2014-07-01 18:42:23 +00:00
/** The number is the color of the sheep.
2014-07-12 23:04:43 +00:00
Use E_META_WOOL_* constants for the wool color.
If you type -1, the server will generate a random color
with the GenerateNaturalRandomColor() function. */
2014-06-28 10:59:09 +00:00
cSheep(int a_Color = -1);
CLASS_PROTODEF(cSheep)
2014-10-20 20:55:07 +00:00
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = nullptr) override;
virtual void OnRightClicked(cPlayer & a_Player) override;
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
2015-12-12 19:55:58 +00:00
virtual void InheritFromParents(cPassiveMonster * a_Parent1, cPassiveMonster * a_Parent2) override;
2014-01-25 20:19:52 +00:00
virtual void GetFollowedItems(cItems & a_Items) override
{
a_Items.Add(E_ITEM_WHEAT);
}
2014-07-12 23:04:43 +00:00
/** Generates a random color for the sheep like the vanilla server.
2017-08-24 09:19:40 +00:00
The percent's where used are from the wiki: https://minecraft.gamepedia.com/Sheep#Breeding */
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;
} ;