Record Class StructureSet
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.StructureSet
public record StructureSet(List<StructureSet.StructureSelectionEntry> structures, StructurePlacement placement)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<StructureSet>> static final com.mojang.serialization.Codec<StructureSet> private final StructurePlacementThe field for theplacementrecord component.private final List<StructureSet.StructureSelectionEntry> The field for thestructuresrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStructureSet(List<StructureSet.StructureSelectionEntry> structures, StructurePlacement placement) Creates an instance of aStructureSetrecord class.StructureSet(Holder<Structure> p_210007_, StructurePlacement p_210008_) -
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 theplacementrecord component.Returns the value of thestructuresrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
structures
The field for thestructuresrecord component. -
placement
The field for theplacementrecord component. -
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
StructureSet
-
StructureSet
public StructureSet(List<StructureSet.StructureSelectionEntry> structures, StructurePlacement placement) Creates an instance of aStructureSetrecord class.- Parameters:
structures- the value for thestructuresrecord componentplacement- the value for theplacementrecord component
-
-
Method Details
-
entry
public static StructureSet.StructureSelectionEntry entry(Holder<Structure> p_210018_, int p_210019_) -
entry
-
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 withObjects::equals(Object,Object). -
structures
Returns the value of thestructuresrecord component.- Returns:
- the value of the
structuresrecord component
-
placement
Returns the value of theplacementrecord component.- Returns:
- the value of the
placementrecord component
-