scaffold: fix lp:get_pos
This commit is contained in:
parent
81942cdee5
commit
037088a226
@ -333,7 +333,8 @@ ws.rg("HighwayZ","World","highwayz",function()
|
||||
end, setnpt)
|
||||
|
||||
ws.rg("BlockWater","World","block_water",function()
|
||||
local positions = minetest.find_nodes_near(pos, 5, {"mcl_core:water_source", "mcl_core:water_flowing"}, true)
|
||||
local lp=ws.dircoord(0,0,0)
|
||||
local positions = minetest.find_nodes_near(lp, 5, {"mcl_core:water_source", "mcl_core:water_flowing"}, true)
|
||||
for i, p in pairs(positions) do
|
||||
if i > nodes_per_tick then return end
|
||||
minetest.place_node(p)
|
||||
@ -341,7 +342,8 @@ ws.rg("BlockWater","World","block_water",function()
|
||||
end,setnpt)
|
||||
|
||||
ws.rg("BlockLava","World","block_lava",function()
|
||||
local positions = minetest.find_nodes_near(pos, 5, {"mcl_core:lava_source", "mcl_core:lava_flowing"}, true)
|
||||
local lp=ws.dircoord(0,0,0)
|
||||
local positions = minetest.find_nodes_near(lp, 5, {"mcl_core:lava_source", "mcl_core:lava_flowing"}, true)
|
||||
for i, p in pairs(positions) do
|
||||
if i > nodes_per_tick then return end
|
||||
minetest.place_node(p)
|
||||
@ -349,7 +351,8 @@ ws.rg("BlockLava","World","block_lava",function()
|
||||
end,setnpt)
|
||||
|
||||
ws.rg("BlockSources","World","block_sources",function()
|
||||
local positions = minetest.find_nodes_near(pos, 5, {"mcl_core:lava_source","mcl_nether:nether_lava_source","mcl_core:water_source"}, true)
|
||||
local lp=ws.dircoord(0,0,0)
|
||||
local positions = minetest.find_nodes_near(lp, 5, {"mcl_core:lava_source","mcl_nether:nether_lava_source","mcl_core:water_source"}, true)
|
||||
for i, p in pairs(positions) do
|
||||
if p.y<2 then
|
||||
if p.x>500 and p.z>500 then return end
|
||||
@ -361,7 +364,8 @@ ws.rg("BlockSources","World","block_sources",function()
|
||||
end,setnpt)
|
||||
|
||||
ws.rg("PlaceOnTop","World","place_on_top",function()
|
||||
local positions = minetest.find_nodes_near_under_air_except(pos, 5, item:get_name(), true)
|
||||
local lp=ws.dircoord(0,0,0)
|
||||
local positions = minetest.find_nodes_near_under_air_except(lp, 5, item:get_name(), true)
|
||||
for i, p in pairs(positions) do
|
||||
if i > nodes_per_tick then break end
|
||||
minetest.place_node(vector.add(p, {x = 0, y = 1, z = 0}))
|
||||
@ -369,6 +373,7 @@ ws.rg("PlaceOnTop","World","place_on_top",function()
|
||||
end,setnpt)
|
||||
|
||||
ws.rg("Nuke","World","nuke",function()
|
||||
local pos=ws.dircoord(0,0,0)
|
||||
local i = 0
|
||||
for x = pos.x - 4, pos.x + 4 do
|
||||
for y = pos.y - 4, pos.y + 4 do
|
||||
|
Loading…
x
Reference in New Issue
Block a user