From f9008a4860dc9af9ca2e2ceb643064745269dcec Mon Sep 17 00:00:00 2001 From: Gargaj Date: Tue, 1 Dec 2015 23:12:44 +0100 Subject: allow use failures to propagate from the entity/block to the player --- src/Chunk.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Chunk.cpp') diff --git a/src/Chunk.cpp b/src/Chunk.cpp index e1edc0167..b991e073f 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1726,13 +1726,14 @@ void cChunk::SetAlwaysTicked(bool a_AlwaysTicked) -void cChunk::UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z) +bool cChunk::UseBlockEntity(cPlayer * a_Player, int a_X, int a_Y, int a_Z) { cBlockEntity * be = GetBlockEntity(a_X, a_Y, a_Z); if (be != nullptr) { - be->UsedBy(a_Player); + return be->UsedBy(a_Player); } + return false; } -- cgit v1.2.3