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
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumNon-exhaustive list of possibleModOriginkinds. -
Method Summary
Modifier and TypeMethodDescriptiongetKind()Get the kind of this origin, determines the available methods.Get the parent mod for aModOrigin.Kind.NESTEDorigin.Get the sub-location within the parent mod for aModOrigin.Kind.NESTEDorigin.getPaths()Get the jar or folder paths for aModOrigin.Kind.PATHorigin.
-
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.PATHorigin.- Returns:
- jar or folder paths
- Throws:
UnsupportedOperationException- for incompatible kinds
-
getParentModId
String getParentModId()Get the parent mod for aModOrigin.Kind.NESTEDorigin.- Returns:
- parent mod
- Throws:
UnsupportedOperationException- for incompatible kinds
-
getParentSubLocation
String getParentSubLocation()Get the sub-location within the parent mod for aModOrigin.Kind.NESTEDorigin.- Returns:
- sub-location
- Throws:
UnsupportedOperationException- for incompatible kinds
-