From 98fff2c608d32c22b569304cf4120e8257af8b5b Mon Sep 17 00:00:00 2001 From: kabou Date: Thu, 5 May 2022 10:24:49 +0200 Subject: [PATCH] Update enchanting table to use lapis items. --- mods/ITEMS/mcl_enchanting/engine.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index c2f979010..569fd0981 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -520,7 +520,7 @@ function mcl_enchanting.show_enchanting_formspec(player) local table_slots = mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves) for i, slot in ipairs(table_slots) do any_enchantment = any_enchantment or slot - local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_dye:blue", count = i})) + local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_core:lapis", count = i})) local enough_levels = slot and slot.level_requirement <= player_levels local can_enchant = (slot and enough_lapis and enough_levels) local ending = (can_enchant and "" or "_off") @@ -555,7 +555,7 @@ function mcl_enchanting.handle_formspec_fields(player, formname, fields) local meta = player:get_meta() local num_bookshelfes = meta:get_int("mcl_enchanting:num_bookshelves") local itemstack = inv:get_stack("enchanting_item", 1) - local cost = ItemStack({name = "mcl_dye:blue", count = button_pressed}) + local cost = ItemStack({name = "mcl_core:lapis", count = button_pressed}) if not inv:contains_item("enchanting_lapis", cost) then return end @@ -607,7 +607,7 @@ function mcl_enchanting.allow_inventory_action(player, action, inventory, invent if action == "move" then local listname = inventory_info.to_list local stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index) - if stack:get_name() == "mcl_dye:blue" and listname ~= "enchanting_item" then + if stack:get_name() == "mcl_core:lapis" and listname ~= "enchanting_item" then local count = stack:get_count() local old_stack = inventory:get_stack("enchanting_lapis", 1) if old_stack:get_name() ~= "" then @@ -630,7 +630,7 @@ function mcl_enchanting.on_inventory_action(player, action, inventory, inventory if action == "move" and inventory_info.to_list == "enchanting" then local stack = inventory:get_stack("enchanting", 1) local result_list - if stack:get_name() == "mcl_dye:blue" then + if stack:get_name() == "mcl_core:lapis" then result_list = "enchanting_lapis" stack:add_item(inventory:get_stack("enchanting_lapis", 1)) else