summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockRedstoneWire.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-07 21:03:21 +0100
committerGitHub <noreply@github.com>2024-11-07 21:03:21 +0100
commitab62fc398818d717b54110b13e1b3af48e07b686 (patch)
treed76804f9c594695ac3b90a00687b5398158df1f5 /src/Blocks/BlockRedstoneWire.h
parentAdded code to export definitions for a lua-language-server (#5475) (diff)
downloadcuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar.gz
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar.bz2
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar.lz
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar.xz
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.tar.zst
cuberite-ab62fc398818d717b54110b13e1b3af48e07b686.zip
Diffstat (limited to 'src/Blocks/BlockRedstoneWire.h')
-rw-r--r--src/Blocks/BlockRedstoneWire.h43
1 files changed, 3 insertions, 40 deletions
diff --git a/src/Blocks/BlockRedstoneWire.h b/src/Blocks/BlockRedstoneWire.h
index de8e59a40..edea704f4 100644
--- a/src/Blocks/BlockRedstoneWire.h
+++ b/src/Blocks/BlockRedstoneWire.h
@@ -2,17 +2,15 @@
#pragma once
#include "BlockHandler.h"
-#include "BlockSlab.h"
-#include "BlockStairs.h"
-#include "../Chunk.h"
+#include "Mixins/SolidSurfaceUnderneath.h"
class cBlockRedstoneWireHandler final :
- public cBlockHandler
+ public cSolidSurfaceUnderneath<cBlockHandler>
{
- using Super = cBlockHandler;
+ using Super = cSolidSurfaceUnderneath<cBlockHandler>;
public:
@@ -20,41 +18,6 @@ public:
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_DUST, 1, 0);