aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.h
blob: b2cb8847f3b38bd286e11c1d28604ba1bb294e7b (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
#pragma once

#include "CompoundGameRuleDefinition.h"

class CompleteAllRuleDefinition : public CompoundGameRuleDefinition
{
private:
	typedef struct _packetData
	{
		int goal;
		int progress;
	} PacketData;

public:
	ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_CompleteAllRule; }

	virtual void getChildren(vector<GameRuleDefinition *> *children);

	virtual bool onUseTile(GameRule *rule, int tileId, int x, int y, int z);
	virtual bool onCollectItem(GameRule *rule, shared_ptr<ItemInstance> item);

	static wstring generateDescriptionString(const wstring &description, void *data, int dataLength);

private:
	void updateStatus(GameRule *rule);
};