Improved The Server TPS Debug Chart
- As before, it is accessible by pressing F3 + 2
- The bottom dark red section of the chart displays the time spent during the main logic of the server tick
- This is equivalent to the value displayed in the old chart
- The light brown section displays time spent running scheduled tasks
- The purple section displays time spent executing all other code during the tick
- The top light green (or yellow or red depending on lag) section displays time spent idling, waiting for next tick
- The min, avg, max aggregate values are based on the sum of the first 3 sections
- Server operators can now view the TPS debug chart while connected to their dedicated server
Chat
- Client chat state (on-screen messages and chat input history) is now preserved by client when entering and exiting configuration phase
- Message signature chain handling remains unchanged - going into configuration phase starts a new session
- If the client has a message delay configured, any pending messages will be delivered immediately before leaving the world
- The server can clear chat state by sending a reset_chat packet in configuration phase
Data Pack Versions 27 through 41
The Data Pack version used by the game is now 41. These are the changes compared to version 26, used in 1.20.4.
- Renamed scute item to turtle_scute
- Changed Item Stack data format, introducing Item Stack Components
- Added many new Attributes
- Added new loot functions
- Added new advancement predicates
- Added new tags
- Recipe results can now specify component data
- Added data-driven registries for Banner Patterns and Wolf Variants
- Particle representation in commands and area effect clouds has been changed
Item Data Format
We have made some large changes to how Item Stack-specific properties are stored and represented in this release, replacing the current NBT 'tag' with structured 'components'.
This change has been made in order to:
- Validate item properties at load time, enabling easier identification of invalid data in commands and data packs
- This should avoid any 'silent' breakages in commands specifying custom item data for any potential future format changes
- Continue to evolve the game to enable the creation of dynamic content
- Improve performance in cases where the game needs to frequently look up some property of an item (e.g. Armor Trims rendering every frame)
- We understand that this is a significant breaking change for many datapacks and custom maps which will require significant effort to upgrade
We do however believe that this builds critical foundations for future extensibility. We have taken care to ship these changes all at once, with the hope that this avoids future incremental changes requiring many small updates to packs.
The current NBT 'tag' has existed for quite some time, and we are aware that a lot of clever techniques have been developed with this for commands and data packs. Over the course of the snapshot series, we have hugely appreciated your feedback on these changes, allowing us to avoid (often undocumented) functionality being lost without suitable alternatives.
- Unstructured NBT data attached to stacks of items (tag field) has been replaced with structured 'components'
- This data is parsed and validated when the item is loaded
- This should improve performance in certain scenarios (e.g. Armor Trim rendering) when item data was frequently compared or requested and parsed
- Custom data can still be stored in the minecraft:custom_data component
- Item types (e.g. minecraft:stick) hold a set of default components on an item that individual item stacks can override
- The format of serialized items and items in data packs has been updated for consistency and to support components
- Item syntax in commands has been updated to support components
- When advanced tooltips are enabled (F3+H), the number of components will be displayed instead of number of tags
- Default component values for items are now listed in items.json generated in reports directory
- Block definitions are now added to blocks.json report (note: those definitions are not used yet and present only for informational purposes)
Migrated Item Stack Components
These are item stack components that replace existing functionality that was formerly specified in item NBT.All commands and data definitions will need to be upgraded to use these formats. Items in-world will however be automatically upgraded.
minecraft:custom_data
- Can be used for custom data storage on an item
- When upgrading a world, any non-game data in the item tag will be moved into here
- Format: object with any fields
- e.g. custom_data={some:'data'}
- Can be modified with the set_custom_data and copy_custom_data loot functions
minecraft:damage
- The amount of durability removed from an item
- If removed, the item will not be damageable
- Replaces Damage tag
- Format: non-negative integer
- For damageable items (with the max_damage component), has an implicit default value of: 0
- Can be modified with the set_damage loot function
minecraft:repair_cost
- The additional experience cost required to modify an item in an Anvil
- Replaces RepairCost tag
- Format: non-negative integer
- If not set, has an implicit default value of: 0
minecraft:unbreakable
- If set, the item will not lose any durability when used
- Replaces Unbreakable boolean tag
- Format: object with fields
- show_in_tooltip: boolean (default: true)
- If true, an 'Unbreakable' line will be included in the tooltip
- Replaces 3rd bit of HideFlags tag
- e.g. unbreakable={}, unbreakable={show_in_tooltip:false}
minecraft:enchantments
- Stores a list of enchantments and their levels on an item
- Replaces Enchantments tag
- Format: object with fields
- levels: object of enchantment (id string) to level (integer [0; 255])
- show_in_tooltip: boolean (default: true)
- If false, no enchantments will be shown in the item tooltip
- Replaces 1st bit of HideFlags tag
- e.g. enchantments={levels:{'minecraft:protection':2},show_in_tooltip:false}
- Alternatively, can be defined as an inline map of enchantment id to level
- e.g. enchantments={sharpness:1}
- If not set, has an implicit default value of: {levels:{}}
- Can be modified with the set_enchantments, enchant_randomly, and enchant_with_levels loot functions
minecraft:stored_enchantments
- Stores list of enchantments and their levels for an Enchanted Book
- Unlike minecraft:enchantments, the effects provided by enchantments do not apply from this component
- Replaces StoredEnchantments tag on Enchanted Books
- Format: same as minecraft:enchantments
- show_in_tooltip value replaces 6th bit of HideFlags tag
- On Enchanted Books, has an implicit default value of: {levels:{}}
minecraft:custom_name
- Custom name override for an item (as set by renaming with an Anvil)
- Replaces display.Name tag
- Format: JSON chat component string
- e.g. custom_name='{"text": "This item is renamed!", "color": "red"}'
- Can be modified with the set_name loot function
minecraft:lore
- Additional lines to include in an item's tooltip
- Replaces display.Lore tag
- Format: list of JSON chat component strings (max: 256 entries)
- e.g. lore=['{"text": "The cake is a lie!"}']
- If not set, has an implicit default value of: []
- Can be modified with the set_lore loot function
minecraft:can_break
- Controls which blocks a player in Adventure mode can break with this item
- Replaces CanDestroy tag
- These were previously stored as flat strings, but now use the more flexible block predicate format already used in loot tables and advancements
- Format: object with fields
- predicates: list of block predicates
- blocks: block, list of blocks, or hash-prefixed block tag
- nbt: block entity NBT to match
- state: map of state property key to values to match
- show_in_tooltip: boolean (default: true)
- Replaces 4th bit of HideFlags tag
- e.g. can_break={predicates:[{blocks:'minecraft:furnace',state:{facing:'north'}]}
- Alternatively, can be defined as a single block predicate
- e.g. can_break={blocks:'minecraft:stone'}
minecraft:can_place_on
- Controls which blocks a player in Adventure mode can place on with this item
- Replaces CanPlaceOn tag
- Format: object with fields
- predicates: list of block predicates
- Same as can_break.predicates
- show_in_tooltip: boolean (default: true)
- Replaces 5th bit of HideFlags tag
- e.g. can_place_on={predicates:[{blocks:'minecraft:furnace',state:{facing:'north'}]}
- Alternatively, can be defined as a single block predicate
- e.g. can_place_on={blocks:'minecraft:stone'}
minecraft:dyed_color
- Represents a color applied to a dyeable item (in the #minecraft:dyeable item tag)
- Replaces display.color tag
- Format: object with fields
- rgb: integer, RGB value
- show_in_tooltip: boolean (default: true)
- Replaces 7th bit of HideFlags tag
- e.g. dyed_color={rgb:16711680}
- Alternatively, can be defined as an inline integer RGB value
minecraft:attribute_modifiers
- Holds attribute modifiers applied to any item
- Replaces AttributeModifiers tag
- Format: object with fields (default: {modifiers:[]})
- modifiers: list of attribute modifiers
- type: attribute id
- slot: one of:
- any (default)
- hand: either in main or offhand (new)
- armor: any armor slot (new)
- mainhand
- offhand
- head
- chest
- legs
- feet
- body (new)
- Modifiers will only apply when the item is equipped in the specified slot
- Replaces Slot
- uuid: uuid, uniquely represents this modifier
- Only one modifier can exist with the same id
- Replaces UUID
- name: string, human-readable name
- amount: double, number of units to modify this attribute (controlled by operation)
- operation: one of:
- add_value (was 0): Adds amount to the attribute
- add_multiplied_base (was 1): Adds amount * base value to the attribute
- add_multiplied_total (was 2): Adds amount * total value (from all previous modifiers) to the attribute
- Replaces Operation with integer ids
- show_in_tooltip: boolean (default: true)
- Replaces 2nd bit of HideFlags tag
- e.g. attribute_modifiers={modifiers:[{type:'minecraft:generic.scale',uuid:[1,2,3,4],name:'Big!',amount:1.0,operation:'add_multiplied_base'}]}
- Alternatively, can be defined as a direct list of modifiers
- e.g. attribute_modifiers=[{type:'generic.scale',uuid:[1,2,3,4],name:'Big!',amount:1.0,operation:'add_multiplied_base'}]
- If not set, has an implicit default value based on the item type's default attributes (e.g. attack damage for weapons)
- Can be modified with the set_attributes loot function
minecraft:charged_projectiles
- Holds all projectiles that have been loaded into a Crossbow
- If not present, the Crossbow is not charged
- Replaces Charged and ChargedProjectiles tags
- Format: list of item stacks
- Cannot store empty/air items
- e.g. charged_projectiles=[{id:'minecraft:arrow'}]
- No longer restricted to 3 entries
- Can be modified with the modify_contents and set_contents loot functions
minecraft:intangible_projectile
- Marks that a projectile item would be intangible when fired (i.e. can only be picked up by a creative mode player)
- Only set when items are inside a Crossbow's charged_projectiles component
- Format: empty object
- e.g. intangible_projectile={}
minecraft:bundle_contents
- Holds all items stored inside of a Bundle
- If removed, items cannot be added to the Bundle
- Replaces Items tag
- Format: list of item stacks
- Cannot store empty/air items
- e.g. bundle_contents=[{id:'minecraft:poisonous_potato'}]
- On Bundles, has an implicit default value of: []
- Can be modified with the modify_contents and set_contents loot functions
minecraft:map_color
- Represents the tint of the decorations on the Filled Map item
- Replaces display.MapColor tag
- Format: integer, RGB value
- On Filled Maps, has an implicit default value of: 4603950
minecraft:map_decorations
- Holds a list of markers to be placed on a Filled Map (used for Explorer Maps)
- Replaces Decorations tag
- Format: map of unique decoration id to decorations
- type: one of:
- player (was 0)
- frame (was 1)
- red_marker (was 2)
- blue_marker (was 3)
- target_x (was 4)
- target_point (was 5)
- player_off_map (was 6)
- player_off_limits (was 7)
- mansion (was 8)
- monument (was 9)
- banner_white (was 10)
- banner_orange (was 11)
- banner_magenta (was 12)
- banner_light_blue (was 13)
- banner_yellow (was 14)
- banner_lime (was 15)
- banner_pink (was 16)
- banner_gray (was 17)
- banner_light_gray (was 18)
- banner_cyan (was 19)
- banner_purple (was 20)
- banner_blue (was 21)
- banner_brown (was 22)
- banner_green (was 23)
- banner_red (was 24)
- banner_black (was 25)
- red_x (was 26)
- village_desert (was 27)
- village_plains (was 28)
- village_savanna (was 29)
- village_snowy (was 30)
- village_taiga (was 31)
- jungle_temple (was 32)
- swamp_hut (was 33)
- trial_chambers (new)
- Replaces type byte with numeric ids
- x: double, world coordinate
- z: double, world coordinate
- rotation: float, clockwise rotation from north in degrees
- e.g. map_decorations={'Some marker':{type:'target_x',x:123.0,z:-45.0,rotation:0.0f}}
- On Filled Maps, has an implicit default value of: {}
minecraft:map_id
- References the shared map state holding map contents and markers for a Filled Map
- Replaces map tag
- Format: integer id
minecraft:custom_model_data
- Can be used to replace the models of items by selecting for the minecraft:custom_model_data property in the item model
- Replaces CustomModelData tag
- Format: integer value
- e.g. custom_model_data=43
- Can be modified with the set_custom_model_data loot function
minecraft:potion_contents
- Holds the contents of a potion (Potion, Splash Potion, Lingering Potion), or potion applied to an item (Tipped Arrow)
- Replaces Potion, CustomPotionColor, and custom_potion_effects tags
- Format: object with fields
- potion: potion id (optional)
- The potion type in this item: the item will inherit all effects from this
- custom_color: integer, RGB value (optional)
- Overrides the visual color of the potion
- custom_effects: list of effect instances (default: [])
- Additional list of custom effects that this item should apply, that may not be representable by an existing potion
- e.g. potion_contents={potion:'minecraft:invisibility',custom_color:16711680}
- Alternatively, can be defined as a single potion ID
- e.g. potion_contents="invisibility"
- On Potion or Tipped Arrow items, has an implicit default value of: {}
- Can be modified with the set_potion loot function
minecraft:writable_book_content
- Holds the contents in a Book and Quill
- Replaces pages and filtered_pages tags
- The pages list objects directly, with {raw:'...'} wrapping
- filtered_pages are pulled by index keys into the relevant page entry under the filtered field
- Format: object with fields
- pages: list (max: 100 entries) of either:
- object with fields
- raw: string, page plain text contents
- filtered: string, filtered page contents (optional)
- If specified, players with chat filter enabled will see this page instead of raw
- or: string, page plain text contents
- e.g. writable_book_content={pages:['Hello world!']} or writable_book_content={pages:[{raw:'Hello world!'}]}
- On Book and Quill, has an implicit default value of: {pages:[]}
- Can be modified with the set_writable_book_pages loot function
minecraft:written_book_content
- Holds the contents and metadata of a Written Book
- Replaces pages, filtered_pages, title, filtered_title, author, generation, and resolved tags
- Format: object with fields
- pages: list of filtered chat components
- Same format as writable_book_contents pages, except uses JSON chat component strings which can be formatted
- title: filtered string (same format as pages)
- author: string, player name
- generation: integer [0; 3]
- The number of times this book has been copied (0 = original)
- resolved: boolean
- true if the chat components in this book have already been resolved (entity selectors, scores substituted)
- If false, it will be resolved when opened by a player
- e.g. written_book_content={pages:['"Hello world!"'],title:{raw:'"A delightful read"'},author:'Herobrine',generation:1,resolved:true}
- Can be modified with the set_written_book_pages and set_book_cover loot functions
minecraft:trim
- Holds the trims applied to an item
- Presence of the component is no longer restricted by the #minecraft:trimmable_armor item tag (although, this tag is still used for recipes)
- Replaces Trim tag of the same format
- Format: object with fields
- pattern: pattern id (or inline pattern)
- material: material id (or inline material)
- show_in_tooltip: boolean (default: true)
- Replaces 8th bit of HideFlags tag
- e.g. trim={pattern:'minecraft:silence',material:'minecraft:redstone'}
minecraft:suspicious_stew
- Holds the effects that will be applied when consuming Suspicious Stew
- Replaces effects tag of the same format
- Format: list of effect objects with fields
- id: effect id
- duration: integer, tick count (default: 160)
- e.g. suspicious_stew=[{id:'minecraft:poison'}]
- On Suspicious Stew, has an implicit default value of: []
- Can be modified with the set_stew_effect loot function
minecraft:hide_additional_tooltip
- If present, disables 'additional' tooltip part which comes from the item type
- Replaces 6th bit of HideFlags tag
- Format: empty object
- e.g. hide_additional_tooltip={}
minecraft:debug_stick_state
- Stores the selected block state properties used by a Debug Stick
- Replaces DebugProperty tag
- Format: map of block id to block property name
- e.g. debug_stick_state={'minecraft:turtle_egg':'eggs','minecraft:furnace':'facing'}
- On Debug Stick, has an implicit default value of: {}
minecraft:entity_data
- Stores unstructured NBT data to apply to an entity when using an item that spawns an entity, such as a Spawn Egg or Armor Stand
- Replaces previous EntityTag tag, with same behavior
- Format: object with fields
- Must contain an id field with the entity type
- Any additional fields will be merged into the entity when spawned
- e.g. entity_data={id:'minecraft:pig',Health:1.0f}
minecraft:bucket_entity_data
- Stores unstructured NBT data to apply to an entity when placed from a bucket
- Replaces NoAI, Silent, NoGravity, Glowing, Invulnerable, Health, Age, Variant, HuntingCooldown, and BucketVariantTag tags
- Format: object with fields
- Can contain any of the above listed fields, which will be applied to the entity when placed
- e.g. bucket_entity_data={NoAI:1,Age:43}
- On bucketed mob items, has an implicit default value of: {}
minecraft:instrument
- Holds the instrument type used by a Goat Horn
- Replaces instrument tag of same format
- Format: instrument id
- e.g. instrument='minecraft:ponder_goat_horn'
- Can be modified with the set_instrument loot function
minecraft:recipes
- List of recipes that should be unlocked when using the Knowledge Book item
- Replaces Recipes tag of same format
- Format: list of recipe ids
- e.g. recipes=['minecraft:acacia_boat','minecraft:anvil']
- On Knowledge Book, has an implicit default value of: []
minecraft:lodestone_tracker
- If present, specifies that the Compass is a Lodestone Compass
- Replaces LodestonePos, LodestoneDimension, and LodestoneTracked tags
- Format: object with fields
- target: object with fields (optional)
- pos: integer array of x, y, and z
- dimension: dimension id
- If not present, the compass will spin
- tracked: boolean (default: true)
- If true, when the Lodestone at the target position is removed, the target field will be removed
- e.g. lodestone_tracker={target:{pos:[13,64,-43],dimension:'minecraft:the_nether'}}
minecraft:firework_explosion
- Stores the explosion crafted in a Firework Star
- Replaces Explosion.Type, Explosion.Colors, Explosion.FadeColors, Explosion.Trail, and Explosion.Flicker tags
- Format: object with fields
- shape: one of
- small_ball (was 0)
- large_ball (was 1)
- star (was 2)
- creeper (was 3)
- burst (was 4)
- Replaces Type numeric ids
- colors: integer array, RGB values (default: [])
- List of initial particle colors, randomly selected from
- fade_colors: integer array, RGB values (default: [])
- List of particle colors to fade to, randomly selected from
- has_trail: boolean (default: false)
- has_twinkle: boolean (default: false)
- e.g. firework_explosion={shape:'large_ball',colors:[16711680],has_trail:true}
- Can be modified with the set_firework_explosion loot function
minecraft:fireworks
- Stores all explosions crafted into a Firework Rocket, as well as flight duration
- Replaces Fireworks.Explosions and Fireworks.Flight tags
- Format: object with fields
- explosions: list of explosions (max: 256 entries)
- Same format as minecraft:firework_explosion component
- flight_duration: unsigned byte, number of gunpowder in this rocket
- e.g. fireworks={explosions:[{shape:'large_ball',colors:[16711680],has_trail:true}],flight_duration:2}
- On Firework Rocket, has an implicit default value of: {explosions:[],flight_duration:1}
- Can be modified with the set_fireworks loot function
minecraft:profile
- Controls the skin displayed on a Player Head
- Copied to Player Head block when placed
- Replaces SkullOwner tag
- If only a name is specified, it will be resolved into the corresponding player ID and skin data
- Unlike SkullOwner which only supported resolution by name, if only id is specified, the profile and skin will be resolved from this UUID
- Format: object with fields
- name: string, player profile name (optional)
- Must be a valid player name (max 16 characters, no spaces, or special characters)
- As this could exist in previous data formats, but would not resolve to a skin, this is replaced by the item_name component which is persisted when placed and broken
- id: uuid, player profile id (optional)
- properties: list of properties (optional)
- name: string, property name (e.g. textures)
- value: string (base64 encoded texture data)
- signature: string (optional)
- e.g. profile={name:'MHF_Sheep'}
- Alternatively, can be defined as a simple player profile name string
- Can be modified with the fill_player_head loot function
minecraft:note_block_sound
- Controls the sound played by a Player Head when placed on a Note Block
- Copied to Player Head block when placed
- Replaces BlockEntityTag.note_block_sound tag
- Format: sound event id
- e.g. note_block_sound='minecraft:ambient.cave'
minecraft:base_color
- Stores the base color for a Shield
- Replaces BlockEntityTag.Base tag
- Format: one of
- white (was 0)
- orange (was 1)
- magenta (was 2)
- light_blue (was 3)
- yellow (was 4)
- lime (was 5)
- pink (was 6)
- gray (was 7)
- light_gray (was 8)
- cyan (was 9)
- purple (was 10)
- blue (was 11)
- brown (was 12)
- green (was 13)
- red (was 14)
- black (was 15)
- e.g. base_color='magenta'
minecraft:banner_patterns
- Stores the additional patterns applied to a Banner or Shield
- Copied to Banner block when placed
- Replaces BlockEntityTag.Patterns tag
- Format: list of banner patterns
- pattern: banner pattern registry id
- Replaces short banner pattern code in Patterns[].Pattern
- color: dye color name
- Replaces integer dye color id in Patterns[].Color
- e.g. banner_patterns=[{pattern:'minecraft:stripe_top',color:'red'}]
- On Banners and Shields, has an implicit default value of: []
- Can be modified with the set_banner_pattern loot function
minecraft:pot_decorations
- Stores the Sherds applied to each side of a Decorated Pot
- Copied to Decorated Pot block when placed
- Replaces BlockEntityTag.sherds tag of same format
- Format: list of sherd item ids
- e.g. ['arms_up_pottery_sherd','angler_pottery_sherd','danger_pottery_sherd','shelter_pottery_sherd']
- On Decorated Pots, has an implicit default value of: ['minecraft:brick','minecraft:brick','minecraft:brick','minecraft:brick']
minecraft:container
- Holds the contents of container blocks (Chests, Shulker Boxes) in item form
- Copied into container block when placed
- Replaces BlockEntityTag.Items tag
- Format: list of slots
- slot: integer [0; 255], representing a slot in the container
- item: item stack
- e.g. container=[{slot:7,item:{id:'diamond_pickaxe',components:{'minecraft:unbreakable':{}}}}]
- On container blocks, has an implicit default value of: []
- Can be modified with the modify_contents and set_contents loot functions
minecraft:bees
- Holds the bees inside a Beehive or Bee Nest
- Copied to Beehive or Bee Nest block when placed
- Replaces BlockEntityTag.Bees tag
- Format: list of bees
- entity_data: map of string to string
- id: entity id
- The remainder tags merged into the Bee when spawned
- ticks_in_hive: integer
- min_ticks_in_hive: integer
- e.g: bees=[{entity_data:{id='minecraft:bee'},ticks_in_hive:3,min_ticks_in_hive:10}]
- On Beehive and Bee Nest, has an implicit default value of: []
minecraft:lock
- Holds the lock state of a container-like block
- An item with a custom name of the same value must be used to open this container
- Copied to container block when placed
- Replaces BlockEntityTag.Lock tag
- Format: string value, representing the key
minecraft:container_loot
- Holds the unresolved loot table and seed of a container-like block
- Copied to container block when placed
- Replaces BlockEntityTag.LootTable and BlockEntityTag.LootTableSeed tags
- Format: object with fields
- loot_table: loot table id
- seed: long, pseudorandom seed to resolve the loot table with (optional)
- If not specified, or 0, the seed will be picked randomly when the loot table is evaluated
- e.g. container_loot={loot_table:'minecraft:chests/buried_treasure',seed:123}
- Can be modified with the set_loot_table loot function
minecraft:block_entity_data
- Stores unstructured NBT data to apply to a block entity when placing a block such as a Chest or Furnace
- Replaces previous BlockEntityTag tag, with same behavior
- Any block entity data moved into a dedicated item component is removed from this tag
- For Command Blocks, Lecterns, Signs, and Spawners: this tag will not be copied unless the player is an operator
- Format: object with fields
- Must contain an id field with the block entity type
- Any additional fields will be merged into the block entity when placed
- e.g. block_entity_data={id:'minecraft:chest',Items:[{Slot:1,item:'minecraft:diamond'}]}
minecraft:block_state
- Holds block state properties to apply when placing a block
- Replaces BlockStateTag tag
- Format: map of property key to property value
- All property values, including integer and boolean types, must be represented as strings
- e.g: block_state={eggs:'10'}
New Item Stack Components
These are new components that did not exist in the previous item tag, and support new features and use-cases.
minecraft:enchantment_glint_override
- Overrides the enchantment glint effect on an item
- Can be used in the same way that an invalid Enchantments tag would previously behave to add a glint
- Format: boolean
- If true, an item without an enchantment glint will display a glint
- If false, an item with a glint will not display this glint (either from enchantments or intrinsic properties of the item)
- e.g: enchantment_glint_override=true
minecraft:food
- When present, this item will behave as if a food (can be eaten)
- Format: object with fields
- nutrition: non-negative integer, number of food points to restore when eaten
- saturation: float, amount of saturation to restore when eaten
- can_always_eat: boolean (default: false)
- If true, this food can be eaten even if not hungry
- eat_seconds: float (default: 1.6)
- The number of seconds that it takes to eat this food item
- effects: list of effects to apply when eaten (default: [])
- effect: effect instance (same format as custom_effects in minecraft:potion_contents component)
- probability: float between 0 and 1, chance for the effect to be applied (default: 1)
- e.g: food={nutrition:4,saturation:0.1}
- On food items, has an implicit default value for that food type
minecraft:max_stack_size
- Controls the maximum stacking size of this item
- Values greater than 1 are mutually exclusive with the max_damage component
- Format: integer between 1 and 99
- Has an implicit default value according to the item type (usually 64)
minecraft:max_damage
- Controls the maximum amount of damage than an item can take
- Mutually exclusive with the max_stack_size component greater than 1
- Requires that the damage component is also present on the item
- If not present, the item cannot be damaged
- Format: positive integer
- Has an implicit default value for damageable items
minecraft:tool
- Controls the behavior of the item as a tool
- Format: object with fields
- rules: list of rule entries to apply in order
- blocks: single block, list of blocks, or #-prefixed block tag to match
- speed (optional): float, overrides the mining speed if present and matched
- correct_for_drops (optional): boolean, overrides whether this tool is considered 'correct' if present and matched
- true will cause the block to mine at its most efficient speed, and drop items if the targeted block requires that
- default_mining_speed: float, mining speed to use if no rules match and override mining speed (default: 1.0)
- damage_per_block: non-negative int, amount of durability to remove each time a block is mined with this tool
- e.g. tool={rules:[{blocks:"#mineable/pickaxe",speed:4.0,correct_for_drops:true}]}
- Vanilla tool items will have an implicit default value based on their tier and tool type
minecraft:hide_tooltip
- If present, it will completely hide whole item tooltip (that includes item name)
- Tooltip will still be visible and searchable in creative mode
- Format: empty object
minecraft:item_name
- When present, replaces default item name with contained chat component
- Differences from custom_name:
- item_name can't be changed or removed in Anvil
- item_name is not styled with italics when displayed to player
- item_name does not show labels where applicable (for example: banner markers, names in item frames)
- Can be modified with the set_name loot function
minecraft:fire_resistant
- If present, this item will not burn in fire
- Format: empty object
- Has an implicit default value for fire-resistant items such as Netherite
minecraft:rarity
- Controls the color of the item name
- Format: enumerated value, one of:
- common (default): white name, or aqua when enchanted
- uncommon: yellow name, or aqua when enchanted
- rare: aqua name, or light purple when enchanted
- epic: light purple name
- e.g. rarity=rare
- Special items such as Golden Apples have an implicit default value
minecraft:ominous_bottle_amplifier
- Controls the amplifier amount for an Ominous Bottle's Bad Omen effect
- Format: integer between 0 and 4
- e.g. ominous_bottle_amplifier=3
- Can be modified with the set_ominous_bottle_amplifier loot function
Saved Item Stack Format
- Along with format changes due to components, the structures of item stacks on disk and in data packs have been updated for consistency
- Previous id (string) and Count (byte) fields have been replaced with id (namespaced string) and count (integer) fields
- This format is additionally applied to the icon field in advancements, items in chat component hover events, and the result field in smelting recipes (result and count are no longer inlined)
- The count field is optional (defaults to 1 if not specified)
- The field will however always be stored by the game
- The tag field has been removed, and any remaining contents will end up in the minecraft:custom_data component when upgrading
- A new components field stores all components attached to an item
- Format: map of component id to component value (varies by component id)
- e.g. {..., components: {'minecraft:damage': 12}}
- Components with a ! prefix (e.g. "!minecraft:damage": {}) will cause this component to be removed
- Components equal to their default value on the target item will not be stored
- The item stack format no longer represents empty stacks (air item, or count 0)
- Instead, in places that support it, the field should be omitted
- In some cases, such as lists of stacks (e.g. HandItems in living entities), an empty map ({}) is used to represent empty stacks
Entity & Block Entity Data Formats
- Non-default components on item stacks are now stored when a block entity is placed from that item stack
- The storage format of block positions in entities and block entities has been updated
- Added body_armor_item and body_armor_drop_chance to all entities that currently have HandItems and ArmorItems, and handle the same way as HandItems and ArmorItems
- Handling of Horses ArmorItem, Llamas DecorItem, and Wolf's armor has been changed to use body_armor_item and body_armor_drop_chance instead
- Villager Trades can be configured to accept only undamaged items by selecting for 'minecraft:damage': 0
- By default, if no components are specified, any item will be accepted (similar to components field in item predicates)
- Potion effects stored in items or entities will no longer encode their default values
- amplifier: 0
- duration: 0
- ambient: false
- show_particles: true
- FactorCalculationData has been removed from mob effect instance tags
- Tipped Arrows no longer store their applied potion effects
- This is instead fetched from their held item
- Area Effect Clouds now store potions in the same format as the minecraft:potion_contents component in a potion_contents field:
- Potion -> potion_contents.potion
- Color -> potion_contents.custom_color
- effects -> potion_contents.custom_effects
- Banners now store applied patterns in the same format as the minecraft:banner_patterns component in a patterns field:
- Patterns[].Pattern (string short id) -> patterns[].pattern (string pattern registry id)
- Patterns[].Color (integer dye id) -> patterns[].color (string dye name)
- Beehive format has also been updated:
- Bees[].EntityData -> bees[].entity_data
- Bees[].TicksInHive -> bees[].ticks_in_hive
- Bees[].MinOccupationTicks -> bees[].min_ticks_in_hive
- FlowerPos -> flower_pos
- The SkullOwner and ExtraType fields in Player Head blocks have been replaced with a profile field, with the same format as the item component
- Player Head blocks now store a custom_name tag, which will be copied to and from the item form when broken or placed
- Added optional equipment field to the spawn data present in the SpawnPotentials of Monster Spawners and spawn_potentials of Trial Spawner configs
- If present, rolled items from the specified loot table will be equipped to the mob that spawns
- Format: object with fields
- loot_table - A loot table used to generate the equipment
- slot_drop_chances - An optional map of equipment slot to specified drop chance
- Can also be a single value instead of a list to apply to all slots: e.g. slot_drop_chances: 0.0f will apply a chance of 0% to all slots
- e.g. equipment: {loot_table: "minecraft:equipment/trial_chamber", slot_drop_chances: {"head": 0.0f, "chest": 0.25f, "legs": 1.0f, "feet": 0.25f}}
Components on Block Entities
Non-default components on item stacks containing block items are now stored on block entities when placed.
- Component removals from defaults are currently not preserved
- Placing and breaking non-block entity blocks remains unchanged - nothing is preserved
- Does not automatically cause preserved components to be restored on drops - this requires addition of copy_components function to loot table
- Components are stored in field called components
- Some components (like custom_name) are still handled by legacy serialization, which means they might not be present in there
- Contains map of component id to component value
Block Positions
- All block positions are now stored as an array of 3 integers instead of a map of X, Y, and Z for consistency
- FlowerPos and HivePos in Bees have been renamed to flower_pos and hive_pos
- FlowerPos in Beehives has been renamed to flower_pos
- BeamTarget in End Crystals has been renamed to beam_target
- Leash in all leashable entities has been renamed to leash
- PatrolTarget in patrolling mobs has been renamed to patrol_target
- ExitPortal in End Gateways has been renamed to exit_portal
- WanderTarget in Wandering Traders has been renamed to wander_target
Vault Block Entity
- Added Vault block (experimental) with a variety of NBT elements which can be configured for custom content:
- Fields:
- config
- loot_table - The loot table that will be ejected upon being unlocked
- Default value: "minecraft:chests/trial_chambers/reward"
- activation_range - The range any player who hasn't unlocked the Vault must be within for it to open its keyhole
- deactivation_range - The range all viable players must be outside of for the Vault to close its keyhole
- key_item - An Item Stack that is required to unlock the Vault
- The player must be holding an item with the exact components and count
- If the field is not present, the Vault cannot be unlocked
- override_loot_table_to_display - An optional loot table which will be used for displaying items inside the cage instead of results from the config's loot_table
- shared_data
- connected_particles_range - The range players who have not unlocked the Vault must be within before particles will flow from them
Commands
- Updated syntax of items and item predicates in commands
- Added slot names for ranges, like container.*
- playsound command can now be used without specifying the player (assuming @s) and without specifying the mixer (assuming master)
- Command arguments that previously accepted namespaced ids of loot tables, modifiers and predicates can now also accept inline definitions
- Added execute if|unless items to check and count items
- Potion effect amplifiers are now restricted between 0 and 255
- The former behavior of effects such as Jump Boost, Levitation, and Mining Fatigue over 127 has been replaced with new attributes
- Added the transfer command
- The maximum length of a command in a function (including macro expansions) can no longer exceed 2,000,000 characters
Item Syntax
- Commands such as /give, /item, /loot use an updated item syntax
- Components can now be specified after the item name in square brackets
- Components are assigned with an = (e.g. wooden_pickaxe[damage=23])
- Components are comma-separated (e.g. netherite_hoe[damage=5,repair_cost=2])
- Component types will be autocompleted, but possible values of them will not
- Values will however be validated, and the command will fail to parse if the component is improperly specified
- e.g. /give @s wooden_pickaxe[damage=-34] is not valid
- The previous NBT syntax ({...}) has been removed, and replaced with custom_data assignment
- e.g. /give @s stick{foo:'bar'} becomes /give @s stick[custom_data={foo:'bar'}]
- Modifier operations in the /attribute command have been renamed:
- add -> add_value
- multiply_base -> add_multiplied_base
- multiply -> add_multiplied_total
Added execute if|unless items
- execute if|unless items <source> <slots> <item_predicate> command can be used to count items
- <source> is the same as one used in item command, i.e.
- block <x> <y> <z>
- entity <target> (selector can return multiple entities)
- <slots> can accept single slot (like container.0) or a range (like container.*)
- <item_predicate> is the same as item predicate in clear command
- If used alone, it will return the total number of items in stacks that match predicates
Item Predicate Argument
The item predicate syntax (used in execute if|unless items and clear commands) has been significantly expanded.
- The general syntax is: <type> [comma-separated list of <test>]
- <type> can be one of:
- item id
- item tag id prefixed with #
- * to match any item
- <test> can have one of 3 forms:
- <component_id>=<value> - match exact value of component
- <value> is a representation of component value in SNBT format (same as in item give argument)
- Every specified component must be present on the target item, and have an exactly equal parsed value
- Components with defaults (e.g. damage=0 by default) will be assumed to exist on the target item if not specified
- As such, /clear @s diamond_pickaxe[damage=0] will match only undamaged Diamond Pickaxes
- On the other hand, /clear @s diamond_pickaxe will match any Diamond Pickaxe, irrespective of damage
- Exact matching of component values applies even for the minecraft:custom_data component
- <component_id> - check if component exists
- <predicate_id>~<value> - check item sub-predicate
- <value> is a representation of item sub-predicate in SNBT format (but otherwise the same as those used for advancement and loot table JSON files)
- Example: *[damage~{durability:{min:3}}] will match any stack with at least 3 uses left
- The special name minecraft:count can be used for matching the stack size
- count=<positive int> will pass only when the stack size equals the given value
- count~<int range> will pass when the stack size is in the specified range
- Example: *[count~{max:2}] will match any stack with count <= 2
- count will always pass
- Any <test> entry can be negated by prefixing with !
- Example: *[!count=1] will match any stack that has count other than 1
- <test> elements can be also joined with | to check multiple alternatives
- Example: *[!damage|damage=0] will look for items without damage component or with 0 damage
- The syntax for NBT partial matching with custom data ({}) has been replaced by the custom_data predicate
- So stick{a:2} becomes stick[custom_data~{a:2}]
- This predicate uses the pre-existing NBT partial match behavior
- This requires that all tags specified in the predicate are present on the target item, but additional ones may be ignored
- Lists in the target must contain all items specified in the predicate, but additional may be present and order is ignored
Slot names
- Slot names (used in item commands and slots entity predicates) now include slot ranges
- Unless specified, existing commands can still only work on single slots
- Added new slot ranges:
- container.* - contains container.0 to container.53
- hotbar.* - contains hotbar.0 to hotbar.8
- inventory.* - contains inventory.0 to inventory.26
- enderchest.* - contains enderchest.0 to enderchest.26
- villager.* - contains villager.0 to villager.7
- horse.* - contains horse.0 to horse.14
- weapon.* - contains weapon.mainhand and weapon.offhand
- armor.* - contains armor.head, armor.chest, armor.legs, armor.feet, armor.body
- Added new slot names:
- player.cursor - item held by player on screen
- Note: this information cannot be read in creative mode
- player.crafting.0 - player.crafting.3, player.crafting.* - player's crafting slots
- Note: this includes only player's inventory crafting slots. Crafting table (or any other slots on other screens) are not included
- contents - for single-slot entities like item frames, item displays, or dropped item entities
- Replaced horse.armor slot name with armor.body, which is applicable to all mobs
Inline loot values
Arguments in the following commands that previously accepted namespaced ids of loot tables, modifiers and predicates can now also accept inline definitions:
- loot
- item
- execute if predicate
Values have the same structure as matching JSON files, though they are encoded as SNBT.Example:
execute if predicate {condition:weather_check, raining:true}
transfer Command
New command that triggers a transfer of a player to another server. Only exists on dedicated servers.
Syntax:
transfer <hostname> [<port>] [<players>]
Parameters:
- hostname: String describing the hostname of the server to connect to
- port: Integer denoting the port number of the server to connect to - if omitted, 25565 is used
- players: The players to transfer - if omitted, @s is used
Predicate Formats in Loot Tables & Advancements
- Block predicate format has been updated:
- tag field has been removed
- blocks field now supports a single entry, hash-prefixed block tag, or list of blocks
- Fluid predicate format has been updated:
- tag field has been removed
- fluid -> fluids, and supports a single entry, hash-prefixed fluid tag, or list of fluids
- Location predicate format has been updated:
- biome -> biomes, and supports a single entry, hash-prefixed biome tag, or list of biomes
- structure -> structures, and supports a single entry, hash-prefixed structure tag, or list of structures
- Major changes to Entity and Item predicates
Entity Predicates
- Entity predicate format has been updated:
- type field now supports a single entry, hash-prefixed entity type tag, or list of entity types
- Added new entity predicate field slots, for matching item slots
- The equipment field format has been updated
- Added a new body field to match the item in the body armor slot of an entity
- Removed any entity type-specific predicate (which had no effect)
slots entity predicate field
- The new entity field slots allows checking a single or multiple slots on any entity
- The field contains a map of slot names (same as those used in item commands) to item predicates
- For slot ranges, only one slot needs to match for the whole entry to pass
Example:
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"slots": {
"container.*": {
"items": "dirt"
}
}
}
}
wolf type-specific entity predicate
- New wolf sub-predicate has been added to match Wolf variants
- Fields:
- variant - Wolf variant to match (single entry, list of entries or tag)
raider type-specific entity predicate
- New raider sub-predicate has been added to match raiders
- Fields:
- has_raid - Match whether the raider is in an active raid
- is_captain - Match whether the raider is a captain
cat, frog, painting type-specific entity predicate
- The variant field now accepts single entries, list of entries or tags
Item Predicates
Item predicate format has been updated:
- tag field has been removed
- items field now supports a single entry, hash-prefixed item tag, or list of items
- A new optional components field matches exact components
- All specified components must be present and exactly equal on the target item, but additional components may be ignored
- Components with defaults will be assumed to exist on the target item if not specified
- Format: map of component id to component value (varies by component id)
- e.g. "components": { "minecraft:damage": 0 } will match only undamaged items
- Component-specific item predicate properties have been moved to a separate field called predicates
Item Sub-predicates
- Some fields from item predicate have been moved to a map in an optional field predicates
- The new field is similar to the components field on item stacks
- This was done to simplify addition for future predicates and to allow sub-predicates to more closely resemble names of components they match
- The following fields have been moved:
- enchantments - field moved to sub-predicate minecraft:enchantments
- stored_enchantments - field moved to sub-predicate minecraft:stored_enchantments
- potion - field moved to sub-predicate minecraft:potion_contents
- Now supports a single potion entry, list of potions, or hash-prefixed potion tag
- custom_data - field moved to sub-predicate minecraft:custom_data
- durability field has been expanded to minecraft:damage predicate:
- This check now works for any item that has minecraft:damage component
- An item that does not have a minecraft:damage component can never match
- To check for unbreakable items, query value of minecraft:unbreakable component
- Fields:
- damage - optional bounds for value of minecraft:damage component
- durability - optional bounds for durability (max damage minus value of minecraft:damage)
- Predicates minecraft:enchantments, minecraft:stored_enchantments, minecraft:potion_contents and minecraft:damage require matching component to exist on item
- That means that, for example, matching for empty enchantment list will not pass on items without minecraft:damage component
- Note: some components, like minecraft:enchantments have default values, so they will always match
- These sub-predicates can also be referenced in commands such as /clear and /execute if|unless items
- The minecraft:custom_data predicate now accepts both SNBT data written as a string (existing format) and unflattened tags
- That means that *[custom_data~{a:1}] and *[custom_data~"{a:1}"] are equivalent
- Flattened string format has been kept since NBT type information can't be expressed in JSON
- Many new sub-predicates have been introduced
Example:
Before:
"item": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
After:
"item": {
"predicates": {
"minecraft:enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
General Rules of Component Predicates
- Unless otherwise specified, a field in predicate with the same name as a field in component that matches (i.e. has the same name as predicate) will match that field value
- Those fields will usually have the same type as in the components, but will be optional
- Exceptions:
- List fields will be replaced with collection matchers (see below)
- Integer and float fields will be replaced with ranges
- Registry ids will be replaced with a type that accepts id, list of ids or a tag
Collection Matcher
- A collection matcher is a shared part of predicates that is used for matching collections
- Every instance of this matcher will have the same fields with the same functionality, with the only difference being the type of matched element
- Fields:
- size - integer range to match against collection size
- contains - a list of element predicates
- All conditions must match for the predicate to pass
- Not all elements in the tested container have to be matched
- Elements can be in any order
- A single element can be matched by multiple predicates
- Examples (when matching item stacks):
- {contents:[{item:diamond}]} - will match when there is at least one diamond item
- {contents:[{item:diamond}, {item:dirt}]} - will match when there is at least one diamond item and at least one dirt item
- count - a list of matchers on element counts
- Entry fields:
- test - element matcher
- count - optional integer range to check against number of elements passing test
- Examples (when matching item stacks):
- {count:[{count:3,test:{items:diamond}}]}} will match only when there are exactly 3 stacks of diamonds (no matter the stack size)
container
- Matcher for container component (like Shulker Box)
- Fields:
- items - optional collection matcher
- Note: empty items are ignored. That means container~{items:{size:3}} will only pass if there are exactly 3 non-empty stacks in container
bundle_contents
- Matcher for bundle_contents component
- Fields:
- items - optional collection matcher
firework_explosion
- Matcher for firework_explosion component
- Fields
- shape - optional matcher for shape, same values as shape field in minecraft:firework_explosion component
- has_trail - optional boolean
- has_twinkle - optional boolean
fireworks
- Matcher for fireworks component
- Fields:
- explosions - optional collection matcher for firework_explosion predicates
- flight_duration - optional integer range check for flight duration
- Example: minecraft:fireworks~{explosions:{contains:[{shape:small_ball}]}}] - matches if firework has at least one explosion with small_ball shape
writable_book_content
- Matcher for writable_book_content component
- Fields
- pages - optional collection matcher for strings (matching only the unfiltered/raw contents of each page)
written_book_content
- Matcher for written_book_content component
- Fields
- pages - optional collection matcher for chat components (matching only the unfiltered/raw contents of each page)
- author - optional string value
- title - optional string value (matching only value)
- generation - optional integer range check for generation
- resolved - optional boolean
attribute_modifiers
- Matcher for attribute_modifiers component
- Fields:
- modifiers - optional collection matcher for following entries with following fields:
- attribute - optional id, list of ids or tag for attribute to be matched
- id - optional UUID
- name - optional string
- amount - optional double range check
- operation - optional operation type (same values as operation field from attribute_modifiers component)
- slot - optional applicable slot type (same values as slot field from attribute_modifiers component)
trim
- Matcher for trim component
- Fields:
- material - optional id, list of ids or tag for material to be matched
- pattern - optional id, list of ids or tag for pattern to be matched
Advancements
Changes to item_used_on_block
- This criteria trigger is now only triggered when a specific item is used successfully on a block (as opposed to any interaction with a block)
- For example, when using an Axe to scrape Oxidized Copper blocks would trigger, while using an Axe on a Crafting Table would not
Added default_block_use
- Triggers due to the default interaction of a block by a player, such as opening a door
Added any_block_use
- Triggers due to any type of interaction with a block by a player, such as using an item on the block or its default usage
Added crafter_recipe_crafted
- Triggered when a Crafter ejects a successfully crafted item into the world
- Fields (same format as recipe_crafted):
- player - an entity predicate matching nearby players in an 8 block radius
- recipe_id - the ID of the recipe being crafted
- ingredients - a list of item predicates matching the ingredients that form the recipe being crafted
Added fall_after_explosion
- Triggered when a player begins falling after being knocked upwards by an explosion or wind burst
- Fields:
- player - entity predicate matching the player who is falling
- start_position - location predicate matching the position the player was at when they were hit by the explosion or burst
- distance - distance predicate matching how far the player must be from start_position to cause the trigger to activate
- cause - entity predicate matching the entity that caused the explosion or burst to happen
Loot Tables
- Added gameplay/panda_sneeze loot table for drops when Pandas sneeze
- Loot table entry loot_table (which returns all items from provided nested loot table) now has the following syntax:
- value - can be either:
- namespaced id - reference to another named loot table
- full loot table (same format as in standalone file)
- Added new loot table type minecraft:equipment used for equipping items onto mobs
storage Number Provider
- This number provider can access numeric values from command storage directly
- If selected storage does not exist or tag selected by path is not numeric or does not exist, the provider returns 0
- Fields:
- storage - namespaced id of command storage
- path - NBT path to field
Modified Loot Functions
- Nested lists are no longer supported in function lists
set_contents
- The type field has been removed
- Added a new mandatory field component:
- Describes the target item stack component to be filled with items
- Any existing contents will be replaced
- Allowed values: container, bundle_contents, charged_projectiles
- bundle_contents and charged_projectiles will ignore empty stacks
set_custom_data (renamed from set_nbt)
- Now applies to the custom_data component of the target item
- The tag field now accepts both SNBT data written as a string (existing format) and unflattened tags
copy_custom_data (renamed from copy_nbt)
- Now applies to the custom_data component of the target item
set_name
- Added optional field target to specify which name should be set
- Values:
- custom_name - sets custom_name component (default)
- item_name - sets item_name component
set_attributes
- The modifier slot field now supports any, armor, hand, and body values
- The modifier operation values have been renamed:
- addition -> add_value
- multiply_base -> add_multiplied_base
- multiply_total -> add_multiplied_total
- Added replace field to the set_attributes loot function (default: true)
- When false, attributes will be appended
set_lore
- The replace field has been removed
- Now has mode like set_fireworks and set_written_book_pages
New Loot Functions
set_components
- Adds or replaces provided components on the target item
- Fields:
- conditions - optional list of conditions to filter this function
- components - map of component id to component value (format varied by id)
- Components with a ! prefix (e.g. "!minecraft:damage": {}) will cause this component to be removed
copy_components
- Copies components from a specified source onto an item
- This is now used in the Vanilla pack in place of the copy_name and copy_nbt functions
- Fields:
- conditions - optional list of conditions to filter this function
- source - source type to pull from
- Currently, can only and must be "block_entity"
- include - optional list of data components to be copied from source
- if omitted, all components present are included
- exclude - optional list of data components to be excluded from copying
- if omitted, defaults to empty
- Only components that are included (explicitly or implicitly) but not excluded will be copied
modify_contents
- Applies a modifier function to every item inside of a component
- If the component does not exist, it will not be added
- Fields:
- conditions - optional list of conditions to filter this function
- component - target component
- Allowed values: container, bundle_contents, charged_projectiles
- modifier - function or list of functions to be applied to every item inside container
set_item
- Replaces item type of item stack without changing its count and components
- Fields:
- conditions - optional list of conditions to filter this function
- item - new item type
filtered
- Applies a sub-function only to items that match item predicate
- Fields:
- conditions - optional list of conditions to filter this function
- item_filter - item predicate used to match items
- modifier - functions to apply to matching items
set_custom_model_data
- Sets the custom_model_data component on the target item according to a number provider
- Fields:
- conditions - optional list of conditions to filter this function
- value - integer number provider
set_ominous_bottle_amplifier
- Sets the ominous_bottle_amplifier component on the target item according to a number provider
- Fields:
- conditions - optional list of conditions to filter this function
- amplifier - a number provider used to generate the ominous_bottle_amplifier component
set_fireworks
- Sets the details of the minecraft:fireworks component
- Fields:
- conditions: optional list of conditions:
- Conditions to check before applying the function
- flight_duration: optional integer, 0-255:
- The flight duration measured in number of gunpowder
- If omitted, the flight duration of the item is left untouched - or set to 0 if the component did not exist before
- explosions: optional object with fields:
- values: List of firework_explosion data - same format as the explosion field in the minecraft:fireworks component:
- The explosion data to set
- mode: enumerated value deciding function for explosions:
- replace_all: fully replace the explosions list
- replace_section: replace a section of the explosions. Arguments:
- offset: optional non-negative integer:
- Start of replaced range
- If omitted, 0 is used
- size: optional non-negative integer:
- Size of range to be replaced in explosions
- If omitted, the size of explosions field is used
- insert: insert explosions, moving existing explosions to after the inserted section. Arguments:
- offset: optional non-negative integer:
- Index before which explosions will be inserted
- If omitted, 0 (before first explosion) is used
- append: append explosions at the end of the list
set_firework_explosion
- Sets the details of the minecraft:firework_explosion component
- Fields:
- conditions: optional list of conditions:
- Conditions to check before applying the function
- shape: optional Explosion Shape:
- The explosion shape to set
- If omitted, the original shape is kept (or small_ball is used if there was no component)
- colors: optional integer array, RGB values:
- List of initial particle colors to replace the ones on the existing explosion with
- If omitted, the original colors are kept (or [] is used if there was no component)
- fade_colors: optional integer array, RGB values:
- List of fade-to particle colors to replace the ones on the existing explosion with
- If omitted, the original colors are kept (or [] is used if there was no component)
- trail: optional boolean:
- Set whether the explosion should have a trail or not
- If omitted, the original has_trail value is kept (or false is used if there was no component)
- twinkle: optional boolean:
- Set whether the explosion should have a twinkle or not
- If omitted, the original has_twinkle value is kept (or false is used if there was no component)
set_book_cover
- Sets the cover details of the minecraft:written_book_content component
- If present, any pages in the book are left untouched
- Fields:
- conditions: optional list of conditions:
- Conditions to check before applying the function
- title: optional Filterable text (same format as title on the minecraft:written_book_content component):
- The title to set
- If omitted, the original title is kept (or an empty string is used if there was no component)
- author: optional string:
- The author to set
- If omitted, the original author is kept (or an empty string is used if there was no component)
- generation: optional integer [0; 3]:
- The generation value to set
- If omitted, the original generation is kept (or 0 is used if there was no component)
set_writable_book_pages
- Manipulates the pages of the minecraft:writable_book_content component
- Fields:
- conditions: list of conditions (default: []):
- Conditions to check before applying the function
- pages: list of Filterable strings (same format as pages on the minecraft:writable_book_content component):
- mode: enumerated value deciding function:
- replace_all: fully replace the book contents
- replace_section: replace a section of the book. Arguments:
- offset: optional non-negative integer:
- Start of replaced range
- If omitted, 0 is used
- size: optional non-negative integer:
- Size of range to be replaced in book
- If omitted, the size of pages field is used
- insert: insert pages, moving existing pages to after the inserted section. Arguments:
- offset: optional non-negative integer:
- Index before which pages will be inserted
- If omitted, 0 (before first page) is used
- append: append pages at the end of the book
set_written_book_pages
- Manipulates the pages of the minecraft:written_book_content component
- Same format as set_writable_book_content but the pages field contains filterable Chat Components instead of Strings
- Unlike the written_book_content component, pages stores a list of JSON objects instead of JSON in string form
- Any cover data is left untouched, and the page content components are set to resolve next time a player opens the book
toggle_tooltips
- This function can be used to modify item component tooltip visibility
- It works by setting fields like show_in_tooltip without changing other values
- Format:
- toggles - a map of supported item component type to boolean value
- Supported components: trim, dyed_color, enchantments, stored_enchantments, unbreakable, can_break, can_place_on, attribute_modifiers
- Example:
- {function:"toggle_tooltips","toggles":{"enchantments":false}} will hide enchantments tooltip
Recipes
- Recipe types crafting_shaped, crafting_shapeless, stonecutting and smithing_transform now accept components for the result item stack
- The result field for recipe types smelting, blasting, smoking and campfire_cooking is now an item stack format without a count, which means you'll need to specify an object with an id field
- This result now also accepts components data
Attributes
- Added generic.scale attribute that can be used to rescale any living entity (default: 1.0)
- Certain entities have special restrictions due to technical limitations:
- Shulkers can only be scaled up to 3x their normal size
- The Ender Dragon cannot be scaled
- Added player.block_interaction_range (default: 4.5) and player.entity_interaction_range (default: 3.0) attributes that control player reach distance
- Added generic.step_height attribute that defines the maximum number of blocks that an entity can step up without jumping (default: 0.6)
- Added generic.gravity attribute that controls blocks/tick^2 acceleration downward (default: -0.08)
- Added generic.safe_fall_distance attribute to control the fall distance after which the entity will take fall damage (default: 3.0)
- Added generic.fall_damage_multiplier attribute to multiply overall applied fall damage (default: 1.0)
- Renamed horse.jump_strength to generic.jump_strength, and now applies to all entities
- This controls the base impulse from a jump (before jump boost or modifier on block)
- Added player.block_break_speed attribute that acts as a multiplier over block breaking speed for players (default: `1.0)
Particles
Added the following particle types:
- vault_connection
- infested
- item_cobweb
- small_gust
- raid_omen
- trial_omen
- trial_spawner_detection_ominous
- ominous_spawning
Particle Representation
- Particle options in commands and in fields like Particles in Area Effect clouds now use the same representation as worldgen files (like existing biomes' ambient particle settings)
- For example, command /particle minecraft:dust 1.0 0.0 0.0 2.0 ... becomes /particle minecraft:dust{color:[1.0, 0.0, 0.0], scale:2.0} ...
- The syntax for particles without extra options (like minecraft:villager) remains unchanged
- Changes to block particles (minecraft:block, minecraft:block_marker, minecraft:falling_dust, minecraft:dust_pillar) options:
- Field value has been renamed to block_state
- Field block_state now also accepts plain block name to represent default block state
- Example transformations:
- minecraft:block minecraft:redstone_lamp[lit=true] -> minecraft:block{block_state: {Name: "minecraft:redstone_lamp", Properties: {lit: "true"}}}
- minecraft:block minecraft:diamond_block -> minecraft:block{block_state: "minecraft:diamond_block"}
- Changes to minecraft:item options:
- Field value has been renamed to item
- Field item now also accepts plain item name to represent item stack with default components
- count field is now ignored
- Example transformations:
- minecraft:item minecraft:dirt -> minecraft:item{item: {id: "minecraft:dirt"}}
- minecraft:item minecraft:dirt -> minecraft:item{item: "minecraft:dirt"}
- Changes to dust_color_transition options:
- The fromColor field has been renamed to from_color
- The toColor field has been renamed to to_color
- Example transformation: dust_color_transition 1.0 0.0 0.0 0.5 0.0 1.0 0.5 -> dust_color_transition{from_color: [1.0f, 0.0f, 0.0f], scale: 0.5f, to_color: [0.0f, 1.0f, 0.5f]}
- Added entity_effect options:
- Now accepts options to control the color of the particle
- Fields:
- color: packed integer ARGB color, or list of floats (0.0 to 1.0) representing RGBA color
Enchantments
- The minecraft:sweeping enchantment has been renamed to minecraft:sweeping_edge
- Projectile weapon Enchantments like infinity, multishot and piercing now work on both Crossbows and Bows, if placed onto the alternative weapon using data manipulation or a change to the enchantable/* tags)
Damage Types
- Llamas now use a new damage type spit instead of mob_projectile
Tags
Block Tags
- Added minecraft:does_not_block_hoppers for blocks that will never disable a Hopper when placed above one
- Added minecraft:blocks_wind_charge_explosions for blocks not impacted by the explosion when hit by Wind Charge
- Added minecraft:incorrect_for_wooden_tool, minecraft:incorrect_for_gold_tool, minecraft:incorrect_for_stone_tool, minecraft:incorrect_for_iron_tool, minecraft:incorrect_for_diamond_tool, minecraft:incorrect_for_netherite_tool
- These tags combine the existing needs_diamond_tool, needs_iron_tool, and needs_stone_tool tags for each specific tool tier
Item Tags
New item tags controlling what enchantments can be added to what gear:
- minecraft:enchantable/foot_armor
- minecraft:enchantable/leg_armor
- minecraft:enchantable/chest_armor
- minecraft:enchantable/head_armor
- minecraft:enchantable/armor
- minecraft:enchantable/weapon
- minecraft:enchantable/sword
- minecraft:enchantable/mining
- minecraft:enchantable/mining_loot
- minecraft:enchantable/fishing
- minecraft:enchantable/trident
- minecraft:enchantable/durability
- minecraft:enchantable/bow
- minecraft:enchantable/equippable
- minecraft:enchantable/crossbow
- minecraft:enchantable/vanishing
New item tags defining food and tempting items for various mobs:
- minecraft:armadillo_food
- minecraft:axolotl_food (renamed from minecraft:axolotl_tempt_items)
- minecraft:bee_food
- minecraft:camel_food
- minecraft:cat_food
- minecraft:chicken_food
- minecraft:cow_food
- minecraft:fox_food
- minecraft:frog_food
- minecraft:goat_food
- minecraft:hoglin_food
- minecraft:horse_food
- minecraft:horse_tempt_items
- minecraft:llama_food
- minecraft:llama_tempt_items
- minecraft:meat collection tag: not used by the game directly, but may be included in other tags
- minecraft:ocelot_food
- minecraft:panda_food
- minecraft:parrot_food
- minecraft:parrot_poisonous_food
- minecraft:pig_food
- minecraft:piglin_food
- minecraft:rabbit_food
- minecraft:sheep_food
- minecraft:strider_food
- minecraft:strider_tempt_items
- minecraft:turtle_food
- minecraft:wolf_food
Removed item tags:
- Removed tag minecraft:tools (overlapping with minecraft:breaks_decorated_pots)
Entity Type Tags
- Added minecraft:ignores_poison_and_regen for entities that cannot be affected by Poison and Regeneration effects
- Added minecraft:illager_friends for entities that Illagers will consider allies (unless on a different team)
- Added minecraft:immune_to_infested for entities that cannot receive the Infested mob effect
- Added minecraft:immune_to_oozing for entities that cannot receive the Oozing mob effect
- Added minecraft:inverted_healing_and_harm for entities that have inverted meanings of the Healing and Harm effects
- Added minecraft:not_scary_for_pufferfish for entities that will not cause Pufferfish to puff
- Added minecraft:redirectable_projectile for projectiles which should be able to be redirected and deflected toward the direction the player is looking
- Added minecraft:sensitive_to_bane_of_arthropods for entities sensitive to Bane of Arthropods
- Added minecraft:sensitive_to_impaling for entities sensitive to Impaling
- Added minecraft:sensitive_to_smite for entities that take extra damage from the Smite Enchantment
- Added minecraft:wither_friends for entities that the Wither will not target and which cannot harm the Wither
Damage Type Tags
- Added minecraft:bypasses_wolf_armor for damage sources that cannot be absorbed by Wolf Armor
- Added minecraft:is_player_attack for attacks performed by the player
Enchantment Tags
- Added minecraft:tooltip_order controlling which order Enchantments are listed in tooltips
Banner Patterns
Banner Patterns will now be loaded into a dynamic registry from data packs (data/<namespace>/banner_pattern/<id>)
- These entries have two fields:
- asset_id (namespaced string) is used to resolve texture locations
- e.g. custom:pattern resolves to assets/custom/textures/entity/banner/pattern.png, assets/custom/textures/entity/shield/pattern.png
- translation_key (string) is a translation key prefix
- e.g. block.minecraft.banner.custom.pattern resolves to block.minecraft.banner.custom.pattern.<dye color>
Wolf Variants
Wolf variants can be data-driven by adding entries to data/<namespace>/wolf_variant/<id>.json.
- Format: object with fields
- wild_texture - wild/untamed texture for this variant
- <namespace>:<path> resolves to assets/<namespace>/textures/<path>.png
- tame_texture - tamed texture for this variant
- angry_texture - to angry texture for this variant
- biome - a single entry, list or a tag describing biomes in which this variant naturally spawns
Worldgen Data Formats
- Added new terrain adaptation type for structures: encapsulate
- Density will be added all around every piece of a structure
- Ideal for structures that need to be entirely covered underground
- Int and float providers are no longer wrapped in an extra value field next to type
- For example, {"type":"minecraft:uniform","value":{"min_inclusive":0.0,"max_inclusive":1.0}} becomes {"type":"minecraft:uniform","min_inclusive":0.0,"max_inclusive":1.0}
Resource Pack Versions 23 through 32
The Resource Pack version is now 32. These are the changes compared to version 22, used in 1.20.4.
- Renamed scute textures and models to turtle_scute
- Added textures and models for new features
- Changes to fonts
- Changes to shaders
Models and Textures
- Added textures for Wolf variations
- Added files for Armadillo and Wolf Armor
- Added additional textures to support colored layers of Wolf Armor for the Wolf model and Wolf Armor item:
- textures/entity/wolf/wolf_armor_overlay.png
- textures/item/wolf_armor_overlay.png
- Added three semi-transparent textures for the cracks to show on the Wolf Armor layer:
- textures/entity/wolf/wolf_armor_crackiness_low.png
- textures/entity/wolf/wolf_armor_crackiness_medium.png
- textures/entity/wolf/wolf_armor_crackiness_high.png
- Added trial_chambers map decoration icon
- Added textures and model files for the following experimental blocks and items:
- Vault
- Ominous Vault
- Ominous Trial Spawner
- Ominous Bottle
- Added the following mob effect icon textures:
- bad_omen_121
- infested
- oozing
- raid_omen
- trial_omen
- weaving
- wind_charged
GUI
- The gui/options_background and the gui/light_dirt_background textures have been removed. Instead;
- Added gui/menu_background to be used as the background of screens, while gui/menu_list_background is used for the background of lists for menus accessed from the Title Screen
- Added gui/inworld_menu_background, gui/inworld_menu_list_background, gui/inworld_header_separator, gui/inworld_footer_separator textures for menus accessed from the Pause Menu
- Lists now use the gui/header_separator and gui/footer_separator textures at the top and bottom, respectively
- The following textures have been updated: gui/footer_separator, gui/header_separator
- The following sprites have been updated: widget/tab, widget/tab_highlighted, widget/tab_selected, widget/tab_selected_highlighted
- The widget/scroller_background sprite has been added
- The following textures in Realms have been removed: gui/sprites/backup/changes, gui/sprites/backup/changes_highlighted, gui/sprites/backup/restore, gui/sprites/backup/restore_highlighted, gui/sprites/player_list/make_operator_highlighted, gui/sprites/player_list/remove_operator_highlighted, gui/sprites/player_list/remove_player_highlighted
- Added gui/tab_header_background texture, which is rendered behind the tab buttons in the Create World Screen
- Added misc/credits_vignette texture, which is rendered behind the poem and the credits
- Split map decoration atlas into separate files
Map Decorations
- Map decoration icons have been split from the former map_icons.png to use an atlas loaded from the textures/map/decorations/ directory
- The process of upgrading your pack can be assisted by using this automated Slicer tool
Fonts
- The ttf font provider transforms have been adjusted to have more reasonable defaults
- shift is no longer applied double, and now directly represents a number of pixels in the game UI
- The font EM square is fitted to size pixels in the game UI, instead of between the font ascender and font descender
- The font baseline is positioned consistently with the default font (7 pixels below line top)
- This means that generally, any font with a size of 9 and no shift should look correct by default
- shift is now restricted to the range [-512; 512]
- Added font variant filters to font providers
Font Variant Filters
- Every glyph provider can now be enabled or disabled based on certain set of variants
- Available variants are currently hardcoded and controlled by the font options menu
- Current variants:
- uniform - wired to "Force Uniform" button
- jp - wired to "Japanese Glyph Variants" button
- Filters are defined in section called filter, available for every glyph provider
- Keys in that object are variant names (for example uniform)
- Glyph provider will be included only when value in filter matches actual value of variant in key
Shaders
- The unused attributes array in core shader definitions has been removed
- The unused position_color_normal and position_tex_lightmap_color shaders have been removed
- The position_tex_color_normal shader (only used by clouds) has been replaced with rendertype_clouds
- The IViewRotMat uniform has been removed, and the Position attribute for entities is now in (camera relative) world space
- Light direction uniforms are no longer premultiplied by the view matrix
- The blur post-processing shader has been renamed to box_blur
- Added optional boolean field use_linear_filter to post-processing passes which when set to true switches texture sampling mode from nearest-neighbor sampling to linear interpolation for that pass
- Added entity_outline_box_blur post-processing shader
Particles
Added the following particle types:
- infested
- item_cobweb
- ominous_spawning
- raid_omen
- small_gust
- trial_omen
- trial_spawner_detection_ominous
- vault_connection
Sound Events
Added the following sound events:
- block.cobweb.break
- block.cobweb.fall
- block.cobweb.hit
- block.cobweb.place
- block.cobweb.step
- block.trial_spawner.about_to_spawn_item
- block.trial_spawner.ambient_charged
- block.trial_spawner.charge_activate
- block.trial_spawner.spawn_item_begin
- block.trial_spawner.spawn_item
- event.mob_effect.bad_omen
- event.mob_effect.raid_omen
- event.mob_effect.trial_omen
- item.ominous_bottle.dispose
Comparte esta historia