summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemDye.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Items/ItemDye.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h
index 636a1b477..b0f00b9ba 100644
--- a/src/Items/ItemDye.h
+++ b/src/Items/ItemDye.h
@@ -54,10 +54,12 @@ public:
// Cocoa (brown dye) can be planted on jungle logs:
BLOCKTYPE BlockType;
NIBBLETYPE BlockMeta;
- a_World->GetBlockTypeMeta(a_ClickedBlockPos, BlockType, BlockMeta);
// Check if the block that the player clicked is a jungle log.
- if ((BlockType != E_BLOCK_LOG) || ((BlockMeta & 0x03) != E_META_LOG_JUNGLE))
+ if (
+ !a_World->GetBlockTypeMeta(a_ClickedBlockPos, BlockType, BlockMeta) ||
+ ((BlockType != E_BLOCK_LOG) || ((BlockMeta & 0x03) != E_META_LOG_JUNGLE))
+ )
{
return false;
}