summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHoe.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 16:27:19 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-29 16:27:19 +0200
commit8811837aea2a33ba5da424087429864f811bf5e5 (patch)
treebaeedba8fb618766cf7d4e1657d2d48c84f45a59 /src/Items/ItemHoe.h
parentSuggestions (diff)
parentDistortedHeightmap: Now generates gravel in deep ocean. (diff)
downloadcuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.gz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.bz2
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.lz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.xz
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.tar.zst
cuberite-8811837aea2a33ba5da424087429864f811bf5e5.zip
Diffstat (limited to '')
-rw-r--r--src/Items/ItemHoe.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h
index 29f7c83d5..8d0b71478 100644
--- a/src/Items/ItemHoe.h
+++ b/src/Items/ItemHoe.h
@@ -16,7 +16,6 @@ public:
cItemHoeHandler(int a_ItemType)
: cItemHandler(a_ItemType)
{
-
}
virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override
@@ -26,13 +25,18 @@ public:
if ((Block == E_BLOCK_DIRT) || (Block == E_BLOCK_GRASS))
{
a_World->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FARMLAND, 0);
-
a_Player->UseEquippedItem();
return true;
-
}
+
return false;
}
+
+
+ virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) override
+ {
+ return 0;
+ }
} ;