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 IConfigurableThe field for theconfigurablerecord component.private final StringThe field for thelicenserecord component.private final IModFileThe field for themodrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDefaultModFileInfo(IModFile mod, String license, IConfigurable configurable) Creates an instance of aDefaultModFileInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigurablerecord component.final booleanIndicates whether some other object is "equal to" this one.<T> Optional<T> getConfigElement(String... strings) List<? extends IConfigurable> getConfigList(String... strings) getFile()getMods()final inthashCode()Returns a hash code value for this object.license()Returns the value of thelicenserecord component.mod()Returns the value of themodrecord component.booleanbooleantoString()Returns a string representation of this record class.
-
Field Details
-
mod
The field for themodrecord component. -
license
The field for thelicenserecord component. -
configurable
The field for theconfigurablerecord component.
-
-
Constructor Details
-
DefaultModFileInfo
Creates an instance of aDefaultModFileInforecord class.- Parameters:
mod- the value for themodrecord componentlicense- the value for thelicenserecord componentconfigurable- the value for theconfigurablerecord component
-
-
Method Details
-
getConfigElement
- Specified by:
getConfigElementin interfaceIConfigurable
-
getConfigList
- Specified by:
getConfigListin interfaceIConfigurable
-
getMods
- Specified by:
getModsin interfaceIModFileInfo
-
requiredLanguageLoaders
- Specified by:
requiredLanguageLoadersin interfaceIModFileInfo
-
showAsResourcePack
public boolean showAsResourcePack()- Specified by:
showAsResourcePackin interfaceIModFileInfo
-
showAsDataPack
public boolean showAsDataPack()- Specified by:
showAsDataPackin interfaceIModFileInfo
-
getFileProperties
- Specified by:
getFilePropertiesin interfaceIModFileInfo
-
getLicense
- Specified by:
getLicensein interfaceIModFileInfo
-
getFile
- Specified by:
getFilein interfaceIModFileInfo
-
getConfig
- Specified by:
getConfigin interfaceIModFileInfo
-
versionString
- Specified by:
versionStringin interfaceIModFileInfo
-
usesServices
- Specified by:
usesServicesin 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 themodrecord component.- Returns:
- the value of the
modrecord component
-
license
Returns the value of thelicenserecord component.- Returns:
- the value of the
licenserecord component
-
configurable
Returns the value of theconfigurablerecord component.- Returns:
- the value of the
configurablerecord component
-