cHopperEntity: Simplified chest conditions.
This commit is contained in:
parent
c4f1284d9c
commit
d72a81cb8e
@ -403,12 +403,9 @@ bool cHopperEntity::MoveItemsFromChest(cChunk & a_Chunk)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BLOCKTYPE Block = Neighbor->GetBlock(x, m_PosY + 1, z);
|
BLOCKTYPE Block = Neighbor->GetBlock(x, m_PosY + 1, z);
|
||||||
if (
|
if (Block != Chest->GetBlockType())
|
||||||
((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))
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
// Not the same kind of chest
|
||||||
continue;
|
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);
|
BLOCKTYPE Block = Neighbor->GetBlock(x, a_BlockY, z);
|
||||||
if (
|
if (Block != Chest->GetBlockType())
|
||||||
((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))
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
// Not the same kind of chest
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user