diff options
author | andrew <xdotftw@gmail.com> | 2014-03-25 10:40:54 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-03-25 10:40:54 +0100 |
commit | c8445cd93479d4729a180b21df1783449ce01b7e (patch) | |
tree | 3307357f0320f1ee42a69d7348e27584f2ab2b07 /src | |
parent | Fixed wither summoning (diff) | |
download | cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar.gz cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar.bz2 cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar.lz cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar.xz cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.tar.zst cuberite-c8445cd93479d4729a180b21df1783449ce01b7e.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Blocks/BlockMobHead.h | 29 | ||||
-rw-r--r-- | src/Mobs/Wither.cpp | 2 |
2 files changed, 17 insertions, 14 deletions
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h index 693240898..e172cee69 100644 --- a/src/Blocks/BlockMobHead.h +++ b/src/Blocks/BlockMobHead.h @@ -160,21 +160,24 @@ public: World->DoWithMobHeadAt(a_BlockX, a_BlockY, a_BlockZ, Callback); a_ChunkInterface.SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, a_BlockMeta); - static const Vector3i Coords[] = + if (a_BlockMeta == SKULL_TYPE_WITHER) { - Vector3i( 0, 0, 0), - Vector3i( 1, 0, 0), - Vector3i(-1, 0, 0), - Vector3i( 0, 0, 1), - Vector3i( 0, 0, -1), - }; - for (size_t i = 0; i < ARRAYCOUNT(Coords); ++i) - { - if (TrySpawnWither(a_ChunkInterface, World, a_BlockX + Coords[i].x, a_BlockY, a_BlockZ + Coords[i].z)) + static const Vector3i Coords[] = { - break; - } - } // for i - Coords[] + Vector3i( 0, 0, 0), + Vector3i( 1, 0, 0), + Vector3i(-1, 0, 0), + Vector3i( 0, 0, 1), + Vector3i( 0, 0, -1), + }; + for (size_t i = 0; i < ARRAYCOUNT(Coords); ++i) + { + if (TrySpawnWither(a_ChunkInterface, World, a_BlockX + Coords[i].x, a_BlockY, a_BlockZ + Coords[i].z)) + { + break; + } + } // for i - Coords[] + } } } ; diff --git a/src/Mobs/Wither.cpp b/src/Mobs/Wither.cpp index 39dc6aab9..8f5d28b68 100644 --- a/src/Mobs/Wither.cpp +++ b/src/Mobs/Wither.cpp @@ -28,7 +28,7 @@ bool cWither::IsArmored(void) const -bool cWither::Initialize(cWorld * a_World) override +bool cWither::Initialize(cWorld * a_World) { // Set health before BroadcastSpawnEntity() SetHealth(GetMaxHealth() / 3); |