Record Class FillLayerFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.FillLayerFeature
- All Implemented Interfaces:
Feature
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FillLayerFeature> private final intThe field for theheightrecord component.private final BlockStateThe field for thestaterecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFillLayerFeature(int height, BlockState state) Creates an instance of aFillLayerFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FillLayerFeature> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface Feature
getSubFeatures, markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
height
private final int heightThe field for theheightrecord component. -
state
The field for thestaterecord component. -
CODEC
-
-
Constructor Details
-
FillLayerFeature
Creates an instance of aFillLayerFeaturerecord class.- Parameters:
height- the value for theheightrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
codec
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-