From e532d31db38f5cbb24a4b31e2b979519285437b1 Mon Sep 17 00:00:00 2001 From: jp Date: Wed, 5 Aug 2015 01:22:35 +0200 Subject: [PATCH] Fix re-enchanting to unknown items --- enchanting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enchanting.lua b/enchanting.lua index d624ced..7f4b9f1 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -26,7 +26,7 @@ local function enchfields(pos, formname, fields, sender) local enchs = {"durable", "fast"} for _, e in pairs(enchs) do - if toolname ~= "" and mese > 0 and fields[e] then + if string.find(toolstack:get_name(), "default:") and mese > 0 and fields[e] then toolstack:replace("xdecor:enchanted_"..string.sub(toolname, 9).."_"..e) mesestack:take_item() inv:set_stack("mese", 1, mesestack)