Record Class GeneratingOverlayMetadataSection
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.data.GeneratingOverlayMetadataSection
public record GeneratingOverlayMetadataSection(List<WithConditions<OverlayMetadataSection.OverlayEntry>> overlays)
extends Record
Can be used in place of
OverlayMetadataSection
during datagen if you wish to generate conditions.-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<GeneratingOverlayMetadataSection> private final List
<WithConditions<OverlayMetadataSection.OverlayEntry>> The field for theoverlays
record component.static final MetadataSectionType
<GeneratingOverlayMetadataSection> -
Constructor Summary
ConstructorDescriptionGeneratingOverlayMetadataSection
(List<WithConditions<OverlayMetadataSection.OverlayEntry>> overlays) Creates an instance of aGeneratingOverlayMetadataSection
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.overlays()
Returns the value of theoverlays
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
overlays
The field for theoverlays
record component. -
CODEC
-
TYPE
-
-
Constructor Details
-
GeneratingOverlayMetadataSection
public GeneratingOverlayMetadataSection(List<WithConditions<OverlayMetadataSection.OverlayEntry>> overlays) Creates an instance of aGeneratingOverlayMetadataSection
record class.- Parameters:
overlays
- the value for theoverlays
record component
-
-
Method Details
-
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)
. -
overlays
Returns the value of theoverlays
record component.- Returns:
- the value of the
overlays
record component
-