summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPiston.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 6ebbd784d..5c929c4c5 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -142,6 +142,11 @@ bool cBlockPistonHandler::CanPushBlock(
NIBBLETYPE currMeta;
a_World.GetBlockTypeMeta(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, currBlock, currMeta);
+ if (!cChunkDef::IsValidHeight(a_BlockPos.y))
+ {
+ return !a_RequirePushable;
+ }
+
if (currBlock == E_BLOCK_AIR)
{
// Air can be pushed