diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-24 14:24:32 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-11-24 14:24:32 +0100 |
commit | 50629cc6a1830783580811cedec1fd8ab559f40b (patch) | |
tree | 27d51a6f333dc2cb9613005177172c863c0ed9bc /builtin/client | |
parent | 3d74e17cc24b2a3027d12c96940d92048c7bfe4e (diff) | |
download | dragonfireclient-50629cc6a1830783580811cedec1fd8ab559f40b.tar.xz |
Improved Scaffold
Diffstat (limited to 'builtin/client')
-rw-r--r-- | builtin/client/cheats/world.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/client/cheats/world.lua b/builtin/client/cheats/world.lua index 6cbdd67fc..1a86e0703 100644 --- a/builtin/client/cheats/world.lua +++ b/builtin/client/cheats/world.lua @@ -17,7 +17,11 @@ core.register_globalstep(function(dtime) local nodes_per_tick = tonumber(minetest.settings:get("nodes_per_tick")) or 8 if item and item:get_count() > 0 and def and def.node_placement_prediction ~= "" then if core.settings:get_bool("scaffold") then - core.place_node(vector.add(pos, {x = 0, y = -0.6, z = 0})) + local p = vector.round(vector.add(pos, {x = 0, y = -0.6, z = 0})) + local node = minetest.get_node_or_nil(p) + if not node or minetest.get_node_def(node.name).buildable_to then + core.place_node(p) + end elseif core.settings:get_bool("scaffold_plus") then local z = pos.z local positions = { |