mirror of
https://github.com/Splizard/minetest-mod-snow.git
synced 2024-12-28 07:30:17 +01:00
Add falling snow when the node underneath is dug.
This commit is contained in:
parent
73b962b70c
commit
e40fad203e
2
init.lua
2
init.lua
@ -242,6 +242,8 @@ local unsnowify = function(pos, node, digger)
|
||||
local nodename = minetest.env:get_node(pos).name
|
||||
if nodename == "snow:snow" then
|
||||
minetest.env:remove_node(pos)
|
||||
local obj=minetest.env:add_entity({x=pos.x,y=pos.y,z=pos.z}, "snow:snowball_entity")
|
||||
obj:setacceleration({x=0, y=-snowball_GRAVITY, z=0})
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user