1
0
Fork 0

Fix golden apple item frame duplication bug

patch_skins
Eliy21 2024-01-21 08:38:20 +00:00
parent b56424a0b6
commit 86c10002a6
1 changed files with 11 additions and 0 deletions

View File

@ -183,6 +183,17 @@ end
local function eat_gapple_delayed(itemstack, placer, pointed_thing) 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) local function eat_gapple(itemstack, placer, pointed_thing)
if pointed_thing.type == "node" then if pointed_thing.type == "node" then
local node = minetest.get_node(pointed_thing.under) local node = minetest.get_node(pointed_thing.under)