From 86c10002a6569553c87385887d533e92f8847218 Mon Sep 17 00:00:00 2001 From: Eliy21 Date: Sun, 21 Jan 2024 08:38:20 +0000 Subject: [PATCH] Fix golden apple item frame duplication bug --- mods/ITEMS/mcl_core/craftitems.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/ITEMS/mcl_core/craftitems.lua b/mods/ITEMS/mcl_core/craftitems.lua index 748c7856f..e89fe124a 100644 --- a/mods/ITEMS/mcl_core/craftitems.lua +++ b/mods/ITEMS/mcl_core/craftitems.lua @@ -183,6 +183,17 @@ end local function eat_gapple_delayed(itemstack, placer, pointed_thing) + if pointed_thing.type == "node" then + local node = minetest.get_node(pointed_thing.under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + elseif pointed_thing.type == "object" then + return itemstack + end + local function eat_gapple(itemstack, placer, pointed_thing) if pointed_thing.type == "node" then local node = minetest.get_node(pointed_thing.under)