Optimize item.lua
authortenplus1 <tenplus1@users.noreply.github.com>
Thu, 23 Feb 2017 19:03:18 +0000 (20:03 +0100)
committerAuke Kok <sofar+github@foo-projects.org>
Fri, 10 Mar 2017 19:24:10 +0000 (11:24 -0800)
commitd785456b3fa35faf47cb972fde9e8668382c5e22
tree6de05e18b2a4ae5f04cd3f9d0b3f44aacfb7f4ea
parent2baa191a64c4a0f4475bfd12540672dc99405f4f
Optimize item.lua
Replace slow ItemStack get_definitions with registered_nodes one's and cached playername as it's used multiple times.  Also removed local item = itemstack:peek_item() as it is never used.
builtin/game/item.lua