summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockStandingBanner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockStandingBanner.h')
-rw-r--r--src/Blocks/BlockStandingBanner.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockStandingBanner.h b/src/Blocks/BlockStandingBanner.h
index 391b7fde7..177e9a68c 100644
--- a/src/Blocks/BlockStandingBanner.h
+++ b/src/Blocks/BlockStandingBanner.h
@@ -31,12 +31,13 @@ public:
virtual bool CanBeAt(const cChunk & a_Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta) const override
{
- if (a_Position.y < 1)
+ const auto BelowPos = a_Position.addedY(-1);
+ if (!cChunkDef::IsValidHeight(BelowPos))
{
return false;
}
- return cBlockInfo::IsSolid(a_Chunk.GetBlock(a_Position.addedY(-1)));
+ return cBlockInfo::IsSolid(a_Chunk.GetBlock(BelowPos));
}