summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-12 23:34:32 +0200
committermadmaxoft <github@xoft.cz>2014-07-12 23:34:32 +0200
commitd72a81cb8e135695b947bea4bac320e21c9af278 (patch)
tree54be5ee62edd4463166986abb968aee5fe6b0f16
parentcChestEntity: Renamed a member to avoid confusion. (diff)
downloadcuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar.gz
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar.bz2
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar.lz
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar.xz
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.tar.zst
cuberite-d72a81cb8e135695b947bea4bac320e21c9af278.zip
-rw-r--r--src/BlockEntities/HopperEntity.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index 181b6a2ce..aaf82d150 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -403,12 +403,9 @@ bool cHopperEntity::MoveItemsFromChest(cChunk & a_Chunk)
}
BLOCKTYPE Block = Neighbor->GetBlock(x, m_PosY + 1, z);
- if (
- ((Block != E_BLOCK_CHEST) && (Block != E_BLOCK_TRAPPED_CHEST)) ||
- ((Block == E_BLOCK_CHEST) && (Chest->GetBlockType() != E_BLOCK_CHEST)) ||
- ((Block == E_BLOCK_TRAPPED_CHEST) && (Chest->GetBlockType() != E_BLOCK_TRAPPED_CHEST))
- )
+ if (Block != Chest->GetBlockType())
{
+ // Not the same kind of chest
continue;
}
@@ -589,12 +586,9 @@ bool cHopperEntity::MoveItemsToChest(cChunk & a_Chunk, int a_BlockX, int a_Block
}
BLOCKTYPE Block = Neighbor->GetBlock(x, a_BlockY, z);
- if (
- ((Block != E_BLOCK_CHEST) && (Block != E_BLOCK_TRAPPED_CHEST)) ||
- ((Block == E_BLOCK_CHEST) && (Chest->GetBlockType() != E_BLOCK_CHEST)) ||
- ((Block == E_BLOCK_TRAPPED_CHEST) && (Chest->GetBlockType() != E_BLOCK_TRAPPED_CHEST))
- )
+ if (Block != Chest->GetBlockType())
{
+ // Not the same kind of chest
continue;
}