From 882db9f873213ad9e6901b7be62b4b32658f70c4 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Tue, 7 Dec 2021 15:49:12 +0100 Subject: [PATCH] Remove unused and completely unlogical enchantment_level paramenter from get_possible_enchantments --- mods/ITEMS/mcl_enchanting/engine.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index d02be418de..d4953b7da2 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -295,7 +295,7 @@ function mcl_enchanting.initialize() end end -function mcl_enchanting.get_possible_enchantments(itemstack, enchantment_level, treasure) +function mcl_enchanting.get_possible_enchantments(itemstack, treasure) local possible_enchantments, weights, accum_weight = {}, {}, 0 for enchantment, enchantment_def in pairs(mcl_enchanting.enchantments) do local can_enchant, _, _, primary = mcl_enchanting.can_enchant(itemstack, enchantment, 1) @@ -327,7 +327,7 @@ function mcl_enchanting.generate_random_enchantments(itemstack, enchantment_leve if enchantment_level == 0 then break end - local possible, weights, accum_weight = mcl_enchanting.get_possible_enchantments(itemstack, enchantment_level, treasure) + local possible, weights, accum_weight = mcl_enchanting.get_possible_enchantments(itemstack, treasure) local selected_enchantment, enchantment_power if #possible > 0 then local r = math.random(accum_weight)