Record Class BlockPatchFeature.Config

java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.BlockPatchFeature.Config
Record Components:
tries - The total number of placement attempts within the patch radius.
xzSpread - The maximum horizontal offset from the origin on the X and Z axes.
ySpread - The maximum vertical offset from the origin on the Y axis.
stateProvider - The dynamic provider supplying the blocks to be scattered.
targets - The list of allowed target block identifiers that can be overwritten.
All Implemented Interfaces:
FeatureConfig
Enclosing class:
BlockPatchFeature

public static record BlockPatchFeature.Config(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider, List<BlockInfo> targets) extends Record implements FeatureConfig
Configuration record for the block patch feature.
  • Field Details

  • Constructor Details

    • Config

      public Config(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider, List<BlockInfo> targets)
      Creates an instance of a Config record class.
      Parameters:
      tries - the value for the tries record component
      xzSpread - the value for the xzSpread record component
      ySpread - the value for the ySpread record component
      stateProvider - the value for the stateProvider record component
      targets - the value for the targets record component
  • Method Details

    • 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.
    • tries

      public int tries()
      Returns the value of the tries record component.
      Returns:
      the value of the tries record component
    • xzSpread

      public int xzSpread()
      Returns the value of the xzSpread record component.
      Returns:
      the value of the xzSpread record component
    • ySpread

      public int ySpread()
      Returns the value of the ySpread record component.
      Returns:
      the value of the ySpread record component
    • stateProvider

      public BlockStateProvider stateProvider()
      Returns the value of the stateProvider record component.
      Returns:
      the value of the stateProvider record component
    • targets

      public List<BlockInfo> targets()
      Returns the value of the targets record component.
      Returns:
      the value of the targets record component