diff options
author | madmaxoft <github@xoft.cz> | 2014-02-04 18:38:10 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-04 18:38:10 +0100 |
commit | 634331fd3b84c4099dfbfbbde3edebf2a1f221eb (patch) | |
tree | f06e7365d10d3d3f5d4baa051d5739d8315f9457 | |
parent | Fixed indent from previous commits. (diff) | |
download | cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar.gz cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar.bz2 cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar.lz cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar.xz cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.tar.zst cuberite-634331fd3b84c4099dfbfbbde3edebf2a1f221eb.zip |
-rw-r--r-- | src/Blocks/BlockChest.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Blocks/BlockChest.h b/src/Blocks/BlockChest.h index 014b98063..280f2f288 100644 --- a/src/Blocks/BlockChest.h +++ b/src/Blocks/BlockChest.h @@ -110,9 +110,11 @@ public: return "step.wood"; } - virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, const cChunk & a_Chunk) override + virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override { - return CanBeAt(a_ChunkInterface, a_BlockX, a_BlockY, a_BlockZ); + int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; + int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; + return CanBeAt(a_ChunkInterface, BlockX, a_RelY, BlockZ); } |