From dcb7090a3484bf98f794377442668dbe316865d0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 8 Mar 2017 00:33:05 +0100 Subject: [PATCH] Fix crash when digging vines, fix shears bugs --- mods/ITEMS/mcl_core/nodes.lua | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes.lua b/mods/ITEMS/mcl_core/nodes.lua index a5cf2ca35..e9ae2d86c 100644 --- a/mods/ITEMS/mcl_core/nodes.lua +++ b/mods/ITEMS/mcl_core/nodes.lua @@ -1268,23 +1268,10 @@ minetest.register_node("mcl_core:vine", { sounds = mcl_sounds.node_sound_leaves_defaults(), drop = "", after_dig_node = function(pos, oldnode, oldmetadata, user) - local item = user:get_wielded_item() - if item:get_name() == "mcl_core:shears" then + local item = user:get_wielded_item() + 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, @@ -1604,8 +1591,8 @@ minetest.register_node("mcl_core:tallgrass", { groups = {dig_immediate=3, flammable=3,attached_node=1,dig_by_water=1,deco_block=1}, 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 + local item = user:get_wielded_item() + if item:get_name() == "mcl_tools:shears" then user:get_inventory():add_item("main", ItemStack(oldnode.name)) end end,