summaryrefslogtreecommitdiffstats
path: root/src/BlockID.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-30 12:50:55 +0100
committerMattes D <github@xoft.cz>2014-10-30 12:50:55 +0100
commit93f33b7d4eda4c6010827dc2a6522c3da34619f8 (patch)
tree122df2ff1cd5bb1b24aaf903aec5fce19cf8207d /src/BlockID.cpp
parentGrown biomes: made biomes smaller, made beaches smaller. (diff)
parentMerge pull request #1576 from mc-server/QtBiomeVisualiserThreadedGen (diff)
downloadcuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar.gz
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar.bz2
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar.lz
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar.xz
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.tar.zst
cuberite-93f33b7d4eda4c6010827dc2a6522c3da34619f8.zip
Diffstat (limited to 'src/BlockID.cpp')
-rw-r--r--src/BlockID.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/BlockID.cpp b/src/BlockID.cpp
index c0f3193bb..c98e0cad1 100644
--- a/src/BlockID.cpp
+++ b/src/BlockID.cpp
@@ -217,7 +217,12 @@ BLOCKTYPE BlockStringToType(const AString & a_BlockTypeString)
bool StringToItem(const AString & a_ItemTypeString, cItem & a_Item)
{
- return gsBlockIDMap.ResolveItem(TrimString(a_ItemTypeString), a_Item);
+ AString ItemName = TrimString(a_ItemTypeString);
+ if (ItemName.substr(0, 10) == "minecraft:")
+ {
+ ItemName = ItemName.substr(10);
+ }
+ return gsBlockIDMap.ResolveItem(ItemName, a_Item);
}