Fix horrible mistake in xpanes

This commit is contained in:
cora 2022-09-12 00:52:19 +02:00 committed by Gitea
parent f753ac92ce
commit 420401fcce

View File

@ -69,16 +69,16 @@ local function update_pane(pos)
end end
minetest.register_on_placenode(function(pos, node) minetest.register_on_placenode(function(pos, node)
if minetest.get_item_group(node, "pane") then if minetest.get_item_group(node.name, "pane") <= 0 then return end
update_pane(pos) update_pane(pos)
end
for i = 0, 3 do for i = 0, 3 do
local dir = minetest.facedir_to_dir(i) local dir = minetest.facedir_to_dir(i)
update_pane(vector.add(pos, dir)) update_pane(vector.add(pos, dir))
end end
end) end)
minetest.register_on_dignode(function(pos) minetest.register_on_dignode(function(pos,node)
if minetest.get_item_group(node.name, "pane") <= 0 then return end
for i = 0, 3 do for i = 0, 3 do
local dir = minetest.facedir_to_dir(i) local dir = minetest.facedir_to_dir(i)
update_pane(vector.add(pos, dir)) update_pane(vector.add(pos, dir))