diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index e47cf06507..f505c055e0 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -74,8 +74,12 @@ function mcl_enchanting.is_enchanted(itemname) return minetest.get_item_group(itemname, "enchanted") > 0 end +function mcl_enchanting.not_enchantable_on_enchanting_table(itemname) + return mcl_enchanting.get_enchantability(itemname) == -1 +end + function mcl_enchanting.is_enchantable(itemname) - return mcl_enchanting.get_enchantability(itemname) > 0 + return mcl_enchanting.get_enchantability(itemname) > 0 or mcl_enchanting.not_enchantable_on_enchanting_table(itemname) end function mcl_enchanting.can_enchant_freshly(itemname) @@ -328,7 +332,7 @@ end function mcl_enchanting.generate_random_enchantments(itemstack, enchantment_level, treasure, no_reduced_bonus_chance, ignore_already_enchanted, pr) local itemname = itemstack:get_name() - if not mcl_enchanting.can_enchant_freshly(itemname) and not ignore_already_enchanted then + if (not mcl_enchanting.can_enchant_freshly(itemname) and not ignore_already_enchanted) or mcl_enchanting.not_enchantable_on_enchanting_table(itemname) then return end @@ -454,7 +458,7 @@ function mcl_enchanting.generate_random_table_slots(itemstack, num_bookshelves) end function mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves) - if not mcl_enchanting.can_enchant_freshly(itemstack:get_name()) then + if (not mcl_enchanting.can_enchant_freshly(itemstack:get_name())) or mcl_enchanting.not_enchantable_on_enchanting_table(itemname) then return {false, false, false} end local itemname = itemstack:get_name() diff --git a/mods/ITEMS/mcl_shields/init.lua b/mods/ITEMS/mcl_shields/init.lua index 0c0abf593e..c9ed6eb1e5 100644 --- a/mods/ITEMS/mcl_shields/init.lua +++ b/mods/ITEMS/mcl_shields/init.lua @@ -30,7 +30,7 @@ minetest.register_tool("mcl_shields:shield", { groups = { shield = 1, weapon = 1, - enchantability = 1, + enchantability = -1, no_wieldview = 1, offhand_item = 1, }, @@ -405,7 +405,7 @@ for _, colortab in pairs(mcl_banners.colors) do groups = { shield = 1, weapon = 1, - enchantability = 1, + enchantability = -1, no_wieldview = 1, not_in_creative_inventory = 1, offhand_item = 1,