diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-18 16:04:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-18 16:04:38 +0200 |
commit | fbbf12f3a6b1dd28f020b08ae73b075c60983a67 (patch) | |
tree | f0e554b0e385d0fb597029df71da3e685ad29f9e | |
parent | Properly fixed piston non-animation (diff) | |
download | cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar.gz cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar.bz2 cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar.lz cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar.xz cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.tar.zst cuberite-fbbf12f3a6b1dd28f020b08ae73b075c60983a67.zip |
-rw-r--r-- | source/Piston.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp index 4c8d56261..f83eb016d 100644 --- a/source/Piston.cpp +++ b/source/Piston.cpp @@ -62,7 +62,18 @@ unsigned short cPiston::FirstPassthroughBlock(int pistonX, int pistonY, int pist { AddDir( pistonX, pistonY, pistonZ, pistonmeta, 1) //Set the coords one further from the piston direction m_World->GetBlockTypeMeta(pistonX, pistonY, pistonZ, currBlock, currMeta); - if ((currBlock == E_BLOCK_BEDROCK) || (currBlock == E_BLOCK_OBSIDIAN) || (currBlock == E_BLOCK_PISTON_EXTENSION) || ( (currMeta & 0x8) != 0x0 )) + if ((currBlock == E_BLOCK_BEDROCK) || + (currBlock == E_BLOCK_OBSIDIAN) || + (currBlock == E_BLOCK_PISTON_EXTENSION) || + ( (currMeta & 0x8) != 0x0 ) || //Seems to include signs as well + (currBlock == E_BLOCK_CHEST) || + (currBlock == E_BLOCK_DISPENSER) || + (currBlock == E_BLOCK_DROPPER) || + (currBlock == E_BLOCK_FURNACE) || + (currBlock == E_BLOCK_LIT_FURNACE) || + (currBlock == E_BLOCK_HOPPER) || + (currBlock == E_BLOCK_JUKEBOX) || + (currBlock == E_BLOCK_NOTE_BLOCK)) { return 9001; } @@ -187,7 +198,15 @@ void cPiston::RetractPiston( int pistx, int pisty, int pistz ) (tempblock == E_BLOCK_BEDROCK) || (tempblock == E_BLOCK_PISTON_EXTENSION) || (g_BlockPistonBreakable[tempblock]) || - ((tempmeta & 0x8) != 0x0 ) + ( (tempmeta & 0x8) != 0x0 ) || //Seems to include signs as well + (tempblock == E_BLOCK_CHEST) || + (tempblock == E_BLOCK_DISPENSER) || + (tempblock == E_BLOCK_DROPPER) || + (tempblock == E_BLOCK_FURNACE) || + (tempblock == E_BLOCK_LIT_FURNACE) || + (tempblock == E_BLOCK_HOPPER) || + (tempblock == E_BLOCK_JUKEBOX) || + (tempblock == E_BLOCK_NOTE_BLOCK) ) { // These cannot be moved by the sticky piston, bail out |