the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 65 lines 1.9 kB view raw
1#pragma once 2 3#include "AbstractContainerMenu.h" 4#include "Slot.h" 5 6class BrewingStandTileEntity; 7class Inventory; 8class Player; 9class Container; 10 11class BrewingStandMenu : public AbstractContainerMenu 12{ 13 // 4J Stu - Made public so that we can access these from the XUI menus 14public: 15 static const int INGREDIENT_SLOT = 3; 16 static const int BOTTLE_SLOT_START = 0; 17 static const int BOTTLE_SLOT_END = 2; 18 static const int INV_SLOT_START = INGREDIENT_SLOT + 1; 19 static const int INV_SLOT_END = INV_SLOT_START + 9 * 3; 20 static const int USE_ROW_SLOT_START = INV_SLOT_END; 21 static const int USE_ROW_SLOT_END = USE_ROW_SLOT_START + 9; 22 23private: 24 shared_ptr<BrewingStandTileEntity> brewingStand; 25 Slot *ingredientSlot; 26 27public: 28 BrewingStandMenu(shared_ptr<Inventory> inventory, shared_ptr<BrewingStandTileEntity> brewingStand); 29 30private: 31 int tc; 32 33public: 34 virtual void addSlotListener(ContainerListener *listener); 35 virtual void broadcastChanges(); 36 virtual void setData(int id, int value); 37 virtual bool stillValid(shared_ptr<Player> player); 38 virtual shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex); 39 40private: 41 class PotionSlot : public Slot 42 { 43 private: 44 shared_ptr<Player> player; 45 46 public: 47 PotionSlot(shared_ptr<Player> player, shared_ptr<Container> container, int slot, int x, int y); 48 49 virtual bool mayPlace(shared_ptr<ItemInstance> item); 50 virtual int getMaxStackSize() const; 51 virtual void onTake(shared_ptr<Player> player, shared_ptr<ItemInstance> carried); 52 static bool mayPlaceItem(shared_ptr<ItemInstance> item); 53 virtual bool mayCombine(shared_ptr<ItemInstance> item); // 4J Added 54 }; 55 56 class IngredientsSlot : public Slot 57 { 58 public: 59 IngredientsSlot(shared_ptr<Container> container, int slot, int x, int y); 60 61 virtual bool mayPlace(shared_ptr<ItemInstance> item); 62 virtual int getMaxStackSize() const; 63 virtual bool mayCombine(shared_ptr<ItemInstance> item); // 4J Added 64 }; 65};