summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockDoor.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index 36dc788aa..ee511a290 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -96,6 +96,14 @@ public:
}
}
+ /** Returns true iff the door at the specified coords is open.
+ The coords may point to either the top part or the bottom part of the door. */
+ static bool IsOpen(cChunkInterface & a_ChunkInterface, const Vector3i a_BlockPos)
+ {
+ const auto Meta = GetCompleteDoorMeta(a_ChunkInterface, a_BlockPos);
+ return (Meta & 0x04) != 0;
+ }
+
/** Sets the door to the specified state. If the door is already in that state, does nothing. */
static void SetOpen(cChunkInterface & a_ChunkInterface, const Vector3i a_BlockPos, bool a_Open)
{
@@ -237,18 +245,6 @@ private:
- /** Returns true iff the door at the specified coords is open.
- The coords may point to either the top part or the bottom part of the door. */
- static NIBBLETYPE IsOpen(cChunkInterface & a_ChunkInterface, const Vector3i a_BlockPos)
- {
- NIBBLETYPE Meta = GetCompleteDoorMeta(a_ChunkInterface, a_BlockPos);
- return ((Meta & 0x04) != 0);
- }
-
-
-
-
-
/** Returns the complete meta composed from the both parts of the door as (TopMeta << 4) | BottomMeta
The coords may point to either part of the door.
The returned value has bit 3 (0x08) set iff the coords point to the top part of the door.