Record Class GeodeFeature

java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.GeodeFeature
All Implemented Interfaces:
Feature

public record GeodeFeature(GeodeBlockSettings blockSettings, GeodeLayerSettings layerSettings, GeodeCrackSettings crackSettings, double usePotentialPlacementsChance, double useAlternateLayer0Chance, boolean placementsRequireLayer0Alternate, IntProvider outerWallDistance, IntProvider distributionPoints, IntProvider pointOffset, int minGenOffset, int maxGenOffset, double noiseMultiplier, int invalidBlocksThreshold) extends Record implements Feature
  • Field Details

    • blockSettings

      private final GeodeBlockSettings blockSettings
      The field for the blockSettings record component.
    • layerSettings

      private final GeodeLayerSettings layerSettings
      The field for the layerSettings record component.
    • crackSettings

      private final GeodeCrackSettings crackSettings
      The field for the crackSettings record component.
    • usePotentialPlacementsChance

      private final double usePotentialPlacementsChance
      The field for the usePotentialPlacementsChance record component.
    • useAlternateLayer0Chance

      private final double useAlternateLayer0Chance
      The field for the useAlternateLayer0Chance record component.
    • placementsRequireLayer0Alternate

      private final boolean placementsRequireLayer0Alternate
      The field for the placementsRequireLayer0Alternate record component.
    • outerWallDistance

      private final IntProvider outerWallDistance
      The field for the outerWallDistance record component.
    • distributionPoints

      private final IntProvider distributionPoints
      The field for the distributionPoints record component.
    • pointOffset

      private final IntProvider pointOffset
      The field for the pointOffset record component.
    • minGenOffset

      private final int minGenOffset
      The field for the minGenOffset record component.
    • maxGenOffset

      private final int maxGenOffset
      The field for the maxGenOffset record component.
    • noiseMultiplier

      private final double noiseMultiplier
      The field for the noiseMultiplier record component.
    • invalidBlocksThreshold

      private final int invalidBlocksThreshold
      The field for the invalidBlocksThreshold record component.
    • NOISE_PARAMETERS

      private static final NormalNoise NOISE_PARAMETERS
    • CHANCE_RANGE

      public static final com.mojang.serialization.Codec<Double> CHANCE_RANGE
    • CODEC

      public static final com.mojang.serialization.MapCodec<GeodeFeature> CODEC
    • DIRECTIONS

      private static final Direction[] DIRECTIONS
  • Constructor Details

    • GeodeFeature

      public GeodeFeature(GeodeBlockSettings blockSettings, GeodeLayerSettings layerSettings, GeodeCrackSettings crackSettings, double usePotentialPlacementsChance, double useAlternateLayer0Chance, boolean placementsRequireLayer0Alternate, IntProvider outerWallDistance, IntProvider distributionPoints, IntProvider pointOffset, int minGenOffset, int maxGenOffset, double noiseMultiplier, int invalidBlocksThreshold)
      Creates an instance of a GeodeFeature record class.
      Parameters:
      blockSettings - the value for the blockSettings record component
      layerSettings - the value for the layerSettings record component
      crackSettings - the value for the crackSettings record component
      usePotentialPlacementsChance - the value for the usePotentialPlacementsChance record component
      useAlternateLayer0Chance - the value for the useAlternateLayer0Chance record component
      placementsRequireLayer0Alternate - the value for the placementsRequireLayer0Alternate record component
      outerWallDistance - the value for the outerWallDistance record component
      distributionPoints - the value for the distributionPoints record component
      pointOffset - the value for the pointOffset record component
      minGenOffset - the value for the minGenOffset record component
      maxGenOffset - the value for the maxGenOffset record component
      noiseMultiplier - the value for the noiseMultiplier record component
      invalidBlocksThreshold - the value for the invalidBlocksThreshold record component
  • Method Details

    • codec

      public com.mojang.serialization.MapCodec<GeodeFeature> codec()
      Specified by:
      codec in interface Feature
    • place

      public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin)
      Specified by:
      place in interface Feature
    • 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
    • hashCode

      public final 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
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockSettings

      public GeodeBlockSettings blockSettings()
      Returns the value of the blockSettings record component.
      Returns:
      the value of the blockSettings record component
    • layerSettings

      public GeodeLayerSettings layerSettings()
      Returns the value of the layerSettings record component.
      Returns:
      the value of the layerSettings record component
    • crackSettings

      public GeodeCrackSettings crackSettings()
      Returns the value of the crackSettings record component.
      Returns:
      the value of the crackSettings record component
    • usePotentialPlacementsChance

      public double usePotentialPlacementsChance()
      Returns the value of the usePotentialPlacementsChance record component.
      Returns:
      the value of the usePotentialPlacementsChance record component
    • useAlternateLayer0Chance

      public double useAlternateLayer0Chance()
      Returns the value of the useAlternateLayer0Chance record component.
      Returns:
      the value of the useAlternateLayer0Chance record component
    • placementsRequireLayer0Alternate

      public boolean placementsRequireLayer0Alternate()
      Returns the value of the placementsRequireLayer0Alternate record component.
      Returns:
      the value of the placementsRequireLayer0Alternate record component
    • outerWallDistance

      public IntProvider outerWallDistance()
      Returns the value of the outerWallDistance record component.
      Returns:
      the value of the outerWallDistance record component
    • distributionPoints

      public IntProvider distributionPoints()
      Returns the value of the distributionPoints record component.
      Returns:
      the value of the distributionPoints record component
    • pointOffset

      public IntProvider pointOffset()
      Returns the value of the pointOffset record component.
      Returns:
      the value of the pointOffset record component
    • minGenOffset

      public int minGenOffset()
      Returns the value of the minGenOffset record component.
      Returns:
      the value of the minGenOffset record component
    • maxGenOffset

      public int maxGenOffset()
      Returns the value of the maxGenOffset record component.
      Returns:
      the value of the maxGenOffset record component
    • noiseMultiplier

      public double noiseMultiplier()
      Returns the value of the noiseMultiplier record component.
      Returns:
      the value of the noiseMultiplier record component
    • invalidBlocksThreshold

      public int invalidBlocksThreshold()
      Returns the value of the invalidBlocksThreshold record component.
      Returns:
      the value of the invalidBlocksThreshold record component