summaryrefslogtreecommitdiffstats
path: root/src/ItemGrid.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-19 14:55:22 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-19 14:55:22 +0100
commit82b2290b74519ab86d6abae463cbe0c1d8ac5868 (patch)
tree98855d56f18990731d88c283c6990d98b3d26245 /src/ItemGrid.cpp
parentMinecart collision and general improvements (diff)
parentUpdated core (diff)
downloadcuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.gz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.bz2
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.lz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.xz
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.tar.zst
cuberite-82b2290b74519ab86d6abae463cbe0c1d8ac5868.zip
Diffstat (limited to 'src/ItemGrid.cpp')
-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;
}