Skip to content

Environment Attributes

Environment attributes are an internal feature used to control specific aspects of biomes, dimensions, weather, and other aspects of the game. Many of these attributes are used to control the visual aspects of biomes, such as the color of the sky, the tint of skylight, music, and more.

We provide wrappers for these environment attributes inside our WrappedEnvironmentAttributes class. All fields marked with @Deprecated should be treated as if they will not work on biomes, many environment attributes are internally specific to dimensions or other aspects of Minecraft and will not work on biomes.

Using New Environment Attributes on Older Server Versions

Section titled “Using New Environment Attributes on Older Server Versions”

BiomesAPI will gracefully degrade new environment attributes for older server versions, if you use an environment attribute that is not supported on the server version, BiomesAPI will ignore the attribute and log a warning in the console. This allows you to use new environment attributes without breaking compatibility with older server versions.

[18:48:17 WARN]: [me.outspending.biomesapi.wrapper.environment.attribute.EnvironmentAttributeFactoryImpl] Environment attribute with key 'visual/block_light_tint' not found in registry; this attribute is not supported by this Minecraft version!
ExamplePlugin.java Java
public class ExamplePlugin extends JavaPlugin {
  @Override
  public void onEnable() {
      CustomBiome.builder()
          // Other custom biome options up here...
          .replace(Material.BIRCH_LEAVES, Material.ACACIA_LEAVES)
          // Change the tint of block lights such as torches
          .setAttribute(WrappedEnvironmentAttributes.BLOCK_LIGHT_TINT, "#FF10F0")
          // Set the sun's brightness to 90%
          .setAttribute(WrappedEnvironmentAttributes.SKY_LIGHT_FACTOR, 0.9f)
          .build();
  }
}