diff options
Diffstat (limited to 'src/Mobs/Sheep.cpp')
-rw-r--r-- | src/Mobs/Sheep.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Mobs/Sheep.cpp b/src/Mobs/Sheep.cpp index fef1adac6..001b80294 100644 --- a/src/Mobs/Sheep.cpp +++ b/src/Mobs/Sheep.cpp @@ -12,11 +12,17 @@ cSheep::cSheep(int a_Color) : - super("Sheep", mtSheep, "entity.sheep.hurt", "entity.sheep.death", 0.6, 1.3), + super(mtSheep, "entity.sheep.hurt", "entity.sheep.death", 0.6, 1.3), + m_TimeToStopEating(-1), m_IsSheared(false), - m_WoolColor(a_Color), - m_TimeToStopEating(-1) + m_WoolColor(a_Color) { + m_EMPersonality = PASSIVE; + m_BehaviorBreeder.AttachToMonster(*this); + m_BehaviorCoward.AttachToMonster(*this); + m_BehaviorItemFollower.AttachToMonster(*this); + m_BehaviorWanderer.AttachToMonster(*this); + // Generate random wool color. if (m_WoolColor == -1) { @@ -27,6 +33,8 @@ cSheep::cSheep(int a_Color) : { m_WoolColor = 0; } + + GetMonsterConfig("Sheep"); } @@ -135,7 +143,7 @@ void cSheep::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) -void cSheep::InheritFromParents(cPassiveMonster * a_Parent1, cPassiveMonster * a_Parent2) +void cSheep::InheritFromParents(cMonster * a_Parent1, cMonster * a_Parent2) { static const struct { @@ -203,4 +211,3 @@ NIBBLETYPE cSheep::GenerateNaturalRandomColor(void) return E_META_WOOL_PINK; } } - |