summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockRedstoneRepeater.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockRedstoneRepeater.h')
-rw-r--r--src/Blocks/BlockRedstoneRepeater.h44
1 files changed, 4 insertions, 40 deletions
diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h
index 893691d7b..92b4b3917 100644
--- a/src/Blocks/BlockRedstoneRepeater.h
+++ b/src/Blocks/BlockRedstoneRepeater.h
@@ -3,10 +3,9 @@
#include "BlockHandler.h"
#include "BlockType.h"
-#include "Mixins.h"
+#include "Mixins/Mixins.h"
+#include "Mixins/SolidSurfaceUnderneath.h"
#include "ChunkInterface.h"
-#include "BlockSlab.h"
-#include "BlockStairs.h"
#include "../Chunk.h"
@@ -14,9 +13,9 @@
class cBlockRedstoneRepeaterHandler final :
- public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
+ public cSolidSurfaceUnderneath<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>
{
- using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
+ using Super = cSolidSurfaceUnderneath<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
public:
@@ -107,41 +106,6 @@ private:
- virtual bool CanBeAt(const cChunk & a_Chunk, const Vector3i a_Position, const NIBBLETYPE a_Meta) const override
- {
- if (a_Position.y <= 0)
- {
- return false;
- }
-
- BLOCKTYPE BelowBlock;
- NIBBLETYPE BelowBlockMeta;
- a_Chunk.GetBlockTypeMeta(a_Position.addedY(-1), BelowBlock, BelowBlockMeta);
-
- if (cBlockInfo::FullyOccupiesVoxel(BelowBlock))
- {
- return true;
- }
-
- // upside down slabs
- if (cBlockSlabHandler::IsAnySlabType(BelowBlock))
- {
- return BelowBlockMeta & E_META_WOODEN_SLAB_UPSIDE_DOWN;
- }
-
- // upside down stairs
- if (cBlockStairsHandler::IsAnyStairType(BelowBlock))
- {
- return BelowBlockMeta & E_BLOCK_STAIRS_UPSIDE_DOWN;
- }
-
- return false;
- }
-
-
-
-
-
virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem * const a_Tool) const override
{
return cItem(E_ITEM_REDSTONE_REPEATER, 1, 0);