From 634331fd3b84c4099dfbfbbde3edebf2a1f221eb Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 4 Feb 2014 18:38:10 +0100 Subject: Fixed chest placement. Fixes #624. --- src/Blocks/BlockChest.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Blocks') 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); } -- cgit v1.2.3