I want to add block breaking detection and right click detect to a datapack I’m working on. I want this to be multiplayer friendly and I need to know who broke the block.

To add right click detection is easy. I just have a scoreboard for using a carrot/fungi on a stick. Now, I want to add block break detection, but I also want to know where the event occurred as a part of the detection.

This is we’re I’m stuck. I can use raycasting for location, but I don’t know how to detect if there is a block that was broken. I can’t use a bunch of scoreboards for each individual block. I don’t know if I can use loot tables to add a player uuid to a special drop as nbt. Although for that method, it probably won’t work because in that same datapack I have a loot table for each block already.

I have to have right click detection and block break detection both using a carrot/fungi on a stick. So using used pickaxe/other tool scoreboard won’t work either. Raycasting also won’t work since it isn’t multiplayer friendly because you can’t detect who broke the block.

If you have any questions or if any of this is unclear please comment below. Thanks for helping.


You can Just make an scoreboard like "Minecraft.mined.diamonds" And you look at the player ho have the scores =1.. Look to dropped diamons around him, and execute at the diamonds.

  • The problem with using scoreboards to detect when a player broke a block, is it doesn't work in creative. This also could be flawed, as when you break a block, it's item dropped, gets thrown in a specific direction. Good idea, but this won't work for me. Apr 9 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.