diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-08-20 18:29:36 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-08-20 18:29:36 +0200 |
commit | 79d0314d79ea4f3713d709861c9de5792e328d35 (patch) | |
tree | 2c3a5504adf315de647d6c43c3e862c85f048464 /clientmods/world/init.lua | |
parent | 770bde9c64a43404645625a27fd28b64786b31b0 (diff) | |
download | dragonfireclient-79d0314d79ea4f3713d709861c9de5792e328d35.tar.xz |
Update Buildbots
Diffstat (limited to 'clientmods/world/init.lua')
-rw-r--r-- | clientmods/world/init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clientmods/world/init.lua b/clientmods/world/init.lua index 187f498c3..8f03fca96 100644 --- a/clientmods/world/init.lua +++ b/clientmods/world/init.lua @@ -49,6 +49,7 @@ minetest.register_globalstep(function(dtime) local pos = player:get_pos() local item = player:get_wielded_item() local def = minetest.get_item_def(item:get_name()) + local nodes_per_tick = tonumber(minetest.settings:get("nodes_per_tick")) or 8 if item:get_count() > 0 and def.node_placement_prediction ~= "" then if minetest.settings:get_bool("scaffold") then minetest.place_node(vector.add(pos, {x = 0, y = -0.6, z = 0})) @@ -64,17 +65,19 @@ minetest.register_globalstep(function(dtime) {x = 2, y = 0, z = z} } for i, p in pairs(positions) do + if i > nodes_per_tick then break end minetest.place_node(p) end elseif minetest.settings:get_bool("destroy_liquids") then local positions = minetest.find_nodes_near(pos, 5, {"mcl_core:water_source", "mcl_core:water_floating"}, true) - for _, p in pairs(positions) do + for i, p in pairs(positions) do + if i > nodes_per_tick then break end minetest.place_node(p) end elseif minetest.settings:get_bool("autotnt") then local positions = minetest.find_nodes_near_under_air_except(pos, 5, item:get_name(), true) for i, p in pairs(positions) do - if i > 8 then break end + if i > nodes_per_tick then break end minetest.place_node(vector.add(p, {x = 0, y = 1, z = 0})) end end |