summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemAxe.h
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2018-01-05 12:28:06 +0100
committerGitHub <noreply@github.com>2018-01-05 12:28:06 +0100
commitb4aa19f329b06e42eb2591fc488b70dc0df41940 (patch)
tree5b18f7bde0b3129310d273f63b68151850c43ea7 /src/Items/ItemAxe.h
parentAdd the fmt library (#4065) (diff)
downloadcuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.gz
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.bz2
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.lz
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.xz
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.zst
cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.zip
Diffstat (limited to 'src/Items/ItemAxe.h')
-rw-r--r--src/Items/ItemAxe.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/Items/ItemAxe.h b/src/Items/ItemAxe.h
index 1f9c44f1e..aeba22cf4 100644
--- a/src/Items/ItemAxe.h
+++ b/src/Items/ItemAxe.h
@@ -18,7 +18,20 @@ public:
}
- virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block)
+
+ virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) override
+ {
+ switch (a_Action)
+ {
+ case dlaAttackEntity: return 2;
+ case dlaBreakBlock: return 1;
+ case dlaBreakBlockInstant: return 0;
+ }
+ }
+
+
+
+ virtual float GetBlockBreakingStrength(BLOCKTYPE a_Block) override
{
if (!IsBlockMaterialWood(a_Block) && !IsBlockMaterialPlants(a_Block) && !IsBlockMaterialVine(a_Block))
{
@@ -40,7 +53,3 @@ public:
}
} ;
-
-
-
-