Class ModifyProvider
java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.v2.provider.ModifyProvider
- All Implemented Interfaces:
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 Summary
FieldsFields inherited from interface EnvironmentProvider
ELEMENT_CODEC, HOLDER_CODEC -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.Holder<EnvironmentProvider> base()The base provider to be modified.voidbuildCurrentComponents(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 components from thebase()and applies the modifiers to it, in the order that the modifiers are specified.com.mojang.serialization.MapCodec<ModifyProvider> codec()create(net.minecraft.core.HolderSet<EnvironmentProvider> modifiers, net.minecraft.core.Holder<EnvironmentProvider> base) net.minecraft.core.HolderSet<EnvironmentProvider> A list of modifiers that are applied to the base.
-
Field Details
-
CODEC
-
-
Method Details
-
create
public ModifyProvider create(net.minecraft.core.HolderSet<EnvironmentProvider> modifiers, net.minecraft.core.Holder<EnvironmentProvider> base) -
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) Builds the current components from thebase()and applies the modifiers to it, in the order that the modifiers are specified.- 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- Component map builder to append to
-
codec
- Specified by:
codecin interfaceEnvironmentProvider- Returns:
- Returns the codec of the provider.
-
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
The base provider to be modified.- Returns:
- Returns the provider registry entry
-