Because it's the month of May, may we tempt you with the first Snapshot for Java Edition 1.21? This one looks as excellent as it sounds, thanks to the 20 new paintings and 3 new music discs it adds to the game. And we're not stopping there, data-driven enchantments are also being thrown into the fray with this Snapshot (hence the 900+ line changelog). We also included a batch of new bug fixes for good measure.
Happy mining!
featherfall
deeper
eld_unknown
endless
pokopoko
featherfall
komorebi
puzzlebox
watcher
yakusoku
baroque
humble
meditative
prairie_ride
unpacked
backyard
bouquet
cavebird
changing
cotan
fern
endboss
finding
lowmist
orb
owlemons
passage
pond
sunflowers
tides
update_1_21
feature flag and built-in datapack/give
, /item
, and /loot
commands now supports removal of default components with !
prefix/give @s diamond_pickaxe[!tool]
will give a Diamond Pickaxe without the tool
componentdata/<namespace>/painting_variant/<id>.json
width
- width of painting in blocks, between 1 and 16height
- height of painting in blocks, between 1 and 16asset_id
- id of sprite in paintings
atlasEnchantments are now set through data. An Enchantment is a set of core properties like level ranges and cost together with some effects. Most effect types also support a set of conditions, making it possible to apply them only when certain criteria are met.
Enchantments can be added in the registry enchantment
. All Vanilla Enchantments can be found in the vanilla datapack in the client and server jar files.
Fields:
description
: The name of the Enchantment when displayed in text represented as a Text Componentexclusive_set
: The Enchantment(s) this Enchantment is exclusive with#
supported_items
: The item types that can have this Enchantment#
primary_items
: The item types for which this Enchantment shows up in Enchanting Tables and on traded equipment#
supported_items
weight
: How commonly the Enchantment appears, compared to the total combined weight
of all available Enchantmentsmax_level
: The maximum level of the Enchantmentmin_cost
, max_cost
: describe the range of costs for this Enchantment in the Enchanting Table (and how much it returns when disenchanted)base
: Base cost at level 1per_level_above_first
: Added for each level over 1anvil_cost
: The fee taken for the Enchantment in the anvilslots
: A list of slot groups this Enchantment works inany
, hand
, mainhand
, offhand
, armor
, feet
, legs
, chest
, head
and body
effects
: A map of effect components, as described below in the Effect Components sectionMany effects of Enchantments depend on the level of the Enchantment. For these fields, a type called Level-Based Values is used. In their most basic form, Level-Based Values can be written as floating-point constants, which is interpreted as a value that isn't in fact level-based, the constant is used as-is for all levels.
If a Level-Based value is not a floating-point constant, it is an object with a type
field, specifying one of the following types.
The most common type of Level-Based Value is a linear
value. A linear
Level-Based Value has two fields:
base
: The base value added to all levelsper_level_above_first
: Amount added for each level above the first oneIn effect, a linear
Level-Based Value results in base + per_level_above_first * (level - 1)
.
A Level-Based Value type that clamps a value between a min and max. Fields:
value
: A Level-Based Value used as the inputmin
: A floating point value specifying the minimum value of the outputmax
: A floating point value specifying the maximum value of the outputA Level-Based Value type that represents the fraction between two values. Fields:
numerator
: A Level-Based Value used as the numeratordenominator
: A Level-Based Value used as the denominatorA Level-Based Value type that evaluates to the square of the levels, plus an addition. Fields:
added
: A floating-point value added to the result of the squared levelsIn effect, a levels_squared
Level-Based Value results in level ^ 2 + added
Value Effects are effects used to manipulate the amount of something in the game.
A Value Effect that adds a value to the processed results.
Fields:
value
: A Level-Based Value determining how much to addA Value Effect that runs a number of other Value Effects, in order. This can be useful when the same set of conditions apply to a number of Value Effects.
Fields:
effects
: A list of the Value Effects to runA Value Effect that multiplies the processed value by a given factor.
Fields:
factor
: A Level-Based Value determining the factor to multiply inA Value Effect that runs a Binomial series of checks, reducing the input value by 1 for every successful check.
Fields:
chance
: A Level-Based Value representing the chance that an input value is dropped.A Value Effect that overwrites the input value with a given Level-Based Value.
Fields:
value
: The Level-Based Value to use as the resultAttribute effects use the Attribute system to apply an Attribute Modifier whenever the Enchanted Item is correctly equipped. Attribute effects do not have a dynamic type - they are all the same type.
Fields:
name
: The name of the Attribute Modifier to addattribute
: The ID of the attribute to modifyoperation
: The operation of the Attribute Modifieradd_value
, add_multiplied_base
and add_multiplied_total
amount
: A Level-Based Value describing the amountuuid
: A string containing a UUID for the Attribute Modifier to useEntity Effects are Enchantment effects that generally do something to an Entity involved in an event. Which Entity is affected depends on the specific component being configured.
An Entity Effect that runs a list of other Entity Effects. This can be useful when a set of conditions should apply to more than one Entity Effect.
Fields:
effects
: List of Entity Effects to runAn Entity Effect that applies a random Mob Effect to the affected Entity, chosen from a set of options. The duration and amplifier are randomized within a given span. The effect of specifying larger maximum values than the minimum value is undefined.
Fields:
to_apply
: Options for the Effect to apply#
min_duration
, max_duration
: Level-Based Values representing the minimum and maximum duration of the effect in secondsmin_amplifier
, max_amplifier
: Level-Based Values representing the minimum and maximum amplifierAn Entity Effect that applies damage to the affected Entity. The amount of damage is randomized within a given span. The effect of specifying a larger maximum value than the minimum value is undefined.
Fields:
damage_type
: The ID of the Damage Type to usemin_damage
, max_damage
: Level-Based Values representing the minimum and maximum amount of damageAn Entity Effect that applies damage to the Enchanted Item.
Fields:
amount
: A Level-Based Value determining the amount of damage to applyAn Entity Effect that causes an explosion.
Fields:
attribute_to_user
: A boolean deciding whether the explosion should be attributed to the user of the enchanted tooldamage_type
: Optional damage type of the explosion - if omitted, no damage is dealt by the explosionimmune_blocks
: Optional Block, list of Blocks or hash-prefixed Block Tag specifying which blocks fully block the explosionknockback_multiplier
: A Level-Based Value deciding the knockback multiplier caused by the explosion - if omitted, the default explosion knockback is appliedoffset
: A position offset for where the explosion is spawnedradius
: A Level-Based Value representing the radius of the explosioncreate_fire
: A boolean for whether the explosion causes fire to be placed or notblock_interaction
: How the explosion interacts with blocks. One of:none
: No effectblock
: Act as if a block caused the explosion - the blockExplosionDropDecay
game rule applies to dropsmob
: Act as if a mob caused the explosion - the mobExplosionDropDecay
game rule applies to dropstnt
: Act as if TNT caused the explosion - the tntExplosionDropDecay
game rule applies to dropstrigger
: Trigger redstone-activated blockssmall_particle
: The small particle emitted by the explosionlarge_particle
: The large particle emitted by the explosionsound
: The sound event caused by the explosionAn Entity Effect that ignites the affected Entity for a given number of seconds.
Fields:
duration
: A Level-Based Value specifying the number of seconds the fire should lastAn Entity Effect that plays a sound.
Fields:
sound
: A Sound Event ID for the sound to playvolume
: A Float Provider between 0.00001
and 10.0
specifying the volume of the soundpitch
: A Float Provider between 0.00001
and 2.0
specifying the pitch of the soundAn Entity Effect that replaces a block in the world.
Fields:
block_state
: A block state provider giving the block state to setoffset
: A positional offset from the position of the event to where to place the blockpredicate
: A World-generation style Block Predicate to used to determine if the block should be replacedAn Entity Effect that replaces blocks in a disc / cylinder in the world.
Fields:
block_state
: A block state provider giving the block state to setradius
: A Level-Based Value describing the radius of the cylinderheight
: A Level-Based Value describing the height of the cylinderoffset
: A positional offset from the position of the event to the center of the cylinderpredicate
: A World-generation style Block Predicate to used to determine if the block should be replacedAn Entity Effect that runs a Command Function. The execution entity the effect is executing for is represented as @s
and ~ ~ ~
is the position of the event.
Fields:
function
: Namespaced ID of the Command Function to runAn Entity Effect that sets properties on a block
Fields:
properties
: map of property key to property value (same format as a minecraft:block_state
item component)offset
: A positional offset from the position of the event to the center of the cylinderAn Entity Effect that spawns particles around the affected Entity.
Fields:
particle
: A particle type definitionhorizontal_position
, vertical_position
: Decides where the particle spawns horizontally and vertically. Objects with fields:type
: Specifies the position selectiont type. One of:"entity_position"
: Spawn particles based on the entity position"in_bounding_box"
: Spawn particles based on randomized positions inside the bounding box of the entityoffset
: A floating point value specifying an offset to the position source0
if omittedscale
: A floating point value specifying a scaling factor"in_bounding_box"
1
if omittedhorizontal_velocity
, vertical_velocity
: Decides the initial velocity of the spawned particle. Object with fields:base
: A Float Provider giving the base speed along the given axis0
if omittedmovement_scale
: A floating point scale factor applied to the Entity speed along the given axis0
if omittedmovement_scale
of 1
adds the velocity of the Entity to the spawned particlesAn Entity Effect that summons a new Entity, randomly chosen from a set of Entity Types, at the site of the event.
Fields:
entity
: The options for the Entity Type to summon#
join_team
: Boolean that specifies whether the summoned Entity should join the team of the owner of the Enchanted ItemLocation-Based Effects are special effects that activate and deactivate depending on where the owner of the Enchanted Item moves. Location-Based Effect only trigger when such items are initially equipped and subsequently when the owning Entity moves to a new space in the Block grid - i.e. when their coordinates change to a new integer value.
All Entity Effect types can also be used as Location-Based Effects, and in addition attribute
can be used to specify an Attribute Effect as a location-based effect.
Most Enchantment effects are filtered using Conditions (same types as in loot tables). This enables effects to be specific for different situations. Each Effect Component defines which parameters are available for the condition to evaluate - some parameters are available for all of these parameter sets, while some are specific to a certain set.
Each effect component specifies which parameters are available in the Effect Components list below.
this
, attacker
, direct_attacker
this
this
The effects
field in an Enchantment is a map of Effect Component type the Effect List data. Most Effect Components are lists, so any number of Effects can be added of any Component Type. The data for each effect generally involves having a specified condition context and Effect Type, but some Effects also deviate from this format.
In cases where the documentation specifies a Condition Context and Effect, the Component is a list. Each entry in the list has a field named effect
with the effect of the type used by the list. Entries can also optionally include a field named requirements
specifying the condition parameters, which are then evaluated with the documented context.
minecraft:armor_effectiveness
: Effects for changing the armor effectiveness of the target of an attackminecraft:attributes
: Unfiltered list of Attribute Effects.minecraft:ammo_use
: Effects for ammunition being used when drawing a projectile weapon (firing a Bow or loading a Crossbow)minecraft:block_experience
: Effects for the amount of experience that drops when mining a block with the Enchanted Itemminecraft:crossbow_charge_sounds
: Effect for changing the charging sounds of a Crossbowstart
: Optional sound event id for the start of chargingmid
: Optional sound event id for the middle of chargingend
: Optional sound event id for the end of chargingminecraft:crossbow_charge_time
: Effects for the charging time of a Crossbowminecraft:damage
: Effects for the amount of damage caused by an attackminecraft:damage_immunity
: Effects for complete damage immunityminecraft:damage_protection
: Effects for damage protectionminecraft:equipment_drops
: Effects for the chance of equipment dropping when a target is killed by the owner of the Enchanted Item0
and 1
of an equipped piece droppingenchanted
: A specifier for who needs to be enchanted for the effect to applyattacker
and victim
minecraft:fishing_luck_bonus
: Effects for the amount of luck given to a player fishingthis
is the player fishingminecraft:fishing_time_reduction
: Effects for reducing the time until a fish bites when fishingthis
is the player fishingminecraft:hit_block
: Effects applying after a weapon or tool hits a Blockthis
is the entity hitting the Blockthis
is the projectileminecraft:knockback
: Effects for the amount of knockback caused by an attackminecraft:item_damage
: Effects for the amount of durability lost when an item is damagedminecraft:location_changed
: Effects that take effect when an entity crosses into a new block positionminecraft:mob_experience
: Effects for the amount of experience that drops when killing a mob with the Enchanted Itemthis
is the killed Mobminecraft:post_attack
: Effects applying after an attack damages a targetenchanted
: A specifier for who needs to be enchanted for the effect to applyaffected
: A specifier for whom the effect is applied toattacker
, damaging_entity
and victim
attacker
is enchanted
, the ignite
effect is applied, and the affected
party is the victim
victim
is enchanted
, the damage_entity
effect is applied, and the affected
party is the attacker
minecraft:prevent_armor_change
: Effect for preventing the enchanted item from being unequipped from an armor slotminecraft:prevent_equipment_drop
: Effect for preventing the enchanted item from being dropped on owner deathminecraft:projectile_count
: Effects for the amount of projectiles drawn when using a projectile weaponthis
is the entity drawing the weaponminecraft:projectile_piercing
: Effects for the piercing count of projectiles fired from a projectile weapon, i.e. the number of targets it can hitminecraft:projectile_spread
: Effects for the spread of arrows from a projectile weapon firing multiple projectilesthis
is the Entity using the Weaponminecraft:projectile_spawned
: Effects applying after a projectile entity has been spawned when firing a projectile weaponthis
is the projectile Entityminecraft:repair_with_xp
: Effect for repairing the item with xp when picked up by the player - any effect present triggers the functiontool
is the item being repairedminecraft:smash_damage_per_block_fallen
: Effects for the amount of damage caused by a Mace's smash attackminecraft:tick
: Effects that apply every tick for correctly equipped Enchanted Itemsthis
is the owner of the Enchanted Itemminecraft:trident_return_acceleration
: Effects for the special acceleration value of a Trident that returns it to its ownerthis
the Trident Entityminecraft:trident_spin_attack_strength
: Effects for the strength of a Trident used as a spin attackthis
is the Player holding the Tridentminecraft:trident_sound
: Effect for changing the charging sounds of a Trident attackEnchantment Providers are new ways for the game to source Enchantments to use in various situations where Enchantments show up.
mob_spawn_equipment
: Enchantment provider for mobs that spawn with randomly Enchanted equipmentpillager_spawn_crossbow
: Enchantment provider for Pillagers that spawn with Enchanted Crossbowsraid/pillager_post_wave_3
: Enchantment provider applied as a buff on the Crossbow of Pillagers spawning as waves 4 and 5raid/pillager_post_wave_5
: Enchantment provider applied as a buff on the Crossbow of Pillagers spawning as waves above 5raid/vindicator
: Enchantment provider applied as a buff on the Axe of a Vindicator spawning as wave 1-5raid/vindicator_post_wave_5
: Enchantment provider applied as a buff on the Axe of a Vindicator spawning as waves above 5enderman_loot_drop
: An Enchantment provided used for the "fake tool" applied to the carried block of a killed EndermanAll Equipment-specific Enchantments in Villager trades in the Villager Trade Rebalance experiment are now sourced from Enchantment Providers.
These Enchantment Providers are only used when the Villager Trade Rebalance experiment is enabled and all have the following pattern:
trades/<biome>_<profession>_<equipment>_<level>
For example: trades/desert_armorer_helmet_4
and trades/taiga_armorer_chestplate_5
.
An Enchantment Provider which always provides the same Enchantment. The level of the Enchantment can be either constant or randomized.
Fields:
enchantment
: Namespaced ID of the Enchantmentlevel
: Int provider representing the level of the EnchantmentAn Enchantment Provider which gives one or more Enchantments from a set of options according to a given cost (similar to the cost value in the Enchantment Table).
Fields:
enchantments
: The set of Enchantments as either a single Enchantment, a list of Enchantments or hash-prefixed Enchantment Tagcost
: Int provider representing the cost to use for the Enchanting processenchantments_by_cost_with_difficulty
An Enchantment Provider which works like enchantments_by_cost
, but where the cost is calculated partially based on the local difficulty of the area where the event happens causing the Enchantments to be added.
The used cost is a minimum cost plus a uniformly randomized factor up to a base cost span multiplied with the special factor, which starts at 0
for local difficulty up to 2
, increases linearly up to 1
for local difficulty 4
and stays at a constant value of 1
for any difficulty above that.
Fields:
enchantments
: The set of Enchantments as either a single Enchantment, a list of Enchantments or hash-prefixed Enchantment Tagmin_cost
: Positive integer representing the minimum possible costmax_cost_span
: Non-negative integer representing the span of the cost randomization when the special factor is at its maximumcampfire
, split from in_fire
curse
: Enchantments that get listed in red in tooltips and cannot be removed by disenchantingprevents_bee_spawns_when_mining
: Enchantments that allow a tool to mine bee nests and hives with the bees still insideprevents_decorated_pot_shattering
: Enchantments that make a tool not shatter decorated potsprevents_ice_melting
: Enchantments that cause a tool to not break Ice into Waterprevents_infested_spawns
: Enchantments that allow a tool to break Infested blocks without causing the mob inside to spawnsmelts_loot
: Enchantments that cause loot drops to be smeltedtradeable
: Enchantments that show up on Books in Villager tradeson_traded_equipment
: Enchantments that show up on enchanted equipment in Villager tradesdouble_trade_price
: Enchantments that double the Emerald cost when tradedin_enchanting_table
: Enchantments that can show up in the Enchanting Tableon_mob_spawn_equipment
: Enchantments that can show up on equipment worn by randomly spawned Mobson_random_loot
: Enchantments that can show up on loot in loot chests found in the worldNew tags used by the Vanilla Enchantments to control which ones are mutually exclusive, all of which are found under the exclusive_set/
path.
armor
: Enchantments that cannot co-exist on Armor piecesboots
: Enchantments that cannot co-exist on Bootsbow
: Enchantments that cannot co-exist on Bowscrossbow
: Enchantments that cannot co-exist on Crossbowsdamage
: Damage-increasing Enchantments that cannot co-existmining
: Mining-related Enchantments that cannot co-exitriptide
: Enchantments that cannot co-exist with RiptideIn the experimental trade_rebalance
pack, each biome type has two tags:
trades/<biome>_common
: Contains Enchantments traded on the lower profession levelstrades/<biome>_special
: Contains Enchantments traded on the highest profession levelburn_from_stepping
: Damage types that represent burning damage from stepping on something - in particular, damage types counterd by the frost_walker
EnchantmentSome target entity names have been renamed to fit in a more generic context:
killer
is now called attacker
direct_killer
is now called direct_attacker
killer_player
is now called attacking_player
New condition, requires the "Enchantment Active" parameter to exist in the context, which currently means it only works in Enchantment conditions.
Fields:
active
: boolean determining whether the check should match for an active (true
) or inactive (false
)chance
field is now a Number Providerrandom_chance_with_enchanted_bonus
Renamed from random_chance_with_looting
. Field changes:
looting_multiplier
: field has been removedchance
: this is now a Level-Based Valuesenchantment
: new field containing the namespaced ID of the Enchantment which grants the bonus chanceRenamed from looting_enchant
. Now has a new field:
enchantment
: Namespaced ID of the Enchantment that increases yieldsenchantments
field is now called options
options
is now specified as one of an Enchantment, a list of Enchantments or an Enchantment Tag (prefixed with #
)only_compatible
: New optional boolean field - if true
, only allows enchantments that are compatible with the itemtrue
treasure
field has been removedoptions
is now specified as one of an Enchantment, a list of Enchantments or an Enchantment Tag (prefixed with #
)source
field have changed:killer
renamed to attacking_entity
killer_player
renamed to last_damage_player
A new number provider that sources values from the Enchantment Level parameter.
Fields:
amount
: A Level-Based Value giving a value based on the level of the Enchantmentenchantment
field has been removedenchantments
field, one of an Enchantment, a list of Enchantments or an Enchantment Tag (prefixed with #
)enchantments
field is specified, any enchantment matching levels
will succeed the testlevels
nor enchantments
fields are defined, the predicate will match an item that has any enchantmentNew possible fields:
is_on_ground
: Optional boolean - if provided, matches the "on ground" state of the entityis_flying
: Optional boolean - if provided, matches whether the entity is flying, including:New possible fields:
can_see_sky
: Optional boolean - if provided, matches exactly when the location has the maximum possible level of sky lightweather
: Optional enumerated value, matching the weather in the location's dimension. One of:clear
raining
thunder
New sub-predicate available as movement
in Entity Predicates. Possible fields:
x
, y
, z
: min
/max
limits for movement speed along a certain axis in blocks / secondspeed
: min
/max
limits for overall movement speed in blocks / secondhorizontal_speed
: min
/max
limits for the horizontal speed component of the Entity's movement in blocks / secondvertical_speed
: min
/max
limits for the vertical speed component of the Entity's movement in blocks / secondfall_distance
: min
/max
limits for the fall distance of the Entity in blocksNew Entity sub-predicate available as periodic_ticks
in Entity Predicates. Format: a positive integer.
This sub-predicate is true every n ticks of an Entity's lifetime.
Now also works on Players.
A factor to how long an Entity remains on fire after being ignited. A factor of 0
removes the entire burn time, a factor of 1
lets the Entity burn the default fire time - larger values increase the amount of time the entity remains on fire.
1
0
1024
generic.explosion_knockback_resistance
A factor to how much knockback an Entity takes from an Explosion. A factor of 1
removes the entire knockback, a factor of 0
means no knockback reduction.
0
0
1
Mining speed factor added to the speed of mining when using a tool that efficiently mines a block.
0
0
1024
How efficiently the entity can move through impeding terrain that slows down movement. A factor of 1
removes all movement penalty, a factor of 0
applies full movement penalty.
0
0
1
Factor to the chance an Entity has to not use up air when underwater. 0
has no effect, values over 0
are used in the following formula to determine the chance of using up air:
1 / (oxygen_bonus + 1)
0
0
1024
The movement speed factor when sneaking. A factor of 1
means sneaking is as fast as walking, a factor of 0
means unable to move while sneaking.
0.3
0
1
The mining speed factor when submerged. A factor of 1
means mining as fast submerged as on land, a factor of 0
means unable to mine while submerged. Note that this represents only the submersion factor itself, and other factors (such as not touching the ground) also apply.
0.2
0
20
How much of the base attack damage that gets transfered transfer to secondary targets in a sweep attack. This is additive to the base attack of the sweep damage itself of 1
. A value of 0
means none of the base attack damage is transferred (sweep damage is 1
). A value of 1
means all of the base attack damage is transferred (sweep damage is attack_damage + 1
)
0
0
1
generic.water_movement_efficiency
The movement speed factor when submerged. The higher, the more of the underwater movement penalty is mitigated. Note that this represents only the submersion factor itself, and other factors (such as not touching the ground) also apply.
0
0
1
New block predicate type that passes if the selected block is unobstructed (no Entities are in the space of the block).
Fields:
offset
: List of 3 int offset coordinates, specifying the offset from the origin position to test[0, 0, 0]
if unspecifiedArrow-like projectile data now contains a weapon
field containing an Item Stack representing the weapon the projectile was fired from. The following fields have been removed:
ShotFromCrossbow