Environment Attributes
Environment attributes are the data-driven knobs controlling how a place in the world looks, sounds and behaves. Each one covers a single effect: visual/sky_color is the color of the sky, gameplay/water_evaporates decides whether a bucket can place water.
Both biomes and dimension types declare them in an attributes { } block, and both use the exact same builders. Everything the removed effects, natural, ultrawarm, piglin_safe, bed_works and has_raids fields used to control lives here.
References: Biome definition, Dimension type
Priority, Modifiers, Interpolation
A dimension type provides the base value for the whole world, a biome overrides it locally. Setting sky_color to green on the dimension and to red on the plains biome gives a red sky in the plains, green everywhere else.
By default a value overrides whatever the lower-priority source provided. Pass a modifier as the second argument to combine with it instead, and the JSON expands from a bare value to { "argument": ..., "modifier": ... }:
Which modifiers apply depends on the value type of the attribute:
| Value type | Available modifiers |
|---|---|
| Boolean | OVERRIDE, AND, NAND, OR, NOR, XOR, XNOR |
| Float | OVERRIDE, ADD, SUBTRACT, MULTIPLY, MINIMUM, MAXIMUM |
| Color | OVERRIDE, ADD, SUBTRACT, MULTIPLY, ALPHA_BLEND, BlendToGray |
| List | OVERRIDE, APPEND |
| Natural mob spawns | OVERRIDE, OVERLAY |
| Object | OVERRIDE only |
ALPHA_BLEND takes an ARGB argument and does traditional alpha blending; an alpha of 1 behaves as an override. BlendToGray is the one modifier carrying data of its own:
Attributes marked interpolated in the tables below fade smoothly as the player crosses a biome border, sampling the biomes within 8 blocks of the camera. The others snap to the biome at the exact position.
Visual
| Builder | Value | Default | Interp. | Resolved at | Controls |
|---|---|---|---|---|---|
ambientLightColor(color) |
RGB color | #000000 |
Yes | Camera | Tint of the scene's ambient illumination. |
ambientParticles(...) |
Particle list | [] |
No | Camera | Particles randomly spawning around the camera. |
blockLightTint(color) |
RGB color | #000000 |
Yes | Camera | Tint applied to block-emitted light. |
cloudColor(argb) |
ARGB color | #00000000 |
Yes | Camera | Color of the clouds. |
cloudFogEndDistance(float) |
Float, >= 0 | 1024.0 |
Yes | Camera | Distance in blocks at which cloud fog ends. |
cloudHeight(float) |
Float | 192.33 |
Yes | Camera | Height all clouds are drawn at. |
defaultDripstoneParticle(...) |
Particle | dripstone water | No | Dripstone block | Particle dripped when no fluid sits above the dripstone. |
fogColor(color) |
RGB color | #000000 |
Yes | Camera | Fog color out of water. Time, weather and potions affect it too. |
fogEndDistance(float) |
Float, >= 0 | 1024.0 |
Yes | Camera | Distance in blocks at which fog ends. |
fogStartDistance(float) |
Float, >= 0 | 0.0 |
Yes | Camera | Distance in blocks at which fog starts. |
moonAngle(float) |
Float, degrees | 0.0 |
Yes | Overworld camera | Angle of the moon. |
moonPhase(texture) |
Moon phase | full_moon |
No | Overworld camera | Which moon phase texture is drawn. |
nightVisionColor(color) |
RGB color | #000000 |
Yes | Camera | Tint applied under the Night Vision effect. |
skyColor(color) |
RGB color | #000000 |
Yes | Camera | Sky color, Overworld sky only. Time and weather affect it too. |
skyFogEndDistance(float) |
Float, >= 0 | 512.0 |
Yes | Camera | Distance in blocks at which sky fog ends. |
skyLightColor(color) |
RGB color | - | Yes | Camera | Tint applied to sky light. |
skyLightFactor(float) |
Float | - | Yes | Camera | How strongly sky light contributes to the scene. |
starAngle(float) |
Float, degrees | - | Yes | Overworld camera | Rotation of the star field. |
starBrightness(float) |
Float | - | Yes | Overworld camera | Brightness of the stars. |
sunAngle(float) |
Float, degrees | - | Yes | Overworld camera | Angle of the sun. |
sunriseSunsetColor(argb) |
ARGB color | - | Yes | Overworld camera | Color of the sunrise and sunset glow. |
waterFogColor(color) |
RGB color | #050533 |
Yes | Camera | Fog color while submerged in water. |
waterFogEndDistance(float) |
Float | -8.0 |
Yes | Camera | Distance in blocks at which underwater fog ends. |
waterFogStartDistance(float) |
Float | 0.0 |
Yes | Camera | Distance in blocks at which underwater fog starts. |
Color builders take an Int hex literal, a Color, or an rgb(r, g, b) / ARGB(a, r, g, b) call. See Colors.
Ambient Particles
ambientParticles takes one particle(options, probability) per entry in its block, pairing particle options with the chance to spawn them in an empty space. simpleParticle(...) builds a particle without options, and factories such as dustParticle build the ones that have some.
The dust entry is written with its options inline, its color as a packed int:
With EnvironmentAttributeModifier.APPEND, the particles are added after the ones of the lower-priority source, a biome keeping the particles of its dimension for instance, instead of replacing them.
defaultDripstoneParticle takes the same particle options, and writes them as the attribute value itself:
Audio
| Builder | Value | Default | Interp. | Resolved at | Controls |
|---|---|---|---|---|---|
ambientSounds(...) |
Object | {} |
No | Camera | Looping, mood and random ambient sounds. |
backgroundMusic(...) |
Object | {} |
No | Camera | Which background music plays, and how often. |
fireflyBushSounds(bool) |
Boolean | false |
No | Firefly bush | Whether firefly bushes make noise. |
musicVolume(float) |
Float, 0 to 1 | 1.0 |
No | Camera | Target volume music fades to. |
Ambient Sounds
loop- a sound continually looped.mood { }- the cave-ambience style sound:sound,tickDelay(default6000),blockSearchExtent(default8),offset(default2.0).addition(sound, tickChance)- a sound with a per-tick chance to play, repeatable.
Background Music
Three tracks, each taking a sound, a minDelay/maxDelay range in ticks, and an optional replaceCurrentMusic. creative and underwater override default in their respective situations.
Gameplay
| Builder | Value | Default | Interp. | Resolved at | Controls |
|---|---|---|---|---|---|
babyVillagerActivity(activity) |
Activity | idle |
No | Villager | What baby villagers do. |
bedRule(...) |
Object | when_dark |
No | Bed head | Whether a bed lets you sleep, set spawn, or is destroyed. |
beesStayInHive(bool) |
Boolean | false |
No | Hive | Whether bees stay inside their hive. |
canPillagerPatrolSpawn(bool) |
Boolean | true |
No | Patrol spawn | Whether pillager patrols spawn. |
canStartRaid(bool) |
Boolean | true |
No | Raid start | Whether Raid Omen can start a raid. |
catWakingUpGiftChance(float) |
Float | 0.0 |
Yes | Cat | Chance for a cat to leave a waking-up gift. |
creakingActive(bool) |
Boolean | false |
No | Creaking | Whether the Creaking is active. |
creatureWorldGenSpawnProbability(float) |
Float, 0 to 0.9999999 | 0.1 |
No | Chunk generation | Chance per chunk for the initial creature spawn at world generation. |
eyeblossomOpen(state) |
TRUE/FALSE/DEFAULT |
DEFAULT |
No | Eyeblossom | Whether eyeblossoms are open. |
fastLava(bool) |
Boolean | false |
No | Whole dimension | Lava spreading faster, further, and pushing harder. |
increasedFireBurnout(bool) |
Boolean | false |
No | Burning fire block | Whether fire blocks burn out faster. |
monstersBurn(bool) |
Boolean | false |
No | Mob | Whether monsters burn in sunlight. |
naturalMobSpawns(...) |
Object | {} |
No | Spawn position | The mobs spawned naturally and their spawn costs. |
netherPortalSpawnsPiglin(bool) |
Boolean | false |
No | Nether portal | Whether nether portal blocks spawn piglins. |
piglinsZombify(bool) |
Boolean | true |
No | Zombifying entity | Whether piglins and hoglins zombify. |
respawnAnchorWorks(bool) |
Boolean | false |
No | Respawn anchor | Whether a respawn anchor sets spawn instead of exploding. |
skyLightLevel(float) |
Float, 0 to 15 | 15.0 |
No | Whole dimension | Sky light level of the dimension. |
snowGolemMelts(bool) |
Boolean | false |
No | Snow golem | Whether snow golems take damage. |
strawBedRule(...) |
Object | when_dark |
No | Straw bed head | Whether a straw bed lets you sleep, set spawn, or is destroyed. |
surfaceSlimeSpawnChance(float) |
Float | 0.0 |
Yes | Spawn position | Chance for surface slimes to spawn. |
turtleEggHatchChance(float) |
Float | 0.0 |
Yes | Turtle egg | Chance for turtle eggs to hatch. |
villagerActivity(activity) |
Activity | idle |
No | Villager | What villagers do. |
waterEvaporates(bool) |
Boolean | false |
No | Interaction | Buckets failing, ice melting dry, sponges drying, dripstone dry. |
fastLava and skyLightLevel resolve for the whole dimension and cannot be set on a biome.
Natural Mob Spawns
naturalMobSpawns sets the mobs spawning naturally, one weighted list per mob category, and the spawn costs capping their density. It belongs in the attributes of a biome or a dimension type, and creatureWorldGenSpawnProbability sets the chance per chunk of the initial creature spawn at world generation.
spawner(type, weight, minCount, maxCount) writes a constant count when both are equal and a uniform one otherwise. Call count inside the block with a plain Int or another int provider. A spawnCost(type, energyBudget, charge) makes a mob spend charge from a shared energyBudget, so a crowded area stops spawning it.
By default the value overrides the one of the lower-priority source. With EnvironmentAttributeModifier.OVERLAY, the categories and spawn costs set here replace the matching ones and the others are kept, so a biome can change the monsters of its dimension and leave the creatures alone:
Structures replace these lists inside their bounding box through spawn overrides.
Bed Rule
canSleep and canSetSpawn each take BedSleepRule.ALWAYS, WHEN_DARK or NEVER. destroyOnUse destroys the bed (it explodes) when it is used, destroyOnLeave destroys it when the player leaves it (both default to false), and errorMessage replaces the message shown when sleeping is refused.
strawBedRule takes the same arguments and applies to straw beds.
See Also
- Biomes - per-biome attribute overrides
- Colors - the RGB and ARGB formats used by color attributes
- Dimensions - dimension-wide base attributes
- Timelines - animating attributes over time with keyframes and easing
- World Generation - overview of the worldgen system
