Anvil: Wolf owner not saved if not present.
This commit is contained in:
parent
122344bb7a
commit
054ce9bcc4
@ -570,8 +570,14 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
|
|||||||
case cMonster::mtWolf:
|
case cMonster::mtWolf:
|
||||||
{
|
{
|
||||||
const cWolf & Wolf = *((cWolf *)a_Monster);
|
const cWolf & Wolf = *((cWolf *)a_Monster);
|
||||||
m_Writer.AddString("Owner", Wolf.GetOwnerName());
|
if (!Wolf.GetOwnerName().empty())
|
||||||
m_Writer.AddString("OwnerUUID", Wolf.GetOwnerUUID());
|
{
|
||||||
|
m_Writer.AddString("Owner", Wolf.GetOwnerName());
|
||||||
|
}
|
||||||
|
if (!Wolf.GetOwnerUUID().empty())
|
||||||
|
{
|
||||||
|
m_Writer.AddString("OwnerUUID", Wolf.GetOwnerUUID());
|
||||||
|
}
|
||||||
m_Writer.AddByte("Sitting", Wolf.IsSitting() ? 1 : 0);
|
m_Writer.AddByte("Sitting", Wolf.IsSitting() ? 1 : 0);
|
||||||
m_Writer.AddByte("Angry", Wolf.IsAngry() ? 1 : 0);
|
m_Writer.AddByte("Angry", Wolf.IsAngry() ? 1 : 0);
|
||||||
m_Writer.AddInt("CollarColor", Wolf.GetCollarColor());
|
m_Writer.AddInt("CollarColor", Wolf.GetCollarColor());
|
||||||
|
Loading…
Reference in New Issue
Block a user