Record Class ConcentricRingsStructurePlacement
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.placement.ConcentricRingsStructurePlacement
- All Implemented Interfaces:
StructurePlacement
public record ConcentricRingsStructurePlacement(int distance, int spread, int count)
extends Record
implements StructurePlacement
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ConcentricRingsStructurePlacement>private final intThe field for thecountrecord component.private final intThe field for thedistancerecord component.private final intThe field for thespreadrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConcentricRingsStructurePlacement(int distance, int spread, int count) Creates an instance of aConcentricRingsStructurePlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.intdistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisFeatureChunk(ChunkGenerator p_212310_, long p_212311_, int p_212312_, int p_212313_) intspread()Returns the value of thespreadrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
distance
private final int distanceThe field for thedistancerecord component. -
spread
private final int spreadThe field for thespreadrecord component. -
count
private final int countThe field for thecountrecord component. -
CODEC
-
-
Constructor Details
-
ConcentricRingsStructurePlacement
public ConcentricRingsStructurePlacement(int distance, int spread, int count) Creates an instance of aConcentricRingsStructurePlacementrecord class.- Parameters:
distance- the value for thedistancerecord componentspread- the value for thespreadrecord componentcount- the value for thecountrecord component
-
-
Method Details
-
isFeatureChunk
public boolean isFeatureChunk(ChunkGenerator p_212310_, long p_212311_, int p_212312_, int p_212313_) - Specified by:
isFeatureChunkin interfaceStructurePlacement
-
type
- Specified by:
typein interfaceStructurePlacement
-
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. -
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. -
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 with '=='. -
distance
public int distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
spread
public int spread()Returns the value of thespreadrecord component.- Returns:
- the value of the
spreadrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-