forked from Mineclonia/Mineclonia
Fix another anvil weirdness and dupe glitch
This commit is contained in:
parent
89d63080be
commit
51f3869ffe
|
@ -23,7 +23,7 @@ end
|
|||
|
||||
function mcl_enchanting.load_enchantments(itemstack, enchantments)
|
||||
if not mcl_enchanting.is_book(itemstack:get_name()) then
|
||||
mcl_enchanting.unload_enchantments(itemstack)
|
||||
mcl_enchanting.unload_enchantments(itemstack)
|
||||
for enchantment, level in pairs(enchantments or mcl_enchanting.get_enchantments(itemstack)) do
|
||||
local enchantment_def = mcl_enchanting.enchantments[enchantment]
|
||||
if enchantment_def.on_enchant then
|
||||
|
@ -160,7 +160,7 @@ function mcl_enchanting.combine(itemstack, combine_with)
|
|||
local itemname = itemstack:get_name()
|
||||
local combine_name = combine_with:get_name()
|
||||
local enchanted_itemname = mcl_enchanting.get_enchanted_itemstring(itemname)
|
||||
if enchanted_itemname ~= mcl_enchanting.get_enchanted_itemstring(combine_name) and not mcl_enchanting.is_book(combine_name) then
|
||||
if not enchanted_itemname or enchanted_itemname ~= mcl_enchanting.get_enchanted_itemstring(combine_name) and not mcl_enchanting.is_book(combine_name) then
|
||||
return false
|
||||
end
|
||||
local enchantments = mcl_enchanting.get_enchantments(itemstack)
|
||||
|
|
Loading…
Reference in New Issue