Skip to content

Commit 0d924e7

Browse files
committedMar 9, 2013
Add lavacooling
1 parent 90aaa1f commit 0d924e7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎mods/default/init.lua

+28
Original file line numberDiff line numberDiff line change
@@ -1736,4 +1736,32 @@ function on_punchnode(p, node)
17361736
end
17371737
minetest.register_on_punchnode(on_punchnode)
17381738

1739+
--
1740+
-- Lavacooling
1741+
--
1742+
1743+
default.cool_lava_source = function(pos)
1744+
minetest.env:set_node(pos, {name="default:stone"})
1745+
end
1746+
1747+
default.cool_lava_flowing = function(pos)
1748+
minetest.env:set_node(pos, {name="default:cobble"})
1749+
end
1750+
1751+
minetest.register_abm({
1752+
nodenames = {"default:lava_flowing"},
1753+
neighbors = {"group:water"},
1754+
interval = 1,
1755+
chance = 1,
1756+
action = default.cool_lava_flowing,
1757+
})
1758+
1759+
minetest.register_abm({
1760+
nodenames = {"default:lava_source"},
1761+
neighbors = {"group:water"},
1762+
interval = 1,
1763+
chance = 1,
1764+
action = default.cool_lava_source,
1765+
})
1766+
17391767
-- END

1 commit comments

Comments
 (1)

Jordach commented on Mar 12, 2013

@Jordach
Contributor

Either way it's still making cobble.

Please sign in to comment.