From 61904af626b036b6e4e045ca219b2a361aa45a6e Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 11 Oct 2019 11:02:53 +0200 Subject: Moved growing from cWorld / cChunk to cBlockHandler descendants. --- src/BlockEntities/HopperEntity.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/BlockEntities/HopperEntity.cpp') diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp index a0705e996..e85cfb952 100644 --- a/src/BlockEntities/HopperEntity.cpp +++ b/src/BlockEntities/HopperEntity.cpp @@ -299,7 +299,7 @@ bool cHopperEntity::MoveItemsOut(cChunk & a_Chunk, Int64 a_CurrentTick) // Convert coords to relative: auto relCoord = a_Chunk.AbsoluteToRelative(out.second); - auto destChunk = a_Chunk.GetRelNeighborChunkAdjustCoords(relCoord.x, relCoord.z); + auto destChunk = a_Chunk.GetRelNeighborChunkAdjustCoords(relCoord); if (destChunk == nullptr) { // The destination chunk has been unloaded, don't tick @@ -379,7 +379,7 @@ bool cHopperEntity::MoveItemsFromChest(cChunk & a_Chunk) for (const auto & ofs: neighborOfs) { auto neighborRelCoord = ofs.addedXZ(m_RelX, m_RelZ); - auto neighbor = a_Chunk.GetRelNeighborChunkAdjustCoords(neighborRelCoord.x, neighborRelCoord.z); + auto neighbor = a_Chunk.GetRelNeighborChunkAdjustCoords(neighborRelCoord); if (neighbor == nullptr) { continue; @@ -543,7 +543,7 @@ bool cHopperEntity::MoveItemsToChest(cChunk & a_Chunk, Vector3i a_Coords) for (const auto & ofs: neighborOfs) { auto otherHalfRelCoord = relCoord + ofs; - auto neighbor = a_Chunk.GetRelNeighborChunkAdjustCoords(otherHalfRelCoord.x, otherHalfRelCoord.z); + auto neighbor = a_Chunk.GetRelNeighborChunkAdjustCoords(otherHalfRelCoord); if (neighbor == nullptr) { continue; -- cgit v1.2.3