diff --git a/machine.lua b/machine.lua index c257bf4..946d9f3 100644 --- a/machine.lua +++ b/machine.lua @@ -160,12 +160,12 @@ minetest.register_node("mycorners:machine_corner", { } }, after_place_node = function(pos, placer) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); meta:set_string("owner", (placer:get_player_name() or "")); meta:set_string("infotext", "Corner Machine (owned by " .. (placer:get_player_name() or "") .. ")"); end, can_dig = function(pos,player) - local meta = minetest.env:get_meta(pos); + local meta = minetest.get_meta(pos); local inv = meta:get_inventory() if not inv:is_empty("matblock") then return false @@ -177,7 +177,7 @@ can_dig = function(pos,player) return true end, on_construct = function(pos) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) meta:set_string("formspec", "invsize[10,11;]".. "background[-0.15,-0.25;10.40,11.75;mycorners_background.png]".. "label[0,0;Corner Machine]".. @@ -210,7 +210,7 @@ on_construct = function(pos) inv:set_size("res2", 1) end, on_receive_fields = function(pos, formname, fields, sender) - local meta = minetest.env:get_meta(pos) + local meta = minetest.get_meta(pos) local inv = meta:get_inventory() if fields["make"] then