Record Class BiomeLayer
java.lang.Object
java.lang.Record
org.moddingx.libx.sandbox.generator.BiomeLayer
- Record Components:
range
- A climate range that the layer can generate in.density
- A custom density function that is sampled on every block position. Out of all biome layers the one with the highest density will be used to sample the biome at that position. These density functions don't support caching optimisations or interpolation, so they should be kept simple.biomes
- A climate parameter list mapping climate points to biomes.
public record BiomeLayer(net.minecraft.world.level.biome.Climate.ParameterPoint range, net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes)
extends Record
A biome layer is a set of biomes and climate parameters that can generate in a noise range.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<BiomeLayer>>
static final com.mojang.serialization.Codec<BiomeLayer>
static final net.minecraft.world.level.biome.Climate.ParameterPoint
-
Constructor Summary
ConstructorDescriptionBiomeLayer
(net.minecraft.world.level.biome.Climate.ParameterPoint range, net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes) Creates an instance of aBiomeLayer
record class.BiomeLayer
(net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>>
biomes()
Returns the value of thebiomes
record component.net.minecraft.world.level.levelgen.DensityFunction
density()
Returns the value of thedensity
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.net.minecraft.world.level.biome.Climate.ParameterPoint
range()
Returns the value of therange
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
FULL_RANGE
public static final net.minecraft.world.level.biome.Climate.ParameterPoint FULL_RANGE -
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
BiomeLayer
public BiomeLayer(net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes) -
BiomeLayer
public BiomeLayer(net.minecraft.world.level.biome.Climate.ParameterPoint range, net.minecraft.world.level.levelgen.DensityFunction density, net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes) Creates an instance of aBiomeLayer
record class.
-
-
Method Details
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
range
public net.minecraft.world.level.biome.Climate.ParameterPoint range()Returns the value of therange
record component.- Returns:
- the value of the
range
record component
-
density
public net.minecraft.world.level.levelgen.DensityFunction density()Returns the value of thedensity
record component.- Returns:
- the value of the
density
record component
-
biomes
public net.minecraft.world.level.biome.Climate.ParameterList<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes()Returns the value of thebiomes
record component.- Returns:
- the value of the
biomes
record component
-