A fresh new snapshot is out with some changes to the features introduced in last week’s snapshot and bug fixes, like that you can now use the lunge and mending enchantments together on the same item. We have also added environment attributes which can be used to control various visual and gameplay effects. Happy mining!
Sec-WebSocket-Protocol header when opening the WebSocket connectionSec-WebSocket-Protocol: minecraft-v1, <token>management-server-allowed-origins. The default value is empty, meaning Sec-Websocket-Protocol authentication is effectively disabledminecraftstopwatch/stopwatch foo:bar create is now /stopwatch create foo:barquery now returns the queried value and takes in a new scale argument1 if omitted/stopwatch query foo:bar 20 to get the elapsed time in ticksEnvironment Attributes provide a data-driven way to control a variety of visual and gameplay systems.
Each Environment Attribute controls a specific visual or gameplay effect: for example, minecraft:visual/sky_color controls the color of the sky, and minecraft:gameplay/water_evaporates controls whether water can be placed at a given location.
Developer’s Note: This system and many of the introduced attributes should be considered very experimental, and may still change significantly in coming snapshots and releases. In the meantime, we would as always love to hear any feedback or suggestions you may have!
Environment Attribute values can be provided by the following Environment Attribute sources (in order of low to high priority):
The "effective" value of the Environment Attribute (i.e. what will actually show up in game) will be some combination of the values provided by each source according to their priority.
For example, in the following scenario:
overworld dimension provides sky_color = #00ff00 (green)plains biome provides sky_color = #ff0000 (red)When the player is in the plains biome, they will see the red sky_color, while anywhere else in the overworld they will see green.
When an Environment Attribute source provides an Environment Attribute, it can:
plains biome overriding the overworld's sky_color in the above scenarioAs described in the above example, an Environment Attribute source may simply override the value of a particular attribute. However, it is sometimes also desirable to rather apply a modifier to a value provided by a source with lower priority.
For example, in the following scenario:
overworld dimension provides water_fog_radius = 96.0plains biome modifies water_fog_radius with a multiply modifier of 0.85When in the plains biome, the water_fog_radius will be resolved to 96.0*0.85 = 81.6, while in any other Overworld biome, it will resolve to 96.0.
The kinds of modifiers available depends on the type of Environment Attribute. The most basic modifier, supported by every Environment Attribute, is the override modifier. This behaves purely as an override of the preceding value. If not specified by an Environment Attribute source, the modifier will always be assumed to be override.
Full descriptions of the available modifiers and their behaviors can be found in the Common Modifiers section below.
While modifiers describe how a value provided by one source is applied on the value from a preceding source, interpolation describes the combination of values within a source. Interpolation is performed on values from a source after modifiers have been applied.
Only some Environment Attributes support interpolation. This allows for the smooth transition between two or more values, such as when moving between two biomes.
For example, in the following scenario:
plains biome provides sky_color = #ff0000 (red)desert biome provides sky_color = #ffff00 (yellow)sky_color is one such attribute that will transition smoothly based on position: for example, in the above scenario, as a player moves from a plains to a desert biome, the sky color will gradually shift from red to yellow. Other attributes, such as water_evaporates, represent discrete values and will not be smoothly transitioned - only the biome exactly at a subject position will be considered.
Smooth transitions between biomes are based on the biomes within an 8 block radius of the camera. Biomes that occupy a larger portion of that radius and are closer to the camera will have a stronger influence on the final interpolated value.
Dimension Type and Biome definitions contain a new attributes field, enabling them to define Environment Attributes.
This map generally takes the form of an object mapping between Environment Attribute IDs and their corresponding values, for example:
"attributes": {
"minecraft:visual/fog_color": "#ffaa00",
"minecraft:gameplay/water_evaporates": true
}
Values defined as above will always be assumed to use the override modifier.
The value object can however be expanded in order to express different modifiers, in the format of an object with the following fields:
modifier: optional string modifier ID, dependent on the Attribute Type (see the Common Modifiers section below)overrideargument: the modifier argument (format dependent on the chosen modifier)For example, the following definition describes multiplying water_fog_radius by 85%:
"attributes": {
"minecraft:visual/water_fog_radius": {
"modifier": "multiply",
"argument": 0.85
}
}
The following data types are reused in various parts of the Environment Attributes system and will be referenced in sections below.
Format can be one of the following:
#rrggbb0 and 1, in the form [r, g, b]Format can be one of the following:
#aarrggbb0 and 1, in the form [a, r, g, b]A full definition of a particle, including any type-specific properties (as in the /particle command).
For example:
{
"type": "minecraft:block_crumble",
"block_state": {
"Name": "minecraft:dirt"
}
}
Every Environment Attribute has a specific value type, which describes how values must be defined as well as what modifiers are available and how they are interpolated. Some are very specific, while others are reused across many attributes.
Although this is not an exhaustive list, the following Attribute Types are used commonly across many Environment Attributes:
Argument format: boolean
overrideandnandornorxorxnorArgument format: float
overrideaddsubtractmultiplyminimummaximumArgument format: RGB color (except alpha_blend)
overrideadd - component-wise additive color blendingsubtract - component-wise subtractive color blendingmultiply - component-wise multiplicative color blendingalpha_blend - traditional alpha blending that might be seen in image editing software1, it will behave as an override with no blendingminecraft:visual/fog_colorThe color of fog (when the camera is not submerged in another substance). Note: the final value is also affected by the time of day, weather, and potion effects.
#000000effects.fog_color fieldminecraft:visual/extra_fogControls whether dense fog (like that of the Nether) should be used (when the camera is not submerged in another substance).
falseminecraft:visual/water_fog_colorThe color of fog when submerged in water. Note: the final value is also affected by the time of day, weather, and potion effects.
#050533effects.water_fog_color fieldminecraft:visual/water_fog_radiusThe distance in blocks from the camera at which underwater fog reaches its maximum density.
Note: the final value is also modified by how long the player has been underwater.
96.0#has_closer_water_fog Biome Tagminecraft:visual/sky_colorThe color of the sky. This color is only visible for the overworld sky. Note: the final value is also affected by the time of day and weather.
#000000effects.sky_color fieldminecraft:visual/cloud_opacityThe opacity of clouds. If 0, clouds are entirely disabled and Happy Ghasts will not regenerate health faster when at cloud height.
0 and 10.0minecraft:visual/cloud_heightThe height at which all clouds appear.
192.33cloud_height fieldminecraft:visual/default_dripstone_particleThe default particle to be dripped from Dripstone blocks when no fluid is placed above.
{type:"minecraft:dripping_dripstone_water"}overrideultrawarm fieldminecraft:visual/ambient_particlesControls ambient particles that randomly spawn around the camera.
particle: Particle Options to spawnprobability: float between 0 and 1, the probability to spawn the particle in an empty space when randomly ticked[]overrideeffects.particle fieldminecraft:audio/background_musicControls how and which background music is played.
default: optional object with fields:sound: Sound Event to playmin_delay: int, minimum delay in ticks between tracksmax_delay: int, maximum delay in ticks between tracksreplace_current_music: optional boolean, whether this track can replace whatever is currently playingfalseunderwater: optional object with fields in the same format as default - if present and the player is underwater, will override defaultcreative: optional object with fields in the same format as default - if present and the player is in Creative Mode, will override default{}overrideeffects.music fieldminecraft:audio/music_volumeThe volume at which music should play. Any music playing will fade over time to this value.
0 and 11.0effects.music_volume fieldminecraft:audio/ambient_soundsControls which ambient sounds are played around the camera, and when.
loop: optional Sound Event, sound to be continually loopedmood: object with fields, sounds that will be randomly played based on surrounding darknesssound: Sound Event to playtick_delay: int, the number of ticks between mood sounds, assuming a light level of 0block_search_extent: int, the radius in which light levels are sampledoffset: double, an additional distance offset to apply to sounds producedadditions: list of objects with fields, sounds that will be randomly playedsound: Sound Event to playtick_chance: float between 0 and 1, probability within a tick to play a given sound{}overrideeffects.ambient_sound, effects.mood_sound, and effects.additions_sound fieldsminecraft:gameplay/can_start_raidIf false, a Raid cannot be started by a player with Raid Omen.
truehas_raids fieldminecraft:gameplay/water_evaporatesIf true, Water cannot be placed with a Bucket, melting Ice will not produce water, Wet Sponge will dry out when placed, and Dripstone will not produce water from Mud blocks.
falseultrawarm fieldminecraft:gameplay/bed_ruleControls whether a Bed can be used to sleep, and whether it can be used to set a respawn point.
can_sleep: one of:always - the Bed can always be used to sleep (assuming the Bed is not obstructed and there are no monsters nearby)when_dark - the Bed can only be used to be sleep when the global skylight level is less than 4never - the Bed can never be used to sleepcan_set_spawn - same as can_sleepexplodes - optional boolean, if true the Bed will explode when interacted withfalseerror_message: optional Text Component, the message to show if the player is unable to sleep or set their spawn{type:"can_sleep_when_dark",error_message:{translate:"block.minecraft.bed.no_sleep"}}overridebed_works fieldminecraft:gameplay/respawn_anchor_worksControls whether Respawn Anchors can be used to set spawn (or respawn). If false, the Respawn Anchor will explode once charged.
falserespawn_anchor_works fieldminecraft:gameplay/nether_portal_spawns_piglinControls whether Nether Portal blocks can spawn Piglins.
falsenatural fieldminecraft:gameplay/fast_lavaControls whether Lava should spread faster and further, as well as have a stronger pushing force on entities when flowing.
falseultrawarm fieldminecraft:gameplay/increased_fire_burnoutControls whether Fire blocks burn out more rapidly than normal.
false#increased_fire_burnout Biome Tagminecraft:gameplay/piglins_zombifyControls whether Piglins and Hoglins should zombify.
truepiglin_safe fieldminecraft:gameplay/snow_golem_meltsControls whether a Snow Golem should be damaged.
false#snow_golem_melts Biome Tagattributes field for dimensions to specify Environment Attributesultrawarm -> minecraft:gameplay/water_evaporates, minecraft:gameplay/fast_lava, visual/default_dripstone_particlebed_works -> minecraft:gameplay/bed_rulerespawn_anchor_works -> minecraft:gameplay/respawn_anchor_workscloud_height -> minecraft:visual/cloud_heightpiglin_safe -> minecraft:gameplay/piglins_zombifyhas_raids -> minecraft:gameplay/can_start_raidnatural (note: not removed) -> minecraft:gameplay/nether_portal_spawns_piglinattributes field for biomes to specify Environment Attributesgameplay/fast_lava are not evaluated positionally and thus cannot be set on a Biomeeffects have been migrated to Environment Attributes:fog_color -> minecraft:visual/fog_colorwater_fog_color -> minecraft:visual/water_fog_colorsky_color -> minecraft:visual/sky_colorparticle -> minecraft:visual/ambient_particlesambient_sound, mood_sound, additions_sound -> minecraft:audio/ambient_soundsmusic -> minecraft:audio/background_musicmusic_volume -> minecraft:audio/music_volumeminecraft:kinetic_weaponcontact_cooldown_ticks: integer, the cooldown in ticks after hitting, and loosing contact with an entity before being able to hit it again10#snow_golem_melts and #increased_fire_burnout - replaced by gameplay/snow_golem_melts and gameplay/increased_fire_burnout Environment Attributes#plays_underwater_music - replaced by only_underwater field in the audio/background_music Environment Attribute#has_closer_water_fog - replaced by visual/water_fog_radius Environment Attributeentity.nautilus.riding