Package net.fabricmc.loader.api.metadata
Interface ModOrigin
public interface ModOrigin
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.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Non-exhaustive list of possibleModOrigin
kinds. -
Method Summary
Modifier and TypeMethodDescriptiongetKind()
Get the kind of this origin, determines the available methods.Get the parent mod for aModOrigin.Kind.NESTED
origin.Get the sub-location within the parent mod for aModOrigin.Kind.NESTED
origin.getPaths()
Get the jar or folder paths for aModOrigin.Kind.PATH
origin.
-
Method Details
-
getKind
ModOrigin.Kind getKind()Get the kind of this origin, determines the available methods.- Returns:
- mod origin kind
-
getPaths
Get the jar or folder paths for aModOrigin.Kind.PATH
origin.- Returns:
- jar or folder paths
- Throws:
UnsupportedOperationException
- for incompatible kinds
-
getParentModId
String getParentModId()Get the parent mod for aModOrigin.Kind.NESTED
origin.- Returns:
- parent mod
- Throws:
UnsupportedOperationException
- for incompatible kinds
-
getParentSubLocation
String getParentSubLocation()Get the sub-location within the parent mod for aModOrigin.Kind.NESTED
origin.- Returns:
- sub-location
- Throws:
UnsupportedOperationException
- for incompatible kinds
-