Class EnvironmentDefinition
java.lang.Object
com.github.thedeathlycow.thermoo.api.environment.EnvironmentDefinition
Defines a biome's environmental temperature and relative humidity values. Must be defined in a datapack registry
in order to work.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EnvironmentDefinition> -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes()The biomes that this environment provides forbuilder(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) static EnvironmentDefinitioncreate(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) Deprecated.static EnvironmentDefinitioncreate(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> excludeBiomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) Deprecated.net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> The biomes that the environment has been blocked from providing forintpriority()Determines the priority for which this environment should be applied to a biome.net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider()booleanprovidesFor(net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome) Checks that this definition can provide an environment for the given biome
-
Field Details
-
CODEC
-
-
Method Details
-
builder
public static EnvironmentDefinition.Builder builder(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) -
create
@Contract("_,_->new") @Deprecated(since="4.5") public static EnvironmentDefinition create(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) Deprecated.Creates an environment definition- Parameters:
biomes- The biomes this definition provides forprovider- The base value provider of this definition- Returns:
- Returns a new definition
-
create
@Contract("_,_,_->new") @Deprecated(since="4.5") public static EnvironmentDefinition create(net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes, net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> excludeBiomes, net.minecraft.registry.entry.RegistryEntry<EnvironmentProvider> provider) Deprecated.Creates an environment definition- Parameters:
biomes- The biomes this definition provides forexcludeBiomes- The biomes this definition has been blocked from providing forprovider- The base value provider of this definition- Returns:
- Returns a new definition
-
providesFor
public boolean providesFor(net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome> biome) Checks that this definition can provide an environment for the given biome- Parameters:
biome- The biome to check- Returns:
- Returns
trueif the biome is in this definition's biome list, and NOT in this definition's excluded biome list.
-
biomes
public net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> biomes()The biomes that this environment provides for- Returns:
- The biomes that this definition provides an environment for
-
excludeBiomes
public net.minecraft.registry.entry.RegistryEntryList<net.minecraft.world.biome.Biome> excludeBiomes()The biomes that the environment has been blocked from providing for- Returns:
- The biomes that this definition provides excludes
-
provider
- Returns:
- The environment provider for this definition
-
priority
public int priority()Determines the priority for which this environment should be applied to a biome. Environments with a HIGHER priority will be applied FIRST, and environments with a LOWER priority will be applied LAST. Environments with the same priority may be applied in any order.The default priority is 1000.
- Returns:
- Returns this environment's priority.
-
builder(RegistryEntryList, RegistryEntry)