Class ModifyEnvironmentProvider

java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.provider.ModifyEnvironmentProvider
All Implemented Interfaces:
EnvironmentProvider

public final class ModifyEnvironmentProvider extends Object implements EnvironmentProvider
Applies modifiers to a base environment provider from a tag or list of environment providers

Note: In general, using the environment priority is more flexible than using this provider type.

  • Field Details

  • Method Details

    • create

      public ModifyEnvironmentProvider create(net.minecraft.core.HolderSet<EnvironmentProvider> modifiers, net.minecraft.core.Holder<EnvironmentProvider> base)
    • buildCurrentComponents

      public void buildCurrentComponents(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.minecraft.core.component.DataComponentMap.Builder builder)
      Builds the current components from the base() and applies the modifiers to it, in the order that the modifiers are specified.
      Specified by:
      buildCurrentComponents in interface EnvironmentProvider
      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 - Component map builder to append to
    • getType

      Specified by:
      getType in interface EnvironmentProvider
      Returns:
      Returns the type of this provider for dispatch
    • modifiers

      public net.minecraft.core.HolderSet<EnvironmentProvider> modifiers()
      A list of modifiers that are applied to the base. Modifiers are applied in iteration order.
      Returns:
      Returns a registry entry list of providers
    • base

      public net.minecraft.core.Holder<EnvironmentProvider> base()
      The base provider to be modified.
      Returns:
      Returns the provider registry entry