Record Class SurfaceRuleSet
java.lang.Object
java.lang.Record
org.moddingx.libx.sandbox.surface.SurfaceRuleSet
- Record Components:
useDefaultNoiseSurface
- Whether the default surface rules from theNoiseGeneratorSettings
should be included.beforeBiomes
-Surface rules
that are applied before biome-specific rules.afterBiomes
-Surface rules
that are applied after biome-specific rules.defaultBiomeSurface
-Surface rules
used for biomes, where noBiomeSurface
is 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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<SurfaceRuleSet>>
static final com.mojang.serialization.Codec<SurfaceRuleSet>
-
Constructor Summary
ConstructorDescriptionSurfaceRuleSet
(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 aSurfaceRuleSet
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.SurfaceRules.RuleSource
Returns the value of theafterBiomes
record component.net.minecraft.world.level.levelgen.SurfaceRules.RuleSource
Returns the value of thebeforeBiomes
record component.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.net.minecraft.world.level.levelgen.SurfaceRules.RuleSource
Returns the value of thedefaultBiomeSurface
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theuseDefaultNoiseSurface
record 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 aSurfaceRuleSet
record class.- Parameters:
useDefaultNoiseSurface
- the value for theuseDefaultNoiseSurface
record componentbeforeBiomes
- the value for thebeforeBiomes
record componentafterBiomes
- the value for theafterBiomes
record componentdefaultBiomeSurface
- the value for thedefaultBiomeSurface
record 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 theuseDefaultNoiseSurface
record component.- Returns:
- the value of the
useDefaultNoiseSurface
record component
-
beforeBiomes
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes()Returns the value of thebeforeBiomes
record component.- Returns:
- the value of the
beforeBiomes
record component
-
afterBiomes
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes()Returns the value of theafterBiomes
record component.- Returns:
- the value of the
afterBiomes
record component
-
defaultBiomeSurface
public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface()Returns the value of thedefaultBiomeSurface
record component.- Returns:
- the value of the
defaultBiomeSurface
record component
-