summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-15 17:40:09 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-15 17:40:09 +0200
commit91a13c8e8793109e072a03dc67554ea109ac08e9 (patch)
tree86ab5ea38130c326e497c79cbe6fa06dbe5dc10e /source
parentMycelium now has correct placement sound (diff)
downloadcuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.gz
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.bz2
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.lz
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.xz
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.zst
cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.zip
Diffstat (limited to 'source')
-rw-r--r--source/Piston.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp
index f4244d177..b5fda1600 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -270,7 +270,13 @@ bool cPiston::CanPull(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
return false;
}
}
- return CanPush(a_BlockType, a_BlockMeta) || CanBreakPush(a_BlockType, a_BlockMeta);
+
+ if (CanBreakPush(a_BlockType, a_BlockMeta))
+ {
+ return false; // CanBreakPush returns true, but we need false to prevent pulling
+ }
+
+ return CanPush(a_BlockType, a_BlockMeta);
}