summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-09-24 10:48:33 +0200
committerLukas Pioch <lukas@zgow.de>2015-11-03 18:00:55 +0100
commit9749c3aac9dbfbc46a919193c97bb9c9e5339e03 (patch)
tree7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/UI/SlotArea.h
parentMerge pull request #2595 from cengizIO/master (diff)
downloadcuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.gz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.bz2
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.lz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.xz
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.tar.zst
cuberite-9749c3aac9dbfbc46a919193c97bb9c9e5339e03.zip
Diffstat (limited to 'src/UI/SlotArea.h')
-rw-r--r--src/UI/SlotArea.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h
index b150c47a1..0ff36ce50 100644
--- a/src/UI/SlotArea.h
+++ b/src/UI/SlotArea.h
@@ -16,6 +16,7 @@
class cWindow;
class cPlayer;
class cBeaconEntity;
+class cBrewingstandEntity;
class cChestEntity;
class cEnderChestEntity;
class cFurnaceEntity;
@@ -456,6 +457,35 @@ protected:
+class cSlotAreaBrewingstand :
+ public cSlotArea,
+ public cItemGrid::cListener
+{
+ typedef cSlotArea super;
+
+public:
+ cSlotAreaBrewingstand(cBrewingstandEntity * a_Brewingstand, cWindow & a_ParentWindow);
+
+ virtual ~cSlotAreaBrewingstand();
+
+ virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override;
+ virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots, bool a_BackFill) override;
+ virtual const cItem * GetSlot(int a_SlotNum, cPlayer & a_Player) const override;
+ virtual void SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item) override;
+protected:
+ cBrewingstandEntity * m_Brewingstand;
+
+ // cItemGrid::cListener overrides:
+ virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override;
+
+ /** Called after an item has been brewed to handle statistics etc. */
+ void HandleBrewedItem(cPlayer & a_Player);
+} ;
+
+
+
+
+
class cSlotAreaMinecartWithChest :
public cSlotArea
{