summaryrefslogtreecommitdiffstats
path: root/source/ChestEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:03:15 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:03:15 +0200
commit929d29996585c4f2e4461519ccf2803936b81ae1 (patch)
tree86a5210c4384c9292d2d7b697f24d1dc8a6e2e6a /source/ChestEntity.cpp
parentAdded cItemGrid to represent an XY grid of items; converted chests to use cItemGrid. (diff)
downloadcuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.gz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.bz2
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.lz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.xz
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.tar.zst
cuberite-929d29996585c4f2e4461519ccf2803936b81ae1.zip
Diffstat (limited to '')
-rw-r--r--source/ChestEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/ChestEntity.cpp b/source/ChestEntity.cpp
index aad8844c6..dbd7f6ef2 100644
--- a/source/ChestEntity.cpp
+++ b/source/ChestEntity.cpp
@@ -100,10 +100,10 @@ void cChestEntity::SaveToJson(Json::Value & a_Value)
a_Value["z"] = m_PosZ;
Json::Value AllSlots;
- for (int i = m_Contents.GetNumSlots(); i >= 0; i--)
+ for (int i = m_Contents.GetNumSlots() - 1; i >= 0; i--)
{
Json::Value Slot;
- m_Contents.GetItem(i).GetJson(Slot);
+ m_Contents.GetSlot(i).GetJson(Slot);
AllSlots.append(Slot);
}
a_Value["Slots"] = AllSlots;