summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-02 22:59:21 +0200
committerMattes D <github@xoft.cz>2014-07-02 22:59:21 +0200
commit39fff19955e07460b1160ed962829c9e0a51a454 (patch)
treecd2b8aa7e24fb9c9052c55a67ea3364b837a5cf5 /src/UI/SlotArea.cpp
parentMerge remote-tracking branch 'origin/master' (diff)
parentSuggestion (diff)
downloadcuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.gz
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.bz2
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.lz
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.xz
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.tar.zst
cuberite-39fff19955e07460b1160ed962829c9e0a51a454.zip
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 728692f2a..48ebf489b 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -1341,8 +1341,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 +1350,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);
}