From 758622336e6c8d7aa2d4b34d8eedc4aaed54a4f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Beltr=C3=A1n?= Date: Sun, 21 May 2017 11:48:33 +0200 Subject: Fixed invisible chests (#3722) Fixes #3479, #3403, #3696 --- src/BlockEntities/ChestEntity.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/BlockEntities/ChestEntity.cpp') diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp index 3791832e3..c3fb44a1b 100644 --- a/src/BlockEntities/ChestEntity.cpp +++ b/src/BlockEntities/ChestEntity.cpp @@ -5,6 +5,7 @@ #include "../Item.h" #include "../Entities/Player.h" #include "../UI/ChestWindow.h" +#include "../ClientHandle.h" @@ -35,10 +36,8 @@ cChestEntity::~cChestEntity() void cChestEntity::SendTo(cClientHandle & a_Client) { - // The chest entity doesn't need anything sent to the client when it's created / gets in the viewdistance - // All the actual handling is in the cWindow UI code that gets called when the chest is rclked - - UNUSED(a_Client); + // Send a dummy "number of players with chest open" packet to make the chest visible: + a_Client.SendBlockAction(m_PosX, m_PosY, m_PosZ, 1, 0, m_BlockType); } -- cgit v1.2.3