From: Niwla23 <46248939+Niwla23@users.noreply.github.com> Date: Sat, 12 Oct 2019 11:23:04 +0000 (+0200) Subject: Display itemstring in itemframes (#116) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=b8aaf37fc22709168b0b8776bcb1fbabc3899ac8;p=xdecor.git Display itemstring in itemframes (#116) Itemframe patch --- diff --git a/src/itemframe.lua b/src/itemframe.lua index 0843b45..a79d56e 100644 --- a/src/itemframe.lua +++ b/src/itemframe.lua @@ -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