mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-30 23:03:45 +01:00
Update nether vine breaking logic with vector.offset
This commit is contained in:
parent
cf05771e30
commit
bc4d9211cb
@ -144,7 +144,7 @@ minetest.register_node("mcl_crimson:twisting_vines", {
|
|||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
on_dig = function(pos, node, digger)
|
on_dig = function(pos, node, digger)
|
||||||
local above = {x=pos.x, y=pos.y+1, z=pos.z}
|
local above = vector.offset(pos,0,1,0)
|
||||||
local abovenode = minetest.get_node(above)
|
local abovenode = minetest.get_node(above)
|
||||||
minetest.node_dig(pos, node, digger)
|
minetest.node_dig(pos, node, digger)
|
||||||
if abovenode.name == node.name and (not mcl_core.check_vines_supported(above, abovenode)) then
|
if abovenode.name == node.name and (not mcl_core.check_vines_supported(above, abovenode)) then
|
||||||
@ -220,7 +220,7 @@ minetest.register_node("mcl_crimson:weeping_vines", {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_dig = function(pos, node, digger)
|
on_dig = function(pos, node, digger)
|
||||||
local below = {x=pos.x, y=pos.y-1, z=pos.z}
|
local below = vector.offset(pos,0,-1,0)
|
||||||
local belownode = minetest.get_node(below)
|
local belownode = minetest.get_node(below)
|
||||||
minetest.node_dig(pos, node, digger)
|
minetest.node_dig(pos, node, digger)
|
||||||
if belownode.name == node.name and (not mcl_core.check_vines_supported(below, belownode)) then
|
if belownode.name == node.name and (not mcl_core.check_vines_supported(below, belownode)) then
|
||||||
|
Loading…
Reference in New Issue
Block a user