summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPiston.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-07 00:50:22 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-07 00:50:22 +0200
commit9e44b0aae164f2456a452714f869cc9670732d8e (patch)
tree952cf9c8aca9c1b200b8285586e48e50a0188667 /src/Blocks/BlockPiston.h
parentFixed OpenSSL programs and tests being generated when testing disabled. (diff)
downloadcuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.gz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.bz2
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.lz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.xz
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.tar.zst
cuberite-9e44b0aae164f2456a452714f869cc9670732d8e.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPiston.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h
index e6fa48e54..3913da320 100644
--- a/src/Blocks/BlockPiston.h
+++ b/src/Blocks/BlockPiston.h
@@ -104,6 +104,7 @@ private:
case E_BLOCK_ENCHANTMENT_TABLE:
case E_BLOCK_END_PORTAL:
case E_BLOCK_END_PORTAL_FRAME:
+ // Ender chests can totally be pushed/pulled in MCS :)
case E_BLOCK_FURNACE:
case E_BLOCK_LIT_FURNACE:
case E_BLOCK_HOPPER:
@@ -113,6 +114,7 @@ private:
case E_BLOCK_NOTE_BLOCK:
case E_BLOCK_OBSIDIAN:
case E_BLOCK_PISTON_EXTENSION:
+ case E_BLOCK_TRAPPED_CHEST:
{
return false;
}
@@ -126,24 +128,10 @@ private:
return true;
}
- /// Returns true if the specified block can be pushed by a piston and broken / replaced
- static inline bool CanBreakPush(BLOCKTYPE a_BlockType) { return cBlockInfo::IsPistonBreakable(a_BlockType); }
-
/// Returns true if the specified block can be pulled by a sticky piston
static inline bool CanPull(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
- switch (a_BlockType)
- {
- case E_BLOCK_LAVA:
- case E_BLOCK_STATIONARY_LAVA:
- case E_BLOCK_STATIONARY_WATER:
- case E_BLOCK_WATER:
- {
- return false;
- }
- }
-
- if (CanBreakPush(a_BlockType))
+ if (cBlockInfo::IsPistonBreakable(a_BlockType))
{
return false; // CanBreakPush returns true, but we need false to prevent pulling
}