Quilt Loader 1
Loading...
Searching...
No Matches
net.fabricmc.loader.api.metadata.ModMetadata Interface Reference

The metadata of a mod. More...

Inheritance diagram for net.fabricmc.loader.api.metadata.ModMetadata:
net.fabricmc.loader.metadata.LoaderModMetadata org.quiltmc.loader.impl.fabric.metadata.AbstractModMetadata org.quiltmc.loader.impl.metadata.FabricLoaderModMetadata org.quiltmc.loader.impl.metadata.FabricLoaderModMetadata org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric

Public Member Functions

String getType ()
 Returns the type of the mod.
String getId ()
 Returns the mod's ID.
Collection< String > getProvides ()
 Returns the mod's ID provides.
Version getVersion ()
 Returns the mod's version.
ModEnvironment getEnvironment ()
 Returns the mod's environment.
Collection< ModDependencygetDependencies ()
 Returns all of the mod's dependencies.
default Collection< ModDependencygetDepends ()
 Returns the mod's required dependencies, without which the Loader will terminate loading.
default Collection< ModDependencygetRecommends ()
 Returns the mod's recommended dependencies, without which the Loader will emit a warning.
default Collection< ModDependencygetSuggests ()
 Returns the mod's suggested dependencies.
default Collection< ModDependencygetConflicts ()
 Returns the mod's conflicts, with which the Loader will emit a warning.
default Collection< ModDependencygetBreaks ()
 Returns the mod's conflicts, with which the Loader will terminate loading.
String getName ()
 Returns the mod's display name.
String getDescription ()
 Returns the mod's description.
Collection< PersongetAuthors ()
 Returns the mod's authors.
Collection< PersongetContributors ()
 Returns the mod's contributors.
ContactInformation getContact ()
 Returns the mod's contact information.
Collection< String > getLicense ()
 Returns the mod's licenses.
Optional< String > getIconPath (int size)
 Gets the path to an icon.
boolean containsCustomValue (String key)
 Returns if the mod's fabric.mod.json declares a custom value under key.
CustomValue getCustomValue (String key)
 Returns the mod's fabric.mod.json declared custom value under key.
Map< String, CustomValuegetCustomValues ()
 Gets all custom values defined by this mod.
boolean containsCustomElement (String key)

Detailed Description

The metadata of a mod.

Deprecated
Please use quilt's org.quiltmc.loader.api.ModMetadata instead.

Member Function Documentation

◆ containsCustomElement()

boolean net.fabricmc.loader.api.metadata.ModMetadata.containsCustomElement ( String key)

◆ containsCustomValue()

boolean net.fabricmc.loader.api.metadata.ModMetadata.containsCustomValue ( String key)

Returns if the mod's fabric.mod.json declares a custom value under key.

Parameters
keythe key
Returns
whether a custom value is present

Implemented in org.quiltmc.loader.impl.fabric.metadata.AbstractModMetadata, org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getAuthors()

Collection< Person > net.fabricmc.loader.api.metadata.ModMetadata.getAuthors ( )

◆ getBreaks()

default Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getBreaks ( )
inline

Returns the mod's conflicts, with which the Loader will terminate loading.

Deprecated
Use getDependencies() and filter for ModDependency.Kind#BREAKS instead

Implemented in org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getConflicts()

default Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getConflicts ( )
inline

Returns the mod's conflicts, with which the Loader will emit a warning.

Deprecated
Use getDependencies() and filter for ModDependency.Kind#CONFLICTS instead

Implemented in org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getContact()

ContactInformation net.fabricmc.loader.api.metadata.ModMetadata.getContact ( )

◆ getContributors()

Collection< Person > net.fabricmc.loader.api.metadata.ModMetadata.getContributors ( )

◆ getCustomValue()

CustomValue net.fabricmc.loader.api.metadata.ModMetadata.getCustomValue ( String key)

Returns the mod's fabric.mod.json declared custom value under key.

Parameters
keythe key
Returns
the custom value, or null if no such value is present

Implemented in org.quiltmc.loader.impl.fabric.metadata.AbstractModMetadata, org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getCustomValues()

Map< String, CustomValue > net.fabricmc.loader.api.metadata.ModMetadata.getCustomValues ( )

Gets all custom values defined by this mod.

Note this map is unmodifiable.

Returns
a map containing the custom values this mod defines.

Implemented in org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getDependencies()

Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getDependencies ( )

◆ getDepends()

default Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getDepends ( )
inline

Returns the mod's required dependencies, without which the Loader will terminate loading.

Deprecated
Use getDependencies() and filter for ModDependency.Kind#DEPENDS instead

Implemented in org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getDescription()

String net.fabricmc.loader.api.metadata.ModMetadata.getDescription ( )

◆ getEnvironment()

ModEnvironment net.fabricmc.loader.api.metadata.ModMetadata.getEnvironment ( )

◆ getIconPath()

Optional< String > net.fabricmc.loader.api.metadata.ModMetadata.getIconPath ( int size)

Gets the path to an icon.

The standard defines icons as square .PNG files, however their dimensions are not defined - in particular, they are not guaranteed to be a power of two.

The preferred size is used in the following manner:

  • the smallest image larger than or equal to the size is returned, if one is present;
  • failing that, the largest image is returned.
Parameters
sizethe preferred size
Returns
the icon path, if any

Implemented in org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getId()

String net.fabricmc.loader.api.metadata.ModMetadata.getId ( )

Returns the mod's ID.

A mod's id must have only lowercase letters, digits, -, or _.

Returns
the mod's ID.

Implemented in org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getLicense()

Collection< String > net.fabricmc.loader.api.metadata.ModMetadata.getLicense ( )

◆ getName()

String net.fabricmc.loader.api.metadata.ModMetadata.getName ( )

◆ getProvides()

Collection< String > net.fabricmc.loader.api.metadata.ModMetadata.getProvides ( )

Returns the mod's ID provides.

The aliases follow the same rules as ID

Returns
the mod's ID provides

Implemented in org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getRecommends()

default Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getRecommends ( )
inline

Returns the mod's recommended dependencies, without which the Loader will emit a warning.

Deprecated
Use getDependencies() and filter for ModDependency.Kind#RECOMMENDS instead

Implemented in org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getSuggests()

default Collection< ModDependency > net.fabricmc.loader.api.metadata.ModMetadata.getSuggests ( )
inline

Returns the mod's suggested dependencies.

Deprecated
Use getDependencies() and filter for ModDependency.Kind#SUGGESTS instead

Implemented in org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getType()

String net.fabricmc.loader.api.metadata.ModMetadata.getType ( )

Returns the type of the mod.

The types may be fabric or builtin by default.

Returns
the type of the mod

Implemented in org.quiltmc.loader.impl.fabric.metadata.BuiltinModMetadata, and org.quiltmc.loader.impl.metadata.GeneralExt2FabricMetadata.

◆ getVersion()

Version net.fabricmc.loader.api.metadata.ModMetadata.getVersion ( )

The documentation for this interface was generated from the following file:
  • src/fabric/api/java/net/fabricmc/loader/api/metadata/ModMetadata.java