Significantly simplified recipe registration.

This commit is contained in:
Aaron Suen 2019-08-19 22:27:05 -04:00
parent 20737f383b
commit 1201630dbb

View File

@ -62,15 +62,16 @@ nodecore.register_craft({
duration = 120,
cookfx = {smoke = true, hiss = true},
check = function(pos)
local node = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
local def = minetest.registered_items[node.name]
return def and def.groups and def.groups.lava
and not near(pos, {flow})
return not near(pos, {flow})
end,
nodes = {
{
match = src,
replace = modname .. ":glass_float"
},
{
y = -1,
match = {groups = {lava = true}}
}
}
})