TransWikia.com

When you make a certain tool it can break certain blocks

Arqade Asked on September 19, 2020

I am making a Minecraft adventure map.

I am making a system where a player must craft a wooden pickaxe and use it to break stone. The problem is, when the player claims their newly-crafted pickaxe, it doesn’t come with the ability to break stone.

How can I make a command that lets you use the wooden pickaxe to break stone after it’s crafted?

One Answer

Assuming you're using java addition, use this command to replace the pickaxe that was just crafted into a special pickaxe:

/execute as @p[distance=..100,nbt={SelectedItem:{id:"minecraft:wooden_pickaxe"}}] run replaceitem entity @p weapon.mainhand wooden_pickaxe{CanDestroy:[stone]}

This transaction should take place when the player holds the pickaxe for the first time. The command needs to be in a command set to repeating, always active. If you need help or have feedback, don't be shy.

Also likes and up votes help.

Answered by Name_Hr3 on September 19, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP