summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-26 16:39:04 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-26 16:39:04 +0200
commit5c3235ecdc3f718ce20e006f1ecfa2159df82c87 (patch)
treeaea2e4a722715498c59b0a828486b30b74506bb5 /source/WorldStorage
parentItemGrid: Added the RemoveOneItem() function (diff)
downloadcuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.gz
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.bz2
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.lz
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.xz
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.tar.zst
cuberite-5c3235ecdc3f718ce20e006f1ecfa2159df82c87.zip
Diffstat (limited to 'source/WorldStorage')
-rw-r--r--source/WorldStorage/NBTChunkSerializer.cpp16
-rw-r--r--source/WorldStorage/NBTChunkSerializer.h2
-rw-r--r--source/WorldStorage/WSSCompact.cpp1
3 files changed, 19 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;
diff --git a/source/WorldStorage/NBTChunkSerializer.h b/source/WorldStorage/NBTChunkSerializer.h
index 5c59ca490..47389dfe8 100644
--- a/source/WorldStorage/NBTChunkSerializer.h
+++ b/source/WorldStorage/NBTChunkSerializer.h
@@ -22,6 +22,7 @@ class cBlockEntity;
class cChestEntity;
class cFurnaceEntity;
class cDispenserEntity;
+class cDropperEntity;
class cSignEntity;
class cNoteEntity;
class cJukeboxEntity;
@@ -80,6 +81,7 @@ protected:
void AddBasicTileEntity(cBlockEntity * a_Entity, const char * a_EntityTypeID);
void AddChestEntity(cChestEntity * a_Entity);
void AddDispenserEntity(cDispenserEntity * a_Entity);
+ void AddDropperEntity(cDropperEntity * a_Entity);
void AddFurnaceEntity(cFurnaceEntity * a_Furnace);
void AddSignEntity(cSignEntity * a_Sign);
void AddNoteEntity(cNoteEntity * a_Note);
diff --git a/source/WorldStorage/WSSCompact.cpp b/source/WorldStorage/WSSCompact.cpp
index a4acd0b93..38edeaf37 100644
--- a/source/WorldStorage/WSSCompact.cpp
+++ b/source/WorldStorage/WSSCompact.cpp
@@ -74,6 +74,7 @@ void cJsonChunkSerializer::BlockEntity(cBlockEntity * a_BlockEntity)
{
case E_BLOCK_CHEST: SaveInto = "Chests"; break;
case E_BLOCK_DISPENSER: SaveInto = "Dispensers"; break;
+ case E_BLOCK_DROPPER: SaveInto = "Droppers"; break;
case E_BLOCK_FURNACE: SaveInto = "Furnaces"; break;
case E_BLOCK_SIGN_POST: SaveInto = "Signs"; break;
case E_BLOCK_WALLSIGN: SaveInto = "Signs"; break;