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/BlockNetherWart.h | |
parent | Added code to export definitions for a lua-language-server (#5475) (diff) | |
download | cuberite-canbeat-cleanup.tar cuberite-canbeat-cleanup.tar.gz cuberite-canbeat-cleanup.tar.bz2 cuberite-canbeat-cleanup.tar.lz cuberite-canbeat-cleanup.tar.xz cuberite-canbeat-cleanup.tar.zst cuberite-canbeat-cleanup.zip |
Diffstat (limited to 'src/Blocks/BlockNetherWart.h')
-rw-r--r-- | src/Blocks/BlockNetherWart.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Blocks/BlockNetherWart.h b/src/Blocks/BlockNetherWart.h index 43081d511..c0686afc6 100644 --- a/src/Blocks/BlockNetherWart.h +++ b/src/Blocks/BlockNetherWart.h @@ -60,7 +60,8 @@ private: virtual bool CanBeAt(const cChunk & a_Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta) const override { // Needs to be placed on top of a Soulsand block: - return (a_Position.y > 0) && (a_Chunk.GetBlock(a_Position.addedY(-1)) == E_BLOCK_SOULSAND); + const auto BasePos = a_Position.addedY(-1); + return cChunkDef::IsValidHeight(BasePos) && (a_Chunk.GetBlock(BasePos) == E_BLOCK_SOULSAND); } |