the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 29 lines 1.0 kB view raw
1#pragma once 2using namespace std; 3 4class ItemInstance; 5class Player; 6 7class Container 8{ 9public: 10 static const int LARGE_MAX_STACK_SIZE = 64; 11 12 // 4J-JEV: Added to distinguish between ender, bonus, small and large chests 13 virtual int getContainerType() { return -1; } 14 15 virtual unsigned int getContainerSize() = 0; 16 virtual shared_ptr<ItemInstance> getItem(unsigned int slot) = 0; 17 virtual shared_ptr<ItemInstance> removeItem(unsigned int slot, int count) = 0; 18 virtual shared_ptr<ItemInstance> removeItemNoUpdate(int slot) = 0; 19 virtual void setItem(unsigned int slot, shared_ptr<ItemInstance> item) = 0; 20 virtual wstring getName() = 0; 21 virtual wstring getCustomName() = 0; // 4J Stu added for sending over the network 22 virtual bool hasCustomName() = 0; 23 virtual int getMaxStackSize() const = 0; 24 virtual void setChanged() = 0; 25 virtual bool stillValid(shared_ptr<Player> player) = 0; 26 virtual void startOpen() = 0; 27 virtual void stopOpen() = 0; 28 virtual bool canPlaceItem(int slot, shared_ptr<ItemInstance> item) = 0; 29};