diff options
author | Alexander Harkness <me@bearbin.net> | 2024-11-07 00:31:57 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2024-11-07 00:39:01 +0100 |
commit | 457ec3db25543dfd730425c0aeef874f1c3fea3e (patch) | |
tree | b99e444ec72e67b2bbbfc9d2fcf6052024583549 /src/Blocks/BlockSnow.h | |
parent | Added code to export definitions for a lua-language-server (#5475) (diff) | |
download | cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar.gz cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar.bz2 cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar.lz cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar.xz cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.tar.zst cuberite-457ec3db25543dfd730425c0aeef874f1c3fea3e.zip |
Diffstat (limited to 'src/Blocks/BlockSnow.h')
-rw-r--r-- | src/Blocks/BlockSnow.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockSnow.h b/src/Blocks/BlockSnow.h index f3fa87a1b..51361ce17 100644 --- a/src/Blocks/BlockSnow.h +++ b/src/Blocks/BlockSnow.h @@ -69,11 +69,11 @@ 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; } - auto BelowPos = a_Position.addedY(-1); auto BlockBelow = a_Chunk.GetBlock(BelowPos); auto MetaBelow = a_Chunk.GetMeta(BelowPos); return CanBeOn(BlockBelow, MetaBelow); |