Record Class StructureSet.StructureSelectionEntry
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.StructureSet.StructureSelectionEntry
- Enclosing class:
StructureSet
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStructureSelectionEntry(Holder<Structure> structure, int weight) Creates an instance of aStructureSelectionEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestructurerecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Field Details
-
structure
-
weight
private final int weightThe field for theweightrecord component. -
CODEC
-
-
Constructor Details
-
StructureSelectionEntry
-
-
Method Details
-
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. -
structure
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-