Started by
DodoNoobLORD
on
Topic category: Help with Minecraft modding (Java Edition)
So what I want to do is make a block only be able to be broken with a specific tool, and not be able to be mined at all by others.
I thought of 3 ways this could be done:
1. Make the block unbreakable, but if the item in the main hand is the tool, make it breakable
2. Check the item in the main hand is the tool, if it's not when the block is broken, the block will just be placed back.
3. Make the block unbreakable, and if the item in the main hand is the tool change the block to another block that isn't unbreakable, then after a bit of time change it back to the other block.
I have done number three:
However I would like to know if there is a way to do numbers 1 or 2
Ok so i immediately realised number 3 kind of doesn't work as the block just comes back, so make it so it only comes back if the block is not broken