diff options
author | 12xx12 <44411062+12xx12@users.noreply.github.com> | 2020-10-29 21:47:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-29 21:47:20 +0100 |
commit | 961d5eb420182add0b6cb4d92f260b885563389c (patch) | |
tree | c63fb7b3905d2ae59c539cca44845984128c27bb /src/Entities/EnderCrystal.cpp | |
parent | Remove BLOCKENTITY_PROTODEF (diff) | |
download | cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.gz cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.bz2 cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.lz cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.xz cuberite-961d5eb420182add0b6cb4d92f260b885563389c.tar.zst cuberite-961d5eb420182add0b6cb4d92f260b885563389c.zip |
Diffstat (limited to 'src/Entities/EnderCrystal.cpp')
-rw-r--r-- | src/Entities/EnderCrystal.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Entities/EnderCrystal.cpp b/src/Entities/EnderCrystal.cpp index 4f2bd857f..269714b58 100644 --- a/src/Entities/EnderCrystal.cpp +++ b/src/Entities/EnderCrystal.cpp @@ -10,8 +10,9 @@ -cEnderCrystal::cEnderCrystal(Vector3d a_Pos): - Super(etEnderCrystal, a_Pos, 1.0, 1.0) +cEnderCrystal::cEnderCrystal(Vector3d a_Pos, bool a_ShowBottom): + Super(etEnderCrystal, a_Pos, 1.0, 1.0), + m_ShowBottom(a_ShowBottom) { SetMaxHealth(5); } @@ -33,6 +34,10 @@ void cEnderCrystal::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { UNUSED(a_Dt); // No further processing (physics e.t.c.) is needed + if (m_World->GetDimension() == dimEnd) + { + m_World->SetBlock(POS_TOINT.addedY(1), E_BLOCK_FIRE, 0); + } } @@ -47,8 +52,7 @@ void cEnderCrystal::KilledBy(TakeDamageInfo & a_TDI) Destroy(); - m_World->SetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT, E_BLOCK_BEDROCK, 0); - m_World->SetBlock(POSX_TOINT, POSY_TOINT + 1, POSZ_TOINT, E_BLOCK_FIRE, 0); + m_World->SetBlock(POSX_TOINT, POSY_TOINT, POSZ_TOINT, E_BLOCK_FIRE, 0); } |