mirror of
https://github.com/minetest/minetest.git
synced 2025-03-14 14:22:36 +01:00
Allow inputting nodename of MaterialItem in ItemSpec::checkItem
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user