{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreigt6tnimtrt6am6xua5jxhaa3fzh6nyvtn76cqo5bexmc7w6utm6i",
"uri": "at://did:plc:pvz7ox4x2ehjiezsahttqyyz/app.bsky.feed.post/3mgqxj2ncmld2"
},
"path": "/viewtopic.php?p=449960#p449960",
"publishedAt": "2026-03-11T02:21:20.000Z",
"site": "https://forum.luanti.org",
"tags": [
"on_mods_loaded",
"on_craft / on_craft_predict",
"get_craft_result",
"Blockhead"
],
"textContent": "This is not a feature of the engine, so you'll need to add it with Lua in some way. Also not guaranteed is that it looks good inside of crafting guides like that of Unified Inventory.\n\nThere's Josselin2's suggestion, which needs on_mods_loaded callbacks, which I am usually not in favour of, but if you isolate it to just applying this, then it's acceptable I suppose. But then, that sounds like pushing the problem across to C++ (which _may_ still be fast), since then the engine has a very long list of items to check for that group. Maybe it uses an efficient data structure - I'm not sure.\n\nThe other way is on_craft / on_craft_predict. That way you keep the engine's recipe functionality, but hook into it. You can still use the native crafting grid. You scan the groups of each of the input items. This would slow all crafting down though, I think. Also, not sure it would work with e.g. pipeworks' autocrafters. Those depend on get_craft_result.\n\nSo there are some options, at least.\n\nStatistics: Posted by Blockhead — Wed Mar 11, 2026 02:21\n\n* * *",
"title": "Modding Discussion • Re: Crafting recipe whose ingredient is not in a named group",
"updatedAt": "2026-03-11T02:21:20.000Z"
}