Input Section Below

Custom Data Output:


        

So this is probably a bit confusing.

Allow me to explain...


In short, I devised a way to achieve 'Remote Command Execution' on Minecraft via setting up 8 simple command blocks in a forever-loaded chunk, and embedding commands in custom_data on items. When said item is held in your hand, it runs the command/commands stuffed into the custom_data tag. I really only made this because the length of the commands I was putting into an item got annoyingly long to have to rewrite into the custom_data section by hand, and figured I'd automate the process to save myself some hours. I then take the resulting custom_data value and throw it into the corresponding text box on this dope website under the "Extras" section.

If for some reason you would like to replicate what I did for fun, I'll leave the commands for the 8 command blocks I used to achieve this as well as the orientation of said blocks (Yes it does matter, I was lazy and relative positioning was the only way I came up with to handle some issues that came up)

Chain Line

Repeater:

execute as `PLAYER` if data entity @s SelectedItem.components."minecraft:custom_data".cmd run setblock ~1 ~ ~ command_block{TrackOutput:0b}
Chain 1:

execute as `PLAYER` if data entity @s SelectedItem.components."minecraft:custom_data".cmd run data modify block ~1 ~ ~-1 Command set from entity @s SelectedItem.components."minecraft:custom_data".cmd
Chain 2:

setblock ~1 ~ ~-1 minecraft:redstone_block
Chain 3:

setblock ~1 ~1 ~-2 minecraft:redstone_block

4 Repeaters

Top Left:

execute as `PLAYER` unless data entity @s SelectedItem.components."minecraft:custom_data".cmd run setblock ~3 ~ ~ air
Top Right:

/kill @e[type=item,nbt={Item:{id:"minecraft:activator_rail"}},distance=..5]
Bot Left:

execute as `PLAYER` unless data entity @s SelectedItem.components."minecraft:custom_data".cmd run setblock ~3 ~ ~ air
Bot Right:

execute as `PLAYER` unless data entity @s SelectedItem.components."minecraft:custom_data".cmd run setblock ~3 ~ ~ air