This commit is contained in:
kay27 2020-10-05 00:27:08 +04:00
parent 5f820c6bf9
commit a78c613322
2 changed files with 15 additions and 3 deletions

View File

@ -120,11 +120,13 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
while #frontiers > 0 do while #frontiers > 0 do
local np = frontiers[1] local np = frontiers[1]
local nn = minetest.get_node(np) local nn = minetest.get_node(np)
if nn.name == "ignore" then
minetest.get_voxel_manip():read_from_map(np, np)
nn = minetest.get_node(np)
end
if not node_replaceable(nn.name) then if not node_replaceable(nn.name) then
if #nodes >= maximum then return nil end
table.insert(nodes, {node = nn, pos = np}) table.insert(nodes, {node = nn, pos = np})
if #nodes > maximum then return nil end
-- add connected nodes to frontiers, connected is a vector list -- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions -- the vectors must be absolute positions

View File

@ -52,6 +52,16 @@ minetest.register_node("mcl_core:slimeblock", {
}, },
_mcl_blast_resistance = 0, _mcl_blast_resistance = 0,
_mcl_hardness = 0, _mcl_hardness = 0,
mvps_sticky = function (pos, node)
local connected = {}
if mesecon.rules.alldirs then
for _, r in ipairs(mesecon.rules.alldirs) do
table.insert(connected, vector.add(pos, r))
end
end
return connected
end,
}) })
minetest.register_node("mcl_core:cobweb", { minetest.register_node("mcl_core:cobweb", {