Technical Changes
- The data pack version is now 12
- The resource pack version is now 13
- Added a group of entities to display items, blocks and text
- Added entities to detect interactions and attacks
- Added data-driven damage types
- Added a damage command for applying damage to entities
- Added ride command to mount and dismount entities
- The clone command now supports cloning to and from different dimensions
- A new string source is now available for the data modify command
- New execute sub-commands: if dimension, if loaded, on, positioned over, summon
- Added a new type of atlas configuration source: paletted_permutations
- Pressing F3+S will now dump contents of dynamic textures (like atlases, maps, etc.) to screenshots/debug/
- Added fallback fields to translate text components
- Out-of-bound arguments in translate formats are no longer silently ignored
- Added the following game events:
- entity_dismount with a vibration frequency of 6
- entity_mount with a vibration frequency of 7
- Changed the following game events:
- item_interact_finish now has a vibration frequency of 2 instead of 14
- Removed heldItemTooltips option from options.txt
- Added a network protocol feature for forcing bundle of packets to be processed within same client tick
- Added --pidFile argument to dedicated server command line for printing process id to file
- The vanilla resource pack en_us language file is now sorted alphanumerically by key
- Added show_notification field to recipes
- Accepts a boolean which determines if a notification is shown when unlocking this recipe
- defaults to true if isn't specified
- A new recipe type smithing_transform has been added for the updated Netherite Upgrade recipe
- A new recipe type smithing_trim has been added for the new Armor Trim recipe
- A new recipe type crafting_decorated_pot has been added for the new Decorated Pot recipe
- New registries trim_pattern and trim_material have been added for the armor trim system
- Smithing table has temporarily two menu types
- Old menu without Smithing Template slot has been renamed to legacy_smithing
- Will be removed when Armor Trim feature stops being an experimental feature
- New menu with Smithing Template slot was added called smithing
- Added new flag (value 128) to HideFlags NBT field for hiding armor trim item tooltips
Resource Pack format
- The enchantment glint now has two separate texture files: enchanted_glint_entity.png and enchanted_glint_item.png
- The texture format used to dynamically scale buttons and sliders has been updated to always include fixed 20px borders on the left and right
- Slider textures are now defined in a separate slider.png file
- The Create New World screen now uses a separate light_dirt_background.png for its background, unlike other screens
Commands
clone
The clone command now supports specifying the source and target dimensions.
New syntax:
clone [from <sourceDimension>] <begin> <end> [to <targetDimension>] <destination> ...
Parameters:
- sourceDimension: id of dimension to clone from
- targetDimension: id of dimension to clone to
damage
New command to apply damage to entities.
Syntax:
- damage <target> <amount> [<damageType>] [at <location>]
- damage <target> <amount> [<damageType>] [by <entity>] [from <cause>]
Parameters:
- target: The entity to damage
- amount: Amount of damage to inflict
- damageType: The type of damage to inflict
- This determines how the damage affects the entity as well as which death message is displayed
- entity: The entity inflicting the damage
- cause: The cause of the damage, in the case of indirect damage
- Example: When shot by an Arrow, the entity is the Arrow projectile while cause might be a Skeleton
- location: The location the damage originated at (when no entity caused the damage)
- For instance, location might represent the location of a Bed exploding in the Nether
data
New source available:
- string <entity|block|storage> [path] [start] [end] - reads a value as text, resulting in a string value
New arguments:
- start: Index of first character to include at the start of the string
- end: Index of the first character to exclude at the end of the string
effect
- infinite is now a valid option for effect durations
- Infinite effect durations show up as "∞" in the player inventory view
execute
execute if|unless
New conditions available for the execute if|unless sub-command:
- execute if|unless loaded <pos> - checks if the position given is fully loaded (in regard to both blocks and entities)
- execute if|unless dimension <dimension> - checks if the execution is in a matching dimension
Parameters:
- pos: Block position to check
- dimension: A dimension id
execute on
New execute sub-command for selecting entities based on relation to the current executing entity:
Relations:
- vehicle - the entity that the executing entity is riding
- passengers - all entities directly riding the executing entity (no sub-passengers)
- controller - the entity that is controlling the executing entity (for example: first passenger in a boat)
- owner - the owner of the executing entity, if it is a tameable animal (like cats, wolves or parrots)
- leasher - the entity leading the executing entity with a leash (might be a leash knot in case of being attached to a fence)
- target - the attack target for the executing entity
- attacker - the last entity that damaged the executing entity in the previous 5 seconds
- origin:
- shooter, if the executing entity is a projectile (like Arrow, Fireball, Trident, Firework, Thrown Potion, etc.)
- thrower, if the executing entity is an item
- source of effect, if the executing entity is an Area Effect Cloud
- igniter, if the executing entity is a Primed TNT
- summoner, if the executing entity is Evoker Fangs or a Vex
If the relation is not applicable to the executing entity or there are no entities matching it, the selector returns zero elements.
execute positioned over
New execute sub-command for finding positions on top of a heightmap. Changes the height of the execution position to be on top of the given heightmap.
Syntax:
- execute positioned over <heightmap>
Heightmaps
A heightmap records the highest position in a column of blocks according to some criteria. Available options:
- world_surface: Any non-air block
- motion_blocking: Any motion blocking material (e.g. ignores flowers and grass)
- motion_blocking_no_leaves: Any non-leaf motion blocking material
- ocean_floor: Any non-fluid motion blocking material
execute summon
New execute sub-command for summoning a new entity and binding the context (@s) to it. Meant to simplify entity setup and reduce the need for raw NBT editing.
Syntax:
- execute summon <entity id>
fillbiome
- The amount of network data transmitted when using the fillbiome command has been optimized
title
- All time arguments to title times are now time durations and work with t, s and d suffixes
weather
- The duration of the weather change now matches the game's regular weather cycle if not specified
- The duration parameter is now a time duration in ticks and works with t, s and d suffixes
- To retain existing functionality, you need to add an s suffix to pre-existing commands
ride
New command to allow entities to start or stop riding other entities.
Syntax:
- ride <target> mount <vehicle>
- Makes a single target mount a single vehicle
- The command will fail if:
- vehicle is a player
- target is already riding a vehicle
- target and vehicle are the same entity
- vehicle is already a passenger (direct or indirect) of target
- ride <target> dismount
- Dismounts target from any vehicle it is riding
- Fails if target is not riding anything
Damage Types
Damage Types are a new registry that can be extended through data packs. A Damage Type determines how damage is handledby the game. This includes which attributes the damage has as well as which death message is used when an entity diesdue to that type of damage.
Example:
{
"exhaustion": 0.1,
"message_id": "arrow",
"scaling": "when_caused_by_living_non_player"
}
Fields:
- message_id: The message id used for deaths caused by this damage type
- Will be combined with other string fragments to form a translation key
- exhaustion: The amount of hunger exhaustion caused by this damage type
- scaling: Whether this damage type scales with difficulty levels. Possible values:
- never: Damage is always the same
- always: Damage always scales with difficulty
- when_caused_by_living_non_player: Damage scales with difficulty if it was caused by a living entity who is not a player
- effects: Optional field controlling how damage manifests when inflicted on players. Possible values:
- hurt (default): the default hurt sound
- thorns: Thorns hurt sound
- drowning: Drowning sound
- burning: A single tick of burning sound
- poking: Berry bush poke sound
- freezing: Freeze tick sound
- death_message_type: Optional field that controls if special death message variants are used. Possible values:
- default (default): No special death message logic is applied
- fall_variants: Show a variant of fall damage death instead of a regular death message, e.g. death.fell.assist.item
- intentional_game_design: Show the intentional game design message instead of a regular death message
Damage type tags control many aspects of how damage from different sources are interpreted.
Predicates
Damage Type Predicates
The following fields have been removed from damage type predicates: is_projectile, is_explosion, bypasses_armor,bypasses_invulnerability, bypasses_magic, is_fire, is_magic, is_lightning.
A new tags array has been added, with the predicate matching if all entries match. Each entry has two fields:
- id: The ID of a damage type tag
- expected: Whether the damage is expected to have or not have the tag for the predicate to match
Game Rules
- Added commandModificationBlockLimit, controlling the maximum number of blocks changed in one execution of clone, fill and fillbiome
- Added doVinesSpread game rule, determining if vines will spread to nearby blocks
Text components
Added an optional fallback field to translate text components.
- The new field is a string that will be used in place of translation if it is missing
- If fallback is missing, the old behavior (i.e. using the key itself as the translation) is preserved
Display entities
Three new entities have been added for flexible display of items, blocks and text
- Those entities, similarily to marker, don't tick and have no collisions or physics
- Models render at entity position, with normal rotation around X and Y axis (so it can be controlled by teleport commands), but also with additional arbitrary model transform
Common data types
Tag contents for display entities include some new data types with a complex structure. Any form can be used for modifying data, but only one form is used for saving.
Transformations
Arbitrary affine transform.
- Matrix form: array of 16 numbers, describing row-major matrix
- Decomposed form (used for saving): object with following fields:
- translation - 3d vector
- left_rotation, right_rotation - rotation
- scale - 3d vector
- Transforms are composed in order translation, left_rotation, scale, right_rotation
Rotations
- Quaternion form (used for saving): array of 4 numbers, describing components (x, y, z, w)
- Axis-angle form: object with following fields:
- axis - unit 3d vector
- angle - in radians
Interpolation
Some properties of display entities can be interpolated. That means that clients will see gradual changes over time instead of instantaneous jumps.
Display entities keep track of current and previous values of interpolated values:
- All properties marked as "interpolated" are part of a single interpolation set
- Any update to interpolated property will cause all values of interpolation set to be saved as "current"
- Data command executions that do not change value of property (even if it's present in NBT) do not count as updates
- Updates are synchronized to clients at most once per tick, so multiple updates within command will still count as a single update
- The last values generated before an update are saved as "previous"
- If interpolation is enabled, the entity will transition between "previous" and "current" values over interpolation_duration ticks
- Interpolation can be started by writing to the start_interpolation field (this field is not normally present in NBT)
- The value in this field is a delay in ticks between client receiving the update and interpolation start
- A value of 0 ticks means that interpolation will start in next client tick after receiving the update
- Positive values increase this delay further
- Interpolation will end (entity fully in "current" state) in start_interpolation + interpolation_duration ticks after receiving the update
- The interpolation target can be updated without setting start_interpolation, but it will still behave as if it was started at the moment of the last update to start_interpolation
- That means that if the value is updated, but more than interpolation_duration ticks have passed since last start_interpolation update, the entity will immediately jump to new values
Common properties
All display entity types have the following fields:
- transformation - the transformation applied to model (after normal entity orientation). Defaults to identity. Interpolated
- billboard - option to control if entity should pivot to face player when rendered:
- fixed - no rotation (default)
- vertical - entity can pivot around its vertical axis
- horizontal - entity can pivot around its horizontal axis
- center - entity can pivot around its center point
- brightness - if present, overrides light values used for rendering. Omitted by default (which means rendering uses values from entity position). Object has two fields:
- sky - value of skylight, 0..15
- block - value of block light, 0..15
- view_range - maximum view range of this entity. Actual distance depends on client-side render distance and entity distance scalling. Default value 1.0 (roughly the same as fireball)
- shadow_radius - size of shadow. Defaults to 0 (no shadow). Interpolated
- shadow_strength - strength of the shadow. Controls the opacity of the shadow as a function of distance to block below. Defaults to 1. Interpolated
- width, height - describe size of culling bounding box
- Bounding box spans vertically y to y+height and horizontally width/2 in all directions from entity position
- If either field is set to 0, culling is disabled
- Both default to 0
- glow_color_override - override glow border color. Defaults to -1 (use team color). Alpha component is ignored
item_display
Displays a single item stack.
- Stack can be changed with commands by setting slot container.0
Fields:
- item - item stack to display. Same format as in inventory (example: {id: "minecraft:dirt", Count: 1})
- item_display - describes item model transform applied to item (as defined in display section in model JSON)
- Values: none (default), thirdperson_lefthand, thirdperson_righthand, firstperson_lefthand, firstperson_righthand, head, gui, ground, fixed
block_display
Displays a block state.
- Does not display all block entities, even if they would normally be created on block placement (like chests)
Fields:
- block_state - block state to display. Same format as item held by endermen (example {Name:"minecraft:dirt"})
text_display
Displays a text component.
Fields:
- text - text to display. Components are resolved with the context of the display entity
- line_width - line width used to split lines (note: new lines can be also added with \n characters). Defaults to 200
- text_opacity - opacity (alpha component) of rendered text. Defaults to 255. Interpolated
- background - color of background. Includes alpha channel. Defaults to 0x40000000. Interpolated
- default_background - if true, rendering uses default text background color (same as in chat). Defaults to false
- shadow - whether the text should be displayed with a shadow. Defaults to false
- see_through - whether the text should be visible through blocks. Defaults to false
- alignment - how the text should be aligned
- Values: center (default), left, right
Note: text display backgrounds uses new shader types rendertype_text_background and rendertype_text_background_see_through.
Interaction Entities
A new type of entity that records attacks ("left clicks") and interactions ("right clicks"). Interactions are invisible and of a custom size.
Fields:
- width: Width of the entity's bounding box (default 1)
- height: Height of the entity's bounding box (default 1)
- attack: Records the last attack action on the entity
- interaction: Records the last interaction action on the entity
- response: Boolean specifying if interacting should trigger a response (arm swing, sound effects, etc - default false)
Action Format
When an action is stored, it always has two fields:
- player: The UUID (in standard integer array format) of the player performing the action
- timestamp: The timestamp of the game tick when the event happened (stored as a long)
Advancement Triggers
- Interacting with an Interaction entity triggers player_interacted_with_entity
- Attacking an Interaction entity triggers player_hurt_entity
execute on with Interactions
The Interaction entity targets the player who last interacted with it. That makes the following possible:
- execute on attacker: execute as the last player who attacked the entity
- execute on target: execute as the last player who interacted with the entity
Tags
Block Behavior
- Fire burns out faster in certain biomes, and this is now controlled by the increased_fire_burnout biome tag
Mob Spawning
- The only_allows_snow_and_gold_rabbits biome tag has been renamed to spawns_gold_rabbits to match its behavior
- White Rabbit variants are now controlled by the spawns_white_rabbits biome tag
- Fox variants are now controlled by the spawns_snow_foxes biome tag
Mob Behavior
- Snow Golems melting in warm biomes is now controlled by the snow_golem_melts biome tag
- Only mobs in the dismounts_underwater entity tag will now force the rider to dismount when underwater
Network Protocol
- Clients now reset their Secure Chat session state when receiving the login packet
Packet bundles
- Added new delimiter packet to clientbound game protocol
- All packets between two delimiters are guaranteed to be processed within same tick
- For security reasons this feature is not supported in the serverbound direction
Paletted Permutations
- paletted_permutations is a new type of atlas configuration source used to dynamically generate new textures in memory based on a set of color palettes
- Color palettes allow you to swap out the colors of a texture without having to supply all files for the variants of a texture in a resource pack
- This is useful for things like armor trims, where you want to be able to change the color of parts of the armor without having to create a new texture for each color
- The paletted_permutations source has a set of required parameters:
- textures A list of namespaced locations of base textures
- These textures will be used to generate variants of them that have been modified by color palettes
- palette_key A namespaced location of a color palette key file
- A color palette key is used to define the set of key pixel colors we want to swap out with the color palettes defined below
- permutations A map of permutations from suffix to a namespaced location of a color palette file
- The suffix is appended at the beginning to the resource location of the output variant textures, with a _ character separating the suffix and the base texture name
- The color palette is a texture file with a set of pixels that are used for replacing pixels that match the color palette key in each base texture
- The number of pixels in each color palette must be the same as that of the palette_key defined for this source
- Key matching is done by comparing the RGB values of each pixel in the palette_key to the RGB values of each pixel in the color palette
- The alpha channel is ignored for key matching, but in the resulting texture the alpha channel is multiplied with the color palette's alpha channel
- Pixels that do not match the palette_key are copied over to the resulting texture as-is
- After defining a paletted_permutations source, you can then reference those namespaced output textures in other resources in your resource pack
For example, if you have the following paletted_permutations source:
{
"type": "paletted_permutations",
"textures": [
"minecraft:item/leather_helmet",
"minecraft:item/leather_chestplate",
"minecraft:item/leather_leggings",
"minecraft:item/leather_boots"
],
"palette_key": "minecraft:colormap/color_palettes/leather_armor_color_key",
"permutations": {
"red": "minecraft:colormap/color_palettes/red",
"green": "minecraft:colormap/color_palettes/green",
"blue": "minecraft:colormap/color_palettes/blue"
}
}
You can then reference the resulting textures in other resources like this:
{
"textures": {
"layer0": "minecraft:item/leather_helmet_red",
"layer1": "minecraft:item/leather_chestplate_green",
"layer2": "minecraft:item/leather_boots_blue"
}
}
Trim Patterns & Materials
- Trim patterns and materials for armor are defined by the server through the trim_pattern and trim_material registry respectively
- As a result, new trim patterns and materials can be added via data packs
- These are synchronized to clients when they join the server
- However, clients must have an accompanying resource pack to see those registered trim patterns and materials
- The paths to these textures are inferred based on the filename of the pattern json, and will try to find the textures within the same namespace as the trim pattern's name field
- The following data is defined by a trim pattern:
- asset_id which is a namespaced id used to infer texture locations and localization
- template_item which is the id of the smithing template item used to apply the trim pattern
- description which is a text component used for displaying the pattern name of an armor trim when hovering an armor itemstack
- The following data is defined by a trim material:
- asset_name which is a string used as a suffix for armor trim texture locations
- ingredient which is the id of the ingredient item used to apply the trim material
- item_model_index which is a float which defines the item model override each armor item model should target to change their visuals for this material
- override_armor_materials which is an optional map of armor material to overridden color palette
- Map key is the armor material that this trim material wants to override with a different color palette
- Map value is the name of the color palette that will be used when this trim material is applied to an armor piece with the corresponding armor material
- description which is a text component used for displaying the material name of an armor trim when hovering an armor item stack
- The style defined in this description is applied to the armor trim pattern description as well
Comparte esta historia