summaryrefslogtreecommitdiffstats
path: root/source/blocks/BlockRedstoneTorch.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-09 10:43:26 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-09 10:43:26 +0200
commit521087fc078e23a897a21b6d5e9c7a370bc35bac (patch)
treef8783f92be8dec9f9b4a30226182a14e8d748773 /source/blocks/BlockRedstoneTorch.h
parentGNUmakefile: added a profiled build ("make profile=1") (diff)
downloadcuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar.gz
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar.bz2
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar.lz
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar.xz
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.tar.zst
cuberite-521087fc078e23a897a21b6d5e9c7a370bc35bac.zip
Diffstat (limited to 'source/blocks/BlockRedstoneTorch.h')
-rw-r--r--source/blocks/BlockRedstoneTorch.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blocks/BlockRedstoneTorch.h b/source/blocks/BlockRedstoneTorch.h
index 0b8be74e1..c90e1362d 100644
--- a/source/blocks/BlockRedstoneTorch.h
+++ b/source/blocks/BlockRedstoneTorch.h
@@ -1,8 +1,13 @@
+
#pragma once
#include "BlockRedstone.h"
+#include "BlockTorch.h"
#include "../cTorch.h"
+
+
+
class cBlockRedstoneTorchHandler : public cBlockRedstoneHandler
{
public:
@@ -11,10 +16,10 @@ public:
{
}
+
virtual bool CanBePlacedAt(cWorld *a_World, int a_X, int a_Y, int a_Z, char a_Dir) override
{
- AddDirection( a_X, a_Y, a_Z, a_Dir, true );
- return a_World->GetBlock( a_X, a_Y, a_Z ) != E_BLOCK_AIR;
+ return cBlockTorchHandler::TorchCanBePlacedAt(a_World, a_X, a_Y, a_Z, a_Dir);
}
@@ -24,10 +29,12 @@ public:
return CanBePlacedAt(a_World, a_X, a_Y, a_Z, Dir);
}
- virtual int GetDropID() override
+
+ virtual int GetDropID(void) override
{
return E_ITEM_REDSTONE_TORCH_ON;
}
+
virtual bool CanBePlacedOnSide() override
{