aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/CompoundContainer.h
blob: 1103f0008605d9d0a6615eb6f44dae82515696c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
using namespace std;

#include "Container.h"

class Player;

class CompoundContainer : public Container
{
private:
	int name;
	std::shared_ptr<Container> c1, c2;

public:
	CompoundContainer(int name, std::shared_ptr<Container> c1, std::shared_ptr<Container> c2);

	unsigned int getContainerSize();

	int getName();

	std::shared_ptr<ItemInstance> getItem(unsigned int slot);

	std::shared_ptr<ItemInstance> removeItem(unsigned int slot, int i);
	std::shared_ptr<ItemInstance> removeItemNoUpdate(int slot);

	void setItem(unsigned int slot, std::shared_ptr<ItemInstance> item);

	int getMaxStackSize();

	void setChanged();

	bool stillValid(std::shared_ptr<Player> player);

	virtual void startOpen();
	virtual void stopOpen();
};