summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockInfested.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockInfested.h')
-rw-r--r--src/Blocks/BlockInfested.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/Blocks/BlockInfested.h b/src/Blocks/BlockInfested.h
index 03977daad..ad177c276 100644
--- a/src/Blocks/BlockInfested.h
+++ b/src/Blocks/BlockInfested.h
@@ -1,7 +1,8 @@
// BlockInfested.h
-// Declares the cBlockInfestedHandler class representing the handler for Silverfish blocks (Mojang calls them Monster Eggs)
+// Declares the cBlockInfestedHandler class representing the handler for Silverfish blocks (Mojang calls them Monster
+// Eggs)
#include "../Entities/Player.h"
@@ -9,17 +10,14 @@
-class cBlockInfestedHandler final:
- public cBlockHandler
+class cBlockInfestedHandler final : public cBlockHandler
{
using Super = cBlockHandler;
-public:
-
+ public:
using Super::Super;
-private:
-
+ private:
static void SpawnSilverfish(cWorldInterface & a_WorldInterface, Vector3i a_BlockPos)
{
// TODO: only display animation if the difficulty allows mob spawns - Add when difficulty is implemented
@@ -38,18 +36,21 @@ private:
{
if (ToolHasSilkTouch(a_Tool))
{
- return { E_BLOCK_STONE };
+ return {E_BLOCK_STONE};
}
else
{
- return { E_BLOCK_COBBLESTONE };
+ return {E_BLOCK_COBBLESTONE};
}
}
- case E_META_SILVERFISH_EGG_COBBLESTONE: return { E_BLOCK_COBBLESTONE };
- case E_META_SILVERFISH_EGG_STONE_BRICK: return { E_BLOCK_STONE_BRICKS };
- case E_META_SILVERFISH_EGG_MOSSY_STONE_BRICK: return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_MOSSY);
- case E_META_SILVERFISH_EGG_CRACKED_STONE_BRICK: return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_CRACKED);
- case E_META_SILVERFISH_EGG_CHISELED_STONE_BRICK: return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_ORNAMENT);
+ case E_META_SILVERFISH_EGG_COBBLESTONE: return {E_BLOCK_COBBLESTONE};
+ case E_META_SILVERFISH_EGG_STONE_BRICK: return {E_BLOCK_STONE_BRICKS};
+ case E_META_SILVERFISH_EGG_MOSSY_STONE_BRICK:
+ return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_MOSSY);
+ case E_META_SILVERFISH_EGG_CRACKED_STONE_BRICK:
+ return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_CRACKED);
+ case E_META_SILVERFISH_EGG_CHISELED_STONE_BRICK:
+ return cItem(E_BLOCK_STONE_BRICKS, 1, E_META_STONE_BRICK_ORNAMENT);
}
return {};
@@ -57,9 +58,11 @@ private:
virtual void OnBroken(
- cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface,
+ cChunkInterface & a_ChunkInterface,
+ cWorldInterface & a_WorldInterface,
Vector3i a_BlockPos,
- BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta,
+ BLOCKTYPE a_OldBlockType,
+ NIBBLETYPE a_OldBlockMeta,
const cEntity * a_Digger
) const override
{
@@ -82,8 +85,5 @@ private:
}
- virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
- {
- return 11;
- }
-} ;
+ virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override { return 11; }
+};