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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<StructureSet>>
static final com.mojang.serialization.Codec<StructureSet>
private final StructurePlacement
The field for theplacement
record component.private final List<StructureSet.StructureSelectionEntry>
The field for thestructures
record component. -
Constructor Summary
ConstructorDescriptionStructureSet
(List<StructureSet.StructureSelectionEntry> structures, StructurePlacement placement) Creates an instance of aStructureSet
record class.StructureSet
(Holder<ConfiguredStructureFeature<?, ?>> p_210007_, StructurePlacement p_210008_) -
Method Summary
Modifier and TypeMethodDescriptionentry
(Holder<ConfiguredStructureFeature<?, ?>> p_210016_) entry
(Holder<ConfiguredStructureFeature<?, ?>> p_210018_, int p_210019_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theplacement
record component.Returns the value of thestructures
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
structures
The field for thestructures
record component. -
placement
The field for theplacement
record component. -
DIRECT_CODEC
-
CODEC
-
-
Constructor Details
-
StructureSet
public StructureSet(Holder<ConfiguredStructureFeature<?, ?>> p_210007_, StructurePlacement p_210008_) -
StructureSet
public StructureSet(List<StructureSet.StructureSelectionEntry> structures, StructurePlacement placement) Creates an instance of aStructureSet
record class.- Parameters:
structures
- the value for thestructures
record componentplacement
- the value for theplacement
record component
-
-
Method Details
-
entry
public static StructureSet.StructureSelectionEntry entry(Holder<ConfiguredStructureFeature<?, ?>> p_210018_, int p_210019_) -
entry
public static StructureSet.StructureSelectionEntry entry(Holder<ConfiguredStructureFeature<?, ?>> p_210016_) -
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 thestructures
record component.- Returns:
- the value of the
structures
record component
-
placement
Returns the value of theplacement
record component.- Returns:
- the value of the
placement
record component
-