Environment Attributes

Environment Attributes provide a data-driven way to control a variety of visual, audio, and gameplay systems. Each attribute controls a specific effect: for example, visual/sky_color controls the color of the sky, and gameplay/water_evaporates controls whether water can be placed at a given location.

Both biomes and dimension types can define environment attributes via the attributes block.

References: Biome definition, Dimension type


Sources & Priority

Environment Attribute values can be provided by the following sources (low → high priority):

  1. Dimensions - base values for the entire dimension
  2. Biomes - override or modify per-biome

When a biome provides an attribute, it takes priority over the dimension value. For example, if the overworld dimension sets sky_color = green and the plains biome sets sky_color = red, a player in the plains biome will see a red sky.

Modifiers

By default, an attribute value uses the override modifier, fully replacing any lower-priority value. However, you can apply a different modifier to combine with the preceding value instead.

attributes {
	// Simple override (default modifier)
	skyColor(0x78A7FF)

	// Explicit modifier - multiplies the preceding value
	fogEndDistance(0.85f, EnvironmentAttributeModifier.MULTIPLY)
}
Kotlin

When a modifier is set, the JSON expands to { "argument": ..., "modifier": "..." }.

Boolean Modifiers

Applicable to boolean attributes. Argument format: boolean.

Modifier Description
OVERRIDE Replaces the preceding value entirely
AND Logical AND with the preceding value
NAND Logical NAND with the preceding value
OR Logical OR with the preceding value
NOR Logical NOR with the preceding value
XOR Logical XOR with the preceding value
XNOR Logical XNOR with the preceding value

Float Modifiers

Applicable to float attributes. Argument format: float.

Modifier Description
OVERRIDE Replaces the preceding value entirely
ADD Adds the argument to the preceding value
SUBTRACT Subtracts the argument from the preceding value
MULTIPLY Multiplies the preceding value by the argument
MINIMUM Takes the minimum of the preceding value and argument
MAXIMUM Takes the maximum of the preceding value and argument

Color Modifiers

Applicable to color attributes. Argument format: RGB color (except ALPHA_BLEND which uses ARGB).

Modifier Description
OVERRIDE Replaces the preceding value entirely
ADD Component-wise additive color blending
SUBTRACT Component-wise subtractive color blending
MULTIPLY Component-wise multiplicative color blending
ALPHA_BLEND Traditional alpha blending (ARGB argument; alpha=1 acts as override)
BlendToGray Blends toward gray with configurable brightness and factor

Interpolation

Some attributes support smooth interpolation between biomes. As a player moves between biomes, interpolated attributes will gradually transition based on biomes within an 8-block radius of the camera. Non-interpolated attributes use only the biome at the exact position.


All Environment Attributes

All attributes are listed below in alphabetical order by their Minecraft ID.


audio/ambient_sounds

Controls which ambient sounds are played around the camera: looping sounds, mood-based sounds, and additional random sounds.

Property Value
Value type Object
Default value {}
Modifiers override only
Interpolated No
Resolved at Camera position
Replaces Biome effects.ambient_sound, effects.mood_sound, effects.additions_sound

Fields:

  • loop - optional Sound Event, continually looped sound
  • mood - optional object for mood sounds:
    • sound - Sound Event to play
    • tickDelay - ticks between mood sounds (default: 6000)
    • blockSearchExtent - radius for light level sampling (default: 8)
    • offset - distance offset for produced sounds (default: 2.0)
  • additions - list of additional random sounds:
    • sound - Sound Event to play
    • tickChance - probability within a tick to play the sound
attributes {
	ambientSounds(loop = SoundEvents.Ambient.CAVE) {
		mood(sound = SoundEvents.Ambient.CAVE)
		addition(SoundEvents.Ambient.CAVE, 0.01f)
	}
}
Kotlin

audio/background_music

Controls how and which background music is played.

Property Value
Value type Object
Default value {}
Modifiers override only
Interpolated No
Resolved at Camera position
Replaces Biome effects.music

Fields:

  • default - optional music track with:
    • sound - Sound Event to play
    • minDelay - minimum delay in ticks between tracks
    • maxDelay - maximum delay in ticks between tracks
    • replaceCurrentMusic - optional boolean (default: false)
  • creative - optional track, overrides default when in Creative Mode
  • underwater - optional track, overrides default when underwater
attributes {
	backgroundMusic {
		default(
			sound = SoundEvents.Music.CREATIVE,
			minDelay = 100,
			maxDelay = 200,
			replaceCurrentMusic = true,
		)
	}
}
Kotlin

audio/firefly_bush_sounds

Controls whether firefly bush sounds are played.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Firefly bush
attributes {
	fireflyBushSounds(true)
}
Kotlin

audio/music_volume

The volume at which music should play. Any music playing will fade over time to this value.

Property Value
Value type Float (0 to 1)
Default value 1.0
Modifiers Float Modifiers
Interpolated No
Resolved at Camera position
Replaces Biome effects.music_volume
attributes {
	musicVolume(0.8f)
}
Kotlin

gameplay/bed_rule

Controls whether a Bed can be used to sleep, set a respawn point, or whether it explodes.

Property Value
Value type Object
Default value {canSleep: "when_dark", canSetSpawn: "when_dark"}
Modifiers override only
Interpolated No
Resolved at Head position of the Bed block
Replaces Dimension Type bed_works

Fields:

  • canSleep - one of ALWAYS, WHEN_DARK, NEVER
  • canSetSpawn - one of ALWAYS, WHEN_DARK, NEVER
  • explodes - optional boolean, if true the Bed explodes when interacted with (default: false)
  • errorMessage - optional Text Component shown when unable to sleep
attributes {
	bedRule(
		canSleep = BedSleepRule.ALWAYS,
		canSetSpawn = BedSleepRule.WHEN_DARK,
		explodes = false,
		errorMessage = textComponent("Cannot sleep here"),
	)
}
Kotlin

gameplay/baby_villager_activity

Controls the activity of baby villagers.

Property Value
Value type Mob Activity enum
Default value minecraft:idle
Modifiers override only
Interpolated No
Resolved at Position of the villager
attributes {
	babyVillagerActivity(Activities.PLAY, EnvironmentAttributeModifier.OVERRIDE)
}
Kotlin

gameplay/bees_stay_in_hive

Controls whether bees stay in their hive.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of hive
attributes {
	beesStayInHive(true)
}
Kotlin

gameplay/can_pillager_patrol_spawn

Controls whether Pillager patrols can spawn. Replaces #without_patrol_spawns.

Property Value
Value type Boolean
Default value true
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the patrol spawn
Replaces #without_patrol_spawns Biome Tag
attributes {
	canPillagerPatrolSpawn(false)
}
Kotlin

gameplay/can_start_raid

If false, a Raid cannot be started by a player with Raid Omen.

Property Value
Value type Boolean
Default value true
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position where the Raid starts
Replaces Dimension Type has_raids
attributes {
	canStartRaid(false)
}
Kotlin

gameplay/cat_waking_up_gift_chance

The chance for a cat to give a waking up gift. Interpolated.

Property Value
Value type Float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Position of cat
attributes {
	catWakingUpGiftChance(0.5f)
}
Kotlin

gameplay/creaking_active

Controls whether the Creaking is active.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the Creaking
attributes {
	creakingActive(true)
}
Kotlin

gameplay/eyeblossom_open

Controls whether Eyeblossoms are open. Can be true, false, or "default".

Property Value
Value type Enum (true/false/default)
Default value "default"
Modifiers override only
Interpolated No
Resolved at Position of the Eyeblossom
attributes {
	eyeblossomOpen(EyeblossomOpenState.TRUE)

	// With a modifier
	eyeblossomOpen(EyeblossomOpenState.DEFAULT, EnvironmentAttributeModifier.OVERRIDE)
}
Kotlin

gameplay/fast_lava

Controls whether Lava should spread faster and further, as well as have a stronger pushing force on entities when flowing.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Whole dimension (cannot be set on a Biome)
Replaces Dimension Type ultrawarm
attributes {
	fastLava(true)
}
Kotlin

gameplay/increased_fire_burnout

Controls whether Fire blocks burn out more rapidly than normal.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the burning Fire block
Replaces #increased_fire_burnout Biome Tag
attributes {
	increasedFireBurnout(true)
}
Kotlin

gameplay/monsters_burn

Controls whether monsters burn in sunlight.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of mob
attributes {
	monstersBurn(true)
}
Kotlin

gameplay/nether_portal_spawns_piglin

Controls whether Nether Portal blocks can spawn Piglins.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of a random Nether Portal block
Replaces Dimension Type natural
attributes {
	netherPortalSpawnsPiglin(true)
}
Kotlin

gameplay/piglins_zombify

Controls whether Piglins and Hoglins should zombify.

Property Value
Value type Boolean
Default value true
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the zombifying entity
Replaces Dimension Type piglin_safe
attributes {
	piglinsZombify(false)
}
Kotlin

gameplay/respawn_anchor_works

Controls whether Respawn Anchors can be used to set spawn. If false, the Respawn Anchor will explode once charged.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the Respawn Anchor block
Replaces Dimension Type respawn_anchor_works
attributes {
	respawnAnchorWorks(true)
}
Kotlin

gameplay/snow_golem_melts

Controls whether a Snow Golem should be damaged.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the Snow Golem
Replaces #snow_golem_melts Biome Tag
attributes {
	snowGolemMelts(true)
}
Kotlin

gameplay/sky_light_level

The sky light level for the dimension.

Property Value
Value type Float
Default value 15.0
Modifiers Float Modifiers
Interpolated No
Resolved at Whole dimension (cannot be set on a Biome)
attributes {
	skyLightLevel(15.0f)
}
Kotlin

gameplay/surface_slime_spawn_chance

The chance for surface slime to spawn. Interpolated.

Property Value
Value type Float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Position of spawn
attributes {
	surfaceSlimeSpawnChance(0.1f)
}
Kotlin

gameplay/turtle_egg_hatch_chance

The chance for turtle eggs to hatch. Interpolated.

Property Value
Value type Float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Position of the turtle egg
attributes {
	turtleEggHatchChance(0.05f)
}
Kotlin

gameplay/villager_activity

Controls the activity of villagers.

Property Value
Value type Mob Activity enum
Default value minecraft:idle
Modifiers override only
Interpolated No
Resolved at Position of the villager
attributes {
	villagerActivity(Activities.WORK, EnvironmentAttributeModifier.OVERRIDE)
}
Kotlin

gameplay/water_evaporates

If 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.

Property Value
Value type Boolean
Default value false
Modifiers Boolean Modifiers
Interpolated No
Resolved at Position of the interaction
Replaces Dimension Type ultrawarm
attributes {
	waterEvaporates(true)

	// With a modifier
	waterEvaporates(true, EnvironmentAttributeModifier.OR)
}
Kotlin

visual/ambient_particles

Controls ambient particles that randomly spawn around the camera.

Property Value
Value type List of particle entries
Default value []
Modifiers override only
Interpolated No
Resolved at Camera position
Replaces Biome effects.particle

Each entry has:

  • options - a particle type (e.g. Particles.ASH)
  • probability - float between 0 and 1, the chance to spawn in an empty space
attributes {
	ambientParticles(
		Particle(ParticleOptions(Particles.ASH), 0.01f),
	)
}
Kotlin

visual/cloud_color

The color of clouds, expressed as an ARGB hex string.

Property Value
Value type ARGB Color
Default value #00000000
Modifiers Color Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	cloudColor(ARGB(255, 128, 64, 32))
}
Kotlin

visual/cloud_fog_end_distance

The distance in blocks from the camera at which cloud fog ends.

Property Value
Value type Non-negative float
Default value 1024.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	cloudFogEndDistance(256.0f)
}
Kotlin

visual/cloud_height

The height at which all clouds appear.

Property Value
Value type Float
Default value 192.33
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position for rendering, or Happy Ghast position for regeneration
Replaces Dimension Type cloud_height
attributes {
	cloudHeight(192.33f)
}
Kotlin

visual/default_dripstone_particle

The default particle to be dripped from Dripstone blocks when no fluid is placed above.

Property Value
Value type Particle Options
Default value {type: "dripping_dripstone_water"}
Modifiers override only
Interpolated No
Resolved at Position of the Dripstone block
Replaces Dimension Type ultrawarm
attributes {
	defaultDripstoneParticle(Particles.DRIPPING_DRIPSTONE_WATER)
}
Kotlin

visual/moon_angle

The angle of the moon in degrees. Interpolated.

Property Value
Value type Float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Overworld camera
attributes {
	moonAngle(45.0f)
}
Kotlin

visual/moon_phase

Controls the moon phase.

Property Value
Value type MoonPhase
Default value full_moon
Modifiers override only
Interpolated No
Resolved at Overworld camera
attributes {
	moonPhase(Textures.Environment.Celestial.Moon.FULL_MOON, EnvironmentAttributeModifier.OVERRIDE)
}
Kotlin

visual/fog_color

The color of fog when the camera is not submerged in another substance. The final value is also affected by the time of day, weather, and potion effects.

Property Value
Value type RGB Color
Default value #000000
Modifiers Color Modifiers
Interpolated Yes
Resolved at Camera position
Replaces Biome effects.fog_color
attributes {
	fogColor(rgb(255, 170, 0))

	// With a modifier
	fogColor(rgb(255, 255, 0), EnvironmentAttributeModifier.ADD)
}
Kotlin

visual/fog_end_distance

The distance in blocks from the camera at which fog ends.

Property Value
Value type Non-negative float
Default value 1024.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	fogEndDistance(192.0f)
}
Kotlin

visual/fog_start_distance

The distance in blocks from the camera at which fog starts.

Property Value
Value type Non-negative float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	fogStartDistance(0.0f)
}
Kotlin

visual/sky_color

The color of the sky. This color is only visible for the overworld sky. The final value is also affected by the time of day and weather.

Property Value
Value type RGB Color
Default value #000000
Modifiers Color Modifiers
Interpolated Yes
Resolved at Camera position
Replaces Biome effects.sky_color
attributes {
	skyColor(Color.RED)
	// or
	skyColor(0x78A7FF)
}
Kotlin

visual/sky_fog_end_distance

The distance in blocks from the camera at which sky fog ends.

Property Value
Value type Non-negative float
Default value 512.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	skyFogEndDistance(320.0f)
}
Kotlin

visual/water_fog_color

The color of fog when submerged in water. The final value is also affected by the time of day, weather, and potion effects.

Property Value
Value type RGB Color
Default value #050533
Modifiers Color Modifiers
Interpolated Yes
Resolved at Camera position
Replaces Biome effects.water_fog_color
attributes {
	waterFogColor(rgb(5, 5, 51))
}
Kotlin

visual/water_fog_end_distance

The distance in blocks from the camera at which underwater fog ends.

Property Value
Value type float
Default value -8.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	waterFogEndDistance(96.0f)
}
Kotlin

visual/water_fog_start_distance

The distance in blocks from the camera at which underwater fog starts.

Property Value
Value type Float
Default value 0.0
Modifiers Float Modifiers
Interpolated Yes
Resolved at Camera position
attributes {
	waterFogStartDistance(0.0f)
}
Kotlin

Blend To Gray Modifier

The BlendToGray modifier is a special color modifier that blends the preceding color toward gray. Unlike other modifiers which are simple constants, BlendToGray is a data class with two parameters:

  • brightness - controls the brightness of the gray target
  • factor - controls the blending factor (0 = no change, 1 = fully gray)
attributes {
	fogColor(rgb(255, 170, 0), EnvironmentAttributeModifier.BlendToGray(brightness = 0.5f, factor = 0.8f))
}
Kotlin

This serializes to:

{
	"argument": 16755200,
	"modifier": {
		"type": "blend_to_gray",
		"brightness": 0.5,
		"factor": 0.8
	}
}
JSON

Complete Example

fun DataPack.createCustomDimensionWithAttributes() {
	val dimType = dimensionType("custom_type") {
		ambientLight = 0.1f
		hasCeiling = false
		hasSkylight = true
		height = 384
		logicalHeight = 384
		minY = -64
		natural = true

		attributes {
			// Gameplay
			canStartRaid(true)
			fastLava(false)
			waterEvaporates(false)
			piglinsZombify(true)
			respawnAnchorWorks(false)
			increasedFireBurnout(false)
			netherPortalSpawnsPiglin(false)
			snowGolemMelts(false)
			bedRule(
				canSleep = BedSleepRule.ALWAYS,
				canSetSpawn = BedSleepRule.ALWAYS,
			)

			// Visual
			cloudColor(ARGB(255, 255, 255, 255))
			cloudHeight(192.33f)
			fogStartDistance(0.0f)
			fogEndDistance(192.0f)
			skyFogEndDistance(320.0f)

			// Audio
			musicVolume(0.8f)
			backgroundMusic {
				default(
					sound = SoundEvents.Music.CREATIVE,
					minDelay = 100,
					maxDelay = 200,
				)
			}
		}
	}

	biome("custom_biome") {
		temperature = 0.8f
		downfall = 0.4f
		hasPrecipitation = true

		attributes {
			skyColor(0x78A7FF)
			fogColor(0xC0D8FF)
			waterFogColor(0x050533)
			waterFogEndDistance(96.0f)
			waterFogStartDistance(0.0f)
			ambientParticles(
				Particle(ParticleOptions(Particles.ASH), 0.01f),
			)
			ambientSounds(loop = SoundEvents.Ambient.CAVE) {
				mood(sound = SoundEvents.Ambient.CAVE)
				addition(SoundEvents.Ambient.CAVE, 0.01f)
			}
		}

		effects {
			waterColor = color(0x3F76E4)
		}
	}
}
Kotlin

See Also

  • Biomes - Biomes can define environment attributes to control per-biome visuals and audio
  • Colors - RGB and ARGB color formats used by color attributes
  • Dimensions - Dimension types can define base environment attributes for the entire dimension
  • Timelines - Animate environment attributes over time using keyframes and easing functions
  • World Generation - Overview of the worldgen system