How to subtract durability from an item the player is holding in their hand?

by Hydra   Last Updated July 11, 2019 21:14 PM

I'm trying to create a custom mining tool using the stone hoe. Whenever the player mines with it, I want it to take durability/damage. I created a scoreboard scoreboard objectives add usedTool minecraft.mined:minecraft.stripped_spruce_log. Now, whenever the player mines, I check if they have the stone hoe in their hand: execute as @a[nbt={SelectedItem:{id:"minecraft:stone_hoe"}}] if entity @s[scores={usedTool=..1}] run [...] Is there a way I can subtract durability from the stone hoe after the player has mined with it?

Related Questions

Updated November 26, 2017 06:14 AM

Updated March 16, 2019 12:14 PM

Updated May 27, 2019 00:14 AM

Updated December 27, 2017 04:14 AM

Updated April 21, 2017 05:14 AM