Minecraft – Trigger command blocks remotely

minecraft-commandsminecraft-java-edition

I am currently working on a minigame, and I am trying to remotely trigger command blocks. Is there any way to use a lever and a command block to activate another command block 4K blocks away? For example, pull the lever and the farther command block will summon an enderdragon?

Best Answer

Summon a redstone block beside the command block:

setblock X Y Z redstone_block

I checked that it works even if the chunk is not loaded.

You can figure out the coordinates by standing right beside the command block, pressing F3 and looking at "Block:"

May want to remove the redstone block afterwards so it can activate again later:

setblock X Y Z air