Record Class SteppedColumnClusterFeature

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

public record SteppedColumnClusterFeature(Holder<BlockStateProvider> block, BlockPredicate continueThrough, BlockPredicate canReplace, HolderSet<Block> cannotPlaceOn, IntProvider clusterReach, IntProvider columnCount, IntProvider columnReach, IntProvider height) extends Record implements Feature
  • Field Details

    • block

      private final Holder<BlockStateProvider> block
      The field for the block record component.
    • continueThrough

      private final BlockPredicate continueThrough
      The field for the continueThrough record component.
    • canReplace

      private final BlockPredicate canReplace
      The field for the canReplace record component.
    • cannotPlaceOn

      private final HolderSet<Block> cannotPlaceOn
      The field for the cannotPlaceOn record component.
    • clusterReach

      private final IntProvider clusterReach
      The field for the clusterReach record component.
    • columnCount

      private final IntProvider columnCount
      The field for the columnCount record component.
    • columnReach

      private final IntProvider columnReach
      The field for the columnReach record component.
    • height

      private final IntProvider height
      The field for the height record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<SteppedColumnClusterFeature> CODEC
  • Constructor Details

    • SteppedColumnClusterFeature

      public SteppedColumnClusterFeature(Holder<BlockStateProvider> block, BlockPredicate continueThrough, BlockPredicate canReplace, HolderSet<Block> cannotPlaceOn, IntProvider clusterReach, IntProvider columnCount, IntProvider columnReach, IntProvider height)
      Creates an instance of a SteppedColumnClusterFeature record class.
      Parameters:
      block - the value for the block record component
      continueThrough - the value for the continueThrough record component
      canReplace - the value for the canReplace record component
      cannotPlaceOn - the value for the cannotPlaceOn record component
      clusterReach - the value for the clusterReach record component
      columnCount - the value for the columnCount record component
      columnReach - the value for the columnReach record component
      height - the value for the height record component
  • Method Details

    • codec

      public com.mojang.serialization.MapCodec<SteppedColumnClusterFeature> 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
    • placeColumn

      private boolean placeColumn(WorldGenLevel level, RandomSource random, int lavaSeaLevel, BlockPos origin, int columnHeight, int reach)
    • findSurface

      private @Nullable BlockPos findSurface(WorldGenLevel level, int lavaSeaLevel, BlockPos.MutableBlockPos cursor, int limit)
    • canPlaceAt

      private boolean canPlaceAt(WorldGenLevel level, BlockPos.MutableBlockPos cursor)
    • findAir

      private @Nullable BlockPos findAir(LevelAccessor level, BlockPos.MutableBlockPos cursor, int limit)
    • 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.
    • block

      public Holder<BlockStateProvider> block()
      Returns the value of the block record component.
      Returns:
      the value of the block record component
    • continueThrough

      public BlockPredicate continueThrough()
      Returns the value of the continueThrough record component.
      Returns:
      the value of the continueThrough record component
    • canReplace

      public BlockPredicate canReplace()
      Returns the value of the canReplace record component.
      Returns:
      the value of the canReplace record component
    • cannotPlaceOn

      public HolderSet<Block> cannotPlaceOn()
      Returns the value of the cannotPlaceOn record component.
      Returns:
      the value of the cannotPlaceOn record component
    • clusterReach

      public IntProvider clusterReach()
      Returns the value of the clusterReach record component.
      Returns:
      the value of the clusterReach record component
    • columnCount

      public IntProvider columnCount()
      Returns the value of the columnCount record component.
      Returns:
      the value of the columnCount record component
    • columnReach

      public IntProvider columnReach()
      Returns the value of the columnReach record component.
      Returns:
      the value of the columnReach record component
    • height

      public IntProvider height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component