Package net.fabricmc.loader.api
Interface ModContainer
public interface ModContainer
Represents a mod.
-
Method Summary
Modifier and Type Method Description ModMetadata
getMetadata()
Returns the metadata of this mod.default Path
getPath(String file)
Gets an NIO reference to a file inside the JAR.default Path
getRoot()
Deprecated.Path
getRootPath()
Returns the root directory of the mod.
-
Method Details
-
getMetadata
ModMetadata getMetadata()Returns the metadata of this mod. -
getRoot
Deprecated.usegetRootPath()
insteadReturns the root directory of the mod.- Returns:
- the root directory
-
getRootPath
Path getRootPath()Returns the root directory of the mod.It may be the root directory of the mod JAR or the folder of the mod.
- Returns:
- the root directory of the mod
-
getPath
Gets an NIO reference to a file inside the JAR.The path is not guaranteed to exist!
- Parameters:
file
- The location from root, using/
as a separator.- Returns:
- the path to a given file
-
getRootPath()
instead