diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/Blocks/BlockComparator.cpp | 9 | ||||
-rw-r--r-- | source/Blocks/BlockComparator.h | 1 | ||||
-rw-r--r-- | source/Blocks/BlockLever.cpp | 10 | ||||
-rw-r--r-- | source/Blocks/BlockLever.h | 1 | ||||
-rw-r--r-- | source/Blocks/BlockRedstoneRepeater.cpp | 9 | ||||
-rw-r--r-- | source/Blocks/BlockRedstoneRepeater.h | 1 |
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; |