Class ModifyEnvironmentProvider
java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.provider.ModifyEnvironmentProvider
- 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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ModifyEnvironmentProvider> Fields inherited from interface com.github.thedeathlycow.thermoo.api.environment.provider.EnvironmentProvider
ELEMENT_CODEC, ENTRY_CODEC -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> base()The base provider to be modified.voidbuildCurrentComponents(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome, net.minecraft.component.ComponentMap.Builder builder) Builds the current components from thebase()and applies the modifiers to it, in the order that the modifiers are specified.create(net.minecraft.registry.entry.RegistryEntryList<EnvironmentProvider> modifiers, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> base) getType()net.minecraft.registry.entry.RegistryEntryList<EnvironmentProvider> A list of modifiers that are applied to the base.
-
Field Details
-
CODEC
-
-
Method Details
-
create
public ModifyEnvironmentProvider create(net.minecraft.registry.entry.RegistryEntryList<EnvironmentProvider> modifiers, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> base) -
buildCurrentComponents
public void buildCurrentComponents(net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos, net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome, net.minecraft.component.ComponentMap.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:
world- 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
-
getType
- Specified by:
getTypein interfaceEnvironmentProvider- Returns:
- Returns the type of this provider for dispatch
-
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
-