Interface EnvironmentProvider

All Known Implementing Classes:
BiomePrecipitationTypeEnvironmentProvider, ConstantEnvironmentProvider, LightThresholdLightProvider, ModifyEnvironmentProvider, SeasonalEnvironmentProvider, TemperateSeasonEnvironmentProvider, TemperatureShiftEnvironmentProvider, TropicalSeasonEnvironmentProvider, WeatherStateEnvironmentProvider

public interface EnvironmentProvider
Provides the environment parameters (such as temperature and relative humidity) of a position in a world and biome.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<EnvironmentProvider>
     
    static final com.mojang.serialization.Codec<net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider>>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    buildCurrentComponents(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome, net.minecraft.component.ComponentMap.Builder builder)
    Builds the current environment parameter components at a point and biome in a world into a reducible builder.
     
  • Field Details

    • ELEMENT_CODEC

      static final com.mojang.serialization.Codec<EnvironmentProvider> ELEMENT_CODEC
    • ENTRY_CODEC

      static final com.mojang.serialization.Codec<net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider>> ENTRY_CODEC
  • Method Details

    • buildCurrentComponents

      void buildCurrentComponents(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome, net.minecraft.component.ComponentMap.Builder builder)
      Builds the current environment parameter components at a point and biome in a world into a reducible builder.

      The allowed component type keys must be registered in the environment component type registry. A set of default components for temperature and relative humidity are defined in EnvironmentComponentTypes.

      Parameters:
      world - The world/level being queried
      pos - The position in the world to query
      biome - The biome at the position in the world
      builder - A component map builder to append to
    • getType

      Returns:
      Returns the type of this provider for dispatch