Record Class JarModsDotTomlModFileReader.DefaultModFileInfo
java.lang.Object
java.lang.Record
net.neoforged.fml.loading.moddiscovery.readers.JarModsDotTomlModFileReader.DefaultModFileInfo
- All Implemented Interfaces:
IConfigurable
,IModFileInfo
- Enclosing class:
JarModsDotTomlModFileReader
private static record JarModsDotTomlModFileReader.DefaultModFileInfo(IModFile mod, String license, IConfigurable configurable)
extends Record
implements IModFileInfo, IConfigurable
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.neoforged.neoforgespi.language.IModFileInfo
IModFileInfo.LanguageSpec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IConfigurable
The field for theconfigurable
record component.private final String
The field for thelicense
record component.private final IModFile
The field for themod
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
DefaultModFileInfo
(IModFile mod, String license, IConfigurable configurable) Creates an instance of aDefaultModFileInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigurable
record component.final boolean
Indicates whether some other object is "equal to" this one.<T> Optional
<T> getConfigElement
(String... strings) List
<? extends IConfigurable> getConfigList
(String... strings) getFile()
getMods()
final int
hashCode()
Returns a hash code value for this object.license()
Returns the value of thelicense
record component.mod()
Returns the value of themod
record component.boolean
boolean
toString()
Returns a string representation of this record class.
-
Field Details
-
mod
The field for themod
record component. -
license
The field for thelicense
record component. -
configurable
The field for theconfigurable
record component.
-
-
Constructor Details
-
DefaultModFileInfo
Creates an instance of aDefaultModFileInfo
record class.- Parameters:
mod
- the value for themod
record componentlicense
- the value for thelicense
record componentconfigurable
- the value for theconfigurable
record component
-
-
Method Details
-
getConfigElement
- Specified by:
getConfigElement
in interfaceIConfigurable
-
getConfigList
- Specified by:
getConfigList
in interfaceIConfigurable
-
getMods
- Specified by:
getMods
in interfaceIModFileInfo
-
requiredLanguageLoaders
- Specified by:
requiredLanguageLoaders
in interfaceIModFileInfo
-
showAsResourcePack
public boolean showAsResourcePack()- Specified by:
showAsResourcePack
in interfaceIModFileInfo
-
showAsDataPack
public boolean showAsDataPack()- Specified by:
showAsDataPack
in interfaceIModFileInfo
-
getFileProperties
- Specified by:
getFileProperties
in interfaceIModFileInfo
-
getLicense
- Specified by:
getLicense
in interfaceIModFileInfo
-
getFile
- Specified by:
getFile
in interfaceIModFileInfo
-
getConfig
- Specified by:
getConfig
in interfaceIModFileInfo
-
moduleName
- Specified by:
moduleName
in interfaceIModFileInfo
-
versionString
- Specified by:
versionString
in interfaceIModFileInfo
-
usesServices
- Specified by:
usesServices
in interfaceIModFileInfo
-
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)
. -
mod
Returns the value of themod
record component.- Returns:
- the value of the
mod
record component
-
license
Returns the value of thelicense
record component.- Returns:
- the value of the
license
record component
-
configurable
Returns the value of theconfigurable
record component.- Returns:
- the value of the
configurable
record component
-