diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-04-26 17:47:25 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-04-26 17:47:25 +0200 |
commit | d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34 (patch) | |
tree | b8386b26cd234380d840653119fc3205339b2413 /src/Protocol/Protocol125.cpp | |
parent | Withers now use the new invulnerable. (diff) | |
download | cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar.gz cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar.bz2 cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar.lz cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar.xz cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.tar.zst cuberite-d50f8f6f11f69e7e1e56be92fb2d72a5014a3e34.zip |
Diffstat (limited to 'src/Protocol/Protocol125.cpp')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index a23afb29a..3951eb3e4 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -2013,7 +2013,14 @@ void cProtocol125::WriteMobMetadata(const cMonster & a_Mob) case cMonster::mtWither: { WriteByte(0x54); // Int at index 20 - WriteInt((Int32)((const cWither &)a_Mob).GetWitherInvulnerableTicks()); + if (((const cWither &)a_Mob).IsSpawnInvulnerable()) + { + WriteInt((Int32)((const cWither &)a_Mob).GetInvulnerableTicks()); + } + else + { + WriteInt((Int32)0); + } WriteByte(0x66); // Float at index 6 WriteFloat((float)(a_Mob.GetHealth())); break; |