From fc0516cb718ddc97cfc29d32d2ebcedad611b62a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 7 Jan 2018 21:01:34 +0100 Subject: [PATCH] Melt ice and top snow @ light >= 12 --- mods/ITEMS/mcl_core/functions.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 5074a043c..c236fd2dc 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1151,6 +1151,19 @@ minetest.register_abm({ end }) +-- Melt snow +minetest.register_abm({ + label = "Top snow and ice melting", + nodenames = {"mcl_core:snow", "mcl_core:ice"}, + interval = 16, + chance = 8, + action = function(pos, node) + if minetest.get_node_light(pos, 0) >= 12 then + minetest.remove_node(pos) + end + end +}) + --[[ Call this for vines nodes only. Given the pos and node of a vines node, this returns true if the vines are supported and false if the vines are currently floating.