summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-04-26 17:47:25 +0200
committerHowaner <franzi.moos@googlemail.com>2014-04-26 17:47:25 +0200
commitd50f8f6f11f69e7e1e56be92fb2d72a5014a3e34 (patch)
treeb8386b26cd234380d840653119fc3205339b2413 /src/WorldStorage/NBTChunkSerializer.cpp
parentWithers now use the new invulnerable. (diff)
downloadcuberite-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/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 46c6b8e92..0c4a1a430 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -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: