Java Edition 23w31a

23w31a is the first snapshot for Java Edition 1.20.2, released on August 2, 2023, which adds the Villager Trade Rebalance experimental toggle and fixes bugs.

Command format

 * A new command for randomizing values and controlling random sequences. The  and   forms can be used to draw a random value. In the case of , the resulting value is also shown in chat for all players.
 * Syntax:  or
 * Parameters:
 * : A range of values to randomize between, inclusively.
 * For instance, 1..6 is a regular D6 roll.
 * : The name of a random sequence to sample or reset.
 * : A seed to use for the random sequence after reset.
 * : A boolean [default: ] specifying whether to include the world seed when seeding the sequence.
 * means the sequence will evaluate to the same regardless of which world the command is run in.
 * : A boolean [default: ] specifying whether to include the sequence ID when seeding the sequence.
 * means all sequences will evaluate to the same regardless of which name they have.
 * 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.
 * Note that  used without a sequence id is available to non-operator players.
 * Note that  used without a sequence id is available to non-operator players.

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 "Villager Trade Rebalance" experimental toggle.


 * Tags
 * Added the  block tag.
 * Contains  and.
 * Added the  block tag.
 * Contains every concrete powder.
 * Added the  damage type tag.
 * Causes knockback to not be caused by the damage itself.
 * Used for damage that is caused by events, such as explosions, which apply knockback separately.
 * Added the  entity type tag.
 * Contains entities that don't override their vehicle's 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.


 * Fences and Fence Gates
 * Bamboo fence and bamboo fence gate are now grouped with the other ones in the Recipe book menu.


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


 * Sculk Sensor and Calibrated Sculk Sensor
 * Can now detect following events:
 * Totems of Undying activating.
 * Witches drinking a potion.
 * Turtles clearing away sand.
 * Camels standing up, sitting down, or dashing.


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

Items

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

Mobs

 * 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.

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

 * 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:
 * Parameters:
 * : 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


 * New arguments:
 * : A data compound, enclosed in
 * : A data source specification, like what could already be used for
 * path: An NBT path specification
 * The data source and path 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.
 * 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.


 * Can now replace items in jukeboxes.
 * Can now remove items in chiseled bookshelves.
 * Can now remove items in chiseled bookshelves.


 * Added  subcommand.
 * 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.
 * Syntax:
 * Syntax:


 * 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.
 * When calling a function macro a compound with data for all argument variables must be provided.

Gameplay

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


 * Game rules
 * now affects the rate of accumulation of snow and ice the same way it affects crops and other blocks affected by random ticking.

General

 * Data pack
 * The version is now.


 * Debug screen
 * Values in the row will now show up as question marks when playing on a server, instead of wrong values.


 * Game Events
 * Added game event, to replace.


 * 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 assets/minecraft/textures/bar.png
 * 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: a-z, 0-9, _ and -)
 * 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.


 * 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.


 * 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.


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


 * Other
 * 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.
 * 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.
 * 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.
 * 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
 * }

Video
Videos made by slicedlime: