Record Class SurfaceRuleSet

java.lang.Object
java.lang.Record
org.moddingx.libx.sandbox.surface.SurfaceRuleSet
Record Components:
useDefaultNoiseSurface - Whether the default surface rules from the NoiseGeneratorSettings 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 no BiomeSurface 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

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<net.minecraft.core.Holder<SurfaceRuleSet>>
     
    static final com.mojang.serialization.Codec<SurfaceRuleSet>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a SurfaceRuleSet record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.level.levelgen.SurfaceRules.RuleSource
    Returns the value of the afterBiomes record component.
    net.minecraft.world.level.levelgen.SurfaceRules.RuleSource
    Returns the value of the beforeBiomes 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 the defaultBiomeSurface record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the useDefaultNoiseSurface record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<SurfaceRuleSet> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<SurfaceRuleSet>> 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 a SurfaceRuleSet record class.
      Parameters:
      useDefaultNoiseSurface - the value for the useDefaultNoiseSurface record component
      beforeBiomes - the value for the beforeBiomes record component
      afterBiomes - the value for the afterBiomes record component
      defaultBiomeSurface - the value for the defaultBiomeSurface 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

      public boolean equals(Object obj)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • useDefaultNoiseSurface

      public boolean useDefaultNoiseSurface()
      Returns the value of the useDefaultNoiseSurface record component.
      Returns:
      the value of the useDefaultNoiseSurface record component
    • beforeBiomes

      public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource beforeBiomes()
      Returns the value of the beforeBiomes record component.
      Returns:
      the value of the beforeBiomes record component
    • afterBiomes

      public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource afterBiomes()
      Returns the value of the afterBiomes record component.
      Returns:
      the value of the afterBiomes record component
    • defaultBiomeSurface

      public net.minecraft.world.level.levelgen.SurfaceRules.RuleSource defaultBiomeSurface()
      Returns the value of the defaultBiomeSurface record component.
      Returns:
      the value of the defaultBiomeSurface record component