Discussion in 'General discussion' started by Levi, Jun 29, 2018.
i want to give player pickaxe with one more use whats the damage for it
Please explain more...
its a number setDamage()
You could start with a new item, use Item->getMaxDurability(), subtract 1, then use Item->applyDamage() to get an item with 1 durability. If you have an item with the Unbreaking enchantment, it could have more than one use, I believe.
i have unbreaking enchantments, what should i do with that
Oh, easier method. Item->setDamage(Item->getMaxDurability() - 1). That should ignore Unbreaking.
Separate names with a comma.