Display itemstring in itemframes (#116)

Itemframe patch
master
Niwla23 2019-10-12 13:23:04 +02:00 committed by Jean-Patrick Guerrero
parent 39e9991404
commit b8aaf37fc2
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,11 @@ function itemframe.rightclick(pos, node, clicker, itemstack)
local itemstring = itemstack:take_item():to_string()
meta:set_string("item", itemstring)
update_item(pos, node)
if itemstring == "" then
meta:set_string("infotext", "Item Frame (owned by " .. owner .. ")")
else
meta:set_string("infotext", itemstring.." (owned by " .. owner .. ")")
end
return itemstack
end