summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemHandler.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/ItemHandler.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/ItemHandler.h')
-rw-r--r--src/Items/ItemHandler.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h
index faee5d008..26703f573 100644
--- a/src/Items/ItemHandler.h
+++ b/src/Items/ItemHandler.h
@@ -21,10 +21,14 @@ class cItemHandler
{
public:
+ /** Actions that may cause durability of an item may be lost, where the
+ magnitude of the loss depends on the specific item used to perform the
+ action */
enum eDurabilityLostAction
{
- dlaBreakBlock,
dlaAttackEntity,
+ dlaBreakBlock,
+ dlaBreakBlockInstant,
};
cItemHandler(int a_ItemType);
@@ -107,7 +111,9 @@ public:
/** Called after the player has eaten this item. */
virtual void OnFoodEaten(cWorld *a_World, cPlayer *a_Player, cItem *a_Item);
- /** Get the durability lost which the item will get, when a specified action was performed. */
+ /** Get the durability lost which the item will get, when a specified action
+ was performed. This is only relevant for uses where the damage taken may
+ depend on the item used. */
virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action);
/** Returns the maximum stack size for a given item */