summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockRedstoneRepeater.h
diff options
context:
space:
mode:
authorMichal Havlíček <80639037+havel06@users.noreply.github.com>2023-01-25 21:46:34 +0100
committerGitHub <noreply@github.com>2023-01-25 21:46:34 +0100
commit7fdfb8644169a25805afd32f00ced38c1c14cec8 (patch)
tree33f107ef8a6e8c1821187294cbadd965418b6e3b /src/Blocks/BlockRedstoneRepeater.h
parentChanged Windows instructions to build out-of-source. (diff)
downloadcuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar.gz
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar.bz2
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar.lz
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar.xz
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.tar.zst
cuberite-7fdfb8644169a25805afd32f00ced38c1c14cec8.zip
Diffstat (limited to 'src/Blocks/BlockRedstoneRepeater.h')
-rw-r--r--src/Blocks/BlockRedstoneRepeater.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h
index 4b9650e90..893691d7b 100644
--- a/src/Blocks/BlockRedstoneRepeater.h
+++ b/src/Blocks/BlockRedstoneRepeater.h
@@ -2,9 +2,11 @@
#pragma once
#include "BlockHandler.h"
+#include "BlockType.h"
#include "Mixins.h"
#include "ChunkInterface.h"
#include "BlockSlab.h"
+#include "BlockStairs.h"
#include "../Chunk.h"
@@ -120,14 +122,19 @@ private:
{
return true;
}
- else if (cBlockSlabHandler::IsAnySlabType(BelowBlock))
+
+ // upside down slabs
+ if (cBlockSlabHandler::IsAnySlabType(BelowBlock))
{
- // Check if the slab is turned up side down
- if ((BelowBlockMeta & 0x08) == 0x08)
- {
- return true;
- }
+ return BelowBlockMeta & E_META_WOODEN_SLAB_UPSIDE_DOWN;
}
+
+ // upside down stairs
+ if (cBlockStairsHandler::IsAnyStairType(BelowBlock))
+ {
+ return BelowBlockMeta & E_BLOCK_STAIRS_UPSIDE_DOWN;
+ }
+
return false;
}