Record Class DeltaFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.DeltaFeature
- All Implemented Interfaces:
Feature
public record DeltaFeature(BlockState contents, BlockState rim, IntProvider size, IntProvider rimSize)
extends Record
implements Feature
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ImmutableList<Block> static final com.mojang.serialization.MapCodec<DeltaFeature> private final BlockStateThe field for thecontentsrecord component.private static final Direction[]private final BlockStateThe field for therimrecord component.private static final doubleprivate final IntProviderThe field for therimSizerecord component.private final IntProviderThe field for thesizerecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionDeltaFeature(BlockState contents, BlockState rim, IntProvider size, IntProvider rimSize) Creates an instance of aDeltaFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<DeltaFeature> codec()contents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private booleanisClear(LevelAccessor level, BlockPos pos) booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) rim()Returns the value of therimrecord component.rimSize()Returns the value of therimSizerecord component.size()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface Feature
getSubFeatures, markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
contents
The field for thecontentsrecord component. -
rim
The field for therimrecord component. -
size
The field for thesizerecord component. -
rimSize
The field for therimSizerecord component. -
CODEC
-
CANNOT_REPLACE
-
DIRECTIONS
-
RIM_SPAWN_CHANCE
private static final double RIM_SPAWN_CHANCE- See Also:
-
-
Constructor Details
-
DeltaFeature
Creates an instance of aDeltaFeaturerecord class.- Parameters:
contents- the value for thecontentsrecord componentrim- the value for therimrecord componentsize- the value for thesizerecord componentrimSize- the value for therimSizerecord component
-
-
Method Details
-
codec
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
isClear
-
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). -
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-
rim
Returns the value of therimrecord component.- Returns:
- the value of the
rimrecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
rimSize
Returns the value of therimSizerecord component.- Returns:
- the value of the
rimSizerecord component
-