summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHoe.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
committerAlexander Harkness <me@bearbin.net>2024-11-02 22:27:47 +0100
commitcb50ec10591c0e0e4b9915e642bc50d3d8d1fd0a (patch)
treef647b20e1823f1846af88e832cf82a4a02e96e69 /src/Items/ItemHoe.h
parentImprove clang-format config file, remove automatically enforced code style from contrib guide. (diff)
downloadcuberite-clang-format-codebase.tar
cuberite-clang-format-codebase.tar.gz
cuberite-clang-format-codebase.tar.bz2
cuberite-clang-format-codebase.tar.lz
cuberite-clang-format-codebase.tar.xz
cuberite-clang-format-codebase.tar.zst
cuberite-clang-format-codebase.zip
Diffstat (limited to 'src/Items/ItemHoe.h')
-rw-r--r--src/Items/ItemHoe.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h
index 2bca5f5ca..5b9b8f0ef 100644
--- a/src/Items/ItemHoe.h
+++ b/src/Items/ItemHoe.h
@@ -9,13 +9,11 @@
-class cItemHoeHandler final:
- public cItemHandler
+class cItemHoeHandler final : public cItemHandler
{
using Super = cItemHandler;
-public:
-
+ public:
using Super::Super;
@@ -57,7 +55,8 @@ public:
}
// Transform:
- auto NewBlockType = ((BlockType == E_BLOCK_DIRT) && (BlockMeta == E_META_DIRT_COARSE)) ? E_BLOCK_DIRT : E_BLOCK_FARMLAND;
+ auto NewBlockType =
+ ((BlockType == E_BLOCK_DIRT) && (BlockMeta == E_META_DIRT_COARSE)) ? E_BLOCK_DIRT : E_BLOCK_FARMLAND;
a_World->SetBlock(a_ClickedBlockPos, NewBlockType, 0);
a_World->BroadcastSoundEffect("item.hoe.till", a_ClickedBlockPos + Vector3d(0.5, 0.5, 0.5), 1.0f, 0.8f);
a_Player->UseEquippedItem();
@@ -72,10 +71,10 @@ public:
{
switch (a_Action)
{
- case dlaAttackEntity: return 1;
- case dlaBreakBlock: return 0;
- case dlaBreakBlockInstant: return 0;
+ case dlaAttackEntity: return 1;
+ case dlaBreakBlock: return 0;
+ case dlaBreakBlockInstant: return 0;
}
UNREACHABLE("Unsupported durability loss action");
}
-} ;
+};