summaryrefslogtreecommitdiffstats
path: root/source/Blocks
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-22 20:16:56 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-22 20:16:56 +0200
commit5c22a9f5f0e1e072eb9034a79e3bfc465822deab (patch)
tree8599987620c943e0d4f20ef980758214c7cff74a /source/Blocks
parentIncrease piston delay to a second (diff)
downloadcuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.gz
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.bz2
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.lz
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.xz
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.zst
cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.zip
Diffstat (limited to 'source/Blocks')
-rw-r--r--source/Blocks/BlockComparator.cpp9
-rw-r--r--source/Blocks/BlockComparator.h1
-rw-r--r--source/Blocks/BlockLever.cpp10
-rw-r--r--source/Blocks/BlockLever.h1
-rw-r--r--source/Blocks/BlockRedstoneRepeater.cpp9
-rw-r--r--source/Blocks/BlockRedstoneRepeater.h1
6 files changed, 1 insertions, 30 deletions
diff --git a/source/Blocks/BlockComparator.cpp b/source/Blocks/BlockComparator.cpp
index 87a10dc88..72453a816 100644
--- a/source/Blocks/BlockComparator.cpp
+++ b/source/Blocks/BlockComparator.cpp
@@ -38,15 +38,6 @@ void cBlockComparatorHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_Bl
-
-void cBlockComparatorHandler::OnDigging(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
-{
- OnUse(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NONE, 8, 8, 8);
-}
-
-
-
-
bool cBlockComparatorHandler::GetPlacementBlockTypeMeta(
cWorld * a_World, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace,
diff --git a/source/Blocks/BlockComparator.h b/source/Blocks/BlockComparator.h
index 208727107..b80c9c72c 100644
--- a/source/Blocks/BlockComparator.h
+++ b/source/Blocks/BlockComparator.h
@@ -15,7 +15,6 @@ public:
cBlockComparatorHandler(BLOCKTYPE a_BlockType);
virtual void OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override;
- virtual void OnDigging(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) override;
virtual void OnUse(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override;
diff --git a/source/Blocks/BlockLever.cpp b/source/Blocks/BlockLever.cpp
index bd70cfd1b..96b5fc368 100644
--- a/source/Blocks/BlockLever.cpp
+++ b/source/Blocks/BlockLever.cpp
@@ -23,6 +23,7 @@ void cBlockLeverHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX,
{
// Flip the ON bit on/off. Using XOR bitwise operation to turn it on/off.
NIBBLETYPE Meta = ((a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08) & 0x0f);
+
a_World->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
if (Meta & 0x08)
{
@@ -37,12 +38,3 @@ void cBlockLeverHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX,
-
-void cBlockLeverHandler::OnDigging(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
-{
- OnUse(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NONE, 8, 8, 8);
-}
-
-
-
-
diff --git a/source/Blocks/BlockLever.h b/source/Blocks/BlockLever.h
index ddf48297c..416d7685f 100644
--- a/source/Blocks/BlockLever.h
+++ b/source/Blocks/BlockLever.h
@@ -14,7 +14,6 @@ class cBlockLeverHandler :
public:
cBlockLeverHandler(BLOCKTYPE a_BlockType);
- virtual void OnDigging(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) override;
virtual void OnUse(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override;
diff --git a/source/Blocks/BlockRedstoneRepeater.cpp b/source/Blocks/BlockRedstoneRepeater.cpp
index 8cfb48f4d..672fdf55a 100644
--- a/source/Blocks/BlockRedstoneRepeater.cpp
+++ b/source/Blocks/BlockRedstoneRepeater.cpp
@@ -36,15 +36,6 @@ void cBlockRedstoneRepeaterHandler::OnUse(cWorld *a_World, cPlayer *a_Player, in
-
-void cBlockRedstoneRepeaterHandler::OnDigging(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
-{
- OnUse(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NONE, 8, 8, 8);
-}
-
-
-
-
bool cBlockRedstoneRepeaterHandler::GetPlacementBlockTypeMeta(
cWorld * a_World, cPlayer * a_Player,
int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace,
diff --git a/source/Blocks/BlockRedstoneRepeater.h b/source/Blocks/BlockRedstoneRepeater.h
index 21f227332..01d9de96d 100644
--- a/source/Blocks/BlockRedstoneRepeater.h
+++ b/source/Blocks/BlockRedstoneRepeater.h
@@ -15,7 +15,6 @@ public:
cBlockRedstoneRepeaterHandler(BLOCKTYPE a_BlockType);
virtual void OnDestroyed(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ) override;
- virtual void OnDigging(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) override;
virtual void OnUse(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override;