Revert "Changed the old invulnerable methods from the wither to the new."
This reverts commit d50f8f6f11
.
This commit is contained in:
parent
d50f8f6f11
commit
26e935cb20
@ -20,9 +20,6 @@ public:
|
|||||||
/** Returns whether the wither is invulnerable to arrows. */
|
/** Returns whether the wither is invulnerable to arrows. */
|
||||||
bool IsArmored(void) const;
|
bool IsArmored(void) const;
|
||||||
|
|
||||||
/** Use the wither the invulnerable from the spawn? */
|
|
||||||
bool IsSpawnInvulnerable(void) const { return m_IsSpawnInvulnerable; }
|
|
||||||
|
|
||||||
// cEntity overrides
|
// cEntity overrides
|
||||||
virtual bool Initialize(cWorld * a_World) override;
|
virtual bool Initialize(cWorld * a_World) override;
|
||||||
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
virtual void GetDrops(cItems & a_Drops, cEntity * a_Killer = NULL) override;
|
||||||
|
@ -2013,14 +2013,7 @@ void cProtocol125::WriteMobMetadata(const cMonster & a_Mob)
|
|||||||
case cMonster::mtWither:
|
case cMonster::mtWither:
|
||||||
{
|
{
|
||||||
WriteByte(0x54); // Int at index 20
|
WriteByte(0x54); // Int at index 20
|
||||||
if (((const cWither &)a_Mob).IsSpawnInvulnerable())
|
WriteInt((Int32)((const cWither &)a_Mob).GetWitherInvulnerableTicks());
|
||||||
{
|
|
||||||
WriteInt((Int32)((const cWither &)a_Mob).GetInvulnerableTicks());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WriteInt((Int32)0);
|
|
||||||
}
|
|
||||||
WriteByte(0x66); // Float at index 6
|
WriteByte(0x66); // Float at index 6
|
||||||
WriteFloat((float)(a_Mob.GetHealth()));
|
WriteFloat((float)(a_Mob.GetHealth()));
|
||||||
break;
|
break;
|
||||||
|
@ -2820,14 +2820,7 @@ void cProtocol172::cPacketizer::WriteMobMetadata(const cMonster & a_Mob)
|
|||||||
case cMonster::mtWither:
|
case cMonster::mtWither:
|
||||||
{
|
{
|
||||||
WriteByte(0x54); // Int at index 20
|
WriteByte(0x54); // Int at index 20
|
||||||
if (((const cWither &)a_Mob).IsSpawnInvulnerable())
|
WriteInt(((const cWither &)a_Mob).GetWitherInvulnerableTicks());
|
||||||
{
|
|
||||||
WriteInt(((const cWither &)a_Mob).GetInvulnerableTicks());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WriteInt(0);
|
|
||||||
}
|
|
||||||
WriteByte(0x66); // Float at index 6
|
WriteByte(0x66); // Float at index 6
|
||||||
WriteFloat((float)(a_Mob.GetHealth()));
|
WriteFloat((float)(a_Mob.GetHealth()));
|
||||||
break;
|
break;
|
||||||
|
@ -516,14 +516,7 @@ void cNBTChunkSerializer::AddMonsterEntity(cMonster * a_Monster)
|
|||||||
}
|
}
|
||||||
case cMonster::mtWither:
|
case cMonster::mtWither:
|
||||||
{
|
{
|
||||||
if (((const cWither *)a_Monster)->IsSpawnInvulnerable())
|
m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetWitherInvulnerableTicks());
|
||||||
{
|
|
||||||
m_Writer.AddInt("Invul", ((const cWither *)a_Monster)->GetInvulnerableTicks());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_Writer.AddInt("Invul", 0);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case cMonster::mtWolf:
|
case cMonster::mtWolf:
|
||||||
|
@ -2272,7 +2272,7 @@ void cWSSAnvil::LoadWitherFromNBT(cEntityList & a_Entities, const cParsedNBT & a
|
|||||||
int CurrLine = a_NBT.FindChildByName(a_TagIdx, "Invul");
|
int CurrLine = a_NBT.FindChildByName(a_TagIdx, "Invul");
|
||||||
if (CurrLine > 0)
|
if (CurrLine > 0)
|
||||||
{
|
{
|
||||||
Monster->SetInvulnerableTicks(a_NBT.GetInt(CurrLine));
|
Monster->SetWitherInvulnerableTicks(a_NBT.GetInt(CurrLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
a_Entities.push_back(Monster.release());
|
a_Entities.push_back(Monster.release());
|
||||||
|
Loading…
Reference in New Issue
Block a user