Command syntax changes in Java 1.20.2

Compared with 1.20.1: 1 command added, 0 removed and 2 with a changed syntax. Measured by comparing the command trees that the two game versions generate.

Here is a look at the command changes in Minecraft Java Edition 1.20.2 compared to 1.20.1, based on the command trees from the game files. This release adds one new command and updates two existing ones, bringing the total number of commands to 81.

What changed for players

/random
This is a completely new command added to the game in version 1.20.2.
/function
You can now pass arguments directly or pull them from a block, entity, or storage source instead of only calling the function name. For example, you can run /function [] or /function with storage [].
/gamerule
A new rule option is available in the command tree. Players can now use /gamerule enderPearlsVanishOnDeath [].

Datapack creators and map makers will want to check out the new argument options for /function and the new /random command, while server owners may find the new /gamerule option useful for managing gameplay.

New commands

/random

/function +4 −1

+ /function <name> [<arguments>]+ /function <name> with block <sourcePos> [<path>]+ /function <name> with entity <source> [<path>]+ /function <name> with storage <source> [<path>]− /function <name>

/gamerule +1 −0

+ /gamerule enderPearlsVanishOnDeath [<value>]