summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-29 12:36:38 +0200
commitdde641ce83de474187102f0efbbced826673f54d (patch)
treecfa07264ef4762567c3ebf504e368e3c330ad6fc /src/UI/SlotArea.cpp
parentMerge pull request #1136 from Howaner/GlobalFixes (diff)
downloadcuberite-dde641ce83de474187102f0efbbced826673f54d.tar
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.gz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.bz2
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.lz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.xz
cuberite-dde641ce83de474187102f0efbbced826673f54d.tar.zst
cuberite-dde641ce83de474187102f0efbbced826673f54d.zip
Diffstat (limited to 'src/UI/SlotArea.cpp')
-rw-r--r--src/UI/SlotArea.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 728692f2a..a2661e49e 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1342,7 +1342,7 @@ cSlotAreaEnderChest::cSlotAreaEnderChest(cEnderChestEntity * a_EnderChest, cWind
const cItem * cSlotAreaEnderChest::GetSlot(int a_SlotNum, cPlayer & a_Player) const
{
// a_SlotNum ranges from 0 to 26, use that to index the chest entity's inventory directly:
- return &(m_EnderChest->GetSlot(a_SlotNum));
+ return &(a_Player.GetEnderChestContents().GetSlot(a_SlotNum));
}
@@ -1351,7 +1351,7 @@ const cItem * cSlotAreaEnderChest::GetSlot(int a_SlotNum, cPlayer & a_Player) co
void cSlotAreaEnderChest::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
{
- m_EnderChest->SetSlot(a_SlotNum, a_Item);
+ a_Player.GetEnderChestContents().SetSlot(a_SlotNum, a_Item);
}