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

Representation of the various locations a mod was loaded from originally. More...

Inheritance diagram for net.fabricmc.loader.api.metadata.ModOrigin:
net.fabricmc.loader.impl.metadata.ModOriginImpl

Classes

enum  Kind
 Non-exhaustive list of possible ModOrigin kinds. More...

Public Member Functions

Kind getKind ()
 Get the kind of this origin, determines the available methods.
List< Path > getPaths ()
 Get the jar or folder paths for a Kind#PATH origin.
String getParentModId ()
 Get the parent mod for a Kind#NESTED origin.
String getParentSubLocation ()
 Get the sub-location within the parent mod for a Kind#NESTED origin.

Detailed Description

Representation of the various locations a mod was loaded from originally.

This location is not necessarily identical to the code source used at runtime, a mod may get copied or otherwise transformed before being put on the class path. It thus mostly represents the installation and initial loading, not what is being directly accessed at runtime.

Deprecated
This is part of fabric-loader's API - a full quilt replacement will be available after quilt gets plugins. Up until that point ModContainer#getSourcePaths() can be used to obtain the origin paths.

Member Function Documentation

◆ getKind()

Kind net.fabricmc.loader.api.metadata.ModOrigin.getKind ( )

Get the kind of this origin, determines the available methods.

Returns
mod origin kind

Implemented in net.fabricmc.loader.impl.metadata.ModOriginImpl.

◆ getParentModId()

String net.fabricmc.loader.api.metadata.ModOrigin.getParentModId ( )

Get the parent mod for a Kind#NESTED origin.

Returns
parent mod
Exceptions
UnsupportedOperationExceptionfor incompatible kinds

Implemented in net.fabricmc.loader.impl.metadata.ModOriginImpl.

◆ getParentSubLocation()

String net.fabricmc.loader.api.metadata.ModOrigin.getParentSubLocation ( )

Get the sub-location within the parent mod for a Kind#NESTED origin.

Returns
sub-location
Exceptions
UnsupportedOperationExceptionfor incompatible kinds

Implemented in net.fabricmc.loader.impl.metadata.ModOriginImpl.

◆ getPaths()

List< Path > net.fabricmc.loader.api.metadata.ModOrigin.getPaths ( )

Get the jar or folder paths for a Kind#PATH origin.

Returns
jar or folder paths
Exceptions
UnsupportedOperationExceptionfor incompatible kinds

Implemented in net.fabricmc.loader.impl.metadata.ModOriginImpl.


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