summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-23 22:16:05 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-23 22:16:05 +0200
commit2832685c021309200973e621e8caeff7a12078ae (patch)
tree29e2fb7e3dc4debd1dc1c563abd8c4779b80c452 /src/WorldStorage/WSSAnvil.cpp
parentMCServer world compatiblity with vanilla and mcedit. (diff)
parentFixed compiler warnings in 1.8 protocol. (diff)
downloadcuberite-2832685c021309200973e621e8caeff7a12078ae.tar
cuberite-2832685c021309200973e621e8caeff7a12078ae.tar.gz
cuberite-2832685c021309200973e621e8caeff7a12078ae.tar.bz2
cuberite-2832685c021309200973e621e8caeff7a12078ae.tar.lz
cuberite-2832685c021309200973e621e8caeff7a12078ae.tar.xz
cuberite-2832685c021309200973e621e8caeff7a12078ae.tar.zst
cuberite-2832685c021309200973e621e8caeff7a12078ae.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 8dc4088b7..62f5ef9c0 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -2493,19 +2493,19 @@ void cWSSAnvil::LoadWolfFromNBT(cEntityList & a_Entities, const cParsedNBT & a_N
LoadWolfOwner(*Monster.get(), a_NBT, a_TagIdx);
int SittingIdx = a_NBT.FindChildByName(a_TagIdx, "Sitting");
- if (SittingIdx > 0)
+ if ((SittingIdx > 0) && (a_NBT.GetType(SittingIdx) == TAG_Byte))
{
bool Sitting = ((a_NBT.GetByte(SittingIdx) == 1) ? true : false);
Monster->SetIsSitting(Sitting);
}
int AngryIdx = a_NBT.FindChildByName(a_TagIdx, "Angry");
- if (AngryIdx > 0)
+ if ((AngryIdx > 0) && (a_NBT.GetType(AngryIdx) == TAG_Byte))
{
bool Angry = ((a_NBT.GetByte(AngryIdx) == 1) ? true : false);
Monster->SetIsAngry(Angry);
}
int CollarColorIdx = a_NBT.FindChildByName(a_TagIdx, "CollarColor");
- if (CollarColorIdx > 0)
+ if ((CollarColorIdx > 0) && (a_NBT.GetType(CollarColorIdx) == TAG_Int))
{
int CollarColor = a_NBT.GetInt(CollarColorIdx);
Monster->SetCollarColor(CollarColor);