summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-03-14 00:05:06 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-03-14 00:05:06 +0100
commit3d398baf355fd0dee0e282a73c61fe79f288db8f (patch)
treecc4fc49b1dbcbdf3b0bee969d4b3b5e3ac22ba99 /src/WorldStorage/NBTChunkSerializer.cpp
parentFixed confusion over Item Frame directions (diff)
downloadcuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar.gz
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar.bz2
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar.lz
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar.xz
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.tar.zst
cuberite-3d398baf355fd0dee0e282a73c61fe79f288db8f.zip
Diffstat (limited to 'src/WorldStorage/NBTChunkSerializer.cpp')
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index 4f78dd245..10231ae3b 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -36,20 +36,9 @@
#include "../Entities/ExpOrb.h"
#include "../Entities/HangingEntity.h"
#include "../Entities/ItemFrame.h"
+#include "../Entities/Painting.h"
-#include "../Mobs/Monster.h"
-#include "../Mobs/Bat.h"
-#include "../Mobs/Creeper.h"
-#include "../Mobs/Enderman.h"
-#include "../Mobs/Horse.h"
-#include "../Mobs/MagmaCube.h"
-#include "../Mobs/Sheep.h"
-#include "../Mobs/Slime.h"
-#include "../Mobs/Skeleton.h"
-#include "../Mobs/Villager.h"
-#include "../Mobs/Wither.h"
-#include "../Mobs/Wolf.h"
-#include "../Mobs/Zombie.h"
+#include "../Mobs/IncludeAllMonsters.h"
@@ -776,6 +765,19 @@ void cNBTChunkSerializer::AddItemFrameEntity(cItemFrame * a_ItemFrame)
+void cNBTChunkSerializer::AddPaintingEntity(cPainting * a_Painting)
+{
+ m_Writer.BeginCompound("");
+ AddBasicEntity(a_Painting, "Painting");
+ AddHangingEntity(a_Painting);
+ m_Writer.AddString("Motive", a_Painting->GetName());
+ m_Writer.EndCompound();
+}
+
+
+
+
+
void cNBTChunkSerializer::AddMinecartChestContents(cMinecartWithChest * a_Minecart)
{
m_Writer.BeginList("Items", TAG_Compound);
@@ -874,7 +876,7 @@ void cNBTChunkSerializer::Entity(cEntity * a_Entity)
case cEntity::etTNT: AddTNTEntity ((cTNTEntity *) a_Entity); break;
case cEntity::etExpOrb: AddExpOrbEntity ((cExpOrb *) a_Entity); break;
case cEntity::etItemFrame: AddItemFrameEntity ((cItemFrame *) a_Entity); break;
- case cEntity::etPainting: /* TODO */ break;
+ case cEntity::etPainting: AddPaintingEntity (reinterpret_cast<cPainting *>(a_Entity)); break;
case cEntity::etPlayer: return; // Players aren't saved into the world
default:
{