summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
commitdde641ce83de474187102f0efbbced826673f54d (patch)
treecfa07264ef4762567c3ebf504e368e3c330ad6fc /src/WorldStorage/WSSAnvil.cpp
parentMerge pull request #1136 from Howaner/GlobalFixes (diff)
downloadcuberite-dde641ce83de474187102f0efbbced826673f54d.tar
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.gz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.bz2
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.lz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.xz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.zst
cuberite-dde641ce83de474187102f0efbbced826673f54d.zip
Diffstat (limited to 'src/WorldStorage/WSSAnvil.cpp')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 9870c144a..e6170f8b7 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -16,6 +16,7 @@
#include "../StringCompression.h"
#include "../BlockEntities/ChestEntity.h"
+#include "../BlockEntities/EnderChestEntity.h"
#include "../BlockEntities/CommandBlockEntity.h"
#include "../BlockEntities/DispenserEntity.h"
#include "../BlockEntities/DropperEntity.h"
@@ -584,6 +585,10 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con
{
LoadChestFromNBT(a_BlockEntities, a_NBT, Child);
}
+ else if (strncmp(a_NBT.GetData(sID), "EnderChest", a_NBT.GetDataLength(sID)) == 0)
+ {
+
+ }
else if (strncmp(a_NBT.GetData(sID), "Control", a_NBT.GetDataLength(sID)) == 0)
{
LoadCommandBlockFromNBT(a_BlockEntities, a_NBT, Child);
@@ -762,6 +767,22 @@ void cWSSAnvil::LoadChestFromNBT(cBlockEntityList & a_BlockEntities, const cPars
+void cWSSAnvil::LoadEnderChestFromNBT(cBlockEntityList & a_BlockEntities, const cParsedNBT & a_NBT, int a_TagIdx)
+{
+ ASSERT(a_NBT.GetType(a_TagIdx) == TAG_Compound);
+ int x, y, z;
+ if (!GetBlockEntityNBTPos(a_NBT, a_TagIdx, x, y, z))
+ {
+ return;
+ }
+ std::auto_ptr<cEnderChestEntity> EnderChest(new cEnderChestEntity(x, y, z, m_World));
+ a_BlockEntities.push_back(EnderChest.release());
+}
+
+
+
+
+
void cWSSAnvil::LoadDispenserFromNBT(cBlockEntityList & a_BlockEntities, const cParsedNBT & a_NBT, int a_TagIdx)
{
ASSERT(a_NBT.GetType(a_TagIdx) == TAG_Compound);