summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BeaconEntity.h
blob: 1dfd745b2fdbab27b75257deb7372533d4829bc5 (plain) (blame)
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
37
38
39
40

#pragma once

#include "BlockEntity.h"





namespace Json
{
	class Value;
}





class cBeaconEntity :
	public cBlockEntity
{
	typedef cBlockEntity super;

public:
	
	// The initial constructor
	cBeaconEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
	
	// Returns the amount of layers the pyramid below the beacon has.
	int GetPyramidLevel(void);

	// Returns true if the block is a diamond block, an golden block, an iron block or an emerald block.
	bool IsMineralBlock(BLOCKTYPE a_BlockType);
	
	// cBlockEntity overrides:
	virtual void SaveToJson(Json::Value& a_Value )  override;
	virtual void SendTo(cClientHandle & a_Client)   override;
	virtual void UsedBy(cPlayer * a_Player)         override;
	virtual bool Tick(float a_Dt, cChunk & /* a_Chunk */) override;
} ;