1
0

Added basic ocelot behavior (#3829)

This commit is contained in:
Bond-009
2017-07-12 12:42:02 +02:00
committed by Lukas Pioch
parent b61898c30c
commit 6a19841121
10 changed files with 369 additions and 21 deletions

View File

@@ -670,7 +670,18 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
}
case mtOcelot:
{
m_Writer.AddInt("Age", reinterpret_cast<const cOcelot *>(a_Monster)->GetAge());
const auto *Ocelot = reinterpret_cast<const cOcelot *>(a_Monster);
if (!Ocelot->GetOwnerName().empty())
{
m_Writer.AddString("Owner", Ocelot->GetOwnerName());
}
if (!Ocelot->GetOwnerUUID().empty())
{
m_Writer.AddString("OwnerUUID", Ocelot->GetOwnerUUID());
}
m_Writer.AddByte("Sitting", Ocelot->IsSitting() ? 1 : 0);
m_Writer.AddInt ("CatType", Ocelot->GetOcelotType());
m_Writer.AddInt ("Age", Ocelot->GetAge());
break;
}
case mtPig: