diff options
author | Masy98 <masy@antheruscraft.de> | 2014-09-05 11:27:21 +0200 |
---|---|---|
committer | Masy98 <masy@antheruscraft.de> | 2014-09-05 11:27:21 +0200 |
commit | 15bee41a3657498e0072007e24abec50aac2c8df (patch) | |
tree | 863ae0ba1fef38d5da79aeb357e955c52d838caa /src/Item.h | |
parent | Added new recipes! (diff) | |
parent | Merge pull request #1375 from mc-server/EntitiesInBox (diff) | |
download | cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.gz cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.bz2 cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.lz cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.xz cuberite-15bee41a3657498e0072007e24abec50aac2c8df.tar.zst cuberite-15bee41a3657498e0072007e24abec50aac2c8df.zip |
Diffstat (limited to 'src/Item.h')
-rw-r--r-- | src/Item.h | 6 |
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 |