From 97eda34a9437abe732cf6b60711828bbe4f0cb2e Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 16 Jun 2013 20:24:07 +0000 Subject: Rewritten furnaces Furnaces now smelt the correct number of items. Furnaces store their contents in a cItemGrid. Furnace window is updated with correct items and progressbars. Furnace recipes now use ticks instead of milliseconds. Furnaces save and load their state completely, not missing a smelt operation. Hoppers take items out of furnaces. Dropped the cSlotAreaDropSpenser class, replaced it with generic cSlotAreaItemGrid git-svn-id: http://mc-server.googlecode.com/svn/trunk@1601 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage/NBTChunkSerializer.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source/WorldStorage/NBTChunkSerializer.cpp') diff --git a/source/WorldStorage/NBTChunkSerializer.cpp b/source/WorldStorage/NBTChunkSerializer.cpp index 9c4f8a2ae..d391325c9 100644 --- a/source/WorldStorage/NBTChunkSerializer.cpp +++ b/source/WorldStorage/NBTChunkSerializer.cpp @@ -161,14 +161,12 @@ void cNBTChunkSerializer::AddDropperEntity(cDropperEntity * a_Entity) void cNBTChunkSerializer::AddFurnaceEntity(cFurnaceEntity * a_Furnace) { m_Writer.BeginCompound(""); - AddBasicTileEntity(a_Furnace, "Furnace"); - m_Writer.BeginList("Items", TAG_Compound); - AddItem(*(a_Furnace->GetSlot(0)), 0); - AddItem(*(a_Furnace->GetSlot(1)), 1); - AddItem(*(a_Furnace->GetSlot(2)), 2); - m_Writer.EndList(); - m_Writer.AddShort("BurnTime", (Int16)(a_Furnace->GetTimeToBurn() / 50.0)); - m_Writer.AddShort("CookTime", (Int16)(a_Furnace->GetTimeCooked() / 50.0)); + AddBasicTileEntity(a_Furnace, "Furnace"); + m_Writer.BeginList("Items", TAG_Compound); + AddItemGrid(a_Furnace->GetContents()); + m_Writer.EndList(); + m_Writer.AddShort("BurnTime", a_Furnace->GetFuelBurnTimeLeft()); + m_Writer.AddShort("CookTime", a_Furnace->GetTimeCooked()); m_Writer.EndCompound(); } -- cgit v1.2.3