Add a Jump or Goto command specifically for use in datapacks. Syntax: goto <label_name>. The command is meant to help with command flow control in datapacks. The idea is to be able to declare labels in a function, for example, by writing "NameOfLabel:" at a certain line in a function. Then, in the same function, the label could be referenced by a goto function in the argument, for example: "goto NameOfLabel". Doing so would cause the currently executed command to change to be the one right after the label in the datapack. Combined with the execute command, this would allow conditional jumps to happen as well, meaning that if statements would not need their own functions for their bodies. It would also allow easier creation of else if and else statements, allow functions to return from any point in them, and allow loops to not require their own functions.
Please sign in to leave a comment.
0 Comments