forked from Mineclonia/Mineclonia
Fix slimeblock/piston behavior, https://github.com/kay27/MineClone2/issues/4
This commit is contained in:
parent
5f820c6bf9
commit
a78c613322
|
@ -120,11 +120,13 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
|
|||
while #frontiers > 0 do
|
||||
local np = frontiers[1]
|
||||
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 #nodes >= maximum then return nil end
|
||||
table.insert(nodes, {node = nn, pos = np})
|
||||
if #nodes > maximum then return nil end
|
||||
|
||||
-- add connected nodes to frontiers, connected is a vector list
|
||||
-- the vectors must be absolute positions
|
||||
|
|
|
@ -52,6 +52,16 @@ minetest.register_node("mcl_core:slimeblock", {
|
|||
},
|
||||
_mcl_blast_resistance = 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", {
|
||||
|
|
Loading…
Reference in New Issue