the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 40 lines 1.2 kB view raw
1#pragma once 2 3#include "AbstractContainerMenu.h" 4 5class CraftingContainer; 6class Container; 7 8class CraftingMenu : public AbstractContainerMenu 9{ 10 // 4J Stu Made these public for UI menus, perhaps should make friend class? 11public: 12 static const int RESULT_SLOT; 13 static const int CRAFT_SLOT_START; 14 static const int CRAFT_SLOT_END; 15 static const int INV_SLOT_START; 16 static const int INV_SLOT_END; 17 static const int USE_ROW_SLOT_START; 18 static const int USE_ROW_SLOT_END; 19 20public: 21 shared_ptr<CraftingContainer> craftSlots; 22 shared_ptr<Container> resultSlots; 23 24private: 25 Level *level; 26 int x, y, z; 27 28public: 29 CraftingMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt); 30 31 virtual void slotsChanged();// 4J used to take a shared_ptr<Container> but wasn't using it, so removed to simplify things 32 virtual void removed(shared_ptr<Player> player); 33 virtual bool stillValid(shared_ptr<Player> player); 34 virtual shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex); 35 virtual bool canTakeItemForPickAll(shared_ptr<ItemInstance> carried, Slot *target); 36 37 int getX() { return x; } 38 int getY() { return y; } 39 int getZ() { return z; } 40};