From 037088a226e465387a2f83166b7f7d18b3ca89e8 Mon Sep 17 00:00:00 2001 From: cora Date: Sat, 11 Sep 2021 18:54:07 +0200 Subject: [PATCH] scaffold: fix lp:get_pos --- clientmods/scaffold/init.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/clientmods/scaffold/init.lua b/clientmods/scaffold/init.lua index f1bf4a3ce..59f1c3580 100644 --- a/clientmods/scaffold/init.lua +++ b/clientmods/scaffold/init.lua @@ -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