From 5badb9bccae803009bde182bf69ee0d02a36b22c Mon Sep 17 00:00:00 2001 From: Bond-009 Date: Mon, 20 Nov 2017 12:13:11 +0100 Subject: cChunkInterface GetBlock, GetBlockMeta, GetBlockTypeMeta use vectors (#4050) --- src/BlockEntities/HopperEntity.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/BlockEntities') 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) -- cgit v1.2.3