mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Fix items disappearing when rightclicking protected itemframes
This commit is contained in:
parent
204fddebd2
commit
01fb91acbf
1 changed files with 2 additions and 2 deletions
|
@ -103,13 +103,13 @@ mcl_itemframes.update_entity = update_entity
|
|||
|
||||
--Node functions
|
||||
function mcl_itemframes.tpl_node.on_rightclick(pos, node, clicker, pstack, pointed_thing)
|
||||
local itemstack = pstack:take_item()
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local name = clicker:get_player_name()
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.record_protection_violation(pos, name)
|
||||
return
|
||||
end
|
||||
local itemstack = pstack:take_item()
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
drop_item(pos)
|
||||
inv:set_stack("main", 1, itemstack)
|
||||
update_entity(pos)
|
||||
|
|
Loading…
Add table
Reference in a new issue