summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/HopperEntity.cpp
diff options
context:
space:
mode:
authorNiLSPACE <NiLSPACE@users.noreply.github.com>2019-10-04 15:50:47 +0200
committerGitHub <noreply@github.com>2019-10-04 15:50:47 +0200
commit241d97bbf952794ba3c5c891f7f37fc5c49cccd3 (patch)
treec34ec9d578a5ff6768bcebb8534f2f8545453fe1 /src/BlockEntities/HopperEntity.cpp
parentAdded another check if the item is place able (#4404) (diff)
downloadcuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar.gz
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar.bz2
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar.lz
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar.xz
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.tar.zst
cuberite-241d97bbf952794ba3c5c891f7f37fc5c49cccd3.zip
Diffstat (limited to 'src/BlockEntities/HopperEntity.cpp')
-rw-r--r--src/BlockEntities/HopperEntity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index ea1e12008..a0705e996 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -148,7 +148,7 @@ bool cHopperEntity::MoveItemsIn(cChunk & a_Chunk, Int64 a_CurrentTick)
// Try moving an item in:
bool res = false;
- switch (a_Chunk.GetBlock(GetRelPos()))
+ switch (a_Chunk.GetBlock(GetRelPos().addedY(1)))
{
case E_BLOCK_TRAPPED_CHEST:
case E_BLOCK_CHEST:
@@ -168,7 +168,7 @@ bool cHopperEntity::MoveItemsIn(cChunk & a_Chunk, Int64 a_CurrentTick)
case E_BLOCK_DROPPER:
case E_BLOCK_HOPPER:
{
- res = MoveItemsFromGrid(*static_cast<cBlockEntityWithItems *>(a_Chunk.GetBlockEntity(GetRelPos().addedY(1))));
+ res = MoveItemsFromGrid(*static_cast<cBlockEntityWithItems *>(a_Chunk.GetBlockEntity(this->GetPos().addedY(1))));
break;
}
}