Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created December 23, 2014 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/c5fcb546a07964056572 to your computer and use it in GitHub Desktop.
Save PilzAdam/c5fcb546a07964056572 to your computer and use it in GitHub Desktop.
minetest.register_craftitem("needbees:frame_blitz", {
inventory_image = "frame_blitz.png",
on_use = function(itemstack, user, pointed_thing)
local md = tonumber(itemstack:get_metadata()) or 0
md = md + 1
itemstack:set_metadata(md .. "")
print(itemstack:get_metadata()) -- Always prints '1'?
end
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment