Java Edition 1.20.2

1.20.2 is an upcoming minor update to, with no set release date which adds the Villager Trade Rebalance experimental toggle, adds command and fixes bugs.

Command format

 * A new command for randomizing values and controlling random sequences.
 * Syntaxes:
 * : draw a random value.
 * : control random sequences.
 * Arguments:
 * : A range of values to randomize between, inclusively. For instance,  is a regular D6 roll.
 * : The name of a random sequence to sample or reset.
 * In,  refers to all random sequences.
 * : A seed to use for the random sequence after reset.
 * : A boolean specifying whether to include the world seed when seeding the sequence. Defaults to.
 * When, it means the sequence will evaluate to the same regardless of which world the command is run in.
 * : A boolean specifying whether to include the sequence ID when seeding the sequence. Defaults to.
 * When, it means all sequences will evaluate to the same regardless of which name they have.
 * notes:
 * When using  rather than , the resulting value is also shown in chat for all players.
 * When  not specified, this command can be executed by players without operator privileges.
 * notes:
 * By default, all sequences are seeded as.
 * Using  instead of a sequence ID resets all sequences and sets the default parameters.
 * If no seed is specified, the sequence resets to the default parameters.
 * If no seed is specified, the sequence resets to the default parameters.

General

 * Attributes
 * Added the  attribute.
 * Acts similar to, but instead of being the upper bound for  , it is the upper bound for.
 * The mob effect  increases   as well as fills the   to the max when applied.


 * Experiments
 * Added the "Villager Trade Rebalance" experimental toggle ( data pack).


 * Loot table
 * Added  loot function.
 * Contains 1 field:
 * : an array of sub-functions to run in sequence.
 * Can also be declared as an inline array without a type.
 * This matches the existing behavior where loot function JSON files can be declared as an array of composite functions.
 * predicates in loot tables can now be declared implicitly as an inline array without a type.
 * This similarly matches the existing behavior where loot predicate JSON files can be declared as an array of sub-predicates.


 * Options
 * Added "Narrator Hotkey" option to Accessibility settings, opened by default.
 * Pressing will not open narrator if it is turned off.


 * Social interactions
 * Player skins and names can now be reported in the social interactions screen.
 * Like chat reports, player skin and name reports are handled by human.
 * If a skin or name is reported, and found to be violating the Community Standards, following actions can be take by Minecraft moderators:
 * Ban the skin from being used by any player.
 * Ban the name from being used by any player.
 * Suspend the player from online play in the case of repeated offences.
 * When a skin is banned, players with that skin:
 * Will have their skin removed.
 * Will be notified when they launch the game.
 * Will be automatically assigned one of the default skins.
 * Can still play multiplayer and singleplayer.
 * Can select a new custom skin at any time.
 * When a player's name is banned, that player:
 * Will need to choose a new name.
 * Will be notified when they launch the game.
 * Will not be able to play online until they change their name.
 * Can still play singleplayer.
 * A skin or name that has been banned cannot be used by any player in the future.
 * Added following report category:
 * I want to report them
 * I'm annoyed with them / they have done something I do not like.


 * Tags
 * Added the following block tags:
 * : contains.
 * : contains all types of concrete powders.
 * Added the following damage type tag:
 * : contains.
 * Causes knockback to not be caused by the damage itself. Used in Vanilla for damage that is caused by events, such as explosions, which apply knockback separately.
 * Added the following entity tag:
 * : contains.
 * Represents entities that don't override their vehicles movement control.

Blocks

 * Barrier
 * No longer produces fall particles when entities fall on them.
 * No longer creates particles when a player brushes them.
 * Can now be waterlogged by players in Creative mode.
 * Water cannot be placed in them or taken out by non-direct interactions such as dispensers.


 * Chorus Flower
 * No longer provides support for hanging or standing blocks.


 * Decorated Pots
 * Now have Creative inventory tooltips.


 * Enchanting Table
 * Reverted the texture of lapis slot to the texture before 1.18-pre5, to make the consistency with smithing table.


 * Jukebox and Tripwire Hook
 * Now uses plank sounds instead of stone.


 * Lever, Redstone Comparator and Redstone Repeater
 * Now uses stone sounds instead of plank.


 * Pink Petals
 * The size of the hitbox now increases with the number of petals.


 * Sculk Sensor and Calibrated Sculk Sensor
 * Vibrations no longer risk being lost on simulation distance limit.
 * Can now detect the following events:
 * , with frequency 11:
 * Carrots being eaten by rabbits.
 * Chiseled bookshelves receiving books from hoppers.
 * Sweet berries being eaten by foxes.
 * Turtle eggs cracking.
 * , with frequency 12:
 * Fire being doused by water potion.
 * Turtle eggs hatching.
 * (new), with frequency 4:
 * Camels dashing.
 * Camels standing up.
 * Camels sitting down.
 * Turtles clearing away sand.
 * Witches drinking a potion.
 * , with frequency 7:
 * Totems of undying activating.
 * , with frequency 14:
 * Evokers evoking vexes or fangs.
 * , with frequency 3:
 * Using bone meal.
 * (new), with frequency 4:
 * Unequipping items.
 * Camels eating cactus now emits an  vibration with frequency 8, instead of   vibration with frequency 6.


 * Smithing Table
 * Now in the custom recipes, the upgrade material can be sent to the GUI instantly with the + left click shortcut.


 * Sponge and Wet Sponge
 * They now have custom sounds.

Items

 * Chorus Fruit
 * Now resets fall distance when eating it.


 * Music Discs
 * The Pigstep music disc is now the last one of the music discs in the Creative inventory.

Mobs

 * Bee
 * Can now collect pollen from Spore Blossom or Chorus Flower.


 * Camels, Frogs, Goats and Sniffers
 * Now panic when damaged while attached to leads.


 * Villagers
 * The discount for curing a villager is no longer multiplied if the villager is reinfected and cured again.
 * Now attempt to spawn an iron golem every 30 seconds instead of 35.


 * General
 * Changed mob attack reach calculation.
 * In horizontal directions, mobs' attack reach are now their bounding box extended in horizontal directions, instead of using horizontal width to determine.
 * For example, a ravager won't be able to attack through a few block thick walls.
 * In vertical directions, mobs' attack reach are now the exact vertical range of their bounding box. When there's no overlap between their bounding box and their target's bounding box in vertical direction, they can not attack, in specific:
 * Riding a medium-sized mob (e.g. horse) can get rid of attacks from small mobs (e.g. baby zombie).
 * Riding a tall mob (e.g. camel) can get rid of attacks from standard size mobs (e.g. zombie).
 * Some mob's reaching height now extended (e.g. enderman, safety height changed from 1.5 to 3).

Non-mob entities

 * Display entities
 * Display entities now start updating their client-side position and rotation on the first tick after an update.
 * In previous versions, updates were applied in the same tick, causing uneven motion.
 * New behavior is now similar to armor stands, mobs and players.
 * On the server, position and rotation are still updated immediately.
 * Duration of this interpolation is controlled by the field.
 * means that updates are applied immediately.
 * means that the display entity will move from current position to the updated one over one tick.
 * Higher values spread the movement over multiple ticks.
 * Please note that this value is clamped to avoid glitches due to periodic position updates.
 * The new value will apply only to position and rotation changes made after it changed.
 * That means any current movement will continue unchanged.
 * Note: behavior while riding remains unchanged from previous versions.

World generation

 * Ore distribution
 * Diamond ore is now generated more frequently in the deepslate layers of the Overworld.
 * Added a new ore blob placement: Uniform distributed, from height -64 to -4, with blob size 8, generation frequency 2 and a 50% chance of discarding when exposed to air.
 * Other existing diamond ore placements remain untouched.

Command format

 * Functions
 * A single backslash  as the last non-whitespace character of a line now allows a command to be continued on the next line.
 * Leading and trailing whitespace of the following line are stripped before appending.
 * Functions can now contain macro lines, making them Function Macros.
 * Any line beginning with  (as the first non-space character) marks a macro line.
 * A macro line also contains one or more substitutions in the form of.
 * Commands with variable subsitutions will be re-evaulated after substitution.
 * Running commands with this type have extra cost compared to pre-parsed functions.
 * Game will attempt to cache the result of certain parameter set being used in a call, to reduce costs when repeatedly calling.
 * When calling a function macro a compound with data for all argument variables must be provided.


 * Added  subcommand.
 * A new execute sub-command that runs a function or function tag and matches the return value(s). If a tag is given, all functions run regardless of the results of prior functions.
 * Syntax:
 * Arguments:
 * : The function or tag to run.
 * The matching of the result value of the function(s) that run:
 * At least one of the functions must succeeed for the match to succeed.
 * A successful call is defined as a function that:
 * Uses the  command to return a value.
 * The return value is not 0.
 * The return value is not 0.


 * Extended command usage, now supported parameters for function macro's variable substitution.
 * New syntax: {{cmd|link=none|function [ {{!}}with (block : A data compound, enclosed in.
 * Data source: A data source specification, like what could already be used for {{cmd|data get}}.
 * : An NBT path specification.
 * The data source and  must specify a compound data entry.
 * The compound must contain one entry for each variable used in the macro.
 * More data may be present in the compound and if so is ignored.
 * Calling a non-macro function with a data compound is silently ignored.
 * When a macro is called, the values provided are substituted in place of the variable specifications and the resulting commands are executed.
 * In order to improve performance when repeatedly calling with the same parameter, values in the provided compound which are referenced in macro as parameters will be cached.
 * Any syntax errors in the lines resulting from variable substitution result in the entire function call being skipped.
 * Any syntax errors in the lines resulting from variable substitution result in the entire function call being skipped.


 * {{cmd|item}}
 * Can now replace items in jukeboxes.
 * Can now remove items in chiseled bookshelves.


 * {{cmd|return}}
 * Added  subcommand: {{cmd|link=none|return run }}.
 * This takes the  value from running the specified   and returns that as the return value of the function. In all other aspects, it works like return with a specified   value. If the given command fails, the return value is.

Gameplay

 * Advancements
 * The "Smithing with Style" advancement now grants 150 experience upon completion.


 * Recipe books
 * Bamboo fence and bamboo fence gate are now grouped with the other ones.

General

 * Chat
 * Clients will no longer disconnect themselves when receiving an invalid chat message.
 * A placeholder message will instead be shown in chat.


 * Chunk format
 * Game no longer uses numeric values when storing mob effects to world.
 * For example,  becomes.
 * Changed following fields in mob effect instances:
 * (integer) ->  (string, resource location)
 * This field is a mob effect instance, so changes to the parent also applied here, recursively.
 * In NBT format for block entity type :
 * (integer) ->  (string, resource location)
 * (integer) ->  (string, resource location)
 * This field is a mob effect instance, so changes to the parent also applied here, recursively.
 * In NBT format for block entity type :
 * (integer) ->  (string, resource location)
 * (integer) ->  (string, resource location)
 * In NBT format for block entity type :
 * (integer) ->  (string, resource location)
 * (integer) ->  (string, resource location)


 * Chunk tick
 * game rule now affects the rate of accumulation of snow and ice the same way it affects crops and other blocks.


 * Data pack
 * The version is now.
 * Added  field to armor trim patterns (default:  ).
 * If, the pattern texture will be masked based on the underlying armor.


 * Debug screen
 * Values in the  row will now show up as question marks when playing on a server, instead of wrong values.
 * Opening it with will now show charts for ping and received network traffic.
 * The charts on the debug screen can now be toggled with the key combinations (pie chart),  (FPS and TPS), and  (bandwidth and ping) instead of,  and.
 * Renamed "Debug" row to "Debug charts", and changed its style.
 * "Pie" chart now called "Profiler" chart.


 * Entity format
 * In NBT format for entity type :
 * Removed.
 * Added, with the same format as   field in   item format.
 * In NBT format for entity type :
 * Renamed  to.
 * In NBT format for entity type :
 * Renamed  to.
 * In NBT format for living entities (players, armor stands, and all mobs):
 * Renamed  to.


 * Game Events
 * Added  game event, to replace.
 * Added  game event.


 * Multiplayer and World Selection screens
 * Renamed "Cancel" button to "Back".


 * Pack Metadata
 * New features have been added to datapacks and resource packs to allow creation of packs that are compatible with multiple versions of the game.
 * Pack metadata now includes an optional field  which describes a range for pack formats that this pack supports.
 * Examples:,  ,
 * field is still required and its format remains unchanged, to allow older game versions to read pack data.
 * If  is present, it must contain the value declared in.
 * Since this new information is ignored by older versions of the game, they will always see a "normal", single-version pack, without any extended compatibility.
 * Packs can now contain overlay directories ("overlays").
 * Overlays are sub-packs applied over the "normal" contents of a pack.
 * These directories have the same layout as the top-level pack, including the  and   directories.
 * Overlays can be applied if they support the client's pack format.
 * Overlays can add and replace files, but not remove them.
 * For example, if the overlay  is applied, the file   will replace contents of.
 * and  are ignored in overlay directories.
 * New section called  have been added to pack metadata.
 * It contains an  field, containing a list of overlays.
 * Every overlay entry has two fields:
 * - range of supported formats
 * - overlay directory (allowed characters: )
 * Order of application: overlays are stacked from the bottom to top of the list.
 * For example, if a pack has two overlays:, the game will first look in B, then A and then in the top pack directory.


 * player.dat format
 * In NBT format for item type :
 * Renamed  to.
 * In NBT format for item type :
 * Renamed  to , also changed following fields in this field:
 * (integer) ->  (string, resource location)


 * Protocol
 * Optimized the way chunks are sent to clients to allow players with low-bandwidth internet connections to play on multiplayer servers.
 * Chunks are no longer sent over the network to the client in one big continuous batch.
 * They are instead sent in smaller batches depending on the available bandwidth. This means that:
 * Clients with extremely low-bandwidth connections will not time out while loading the world.
 * Clients with low-bandwidth connections can interact with the world while some chunks are still loading.
 * Only chunks within the client's render distance are now sent.
 * Gameplay packets are now packed into bigger TCP-packets to reduce overhead from TCP-headers, significantly reducing network usage.
 * Changed network protocol to allow for more data-driven content in the future.
 * Configuration phase automatically starts after login phase (i.e. after client account has been verified) and lasts until the player joins the world (play phase).
 * Clients can stay in configuration phase indefinitely - it's up to server to release it to the world.
 * Servers can also request clients to re-enter the configuration phase after it has entered the play phase.
 * Other players will see such clients as disconnected.
 * Users in configuration phase will not be visible on the player list.
 * Actions allowed in configuration phase (moved from play phase).
 * Configuration of data-driven registries.
 * Configuration of enabled features.
 * Actions shared between configuration and play phases:
 * Application of server resource packs.
 * Update of tags.
 * Exchange of custom packets.
 * Ping and keep-alive packets.
 * The server will now negotiate resource pack in the configuration phase.
 * This means that the player will no longer be in world when answering prompts and reloading resources.


 * Resource pack
 * The version is now.
 * The process of upgrading a pack can be assisted by using an automated Slicer tool.
 * All textures containing multiple sprites in a sheet for GUI have been split into individual sprites under  (automated by Slicer tool).
 * All textures in the  namespace have been moved into the   namespace (automated by Slicer tool).
 * has been renamed to  (automated by Slicer tool).
 * and  GUI sprites are animated with   declarations instead of individual sprites (automated by Slicer tool).
 * The bundle tooltip background is now drawn as a nine-sliced sprite.
 * The icons for the Accessibility, Language, Realms News buttons have been split from their underlying button texture.
 * The Realms Invite button is now drawn as an overlay on the normal button texture.
 * The highlighted texture state for this button has been removed.
 * The highlighted states for Realms invitation number icons have been removed.
 * The exclamation marks on the  have been removed.
 * The text field background is now a nine-sliced sprite at.
 * The scroll bar in lists and text fields is now a nine-sliced sprite at.


 * Scoreboard
 * The  display slot selector is now.


 * server.properties
 * Added new  option (defaults to  ).
 * When set to, will prevent player IPs from being included in the log when players join the game.


 * Tags
 * Added to  block and item tags.
 * Moved all types of concrete powders to newly added block tag from  block tag, then added  to.
 * Removed from  game event tags, then added  to them.


 * Telemetry
 * Added a button to the Telemetry Data Collection Screen that links to the Microsoft Privacy Statement.


 * General
 * History of used commands is now saved and accessible across worlds.
 * The last 50 commands that are sent in chat will be remembered across game sessions.
 * The command and chat history can be accessed by pressing or  in the chat.
 * Regular chat is only persisted within the same game session (leaving a server or world clears them).
 * Recent commands are stored in  in the game folder.
 * Added validation for symbolic links in datapacks and resource packs, to improve safety.
 * This feature expands on symbolic link validation in worlds added in the previous release.
 * The game will now warn users if a pack added via drag and drop contains disallowed symbolic links.
 * Packs containing disallowed symbolic links will not be visible in UI and commands.
 * Additionally, directories and files that are not recognized as packs will no longer be copied via drag and drop.
 * When hitboxes are displayed through, entities that have a passenger will display the passenger's attachment point.

Experimental changes
These changes are accessible by enabling the "Villager Trade Rebalance" experimental toggle.

Gameplay

 * Trading
 * Changed the trading mechanism of librarians selling enchanted books.
 * Instead of offering every possible enchanted book, librarians will now be offering specific enchanted books depending on which biome they come from.
 * Jungle and swamp villages do not generate naturally. Thus, players must breed villagers or cure zombie villagers in these biomes to access their trades.
 * All tradable enchanted books now split to special books and normal books.
 * Special books have a specific enchantment with a fixed level, and are only available from master librarians with full XP.
 * Normal books have a specific enchantment without a fixed level, just like before.
 * All enchantments used for crossbow, fishing rod, and trident are removed from trading.
 * {| class="wikitable" style="text-align:center"

! Category ! Desert ! Plains ! Savanna ! Snow ! Taiga ! Jungle ! Swamp
 * + Available tradable enchantments
 * Special
 * Efficiency III
 * Protection III
 * Sharpness III
 * Silk Touch
 * Fortune II
 * Unbreaking II
 * Mending
 * Normal
 * Fire Protection Thorns Infinity
 * Punch Smite Bane of Arthropods
 * Knockback Curse of Binding Sweeping Edge
 * Aqua Affinity Looting Frost Walker
 * Blast Protection Fire Aspect Flame
 * Feather Falling Projectile Protection Power
 * Depth Strider Respiration Curse of Vanishing
 * }
 * Depth Strider Respiration Curse of Vanishing
 * }


 * Changed the wandering trader trades.
 * Trade list now made up by following trades, in order:
 * Buying Trade (new) × 2
 * Special Selling Trade × 2
 * Ordinary Selling Trade × 5
 * Added new buying trades, some selling trades, and changed some existing selling trades:
 * {| class="wikitable"

! Category ! Item wanted ! Quantity ! Item given ! Quantity ! Trades until disabled
 * + New trades of wandering traders
 * Buying
 * 4
 * 1
 * 1
 * Buying
 * 1
 * 3
 * 1
 * Buying
 * 1
 * 1
 * 1
 * Buying
 * 1
 * 2
 * 1
 * Buying
 * 1
 * 1
 * 1
 * Buying
 * 1
 * 2
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 6-20
 * (Enchanted)
 * 1
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 5
 * (Long)
 * 1
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * }
 * {| class="wikitable"
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 6-20
 * (Enchanted)
 * 1
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 1
 * 8
 * 4
 * Special Selling
 * 5
 * (Long)
 * 1
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * }
 * {| class="wikitable"
 * Special Selling
 * 5
 * (Long)
 * 1
 * 1
 * Special Selling
 * 1
 * 8
 * 4
 * }
 * {| class="wikitable"
 * 8
 * 4
 * }
 * {| class="wikitable"

! Category ! Item wanted ! Quantity ! Item given ! Quantity ! Trades until disabled
 * + Changed trades of wandering traders
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * Special Selling -> Ordinary Selling
 * 5 -> 3
 * 1
 * 4
 * Special Selling -> Ordinary Selling
 * 5 -> 3
 * 1
 * 4
 * Ordinary Selling
 * 1
 * 1 -> 4
 * 8 -> 2
 * Ordinary Selling
 * 1
 * 2 -> 5
 * 5 -> 2
 * Ordinary Selling
 * 3 -> 1
 * 1
 * 6
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * }
 * 2 -> 5
 * 5 -> 2
 * Ordinary Selling
 * 3 -> 1
 * 1
 * 6
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * }
 * 12 -> 4
 * Ordinary Selling
 * 1
 * 1 -> 3
 * 12 -> 4
 * }
 * 1 -> 3
 * 12 -> 4
 * }