Power Tools For Minecraft Bedrock
Here's a little javascript to enable any object to act like a tool that performs a /command on interaction with a block. It's a server script so it goes in the /scripts/server folder of your bedrock behavior pack as .js file. Eventually as more of the dev API rolls out there'll be more elegant solutions, but I think this one is pretty rad. /** Stellario's "Power Tool" Server Script Run any command from any item by right-clicking on a block like a tool. Edit the list with the minecraft:item_id and /command you want that item to run. Remove or comment out any example ids and command you don't use. Example: ["minecraft:item_id_name", "/command"], Save this script to "behavior_pack_name/scripts/server/" Command Replacements: PLAYER => player name PP_X, PP_Y, PP_Z => player's X,Y,Z coordinates ROT_X, ROT_Y => player's head rotation THE_ITEM => minecraft ID of item used ...