Class ShiftTemperatureProvider
java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.v2.provider.ShiftTemperatureProvider
- All Implemented Interfaces:
EnvironmentProvider
Intended to be used as a modifier, this provider shifts the existing temperature component in a map by a given value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ShiftTemperatureProvider> Fields inherited from interface EnvironmentProvider
ELEMENT_CODEC, HOLDER_CODEC -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildCurrentComponents(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.com.mojang.serialization.MapCodec<ShiftTemperatureProvider> codec()static ShiftTemperatureProvidercreate(TemperatureRecord shift) Creates a new providershift()
-
Field Details
-
CODEC
-
-
Method Details
-
create
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:
buildCurrentComponentsin interfaceEnvironmentProvider- Parameters:
level- The world/level being queriedpos- The position in the world to querybiome- The biome at the position in the worldbuilder- A reducible component map builder to append to
-
codec
- Specified by:
codecin interfaceEnvironmentProvider- Returns:
- Returns the codec of the provider.
-
shift
-