summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockWallSign.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockWallSign.h')
-rw-r--r--src/Blocks/BlockWallSign.h53
1 files changed, 22 insertions, 31 deletions
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index 87c0355a9..1e9ea2e1f 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -15,16 +15,30 @@ class cBlockWallSignHandler:
public:
- cBlockWallSignHandler(BLOCKTYPE a_BlockType):
- Super(a_BlockType)
+ using Super::Super;
+
+ /** Converts the block face of the neighbor to which the wallsign is attached to the wallsign block's meta. */
+ static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_NeighborBlockFace)
{
+ switch (a_NeighborBlockFace)
+ {
+ case BLOCK_FACE_ZM: return 0x02;
+ case BLOCK_FACE_ZP: return 0x03;
+ case BLOCK_FACE_XM: return 0x04;
+ case BLOCK_FACE_XP: return 0x05;
+ case BLOCK_FACE_NONE:
+ case BLOCK_FACE_YP:
+ case BLOCK_FACE_YM:
+ {
+ break;
+ }
+ }
+ return 0x02;
}
+private:
-
-
-
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) override
+ virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
{
return cItem(E_ITEM_SIGN, 1, 0);
}
@@ -33,7 +47,7 @@ public:
- virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a_RelPos, const cChunk & a_Chunk) override
+ virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, const Vector3i a_RelPos, const cChunk & a_Chunk) const override
{
auto NeighborPos = a_RelPos + GetOffsetBehindTheSign(a_Chunk.GetMeta(a_RelPos));
BLOCKTYPE NeighborType;
@@ -68,30 +82,7 @@ public:
- /** Converts the block face of the neighbor to which the wallsign is attached to the wallsign block's meta. */
- static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_NeighborBlockFace)
- {
- switch (a_NeighborBlockFace)
- {
- case BLOCK_FACE_ZM: return 0x02;
- case BLOCK_FACE_ZP: return 0x03;
- case BLOCK_FACE_XM: return 0x04;
- case BLOCK_FACE_XP: return 0x05;
- case BLOCK_FACE_NONE:
- case BLOCK_FACE_YP:
- case BLOCK_FACE_YM:
- {
- break;
- }
- }
- return 0x02;
- }
-
-
-
-
-
- virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
{
UNUSED(a_Meta);
return 13;