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/Blocks/BlockBed.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Blocks/BlockBed.cpp') diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp index dfa392d9b..b980f80e0 100644 --- a/src/Blocks/BlockBed.cpp +++ b/src/Blocks/BlockBed.cpp @@ -81,7 +81,7 @@ private: -void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) +bool cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) { if (a_WorldInterface.GetDimension() != dimOverworld) { @@ -138,6 +138,7 @@ void cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface a_Player->SendMessageFailure("You can only sleep at night"); } } + return true; } -- cgit v1.2.3