summaryrefslogtreecommitdiffstats
path: root/src/UI/SlotArea.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-03 22:06:43 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-03 22:06:43 +0100
commit1bc145ff44bee52d3b71812cc06ffe214f4ac216 (patch)
tree7ea9f3b0029bbf5041c2f05c7d3f3e156c3e6186 /src/UI/SlotArea.h
parentMerge pull request #2595 from cengizIO/master (diff)
parentImplemented brewing (diff)
downloadcuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.gz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.bz2
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.lz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.xz
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.tar.zst
cuberite-1bc145ff44bee52d3b71812cc06ffe214f4ac216.zip
Diffstat (limited to '')
-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
{