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 Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<BlockStateProvider> The field for theblockrecord component.The field for thecannotPlaceOnrecord component.private final BlockPredicateThe field for thecanReplacerecord component.private final IntProviderThe field for theclusterReachrecord component.static final com.mojang.serialization.MapCodec<SteppedColumnClusterFeature> private final IntProviderThe field for thecolumnCountrecord component.private final IntProviderThe field for thecolumnReachrecord component.private final BlockPredicateThe field for thecontinueThroughrecord component.private final IntProviderThe field for theheightrecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSteppedColumnClusterFeature(Holder<BlockStateProvider> block, BlockPredicate continueThrough, BlockPredicate canReplace, HolderSet<Block> cannotPlaceOn, IntProvider clusterReach, IntProvider columnCount, IntProvider columnReach, IntProvider height) Creates an instance of aSteppedColumnClusterFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.Returns the value of thecannotPlaceOnrecord component.private booleancanPlaceAt(WorldGenLevel level, BlockPos.MutableBlockPos cursor) Returns the value of thecanReplacerecord component.Returns the value of theclusterReachrecord component.com.mojang.serialization.MapCodec<SteppedColumnClusterFeature> codec()Returns the value of thecolumnCountrecord component.Returns the value of thecolumnReachrecord component.Returns the value of thecontinueThroughrecord component.final booleanIndicates whether some other object is "equal to" this one.findAir(LevelAccessor level, BlockPos.MutableBlockPos cursor, int limit) findSurface(WorldGenLevel level, int lavaSeaLevel, BlockPos.MutableBlockPos cursor, int limit) final inthashCode()Returns a hash code value for this object.height()Returns the value of theheightrecord component.booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) private booleanplaceColumn(WorldGenLevel level, RandomSource random, int lavaSeaLevel, BlockPos origin, int columnHeight, int reach) final StringtoString()Returns a string representation of this record class.Methods inherited from interface Feature
getSubFeatures, markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
block
The field for theblockrecord component. -
continueThrough
The field for thecontinueThroughrecord component. -
canReplace
The field for thecanReplacerecord component. -
cannotPlaceOn
-
clusterReach
The field for theclusterReachrecord component. -
columnCount
The field for thecolumnCountrecord component. -
columnReach
The field for thecolumnReachrecord component. -
height
The field for theheightrecord component. -
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 aSteppedColumnClusterFeaturerecord class.- Parameters:
block- the value for theblockrecord componentcontinueThrough- the value for thecontinueThroughrecord componentcanReplace- the value for thecanReplacerecord componentcannotPlaceOn- the value for thecannotPlaceOnrecord componentclusterReach- the value for theclusterReachrecord componentcolumnCount- the value for thecolumnCountrecord componentcolumnReach- the value for thecolumnReachrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
codec
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
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
-
findAir
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
continueThrough
Returns the value of thecontinueThroughrecord component.- Returns:
- the value of the
continueThroughrecord component
-
canReplace
Returns the value of thecanReplacerecord component.- Returns:
- the value of the
canReplacerecord component
-
cannotPlaceOn
-
clusterReach
Returns the value of theclusterReachrecord component.- Returns:
- the value of the
clusterReachrecord component
-
columnCount
Returns the value of thecolumnCountrecord component.- Returns:
- the value of the
columnCountrecord component
-
columnReach
Returns the value of thecolumnReachrecord component.- Returns:
- the value of the
columnReachrecord component
-
height
Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-