summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-05-09 18:21:08 -0400
committersfan5 <sfan5@live.de>2022-05-14 18:33:42 +0200
commit8f30456ee3f711f1eb4deee630af7e083a769a22 (patch)
treeecec0728378f96843d416945cfa7b0ecd57d34fd /src
parent38557ff63512945657bc4a97b3ca435cd7b711a8 (diff)
downloadminetest-8f30456ee3f711f1eb4deee630af7e083a769a22.tar.gz
minetest-8f30456ee3f711f1eb4deee630af7e083a769a22.tar.bz2
minetest-8f30456ee3f711f1eb4deee630af7e083a769a22.zip
Fix cooking and fuel crafts with aliases
Diffstat (limited to 'src')
-rw-r--r--src/craftdef.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/craftdef.cpp b/src/craftdef.cpp
index 210605198..c05a0cfb7 100644
--- a/src/craftdef.cpp
+++ b/src/craftdef.cpp
@@ -734,7 +734,8 @@ bool CraftDefinitionCooking::check(const CraftInput &input, IGameDef *gamedef) c
}
// Check the single input item
- return inputItemMatchesRecipe(input_filtered[0], recipe, gamedef->idef());
+ std::string rec_name = craftGetItemName(recipe, gamedef);
+ return inputItemMatchesRecipe(input_filtered[0], rec_name, gamedef->idef());
}
CraftOutput CraftDefinitionCooking::getOutput(const CraftInput &input, IGameDef *gamedef) const
@@ -836,7 +837,8 @@ bool CraftDefinitionFuel::check(const CraftInput &input, IGameDef *gamedef) cons
}
// Check the single input item
- return inputItemMatchesRecipe(input_filtered[0], recipe, gamedef->idef());
+ std::string rec_name = craftGetItemName(recipe, gamedef);
+ return inputItemMatchesRecipe(input_filtered[0], rec_name, gamedef->idef());
}
CraftOutput CraftDefinitionFuel::getOutput(const CraftInput &input, IGameDef *gamedef) const