Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Demonstration of remove_item bug
- --]]
- minetest.register_node("tricorder:test", {
- description = "test",
- groups = { snappy = 3 },
- on_use=function(itemstack, user, pointed_thing)
- -- READ THE DOCS!!!
- -- inv=minetest.get_inventory({type="player",name=user:get_player_name()})
- -- inv:remove_item("main",ItemStack("tricorder:test"))
- itemstack:take_item(); return itemstack
- end,
- })
- --[[
- To see the bug save this as the init.lua of a mod, then in game do /giveme testmod:test 20
- It should be that upon left click a single "test" item is removed from player inv.
- But that does not happen unless there is a stack of the "test" item at some point AFTER the player's currently selected inventory slot.
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement