Freeze water in cold areas

This commit is contained in:
cora 2023-11-13 15:56:59 +01:00 committed by WillConker
parent 3460e27468
commit dc07eea590
1 changed files with 14 additions and 0 deletions

View File

@ -1451,6 +1451,20 @@ minetest.register_abm({
end end
}) })
-- Freeze water
minetest.register_abm({
label = "Freeze water in cold areas",
nodenames = {"mcl_core:water_source", "mclx_core:river_water_source"},
interval = 32,
chance = 8,
action = function(pos, node)
if mcl_weather.has_snow(pos) then
node.name = "mcl_core:ice"
minetest.swap_node(pos, node)
end
end
})
--[[ Call this for vines nodes only. --[[ Call this for vines nodes only.
Given the pos and node of a vines node, this returns true if the vines are supported 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. and false if the vines are currently floating.