Phased out all deprecated minetest.env:* uses in favor of minetest.*
This commit is contained in:
parent
d230811872
commit
c3ee5a15c5
22
init.lua
22
init.lua
@ -422,9 +422,9 @@ for i in ipairs(mossyobjects) do
|
|||||||
interval = 120,
|
interval = 120,
|
||||||
chance = 50,
|
chance = 50,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
if minetest.env:find_node_near(pos, 2, "air") then
|
if minetest.find_node_near(pos, 2, "air") then
|
||||||
fdir = node.param2
|
fdir = node.param2
|
||||||
minetest.env:add_node(pos, {name = mossyobjects[i][2], param2 = fdir})
|
minetest.add_node(pos, {name = mossyobjects[i][2], param2 = fdir})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -435,25 +435,25 @@ end
|
|||||||
default.cool_lava_source = function(pos)
|
default.cool_lava_source = function(pos)
|
||||||
if gloopblocks_search_nearby_nodes(pos,"default:water_source")
|
if gloopblocks_search_nearby_nodes(pos,"default:water_source")
|
||||||
or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
|
or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
|
||||||
minetest.env:set_node(pos, {name="default:obsidian"})
|
minetest.set_node(pos, {name="default:obsidian"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
default.cool_lava_flowing = function(pos)
|
default.cool_lava_flowing = function(pos)
|
||||||
if gloopblocks_search_nearby_nodes(pos,"default:water_source") then
|
if gloopblocks_search_nearby_nodes(pos,"default:water_source") then
|
||||||
minetest.env:set_node(pos, {name="gloopblocks:basalt"})
|
minetest.set_node(pos, {name="gloopblocks:basalt"})
|
||||||
elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
|
elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
|
||||||
minetest.env:set_node(pos, {name="gloopblocks:pumice"})
|
minetest.set_node(pos, {name="gloopblocks:pumice"})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
gloopblocks_search_nearby_nodes = function(pos, node)
|
gloopblocks_search_nearby_nodes = function(pos, node)
|
||||||
if minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end
|
if minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end
|
||||||
if minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end
|
if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end
|
||||||
if minetest.env:get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end
|
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end
|
||||||
if minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end
|
if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end
|
||||||
if minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end
|
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end
|
||||||
if minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end
|
if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user