My stance on Minecraft is the same as my stance on Baba is You. I absolutely encourage people to use Minecraft and other non-programming languages, for code-golf challenges, however I don't think they should be given special rules. Especially since it seems that these rules need to be updated when changes to the game break the existing rules.
That being said I think Minecraft commands can be used without special rules.
Output
Currently it is a consensus that programs may output by displaying it on screen.
That means that outputting to the Minecraft chat should be valid output.
The following commands all do this:
/tellraw
/msg
/w
/say
/me
There are other commands that provide very specific output (e.g. /seed
) these still are output since they print to the console but they aren't very useful for most code-golf so I'm not going to try to make a list of them.
Additionally the /title
and /titleraw
commands display text but as a title rather than in the chat. This is also valid output as it is displayed.
Now messages like these are not necessarily displayed to every player. I would say it is at least always valid to display the message to all players. And if it's command run by a single player (i.e. not run by a command block or the server), then it should be sufficient that the output display to that player.
Input
It seems to me that it is very hard for Minecraft commands to take input. It seems that the only valid method is (currently) hardcoding. Which means you can insert the input somewhere in the commands you are running. Note that you are only allowed to use this method if no other method is valid. I don't think it is possible to use /data
to take input, because even though /data
reads from a file it reads in a weird specific format, that I don't believe is flexible to allow you to take input on most challenges. For example I don't see how /data
could be used to take an integer without special rules.
So this seems to be the current permitted form of input.
However if another method becomes valid or if I have overlooked some method that is already valid, this method will cease to be allowed and that method, no matter how cumbersome will be required.
I personally very much dislike this. I don't think this is good, but it is currently the consensus. If you would like to use Minecraft commands in a different way, I offer you the same option I offered for Baba is You:
If you want to do code-golf in Minecraft, you can write a programming language that works like Minecraft.