Files
MinecraftConsoles/Minecraft.World/CompoundContainer.h

36 lines
743 B
C
Raw Normal View History

2026-03-01 12:16:08 +08:00
#pragma once
using namespace std;
#include "Container.h"
class Player;
class CompoundContainer : public Container
{
private:
int name;
std::shared_ptr<Container> c1, c2;
2026-03-01 12:16:08 +08:00
public:
CompoundContainer(int name, std::shared_ptr<Container> c1, std::shared_ptr<Container> c2);
2026-03-01 12:16:08 +08:00
unsigned int getContainerSize();
int getName();
std::shared_ptr<ItemInstance> getItem(unsigned int slot);
2026-03-01 12:16:08 +08:00
std::shared_ptr<ItemInstance> removeItem(unsigned int slot, int i);
std::shared_ptr<ItemInstance> removeItemNoUpdate(int slot);
2026-03-01 12:16:08 +08:00
void setItem(unsigned int slot, std::shared_ptr<ItemInstance> item);
2026-03-01 12:16:08 +08:00
int getMaxStackSize();
void setChanged();
bool stillValid(std::shared_ptr<Player> player);
2026-03-01 12:16:08 +08:00
virtual void startOpen();
virtual void stopOpen();
};