summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-30 17:16:15 +0200
committerMattes D <github@xoft.cz>2014-09-30 17:16:15 +0200
commit1531511bbe6affcb26e6ade17e4a313f5209e8e7 (patch)
treee9aa42ac32fcb72bf306e679be80cf0082694fc8 /src/UI/SlotArea.cpp
parentMerge pull request #1484 from SphinxC0re/master (diff)
parentCompilation fix (diff)
downloadcuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.gz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.bz2
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.lz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.xz
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.tar.zst
cuberite-1531511bbe6affcb26e6ade17e4a313f5209e8e7.zip
Diffstat (limited to 'src/UI/SlotArea.cpp')
-rw-r--r--src/UI/SlotArea.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index b4facb2d3..999bed989 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -10,6 +10,7 @@
#include "../BlockEntities/DropSpenserEntity.h"
#include "../BlockEntities/EnderChestEntity.h"
#include "../BlockEntities/FurnaceEntity.h"
+#include "../Entities/Minecart.h"
#include "../Items/ItemHandler.h"
#include "Window.h"
#include "../CraftingRecipes.h"
@@ -1920,6 +1921,40 @@ void cSlotAreaFurnace::HandleSmeltItem(const cItem & a_Result, cPlayer & a_Playe
////////////////////////////////////////////////////////////////////////////////
+// cSlotAreaMinecartWithChest:
+
+cSlotAreaMinecartWithChest::cSlotAreaMinecartWithChest(cMinecartWithChest * a_Chest, cWindow & a_ParentWindow) :
+ cSlotArea(27, a_ParentWindow),
+ m_Chest(a_Chest)
+{
+}
+
+
+
+
+
+const cItem * cSlotAreaMinecartWithChest::GetSlot(int a_SlotNum, cPlayer & a_Player) const
+{
+ // a_SlotNum ranges from 0 to 26, use that to index the minecart chest entity's inventory directly:
+ UNUSED(a_Player);
+ return &(m_Chest->GetSlot(a_SlotNum));
+}
+
+
+
+
+
+void cSlotAreaMinecartWithChest::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
+{
+ UNUSED(a_Player);
+ m_Chest->SetSlot(a_SlotNum, a_Item);
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////
// cSlotAreaInventoryBase:
cSlotAreaInventoryBase::cSlotAreaInventoryBase(int a_NumSlots, int a_SlotOffset, cWindow & a_ParentWindow) :