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

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

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





How to make a map

Updated December 27, 2017 04:14 AM