mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2025-07-16 12:40:25 +02:00
minetest.env:* --> minetest.*
This commit is contained in:
@ -26,7 +26,7 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
||||
},
|
||||
|
||||
on_construct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local param2 = node.param2
|
||||
node.name = "lrfurn:coffeetable_front"
|
||||
if param2 == 0 then
|
||||
@ -38,13 +38,13 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.env:set_node(pos, node)
|
||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "air" ) then
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end,
|
||||
|
||||
on_destruct = function(pos)
|
||||
local node = minetest.env:get_node(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
local param2 = node.param2
|
||||
if param2 == 0 then
|
||||
pos.z = pos.z+1
|
||||
@ -55,9 +55,9 @@ minetest.register_node("lrfurn:coffeetable_back", {
|
||||
elseif param2 == 3 then
|
||||
pos.x = pos.x-1
|
||||
end
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||
if( minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.env:remove_node(pos)
|
||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name == "lrfurn:coffeetable_front" ) then
|
||||
if( minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).param2 == param2 ) then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
Reference in New Issue
Block a user