Record Class BlockAttachedFeature.Config

java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.BlockAttachedFeature.Config
Record Components:
stateProvider - The dynamic provider supplying the block to be placed.
targets - The list of allowed block info targets that can be overwritten at the origin.
canAttachTo - The list of block info targets that are considered valid structural support.
directions - The list of block faces to check for structural support relative to the origin.
All Implemented Interfaces:
FeatureConfig
Enclosing class:
BlockAttachedFeature

public static record BlockAttachedFeature.Config(BlockStateProvider stateProvider, List<BlockInfo> targets, List<BlockInfo> canAttachTo, List<org.bukkit.block.BlockFace> directions) extends Record implements FeatureConfig
Configuration record for the block attached feature.
  • Field Details

  • Constructor Details

    • Config

      public Config(BlockStateProvider stateProvider, List<BlockInfo> targets, List<BlockInfo> canAttachTo, List<org.bukkit.block.BlockFace> directions)
      Creates an instance of a Config record class.
      Parameters:
      stateProvider - the value for the stateProvider record component
      targets - the value for the targets record component
      canAttachTo - the value for the canAttachTo record component
      directions - the value for the directions 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • 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
    • canAttachTo

      public List<BlockInfo> canAttachTo()
      Returns the value of the canAttachTo record component.
      Returns:
      the value of the canAttachTo record component
    • directions

      public List<org.bukkit.block.BlockFace> directions()
      Returns the value of the directions record component.
      Returns:
      the value of the directions record component