diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-06-04 22:20:04 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-06-04 22:20:04 -0400 |
commit | 4200757ba3ac7f450a6b51592339aa62af905f0e (patch) | |
tree | 178110c383ac9b629c53ffddb745deacde870375 /mesecons_noteblock | |
parent | 95a84dde468f91a112993f8c1379ebca0362d95f (diff) |
Remove deprecated API functions "register_on_placenode" and "register_on_dignode" where possible.
Diffstat (limited to 'mesecons_noteblock')
-rw-r--r-- | mesecons_noteblock/init.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesecons_noteblock/init.lua b/mesecons_noteblock/init.lua index 0b8cbee..7b363cb 100644 --- a/mesecons_noteblock/init.lua +++ b/mesecons_noteblock/init.lua @@ -5,13 +5,10 @@ minetest.register_node("mesecons_noteblock:noteblock", { drawtype = "allfaces_optional", visual_scale = 1.3, paramtype="light", -}) - -minetest.register_on_placenode(function (pos, node) - if node.name=="mesecons_noteblock:noteblock" then - minetest.env:add_node(pos, {name=node.name, param2=0}) + after_place_node = function(pos) + minetest.env:add_node(pos, {name="mesecons_noteblock:noteblock", param2=0}) end -end) +}) minetest.register_on_punchnode(function (pos, node) if node.name=="mesecons_noteblock:noteblock" then |