Quilt Loader 1
Loading...
Searching...
No Matches
net.fabricmc.loader.impl.ModContainerImpl Class Reference
Inheritance diagram for net.fabricmc.loader.impl.ModContainerImpl:
net.fabricmc.loader.ModContainer net.fabricmc.loader.api.ModContainer

Public Member Functions

 ModContainerImpl (ModContainer quilt)
ModMetadata getMetadata ()
 Returns the metadata of this mod.
LoaderModMetadata getInfo ()
List< Path > getRootPaths ()
 Returns the root directories of the mod (inside JAR/folder), exposing its contents.
ModOrigin getOrigin ()
 Gets where the mod was loaded from originally, the mod jar/folder itself.
URL getOriginUrl ()
Optional< net.fabricmc.loader.api.ModContainergetContainingMod ()
 Get the mod containing this mod (nested jar parent).
Collection< net.fabricmc.loader.api.ModContainergetContainedMods ()
 Get the active mods contained within this mod (nested jar children).
ModContainer getQuiltModContainer ()
Path getRootPath ()
Path getPath (String file)
Public Member Functions inherited from net.fabricmc.loader.api.ModContainer
default Optional< Path > findPath (String file)
 Gets an NIO reference to a file inside the JAR/folder.
default Path getRoot ()

Static Public Member Functions

static ModContainerImpl from (ModContainer quilt)

Member Function Documentation

◆ getContainedMods()

Collection< net.fabricmc.loader.api.ModContainer > net.fabricmc.loader.impl.ModContainerImpl.getContainedMods ( )
inline

Get the active mods contained within this mod (nested jar children).

Returns
active contained mods within this mod's jar

Implements net.fabricmc.loader.api.ModContainer.

◆ getContainingMod()

Optional< net.fabricmc.loader.api.ModContainer > net.fabricmc.loader.impl.ModContainerImpl.getContainingMod ( )
inline

Get the mod containing this mod (nested jar parent).

Returns
mod containing this mod or empty if not nested

Implements net.fabricmc.loader.api.ModContainer.

◆ getInfo()

LoaderModMetadata net.fabricmc.loader.impl.ModContainerImpl.getInfo ( )
inline

Reimplemented from net.fabricmc.loader.ModContainer.

◆ getMetadata()

ModMetadata net.fabricmc.loader.impl.ModContainerImpl.getMetadata ( )
inline

Returns the metadata of this mod.

Implements net.fabricmc.loader.api.ModContainer.

◆ getOrigin()

ModOrigin net.fabricmc.loader.impl.ModContainerImpl.getOrigin ( )
inline

Gets where the mod was loaded from originally, the mod jar/folder itself.

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.

The mod origin is provided for working with the installation like telling the user where a mod has been installed at. Accessing the files inside a mod jar/folder should use findPath and getRootPaths instead. Those also abstract jar accesses through the virtual ZipFileSystem away.

Returns
mod origin

Implements net.fabricmc.loader.api.ModContainer.

◆ getOriginUrl()

URL net.fabricmc.loader.impl.ModContainerImpl.getOriginUrl ( )
inline

Reimplemented from net.fabricmc.loader.ModContainer.

◆ getPath()

Path net.fabricmc.loader.impl.ModContainerImpl.getPath ( String file)
inline

◆ getRootPath()

Path net.fabricmc.loader.impl.ModContainerImpl.getRootPath ( )
inline

◆ getRootPaths()

List< Path > net.fabricmc.loader.impl.ModContainerImpl.getRootPaths ( )
inline

Returns the root directories of the mod (inside JAR/folder), exposing its contents.

The paths may point to regular folders or into mod JARs. Multiple root paths may occur in development environments with -Dfabric.classPathGroups as used in multi-project mod setups.

A path returned by this method may be incompatible with Path#toFile as its FileSystem doesn't necessarily represent the OS file system, but potentially a virtual view of jar contents or another abstraction.

Returns
the root directories of the mod, may be empty for builtin or other synthetic mods
Deprecated
Quilt loader merges multiple root paths into a single one: so this will always be a list of size 1.

Implements net.fabricmc.loader.api.ModContainer.


The documentation for this class was generated from the following file:
  • src/fabric/impl/java/net/fabricmc/loader/impl/ModContainerImpl.java