summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/WorldStorage/NBTChunkSerializer.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/WorldStorage/NBTChunkSerializer.cpp b/source/WorldStorage/NBTChunkSerializer.cpp
index 02b1012d8..a37899c0e 100644
--- a/source/WorldStorage/NBTChunkSerializer.cpp
+++ b/source/WorldStorage/NBTChunkSerializer.cpp
@@ -7,6 +7,7 @@
#include "../BlockID.h"
#include "../ChestEntity.h"
#include "../DispenserEntity.h"
+#include "../DropperEntity.h"
#include "../FurnaceEntity.h"
#include "../SignEntity.h"
#include "../NoteEntity.h"
@@ -132,6 +133,20 @@ void cNBTChunkSerializer::AddDispenserEntity(cDispenserEntity * a_Entity)
+void cNBTChunkSerializer::AddDropperEntity(cDropperEntity * a_Entity)
+{
+ m_Writer.BeginCompound("");
+ AddBasicTileEntity(a_Entity, "Dropper");
+ m_Writer.BeginList("Items", TAG_Compound);
+ AddItemGrid(a_Entity->GetContents());
+ m_Writer.EndList();
+ m_Writer.EndCompound();
+}
+
+
+
+
+
void cNBTChunkSerializer::AddFurnaceEntity(cFurnaceEntity * a_Furnace)
{
m_Writer.BeginCompound("");
@@ -401,6 +416,7 @@ void cNBTChunkSerializer::BlockEntity(cBlockEntity * a_Entity)
{
case E_BLOCK_CHEST: AddChestEntity ((cChestEntity *) a_Entity); break;
case E_BLOCK_DISPENSER: AddDispenserEntity ((cDispenserEntity *) a_Entity); break;
+ case E_BLOCK_DROPPER: AddDropperEntity ((cDropperEntity *) a_Entity); break;
case E_BLOCK_FURNACE: AddFurnaceEntity ((cFurnaceEntity *) a_Entity); break;
case E_BLOCK_SIGN_POST:
case E_BLOCK_WALLSIGN: AddSignEntity ((cSignEntity *) a_Entity); break;