a fix so that all sword (and item with sword in their name) are able to craft pumpkin into pumpkin face
parent
b32ef86798
commit
7773643c19
|
@ -63,7 +63,7 @@ minetest.register_node(":farming:pumpkin", {
|
|||
|
||||
on_punch = function(pos, node, puncher)
|
||||
local tool = puncher:get_wielded_item():get_name()
|
||||
if tool and tool == "default:sword_wood" or tool == "default:sword_stone" or tool == "default:sword_steel" then
|
||||
if tool and string.match(tool, "sword") then
|
||||
node.name = "farming:pumpkin_face"
|
||||
minetest.set_node(pos, node)
|
||||
puncher:get_inventory():add_item("main", ItemStack("farming:pumpkin_seed"))
|
||||
|
|
Loading…
Reference in New Issue