Class TemperatureShiftEnvironmentProvider

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

public final class TemperatureShiftEnvironmentProvider extends Object implements EnvironmentProvider
Intended to be used as a modifier, this provider shifts the existing temperature component in a map by a given value.
  • Field Details

  • Method Details

    • create

      @Contract("_->new") public static TemperatureShiftEnvironmentProvider create(TemperatureRecord shift)
      Creates a new provider
      Parameters:
      shift - Provider temperature shift value
      Returns:
      Returns a new temperature shift provider instance
    • buildCurrentComponents

      public void buildCurrentComponents(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, net.minecraft.core.component.DataComponentMap.Builder builder)
      Adds the shift value of this provider to the existing temperature component in the builder. If no temperature component is in the builder, then this will skip and log a warning.
      Specified by:
      buildCurrentComponents in interface EnvironmentProvider
      Parameters:
      level - The world/level being queried
      pos - The position in the world to query
      biome - The biome at the position in the world
      builder - A reducible component map builder to append to
    • getType

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

      public TemperatureRecord shift()