Record Class FossilFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.FossilFeature
- All Implemented Interfaces:
Feature
public record FossilFeature(List<Identifier> fossilStructures, List<Identifier> overlayStructures, Holder<StructureProcessorList> fossilProcessors, Holder<StructureProcessorList> overlayProcessors, int maxEmptyCornersAllowed)
extends Record
implements Feature
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<FossilFeature> private final Holder<StructureProcessorList> The field for thefossilProcessorsrecord component.private final List<Identifier> The field for thefossilStructuresrecord component.private final intThe field for themaxEmptyCornersAllowedrecord component.private final Holder<StructureProcessorList> The field for theoverlayProcessorsrecord component.private final List<Identifier> The field for theoverlayStructuresrecord component.Fields inherited from interface Feature
DIRECT_CODEC, LIST_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFossilFeature(List<Identifier> fossilStructures, List<Identifier> overlayStructures, Holder<StructureProcessorList> fossilProcessors, Holder<StructureProcessorList> overlayProcessors, int maxEmptyCornersAllowed) Creates an instance of aFossilFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FossilFeature> codec()private static intcountEmptyCorners(WorldGenLevel level, BoundingBox structureBounds) final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefossilProcessorsrecord component.Returns the value of thefossilStructuresrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxEmptyCornersAllowedrecord component.Returns the value of theoverlayProcessorsrecord component.Returns the value of theoverlayStructuresrecord component.booleanplace(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) final StringtoString()Returns a string representation of this record class.Methods inherited from interface Feature
getSubFeatures, markAboveForPostProcessing, safeSetBlock, setBlock
-
Field Details
-
fossilStructures
The field for thefossilStructuresrecord component. -
overlayStructures
The field for theoverlayStructuresrecord component. -
fossilProcessors
The field for thefossilProcessorsrecord component. -
overlayProcessors
The field for theoverlayProcessorsrecord component. -
maxEmptyCornersAllowed
private final int maxEmptyCornersAllowedThe field for themaxEmptyCornersAllowedrecord component. -
CODEC
-
-
Constructor Details
-
FossilFeature
public FossilFeature(List<Identifier> fossilStructures, List<Identifier> overlayStructures, Holder<StructureProcessorList> fossilProcessors, Holder<StructureProcessorList> overlayProcessors, int maxEmptyCornersAllowed) Creates an instance of aFossilFeaturerecord class.- Parameters:
fossilStructures- the value for thefossilStructuresrecord componentoverlayStructures- the value for theoverlayStructuresrecord componentfossilProcessors- the value for thefossilProcessorsrecord componentoverlayProcessors- the value for theoverlayProcessorsrecord componentmaxEmptyCornersAllowed- the value for themaxEmptyCornersAllowedrecord component
-
-
Method Details
-
codec
-
place
public boolean place(WorldGenLevel level, ChunkGenerator chunkGenerator, RandomSource random, BlockPos origin) -
countEmptyCorners
-
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. -
fossilStructures
Returns the value of thefossilStructuresrecord component.- Returns:
- the value of the
fossilStructuresrecord component
-
overlayStructures
Returns the value of theoverlayStructuresrecord component.- Returns:
- the value of the
overlayStructuresrecord component
-
fossilProcessors
Returns the value of thefossilProcessorsrecord component.- Returns:
- the value of the
fossilProcessorsrecord component
-
overlayProcessors
Returns the value of theoverlayProcessorsrecord component.- Returns:
- the value of the
overlayProcessorsrecord component
-
maxEmptyCornersAllowed
public int maxEmptyCornersAllowed()Returns the value of themaxEmptyCornersAllowedrecord component.- Returns:
- the value of the
maxEmptyCornersAllowedrecord component
-