summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage/WSSAnvil.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-09 11:13:14 +0200
committermadmaxoft <github@xoft.cz>2013-09-09 11:13:14 +0200
commit5945166a980a09b3fa2c267ba19334ba48ca9df4 (patch)
tree5b15d4c022834316e031e81931569fc7305be415 /source/WorldStorage/WSSAnvil.cpp
parentRemoved the cDoors class. (diff)
parentFixed a bunch of stuff (diff)
downloadcuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar.gz
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar.bz2
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar.lz
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar.xz
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.tar.zst
cuberite-5945166a980a09b3fa2c267ba19334ba48ca9df4.zip
Diffstat (limited to 'source/WorldStorage/WSSAnvil.cpp')
-rw-r--r--source/WorldStorage/WSSAnvil.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/source/WorldStorage/WSSAnvil.cpp b/source/WorldStorage/WSSAnvil.cpp
index fa0066dc6..4db1ed106 100644
--- a/source/WorldStorage/WSSAnvil.cpp
+++ b/source/WorldStorage/WSSAnvil.cpp
@@ -23,6 +23,7 @@
#include "../OSSupport/MakeDir.h"
#include "FastNBT.h"
#include "../Mobs/Monster.h"
+#include "../Entities/Boat.h"
#include "../Entities/FallingBlock.h"
#include "../Entities/Minecart.h"
#include "../Entities/Pickup.h"
@@ -911,7 +912,11 @@ void cWSSAnvil::LoadSignFromNBT(cBlockEntityList & a_BlockEntities, const cParse
void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_EntityTagIdx, const char * a_IDTag, int a_IDTagLength)
{
- if (strncmp(a_IDTag, "FallingBlock", a_IDTagLength) == 0)
+ if (strncmp(a_IDTag, "Boat", a_IDTagLength) == 0)
+ {
+ LoadBoatFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
+ }
+ else if (strncmp(a_IDTag, "FallingBlock", a_IDTagLength) == 0)
{
LoadFallingBlockFromNBT(a_Entities, a_NBT, a_EntityTagIdx);
}
@@ -987,6 +992,20 @@ void cWSSAnvil::LoadEntityFromNBT(cEntityList & a_Entities, const cParsedNBT & a
+void cWSSAnvil::LoadBoatFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
+{
+ std::auto_ptr<cBoat> Boat(new cBoat(0, 0, 0));
+ if (!LoadEntityBaseFromNBT(*Boat.get(), a_NBT, a_TagIdx))
+ {
+ return;
+ }
+ a_Entities.push_back(Boat.release());
+}
+
+
+
+
+
void cWSSAnvil::LoadFallingBlockFromNBT(cEntityList & a_Entities, const cParsedNBT & a_NBT, int a_TagIdx)
{
// TODO