Minecraft – Give the player an item that can instantly mine any block

minecraft-commandsminecraft-java-edition

I am working in 1.14 and I'm making an adventure/survival map. Right now I have a pair of shears that I give the player using this command /give @p minecraft:shears{CanDestroy:["minecraft:stone","minecraft:oak_log"]} 1. The problem with this is that the stone and oak_log takes a very long time to mine since shears are not the right tool for mining those blocks. When I give the player haste, this doesn't fix this either. Is there a way for me to give the player an item that acts like it is the right tool to mine a specific type of block (ie: wood, dirt, stone etc)?

Best Answer

Haste 255 makes you mine slower, because the number wraps around into the negatives. Haste 127 makes you mine the fastest.

There is no item that gives you haste (and the effect.digSpeed attribute modifier apparently doesn't work at all), so you have to use commands to check for holding the item in the main hand. Commands for that are easily found online.