summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-04-12 00:13:16 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2014-04-12 00:13:16 +0200
commite19556ebf6a3a452a31b4e327f6018637418100a (patch)
treee7fceb6327272c37a35c863ddcd85d0ef03137fb /src
parentImplemented the skeleton code for the beacon. (diff)
downloadcuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar.gz
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar.bz2
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar.lz
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar.xz
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.tar.zst
cuberite-e19556ebf6a3a452a31b4e327f6018637418100a.zip
Diffstat (limited to 'src')
-rw-r--r--src/BlockEntities/BeaconEntity.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/BlockEntities/BeaconEntity.cpp b/src/BlockEntities/BeaconEntity.cpp
index e5e890dbc..b5a503192 100644
--- a/src/BlockEntities/BeaconEntity.cpp
+++ b/src/BlockEntities/BeaconEntity.cpp
@@ -35,25 +35,17 @@ int cBeaconEntity::GetPyramidLevel()
for (int Y = Area.GetSizeY() - 1; Y > 0; Y--)
{
- bool FullLayer = true;
for (int X = MiddleXZ - Layer; X <= (MiddleXZ + Layer); X++)
{
for (int Z = MiddleXZ - Layer; Z <= (MiddleXZ + Layer); Z++)
{
if (!IsMineralBlock(Area.GetRelBlockType(X, Y, Z)))
{
- FullLayer = false;
+ return Layer;
}
}
}
- if (!FullLayer)
- {
- break;
- }
- else
- {
- Layer++;
- }
+ Layer++;
}
return Layer;
@@ -84,6 +76,7 @@ bool cBeaconEntity::IsMineralBlock(BLOCKTYPE a_BlockType)
bool cBeaconEntity::Tick(float a_Dt, cChunk & a_Chunk)
{
+ std::cout << GetPyramidLevel() << "\n";
return false;
}