0
0
Fork 0

Fix crash when digging vines, fix shears bugs

This commit is contained in:
Wuzzy 2017-03-08 00:33:05 +01:00
parent cac94551df
commit dcb7090a34
1 changed files with 4 additions and 17 deletions

View File

@ -1269,22 +1269,9 @@ minetest.register_node("mcl_core:vine", {
drop = "",
after_dig_node = function(pos, oldnode, oldmetadata, user)
local item = user:get_wielded_item()
if item:get_name() == "mcl_core:shears" then
if item:get_name() == "mcl_tools:shears" then
user:get_inventory():add_item("main", ItemStack(oldnode.name))
end
local next_find = true
local ptr = 1
while next_find == true do
local pos2 = {x=pos.x, y=pos.y-ptr, z=pos.z}
local node = minetest.get_node(pos2)
if node.name == "mcl_core:vine" and check_attached_node(pos2, node) == false then
drop_attached_node(pos2)
core.check_for_falling(pos2)
ptr = ptr + 1
else
next_find = false
end
end
end,
_mcl_blast_resistance = 1,
_mcl_hardness = 0.2,
@ -1605,7 +1592,7 @@ minetest.register_node("mcl_core:tallgrass", {
sounds = mcl_sounds.node_sound_leaves_defaults(),
after_dig_node = function(pos, oldnode, oldmetadata, user)
local item = user:get_wielded_item()
if item:get_name() == "mcl_core:shears" then
if item:get_name() == "mcl_tools:shears" then
user:get_inventory():add_item("main", ItemStack(oldnode.name))
end
end,