diff --git a/src/inventory.cpp b/src/inventory.cpp index 5b99617b..5b29818d 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) {