summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockTorch.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-10-05 12:27:14 +0200
committerGitHub <noreply@github.com>2020-10-05 12:27:14 +0200
commita9031b6bae742b333b1b390192fa590f2ecb07ea (patch)
treeb2802c81d24d339c201a0747d66ba44e9ea8b1b0 /src/Blocks/BlockTorch.h
parentFixed current end generator (#4968) (diff)
downloadcuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.gz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.bz2
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.lz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.xz
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.tar.zst
cuberite-a9031b6bae742b333b1b390192fa590f2ecb07ea.zip
Diffstat (limited to 'src/Blocks/BlockTorch.h')
-rw-r--r--src/Blocks/BlockTorch.h49
1 files changed, 46 insertions, 3 deletions
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index a3ded9369..f8b4bfa04 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -8,15 +8,20 @@
-class cBlockTorchHandler:
- public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>
+
+class cBlockTorchBaseHandler :
+ public cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>
{
- using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>;
+ using Super = cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>;
public:
using Super::Super;
+protected:
+
+ ~cBlockTorchBaseHandler() = default;
+
private:
virtual bool GetPlacementBlockTypeMeta(
@@ -214,3 +219,41 @@ private:
+
+class cBlockTorchHandler final :
+ public cClearMetaOnDrop<cBlockTorchBaseHandler>
+{
+ using Super = cClearMetaOnDrop<cBlockTorchBaseHandler>;
+
+public:
+
+ using Super::Super;
+};
+
+
+
+
+
+class cBlockRedstoneTorchHandler final :
+ public cBlockTorchBaseHandler
+{
+ using Super = cBlockTorchBaseHandler;
+
+public:
+
+ using Super::Super;
+
+private:
+
+ virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
+ {
+ // Always drop the ON torch, meta 0:
+ return { E_BLOCK_REDSTONE_TORCH_ON };
+ }
+
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
+ {
+ UNUSED(a_Meta);
+ return 0;
+ }
+};