From 9e44b0aae164f2456a452714f869cc9670732d8e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 6 Jul 2014 23:50:22 +0100 Subject: Implemented trapped chests & others + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes --- src/Blocks/BlockPiston.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/Blocks/BlockPiston.h') 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 } -- cgit v1.2.3