Changed the old invulnerable methods from the wither to the new.

This commit is contained in:
Howaner
2014-04-26 17:47:25 +02:00
parent 619592b5a0
commit d50f8f6f11
5 changed files with 28 additions and 4 deletions
+8 -1
View File
@@ -516,7 +516,14 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
}
case cMonster::mtWither:
{
m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetWitherInvulnerableTicks());
if (((const cWither *)a_Monster)->IsSpawnInvulnerable())
{
m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetInvulnerableTicks());
}
else
{
m_Writer.AddInt("Invul", 0);
}
break;
}
case cMonster::mtWolf:
+1 -1
View File
@@ -2272,7 +2272,7 @@ void cWSSAnvil::LoadWitherFromNBT(cEntityList & a_Entities, const cParsedNBT & a
int CurrLine = a_NBT.FindChildByName(a_TagIdx, "Invul");
if (CurrLine > 0)
{
Monster->SetWitherInvulnerableTicks(a_NBT.GetInt(CurrLine));
Monster->SetInvulnerableTicks(a_NBT.GetInt(CurrLine));
}
a_Entities.push_back(Monster.release());