summaryrefslogtreecommitdiffstats
path: root/source/WorldStorage/NBTChunkSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/WorldStorage/NBTChunkSerializer.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/WorldStorage/NBTChunkSerializer.cpp b/source/WorldStorage/NBTChunkSerializer.cpp
index cf53e4434..02b1012d8 100644
--- a/source/WorldStorage/NBTChunkSerializer.cpp
+++ b/source/WorldStorage/NBTChunkSerializer.cpp
@@ -123,15 +123,7 @@ void cNBTChunkSerializer::AddDispenserEntity(cDispenserEntity * a_Entity)
m_Writer.BeginCompound("");
AddBasicTileEntity(a_Entity, "Trap");
m_Writer.BeginList("Items", TAG_Compound);
- for (int i = 0; i < 9; i++)
- {
- const cItem * Item = a_Entity->GetSlot(i);
- if ((Item == NULL) || Item->IsEmpty())
- {
- continue;
- }
- AddItem(*Item, i);
- } // for i - contents[]
+ AddItemGrid(a_Entity->GetContents());
m_Writer.EndList();
m_Writer.EndCompound();
}