diff options
author | madmaxoft <github@xoft.cz> | 2014-08-04 11:16:19 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-08-04 11:30:20 +0200 |
commit | 1fa210c7f91030ac18fd880fcf131e8104c0b889 (patch) | |
tree | 6d63d6572c053b9474d7c2d6c412d9bb0a516ac5 /src/WorldStorage/WSSAnvil.cpp | |
parent | Anvil: Wolf owner not saved if not present. (diff) | |
download | cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar.gz cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar.bz2 cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar.lz cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar.xz cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.tar.zst cuberite-1fa210c7f91030ac18fd880fcf131e8104c0b889.zip |
Diffstat (limited to 'src/WorldStorage/WSSAnvil.cpp')
-rw-r--r-- | src/WorldStorage/WSSAnvil.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index 434f1e21f..a9c9ae4b5 100644 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -2495,7 +2495,7 @@ void cWSSAnvil::LoadWolfOwner(cWolf & a_Wolf, const cParsedNBT & a_NBT, int a_Ta int OwnerUUIDIdx = a_NBT.FindChildByName(a_TagIdx, "OwnerUUID"); if (OwnerUUIDIdx > 0) { - OwnerUUID = cMojangAPI::MakeUUIDShort(a_NBT.GetString(OwnerUUIDIdx)); + OwnerUUID = a_NBT.GetString(OwnerUUIDIdx); } int OwnerIdx = a_NBT.FindChildByName(a_TagIdx, "Owner"); if (OwnerIdx > 0) @@ -2520,6 +2520,11 @@ void cWSSAnvil::LoadWolfOwner(cWolf & a_Wolf, const cParsedNBT & a_NBT, int a_Ta return; } } + else + { + // Normalize the UUID: + OwnerUUID = cMojangAPI::MakeUUIDShort(OwnerUUID); + } // Convert UUID to name, if needed: if (OwnerName.empty()) |