summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockEntities')
-rw-r--r--src/BlockEntities/HopperEntity.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index 2fac188b1..e6c2ad546 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -116,9 +116,8 @@ bool cHopperEntity::UsedBy(cPlayer * a_Player)
// Instead of marking the chunk as dirty upon chest contents change, we mark it dirty now
// We cannot properly detect contents change, but such a change doesn't happen without a player opening the chest first.
// The few false positives aren't much to worry about
- int ChunkX, ChunkZ;
- cChunkDef::BlockToChunk(m_PosX, m_PosZ, ChunkX, ChunkZ);
- m_World->MarkChunkDirty(ChunkX, ChunkZ);
+ cChunkCoords ChunkPos = cChunkDef::BlockToChunk(GetPos());
+ m_World->MarkChunkDirty(ChunkPos.m_ChunkX, ChunkPos.m_ChunkZ);
return true;
}
@@ -196,7 +195,7 @@ bool cHopperEntity::MovePickupsIn(cChunk & a_Chunk, Int64 a_CurrentTick)
class cHopperPickupSearchCallback
{
public:
- cHopperPickupSearchCallback(const Vector3i & a_Pos, cItemGrid & a_Contents) :
+ cHopperPickupSearchCallback(Vector3i a_Pos, cItemGrid & a_Contents) :
m_Pos(a_Pos),
m_bFoundPickupsAbove(false),
m_Contents(a_Contents)