Record Class SurfaceRuleSet
java.lang.Object
java.lang.Record
org.moddingx.libx.sandbox.surface.SurfaceRuleSet
- Record Components:
useDefaultNoiseSurface- Whether the default surface rules from theNoiseGeneratorSettingsshould be included.beforeBiomes-Surface rulesthat are applied before biome-specific rules.afterBiomes-Surface rulesthat are applied after biome-specific rules.defaultBiomeSurface-Surface rulesused for biomes, where noBiomeSurfaceis registered.
public record SurfaceRuleSet(boolean useDefaultNoiseSurface, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface)
extends Record
Defines logic to override the
NoiseGeneratorSettings for an ExtendedNoiseChunkGenerator.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<SurfaceRuleSet>> static final com.mojang.serialization.Codec<SurfaceRuleSet> -
Constructor Summary
ConstructorsConstructorDescriptionSurfaceRuleSet(boolean useDefaultNoiseSurface, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface) Creates an instance of aSurfaceRuleSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.SurfaceRules.RuleSourceReturns the value of theafterBiomesrecord component.net.minecraft.world.level.levelgen.SurfaceRules.RuleSourceReturns the value of thebeforeBiomesrecord component.net.minecraft.world.level.levelgen.SurfaceRules.RuleSourcebuild(net.minecraft.core.Registry<net.minecraft.world.level.biome.Biome> biomeRegistry, net.minecraft.core.Registry<BiomeSurface> surfaceRegistry, Set<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes, net.minecraft.world.level.levelgen.NoiseGeneratorSettings settings) Builds the concrete surface rules for this rule set.net.minecraft.world.level.levelgen.SurfaceRules.RuleSourceReturns the value of thedefaultBiomeSurfacerecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseDefaultNoiseSurfacerecord component.
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
SurfaceRuleSet
public SurfaceRuleSet(boolean useDefaultNoiseSurface, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes, net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface) Creates an instance of aSurfaceRuleSetrecord class.- Parameters:
useDefaultNoiseSurface- the value for theuseDefaultNoiseSurfacerecord componentbeforeBiomes- the value for thebeforeBiomesrecord componentafterBiomes- the value for theafterBiomesrecord componentdefaultBiomeSurface- the value for thedefaultBiomeSurfacerecord component
-
-
Method Details
-
build
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource build(net.minecraft.core.Registry<net.minecraft.world.level.biome.Biome> biomeRegistry, net.minecraft.core.Registry<BiomeSurface> surfaceRegistry, Set<net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>> biomes, net.minecraft.world.level.levelgen.NoiseGeneratorSettings settings) Builds the concrete surface rules for this rule set. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
useDefaultNoiseSurface
public boolean useDefaultNoiseSurface()Returns the value of theuseDefaultNoiseSurfacerecord component.- Returns:
- the value of the
useDefaultNoiseSurfacerecord component
-
beforeBiomes
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes()Returns the value of thebeforeBiomesrecord component.- Returns:
- the value of the
beforeBiomesrecord component
-
afterBiomes
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes()Returns the value of theafterBiomesrecord component.- Returns:
- the value of the
afterBiomesrecord component
-
defaultBiomeSurface
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface()Returns the value of thedefaultBiomeSurfacerecord component.- Returns:
- the value of the
defaultBiomeSurfacerecord component
-