summaryrefslogtreecommitdiffstats
path: root/src/Item.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-12 19:13:46 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-12 19:13:46 +0200
commit1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f (patch)
treef7cf72e49a7ca60d10af12ad9ff70910e089b028 /src/Item.h
parentRenamed SetWalkSpeed() to SetRelativeWalkSpeed() (diff)
parentFixed iron ore drop. (diff)
downloadcuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.gz
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.bz2
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.lz
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.xz
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.zst
cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.zip
Diffstat (limited to '')
-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