summaryrefslogtreecommitdiffstats
path: root/source/Blocks
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-12 07:46:41 +0200
committermadmaxoft <github@xoft.cz>2013-08-12 07:46:41 +0200
commit79ece8eb0db07d88e1f44239842b7ef44a33a2d4 (patch)
tree5e1d2b29b9f101557db1edf8650dc84fb73d5047 /source/Blocks
parentAdded cWorld:QueueSaveAllChunks() function for saving chunks asynchronously. (diff)
parentMerge pull request #77 from tonibm19/patch-1 (diff)
downloadcuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar.gz
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar.bz2
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar.lz
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar.xz
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.tar.zst
cuberite-79ece8eb0db07d88e1f44239842b7ef44a33a2d4.zip
Diffstat (limited to 'source/Blocks')
-rw-r--r--source/Blocks/BlockFlower.h2
-rw-r--r--source/Blocks/BlockTorch.h20
2 files changed, 6 insertions, 16 deletions
diff --git a/source/Blocks/BlockFlower.h b/source/Blocks/BlockFlower.h
index 202609538..952901ba5 100644
--- a/source/Blocks/BlockFlower.h
+++ b/source/Blocks/BlockFlower.h
@@ -32,7 +32,7 @@ public:
virtual bool DoesAllowBlockOnTop(void) override
{
- return false;
+ return true;
}
diff --git a/source/Blocks/BlockTorch.h b/source/Blocks/BlockTorch.h
index c94c4c436..99c1a7b75 100644
--- a/source/Blocks/BlockTorch.h
+++ b/source/Blocks/BlockTorch.h
@@ -109,21 +109,11 @@ public:
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_Direction)
{
- switch (a_BlockType)
- {
- case E_BLOCK_GLASS:
- case E_BLOCK_FENCE:
- case E_BLOCK_NETHER_BRICK_FENCE:
- case E_BLOCK_PISTON:
- case E_BLOCK_WORKBENCH:
- {
- return (a_Direction == 0x1); // allow only direction "standing on floor"
- }
-
- default:
- {
- return g_BlockIsSolid[a_BlockType];
- }
+ if ( g_BlockIsSolid[a_BlockType] ) {
+ return (a_Direction == 0x1); // allow only direction "standing on floor"
+ }
+ else {
+ return g_BlockIsSolid[a_BlockType];
}
}