diff options
author | Bond-009 <bond.009@outlook.com> | 2017-11-20 12:13:11 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-11-20 12:13:11 +0100 |
commit | 5badb9bccae803009bde182bf69ee0d02a36b22c (patch) | |
tree | 31fabd74fcee1138d4cacd0c437892c68c6defa9 /src/Blocks/BlockDoor.h | |
parent | cItemHandler: Update max stack size of old doors. (#4072) (diff) | |
download | cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.gz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.bz2 cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.lz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.xz cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.tar.zst cuberite-5badb9bccae803009bde182bf69ee0d02a36b22c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Blocks/BlockDoor.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h index 77dc8ca70..7413b180a 100644 --- a/src/Blocks/BlockDoor.h +++ b/src/Blocks/BlockDoor.h @@ -40,8 +40,8 @@ public: } if ( - !CanReplaceBlock(a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ)) || - !CanReplaceBlock(a_ChunkInterface.GetBlock(a_BlockX, a_BlockY + 1, a_BlockZ)) + !CanReplaceBlock(a_ChunkInterface.GetBlock({a_BlockX, a_BlockY, a_BlockZ})) || + !CanReplaceBlock(a_ChunkInterface.GetBlock({a_BlockX, a_BlockY + 1, a_BlockZ})) ) { return false; @@ -233,14 +233,14 @@ public: Fails gracefully for (invalid) doors on the world's top and bottom. */ static NIBBLETYPE GetCompleteDoorMeta(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ) { - NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); + NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta({a_BlockX, a_BlockY, a_BlockZ}); if ((Meta & 0x08) != 0) { // The coords are pointing at the top part of the door if (a_BlockY > 0) { - NIBBLETYPE DownMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY - 1, a_BlockZ); + NIBBLETYPE DownMeta = a_ChunkInterface.GetBlockMeta({a_BlockX, a_BlockY - 1, a_BlockZ}); return static_cast<NIBBLETYPE>((DownMeta & 0x07) | 0x08 | (Meta << 4)); } // This is the top part of the door at the bottommost layer of the world, there's no bottom: @@ -251,7 +251,7 @@ public: // The coords are pointing at the bottom part of the door if (a_BlockY < cChunkDef::Height - 1) { - NIBBLETYPE UpMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY + 1, a_BlockZ); + NIBBLETYPE UpMeta = a_ChunkInterface.GetBlockMeta({a_BlockX, a_BlockY + 1, a_BlockZ}); return static_cast<NIBBLETYPE>(Meta | (UpMeta << 4)); } // This is the bottom part of the door at the topmost layer of the world, there's no top: @@ -262,7 +262,7 @@ public: /** Sets the door to the specified state. If the door is already in that state, does nothing. */ static void SetOpen(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_Open) { - BLOCKTYPE Block = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ); + BLOCKTYPE Block = a_ChunkInterface.GetBlock({a_BlockX, a_BlockY, a_BlockZ}); if (!IsDoorBlockType(Block)) { return; |