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
FieldsModifier 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
ConstructorsConstructorDescriptionBiomeLayer(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 aBiomeLayerrecord 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 thebiomesrecord component.net.minecraft.world.level.levelgen.DensityFunctiondensity()Returns the value of thedensityrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.net.minecraft.world.level.biome.Climate.ParameterPointrange()Returns the value of therangerecord component.final StringtoString()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 aBiomeLayerrecord 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 therangerecord component.- Returns:
- the value of the
rangerecord component
-
density
public net.minecraft.world.level.levelgen.DensityFunction density()Returns the value of thedensityrecord component.- Returns:
- the value of the
densityrecord 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 thebiomesrecord component.- Returns:
- the value of the
biomesrecord component
-