Java Edition 17w45a

17w45a is the third snapshot released for Java Edition 1.13, which completely overhauled the command system.

Command format

 * General
 * A command UI when typing commands in the chat.
 * Different components of commands will be displayed in different colors.
 * Errors will be displayed in red without having to run the command.
 * An  argument in target selectors.
 * A new command parsing library called Brigadier.

Mobs

 * White Horse Revision 2.png Horses
 * The model has been simplified to be more consistent with other mobs.
 * Some animations like opening its mouth when grazing has been removed from the model as well, and the saddle animation is changed slightly.

Command format

 * General
 * Commands and functions are much faster and more efficient.
 * Most commands are now more case-sensitive. Lowercase is preferable wherever possible.
 * For example, this is no longer allowed:
 * The output signal of a command block used to be its "success count", but now is its "result".


 * Blocks
 * Wherever a, optionally   and optionally   was required, it's now a single   argument that looks like this:
 * ID is required (though just as before, if namespace isn't set it defaults to ).
 * States are inside, comma-separated and must be properties/values supported by the blocks. They are optional.
 * is a syntax error, because  doesn't have.
 * is a syntax error, because 's   is a number between 0 and 15.
 * NBT tag is inside {}, and works just like the player would expect. It's optional.
 * In the context of "conditions"/testing for blocks, only the states the player provided will be tested.
 * If the player tests, it only checks power but ignores other states such as.
 * In the context of setting blocks, any states the player provided will be set but anything missed out will default depending on the block.
 * If the player set, it will set   to 15 but   will be a default value (in this case, set to  ).
 * There is no such thing as block data value in 1.13. It's either a different block, or a state.
 * If the player tests, it only checks power but ignores other states such as.
 * In the context of setting blocks, any states the player provided will be set but anything missed out will default depending on the block.
 * If the player set, it will set   to 15 but   will be a default value (in this case, set to  ).
 * There is no such thing as block data value in 1.13. It's either a different block, or a state.


 * Commands
 * Removed in favor of entity selectors.
 * Removed in favor of entity selectors.


 * The syntax of has changed.
 * {{cmd|clear [ ] [ ] [ has been removed in preparation for the flattening, item data will no longer be a thing and item damage values will be moved into NBT.
 * {{cmd|clear [ ] [ ] [ has been removed in preparation for the flattening, item data will no longer be a thing and item damage values will be moved into NBT.


 * {{cmd|clone}}
 * The syntax of {{cmd|clone}} has been changed.
 * {{cmd|clone  filtered [force{{!}}move{{!}}normal] [ ] [  (but doesn't change position).
 * {{cmd|execute at }} executes a command using the position of   (but doesn't change entity).
 * {{cmd|execute offset }} executes a command using the position of.
 * {{cmd|execute align }} executes a command after aligning the current position to the block grid (rounding down),   is any combination of     and   (for example: , ,  and  ).
 * Examples:
 * using  will become.
 * using  will become.
 * Conditional sub-commands can let the player prevent the command from running at all:
 * {{cmd|execute (if{{!}}unless) block  }} executes a command if (or unless)   matches.
 * {{cmd|execute (if{{!}}unless) blocks  (all{{!}}masked) }} executes a command if (or unless) the region between   and   matches.
 * {{cmd|execute (if{{!}}unless) entity }} executes a command if (or unless)   exists (returns 1 or more entities).
 * {{cmd|execute (if{{!}}unless) score  ( <|<=|=|>=|> ) 's score relates to 's score based on the chosen criterion.
 * As replacement for {{cmd|stats}}, a new sub-command  lets the player store the result or success of a command somewhere:
 * {{cmd|execute store (result{{!}}success)  }}.
 * is the result of a command, which replaces these old stats:,  ,  ,.
 * is how many times the command was successful. This is usually  or , but if the command split up (for example  ) then it may be more than  . This replaces.
 * The value is stored into the scoreboard under  and.
 * The  must exist, but unlike with {{cmd|stats}}, the player doesn't need to set an initial value for.
 * The value will be stored when the full command has finished executing.
 * If a command isn't successful ( is  ),   will always be set to.
 * It will be made clear what the expected result of each command is.
 * The player can chain all sub-commands together.
 * After every sub-command, the player needs to write another sub-command.
 * When the player is done with chaining sub-commands,  lets players write the actual command to be executed.
 * is no longer allowed before the command.
 * {{cmd|execute as somebody at somebody run say hi}}.
 * Example of old commands:
 * {{cmd|execute @e ~ ~ ~ detect ~ ~ ~ stone 0 say Stone!}} is now {{cmd|execute as @e at @s if block ~ ~ ~ stone run say Stone!}}
 * {{cmd|execute @e ~ ~ ~ detect ~ ~ ~ grass 0 summon pig}} is now {{cmd|execute at @e if block ~ ~ ~ grass run summon pig}}.
 * {{cmd|execute @e ~ ~ ~ say Hello!}} is now {{cmd|execute as @e run say Hello!}}


 * {{cmd|experience}}
 * {{cmd|xp}} is now an alias for {{cmd|experience}}.
 * Split up into 3 different subcommands:
 * {{cmd|experience add [points{{!}}levels]}}
 * Adds  of either points or levels to the target   (defaults to points).
 * Adding points can cause players to level up, as usual.
 * Negative numbers are supported, to subtract points instead.
 * Subtracting points can cause players to level down.
 * {{cmd|experience set [points{{!}}levels]}}.
 * Sets  of either points or levels on the target   (defaults to points).
 * The player cannot set more points than their current level allows.
 * When changing levels, the points will stay at the same percentage as the previous level.
 * {{cmd|experience query (points{{!}}levels)}}.
 * Returns either the number of points or levels on the given.


 * {{cmd|fill}}
 * The syntax of {{cmd|fill}} has been changed.
 * {{cmd|fill    arguments.
 * This has been moved into {{cmd|execute}}.
 * {{cmd|function foo if @e}} is now {{cmd|execute if entity @e run function foo}}.


 * {{cmd|gamerule}}
 * {{cmd|gamerule}} no longer accepts unknown rules ("custom gamerules").
 * The player can use functions or scoreboards as replacements, with no loss of functionality.
 * Existing custom gamerules will just not be accessible. Only built-in rules will be available.
 * Values to {{cmd|gamerule}} are now type checked (giving a string if it wants an int is a very obvious error).


 * {{cmd|give}}
 * The syntax of {{cmd|give}} has changed.
 * {{cmd|give [ ] [  has been removed in preparation for the flattening, item data will no longer be a thing and item damage values will be moved into NBT.


 * {{cmd|kill}}
 * A  is now mandatory.


 * {{cmd|locate}}
 * The y-coordinate is now returned as  instead of.
 * The  of the command, used by {{cmd|execute store}}, will be the absolute distance to the structure.


 * {{cmd|op}}
 * Now allows target selectors besides names.


 * {{cmd|particle}}
 * The  argument has been removed, instead the parameters for particles like   can be specified right after the   argument using the new block argument.
 * {{cmd|particle blockcrack stone [variant=smooth_granite] ~ ~ ~ 0 0 0 0 1}}.
 * The particle names have been converted to lowercase and optionally have a namespace.


 * {{cmd|publish}}
 * Added an optional  argument.


 * {{cmd|replaceitem}}
 * The syntax of {{cmd|replaceitem}} has changed.
 * {{cmd|replaceitem block  [ ] [  has been removed in preparation for the flattening, item data will no longer be a thing and item damage values will be moved into NBT.
 * The  argument no longer requires.
 * For example,  now is.


 * {{cmd|scoreboard}}
 * {{cmd|scoreboard}} had  removed from its commands in favor of the   argument in entity selectors.
 * {{cmd|scoreboard players tag}} and {{cmd|scoreboard teams}} removed. Replaced by {{cmd|tag}} and {{cmd|team}} respectively.
 * {{cmd|scoreboard players test}} removed in favor of {{cmd|execute (if{{!}}unless) score}}, entity selectors and {{cmd|scoreboard players get }}.


 * {{cmd|setblock}}
 * The syntax of {{cmd|setblock}} has changed.
 * {{cmd|setblock [  and , which covers all the old stat types.


 * {{cmd|stopsound}}
 * can now be used instead of  to stop all sounds with a certain name, across all sources.


 * {{cmd|tag}}
 * Replaces {{cmd|scoreboard players tag}}.
 * Keeps the same syntax.
 * {{cmd|tag add }} to add  to.
 * {{cmd|tag remove }} to remove  from.
 * {{cmd|tag list}} to list all tags on.


 * {{cmd|team}}
 * Replaces {{cmd|scoreboard teams}}.
 * Keeps the same syntax.
 * {{cmd|team add [ ]}}
 * {{cmd|team empty }}
 * {{cmd|team join [ ]}}
 * {{cmd|team leave [ ]}}
 * {{cmd|team list [ ]}}
 * {{cmd|team option  }}


 * {{cmd|testfor}}, {{cmd|testforblock}} and {{cmd|testforblocks}}
 * Removed. Now part of {{cmd|execute}}.


 * {{cmd|toggledownfall}}
 * Removed in favor of {{cmd|weather}}.


 * {{cmd|tp}} and {{cmd|teleport}}
 * {{cmd|tp}} is now an alias of {{cmd|teleport}} (much like {{cmd|w}}, {{cmd|msg}} and {{cmd|tell}}).
 * Coordinates are now relative to the executor, as with all other commands.
 * The syntax of {{cmd|tp}} remains, but with the behavior of {{cmd|teleport}}.


 * {{cmd|trigger}}
 * {{cmd|trigger }} is a new syntax as a shortcut for {{cmd|trigger add 1}}.


 * {{cmd|weather}}
 * If the player doesn't specify a time, it now defaults to 5 minutes (previously random).


 * Items
 * Wherever an, optionally   and optionally   was required, it's now a single   argument that looks like this:
 * ID is required (though just as before, if namespace isn't set it defaults to ).
 * NBT tag is inside {}, and works just like they player would expect. It's optional.
 * Any other information is either a separate item or a property in nbt.
 * NBT tag is inside {}, and works just like they player would expect. It's optional.
 * Any other information is either a separate item or a property in nbt.


 * Target selectors
 * More error handling has been introduced.
 * Arguments may now be quoted.
 * Things like,  ,   are not allowed.
 * There's no longer a "min" and "max" separate values, we instead support ranges.
 * is level 10.
 * is level 10, 11 or 12.
 * is anything level 5 or above.
 * is anything level 15 or below.
 * The arcane shorthand names have been renamed.
 * or  ->
 * or  ->
 * or  ->
 * or  ->
 * ,,  ,  ,  ,   are now doubles and allow values like.
 * and  are no longer center-corrected.
 * This means  no longer equates to.
 * (previously ) no longer allows numerical or shorthand IDs.
 * (was ) No longer allows negative values.
 * Use  instead.
 * The  argument now supports spaces (as long as it's quoted).
 * Multiple of the same argument in target selectors is now possible.
 * matches someone with,   and not.
 * matches something that isn't a cow and isn't a chicken.
 * isn't allowed, because something cannot both be a cow and chicken.
 * The player can specify the sorting.
 * is the old default, sorting by distance (default for ).
 * is the reverse of that (previously the player would use  for this).
 * for random sorting (default for ).
 * is a new option to not sort the result (default for,  ).
 * Specifying scores now looks like.
 * The player can test for advancements with.
 * for "they completed the advancement",  for "they have not completed the advancement".
 * Alternatively, pass a block of specific criteria to test for (again, / ).
 * for "they completed the advancement",  for "they have not completed the advancement".
 * Alternatively, pass a block of specific criteria to test for (again, / ).

Video
Video made by slicedlime: