Recipe checker
This is a code snippet that you can use to check if your craft recipes are valid.
- When all mods have been loaded, it checks to see if the ingredients in your craft recipes exist
- If they do not, it issues a warning: [RECIPE ERROR] example:item in recipe for example:item
Download
Github gist: https://gist.github.com/rubenwardy/5504537
I recommend that you add this to builtin. Follow the instructions to do this.
License: WTFPL
If you use this code, then post in this topic, I like knowing that this is useful to someone :P
Example
init.lua
- Code: Select all
<the source here>
minetest.register_craft({
output = "mod:this 42",
recipe = {
{"mod:item","mod:item","mod:item"},
{"mod:item","noneexistant:item","mod:item"},
{"mod:item","mod:item","mod:item"},
}
})
in console
- Code: Select all
[RECIPE ERROR] noneexistant:item in recipe for mod:this
Noticed any bugs? Please tell me!