diff options
| author | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
|---|---|---|
| committer | daoge_cmd <3523206925@qq.com> | 2026-03-01 12:16:08 +0800 |
| commit | b691c43c44ff180d10e7d4a9afc83b98551ff586 (patch) | |
| tree | 3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/CompoundContainer.h | |
| parent | def8cb415354ac390b7e89052a50605285f1aca9 (diff) | |
Initial commit
Diffstat (limited to 'Minecraft.World/CompoundContainer.h')
| -rw-r--r-- | Minecraft.World/CompoundContainer.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Minecraft.World/CompoundContainer.h b/Minecraft.World/CompoundContainer.h new file mode 100644 index 00000000..b0b8b934 --- /dev/null +++ b/Minecraft.World/CompoundContainer.h @@ -0,0 +1,36 @@ +#pragma once +using namespace std; + +#include "Container.h" + +class Player; + +class CompoundContainer : public Container +{ +private: + int name; + shared_ptr<Container> c1, c2; + +public: + CompoundContainer(int name, shared_ptr<Container> c1, shared_ptr<Container> c2); + + unsigned int getContainerSize(); + + int getName(); + + shared_ptr<ItemInstance> getItem(unsigned int slot); + + shared_ptr<ItemInstance> removeItem(unsigned int slot, int i); + shared_ptr<ItemInstance> removeItemNoUpdate(int slot); + + void setItem(unsigned int slot, shared_ptr<ItemInstance> item); + + int getMaxStackSize(); + + void setChanged(); + + bool stillValid(shared_ptr<Player> player); + + virtual void startOpen(); + virtual void stopOpen(); +};
\ No newline at end of file |
