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
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ConcentricRingsStructurePlacement>
private final int
The field for thecount
record component.private final int
The field for thedistance
record component.private final int
The field for thespread
record component. -
Constructor Summary
ConstructorDescriptionConcentricRingsStructurePlacement
(int distance, int spread, int count) Creates an instance of aConcentricRingsStructurePlacement
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
count()
Returns the value of thecount
record component.int
distance()
Returns the value of thedistance
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isFeatureChunk
(ChunkGenerator p_212310_, long p_212311_, int p_212312_, int p_212313_) int
spread()
Returns the value of thespread
record component.final String
toString()
Returns a string representation of this record class.type()
-
Field Details
-
distance
private final int distanceThe field for thedistance
record component. -
spread
private final int spreadThe field for thespread
record component. -
count
private final int countThe field for thecount
record component. -
CODEC
-
-
Constructor Details
-
ConcentricRingsStructurePlacement
public ConcentricRingsStructurePlacement(int distance, int spread, int count) Creates an instance of aConcentricRingsStructurePlacement
record class.- Parameters:
distance
- the value for thedistance
record componentspread
- the value for thespread
record componentcount
- the value for thecount
record component
-
-
Method Details
-
isFeatureChunk
public boolean isFeatureChunk(ChunkGenerator p_212310_, long p_212311_, int p_212312_, int p_212313_) - Specified by:
isFeatureChunk
in interfaceStructurePlacement
-
type
- Specified by:
type
in 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 thedistance
record component.- Returns:
- the value of the
distance
record component
-
spread
public int spread()Returns the value of thespread
record component.- Returns:
- the value of the
spread
record component
-
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-