diff options
Diffstat (limited to 'src/Blocks/BlockComparator.h')
-rw-r--r-- | src/Blocks/BlockComparator.h | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/src/Blocks/BlockComparator.h b/src/Blocks/BlockComparator.h index 18aa2a8b9..9ce9d3dbd 100644 --- a/src/Blocks/BlockComparator.h +++ b/src/Blocks/BlockComparator.h @@ -2,17 +2,17 @@ #pragma once #include "BlockHandler.h" -#include "BlockRedstoneRepeater.h" -#include "Mixins.h" +#include "Mixins/Mixins.h" +#include "Mixins/SolidSurfaceUnderneath.h" class cBlockComparatorHandler 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: @@ -152,41 +152,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_COMPARATOR, 1, 0); |