summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorMat <mail@mathias.is>2020-03-22 21:51:11 +0100
committerGitHub <noreply@github.com>2020-03-22 21:51:11 +0100
commit41e09484b78da4882dae770e52f98570271d5054 (patch)
tree48f10e7eb4f7a6e8c46b4413c880e77eaf12c240 /src/Blocks
parentAdd ambient mob sounds (#4521) (diff)
downloadcuberite-41e09484b78da4882dae770e52f98570271d5054.tar
cuberite-41e09484b78da4882dae770e52f98570271d5054.tar.gz
cuberite-41e09484b78da4882dae770e52f98570271d5054.tar.bz2
cuberite-41e09484b78da4882dae770e52f98570271d5054.tar.lz
cuberite-41e09484b78da4882dae770e52f98570271d5054.tar.xz
cuberite-41e09484b78da4882dae770e52f98570271d5054.tar.zst
cuberite-41e09484b78da4882dae770e52f98570271d5054.zip
Diffstat (limited to 'src/Blocks')
-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