summaryrefslogtreecommitdiffstats
path: root/src/Item.h
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-09-05 16:26:30 +0200
committerTycho <work.tycho+git@gmail.com>2014-09-05 16:26:30 +0200
commitaa2495e3867e87ea37729b58b0df3f2ce940dbb6 (patch)
tree9f71b03f914cd7b077f6c13cd2b6ae2f691c5c66 /src/Item.h
parentMoved to passing pointers instead of passing by reference. (diff)
parentMerge pull request #1375 from mc-server/EntitiesInBox (diff)
downloadcuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.gz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.bz2
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.lz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.xz
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.tar.zst
cuberite-aa2495e3867e87ea37729b58b0df3f2ce940dbb6.zip
Diffstat (limited to 'src/Item.h')
-rw-r--r--src/Item.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Item.h b/src/Item.h
index d8b9e78a0..056b5eb8a 100644
--- a/src/Item.h
+++ b/src/Item.h
@@ -183,8 +183,10 @@ public:
/** Loads the item data from JSON representation */
void FromJson(const Json::Value & a_Value);
- /** Returns true if the specified item type is enchantable (as per 1.2.5 protocol requirements) */
- static bool IsEnchantable(short a_ItemType); // tolua_export
+ /** Returns true if the specified item type is enchantable.
+ If WithBook is true, the function is used in the anvil inventory with book enchantments.
+ So it checks the "only book enchantments" too. Example: You can only enchant a hoe with a book. */
+ static bool IsEnchantable(short a_ItemType, bool a_WithBook = false); // tolua_export
/** Returns the enchantability of the item. When the item hasn't a enchantability, it will returns 0 */
int GetEnchantability(); // tolua_export