summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-03-02 16:16:22 +0100
committerHowaner <franzi.moos@googlemail.com>2014-03-02 16:16:22 +0100
commit5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3 (patch)
treed6fa4d83a08c18ba3b8d0f42e749f0c80f9d0ca7 /src/World.cpp
parentAdd Trapdoor Functions to cWorld and fix Trapdoor Redstone Bugs (diff)
downloadcuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar.gz
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar.bz2
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar.lz
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar.xz
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.tar.zst
cuberite-5e427ee82592bd411a6b7ae0e9f1bd574ff68eb3.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/World.cpp b/src/World.cpp
index ca72d2e20..6c9ea7453 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -2649,12 +2649,14 @@ bool cWorld::SetCommandBlockCommand(int a_BlockX, int a_BlockY, int a_BlockZ, co
bool cWorld::IsTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ)
{
- if (GetBlock(a_BlockX, a_BlockY, a_BlockZ) != E_BLOCK_TRAPDOOR)
+ BLOCKTYPE Block;
+ NIBBLETYPE Meta;
+ GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, Block, Meta);
+ if (Block != E_BLOCK_TRAPDOOR)
{
return false;
}
- NIBBLETYPE Meta = GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
return (Meta & 0x4) > 0;
}
@@ -2664,12 +2666,14 @@ bool cWorld::IsTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ)
bool cWorld::SetTrapdoorOpen(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_Open)
{
- if (GetBlock(a_BlockX, a_BlockY, a_BlockZ) != E_BLOCK_TRAPDOOR)
+ BLOCKTYPE Block;
+ NIBBLETYPE Meta;
+ GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, Block, Meta);
+ if (Block != E_BLOCK_TRAPDOOR)
{
return false;
}
- NIBBLETYPE Meta = GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
bool IsOpen = (Meta & 0x4) > 0;
if (a_Open != IsOpen)
{