
MINCRAFT JAVA EDITION 1.21.5 RELEASED
Minecraft Java 1.21.5 Released
It's time to experience new wonders of the Overworld as we release the Spring to Life drop, the first Minecraft game drop of 2025.
The Spring to Life drop brings more reasons to explore both near and far! Warm winds have swept across biomes, bringing new mob variants, ambient sounds, and lush plants for you to discover. Befriend fluffy pigs, marvel at glittering firefly bushes, listen out for whispers of sand, and delight in a blooming Overworld humming with new beginnings.
New Features
Added cold and warm variants for the Pig, Cow and Chicken
Sheep now spawn with wool color dependent on the biome in which they spawn
Added new sound variants for Wolves
Overhauled the visuals of each Spawn Egg to improve readability and accessibility
Added fallen tree generation
Added Firefly Bush block
Added Leaf Litter block
Added Wildflowers block
Added Bush block
Added Short Dry Grass and Tall Dry Grass blocks
Added Cactus Flower block which can grow on Cactus blocks
Added new falling leaf particles to all Leaves blocks that did not already have them
Added new ambient block sounds in the Desert and Badlands biomes
Added language support for Kyrgyz
FARM ANIMAL VARIANTS

The cow, the chicken, and the pig are joined by their new variations high up on a mountain. Click here for a link to the full-size image.
Warm and cold variants have been added for the following animals:
Pig
Cow
Chicken

Warm pigs are amongst cactus flowers in a desert
The variant is determined by the biome they spawn in

A cold chicken can be seen in the forefront, with a creeper peaking out from behind a tree.
Warm variant - A variant that will be selected if spawned (naturally or by player) in these biomes:

A warm chicken in a desert village. A cat can be seen sitting on top of a villager's house.
When bred by a player, a baby variant will not be chosen by the current biome, but instead randomly selected from one of the parents' variants
Wolf Sounds Variants

A wolf walking on top of a fallen oak tree.
Added 6 new Wolf sound variants with unique ambient, hurt, death, growl, whine, and pant sounds
Spawn Egg Visuals Overhaul

Sunny and Noor are inspecting a collection of spawn eggs. A cartographer villager can also been seen peaking in through the window
Each Spawn Egg now has their own unique visual which captures the personality and character of the mob it spawns
Each egg visual varies in shape to reflect the in-world size of the mob it spawns
For example, smaller mobs tend to have a smaller Spawn Egg
Fallen Trees

A fallen birch tree with a brown mushroom growing on top of it.
Fallen trees are a new decorative variant of trees
Firefly Bush

In the moonlit swamp, firefly bushes can be seen emitting particles. Meanwhile, a frog seems to be leaping towards the moon
The Firefly Bush is found adjacent to water in Swamps, Mangrove Swamps, Badlands, and near Rivers
When it is dark, glowing firefly particles appear around the Firefly Bush
Using Bone Meal on a Firefly Bush grows a Firefly Bush in a random adjacent space if possible
The Firefly Bush emits a light level of 2
The Firefly Bush has a chance of playing ambient sounds when these conditions are met:
it is night
it is not blocked from above by any collidable block except leaves
Leaf Litter
Leaf Litter is a new type of decorative block which can be found in the Forests, Dark Forests and Wooded Badlands
Note: Leaf Litter is only spawned as part of world generation, and does not regenerate during gameplay
Leaf Litter can have different amounts of leaves in one block space
Up to four Leaf Litter pieces can be placed in the same block space
Placing a Leaf Litter into an existing Leaf Litter block increases the amount of leaves
Leaf Litter can be placed in four orientations
Leaf Litter can be placed on any block with a full top face
Leaf Litter can be created by smelting any type of Leaves block
Leaf Litter can be used as fuel for smelting
Leaf Litter can be used in the Composter
Leaf Litter has unique block sounds
Leaf Litter is tinted based on which biome it is in
Leaf Litter is replaceable when building
Wildflowers
Wildflowers are a new type of flower which grow in Birch Forests, Old Growth Birch Forests and Meadows
Wildflowers can have different amounts of flowers in one block space
Up to four Wildflowers can be placed in the same block space
Placing a Wildflower into an existing Wildflowers block increases the amount of flowers
Using Bone Meal on Wildflowers will produce more Wildflowers
Wildflowers can be placed in four orientations
Wildflowers can be crafted into Yellow Dye
Bush
The Bush is a new type of decorative block that can be found in small patches in the following biomes:
Birch Forest
Forest
Frozen River
Old Growth Birch Forest
Plains
River
Windswept Forest
Windswept Gravelly Hills
Windswept Hills
The Bush can be used in the Composter
Using Bone Meal on a Bush grows a Bush in a random adjacent space if possible
A Bush only drops when broken with Shears or a Silk Touch tool
The Bush is replaceable when building
Short and Tall Dry Grass
Added two new types of grass: Short Dry Grass and Tall Dry Grass
Both are 1 block high, which means Tall Dry Grass differs from regular Tall Grass which is 2 blocks high
Both generate in the Desert and Badlands biomes
Both can be placed on types of Sand, Terracotta, Dirt blocks, and Farmland like the Dead Bush
Both can be bonemealed
Using Bone Meal on Short Dry Grass grows it into a Tall Dry Grass
Using Bone Meal on Tall Dry Grass grows a Short Dry Grass in a random adjacent space if possible
Both can be used in the Composter
Sheep can eat both to regrow their wool
Both can be used as fuel for smelting
Both are replaceable when building
Cactus Flower
Cactus Flower is a new type of flower that has a chance of generating on Cactuses in Deserts and Badlands
Cactus Flower can be placed on Cactus blocks, Farmland, or any block which has center support at the top of the block
Cactus Flowers have a chance of growing on Cactus blocks instead of the Cactus growing taller
If a Cactus is 1-2 blocks tall, the Cactus Flower has a 10% chance to grow
If a Cactus is 3 blocks or taller the Cactus Flower has a 25% chance to grow
Cactus Flowers will only grow if they have space on all four sides
Cactus Flowers can be used in the Composter
A Cactus Flower can be used to craft 1 Pink Dye
Falling Leaf Particles
All Leaves blocks now have chance of spawning falling leaf particles
The following blocks are affected by this change:
Acacia Leaves
Azalea Leaves
Birch Leaves
Dark Oak Leaves
Flowering Azalea Leaves
Jungle Leaves
Mangrove Leaves
Oak Leaves
Spruce Leaves
New Ambient Sounds for Desert and Badlands
Sand, Red Sand and Terracotta of any color have a chance of playing ambient sounds when surrounded by another block in the same group on at least 3 sides, at a distance of 8 blocks
block.sand.idle can be played in any biome
block.sand.wind only plays when in Desert or Badlands biomes
Dead Bush blocks have a chance of playing ambient sounds when placed on top of two blocks that are any color of Terracotta, Sand or Red Sand blocks in any biome
Changes
The main menu panorama has been updated for the "Spring to Life" drop
Beacons and their beams now render beyond 16 chunks, up to the client render distance
To keep it easily visible at large distances, the beam is rendered thicker the further away you are
The beam now renders up to 2048 blocks high, up from 1024
Three differently colored beacon beams are seen in the sky of a sunset scenery

Three differently colored beacon beams are seen in the sky of a sunset scenery
Lodestones have a new crafting recipe and can now be found in Ruined Portals

Kai is seen testing curious behaviors with the new test blocks
The Game Tests system is a new integrated system for testing aspects of the game. Each test is an asset defining some parameters for how the test gets executed, combined with a saved structure file containing a base setup.
Test Instances

A game test is running, where a villagers is seen running through a maze to get to their bed
Test instances are defined in the registry test_instance. They're small assets defining a test to run.
Fields:
environment: Namespaced ID of the test environment to run this test as part of
structure: The namespaced ID of the structure to use for the test
max_ticks: A positive integer representing the maximum number of ticks allowed to pass before the test is considered timed out
setup_ticks: Optional non-negative integer (default: 0) representing a number of ticks to wait after placing the structure before starting the test
required: Optional boolean (default true) - whether the test is considered required to pass for the full test suite to pass
rotation: Optional rotation to apply to the test structure
One of none (default), clockwise_90, 180 and counterclockwise_90
manual_only: Optional boolean (default false), set to true for tests that are not included as part of automated test runs
sky_access: Whether the test needs clear access to the sky
By default (false), tests are enclosed in barrier blocks - if set to true, the top is left open
max_attempts: Number of attempts to run the test (default 1)
required_successes: Number of attempts that must succeed for the test to be considered successful (default 1)
type: The type of test - one of block_based and function
Function Tests
Function tests rely on built-in functions to run a test and indicate success or failure. They have one additional field:
function: The namespaced ID of the Test Function to run
See the "Using the Game Test Framework from Code" changelog section for more information.
Block Based Tests
Block based tests use Test Blocks in the test structure to run the test and indicate success or failure.
Test Environments
Test Environments are a way to group up tests and give them the right preconditions to run. A Test Environment is an asset in the test_environment registry. Each Test Environment definition has a type field that determines its setup:
all_of definitions apply the setup from several sub-definitions in the definitions field
function definitions use mcfunction files as setup and teardown
setup: Optional namespaced ID of the mcfunction to use for setup, if any
teardown: Optional namespaced ID of the mcfunction to use for teardown, if any
game_rules: definitions set any number of game rules
bool_rules: A list of boolean game rules to set and the value to set
int_rules: A list of integer game rules to set and the value to set
Each rule is an object with two fields:
rule: The exact name of the rule to set
value: The value to set
Game rules are reset to their default values after the test environment has completed
weather definitions sets the weather state
weather: The weather to set - one of clear, rain and thunder
time_of_day definitions set a given time of day
time: The time of day to set in number of ticks, as a non-negative integer
The game provides a single, empty Test Environment by default: minecraft:default.
Test Blocks
The Test Block is a block used for implementing a block-based tests. It has four modes:
start: Triggers a redstone pulse when the test starts
log: Logs a message to the log file when powered by redstone
fail: Fails the test when powered by redstone
accept: Completes the test when powered by redstone
Block-based tests are required to have at least one start block and one accept block in the structure.
The test Command
The test command is a new command used to create and run tests.
Syntax:
test clearall [<radius>]
test clearthat
test clearthese
test create <test> [<width>] [<height> <depth>]
test locate <selector>
test resetclosest
test reseetthese
test resetthat
test pos [<variable>]
test run <selector> [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]
test runclosest [<numberOfTimes>] [<untilFailed>]
test runfailed [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]
test runmultiple <selector> [<amount>]
test runthat [<numberOfTimes>] [<untilFailed>]
test runthese [<numberOfTimes>] [<untilFailed>]
test stop
test verify <tests>
Parameters:
radius: The radius to clear tests within
test: The namespaced ID of a test
selector: A wildcard-enabled selector for test IDs
Supports * and ? for matching namespaced IDs
If namespace is not supplied, defaults to minecraft
Examples:
*:* - matches all IDs
* - matches everything in the minecraft namespace
custom:folder/*_test_? - matches IDs in the folder folder of the custom namespace, with a prefix followed by _test_ followed by a single valid character
width: The width of the test structure - if omitted, 5 is used
height: The height of the test structure - if omitted, the width is used
depth: The depth of the test structure - if omitted, the width is used
variable: The variable name to include in the copied code snippet
numberOfTimes: The number of times to repeat each test - if omitted, 1 is ued
untilFailed: Boolean (default false) noting that the test should be stopped as soon as one iteration fails
rotationSteps: Number of extra 90 degree steps to apply to the test - if omitted, 0 is used
testsPerRow: Number of tests to place per row in a grid layout - if omitted, 8 is used
test clear*
These subcommands clear the structures and blocks associated with the selected tests.
test create
This subcommand creates a test setup in the current location for the given test, preparing for a structure of the given size. This gives a starting point for creating the structure for the test.
test locate
Attempts to locate the given test. Note that only loaded chunks are searched.
test reset*
These subcommands reset the structures for the selected tests, removing any surrounding barriers and placing the structure in from scratch.
test pos
Shows the local coordinates to the block pointed at in the test. If the optional variable name is specified, this variable name is used in a code fragment obtained by clicking on the coordinates in the output message.
test run*
Runs one or more tests. If multiple tests are run at once, they are placed in a grid and run in parallel, although only up to a certain limit. Beyond that limit, tests are run in rounds where each round completes before any tests from the next round are started.
For each test, loads the given structure and runs the associated test. Each test location will have a beacon beam showcasing the test status.
Gray beacon = in progress
Red = fail (required test)
Orange = fail (optional test)
Green = success
If a test fails, the error is shown on a lectern book and an overlay.
Note that Game Tests are designed to run on standard superflat worlds. The area around each test is replaced with stone when it runs, and the running test is encased in barrier blocks.
test stop
This stops all running tests. Note that gameplay events triggered by tests may still remain.
test verify*
Verifies one or more tests by running multiple instances of the same test.
Test Instance Blocks
To run a test in a world, a Test Instance Block is used. This type of block represents the test as placed in the world and is used to interact with that test, to save the structure, reset or run the test.
Using the test command to run or create a test will also place a Test Instance Block to control that test.
Using the Game Test Framework from Code
The Game Test Framework can also be used from code in a more versatile manner than block-based tests. For this to work, you need to mod the game to add your test functions to the test_function registry (Registries.TEST_FUNCTION).
Hook into some startup method (pre-registry bootstrap) to add your loader - call TestFunctionLoader.registerLoader() with an implementation of TestFunctionLoader. Your implementation can then use the provided register consumer to register test functions with their namespaced IDs. This namespaced ID can then be referenced in a function type Test Instance.
A test function is a Consumer<GameTestHelper>, using that GameTestHelper instance to manipulate the world and make assertions about the state of the resulting world.
The helper can be used to summon mobs, set blocks, query for blocks and entities and assert the state of the test. Most GameTestHelper methods take test-local coordinates, which you can also find using /test pos.
Example code that might go along with a test structure with a locked hopper containing a Cod, pointed into a Furnace:
public void furnaceSmeltsItem(final GameTestHelper helper) {
helper.setBlock(0, 4, 0, Blocks.AIR);
helper.succeedWhen(() -> helper.assertContainerContainsSingle(new BlockPos(0, 0, 0), Items.COOKED_COD));
}
More complicated setups will often use helper.startSequence() to model sequences of events that must happen.
As opposed to block-based tests, function tests failing will often produce more helpful error messages including the location of whatever failed and what was expected at that location.
Game Rules
allowFireTicksAwayFromPlayer
When true, fire and lava can spread fire outside the 8 chunk range of a player
Note: the fire and lava blocks must still be in simulation distance to spread
Default value: false
tntExplodes
When false, TNT will not explode and cannot be ignited
Default value: true
Uniform Variant Selection
Variants that have spawn rules now use a uniform approach for selection
Selection process:
Every variant has a field spawn_conditions that contains a list of entries
Every entry has a condition and an integer priority
Conditions for all variants for given entity type are evaluated for the position that entity is being spawned
Entries with a priority lower than the maximum priority of remaining entries are removed
The game randomly picks one entry out of the remaining ones
If no conditions are remaining, the variant remains unchanged from default for that entity
Entry format:
priority - integer
condition - optional structure
Fields:
type - see below for values
Additional fields are dependent on type
If this field is not present, the condition is always true
Spawn Conditions
minecraft:biome
Checks if entity is spawning in specific biomes
Fields:
biomes - single entry, list or a tag describing biomes
minecraft:moon_brightness
Checks if the current moon brightness is within a certain range
Fields:
range - floating point range (a single number or an object like {"min": 1, "max": 2})
minecraft:structures
Checks if the entity is spawning in specific structures
Fields:
structures - single entry, list or a tag describing structures
Data-driven Mob Variants
Wolf Variants
The fields angry_texture, tame_texture and wild_texture have been grouped in an assets field, and renamed to angry, tame, and wild
Added field spawn_conditions described in uniform variant selection above
Pig Variants
Pig variants can be data-driven by adding entries to data/<namespace>/pig_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Cat Variants
Cat variants can be data-driven by adding entries to data/<namespace>/cat_variant/<id>.json
This feature is experimental
Fields in file:
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Frog Variants
Frog variants can be data-driven by adding entries to data/<namespace>/frog_variant/<id>.json
This feature is experimental
Fields in file:
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Cow Variants
Cow variants can be data-driven by adding entries to data/<namespace>/cow_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold, warm
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Chicken Variants
Chicken variants can be data-driven by adding entries to data/<namespace>/chicken_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Wolf Sound Variants
Wolf sound variants can be data-driven by adding entries to data/<namespace>/wolf_sound_variant/<id>.json
The file contains the following fields which correspond to sound events to use for the specific behaviour:
ambient_sound
death_sound
growl_sound
hurt_sound
pant_sound
whine_sound
Commands
SNBT literals now accept heterogeneous lists
/data can now create and modify heterogeneous lists transparently
The /setblock, /fill, /clone, and /place commands now support a "strict" placement mode
/setblock and /fill have updated handling of block entities
The horse.saddle item slot has been renamed to saddle, and now supports any entity that can equip a Saddle
Text Components in commands such as /tellraw or /title are now specified with SNBT instead of JSON
Text Style in the /scoreboard command when specifying the styled number format is also now specified with SNBT instead of JSON
Text Component arguments in /bossbar, /scoreboard and /team commands are now resolved before use (in the context of entity the held in @s)
Changes to /setblock, /fill, /clone, and /place
The behavior of setblock and fill commands have changed in how they handle block entity data:
If the block entity data is not specified, and the existing block has data, the block entity data will be preserved
If the block entity data is specified, the block entity data will be set to that specified value
To clear block entity data explicitly, you must now specify the block entity data as {}
The operation is now successful if either the block state changed or the block entity data changed
fill, clone, setblock and place template accept a new option: strict
If specified, the command will place blocks as-is without triggering block updates or shape updates
The replace option in the fill command is no longer terminal, and can be followed with additional options
New syntax for commands to use the new strict option, and more flexible use of replace:
fill <from> <to> <block> keep
fill <from> <to> <block> [replace <filter>]? [strict|destroy|hollow|outline]?
clone [from <sourceDimension>]? <begin> <end> [to <targetDimension>]? <destination> [strict]? [[replace|masked|filtered <filter>] [force|move|normal]?]?
setblock <pos> <block> [destroy|keep|replace|strict]?
place template <template> [<pos> [<rotation> [<mirror> [<integrity> [<seed> [strict]?]?]?]?]?]?
NBT Changes
Any interface with NBT data within the game (SNBT representation, /data) now supports heterogeneous lists, i.e. ones where elements are not of the same type
Inserting or replacing into a list of a different type with /data will no longer give an error
Inserting into an array type (e.g. [I;1,2,3]) is still type-restricted
This means that the "wrapper" objects previously used to represent heterogeneous lists will no longer be observable by in-game means
/data can no longer traverse paths with an empty key (e.g. /data get ... foo.''.bar)
The NBT file format is unchanged:
Heterogeneous lists are transformed before storage to bypass NBT constraints
Example transform: ['a', {'b':3}] is stored as [{'':'a'},{'b':3}]
Existing external tools will still be able to read NBT files as before, but heterogeneous lists will be displayed in the transformed form
No data produced by the game has changed: objects such as Text Components were already producing heterogeneous lists in this form
Note: these wrapper objects may never be observed in-game, they are only relevant to developers working with the NBT file or network format directly
SNBT Changes
The text format for describing object-like data in commands (like NBT, text components, predicates, etc.) has been extended
To simplify input of data and macro use, SNBT now also supports following operations:
bool(arg) - converts argument to boolean
if argument is a boolean value, returns value directly
if argument is a number value, returns true if it is non-zero
uuid(str) - converts string representation of UUID to integer array
Number Format
Either whole or fraction parts of a float number can be omitted
Examples: .1 and 1. are valid now
Float numbers now use E notation
Example: both 1.2e3 and 1.2E3, 1.2E+3, 12000e-1 are now a valid way to represent 1200.0
Integer numbers can now be prefixed with 0x to represent hexadecimal numbers and 0b to represent binary numbers
Example: 0xbad (equal to 2989), 0xCAFE (equal to 51966), 0b101 (equal to 5)
Non-zero integer numbers now can't start with 0
Normally it would mean number is in base-8, but we are restricting it to avoid accidental use
Numbers can now contain _ character between sequences of digits (but not at the start or the end of sequence)
Example: 0b10_01, 0xAB_CD, 1_2.3_4__5f, 1_2e3_4
NaN, Inf or hexadecimal float representation are NOT supported
Implicit infinite float values (like 1e1000) are rejected
Type suffixes have been extended:
Integer type suffixes (b or B - byte, s or S - short, i or I - integer, l or L - long) can now be prefixed with s (signed) or u unsigned
New suffixes only affect the valid range when parsing - values are still stored as signed
Example: 240ub is equal to -16sb, while 240sb does not parse
When a suffix is used without u or s, it defaults to signed for decimal numbers and unsigned for binary and hexadecimal numbers
Note: since b is also a valid hexadecimal digit, byte sized hexadecimal values can only be written with a signed suffix, like 0x11ub or 0x11sb
Strings
Quoted strings can now use escape sequences beyond ', " and \:
Unicode escapes:
\x - two digit escape, like \x42
\u - four digit escape, like \u2603
\U - eight digit escape, like \U00002603
\N{<name>} - named Unicode character, like \N{Snowman}
Built-in escape sequences:
\b - backspace, Unicode \x08
\s - space, Unicode \x20
\t - horizontal tab, Unicode \x09
\n - linefeed, Unicode \u0a
\f - form feed, Unicode \u0c
\r - carriage return, Unicode \u0d
Unquoted strings now can't start with 0-9, ., +, - to avoid accidental collision with numbers
Number Arrays
Values in arrays ([B;], [I;], [L;]) without a suffix are now assumed to have suffix matching the type of the array
Example: [B;1,2] is equivalent to [B; 1b, 2b]
Arrays can now also accept types smaller than the array type
Example: [I;1b,2s,3] is valid and equivalent to [I;1i,2i,3i]
Lists
Lists now accept trailing commas
Example: [1,2,] is valid and equivalent to [1,2]
Only one trailing comma is allowed, and it must come after a valid element - both [,] and [1,,] are invalid
Compounds
Compounds (maps) now accept trailing commas
Example: {a:b,}
Only one trailing comma is allowed, and it must come after a valid key-value pair - both {,} and {a:b,,} are invalid
Text Component Data Format
Text Components are no longer stored as JSON wrapped by a string
The format itself is the same as before, but inlined directly into the outer structure
For example, the item component minecraft:custom_name="{"text":"Renamed item"}" will become minecraft:custom_name={text:'Renamed item'}
This includes Text Components passed as arguments to commands such as /tellraw or /title
For example, /tellraw @s {"text":"Hello world"} may become /tellraw @s {text:'Hello world'}
Note: in the case where Text Components are embedded in NBT, no distinction exists between boolean and integer types
To pass boolean arguments to translations, you must use the string form
For Text Components with the nbt type and interpret set to true, Text Components will be parsed from the given NBT directly rather than converting to a string and parsing as JSON
The format of hover and click events has been updated
Hover Events
The hoverEvent field has been renamed to hover_event
The legacy value field (which was parsed from a rendered text component) is no longer supported
For the show_text action:
The contents field has been renamed to value
e.g. {action:'show_text',contents:'Hello world'} becomes {action:'show_text',value:'Hello world'}
For the show_item action:
The contents field has been inlined
e.g. {action:'show_item',contents:{id:'minecraft:stick',count:2}} becomes {action:'show_item',id:'minecraft:stick',count:2}
If contents was specified only as an item id, it is replaced with the full format and inlined
e.g. {action:'show_item',contents:'minecraft:stick'} becomes {action:'show_item',id:'minecraft:stick'}
For the show_entity action:
The contents field has been inlined
The id field has been renamed to uuid
The type field has been renamed to id
e.g. {action:'show_entity',contents:{id:[I;0,0,0,0],type:'minecraft:pig'}} becomes {action:'show_entity',uuid:[I;0,0,0,0],id:'minecraft:pig'}
Click Events
The clickEvent field has been renamed to click_event
For the open_url action:
The value field has been renamed to url
The click event will no longer parse if not a valid URI with either https:// or http:// schemes, instead of simply not working
e.g. {action:'open_url',value:'https://minecraft.net'} becomes {action:'open_url',url:'https://minecraft.net'}
For the run_command action:
The value field has been renamed to command
The click event will no longer parse if the command contains disallowed characters, instead of simply not working
It is no longer required that the specified command field has a / prefix
e.g. {action:'run_command',value:'/tp @e @s'} becomes {action:'run_command',command:'/tp @e @s'}
For the suggest_command action:
The value field has been renamed to command
The click event will no longer parse if the command contains disallowed characters, instead of simply not working
e.g. {action:'suggest_command',value:'/help'} becomes {action:'suggest_command',command:'/help'}
For the change_page action:
The value field has been renamed to page
The page value now requires a positive integer instead of a string
e.g. {action:'change_page',value:'1'} becomes {action:'change_page',page:1}
The copy_to_clipboard format is unchanged
Entity Data
Custom data (previously present only on Marker) is now available on all entities
It's exposed as a minecraft:custom_data component, so it can be set by spawning items and matched by predicates
The component is currently stored in a field called data, which will be changed in the future when more proper storage for entity components is introduced
It's stored only if it's non-empty
Updated and unified formats for storing equipment-related data on entities
The Owner field of tamed animals is no longer restricted to referencing Players
The Health and Air fields now default to their respective maximum value if not specified
The Tags and FallFlying fields will no longer be preserved if removed
The FallDistance field has been changed from float to double and is now called fall_distance
The SleepingX, SleepingY, and SleepingZ fields have been collected into a single sleeping_pos field
Pos, Motion, and Rotation values without the correct number of components (3, 3, and 2 respectively) will now be fully discarded, instead of only selecting the specified components
e.g. sleeping_pos: [I;1,2,3]
Block States in the entity data of Arrows, Minecarts, Block Displays, Endermen, Falling Blocks, Primed TNT, or Piston Moving Blocks are no longer allowed to be specified as an empty object
Many tweaks to entity data formats of specific entities
Equipment Data
The ArmorItems, HandItems, and body_armor_item fields have been merged into an equipment field
Format: map between equipment slot type and item stack
Valid equipment slots: head, chest, legs, feet, mainhand, offhand, body, saddle
If not specified or removed, the entity will have no equipment
e.g. equipment:{chest:{id:'minecraft:diamond_chestplate'}}
This affects all mobs and Armor Stands
The armor and off-hand equipment of Players is now also stored in the equipment field (although items written into the Inventory using armor and off-hand slot numbers still work)
The data format of saddles has been unified between mobs such as Horses and Pigs, becoming a new kind of equipment slot (and stored in the equipment.saddle field)
This is a pure rename from the previous SaddleItem in Horse-like mobs
This also replaces the boolean Saddle flag from Pigs and Striders
The Saddle dropping on death is now affected by the drop_chances field, as with other equipment slots
The ArmorDropChances, HandDropChances, and body_armor_drop_chance fields have been merged into a drop_chances field
Format: map between equipment slot type and chance value
If not specified or removed, chances will be assumed as default (0.085f)
e.g. drop_chances:{chest:0.1,feet:1.0}
Drop chances with a default value will no longer be stored, and the drop_chances field is removed entirely if all defaults
allay
Removed redundant CanDuplicate field (controlled by DuplicationCooldown)
area_effect_cloud
Area Effect Clouds have a new field: potion_duration_scale (float)
If not specified, defaults to 1.0
The duration of the potion effect applied is scaled by this factor
Area Effect Clouds created by Lingering Potions will have a scale of 0.25
The Duration field now defaults to -1 if not specified
If the Duration field is -1, the Area Effect Cloud will never run out
This means that an Area Effect Cloud summoned with no duration specified will no longer immediately disappear
cat
The CollarColor field now defaults to 14 (red) if not specified
creeper
The Fuse field now defaults to 30 if not specified
The ExplosionRadius field now defaults to 3 if not specified
dolphin
Removed TreasurePosX, TreasurePosY, TreasurePosZ fields
The Moistness field now defaults to 2400 if not specified
ender_dragon
The DragonDeathTime field now defaults to 0 if not specified
falling_block
The BlockState field can now be air (will despawn immediately) - if otherwise not specified or invalid, defaults to sand
The HurtEntities field now defaults to false if not specified (or true if BlockState is anvil)
The FallHurtAmount field now defaults to 0 if not specified
The FallHurtMax field now defaults to 40 if not specified
The DropItem field now defaults to true if not specified
The TileEntityData field will no longer be preserved if removed
firework_rocket
The ShotAtAngle field now defaults to false if not specified
fox
The Trusted field now defaults to empty if not specified (and will no longer be merged with the previous state if modified by /data)
ghast
The ExplosionPower field now defaults to 1 if not specified
goat
The HasLeftHorn and HasRightHorn fields now default to true if not specified
interaction
The width and height fields now default to 1 if not specified
item
The Health field now defaults to 5 if not specified
The PickupDelay field now defaults to 0 if not specified
The Age field now defaults to 0 if not specified
The Owner and Thrower fields will no longer be preserved when removed
item_frame and glow_item_frame
The TileX, TileY, and TileZ fields have been collected into a single block_pos field
The ItemDropChance field now defaults to 1.0 if not specified
item
The Owner and Thrower fields will no longer be preserved when removed
phantom
The Size field has been renamed to size
The AX, AY, and AZ fields have been collected into a single anchor_pos field
player
The SpawnX, SpawnY, SpawnZ, SpawnAngle, SpawnDimension, and SpawnForced fields have been collected into a single respawn field
Format: object with fields
pos - block position to spawn at
angle - float, angle to spawn with (default: 0.0)
dimension - dimension id to spawn in (default minecraft:overworld)
forced - boolean, true if this spawn was set through commands (default: false)
The enteredNetherPosition field has been renamed to entered_nether_pos, and is now formatted as a list of doubles
e.g. entered_nether_pos: [1.0, 2.0, 3.0]
primed_tnt
The fuse field now defaults to 80 if not specified
The block_state field now defaults to tnt if not specified
The explosion_power field now defaults to 4 if not specified
shulker
The Color field now defaults to 16 (no color) if not specified
shulker_bullet
The Dir and Target fields will no longer be preserved when removed
skeleton
The StrayConversionTime field will no longer be preserved when removed
spectral_arrow
The Duration field now defaults to 200 if not specified
snow_golem
The Pumpkin field now defaults to true if not specified
tnt_minecart
The fuse field now defaults to 80 if not specified
The explosion_power field now defaults to 4 if not specified
The explosion_speed_factor field now defaults to 1 if not specified
turtle
The HomePosX, HomePosY, and HomePosZ fields have been collected into a single home_pos field
Removed TravelPosX, TravelPosY, and TravelPosZ fields
The HasEgg field has been renamed to has_egg
trader_llama
The DespawnDelay field now defaults to 47999
vex
The LifeTicks field has been renamed to life_ticks
The BoundX, BoundY, and BoundZ fields have been collected into a single bound_pos field
villager
The FoodLevel and Xp fields now default to 0 if not specified
The Gossips and ConversionTime fields will no longer be preserved when removed
wandering_trader
The DespawnDelay field now defaults to 0 if not specified
The wander_target field will no longer be preserved when removed
wolf
The CollarColor field now defaults to 14 (red) if not specified
zombie
The DrownedConversionTime field will no longer be preserved when removed
zombie_villager
The Xp field now defaults to 0 if not specified
The Gossips and ConversionTime fields will no longer be preserved when removed
evoker_fangs, area_effect_cloud, and all projectiles
The Owner field will no longer be preserved when removed
painting and leash_knot
The TileX, TileY, and TileZ fields have been collected into a single block_pos field
arrow, spectral_arrow, trident
The inBlockState and SoundEvent fields will no longer be preserved when removed
The damage field now defaults to 2 if not specified
dragon_fireball, wind_charge, breeze_wind_charge, wither_skull, small_fireball, and large_fireball
The acceleration_power field now defaults to 0.1 if not specified
small_fireball and large_fireball
The ExplosionPower field now defaults to 1 if not specified
minecart, *_minecart
The CustomDisplayTile field has been removed
DisplayState will now always override the default displayed block state if specified
DisplayOffset may now be specified to override the default offset even without a custom display block state set
block_display, item_display, and text_display
The interpolation_duration, teleport_duration, and start_interpolation fields now default to 0 if not specified
The view_range field now defaults to 1 if not specified
The shadow_radius field now defaults to 0 if not specified
The shadow_strength field now defaults to 1 if not specified
The width and height fields now default to 0 if not specified
The glow_color_override field will no longer be preserved when removed
witch, ravager, pillager, illusioner, evoker, and vindicator
The patrol_target field will no longer be preserved when removed
Block Entity Data
The CustomName field will no longer be preserved when removed
The LootTable field will no longer be preserved when removed
campfire
The CookingTimes and CookingTotalTimes fields will no longer be preserved when removed
chiseled_bookshelf
The last_interacted_slot field now defaults to -1 if not specified
end_gateway
The exit_portal field will no longer be preserved when removed
furnace, smoker, blast_furnace
The RecipesUsed field will no longer be preserved when removed
hopper
The TransferCooldown field now default to -1 if not specified
jigsaw
The name, target, and pool fields now default to minecraft:empty if not specified
The final_state field now defaults to minecraft:air if not specified
sculk_shrieker
The warning_level field now defaults to 0 if not specified
skull
The note_block_sound field will no longer be preserved when removed
structure_block
The ignoreEntities and showboundingbox fields now default to true if not specified
The posY field now defaults to 1 if not specified
Data Components
New weapon Item Component
When present, the "Item Used" statistic will be incremented for each attack with the item
The specified amount of damage will be subtracted from the item's durability with each attack
Format: object with fields:
item_damage_per_attack - non-negative integer (default: 1)
The amount of damage to subtract from the weapon item's durability for each attack performed
disable_blocking_for_seconds - non-negative float (default: 0)
If non-zero, will disable a blocking Shield on successful attack for the specified amount of seconds
e.g. weapon={item_damage_per_attack:2}
New blocks_attacks Item Component
When present, this item can be used like a Shield to block attacks to the holding player
Format: object with fields:
block_delay_seconds - non-negative float (default: 0)
The number of seconds that right-click must be held before successfully blocking attacks
disable_cooldown_scale - non-negative float (default: 1)
Multiplier applied to the number of seconds that the item will be on cooldown when attacked by a disabling attack (disable_blocking_for_seconds on the weapon component)
If 0, this item can never be disabled by attacks
damage_reductions - list of objects with fields (optional)
Controls how much damage should be blocked in a given attack
If not specified, all damage is blocked
Each entry in the list contributes an amount of damage to be blocked, optionally filtered by damage type
Each entry adds to blocked damage, determined by clamp(base + factor * dealt_damage, 0, dealt_damage)
The final damage applied in the attack to the entity is determined by dealt_damage - clamp(blocked_damage, 0, dealt_damage)
Entry format:
horizontal_blocking_angle - angle in degrees as a positive float (default: 90)
The maximum angle between the user's facing and the incoming attack for the block to be effective
If the damage has no position, the compared angle will be assumed to be the maximum 180
type - damage type id, list of damage type ids, or hash-prefixed damage type tag (optional)
This entry will only contribute to the blocked damage if the dealt damage type matches this field
If not specified, any damage type will be accepted
base - float
Constant amount of damage to be blocked
factor - float
Fraction of the dealt damage that should be blocked
item_damage - object with fields (optional)
Controls how much damage should be applied to the item from a given attack
If not specified, a point of durability is removed for every point of damage blocked
The final damage applied to the item is determined by: floor(base + factor * damage_blocked)
The final value may be negative, causing the item to be repaired
Format:
threshold - non-negative float
The minimum amount of damage blocked in the attack before item damage is applied to the item
base - float
ConstaTest instances are defined in the registry test_instance. They're small assets defining a test to run.
Fields:
environment: Namespaced ID of the test environment to run this test as part of
structure: The namespaced ID of the structure to use for the test
max_ticks: A positive integer representing the maximum number of ticks allowed to pass before the test is considered timed out
setup_ticks: Optional non-negative integer (default: 0) representing a number of ticks to wait after placing the structure before starting the test
required: Optional boolean (default true) - whether the test is considered required to pass for the full test suite to pass
rotation: Optional rotation to apply to the test structure
One of none (default), clockwise_90, 180 and counterclockwise_90
manual_only: Optional boolean (default false), set to true for tests that are not included as part of automated test runs
sky_access: Whether the test needs clear access to the sky
By default (false), tests are enclosed in barrier blocks - if set to true, the top is left open
max_attempts: Number of attempts to run the test (default 1)
required_successes: Number of attempts that must succeed for the test to be considered successful (default 1)
type: The type of test - one of block_based and function
Function Tests
Function tests rely on built-in functions to run a test and indicate success or failure. They have one additional field:
function: The namespaced ID of the Test Function to run
See the "Using the Game Test Framework from Code" changelog section for more information.
Block Based Tests
Block based tests use Test Blocks in the test structure to run the test and indicate success or failure.
Test Environments
Test Environments are a way to group up tests and give them the right preconditions to run. A Test Environment is an asset in the test_environment registry. Each Test Environment definition has a type field that determines its setup:
all_of definitions apply the setup from several sub-definitions in the definitions field
function definitions use mcfunction files as setup and teardown
setup: Optional namespaced ID of the mcfunction to use for setup, if any
teardown: Optional namespaced ID of the mcfunction to use for teardown, if any
game_rules: definitions set any number of game rules
bool_rules: A list of boolean game rules to set and the value to set
int_rules: A list of integer game rules to set and the value to set
Each rule is an object with two fields:
rule: The exact name of the rule to set
value: The value to set
Game rules are reset to their default values after the test environment has completed
weather definitions sets the weather state
weather: The weather to set - one of clear, rain and thunder
time_of_day definitions set a given time of day
time: The time of day to set in number of ticks, as a non-negative integer
The game provides a single, empty Test Environment by default: minecraft:default.
Test Blocks
The Test Block is a block used for implementing a block-based tests. It has four modes:
start: Triggers a redstone pulse when the test starts
log: Logs a message to the log file when powered by redstone
fail: Fails the test when powered by redstone
accept: Completes the test when powered by redstone
Block-based tests are required to have at least one start block and one accept block in the structure.
The test Command
The test command is a new command used to create and run tests.
Syntax:
test clearall [<radius>]
test clearthat
test clearthese
test create <test> [<width>] [<height> <depth>]
test locate <selector>
test resetclosest
test reseetthese
test resetthat
test pos [<variable>]
test run <selector> [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]
test runclosest [<numberOfTimes>] [<untilFailed>]
test runfailed [<numberOfTimes>] [<untilFailed>] [<rotationSteps>] [<testsPerRow>]
test runmultiple <selector> [<amount>]
test runthat [<numberOfTimes>] [<untilFailed>]
test runthese [<numberOfTimes>] [<untilFailed>]
test stop
test verify <tests>
Parameters:
radius: The radius to clear tests within
test: The namespaced ID of a test
selector: A wildcard-enabled selector for test IDs
Supports * and ? for matching namespaced IDs
If namespace is not supplied, defaults to minecraft
Examples:
*:* - matches all IDs
* - matches everything in the minecraft namespace
custom:folder/*_test_? - matches IDs in the folder folder of the custom namespace, with a prefix followed by _test_ followed by a single valid character
width: The width of the test structure - if omitted, 5 is used
height: The height of the test structure - if omitted, the width is used
depth: The depth of the test structure - if omitted, the width is used
variable: The variable name to include in the copied code snippet
numberOfTimes: The number of times to repeat each test - if omitted, 1 is ued
untilFailed: Boolean (default false) noting that the test should be stopped as soon as one iteration fails
rotationSteps: Number of extra 90 degree steps to apply to the test - if omitted, 0 is used
testsPerRow: Number of tests to place per row in a grid layout - if omitted, 8 is used
test clear*
These subcommands clear the structures and blocks associated with the selected tests.
test create
This subcommand creates a test setup in the current location for the given test, preparing for a structure of the given size. This gives a starting point for creating the structure for the test.
test locate
Attempts to locate the given test. Note that only loaded chunks are searched.
test reset*
These subcommands reset the structures for the selected tests, removing any surrounding barriers and placing the structure in from scratch.
test pos
Shows the local coordinates to the block pointed at in the test. If the optional variable name is specified, this variable name is used in a code fragment obtained by clicking on the coordinates in the output message.
test run*
Runs one or more tests. If multiple tests are run at once, they are placed in a grid and run in parallel, although only up to a certain limit. Beyond that limit, tests are run in rounds where each round completes before any tests from the next round are started.
For each test, loads the given structure and runs the associated test. Each test location will have a beacon beam showcasing the test status.
Gray beacon = in progress
Red = fail (required test)
Orange = fail (optional test)
Green = success
If a test fails, the error is shown on a lectern book and an overlay.
Note that Game Tests are designed to run on standard superflat worlds. The area around each test is replaced with stone when it runs, and the running test is encased in barrier blocks.
test stop
This stops all running tests. Note that gameplay events triggered by tests may still remain.
test verify*
Verifies one or more tests by running multiple instances of the same test.
Test Instance Blocks
To run a test in a world, a Test Instance Block is used. This type of block represents the test as placed in the world and is used to interact with that test, to save the structure, reset or run the test.
Using the test command to run or create a test will also place a Test Instance Block to control that test.
Using the Game Test Framework from Code
The Game Test Framework can also be used from code in a more versatile manner than block-based tests. For this to work, you need to mod the game to add your test functions to the test_function registry (Registries.TEST_FUNCTION).
Hook into some startup method (pre-registry bootstrap) to add your loader - call TestFunctionLoader.registerLoader() with an implementation of TestFunctionLoader. Your implementation can then use the provided register consumer to register test functions with their namespaced IDs. This namespaced ID can then be referenced in a function type Test Instance.
A test function is a Consumer<GameTestHelper>, using that GameTestHelper instance to manipulate the world and make assertions about the state of the resulting world.
The helper can be used to summon mobs, set blocks, query for blocks and entities and assert the state of the test. Most GameTestHelper methods take test-local coordinates, which you can also find using /test pos.
Example code that might go along with a test structure with a locked hopper containing a Cod, pointed into a Furnace:
public void furnaceSmeltsItem(final GameTestHelper helper) {
helper.setBlock(0, 4, 0, Blocks.AIR);
helper.succeedWhen(() -> helper.assertContainerContainsSingle(new BlockPos(0, 0, 0), Items.COOKED_COD));
}
More complicated setups will often use helper.startSequence() to model sequences of events that must happen.
As opposed to block-based tests, function tests failing will often produce more helpful error messages including the location of whatever failed and what was expected at that location.
Game Rules
allowFireTicksAwayFromPlayer
When true, fire and lava can spread fire outside the 8 chunk range of a player
Note: the fire and lava blocks must still be in simulation distance to spread
Default value: false
tntExplodes
When false, TNT will not explode and cannot be ignited
Default value: true
Uniform Variant Selection
Variants that have spawn rules now use a uniform approach for selection
Selection process:
Every variant has a field spawn_conditions that contains a list of entries
Every entry has a condition and an integer priority
Conditions for all variants for given entity type are evaluated for the position that entity is being spawned
Entries with a priority lower than the maximum priority of remaining entries are removed
The game randomly picks one entry out of the remaining ones
If no conditions are remaining, the variant remains unchanged from default for that entity
Entry format:
priority - integer
condition - optional structure
Fields:
type - see below for values
Additional fields are dependent on type
If this field is not present, the condition is always true
Spawn Conditions
minecraft:biome
Checks if entity is spawning in specific biomes
Fields:
biomes - single entry, list or a tag describing biomes
minecraft:moon_brightness
Checks if the current moon brightness is within a certain range
Fields:
range - floating point range (a single number or an object like {"min": 1, "max": 2})
minecraft:structures
Checks if the entity is spawning in specific structures
Fields:
structures - single entry, list or a tag describing structures
Data-driven Mob Variants
Wolf Variants
The fields angry_texture, tame_texture and wild_texture have been grouped in an assets field, and renamed to angry, tame, and wild
Added field spawn_conditions described in uniform variant selection above
Pig Variants
Pig variants can be data-driven by adding entries to data/<namespace>/pig_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Cat Variants
Cat variants can be data-driven by adding entries to data/<namespace>/cat_variant/<id>.json
This feature is experimental
Fields in file:
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Frog Variants
Frog variants can be data-driven by adding entries to data/<namespace>/frog_variant/<id>.json
This feature is experimental
Fields in file:
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Cow Variants
Cow variants can be data-driven by adding entries to data/<namespace>/cow_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold, warm
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Chicken Variants
Chicken variants can be data-driven by adding entries to data/<namespace>/chicken_variant/<id>.json
This feature is experimental
Fields in file:
model - one of: normal, cold
asset_id - namespaced id for this variant asset, resolves to assets/<namespace>/textures/<path>.png
spawn_conditions - field described in uniform variant selection above
Wolf Sound Variants
Wolf sound variants can be data-driven by adding entries to data/<namespace>/wolf_sound_variant/<id>.json
The file contains the following fields which correspond to sound events to use for the specific behaviour:
ambient_sound
death_sound
growl_sound
hurt_sound
pant_sound
whine_sound
Commands
SNBT literals now accept heterogeneous lists
/data can now create and modify heterogeneous lists transparently
The /setblock, /fill, /clone, and /place commands now support a "strict" placement mode
/setblock and /fill have updated handling of block entities
The horse.saddle item slot has been renamed to saddle, and now supports any entity that can equip a Saddle
Text Components in commands such as /tellraw or /title are now specified with SNBT instead of JSON
Text Style in the /scoreboard command when specifying the styled number format is also now specified with SNBT instead of JSON
Text Component arguments in /bossbar, /scoreboard and /team commands are now resolved before use (in the context of entity the held in @s)
Changes to /setblock, /fill, /clone, and /place
The behavior of setblock and fill commands have changed in how they handle block entity data:
If the block entity data is not specified, and the existing block has data, the block entity data will be preserved
If the block entity data is specified, the block entity data will be set to that specified value
To clear block entity data explicitly, you must now specify the block entity data as {}
The operation is now successful if either the block state changed or the block entity data changed
fill, clone, setblock and place template accept a new option: strict
If specified, the command will place blocks as-is without triggering block updates or shape updates
The replace option in the fill command is no longer terminal, and can be followed with additional options
New syntax for commands to use the new strict option, and more flexible use of replace:
fill <from> <to> <block> keep
fill <from> <to> <block> [replace <filter>]? [strict|destroy|hollow|outline]?
clone [from <sourceDimension>]? <begin> <end> [to <targetDimension>]? <destination> [strict]? [[replace|masked|filtered <filter>] [force|move|normal]?]?
setblock <pos> <block> [destroy|keep|replace|strict]?
place template <template> [<pos> [<rotation> [<mirror> [<integrity> [<seed> [strict]?]?]?]?]?]?
NBT Changes
Any interface with NBT data within the game (SNBT representation, /data) now supports heterogeneous lists, i.e. ones where elements are not of the same type
Inserting or replacing into a list of a different type with /data will no longer give an error
Inserting into an array type (e.g. [I;1,2,3]) is still type-restricted
This means that the "wrapper" objects previously used to represent heterogeneous lists will no longer be observable by in-game means
/data can no longer traverse paths with an empty key (e.g. /data get ... foo.''.bar)
The NBT file format is unchanged:
Heterogeneous lists are transformed before storage to bypass NBT constraints
Example transform: ['a', {'b':3}] is stored as [{'':'a'},{'b':3}]
Existing external tools will still be able to read NBT files as before, but heterogeneous lists will be displayed in the transformed form
No data produced by the game has changed: objects such as Text Components were already producing heterogeneous lists in this form
Note: these wrapper objects may never be observed in-game, they are only relevant to developers working with the NBT file or network format directly
SNBT Changes
The text format for describing object-like data in commands (like NBT, text components, predicates, etc.) has been extended
To simplify input of data and macro use, SNBT now also supports following operations:
bool(arg) - converts argument to boolean
if argument is a boolean value, returns value directly
if argument is a number value, returns true if it is non-zero
uuid(str) - converts string representation of UUID to integer array
Number Format
Either whole or fraction parts of a float number can be omitted
Examples: .1 and 1. are valid now
Float numbers now use E notation
Example: both 1.2e3 and 1.2E3, 1.2E+3, 12000e-1 are now a valid way to represent 1200.0
Integer numbers can now be prefixed with 0x to represent hexadecimal numbers and 0b to represent binary numbers
Example: 0xbad (equal to 2989), 0xCAFE (equal to 51966), 0b101 (equal to 5)
Non-zero integer numbers now can't start with 0
Normally it would mean number is in base-8, but we are restricting it to avoid accidental use
Numbers can now contain _ character between sequences of digits (but not at the start or the end of sequence)
Example: 0b10_01, 0xAB_CD, 1_2.3_4__5f, 1_2e3_4
NaN, Inf or hexadecimal float representation are NOT supported
Implicit infinite float values (like 1e1000) are rejected
Type suffixes have been extended:
Integer type suffixes (b or B - byte, s or S - short, i or I - integer, l or L - long) can now be prefixed with s (signed) or u unsigned
New suffixes only affect the valid range when parsing - values are still stored as signed
Example: 240ub is equal to -16sb, while 240sb does not parse
When a suffix is used without u or s, it defaults to signed for decimal numbers and unsigned for binary and hexadecimal numbers
Note: since b is also a valid hexadecimal digit, byte sized hexadecimal values can only be written with a signed suffix, like 0x11ub or 0x11sb
Strings
Quoted strings can now use escape sequences beyond ', " and \:
Unicode escapes:
\x - two digit escape, like \x42
\u - four digit escape, like \u2603
\U - eight digit escape, like \U00002603
\N{<name>} - named Unicode character, like \N{Snowman}
Built-in escape sequences:
\b - backspace, Unicode \x08
\s - space, Unicode \x20
\t - horizontal tab, Unicode \x09
\n - linefeed, Unicode \u0a
\f - form feed, Unicode \u0c
\r - carriage return, Unicode \u0d
Unquoted strings now can't start with 0-9, ., +, - to avoid accidental collision with numbers
Number Arrays
Values in arrays ([B;], [I;], [L;]) without a suffix are now assumed to have suffix matching the type of the array
Example: [B;1,2] is equivalent to [B; 1b, 2b]
Arrays can now also accept types smaller than the array type
Example: [I;1b,2s,3] is valid and equivalent to [I;1i,2i,3i]
Lists
Lists now accept trailing commas
Example: [1,2,] is valid and equivalent to [1,2]
Only one trailing comma is allowed, and it must come after a valid element - both [,] and [1,,] are invalid
Compounds
Compounds (maps) now accept trailing commas
Example: {a:b,}
Only one trailing comma is allowed, and it must come after a valid key-value pair - both {,} and {a:b,,} are invalid
Text Component Data Format
Text Components are no longer stored as JSON wrapped by a string
The format itself is the same as before, but inlined directly into the outer structure
For example, the item component minecraft:custom_name="{"text":"Renamed item"}" will become minecraft:custom_name={text:'Renamed item'}
This includes Text Components passed as arguments to commands such as /tellraw or /title
For example, /tellraw @s {"text":"Hello world"} may become /tellraw @s {text:'Hello world'}
Note: in the case where Text Components are embedded in NBT, no distinction exists between boolean and integer types
To pass boolean arguments to translations, you must use the string form
For Text Components with the nbt type and interpret set to true, Text Components will be parsed from the given NBT directly rather than converting to a string and parsing as JSON
The format of hover and click events has been updated
Hover Events
The hoverEvent field has been renamed to hover_event
The legacy value field (which was parsed from a rendered text component) is no longer supported
For the show_text action:
The contents field has been renamed to value
e.g. {action:'show_text',contents:'Hello world'} becomes {action:'show_text',value:'Hello world'}
For the show_item action:
The contents field has been inlined
e.g. {action:'show_item',contents:{id:'minecraft:stick',count:2}} becomes {action:'show_item',id:'minecraft:stick',count:2}
If contents was specified only as an item id, it is replaced with the full format and inlined
e.g. {action:'show_item',contents:'minecraft:stick'} becomes {action:'show_item',id:'minecraft:stick'}
For the show_entity action:
The contents field has been inlined
The id field has been renamed to uuid
The type field has been renamed to id
e.g. {action:'show_entity',contents:{id:[I;0,0,0,0],type:'minecraft:pig'}} becomes {action:'show_entity',uuid:[I;0,0,0,0],id:'minecraft:pig'}
Click Events
The clickEvent field has been renamed to click_event
For the open_url action:
The value field has been renamed to url
The click event will no longer parse if not a valid URI with either https:// or http:// schemes, instead of simply not working
e.g. {action:'open_url',value:'https://minecraft.net'} becomes {action:'open_url',url:'https://minecraft.net'}
For the run_command action:
The value field has been renamed to command
The click event will no longer parse if the command contains disallowed characters, instead of simply not working
It is no longer required that the specified command field has a / prefix
e.g. {action:'run_command',value:'/tp @e @s'} becomes {action:'run_command',command:'/tp @e @s'}
For the suggest_command action:
The value field has been renamed to command
The click event will no longer parse if the command contains disallowed characters, instead of simply not working
e.g. {action:'suggest_command',value:'/help'} becomes {action:'suggest_command',command:'/help'}
For the change_page action:
The value field has been renamed to page
The page value now requires a positive integer instead of a string
e.g. {action:'change_page',value:'1'} becomes {action:'change_page',page:1}
The copy_to_clipboard format is unchanged
Entity Data
Custom data (previously present only on Marker) is now available on all entities
It's exposed as a minecraft:custom_data component, so it can be set by spawning items and matched by predicates
The component is currently stored in a field called data, which will be changed in the future when more proper storage for entity components is introduced
It's stored only if it's non-empty
Updated and unified formats for storing equipment-related data on entities
The Owner field of tamed animals is no longer restricted to referencing Players
The Health and Air fields now default to their respective maximum value if not specified
The Tags and FallFlying fields will no longer be preserved if removed
The FallDistance field has been changed from float to double and is now called fall_distance
The SleepingX, SleepingY, and SleepingZ fields have been collected into a single sleeping_pos field
Pos, Motion, and Rotation values without the correct number of components (3, 3, and 2 respectively) will now be fully discarded, instead of only selecting the specified components
e.g. sleeping_pos: [I;1,2,3]
Block States in the entity data of Arrows, Minecarts, Block Displays, Endermen, Falling Blocks, Primed TNT, or Piston Moving Blocks are no longer allowed to be specified as an empty object
Many tweaks to entity data formats of specific entities
Equipment Data
The ArmorItems, HandItems, and body_armor_item fields have been merged into an equipment field
Format: map between equipment slot type and item stack
Valid equipment slots: head, chest, legs, feet, mainhand, offhand, body, saddle
If not specified or removed, the entity will have no equipment
e.g. equipment:{chest:{id:'minecraft:diamond_chestplate'}}
This affects all mobs and Armor Stands
The armor and off-hand equipment of Players is now also stored in the equipment field (although items written into the Inventory using armor and off-hand slot numbers still work)
The data format of saddles has been unified between mobs such as Horses and Pigs, becoming a new kind of equipment slot (and stored in the equipment.saddle field)
This is a pure rename from the previous SaddleItem in Horse-like mobs
This also replaces the boolean Saddle flag from Pigs and Striders
The Saddle dropping on death is now affected by the drop_chances field, as with other equipment slots
The ArmorDropChances, HandDropChances, and body_armor_drop_chance fields have been merged into a drop_chances field
Format: map between equipment slot type and chance value
If not specified or removed, chances will be assumed as default (0.085f)
e.g. drop_chances:{chest:0.1,feet:1.0}
Drop chances with a default value will no longer be stored, and the drop_chances field is removed entirely if all defaults
allay
Removed redundant CanDuplicate field (controlled by DuplicationCooldown)
area_effect_cloud
Area Effect Clouds have a new field: potion_duration_scale (float)
If not specified, defaults to 1.0
The duration of the potion effect applied is scaled by this factor
Area Effect Clouds created by Lingering Potions will have a scale of 0.25
The Duration field now defaults to -1 if not specified
If the Duration field is -1, the Area Effect Cloud will never run out
This means that an Area Effect Cloud summoned with no duration specified will no longer immediately disappear
cat
The CollarColor field now defaults to 14 (red) if not specified
creeper
The Fuse field now defaults to 30 if not specified
The ExplosionRadius field now defaults to 3 if not specified
dolphin
Removed TreasurePosX, TreasurePosY, TreasurePosZ fields
The Moistness field now defaults to 2400 if not specified
ender_dragon
The DragonDeathTime field now defaults to 0 if not specified
falling_block
The BlockState field can now be air (will despawn immediately) - if otherwise not specified or invalid, defaults to sand
The HurtEntities field now defaults to false if not specified (or true if BlockState is anvil)
The FallHurtAmount field now defaults to 0 if not specified
The FallHurtMax field now defaults to 40 if not specified
The DropItem field now defaults to true if not specified
The TileEntityData field will no longer be preserved if removed
firework_rocket
The ShotAtAngle field now defaults to false if not specified
fox
The Trusted field now defaults to empty if not specified (and will no longer be merged with the previous state if modified by /data)
ghast
The ExplosionPower field now defaults to 1 if not specified
goat
The HasLeftHorn and HasRightHorn fields now default to true if not specified
interaction
The width and height fields now default to 1 if not specified
item
The Health field now defaults to 5 if not specified
The PickupDelay field now defaults to 0 if not specified
The Age field now defaults to 0 if not specified
The Owner and Thrower fields will no longer be preserved when removed
item_frame and glow_item_frame
The TileX, TileY, and TileZ fields have been collected into a single block_pos field
The ItemDropChance field now defaults to 1.0 if not specified
item
The Owner and Thrower fields will no longer be preserved when removed
phantom
The Size field has been renamed to size
The AX, AY, and AZ fields have been collected into a single anchor_pos field
player
The SpawnX, SpawnY, SpawnZ, SpawnAngle, SpawnDimension, and SpawnForced fields have been collected into a single respawn field
Format: object with fields
pos - block position to spawn at
angle - float, angle to spawn with (default: 0.0)
dimension - dimension id to spawn in (default minecraft:overworld)
forced - boolean, true if this spawn was set through commands (default: false)
The enteredNetherPosition field has been renamed to entered_nether_pos, and is now formatted as a list of doubles
e.g. entered_nether_pos: [1.0, 2.0, 3.0]
primed_tnt
The fuse field now defaults to 80 if not specified
The block_state field now defaults to tnt if not specified
The explosion_power field now defaults to 4 if not specified
shulker
The Color field now defaults to 16 (no color) if not specified
shulker_bullet
The Dir and Target fields will no longer be preserved when removed
skeleton
The StrayConversionTime field will no longer be preserved when removed
spectral_arrow
The Duration field now defaults to 200 if not specified
snow_golem
The Pumpkin field now defaults to true if not specified
tnt_minecart
The fuse field now defaults to 80 if not specified
The explosion_power field now defaults to 4 if not specified
The explosion_speed_factor field now defaults to 1 if not specified
turtle
The HomePosX, HomePosY, and HomePosZ fields have been collected into a single home_pos field
Removed TravelPosX, TravelPosY, and TravelPosZ fields
The HasEgg field has been renamed to has_egg
trader_llama
The DespawnDelay field now defaults to 47999
vex
The LifeTicks field has been renamed to life_ticks
The BoundX, BoundY, and BoundZ fields have been collected into a single bound_pos field
villager
The FoodLevel and Xp fields now default to 0 if not specified
The Gossips and ConversionTime fields will no longer be preserved when removed
wandering_trader
The DespawnDelay field now defaults to 0 if not specified
The wander_target field will no longer be preserved when removed
wolf
The CollarColor field now defaults to 14 (red) if not specified
zombie
The DrownedConversionTime field will no longer be preserved when removed
zombie_villager
The Xp field now defaults to 0 if not specified
The Gossips and ConversionTime fields will no longer be preserved when removed
evoker_fangs, area_effect_cloud, and all projectiles
The Owner field will no longer be preserved when removed
painting and leash_knot
The TileX, TileY, and TileZ fields have been collected into a single block_pos field
arrow, spectral_arrow, trident
The inBlockState and SoundEvent fields will no longer be preserved when removed
The damage field now defaults to 2 if not specified
dragon_fireball, wind_charge, breeze_wind_charge, wither_skull, small_fireball, and large_fireball
The acceleration_power field now defaults to 0.1 if not specified
small_fireball and large_fireball
The ExplosionPower field now defaults to 1 if not specified
minecart, *_minecart
The CustomDisplayTile field has been removed
DisplayState will now always override the default displayed block state if specified
DisplayOffset may now be specified to override the default offset even without a custom display block state set
block_display, item_display, and text_display
The interpolation_duration, teleport_duration, and start_interpolation fields now default to 0 if not specified
The view_range field now defaults to 1 if not specified
The shadow_radius field now defaults to 0 if not specified
The shadow_strength field now defaults to 1 if not specified
The width and height fields now default to 0 if not specified
The glow_color_override field will no longer be preserved when removed
witch, ravager, pillager, illusioner, evoker, and vindicator
The patrol_target field will no longer be preserved when removed
Block Entity Data
The CustomName field will no longer be preserved when removed
The LootTable field will no longer be preserved when removed
campfire
The CookingTimes and CookingTotalTimes fields will no longer be preserved when removed
chiseled_bookshelf
The last_interacted_slot field now defaults to -1 if not specified
end_gateway
The exit_portal field will no longer be preserved when removed
furnace, smoker, blast_furnace
The RecipesUsed field will no longer be preserved when removed
hopper
The TransferCooldown field now default to -1 if not specified
jigsaw
The name, target, and pool fields now default to minecraft:empty if not specified
The final_state field now defaults to minecraft:air if not specified
sculk_shrieker
The warning_level field now defaults to 0 if not specified
skull
The note_block_sound field will no longer be preserved when removed
structure_block
The ignoreEntities and showboundingbox fields now default to true if not specified
The posY field now defaults to 1 if not specified
Data Components
New weapon Item Component
When present, the "Item Used" statistic will be incremented for each attack with the item
The specified amount of damage will be subtracted from the item's durability with each attack
Format: object with fields:
item_damage_per_attack - non-negative integer (default: 1)
The amount of damage to subtract from the weapon item's durability for each attack performed
disable_blocking_for_seconds - non-negative float (default: 0)
If non-zero, will disable a blocking Shield on successful attack for the specified amount of seconds
e.g. weapon={item_damage_per_attack:2}
New blocks_attacks Item Component
When present, this item can be used like a Shield to block attacks to the holding player
Format: object with fields:
block_delay_seconds - non-negative float (default: 0)
The number of seconds that right-click must be held before successfully blocking attacks
disable_cooldown_scale - non-negative float (default: 1)
Multiplier applied to the number of seconds that the item will be on cooldown when attacked by a disabling attack (disable_blocking_for_seconds on the weapon component)
If 0, this item can never be disabled by attacks
damage_reductions - list of objects with fields (optional)
Controls how much damage should be blocked in a given attack
If not specified, all damage is blocked
Each entry in the list contributes an amount of damage to be blocked, optionally filtered by damage type
Each entry adds to blocked damage, determined by clamp(base + factor * dealt_damage, 0, dealt_damage)
The final damage applied in the attack to the entity is determined by dealt_damage - clamp(blocked_damage, 0, dealt_damage)
Entry format:
horizontal_blocking_angle - angle in degrees as a positive float (default: 90)
The maximum angle between the user's facing and the incoming attack for the block to be effective
If the damage has no position, the compared angle will be assumed to be the maximum 180
type - damage type id, list of damage type ids, or hash-prefixed damage type tag (optional)
This entry will only contribute to the blocked damage if the dealt damage type matches this field
If not specified, any damage type will be accepted
base - float
Constant amount of damage to be blocked
factor - float
Fraction of the dealt damage that should be blocked
item_damage - object with fields (optional)
Controls how much damage should be applied to the item from a given attack
If not specified, a point of durability is removed for every point of damage blocked
The final damage applied to the item is determined by: floor(base + factor * damage_blocked)
The final value may be negative, causing the item to be repaired
Format:
threshold - non-negative float
The minimum amount of damage blocked in the attack before item damage is applied to the item
base - float
Constant amount of damage applied to the item, if threshold is passed
factor - float
Fraction of the blocked damage that should be applied to the item, if threshold is passed
bypassed_by - hash-prefixed damage type tag (optional)
If specified, blocking is bypassed by these damage types
block_sound - sound event (optional)
If specified, this sound will be played when an attack is successfully blocked
disabled_sound - sound event (optional)
If specified, this sound will be played when the item goes on its disabled cooldown due to an attack
New potion_duration_scale Item Component
When present, for items that nt amount of damage applied toLodestones have a new crafting recipe and can now be found in Ruined Portals
The trades of the Cartographer and Wandering Trader have been updated
Bundles can now be found in some of the Chests in Villages
Updates to Camel, Chicken, Cow, Pig, and Sheep spawning
Zombified Piglins now need to be killed by a Player to drop the Player-specific loot such as experience
This makes them consistent with all other mobs in the game
Changes to world generation of the Pale Garden and Meadow biomes
Chunks loaded by a portal will now be re-loaded again automatically when the world is reopened
Improved how simulation distance affects block ticks
Tweaks to the Creaking and Creaking Heart
Textures and models for temperate Cow, Mooshrooms and Sheep have been updated
Minor tweaks to existing Blocks, Items and Entities
Various changes and tweaks to sounds
Minor improvements to world uploads in Realms
Reverted fix MC-152728 - "The player continues sprinting when performing actions that sLodestones have a new crafting recipe and can now be found in Ruined Portals
The trades of the Cartographer and Wandering Trader have been updated
Bundles can now be found in some of the Chests in Villages
Updates to Camel, Chicken, Cow, Pig, and Sheep spawning
Zombified Piglins now need to be killed by a Player to drop the Player-specific loot such as experience
This makes them consistent with all other mobs in the game
Changes to world generation of the Pale Garden and Meadow biomes
Chunks loaded by a portal will now be re-loaded again automatically when the world is reopened
Improved how simulation distance affects block ticks
Tweaks to the Creaking and Creaking Heart
Textures and models for temperate Cow, Mooshrooms and Sheep have been updated
Minor tweaks to existing Blocks, Items and Entities
Various changes and tweaks to sounds
Minor improvements to world uploads in Realms
Reverted fix MC-152728 - "The player continues sprinting when performing actions that sLodestones have a new crafting recipe and can now be found in Ruined Portals
The trades of the Cartographer and Wandering Trader have been updated
Bundles can now be found in some of the Chests in Villages
Updates to Camel, Chicken, Cow, Pig, and Sheep spawning
Zombified Piglins now need to be killed by a Player to drop the Player-specific loot such as experience
This makes them consistent with all other mobs in the game
Changes to world generation of the Pale Garden and Meadow biomes
Chunks loaded by a portal will now be re-loaded again automatically when the world is reopened
Improved how simulation distance affects block ticks
Tweaks to the Creaking and Creaking Heart
Textures and models for temperate Cow, Mooshrooms and Sheep have been updated
Minor tweaks to existing Blocks, Items and Entities
Various changes and tweaks to sounds
Minor improvements to world uploads in Realms
Reverted fix MC-152728 - "The player continues sprinting when performing actions that slow them down"low them down"low them down" the item, if threshold is passed
factor - float
Fraction of the blocked damage that should be applied to the item, if threshold is passed
bypassed_by - hash-prefixed damage type tag (optional)
If specified, blocking is bypassed by these damage types
block_sound - sound event (optional)
If specified, this sound will be played when an attack is successfully blocked
disabled_sound - sound event (optional)
If specified, this sound will be played when the item goes on its disabled cooldown due to an attack
New potion_duration_scale Item Component
When present, for items that
WRITTEN BY MOMIN FARAZ
INFORMATION AND DETAIL BY
HADI BUTT