summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2017-11-20 12:13:11 +0100
committerAlexander Harkness <me@bearbin.net>2017-11-20 12:13:11 +0100
commit5badb9bccae803009bde182bf69ee0d02a36b22c (patch)
tree31fabd74fcee1138d4cacd0c437892c68c6defa9 /src/BlockEntities
parentcItemHandler: Update max stack size of old doors. (#4072) (diff)
downloadcuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.gz
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.bz2
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.lz
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.xz
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.zst
cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.zip
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)