1
0

Fixed formatting, made function static.

This commit is contained in:
madmaxoft 2014-04-19 13:05:58 +02:00
parent 5f3df1445f
commit 6eac586794
2 changed files with 18 additions and 13 deletions

View File

@ -17,7 +17,7 @@ cBeaconEntity::cBeaconEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld *
int cBeaconEntity::GetPyramidLevel() int cBeaconEntity::GetPyramidLevel(void)
{ {
cBlockArea Area; cBlockArea Area;
int MinY = GetPosY() - 4; int MinY = GetPosY() - 4;
@ -33,12 +33,9 @@ int cBeaconEntity::GetPyramidLevel()
Area.Read( Area.Read(
m_World, m_World,
GetPosX() - 4, GetPosX() - 4, GetPosX() + 4,
GetPosX() + 4, MinY, MaxY,
MinY, GetPosZ() - 4, GetPosZ() + 4,
MaxY,
GetPosZ() - 4,
GetPosZ() + 4,
cBlockArea::baTypes cBlockArea::baTypes
); );
@ -112,4 +109,8 @@ void cBeaconEntity::SendTo(cClientHandle & a_Client)
void cBeaconEntity::UsedBy(cPlayer * a_Player) void cBeaconEntity::UsedBy(cPlayer * a_Player)
{ {
} }

View File

@ -23,18 +23,22 @@ class cBeaconEntity :
public: public:
// The initial constructor /** The initial constructor */
cBeaconEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World); cBeaconEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cWorld * a_World);
// Returns the amount of layers the pyramid below the beacon has. /** Returns the amount of layers the pyramid below the beacon has. */
int GetPyramidLevel(void); int GetPyramidLevel(void);
// Returns true if the block is a diamond block, an golden block, an iron block or an emerald block. /** Returns true if the block is a diamond block, a golden block, an iron block or an emerald block. */
bool IsMineralBlock(BLOCKTYPE a_BlockType); static bool IsMineralBlock(BLOCKTYPE a_BlockType);
// cBlockEntity overrides: // cBlockEntity overrides:
virtual void SaveToJson(Json::Value& a_Value ) override; virtual void SaveToJson(Json::Value& a_Value ) override;
virtual void SendTo(cClientHandle & a_Client) override; virtual void SendTo(cClientHandle & a_Client) override;
virtual void UsedBy(cPlayer * a_Player) override; virtual void UsedBy(cPlayer * a_Player) override;
virtual bool Tick(float a_Dt, cChunk & /* a_Chunk */) override; virtual bool Tick(float a_Dt, cChunk & /* a_Chunk */) override;
} ; } ;