summaryrefslogtreecommitdiffstats
path: root/src/ItemGrid.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:00:49 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:00:49 +0100
commit74645fdfaa892e460c1b5444fd35eca11343e570 (patch)
treee002a754e635117b2c9bf60d1a8b47d4f18e7dd1 /src/ItemGrid.cpp
parentPossibly did what xoft wanted (diff)
downloadcuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.gz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.bz2
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.lz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.xz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.zst
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.zip
Diffstat (limited to '')
-rw-r--r--src/ItemGrid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ItemGrid.cpp b/src/ItemGrid.cpp
index d2e6b1c69..e8b58695f 100644
--- a/src/ItemGrid.cpp
+++ b/src/ItemGrid.cpp
@@ -226,7 +226,7 @@ int cItemGrid::HowManyCanFit(const cItem & a_ItemStack, bool a_AllowNewStacks)
NumLeft -= MaxStack;
}
}
- else if (m_Slots[i].IsStackableWith(a_ItemStack))
+ else if (m_Slots[i].IsEqual(a_ItemStack))
{
NumLeft -= MaxStack - m_Slots[i].m_ItemCount;
}
@@ -275,7 +275,7 @@ int cItemGrid::AddItem(cItem & a_ItemStack, bool a_AllowNewStacks, int a_Priorit
(a_PrioritarySlot != -1) &&
(
m_Slots[a_PrioritarySlot].IsEmpty() ||
- m_Slots[a_PrioritarySlot].IsStackableWith(a_ItemStack)
+ m_Slots[a_PrioritarySlot].IsEqual(a_ItemStack)
)
)
{
@@ -285,7 +285,7 @@ int cItemGrid::AddItem(cItem & a_ItemStack, bool a_AllowNewStacks, int a_Priorit
// Scan existing stacks:
for (int i = m_NumSlots - 1; i >= 0; i--)
{
- if (m_Slots[i].IsStackableWith(a_ItemStack))
+ if (m_Slots[i].IsEqual(a_ItemStack))
{
NumLeft -= AddItemToSlot(a_ItemStack, i, NumLeft, MaxStack);
}
@@ -438,7 +438,7 @@ int cItemGrid::HowManyItems(const cItem & a_Item)
int res = 0;
for (int i = 0; i < m_NumSlots; i++)
{
- if (m_Slots[i].IsStackableWith(a_Item))
+ if (m_Slots[i].IsEqual(a_Item))
{
res += m_Slots[i].m_ItemCount;
}