summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLever.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:55:21 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:55:21 +0100
commit7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa (patch)
treefddcc5ad0b24efbae934366c749a4888caf37b52 /src/Blocks/BlockLever.h
parentRemoved obsoleted functions (diff)
downloadcuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar.gz
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar.bz2
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar.lz
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar.xz
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.tar.zst
cuberite-7eb3cabd19a26b47ac3c90342e9e63d9c6bcc7aa.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockLever.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 15fe2071c..5b0c89127 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -20,7 +20,7 @@ public:
// Flip the ON bit on/off using the XOR bitwise operation
NIBBLETYPE Meta = (a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08);
- a_World->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
+ a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_LEVER, Meta); // SetMeta doesn't work for unpowering levers, so setblock
a_World->BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
}