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 EnvironmentAttributes class. Some attributes may only work on biomes whereas some attributes may only work on dimensions.

Using New Environment Attributes on Older Server Versions

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

Wyck will gracefully degrade new environment attributes for older server versions, if you use an environment attribute that is not supported on the server version, Wyck 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]: [dev.wyck.wrapper.environment.attribute.EnvironmentAttributeImpl] 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
          .attribute(EnvironmentAttributes.BLOCK_LIGHT_TINT, "#FF10F0")
          // Set the sun's brightness to 90%
          .attribute(EnvironmentAttributes.SKY_LIGHT_FACTOR, 0.9f)
          .build();
  }
}