summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockSignPost.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockSignPost.h')
-rw-r--r--src/Blocks/BlockSignPost.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h
index b96498cbd..89da77fbb 100644
--- a/src/Blocks/BlockSignPost.h
+++ b/src/Blocks/BlockSignPost.h
@@ -30,12 +30,13 @@ private:
virtual bool CanBeAt(const cChunk & a_Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta) const override
{
- if (a_Position.y <= 0)
+ const auto BelowPos = a_Position.addedY(-1);
+ if (!cChunkDef::IsValidHeight(BelowPos))
{
return false;
}
- BLOCKTYPE Type = a_Chunk.GetBlock(a_Position.addedY(-1));
+ BLOCKTYPE Type = a_Chunk.GetBlock(BelowPos);
return (Type == E_BLOCK_SIGN_POST) || (Type == E_BLOCK_WALLSIGN) || cBlockInfo::IsSolid(Type);
}