mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Fix golden apple item frame duplication bug
This commit is contained in:
parent
b56424a0b6
commit
86c10002a6
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user