diff options
-rw-r--r-- | src/inventory.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 5b99617b3..5b29818dc 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -1016,8 +1016,13 @@ bool ItemSpec::checkItem(const InventoryItem *item) const if(itemname != "MaterialItem") return false; MaterialItem *mitem = (MaterialItem*)item; - if(mitem->getMaterial() != num) - return false; + if(num != 65535){ + if(mitem->getMaterial() != num) + return false; + } else { + if(mitem->getNodeName() != name) + return false; + } } else if(type == ITEM_CRAFT) { |