summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-13 21:20:37 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-13 21:20:37 +0100
commitf4f0099947a017085574bff681d76aa1d4d53058 (patch)
tree6df313b380be50c7bf64d5ccbed7d6dc7cd24a1e
parentFancy stuff with constant references (diff)
downloadcuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar.gz
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar.bz2
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar.lz
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar.xz
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.tar.zst
cuberite-f4f0099947a017085574bff681d76aa1d4d53058.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/HopperEntity.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index b4ee36607..386dc2d32 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -238,19 +238,24 @@ bool cHopperEntity::MovePickupsIn(cChunk & a_Chunk, Int64 a_CurrentTick)
m_bFoundPickupsAbove = true;
m_Contents.SetSlot(i, a_Pickup->GetItem());
a_Pickup->Destroy(); // Kill pickup
+
+ LOGD("Hopper sucking pickup into an empty slot");
+
return true;
}
else if (m_Contents.GetSlot(i).IsEqual(a_Pickup->GetItem()) && !m_Contents.GetSlot(i).IsFullStack())
{
m_bFoundPickupsAbove = true;
- LOGINFO("Previous counts, pickup: %i, hopper: %i", (int)a_Pickup->GetItem().m_ItemCount, (int)m_Contents.GetSlot(i).m_ItemCount);
+
+ LOGD("Hopper sucking pickup; previous counts, pickup: %i, hopper: %i", (int)a_Pickup->GetItem().m_ItemCount, (int)m_Contents.GetSlot(i).m_ItemCount);
+
int PreviousCount = m_Contents.GetSlot(i).m_ItemCount;
a_Pickup->GetItem().m_ItemCount -= m_Contents.ChangeSlotCount(i, a_Pickup->GetItem().m_ItemCount) - PreviousCount; // Set count to however many items were added
- LOGINFO("After counts, pickup: %i, hopper: %i", (int)a_Pickup->GetItem().m_ItemCount, (int)m_Contents.GetSlot(i).m_ItemCount);
+
+ LOGD("Hopper sucking pickup; after counts, pickup: %i, hopper: %i", (int)a_Pickup->GetItem().m_ItemCount, (int)m_Contents.GetSlot(i).m_ItemCount);
if (a_Pickup->GetItem().IsEmpty())
{
- //LOGINFO("Pickup was empty!");
a_Pickup->Destroy(); // Kill pickup if all items were added
}
return true;