diff --git a/snow_cannon.lua b/snow_cannon.lua index 719379d..58d96c9 100644 --- a/snow_cannon.lua +++ b/snow_cannon.lua @@ -1,4 +1,10 @@ +-- this function used to be in builtin/game/falling_node.lua, but there it got made local; we need it here +moresnow.spawn_falling_node = function(p, node) + local obj = core.add_entity(p, "__builtin:falling_node") + obj:get_luaentity():set_node(node) +end + moresnow.throw_snowball = function( pos, dir, player ) local snowball_GRAVITY=9 local snowball_VELOCITY=19 @@ -29,7 +35,7 @@ moresnow.snow_at_one_place = function( pos ) local n = minetest.get_node( pos ); if( not(n) or not( n.name ) or n.name=='air' ) then - spawn_falling_node( pos, {name="default:snow"}) + moresnow.spawn_falling_node( pos, {name="default:snow"}) end end