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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EnvironmentProvider> static final com.mojang.serialization.Codec<net.minecraft.core.Holder<EnvironmentProvider>> Deprecated, for removal: This API element is subject to removal in a future version.This field was named based on Yarn mappings.static final com.mojang.serialization.Codec<net.minecraft.core.Holder<EnvironmentProvider>> -
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) Builds the current environment parameter components at a point and biome in a world into a reducible builder.EnvironmentProviderType<? extends EnvironmentProvider> getType()
-
Field Details
-
ELEMENT_CODEC
-
HOLDER_CODEC
static final com.mojang.serialization.Codec<net.minecraft.core.Holder<EnvironmentProvider>> HOLDER_CODEC -
ENTRY_CODEC
@Deprecated(since="8.1.0", forRemoval=true) static final com.mojang.serialization.Codec<net.minecraft.core.Holder<EnvironmentProvider>> ENTRY_CODECDeprecated, for removal: This API element is subject to removal in a future version.This field was named based on Yarn mappings. UseHOLDER_CODECto better confirm to Official Mappings.
-
-
Method Details
-
buildCurrentComponents
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) 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 inEnvironmentComponentTypes.- Parameters:
level- The world/level being queriedpos- The position in the world to querybiome- The biome at the position in the worldbuilder- A component map builder to append to
-
getType
EnvironmentProviderType<? extends EnvironmentProvider> getType()- Returns:
- Returns the type of this provider for dispatch
-