From dc878898f36473c4df54457d2738562df4dec908 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 10 Apr 2013 21:40:30 +0000 Subject: Dispensers rewritten to use ItemGrid git-svn-id: http://mc-server.googlecode.com/svn/trunk@1383 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage/NBTChunkSerializer.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'source/WorldStorage') 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(); } -- cgit v1.2.3