diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-02-19 14:45:09 +0100 |
---|---|---|
committer | TheJumper <maximilian.springer@web.de> | 2014-02-23 19:50:50 +0100 |
commit | 1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b (patch) | |
tree | 617bf18a768a493c2cd428297168f57df0901c26 /src/WorldStorage/WSSAnvil.cpp | |
parent | Add break to Protocol17x.cpp and use new comment delimiter (diff) | |
download | cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.gz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.bz2 cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.lz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.xz cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.tar.zst cuberite-1f726b7d9dade75d8f7a3e105f3c9689a1ef0e0b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/WorldStorage/WSSAnvil.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index 58dc2e9e4..d4490c7fe 100644 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -24,7 +24,7 @@ #include "../BlockEntities/JukeboxEntity.h" #include "../BlockEntities/NoteEntity.h" #include "../BlockEntities/SignEntity.h" -#include "../BlockEntities/SkullEntity.h" +#include "../BlockEntities/MobHeadEntity.h" #include "../Mobs/Monster.h" @@ -600,7 +600,7 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con } else if (strncmp(a_NBT.GetData(sID), "Skull", a_NBT.GetDataLength(sID)) == 0) { - LoadSkullFromNBT(a_BlockEntities, a_NBT, Child); + LoadMobHeadFromNBT(a_BlockEntities, a_NBT, Child); } else if (strncmp(a_NBT.GetData(sID), "Trap", a_NBT.GetDataLength(sID)) == 0) { @@ -932,7 +932,7 @@ void cWSSAnvil::LoadSignFromNBT(cBlockEntityList & a_BlockEntities, const cParse -void cWSSAnvil::LoadSkullFromNBT(cBlockEntityList & a_BlockEntities, const cParsedNBT & a_NBT, int a_TagIdx) +void cWSSAnvil::LoadMobHeadFromNBT(cBlockEntityList & a_BlockEntities, const cParsedNBT & a_NBT, int a_TagIdx) { ASSERT(a_NBT.GetType(a_TagIdx) == TAG_Compound); int x, y, z; @@ -940,27 +940,27 @@ void cWSSAnvil::LoadSkullFromNBT(cBlockEntityList & a_BlockEntities, const cPars { return; } - std::auto_ptr<cSkullEntity> Skull(new cSkullEntity(x, y, z, m_World)); + std::auto_ptr<cMobHeadEntity> MobHead(new cMobHeadEntity(x, y, z, m_World)); int currentLine = a_NBT.FindChildByName(a_TagIdx, "SkullType"); if (currentLine >= 0) { - Skull->SetSkullType(static_cast<eSkullType>(a_NBT.GetByte(currentLine))); + MobHead->SetType(static_cast<eMobHeadType>(a_NBT.GetByte(currentLine))); } currentLine = a_NBT.FindChildByName(a_TagIdx, "Rot"); if (currentLine >= 0) { - Skull->SetRotation(static_cast<eSkullRotation>(a_NBT.GetByte(currentLine))); + MobHead->SetRotation(static_cast<eMobHeadRotation>(a_NBT.GetByte(currentLine))); } currentLine = a_NBT.FindChildByName(a_TagIdx, "ExtraType"); if (currentLine >= 0) { - Skull->SetOwner(a_NBT.GetString(currentLine)); + MobHead->SetOwner(a_NBT.GetString(currentLine)); } - a_BlockEntities.push_back(Skull.release()); + a_BlockEntities.push_back(MobHead.release()); } |