Minecraft Functions – Do Minecraft Functions Have Inputs and Outputs Like Conventional Functions?

minecraft-commandsminecraft-java-edition

Now I know that technically in theory one could just use blocks to convey values in and out of any body of code. What I'm asking is whether or not a built-in syntax exists for input parameters and return values similar to what pretty much all other programming languages consider to be functions?

Best Answer

A function in Minecraft and a function in programming is completely different.

A function in Minecraft is just a list of commands, which can be executed in game with a single command, running commands in the function from top to bottom. The only other thing you can do with functions right now is leave comments in the code, which start with a #.

So to answer both of your questions; no.