documentation:fabric_loader
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
documentation:fabric_loader [2019/06/09 10:26] – [Launchers] Explain what a launcher is jamieswhiteshirt | documentation:fabric_loader [2020/02/22 00:55] – General cleanup jamieswhiteshirt | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Fabric Loader ====== | ====== Fabric Loader ====== | ||
- | Fabric Loader is Fabric' | + | Fabric Loader is Fabric' |
Fabric Loader has services to allow mods to have some code executed during initialization, | Fabric Loader has services to allow mods to have some code executed during initialization, | ||
+ | |||
+ | ===== Features ===== | ||
==== Mods ==== | ==== Mods ==== | ||
- | A mod is a jar with a [[documentation: | + | A mod is a jar with a [[documentation: |
+ | |||
+ | Fabric Loader makes all mods equally capable of modifying the game. As an example, anything Fabric API does can be done by any other mod. | ||
Mods are loaded both from the classpath and from the mods directory. They are expected to match the mappings in the current environment, | Mods are loaded both from the classpath and from the mods directory. They are expected to match the mappings in the current environment, | ||
- | |||
- | Fabric Loader makes all mods equally capable of modifying the game. As an example, anything Fabric API does can be done by any other mod. | ||
==== Nested JARs ==== | ==== Nested JARs ==== | ||
- | A mod may bundle a number of other mods within its JAR. See the [[https:// | + | Nested JARs allow a mod to provide its own dependencies, |
- | Nested JARs allow a mod to provide its own dependencies, so Fabric Loader can pick the best version matching the dependencies | + | Nested JARs are not extracted, they are instead loaded |
- | + | ||
- | When loaded, nested JARs are loaded into an in-memory file system using jimfs, then added to the classpath. | + | |
==== Entrypoints ==== | ==== Entrypoints ==== | ||
- | Entrypoints are a way for mods to expose code objects such as classes, fields and methods for usage by Fabric Loader or other mods. Fabric Loader uses entrypoints for mod initialization, | ||
- | An entrypoint is only loaded when entrypoints | + | Fabric Loader has an [[documentation: |
- | Fabric Loader has three built-in entrypoint types for mod initialization in relation to physical sides (see [[tutorial: | + | ==== Mixin ==== |
- | * **main**: The first entrypoint | + | Mixin allows mods to transform Minecraft classes |
- | * **client**: Will run after main only in a physical client. Expects | + | |
- | * **server**: Will run after main only in a physical server. Expects | + | |
- | The default language adapter is designed | + | Mixin was not specifically made for Fabric, so Fabric Loader uses a slightly modified version of Mixin. However, the documentation |
- | * **Class**: '' | + | ==== Mappings ==== |
- | * **Method**: '' | + | |
- | * **Field**: '' | + | |
- | References | + | Fabric Loader provides an API to determine names of classes, fields |
- | Language adapters for other languages can be implemented by mods. [[https:// | + | ===== Fabric Loader internals ===== |
- | + | ||
- | ==== Mixin ==== | + | |
- | + | ||
- | Mixin allows mods to transform Minecraft classes and even mod classes, and is the only method of class transformation that Fabric Loader allows. A mod can declare its own mixin configuration which enables the use of Mixin. Fabric Loader uses a slightly modified version of Mixin, but the documentation of the unmodified version is still mostly valid. The modifications are mostly related to making it work without LegacyLauncher/ | + | |
==== Deobfuscation ==== | ==== Deobfuscation ==== | ||
When launched in a non-development environment, | When launched in a non-development environment, | ||
- | |||
- | ==== Mappings ==== | ||
- | |||
- | Fabric Loader provides an API to determine names of classes, fields and methods with respect to the different environments that mods may be loaded in. This can be used to support reflection in any environment provided Fabric Loader has access to mappings to resolve the name. | ||
==== Class loading and transformation ==== | ==== Class loading and transformation ==== | ||
Line 64: | Line 51: | ||
==== Launchers ==== | ==== Launchers ==== | ||
- | A launcher is something provides a method to use Fabric Loader in a Java process. A launcher must provide a few features to support Fabric Loader' | + | A launcher |
- | Knot is the default launcher included in Fabric Loader designed specifically for Fabric Loader' | + | Knot is the default launcher included in Fabric Loader, designed specifically for Fabric Loader' |
When launching a server using Knot in a production environment, | When launching a server using Knot in a production environment, | ||
- | Fabric Loader can also be launched with LegacyLauncher/ | + | Fabric Loader can also be launched with LegacyLauncher/ |
documentation/fabric_loader.txt · Last modified: 2023/12/27 12:57 by 194.190.81.32