Tool wear not working
Posted: Fri Mar 13, 2015 20:35
Something seems to broken with the tool wear.
In version 0.4.9 the following code behaves as expected, you use the stick 30 or so times and it wears out and disappears. This is not the case with the current dev version and has broken at least one of my mods.
Another thing I noticed when testing under 0.4.9 was just how much better it performs on my hardware...
Well I guess that's progress for ya :/
In version 0.4.9 the following code behaves as expected, you use the stick 30 or so times and it wears out and disappears. This is not the case with the current dev version and has broken at least one of my mods.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_tool("testtool:stick", {
description = "Test Stick",
inventory_image = "default_stick.png",
on_use = function(itemstack, user, pointed_thing)
itemstack:add_wear(2000)
return itemstack
end,
})
Another thing I noticed when testing under 0.4.9 was just how much better it performs on my hardware...
Well I guess that's progress for ya :/