From 03c6bb9f85b929a99df2c800b8ba7d8ef4a8ec43 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 13 Jun 2013 07:36:43 +0000 Subject: Added hopper entity, it can suck items out of chests, dispensers, droppers and other hopppers above it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1587 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/UI/Window.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source/UI/Window.h') diff --git a/source/UI/Window.h b/source/UI/Window.h index 0ff87dc70..0be43e819 100644 --- a/source/UI/Window.h +++ b/source/UI/Window.h @@ -21,6 +21,7 @@ class cClientHandle; class cChestEntity; class cDropSpenserEntity; class cFurnaceEntity; +class cHopperEntity; class cSlotArea; class cWorld; @@ -110,8 +111,16 @@ public: /// Called when a player closes this window; notifies all slot areas. Returns true if close accepted virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse); + /// Sends the specified slot's contents to all clients of this window; the slot is specified as local in an area + void BroadcastSlot(cSlotArea * a_Area, int a_LocalSlotNum); + + /// Sends the contents of the whole window to the specified client void SendWholeWindow(cClientHandle & a_Client); + + /// Sends the contents of the whole window to all clients of this window. void BroadcastWholeWindow(void); + + /// Sends the progressbar to all clients of this window void BroadcastInventoryProgress(short a_Progressbar, short a_Value); // tolua_begin @@ -194,6 +203,7 @@ protected: class cCraftingWindow : public cWindow { + typedef cWindow super; public: cCraftingWindow(int a_BlockX, int a_BlockY, int a_BlockZ); } ; @@ -205,6 +215,7 @@ public: class cFurnaceWindow : public cWindow { + typedef cWindow super; public: cFurnaceWindow(int a_BlockX, int a_BlockY, int a_BlockZ, cFurnaceEntity * a_Furnace); } ; @@ -216,6 +227,7 @@ public: class cDropSpenserWindow : public cWindow { + typedef cWindow super; public: cDropSpenserWindow(int a_BlockX, int a_BlockY, int a_BlockZ, cDropSpenserEntity * a_Dispenser); } ; @@ -224,6 +236,18 @@ public: +class cHopperWindow : + public cWindow +{ + typedef cWindow super; +public: + cHopperWindow(int a_BlockX, int a_BlockY, int a_BlockZ, cHopperEntity * a_Hopper); +} ; + + + + + class cChestWindow : public cWindow { -- cgit v1.2.3