summaryrefslogtreecommitdiffstats
path: root/source/cItem.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-21 21:42:34 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-21 21:42:34 +0100
commit02f05f749645d3ef211676e6745d3feda2cd0513 (patch)
tree2b4c08e1ff7eab1d69f1dad4a00ef2d4d4fbcd3c /source/cItem.cpp
parentChanged chunk generation so any surface sand with air underneath it will turn into sandstone to prevent most sand cave-ins due to odd cave placement. (diff)
downloadcuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar.gz
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar.bz2
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar.lz
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar.xz
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.tar.zst
cuberite-02f05f749645d3ef211676e6745d3feda2cd0513.zip
Diffstat (limited to '')
-rw-r--r--source/cItem.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/cItem.cpp b/source/cItem.cpp
index b91a7a316..20720a6e8 100644
--- a/source/cItem.cpp
+++ b/source/cItem.cpp
@@ -19,4 +19,26 @@ void cItem::FromJson( const Json::Value & a_Value )
m_ItemCount = (char)a_Value.get("Count", -1 ).asInt();
m_ItemHealth = (short)a_Value.get("Health", -1 ).asInt();
}
+}
+
+bool cItem::IsEnchantable(ENUM_ITEM_ID item)
+{
+ if(item >= 256 && item <= 259)
+ return true;
+ if(item >= 267 && item <= 279)
+ return true;
+ if(item >= 283 && item <= 286)
+ return true;
+ if(item >= 290 && item <= 294)
+ return true;
+ if(item >= 298 && item <= 317)
+ return true;
+ if(item >= 290 && item <= 294)
+ return true;
+
+ if(item == 346 || item == 359 || item == 261)
+ return true;
+
+
+ return false;
} \ No newline at end of file