Function Parameters, Output and more.
I do acknowledge that some of these features could be tricky to implement, but others probably wouldn't be.
TL;DR: Functions should have parameters, an output, a permission level, and a custom command for running it more easily.
Functions should have an Output, making the communication between the executor of the function and said function much easier.
This would be done as follows:
/execute store result|success output ..
The rest would define the actual result for the function.
Functions should have Parameters, that could be defined in several different ways. Perhaps with a separate .json file, or with a Json object embedded within the function's file, or something entirely different.
What really matters is, these parameters could be obtained by using:
/function parameter [parameter_name]
The command above would always work as a function must have a namespace in order to be executed, which is not the case for a simple "parameter" keyword.
The result of said command would be the value for the specified parameter, which could then be used with another command, most noticeably the /execute store command.
We should have the ability to specify who can run a function. Common players, Administrators, or only the Server?
This would be done in a similar manner to how we'd tell what are a function's parameters.
Ideally, there'd be 3 permission levels:
Public, anyone may run the function.
Admin, the default, only admins or higher.
Server, only command blocks, the Server and other functions and data pack-related stuff.
If a function couldn't be run by someone, it wouldn't appear in the function auto-completion list, helping to make it more tidy and organized.
If there were no public functions, the /function command wouldn't appear for public players.
The last feature are function commands, a command that'll run a function when used. It'd inherit all the parameters and permissions from it's base function.
If you added a "#" symbol right before the command's name, it'd hide the function from the /function command, so only the custom command would appear.
Please sign in to leave a comment.