minor sticking API improvement

This commit is contained in:
goblin_mode 2024-10-30 23:41:08 +01:00 committed by cora
parent 33a5be054c
commit 98d435db60
3 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ function mcl_pistons.push(pos, movedir, maximum, player_name, piston_pos)
for _, dir in pairs(sixdirs) do
offset_pos = np:add(dir:multiply(-1))
offset_node = minetest.get_node(offset_pos)
is_connected = minetest.registered_nodes[nn.name]._mcl_pistons_sticky(offset_node, dir)
is_connected = minetest.registered_nodes[nn.name]._mcl_pistons_sticky(nn, offset_node, dir)
if is_connected and minetest.get_item_group(offset_node.name, "unsticky") == 0
and minetest.get_item_group(offset_node.name, "unmovable_by_piston") == 0

View File

@ -51,8 +51,8 @@ minetest.register_node("mcl_core:slimeblock", {
},
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
_mcl_pistons_sticky = function(node, direction)
return node.name ~= "mcl_honey:honey_block"
_mcl_pistons_sticky = function(node, node_to, direction)
return node_to.name ~= "mcl_honey:honey_block"
end,
})

View File

@ -60,8 +60,8 @@ minetest.register_node("mcl_honey:honey_block", {
},
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
_mcl_pistons_sticky = function(node, dir)
return node.name ~= "mcl_core:slimeblock"
_mcl_pistons_sticky = function(node, node_to, dir)
return node_to.name ~= "mcl_core:slimeblock"
end,
})