summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-03-25 08:54:13 +0100
committerMattes D <github@xoft.cz>2014-03-25 08:54:13 +0100
commitc6186acf58d01697d5349edf1b44bde5038daec4 (patch)
tree40c5ef7ddec8467bd711d43f5db0262942415d17 /src/WorldStorage/WSSAnvil.cpp
parentMerge pull request #829 from Howaner/Cake (diff)
parentMinor fixes (diff)
downloadcuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar.gz
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar.bz2
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar.lz
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar.xz
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.tar.zst
cuberite-c6186acf58d01697d5349edf1b44bde5038daec4.zip
Diffstat (limited to 'src/WorldStorage/WSSAnvil.cpp')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 7a2366755..2516ac07a 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -1238,7 +1238,7 @@ void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a
{
LoadWitchFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
}
- else if (strncmp(a_IDTag, "Wither", a_IDTagLength) == 0)
+ else if (strncmp(a_IDTag, "WitherBoss", a_IDTagLength) == 0)
{
LoadWitherFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
}
@@ -2250,6 +2250,12 @@ void cWSSAnvil::LoadWitherFromNBT(cEntityList & a_Entities, const cParsedNBT & a
return;
}
+ int CurrLine = a_NBT.FindChildByName(a_TagIdx, "Invul");
+ if (CurrLine > 0)
+ {
+ Monster->SetNumInvulnerableTicks(a_NBT.GetInt(CurrLine));
+ }
+
a_Entities.push_back(Monster.release());
}