mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Fix item's being subtracted by itemframes in creative mode
This commit is contained in:
parent
01fb91acbf
commit
4f371d44c8
1 changed files with 3 additions and 1 deletions
|
@ -102,12 +102,13 @@ end
|
|||
mcl_itemframes.update_entity = update_entity
|
||||
|
||||
--Node functions
|
||||
function mcl_itemframes.tpl_node.on_rightclick(pos, node, clicker, pstack, pointed_thing)
|
||||
function mcl_itemframes.tpl_node.on_rightclick(pos, node, clicker, ostack, pointed_thing)
|
||||
local name = clicker:get_player_name()
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
local pstack = ItemStack(ostack)
|
||||
local itemstack = pstack:take_item()
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
drop_item(pos)
|
||||
|
@ -116,6 +117,7 @@ function mcl_itemframes.tpl_node.on_rightclick(pos, node, clicker, pstack, point
|
|||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||
return pstack
|
||||
end
|
||||
return ostack
|
||||
end
|
||||
|
||||
mcl_itemframes.tpl_node.on_destruct = remove_entity
|
||||
|
|
Loading…
Add table
Reference in a new issue